@eui/core 22.0.0-alpha.24 → 22.0.0-alpha.25
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/CHANGELOG.md +9 -0
- package/docs/changelog.html +14 -0
- package/docs/interfaces/Schema-10.html +1 -1
- package/docs/interfaces/Schema-11.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +1153 -1153
- package/docs/llms.txt +13 -13
- package/docs/miscellaneous/functions.html +8 -8
- package/docs/miscellaneous/variables.html +21 -21
- package/docs/properties.html +1 -1
- package/package.json +2 -2
|
@@ -909,12 +909,12 @@
|
|
|
909
909
|
},
|
|
910
910
|
{
|
|
911
911
|
"name": "Edit",
|
|
912
|
-
"id": "interface-Edit-
|
|
913
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
912
|
+
"id": "interface-Edit-d36032102ed30a7ada1e3d36bb9ca41b7234b855760cac9783a25818f7ffe2097e1ebd8e808b574ddec0760f827272f6cd561f45f3eb1578f87f39ee2633730a-2",
|
|
913
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
914
914
|
"deprecated": false,
|
|
915
915
|
"deprecationMessage": "",
|
|
916
916
|
"type": "interface",
|
|
917
|
-
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst OLD_TAG = 'eui-toolbar-menu';\nconst NEW_TAG = 'eui-toolbar-mega-menu';\nconst OLD_COMPONENT = 'EuiToolbarMenuComponent';\nconst NEW_COMPONENT = 'EuiToolbarMegaMenuComponent';\nconst OLD_INTERFACE = 'ToolbarItem';\nconst NEW_INTERFACE = 'EuiMenuItem';\nconst NEW_COMPONENT_PATH = '@eui/components/layout';\nconst NEW_INTERFACE_PATH = '@eui/core';\nconst REMOVED_OUTPUT = 'menuItemClick';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiToolbarMenu(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_TAG) && !original.includes(OLD_COMPONENT) && !original.includes(OLD_INTERFACE)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original, path, context);\n } else {\n result = migrateTypeScript(original, path, context);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-toolbar-menu → eui-toolbar-mega-menu in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated eui-toolbar-menu → eui-toolbar-mega-menu in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits, filePath, context);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n let result = migrateInlineTemplates(source, filePath, context);\n result = migrateImportsAndTypes(result, filePath, context);\n return result;\n}\n\nfunction migrateInlineTemplates(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(OLD_TAG)) {\n ts.forEachChild(node, visit); return; \n}\n const migrated = migrateTemplate(rawTemplate, filePath, context);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, changes);\n}\n\nfunction migrateImportsAndTypes(source: string, filePath: string, context: SchematicContext): string {\n if (!source.includes(OLD_COMPONENT) && !source.includes(OLD_INTERFACE)) return source;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiMenuItem is already imported from @eui/core\n let hasEuiMenuItemImport = false;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE && moduleSpec === NEW_INTERFACE_PATH) {\n hasEuiMenuItemImport = true;\n }\n }\n }\n\n // Second pass: collect edits for import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const moduleSpec = stmt.moduleSpecifier as ts.StringLiteral;\n const specifiers = namedBindings.elements;\n const hasComponent = specifiers.some((s) => s.name.text === OLD_COMPONENT);\n const hasInterface = specifiers.some((s) => s.name.text === OLD_INTERFACE);\n\n if (hasComponent && hasInterface) {\n // Both are in the same import → must split into two different paths\n const others = specifiers.filter((s) => s.name.text !== OLD_COMPONENT && s.name.text !== OLD_INTERFACE);\n const lines: string[] = [];\n lines.push(`import { ${NEW_COMPONENT} } from '${NEW_COMPONENT_PATH}';`);\n if (!hasEuiMenuItemImport) {\n lines.push(`import { ${NEW_INTERFACE} } from '${NEW_INTERFACE_PATH}';`);\n }\n if (others.length > 0) {\n const otherNames = others.map((s) => s.name.text).join(', ');\n lines.push(`import { ${otherNames} } from '${moduleSpec.text}';`);\n }\n edits.push({\n start: stmt.getStart(sourceFile),\n end: stmt.getEnd(),\n replacement: lines.join('\\n'),\n });\n } else if (hasComponent) {\n edits.push({\n start: moduleSpec.getStart(sourceFile) + 1,\n end: moduleSpec.getEnd() - 1,\n replacement: NEW_COMPONENT_PATH,\n });\n for (const specifier of specifiers) {\n if (specifier.name.text === OLD_COMPONENT) {\n edits.push({\n start: specifier.name.getStart(sourceFile),\n end: specifier.name.getEnd(),\n replacement: NEW_COMPONENT,\n });\n }\n }\n } else if (hasInterface) {\n if (hasEuiMenuItemImport) {\n removeImportSpecifier(namedBindings, specifiers.find((s) => s.name.text === OLD_INTERFACE)!, sourceFile, edits);\n } else {\n edits.push({\n start: moduleSpec.getStart(sourceFile) + 1,\n end: moduleSpec.getEnd() - 1,\n replacement: NEW_INTERFACE_PATH,\n });\n for (const specifier of specifiers) {\n if (specifier.name.text === OLD_INTERFACE) {\n edits.push({\n start: specifier.name.getStart(sourceFile),\n end: specifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n }\n }\n }\n\n // Third pass: rename identifier references in non-import positions\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return; // skip imports (already handled)\n if (ts.isIdentifier(node)) {\n if (node.text === OLD_COMPONENT) {\n edits.push({ start: node.getStart(sourceFile), end: node.getEnd(), replacement: NEW_COMPONENT });\n }\n if (node.text === OLD_INTERFACE) {\n edits.push({ start: node.getStart(sourceFile), end: node.getEnd(), replacement: NEW_INTERFACE });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n // Warn about ToolbarItem-specific properties\n warnRemovedProperties(sourceFile, filePath, context);\n\n return applyEdits(source, edits);\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end: importDecl.getEnd(),\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction warnRemovedProperties(sourceFile: ts.SourceFile, filePath: string, context: SchematicContext): void {\n const deprecated = ['isHome', 'isSeparator'];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && deprecated.includes(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"${node.name.text}\" was part of ToolbarItem but does not exist on EuiMenuItem. Review manually.`,\n );\n }\n if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name) && deprecated.includes(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"${node.name.text}\" was part of ToolbarItem but does not exist on EuiMenuItem. Review manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectTagRenames(node, source, edits);\n collectOutputRemovals(node, source, edits, filePath, context);\n }\n visitNodes(node.children, source, edits, filePath, context);\n }\n }\n}\n\nfunction collectTagRenames(element: TmplAstElement, source: string, edits: Edit[]): void {\n // Rename opening tag\n const openStart = element.startSourceSpan.start.offset + 1; // skip '<'\n edits.push({ start: openStart, end: openStart + OLD_TAG.length, replacement: NEW_TAG });\n\n // Rename closing tag\n if (element.endSourceSpan) {\n const closeStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeStart, end: closeStart + OLD_TAG.length, replacement: NEW_TAG });\n }\n}\n\nfunction collectOutputRemovals(\n element: TmplAstElement,\n source: string,\n edits: Edit[],\n filePath: string,\n context: SchematicContext,\n): void {\n for (const output of element.outputs) {\n if (output.name === REMOVED_OUTPUT) {\n let start = output.sourceSpan.start.offset;\n // Remove leading whitespace\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n edits.push({ start, end: output.sourceSpan.end.offset, replacement: '' });\n\n const { line } = element.startSourceSpan.start;\n context.logger.warn(\n `${filePath}:${line + 1} - \"(menuItemClick)\" has been removed. There is no equivalent on eui-toolbar-mega-menu.`,\n );\n }\n }\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n // Deduplicate edits at same position (e.g. module path edits when both Component and ToolbarItem are from same source)\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n // Last wins for same range\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
917
|
+
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nconst OLD_CLASS = 'EuiTooltipConfig';\nconst NEW_INTERFACE = 'EuiTooltipInterface';\n\nexport function migrateEuiTooltip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_CLASS)) return;\n\n const result = migrateTypeScript(original, path, context);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate EuiTooltipConfig → EuiTooltipInterface in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated EuiTooltipConfig → EuiTooltipInterface in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiTooltipInterface is already imported\n let hasInterfaceImport = false;\n let classImportDecl: ts.ImportDeclaration | null = null;\n let classImportModuleSpecifier: string | null = null;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE) {\n hasInterfaceImport = true;\n }\n if (specifier.name.text === OLD_CLASS) {\n classImportDecl = stmt;\n classImportModuleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n }\n }\n }\n\n // Second pass: handle import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const specifiers = namedBindings.elements;\n const classSpecifier = specifiers.find((s) => s.name.text === OLD_CLASS);\n if (!classSpecifier) continue;\n\n if (hasInterfaceImport) {\n // EuiTooltipInterface is already imported elsewhere → remove EuiTooltipConfig from this import\n removeImportSpecifier(namedBindings, classSpecifier, sourceFile, edits);\n } else {\n // Rename EuiTooltipConfig → EuiTooltipInterface in the import\n edits.push({\n start: classSpecifier.name.getStart(sourceFile),\n end: classSpecifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n hasInterfaceImport = true;\n }\n }\n\n // Third pass: replace `new EuiTooltipConfig(...)` → spread/cast to interface\n const visitNewExpressions = (node: ts.Node): void => {\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) {\n const args = node.arguments;\n if (args && args.length === 1) {\n const arg = args[0];\n // `new EuiTooltipConfig({ ... })` → `{ ... } as EuiTooltipInterface`\n // But if the argument is just a variable, we keep it: `varName as EuiTooltipInterface`\n const argText = source.slice(arg.getStart(sourceFile), arg.getEnd());\n\n if (ts.isObjectLiteralExpression(arg)) {\n // Inline object: `new EuiTooltipConfig({ x: 1 })` → `{ x: 1 }`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n } else {\n // Variable or expression: `new EuiTooltipConfig(opts)` → `opts`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n }\n } else if (!args || args.length === 0) {\n // `new EuiTooltipConfig()` → `{} as EuiTooltipInterface`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: `{} as ${NEW_INTERFACE}`,\n });\n }\n return; // don't recurse into children we've already replaced\n }\n ts.forEachChild(node, visitNewExpressions);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitNewExpressions(stmt);\n }\n }\n\n // Fourth pass: rename all remaining identifier references (type annotations, etc.)\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return;\n // Skip nodes we already covered in new expressions\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) return;\n\n if (ts.isIdentifier(node) && node.text === OLD_CLASS) {\n // Ensure this is not part of an import declaration\n if (!isPartOfImport(node)) {\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n return applyEdits(source, edits);\n}\n\nfunction isPartOfImport(node: ts.Node): boolean {\n let current: ts.Node | undefined = node.parent;\n while (current) {\n if (ts.isImportDeclaration(current)) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n let end = importDecl.getEnd();\n // Also remove trailing newline if present\n const fullText = sourceFile.getFullText();\n if (fullText[end] === '\\n') end++;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end,\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n // Not the last → remove from this specifier start to next specifier start\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n // Last element → remove from previous element end to this end\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
918
918
|
"displayName": "Edit",
|
|
919
919
|
"properties": [
|
|
920
920
|
{
|
|
@@ -926,7 +926,7 @@
|
|
|
926
926
|
"indexKey": "",
|
|
927
927
|
"optional": false,
|
|
928
928
|
"description": "",
|
|
929
|
-
"line":
|
|
929
|
+
"line": 12,
|
|
930
930
|
"rawdescription": "\n"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
@@ -938,7 +938,7 @@
|
|
|
938
938
|
"indexKey": "",
|
|
939
939
|
"optional": false,
|
|
940
940
|
"description": "",
|
|
941
|
-
"line":
|
|
941
|
+
"line": 13,
|
|
942
942
|
"rawdescription": "\n"
|
|
943
943
|
},
|
|
944
944
|
{
|
|
@@ -950,7 +950,7 @@
|
|
|
950
950
|
"indexKey": "",
|
|
951
951
|
"optional": false,
|
|
952
952
|
"description": "",
|
|
953
|
-
"line":
|
|
953
|
+
"line": 11,
|
|
954
954
|
"rawdescription": "\n"
|
|
955
955
|
}
|
|
956
956
|
],
|
|
@@ -968,12 +968,12 @@
|
|
|
968
968
|
},
|
|
969
969
|
{
|
|
970
970
|
"name": "Edit",
|
|
971
|
-
"id": "interface-Edit-
|
|
972
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
971
|
+
"id": "interface-Edit-e1cd02924eb82a618c71a0b26c081bdd020519d2699aa0e2dc98640c4e0f347c3649b967c5fc87543e41bbbfabd1304835850ccc38f40684d6521c242b2030ed-3",
|
|
972
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
973
973
|
"deprecated": false,
|
|
974
974
|
"deprecationMessage": "",
|
|
975
975
|
"type": "interface",
|
|
976
|
-
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nconst OLD_CLASS = 'EuiTooltipConfig';\nconst NEW_INTERFACE = 'EuiTooltipInterface';\n\nexport function migrateEuiTooltip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_CLASS)) return;\n\n const result = migrateTypeScript(original, path, context);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate EuiTooltipConfig → EuiTooltipInterface in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated EuiTooltipConfig → EuiTooltipInterface in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiTooltipInterface is already imported\n let hasInterfaceImport = false;\n let classImportDecl: ts.ImportDeclaration | null = null;\n let classImportModuleSpecifier: string | null = null;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE) {\n hasInterfaceImport = true;\n }\n if (specifier.name.text === OLD_CLASS) {\n classImportDecl = stmt;\n classImportModuleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n }\n }\n }\n\n // Second pass: handle import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const specifiers = namedBindings.elements;\n const classSpecifier = specifiers.find((s) => s.name.text === OLD_CLASS);\n if (!classSpecifier) continue;\n\n if (hasInterfaceImport) {\n // EuiTooltipInterface is already imported elsewhere → remove EuiTooltipConfig from this import\n removeImportSpecifier(namedBindings, classSpecifier, sourceFile, edits);\n } else {\n // Rename EuiTooltipConfig → EuiTooltipInterface in the import\n edits.push({\n start: classSpecifier.name.getStart(sourceFile),\n end: classSpecifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n hasInterfaceImport = true;\n }\n }\n\n // Third pass: replace `new EuiTooltipConfig(...)` → spread/cast to interface\n const visitNewExpressions = (node: ts.Node): void => {\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) {\n const args = node.arguments;\n if (args && args.length === 1) {\n const arg = args[0];\n // `new EuiTooltipConfig({ ... })` → `{ ... } as EuiTooltipInterface`\n // But if the argument is just a variable, we keep it: `varName as EuiTooltipInterface`\n const argText = source.slice(arg.getStart(sourceFile), arg.getEnd());\n\n if (ts.isObjectLiteralExpression(arg)) {\n // Inline object: `new EuiTooltipConfig({ x: 1 })` → `{ x: 1 }`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n } else {\n // Variable or expression: `new EuiTooltipConfig(opts)` → `opts`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n }\n } else if (!args || args.length === 0) {\n // `new EuiTooltipConfig()` → `{} as EuiTooltipInterface`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: `{} as ${NEW_INTERFACE}`,\n });\n }\n return; // don't recurse into children we've already replaced\n }\n ts.forEachChild(node, visitNewExpressions);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitNewExpressions(stmt);\n }\n }\n\n // Fourth pass: rename all remaining identifier references (type annotations, etc.)\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return;\n // Skip nodes we already covered in new expressions\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) return;\n\n if (ts.isIdentifier(node) && node.text === OLD_CLASS) {\n // Ensure this is not part of an import declaration\n if (!isPartOfImport(node)) {\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n return applyEdits(source, edits);\n}\n\nfunction isPartOfImport(node: ts.Node): boolean {\n let current: ts.Node | undefined = node.parent;\n while (current) {\n if (ts.isImportDeclaration(current)) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n let end = importDecl.getEnd();\n // Also remove trailing newline if present\n const fullText = sourceFile.getFullText();\n if (fullText[end] === '\\n') end++;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end,\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n // Not the last → remove from this specifier start to next specifier start\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n // Last element → remove from previous element end to this end\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
976
|
+
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst OLD_TAG = 'eui-toolbar-menu';\nconst NEW_TAG = 'eui-toolbar-mega-menu';\nconst OLD_COMPONENT = 'EuiToolbarMenuComponent';\nconst NEW_COMPONENT = 'EuiToolbarMegaMenuComponent';\nconst OLD_INTERFACE = 'ToolbarItem';\nconst NEW_INTERFACE = 'EuiMenuItem';\nconst NEW_COMPONENT_PATH = '@eui/components/layout';\nconst NEW_INTERFACE_PATH = '@eui/core';\nconst REMOVED_OUTPUT = 'menuItemClick';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiToolbarMenu(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_TAG) && !original.includes(OLD_COMPONENT) && !original.includes(OLD_INTERFACE)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original, path, context);\n } else {\n result = migrateTypeScript(original, path, context);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-toolbar-menu → eui-toolbar-mega-menu in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated eui-toolbar-menu → eui-toolbar-mega-menu in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits, filePath, context);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n let result = migrateInlineTemplates(source, filePath, context);\n result = migrateImportsAndTypes(result, filePath, context);\n return result;\n}\n\nfunction migrateInlineTemplates(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(OLD_TAG)) {\n ts.forEachChild(node, visit); return; \n}\n const migrated = migrateTemplate(rawTemplate, filePath, context);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, changes);\n}\n\nfunction migrateImportsAndTypes(source: string, filePath: string, context: SchematicContext): string {\n if (!source.includes(OLD_COMPONENT) && !source.includes(OLD_INTERFACE)) return source;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiMenuItem is already imported from @eui/core\n let hasEuiMenuItemImport = false;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE && moduleSpec === NEW_INTERFACE_PATH) {\n hasEuiMenuItemImport = true;\n }\n }\n }\n\n // Second pass: collect edits for import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const moduleSpec = stmt.moduleSpecifier as ts.StringLiteral;\n const specifiers = namedBindings.elements;\n const hasComponent = specifiers.some((s) => s.name.text === OLD_COMPONENT);\n const hasInterface = specifiers.some((s) => s.name.text === OLD_INTERFACE);\n\n if (hasComponent && hasInterface) {\n // Both are in the same import → must split into two different paths\n const others = specifiers.filter((s) => s.name.text !== OLD_COMPONENT && s.name.text !== OLD_INTERFACE);\n const lines: string[] = [];\n lines.push(`import { ${NEW_COMPONENT} } from '${NEW_COMPONENT_PATH}';`);\n if (!hasEuiMenuItemImport) {\n lines.push(`import { ${NEW_INTERFACE} } from '${NEW_INTERFACE_PATH}';`);\n }\n if (others.length > 0) {\n const otherNames = others.map((s) => s.name.text).join(', ');\n lines.push(`import { ${otherNames} } from '${moduleSpec.text}';`);\n }\n edits.push({\n start: stmt.getStart(sourceFile),\n end: stmt.getEnd(),\n replacement: lines.join('\\n'),\n });\n } else if (hasComponent) {\n edits.push({\n start: moduleSpec.getStart(sourceFile) + 1,\n end: moduleSpec.getEnd() - 1,\n replacement: NEW_COMPONENT_PATH,\n });\n for (const specifier of specifiers) {\n if (specifier.name.text === OLD_COMPONENT) {\n edits.push({\n start: specifier.name.getStart(sourceFile),\n end: specifier.name.getEnd(),\n replacement: NEW_COMPONENT,\n });\n }\n }\n } else if (hasInterface) {\n if (hasEuiMenuItemImport) {\n removeImportSpecifier(namedBindings, specifiers.find((s) => s.name.text === OLD_INTERFACE)!, sourceFile, edits);\n } else {\n edits.push({\n start: moduleSpec.getStart(sourceFile) + 1,\n end: moduleSpec.getEnd() - 1,\n replacement: NEW_INTERFACE_PATH,\n });\n for (const specifier of specifiers) {\n if (specifier.name.text === OLD_INTERFACE) {\n edits.push({\n start: specifier.name.getStart(sourceFile),\n end: specifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n }\n }\n }\n\n // Third pass: rename identifier references in non-import positions\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return; // skip imports (already handled)\n if (ts.isIdentifier(node)) {\n if (node.text === OLD_COMPONENT) {\n edits.push({ start: node.getStart(sourceFile), end: node.getEnd(), replacement: NEW_COMPONENT });\n }\n if (node.text === OLD_INTERFACE) {\n edits.push({ start: node.getStart(sourceFile), end: node.getEnd(), replacement: NEW_INTERFACE });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n // Warn about ToolbarItem-specific properties\n warnRemovedProperties(sourceFile, filePath, context);\n\n return applyEdits(source, edits);\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end: importDecl.getEnd(),\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction warnRemovedProperties(sourceFile: ts.SourceFile, filePath: string, context: SchematicContext): void {\n const deprecated = ['isHome', 'isSeparator'];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && deprecated.includes(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"${node.name.text}\" was part of ToolbarItem but does not exist on EuiMenuItem. Review manually.`,\n );\n }\n if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name) && deprecated.includes(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"${node.name.text}\" was part of ToolbarItem but does not exist on EuiMenuItem. Review manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectTagRenames(node, source, edits);\n collectOutputRemovals(node, source, edits, filePath, context);\n }\n visitNodes(node.children, source, edits, filePath, context);\n }\n }\n}\n\nfunction collectTagRenames(element: TmplAstElement, source: string, edits: Edit[]): void {\n // Rename opening tag\n const openStart = element.startSourceSpan.start.offset + 1; // skip '<'\n edits.push({ start: openStart, end: openStart + OLD_TAG.length, replacement: NEW_TAG });\n\n // Rename closing tag\n if (element.endSourceSpan) {\n const closeStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeStart, end: closeStart + OLD_TAG.length, replacement: NEW_TAG });\n }\n}\n\nfunction collectOutputRemovals(\n element: TmplAstElement,\n source: string,\n edits: Edit[],\n filePath: string,\n context: SchematicContext,\n): void {\n for (const output of element.outputs) {\n if (output.name === REMOVED_OUTPUT) {\n let start = output.sourceSpan.start.offset;\n // Remove leading whitespace\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n edits.push({ start, end: output.sourceSpan.end.offset, replacement: '' });\n\n const { line } = element.startSourceSpan.start;\n context.logger.warn(\n `${filePath}:${line + 1} - \"(menuItemClick)\" has been removed. There is no equivalent on eui-toolbar-mega-menu.`,\n );\n }\n }\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n // Deduplicate edits at same position (e.g. module path edits when both Component and ToolbarItem are from same source)\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n // Last wins for same range\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
977
977
|
"displayName": "Edit",
|
|
978
978
|
"properties": [
|
|
979
979
|
{
|
|
@@ -985,7 +985,7 @@
|
|
|
985
985
|
"indexKey": "",
|
|
986
986
|
"optional": false,
|
|
987
987
|
"description": "",
|
|
988
|
-
"line":
|
|
988
|
+
"line": 23,
|
|
989
989
|
"rawdescription": "\n"
|
|
990
990
|
},
|
|
991
991
|
{
|
|
@@ -997,7 +997,7 @@
|
|
|
997
997
|
"indexKey": "",
|
|
998
998
|
"optional": false,
|
|
999
999
|
"description": "",
|
|
1000
|
-
"line":
|
|
1000
|
+
"line": 24,
|
|
1001
1001
|
"rawdescription": "\n"
|
|
1002
1002
|
},
|
|
1003
1003
|
{
|
|
@@ -1009,7 +1009,7 @@
|
|
|
1009
1009
|
"indexKey": "",
|
|
1010
1010
|
"optional": false,
|
|
1011
1011
|
"description": "",
|
|
1012
|
-
"line":
|
|
1012
|
+
"line": 22,
|
|
1013
1013
|
"rawdescription": "\n"
|
|
1014
1014
|
}
|
|
1015
1015
|
],
|
|
@@ -2536,12 +2536,12 @@
|
|
|
2536
2536
|
},
|
|
2537
2537
|
{
|
|
2538
2538
|
"name": "Schema",
|
|
2539
|
-
"id": "interface-Schema-
|
|
2540
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
2539
|
+
"id": "interface-Schema-311bef7d5e4b40b356b0fdb5e35dd89e48a5c5beec29eeb865c22c2ca1c4c4fb1fd0bb4391ed0b33825a6d1d744bc3a2e9822b347fbc686a537e15b170c279dd-8",
|
|
2540
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
2541
2541
|
"deprecated": false,
|
|
2542
2542
|
"deprecationMessage": "",
|
|
2543
2543
|
"type": "interface",
|
|
2544
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isSquared']);\n\nexport function migrateEuiChip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-chip') && !original.includes('euiChip')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'isSquared' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes('isSquared')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'isSquared') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isSquared\" is no longer a valid input on eui-chip. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-chip 'isSquared' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-chip') && !templateContent.includes('euiChip')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-chip') return true;\n return element.attributes.some((a) => a.name === 'euiChip');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
|
|
2544
|
+
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst CHIP_LIST_TAG = 'eui-chip-list';\nconst CHIP_LIST_ATTR = 'euiChipList';\nconst CHIP_TAG = 'eui-chip';\nconst CHIP_ATTR = 'euiChip';\n\nconst PROPAGATED_INPUTS = new Set([\n 'euiPrimary', 'euiSecondary', 'euiSuccess', 'euiInfo', 'euiWarning',\n 'euiDanger', 'euiAccent', 'euiVariant', 'euiSizeS', 'euiSizeVariant',\n 'euiOutline', 'euiDisabled',\n]);\n\nconst WARN_PROPERTIES = new Set([...PROPAGATED_INPUTS, 'chipRemove', 'isChipsRemovable', 'chipsLabelTruncateCount',\n 'maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel',\n 'isChipsSorted', 'chipsSortOrder']);\n\nconst REMOVED_INPUTS = new Set(['maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel', 'isChipsSorted', 'chipsSortOrder']);\n\nconst TRUNCATE_PIPE_IMPORT = 'EuiTruncatePipe';\nconst TRUNCATE_PIPE_PATH = '@eui/components/pipes';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiChipList(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const filesNeedingTruncateImport = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(CHIP_LIST_TAG) && !original.includes(CHIP_LIST_ATTR)) return;\n\n let result: string;\n let addedTruncate = false;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n // Find the associated .ts file\n const tsPath = path.replace(/\\.html$/, '.ts');\n if (tree.exists(tsPath)) {\n filesNeedingTruncateImport.add(tsPath);\n } else {\n // Try component naming convention\n const componentTsPath = path.replace(/\\.html$/, '.component.ts');\n if (tree.exists(componentTsPath)) {\n filesNeedingTruncateImport.add(componentTsPath);\n }\n }\n }\n } else {\n result = migrateInlineTemplates(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n addedTruncate = true;\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would move variant/size/outline inputs to child eui-chip in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n if (addedTruncate) {\n filesNeedingTruncateImport.add(path);\n }\n\n // Warn about TS usages of removed properties\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if ([...WARN_PROPERTIES].some((p) => original.includes(p))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && WARN_PROPERTIES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been removed from eui-chip-list. Move it to individual eui-chip elements.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n // Add EuiTruncatePipe import to component files that need it\n for (const tsPath of filesNeedingTruncateImport) {\n const buffer = tree.read(tsPath);\n if (!buffer) continue;\n const source = buffer.toString('utf-8');\n if (source.includes(TRUNCATE_PIPE_IMPORT)) continue;\n const result = addTruncatePipeImport(source, tsPath);\n if (result !== source) {\n if (!options.dryRun) {\n tree.overwrite(tsPath, result);\n }\n }\n }\n\n context.logger.info(`Migrated eui-chip-list inputs/outputs to child eui-chip in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction addTruncatePipeImport(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n const edits: Edit[] = [];\n\n // 1. Add ES import statement for EuiTruncatePipe\n let hasEsImport = false;\n let lastImportEnd = 0;\n\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n if (moduleSpec === TRUNCATE_PIPE_PATH) {\n const namedBindings = stmt.importClause?.namedBindings;\n if (namedBindings && ts.isNamedImports(namedBindings)) {\n if (namedBindings.elements.some((el) => el.name.text === TRUNCATE_PIPE_IMPORT)) {\n hasEsImport = true;\n } else {\n // Add to existing import from same path\n const lastEl = namedBindings.elements[namedBindings.elements.length - 1];\n edits.push({ start: lastEl.getEnd(), end: lastEl.getEnd(), replacement: `, ${TRUNCATE_PIPE_IMPORT}` });\n hasEsImport = true;\n }\n }\n }\n }\n }\n\n if (!hasEsImport) {\n const importStatement = `\\nimport { ${TRUNCATE_PIPE_IMPORT} } from '${TRUNCATE_PIPE_PATH}';`;\n edits.push({ start: lastImportEnd, end: lastImportEnd, replacement: importStatement });\n }\n\n // 2. Add EuiTruncatePipe to @Component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const arr = prop.initializer;\n const arrText = source.slice(arr.getStart(sourceFile), arr.getEnd());\n if (arrText.includes(TRUNCATE_PIPE_IMPORT)) continue;\n if (arr.elements.length > 0) {\n const lastElement = arr.elements[arr.elements.length - 1];\n edits.push({ start: lastElement.getEnd(), end: lastElement.getEnd(), replacement: `,\\n ${TRUNCATE_PIPE_IMPORT}` });\n } else {\n edits.push({ start: arr.getStart(sourceFile) + 1, end: arr.getEnd() - 1, replacement: TRUNCATE_PIPE_IMPORT });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(CHIP_LIST_TAG) && !rawTemplate.includes(CHIP_LIST_ATTR)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, changes);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipListElement(node)) {\n migrateChipListElement(node, source, edits);\n }\n visitNodes(node.children, source, edits);\n }\n }\n}\n\nfunction isChipListElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_LIST_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_LIST_ATTR);\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_ATTR);\n}\n\nfunction findChildChips(nodes: TmplAstNode[]): TmplAstElement[] {\n const chips: TmplAstElement[] = [];\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) {\n chips.push(node);\n } else {\n chips.push(...findChildChips(node.children));\n }\n }\n }\n return chips;\n}\n\nfunction migrateChipListElement(element: TmplAstElement, source: string, edits: Edit[]): void {\n const childChips = findChildChips(element.children);\n const insertions: string[] = [];\n let truncateValue: string | null = null;\n\n // Collect and remove propagated static attributes\n for (const attr of element.attributes) {\n if (PROPAGATED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n insertions.push(attr.value ? `${attr.name}=\"${attr.value}\"` : attr.name);\n }\n if (attr.name === 'isChipsRemovable') {\n edits.push(removalEdit(attr, source));\n insertions.push('isChipRemovable');\n }\n if (attr.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(attr, source));\n truncateValue = attr.value || null;\n }\n if (REMOVED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n }\n }\n\n // Collect and remove propagated bound inputs\n for (const input of element.inputs) {\n if (PROPAGATED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n insertions.push(raw);\n }\n if (input.name === 'isChipsRemovable') {\n edits.push(removalEdit(input, source));\n const valueText = extractBindingValue(input, source);\n insertions.push(`[isChipRemovable]=\"${valueText}\"`);\n }\n if (input.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(input, source));\n truncateValue = extractBindingValue(input, source);\n }\n if (REMOVED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n }\n }\n\n // Collect and remove (chipRemove) output\n let chipRemoveHandler: string | null = null;\n for (const output of element.outputs) {\n if (output.name === 'chipRemove') {\n edits.push(removalEdit(output, source));\n chipRemoveHandler = extractHandlerExpression(output, source);\n }\n }\n\n if (chipRemoveHandler) {\n insertions.push(`(remove)=\"${chipRemoveHandler}\"`);\n }\n\n // Add collected attributes to each child eui-chip\n if (insertions.length > 0) {\n for (const chip of childChips) {\n const existingNames = getExistingAttrNames(chip);\n const toInsert = insertions.filter((ins) => {\n const name = extractAttrName(ins);\n return !existingNames.has(name);\n });\n if (toInsert.length > 0) {\n const insertPos = chip.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' ' + toInsert.join(' ') });\n }\n }\n }\n\n // Add euiTruncate pipe to chip label content\n if (truncateValue) {\n for (const chip of childChips) {\n const labelEdit = buildTruncatePipeEdit(chip, source, truncateValue);\n if (labelEdit) edits.push(labelEdit);\n }\n }\n}\n\nfunction buildTruncatePipeEdit(chip: TmplAstElement, source: string, truncateValue: string): Edit | null {\n // Find <span euiLabel>...</span> inside the chip\n const labelEl = findLabelElement(chip.children);\n if (labelEl && labelEl.endSourceSpan) {\n const contentStart = labelEl.startSourceSpan.end.offset;\n const contentEnd = labelEl.endSourceSpan.start.offset;\n const content = source.slice(contentStart, contentEnd);\n if (content && !content.includes('euiTruncate')) {\n const trimmed = content.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch) {\n return { start: contentStart, end: contentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n return { start: contentStart, end: contentEnd, replacement: `{{ '${trimmed}' | euiTruncate: ${truncateValue} }}` };\n }\n }\n\n // Check direct text content inside chip (no label element)\n if (chip.endSourceSpan) {\n const chipContentStart = chip.startSourceSpan.end.offset;\n const chipContentEnd = chip.endSourceSpan.start.offset;\n const chipContent = source.slice(chipContentStart, chipContentEnd);\n const trimmed = chipContent.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch && !chipContent.includes('euiTruncate')) {\n return { start: chipContentStart, end: chipContentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n }\n return null;\n}\n\nfunction findLabelElement(nodes: TmplAstNode[]): TmplAstElement | null {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.attributes.some((a) => a.name === 'euiLabel')) return node;\n const nested = findLabelElement(node.children);\n if (nested) return nested;\n }\n }\n return null;\n}\n\nfunction getExistingAttrNames(element: TmplAstElement): Set<string> {\n const names = new Set<string>();\n for (const attr of element.attributes) names.add(attr.name);\n for (const input of element.inputs) names.add(input.name);\n for (const output of element.outputs) names.add(output.name);\n return names;\n}\n\nfunction extractAttrName(insertion: string): string {\n const outputMatch = insertion.match(/^\\(([^)]+)\\)/);\n if (outputMatch) return outputMatch[1];\n const inputMatch = insertion.match(/^\\[([^\\]]+)\\]/);\n if (inputMatch) return inputMatch[1];\n return insertion.split('=')[0];\n}\n\nfunction removalEdit(node: TmplAstTextAttribute | TmplAstBoundAttribute | TmplAstBoundEvent, source: string): Edit {\n let start = node.sourceSpan.start.offset;\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n return { start, end: node.sourceSpan.end.offset, replacement: '' };\n}\n\nfunction extractBindingValue(input: TmplAstBoundAttribute, source: string): string {\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : 'true';\n}\n\nfunction extractHandlerExpression(output: TmplAstBoundEvent, source: string): string {\n const raw = source.slice(output.sourceSpan.start.offset, output.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : '';\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n seen.set(`${edit.start}:${edit.end}`, edit);\n }\n return Array.from(seen.values());\n}\n",
|
|
2545
2545
|
"displayName": "Schema",
|
|
2546
2546
|
"properties": [
|
|
2547
2547
|
{
|
|
@@ -2553,7 +2553,7 @@
|
|
|
2553
2553
|
"indexKey": "",
|
|
2554
2554
|
"optional": true,
|
|
2555
2555
|
"description": "",
|
|
2556
|
-
"line":
|
|
2556
|
+
"line": 28,
|
|
2557
2557
|
"rawdescription": "\n"
|
|
2558
2558
|
},
|
|
2559
2559
|
{
|
|
@@ -2565,7 +2565,7 @@
|
|
|
2565
2565
|
"indexKey": "",
|
|
2566
2566
|
"optional": true,
|
|
2567
2567
|
"description": "",
|
|
2568
|
-
"line":
|
|
2568
|
+
"line": 27,
|
|
2569
2569
|
"rawdescription": "\n"
|
|
2570
2570
|
}
|
|
2571
2571
|
],
|
|
@@ -2583,12 +2583,12 @@
|
|
|
2583
2583
|
},
|
|
2584
2584
|
{
|
|
2585
2585
|
"name": "Schema",
|
|
2586
|
-
"id": "interface-Schema-
|
|
2587
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2586
|
+
"id": "interface-Schema-869dfc324e9111966817cbebb3553eabfe200acfe33bb77efa71a6c46e1cba0ff5852de7b9ade3060f87264035b99591361331a9e0622daaac22b8d59146c761-9",
|
|
2587
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
2588
2588
|
"deprecated": false,
|
|
2589
2589
|
"deprecationMessage": "",
|
|
2590
2590
|
"type": "interface",
|
|
2591
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst CHIP_LIST_TAG = 'eui-chip-list';\nconst CHIP_LIST_ATTR = 'euiChipList';\nconst CHIP_TAG = 'eui-chip';\nconst CHIP_ATTR = 'euiChip';\n\nconst PROPAGATED_INPUTS = new Set([\n 'euiPrimary', 'euiSecondary', 'euiSuccess', 'euiInfo', 'euiWarning',\n 'euiDanger', 'euiAccent', 'euiVariant', 'euiSizeS', 'euiSizeVariant',\n 'euiOutline', 'euiDisabled',\n]);\n\nconst WARN_PROPERTIES = new Set([...PROPAGATED_INPUTS, 'chipRemove', 'isChipsRemovable', 'chipsLabelTruncateCount',\n 'maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel',\n 'isChipsSorted', 'chipsSortOrder']);\n\nconst REMOVED_INPUTS = new Set(['maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel', 'isChipsSorted', 'chipsSortOrder']);\n\nconst TRUNCATE_PIPE_IMPORT = 'EuiTruncatePipe';\nconst TRUNCATE_PIPE_PATH = '@eui/components/pipes';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiChipList(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const filesNeedingTruncateImport = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(CHIP_LIST_TAG) && !original.includes(CHIP_LIST_ATTR)) return;\n\n let result: string;\n let addedTruncate = false;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n // Find the associated .ts file\n const tsPath = path.replace(/\\.html$/, '.ts');\n if (tree.exists(tsPath)) {\n filesNeedingTruncateImport.add(tsPath);\n } else {\n // Try component naming convention\n const componentTsPath = path.replace(/\\.html$/, '.component.ts');\n if (tree.exists(componentTsPath)) {\n filesNeedingTruncateImport.add(componentTsPath);\n }\n }\n }\n } else {\n result = migrateInlineTemplates(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n addedTruncate = true;\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would move variant/size/outline inputs to child eui-chip in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n if (addedTruncate) {\n filesNeedingTruncateImport.add(path);\n }\n\n // Warn about TS usages of removed properties\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if ([...WARN_PROPERTIES].some((p) => original.includes(p))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && WARN_PROPERTIES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been removed from eui-chip-list. Move it to individual eui-chip elements.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n // Add EuiTruncatePipe import to component files that need it\n for (const tsPath of filesNeedingTruncateImport) {\n const buffer = tree.read(tsPath);\n if (!buffer) continue;\n const source = buffer.toString('utf-8');\n if (source.includes(TRUNCATE_PIPE_IMPORT)) continue;\n const result = addTruncatePipeImport(source, tsPath);\n if (result !== source) {\n if (!options.dryRun) {\n tree.overwrite(tsPath, result);\n }\n }\n }\n\n context.logger.info(`Migrated eui-chip-list inputs/outputs to child eui-chip in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction addTruncatePipeImport(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n const edits: Edit[] = [];\n\n // 1. Add ES import statement for EuiTruncatePipe\n let hasEsImport = false;\n let lastImportEnd = 0;\n\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n if (moduleSpec === TRUNCATE_PIPE_PATH) {\n const namedBindings = stmt.importClause?.namedBindings;\n if (namedBindings && ts.isNamedImports(namedBindings)) {\n if (namedBindings.elements.some((el) => el.name.text === TRUNCATE_PIPE_IMPORT)) {\n hasEsImport = true;\n } else {\n // Add to existing import from same path\n const lastEl = namedBindings.elements[namedBindings.elements.length - 1];\n edits.push({ start: lastEl.getEnd(), end: lastEl.getEnd(), replacement: `, ${TRUNCATE_PIPE_IMPORT}` });\n hasEsImport = true;\n }\n }\n }\n }\n }\n\n if (!hasEsImport) {\n const importStatement = `\\nimport { ${TRUNCATE_PIPE_IMPORT} } from '${TRUNCATE_PIPE_PATH}';`;\n edits.push({ start: lastImportEnd, end: lastImportEnd, replacement: importStatement });\n }\n\n // 2. Add EuiTruncatePipe to @Component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const arr = prop.initializer;\n const arrText = source.slice(arr.getStart(sourceFile), arr.getEnd());\n if (arrText.includes(TRUNCATE_PIPE_IMPORT)) continue;\n if (arr.elements.length > 0) {\n const lastElement = arr.elements[arr.elements.length - 1];\n edits.push({ start: lastElement.getEnd(), end: lastElement.getEnd(), replacement: `,\\n ${TRUNCATE_PIPE_IMPORT}` });\n } else {\n edits.push({ start: arr.getStart(sourceFile) + 1, end: arr.getEnd() - 1, replacement: TRUNCATE_PIPE_IMPORT });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(CHIP_LIST_TAG) && !rawTemplate.includes(CHIP_LIST_ATTR)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, changes);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipListElement(node)) {\n migrateChipListElement(node, source, edits);\n }\n visitNodes(node.children, source, edits);\n }\n }\n}\n\nfunction isChipListElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_LIST_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_LIST_ATTR);\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_ATTR);\n}\n\nfunction findChildChips(nodes: TmplAstNode[]): TmplAstElement[] {\n const chips: TmplAstElement[] = [];\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) {\n chips.push(node);\n } else {\n chips.push(...findChildChips(node.children));\n }\n }\n }\n return chips;\n}\n\nfunction migrateChipListElement(element: TmplAstElement, source: string, edits: Edit[]): void {\n const childChips = findChildChips(element.children);\n const insertions: string[] = [];\n let truncateValue: string | null = null;\n\n // Collect and remove propagated static attributes\n for (const attr of element.attributes) {\n if (PROPAGATED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n insertions.push(attr.value ? `${attr.name}=\"${attr.value}\"` : attr.name);\n }\n if (attr.name === 'isChipsRemovable') {\n edits.push(removalEdit(attr, source));\n insertions.push('isChipRemovable');\n }\n if (attr.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(attr, source));\n truncateValue = attr.value || null;\n }\n if (REMOVED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n }\n }\n\n // Collect and remove propagated bound inputs\n for (const input of element.inputs) {\n if (PROPAGATED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n insertions.push(raw);\n }\n if (input.name === 'isChipsRemovable') {\n edits.push(removalEdit(input, source));\n const valueText = extractBindingValue(input, source);\n insertions.push(`[isChipRemovable]=\"${valueText}\"`);\n }\n if (input.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(input, source));\n truncateValue = extractBindingValue(input, source);\n }\n if (REMOVED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n }\n }\n\n // Collect and remove (chipRemove) output\n let chipRemoveHandler: string | null = null;\n for (const output of element.outputs) {\n if (output.name === 'chipRemove') {\n edits.push(removalEdit(output, source));\n chipRemoveHandler = extractHandlerExpression(output, source);\n }\n }\n\n if (chipRemoveHandler) {\n insertions.push(`(remove)=\"${chipRemoveHandler}\"`);\n }\n\n // Add collected attributes to each child eui-chip\n if (insertions.length > 0) {\n for (const chip of childChips) {\n const existingNames = getExistingAttrNames(chip);\n const toInsert = insertions.filter((ins) => {\n const name = extractAttrName(ins);\n return !existingNames.has(name);\n });\n if (toInsert.length > 0) {\n const insertPos = chip.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' ' + toInsert.join(' ') });\n }\n }\n }\n\n // Add euiTruncate pipe to chip label content\n if (truncateValue) {\n for (const chip of childChips) {\n const labelEdit = buildTruncatePipeEdit(chip, source, truncateValue);\n if (labelEdit) edits.push(labelEdit);\n }\n }\n}\n\nfunction buildTruncatePipeEdit(chip: TmplAstElement, source: string, truncateValue: string): Edit | null {\n // Find <span euiLabel>...</span> inside the chip\n const labelEl = findLabelElement(chip.children);\n if (labelEl && labelEl.endSourceSpan) {\n const contentStart = labelEl.startSourceSpan.end.offset;\n const contentEnd = labelEl.endSourceSpan.start.offset;\n const content = source.slice(contentStart, contentEnd);\n if (content && !content.includes('euiTruncate')) {\n const trimmed = content.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch) {\n return { start: contentStart, end: contentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n return { start: contentStart, end: contentEnd, replacement: `{{ '${trimmed}' | euiTruncate: ${truncateValue} }}` };\n }\n }\n\n // Check direct text content inside chip (no label element)\n if (chip.endSourceSpan) {\n const chipContentStart = chip.startSourceSpan.end.offset;\n const chipContentEnd = chip.endSourceSpan.start.offset;\n const chipContent = source.slice(chipContentStart, chipContentEnd);\n const trimmed = chipContent.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch && !chipContent.includes('euiTruncate')) {\n return { start: chipContentStart, end: chipContentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n }\n return null;\n}\n\nfunction findLabelElement(nodes: TmplAstNode[]): TmplAstElement | null {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.attributes.some((a) => a.name === 'euiLabel')) return node;\n const nested = findLabelElement(node.children);\n if (nested) return nested;\n }\n }\n return null;\n}\n\nfunction getExistingAttrNames(element: TmplAstElement): Set<string> {\n const names = new Set<string>();\n for (const attr of element.attributes) names.add(attr.name);\n for (const input of element.inputs) names.add(input.name);\n for (const output of element.outputs) names.add(output.name);\n return names;\n}\n\nfunction extractAttrName(insertion: string): string {\n const outputMatch = insertion.match(/^\\(([^)]+)\\)/);\n if (outputMatch) return outputMatch[1];\n const inputMatch = insertion.match(/^\\[([^\\]]+)\\]/);\n if (inputMatch) return inputMatch[1];\n return insertion.split('=')[0];\n}\n\nfunction removalEdit(node: TmplAstTextAttribute | TmplAstBoundAttribute | TmplAstBoundEvent, source: string): Edit {\n let start = node.sourceSpan.start.offset;\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n return { start, end: node.sourceSpan.end.offset, replacement: '' };\n}\n\nfunction extractBindingValue(input: TmplAstBoundAttribute, source: string): string {\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : 'true';\n}\n\nfunction extractHandlerExpression(output: TmplAstBoundEvent, source: string): string {\n const raw = source.slice(output.sourceSpan.start.offset, output.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : '';\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n seen.set(`${edit.start}:${edit.end}`, edit);\n }\n return Array.from(seen.values());\n}\n",
|
|
2591
|
+
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst COMPONENT_TAG = 'eui-discussion-thread';\n\nexport function migrateEuiDiscussionThread(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(COMPONENT_TAG)) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove [trackBy] binding in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes('trackByFn')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'trackByFn') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"trackByFn\" has been removed from ${COMPONENT_TAG}. Remove this reference manually.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed trackByFn-based [trackBy] bindings from ${COMPONENT_TAG} in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, source, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes(COMPONENT_TAG)) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) collectRemovals(node, source, removals);\n visitNodes(node.children, source, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, source: string, removals: { start: number; end: number }[]): void {\n for (const input of element.inputs) {\n if (input.name === 'trackBy') {\n const valueSource = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n if (valueSource.includes('trackByFn')) {\n removals.push({ start: input.sourceSpan.start.offset, end: input.sourceSpan.end.offset });\n }\n }\n }\n}\n",
|
|
2592
2592
|
"displayName": "Schema",
|
|
2593
2593
|
"properties": [
|
|
2594
2594
|
{
|
|
@@ -2600,7 +2600,7 @@
|
|
|
2600
2600
|
"indexKey": "",
|
|
2601
2601
|
"optional": true,
|
|
2602
2602
|
"description": "",
|
|
2603
|
-
"line":
|
|
2603
|
+
"line": 8,
|
|
2604
2604
|
"rawdescription": "\n"
|
|
2605
2605
|
},
|
|
2606
2606
|
{
|
|
@@ -2612,7 +2612,7 @@
|
|
|
2612
2612
|
"indexKey": "",
|
|
2613
2613
|
"optional": true,
|
|
2614
2614
|
"description": "",
|
|
2615
|
-
"line":
|
|
2615
|
+
"line": 7,
|
|
2616
2616
|
"rawdescription": "\n"
|
|
2617
2617
|
}
|
|
2618
2618
|
],
|
|
@@ -2630,12 +2630,12 @@
|
|
|
2630
2630
|
},
|
|
2631
2631
|
{
|
|
2632
2632
|
"name": "Schema",
|
|
2633
|
-
"id": "interface-Schema-
|
|
2634
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2633
|
+
"id": "interface-Schema-39d3d52e788050bebc4e0b99ed0756f7e9727556cb090ae8796bd4261a56463fe1f479c322b23028cd4134d71e4d1dc44cd248ac62a9a148b5fc46a665466f7c-10",
|
|
2634
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
2635
2635
|
"deprecated": false,
|
|
2636
2636
|
"deprecationMessage": "",
|
|
2637
2637
|
"type": "interface",
|
|
2638
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst
|
|
2638
|
+
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isSquared']);\n\nexport function migrateEuiChip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-chip') && !original.includes('euiChip')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'isSquared' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes('isSquared')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'isSquared') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isSquared\" is no longer a valid input on eui-chip. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-chip 'isSquared' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-chip') && !templateContent.includes('euiChip')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-chip') return true;\n return element.attributes.some((a) => a.name === 'euiChip');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
|
|
2639
2639
|
"displayName": "Schema",
|
|
2640
2640
|
"properties": [
|
|
2641
2641
|
{
|
|
@@ -2865,12 +2865,12 @@
|
|
|
2865
2865
|
},
|
|
2866
2866
|
{
|
|
2867
2867
|
"name": "Schema",
|
|
2868
|
-
"id": "interface-Schema-
|
|
2869
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2868
|
+
"id": "interface-Schema-91c9f900bf3ebb82488fb65644938ef486ceaa447cff8bfd9d710df9595d82acb267b26f3c252173bc684353f362473120226426ed7ee5d98b33e30011dd9383-15",
|
|
2869
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
2870
2870
|
"deprecated": false,
|
|
2871
2871
|
"deprecationMessage": "",
|
|
2872
2872
|
"type": "interface",
|
|
2873
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['type']);\n\nexport function migrateEuiPopover(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-popover')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'type' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && (original.includes('eui-popover') || original.includes('euiPopover') || original.includes('EuiPopover'))) {\n if (original.includes('type')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'type') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"type\" is no longer a valid input on eui-popover. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Removed deprecated eui-popover 'type' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n // Extend start backwards to consume leading whitespace\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-popover')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-popover') {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
|
|
2873
|
+
"sourceCode": "import { BindingPipe, parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute, AST, ASTWithSource, Interpolation } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Edit { start: number; end: number; replacement: string; }\n\n// --- Table-level input renames (on elements with euiTable attribute) ---\nconst TABLE_INPUT_RENAMES = new Map([\n ['rows', 'data'],\n ['loading', 'isLoading'],\n ['asyncTable', 'isAsync'],\n ['euiTableResponsive', 'isTableResponsive'],\n ['euiTableFixedLayout', 'isTableFixedLayout'],\n ['euiTableCompact', 'isTableCompact'],\n ['hasStickyColumns', 'hasStickyCols'],\n]);\n\n// --- Child element input renames (scoped to euiTable context) ---\nconst TH_TD_INPUT_RENAMES = new Map([\n ['isStickyColumn', 'isStickyCol'],\n ['sortable', 'isSortable'],\n]);\n\nconst TR_INPUT_RENAMES = new Map([\n ['isSelectableHeader', 'isHeaderSelectable'],\n ['isSelectable', 'isDataSelectable'],\n]);\n\n// --- Removed inputs ---\nconst REMOVED_INPUTS = new Set(['euiTableBordered', 'isHoverable', 'defaultMultiOrder', 'paginable']);\n\n// --- Output renames/removals ---\nconst OUTPUT_RENAMES = new Map([['selectedRows', 'rowsSelect']]);\nconst REMOVED_OUTPUTS = new Set(['multiSortChange']);\n\n// --- Pipe rename ---\nconst OLD_PIPE = 'euiTableHighlightFilter';\nconst NEW_PIPE = 'euiTableHighlight';\n\n// --- TS property renames ---\nconst TS_PROPERTY_RENAMES = new Map([['filteredRows', 'getFilteredData']]);\n\nconst PAGINATOR_IMPORT_PATH = '@eui/components/eui-paginator';\nconst PAGINATOR_COMPONENT = 'EuiPaginatorComponent';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nexport function migrateEuiTable(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const paginatorHtmlFiles = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('euiTable') && !original.includes(OLD_PIPE) && !original.includes('filteredRows') && !original.includes('setSort')) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n const { output, hasPaginator } = migrateTemplateWithPaginator(original, path, context);\n result = output;\n if (hasPaginator) paginatorHtmlFiles.add(path);\n } else {\n const { output, hasPaginator } = migrateTypeScript(original, path, context);\n result = output;\n if (hasPaginator) {\n result = addPaginatorImport(result, path);\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-table breaking changes in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n // Handle paginator imports for external templates\n if (paginatorHtmlFiles.size > 0) {\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const source = buffer.toString('utf-8');\n if (!source.includes('templateUrl')) return;\n\n for (const htmlFile of paginatorHtmlFiles) {\n const htmlFileName = htmlFile.split('/').pop()!;\n if (source.includes(htmlFileName)) {\n const updated = addPaginatorImport(source, path);\n if (updated !== source) {\n if (options.dryRun) {\n logDryRun(context, `Would add paginator import in ${path}`);\n } else {\n tree.overwrite(path, updated);\n }\n count++;\n }\n break;\n }\n }\n });\n }\n\n context.logger.info(`Migrated eui-table in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplateWithPaginator(source: string, filePath: string, context: SchematicContext): { output: string; hasPaginator: boolean } {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n let hasPaginator = false;\n\n const paginatorResult = visitNodesForTable(parsed.nodes, source, edits, false, filePath, context);\n if (paginatorResult) hasPaginator = true;\n\n collectPipeRenames(parsed.nodes, source, edits);\n\n return { output: applyEdits(source, edits), hasPaginator };\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): string {\n return migrateTemplateWithPaginator(source, filePath, context).output;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): { output: string; hasPaginator: boolean } {\n let result = source;\n let hasPaginator = false;\n\n // Migrate inline templates\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = result.slice(start, end);\n if (!rawTemplate.includes('euiTable') && !rawTemplate.includes(OLD_PIPE)) {\n ts.forEachChild(node, visit); return;\n}\n const { output: migrated, hasPaginator: pag } = migrateTemplateWithPaginator(rawTemplate, filePath, context);\n if (pag) hasPaginator = true;\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n result = applyEdits(result, changes);\n\n // Rename TS property accesses\n result = renameTsProperties(result);\n\n // Warn about setSort\n warnSetSort(result, filePath, context);\n\n return { output: result, hasPaginator };\n}\n\nfunction renameTsProperties(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && TS_PROPERTY_RENAMES.has(node.name.text)) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: TS_PROPERTY_RENAMES.get(node.name.text)! });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction warnSetSort(source: string, filePath: string, context: SchematicContext): void {\n if (!source.includes('setSort')) return;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) &&\n ts.isIdentifier(node.expression.name) && node.expression.name.text === 'setSort') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"setSort\" signature changed from setSort(sort: string, order: \"asc\" | \"desc\") to setSort(Sort[]). Update manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n}\n\n// --- Template AST visitors ---\n\nfunction visitNodesForTable(\n nodes: TmplAstNode[], source: string, edits: Edit[], insideEuiTable: boolean, filePath: string, context: SchematicContext,\n): boolean {\n let hasPaginator = false;\n\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n const isEuiTable = hasEuiTableAttribute(node);\n\n if (isEuiTable) {\n collectTableInputRenames(node, edits);\n collectInputRemovals(node, source, edits, filePath, context);\n collectOutputChanges(node, source, edits, filePath, context);\n if (collectPaginatorMigration(node, source, edits)) hasPaginator = true;\n }\n\n if (isEuiTable || insideEuiTable) {\n collectChildElementRenames(node, edits);\n collectChildInputRemovals(node, source, edits, filePath, context);\n collectEmptyMessageRename(node, edits);\n }\n\n const childResult = visitNodesForTable(node.children, source, edits, isEuiTable || insideEuiTable, filePath, context);\n if (childResult) hasPaginator = true;\n }\n\n if (node instanceof TmplAstTemplate) {\n if (insideEuiTable) {\n collectTemplateEmptyMessageRename(node, edits);\n }\n const childResult = visitNodesForTable(node.children, source, edits, insideEuiTable, filePath, context);\n if (childResult) hasPaginator = true;\n }\n }\n\n return hasPaginator;\n}\n\nfunction hasEuiTableAttribute(element: TmplAstElement): boolean {\n return element.attributes.some((a) => a.name === 'euiTable') ||\n element.inputs.some((i) => i.name === 'euiTable');\n}\n\nfunction collectTableInputRenames(element: TmplAstElement, edits: Edit[]): void {\n for (const attr of element.attributes) {\n const newName = TABLE_INPUT_RENAMES.get(attr.name);\n if (newName) edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n for (const input of element.inputs) {\n const newName = TABLE_INPUT_RENAMES.get(input.name);\n if (newName) edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n}\n\nfunction collectChildElementRenames(element: TmplAstElement, edits: Edit[]): void {\n const renames = (element.name === 'th' || element.name === 'td') ? TH_TD_INPUT_RENAMES\n : element.name === 'tr' ? TR_INPUT_RENAMES : null;\n if (!renames) return;\n\n for (const attr of element.attributes) {\n const newName = renames.get(attr.name);\n if (newName) edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n for (const input of element.inputs) {\n const newName = renames.get(input.name);\n if (newName) edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n}\n\nfunction collectChildInputRemovals(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n const childRemovedInputs = new Set(['defaultMultiOrder']);\n\n for (const attr of element.attributes) {\n if (childRemovedInputs.has(attr.name)) {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n logRemovalWarning(attr.name, filePath, element, context);\n }\n }\n for (const input of element.inputs) {\n if (childRemovedInputs.has(input.name)) {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n logRemovalWarning(input.name, filePath, element, context);\n }\n }\n}\n\nfunction collectInputRemovals(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name) && attr.name !== 'paginable') {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n logRemovalWarning(attr.name, filePath, element, context);\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name) && input.name !== 'paginable') {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n logRemovalWarning(input.name, filePath, element, context);\n }\n }\n}\n\nfunction collectOutputChanges(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const output of element.outputs) {\n const newName = OUTPUT_RENAMES.get(output.name);\n if (newName) {\n edits.push({ start: output.keySpan!.start.offset, end: output.keySpan!.end.offset, replacement: newName });\n }\n if (REMOVED_OUTPUTS.has(output.name)) {\n removeAttribute(output.sourceSpan.start.offset, output.sourceSpan.end.offset, source, edits);\n const { line } = element.startSourceSpan.start;\n context.logger.warn(\n `${filePath}:${line + 1} - \"(${output.name})\" removed. Multi-sort is now supported by (sortChange) output.`,\n );\n }\n }\n}\n\nfunction collectPaginatorMigration(element: TmplAstElement, source: string, edits: Edit[]): boolean {\n let found = false;\n\n for (const attr of element.attributes) {\n if (attr.name === 'paginable') {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n found = true;\n }\n }\n for (const input of element.inputs) {\n if (input.name === 'paginable') {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n found = true;\n }\n }\n\n if (found) {\n // Add [paginator]=\"paginator\" before closing > of opening tag\n const insertPos = element.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' [paginator]=\"paginator\"' });\n\n // Add eui-paginator after </table>\n if (element.endSourceSpan) {\n const afterTable = element.endSourceSpan.end.offset;\n edits.push({\n start: afterTable,\n end: afterTable,\n replacement: '\\n<!-- TODO: Configure paginator and implement onPageChange handler -->\\n<eui-paginator #paginator [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\" />',\n });\n }\n }\n\n return found;\n}\n\nfunction collectEmptyMessageRename(element: TmplAstElement, edits: Edit[]): void {\n // Handle direct attribute on elements (unlikely but handle)\n for (const attr of element.attributes) {\n if (attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n}\n\nfunction collectTemplateEmptyMessageRename(template: TmplAstTemplate, edits: Edit[]): void {\n for (const attr of template.templateAttrs) {\n if (attr instanceof TmplAstTextAttribute && attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n for (const attr of template.attributes) {\n if (attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n}\n\n// --- Pipe rename via AST ---\n\nfunction collectPipeRenames(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n for (const input of node.inputs) {\n visitExpressionForPipes(input.value, edits);\n }\n for (const output of node.outputs) {\n if (output.handler) visitExpressionForPipes(output.handler, edits);\n }\n collectPipeRenames(node.children, source, edits);\n }\n if (node instanceof TmplAstTemplate) {\n for (const input of node.inputs) {\n visitExpressionForPipes(input.value, edits);\n }\n collectPipeRenames(node.children, source, edits);\n }\n if (node instanceof TmplAstBoundText) {\n visitExpressionForPipes(node.value, edits);\n }\n }\n}\n\nfunction visitExpressionForPipes(expr: AST, edits: Edit[]): void {\n if (expr instanceof ASTWithSource && expr.ast) {\n visitAstForPipes(expr.ast, edits);\n } else {\n visitAstForPipes(expr, edits);\n }\n}\n\nfunction visitAstForPipes(ast: AST, edits: Edit[]): void {\n if (ast instanceof BindingPipe) {\n if (ast.name === OLD_PIPE && ast.nameSpan) {\n edits.push({ start: ast.nameSpan.start, end: ast.nameSpan.end, replacement: NEW_PIPE });\n }\n visitAstForPipes(ast.exp, edits);\n for (const arg of ast.args) {\n visitAstForPipes(arg, edits);\n }\n return;\n }\n\n if (ast instanceof Interpolation) {\n for (const expr of ast.expressions) {\n visitAstForPipes(expr, edits);\n }\n return;\n }\n\n // Recursively visit all properties that could contain AST nodes\n for (const key of Object.keys(ast)) {\n // eslint-disable-next-line\n const val = (ast as any)[key];\n if (val instanceof AST) {\n visitAstForPipes(val, edits);\n } else if (Array.isArray(val)) {\n for (const item of val) {\n if (item instanceof AST) visitAstForPipes(item, edits);\n }\n }\n }\n}\n\n// --- Import handling for paginator ---\n\nfunction addPaginatorImport(source: string, filePath: string): string {\n if (source.includes(PAGINATOR_COMPONENT)) return source;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Add import statement after last import\n let lastImportEnd = 0;\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n }\n }\n\n if (lastImportEnd > 0) {\n edits.push({\n start: lastImportEnd,\n end: lastImportEnd,\n replacement: `\\nimport { ${PAGINATOR_COMPONENT} } from '${PAGINATOR_IMPORT_PATH}';`,\n });\n }\n\n // Add to component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name) && node.name.text === 'imports' && isComponentMetadataProperty(node)) {\n if (ts.isArrayLiteralExpression(node.initializer)) {\n const arr = node.initializer;\n const elements = arr.elements;\n if (elements.length > 0) {\n const lastElement = elements[elements.length - 1];\n edits.push({\n start: lastElement.getEnd(),\n end: lastElement.getEnd(),\n replacement: `, ${PAGINATOR_COMPONENT}`,\n });\n } else {\n const insertPos = arr.getStart(sourceFile) + 1;\n edits.push({ start: insertPos, end: insertPos, replacement: PAGINATOR_COMPONENT });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\n// --- Helpers ---\n\nfunction removeAttribute(start: number, end: number, source: string, edits: Edit[]): void {\n let adjustedStart = start;\n while (adjustedStart > 0 && (source[adjustedStart - 1] === ' ' || source[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n edits.push({ start: adjustedStart, end, replacement: '' });\n}\n\nfunction logRemovalWarning(name: string, filePath: string, element: TmplAstElement, context: SchematicContext): void {\n const { line } = element.startSourceSpan.start;\n if (name === 'defaultMultiOrder') {\n context.logger.warn(`${filePath}:${line + 1} - \"[${name}]\" removed. Use setSort(Sort[]) to initialize sorting.`);\n } else {\n context.logger.warn(`${filePath}:${line + 1} - \"[${name}]\" removed to align to Design System.`);\n }\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n unique.set(key, edit);\n }\n let result = source;\n for (const edit of [...unique.values()].sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
2874
2874
|
"displayName": "Schema",
|
|
2875
2875
|
"properties": [
|
|
2876
2876
|
{
|
|
@@ -2882,7 +2882,7 @@
|
|
|
2882
2882
|
"indexKey": "",
|
|
2883
2883
|
"optional": true,
|
|
2884
2884
|
"description": "",
|
|
2885
|
-
"line":
|
|
2885
|
+
"line": 49,
|
|
2886
2886
|
"rawdescription": "\n"
|
|
2887
2887
|
},
|
|
2888
2888
|
{
|
|
@@ -2894,7 +2894,7 @@
|
|
|
2894
2894
|
"indexKey": "",
|
|
2895
2895
|
"optional": true,
|
|
2896
2896
|
"description": "",
|
|
2897
|
-
"line":
|
|
2897
|
+
"line": 48,
|
|
2898
2898
|
"rawdescription": "\n"
|
|
2899
2899
|
}
|
|
2900
2900
|
],
|
|
@@ -2912,12 +2912,12 @@
|
|
|
2912
2912
|
},
|
|
2913
2913
|
{
|
|
2914
2914
|
"name": "Schema",
|
|
2915
|
-
"id": "interface-Schema-
|
|
2916
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2915
|
+
"id": "interface-Schema-760dec88d3f709d5b38226e55f7cbfb1e5fabcea6c004fd46e611be1dd563b8b247e9e6c77667e5582fe7b443374ba2c4facd2b2db2985edb46c9a4a37a8a876-16",
|
|
2916
|
+
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
2917
2917
|
"deprecated": false,
|
|
2918
2918
|
"deprecationMessage": "",
|
|
2919
2919
|
"type": "interface",
|
|
2920
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst INPUT_RENAMES = new Map([\n ['iconLabelClass', 'icon'],\n ['iconLabelStyleClass', 'fillColor'],\n]);\n\nexport function migrateEuiProgressCircle(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const oldNames = [...INPUT_RENAMES.keys()];\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n if (original.includes('eui-progress-circle')) {\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n }\n\n // Warn about TS property access usages (merged from warnTsUsages)\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (oldNames.some((name) => original.includes(name))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && INPUT_RENAMES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n const newName = INPUT_RENAMES.get(node.name.text);\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been renamed to \"${newName}\" on eui-progress-circle. Update this reference manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Renamed deprecated eui-progress-circle inputs in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n visitNodes(parsed.nodes, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: { start: number; end: number; text: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes('eui-progress-circle')) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-progress-circle') {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n const newName = INPUT_RENAMES.get(attr.name);\n if (newName) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n }\n for (const input of element.inputs) {\n const newName = INPUT_RENAMES.get(input.name);\n if (newName) {\n edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n }\n}\n\nfunction applyEdits(source: string, edits: { start: number; end: number; replacement: string }[]): string {\n let result = source;\n for (const edit of edits.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n",
|
|
2920
|
+
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface TextChange {\n start: number;\n end: number;\n text: string;\n}\n\ninterface MigrationResult {\n content: string;\n migrated: number;\n skipped: number;\n}\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_LABEL = 'eui-tab-label';\nconst OLD_SUB_LABEL = 'euiTabSubLabel';\nconst OLD_CONTENT = 'eui-tab-content';\nconst NEW_HEADER = 'eui-tab-header';\nconst NEW_HEADER_LABEL = 'eui-tab-header-label';\nconst NEW_HEADER_SUB_LABEL = 'eui-tab-header-sub-label';\nconst NEW_BODY = 'eui-tab-body';\n\nexport function migrateEuiTabs(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let migrated = 0;\n let skipped = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) {\n return;\n }\n\n const original = buffer.toString('utf-8');\n const result = path.endsWith('.html')\n ? migrateTemplate(original, path, context)\n : migrateInlineTemplates(original, path, context);\n\n migrated += result.migrated;\n skipped += result.skipped;\n\n if (result.content !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${result.migrated} tab block(s) in ${path}`);\n } else {\n tree.overwrite(path, result.content);\n }\n }\n });\n\n context.logger.info(`Migrated ${migrated} EUI tab template block(s).`);\n if (skipped > 0) {\n context.logger.warn(`Skipped ${skipped} malformed EUI tab template block(s).`);\n }\n if (options.dryRun) {\n logDryRunNote(context);\n }\n\n return tree;\n };\n}\n\nfunction migrateInlineTemplates(source: string, filePath: string, context: SchematicContext): MigrationResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: TextChange[] = [];\n let migrated = 0;\n let skipped = 0;\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const initializer = unwrapExpression(node.initializer);\n\n if (ts.isStringLiteral(initializer) || ts.isNoSubstitutionTemplateLiteral(initializer)) {\n const start = initializer.getStart(sourceFile) + 1;\n const end = initializer.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n const result = migrateTemplate(rawTemplate, `${filePath}@inline-template`, context);\n\n migrated += result.migrated;\n skipped += result.skipped;\n\n if (result.content !== rawTemplate) {\n changes.push({ start, end, text: result.content });\n }\n } else if (ts.isTemplateExpression(initializer)) {\n context.logger.warn(`Skipping interpolated inline template in ${filePath}.`);\n skipped++;\n }\n }\n\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return {\n content: applyChanges(source, changes),\n migrated,\n skipped,\n };\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (\n (ts.isIdentifier(name) && name.text === 'template') ||\n (ts.isStringLiteral(name) && name.text === 'template')\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n\n return current;\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) {\n return false;\n }\n\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) {\n return false;\n }\n\n return (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): MigrationResult {\n const parsed = parseTemplate(source, filePath, { preserveWhitespaces: true });\n const changes: TextChange[] = [];\n let migrated = 0;\n let skipped = 0;\n\n for (const error of parsed.errors ?? []) {\n context.logger.warn(`Template parse warning in ${filePath}: ${error.msg}`);\n }\n\n for (const tab of findElements(parsed.nodes, 'eui-tab')) {\n const label = findDirectChild(tab, OLD_LABEL);\n const content = findDirectChild(tab, OLD_CONTENT);\n const hasOldMarkup = Boolean(label || content);\n const hasNewMarkup = Boolean(findDirectChild(tab, NEW_HEADER) || findDirectChild(tab, NEW_BODY));\n\n if (!hasOldMarkup || hasNewMarkup) {\n continue;\n }\n\n if (!label || !content) {\n context.logger.warn(`Skipping malformed <eui-tab> in ${filePath}.`);\n skipped++;\n continue;\n }\n\n changes.push({\n start: label.sourceSpan.start.offset,\n end: label.sourceSpan.end.offset,\n text: buildHeaderReplacement(source, label),\n });\n changes.push({\n start: content.sourceSpan.start.offset,\n end: content.sourceSpan.end.offset,\n text: buildBodyReplacement(source, content),\n });\n migrated++;\n }\n\n return {\n content: applyChanges(source, withoutOverlaps(changes)),\n migrated,\n skipped,\n };\n}\n\nfunction findElements(nodes: readonly TmplAstNode[], name: string): TmplAstElement[] {\n const matches: TmplAstElement[] = [];\n\n for (const node of nodes) {\n if (isElement(node)) {\n if (node.name === name) {\n matches.push(node);\n }\n matches.push(...findElements(node.children, name));\n }\n }\n\n return matches;\n}\n\nfunction findDirectChild(element: TmplAstElement, name: string): TmplAstElement | undefined {\n return element.children.find((child): child is TmplAstElement => isElement(child) && child.name === name);\n}\n\nfunction isElement(node: TmplAstNode): node is TmplAstElement {\n return node instanceof TmplAstElement;\n}\n\nfunction buildHeaderReplacement(source: string, label: TmplAstElement): string {\n const indent = getIndent(source, label.sourceSpan.start.offset);\n const labelAttributes = getAttributeText(source, label, OLD_LABEL);\n const subLabels = findElements(label.children, OLD_SUB_LABEL);\n const mainLabelContent = removeElementRanges(getInnerText(source, label), label, subLabels);\n const lines = [\n `<${NEW_HEADER}>`,\n `${indent} <${NEW_HEADER_LABEL}${labelAttributes}>`,\n ...formatInnerLines(mainLabelContent, `${indent} `),\n `${indent} </${NEW_HEADER_LABEL}>`,\n ];\n\n for (const subLabel of subLabels) {\n const subLabelAttributes = getAttributeText(source, subLabel, OLD_SUB_LABEL);\n lines.push(\n `${indent} <${NEW_HEADER_SUB_LABEL}${subLabelAttributes}>`,\n ...formatInnerLines(getInnerText(source, subLabel), `${indent} `),\n `${indent} </${NEW_HEADER_SUB_LABEL}>`,\n );\n }\n\n lines.push(`${indent}</${NEW_HEADER}>`);\n\n return lines.join('\\n');\n}\n\nfunction buildBodyReplacement(source: string, content: TmplAstElement): string {\n const indent = getIndent(source, content.sourceSpan.start.offset);\n const attributes = getAttributeText(source, content, OLD_CONTENT);\n const innerText = getInnerText(source, content);\n const trimmed = innerText.trim();\n\n if (trimmed && !trimmed.includes('\\n')) {\n return `<${NEW_BODY}${attributes}>${trimmed}</${NEW_BODY}>`;\n }\n\n return [\n `<${NEW_BODY}${attributes}>`,\n ...formatInnerLines(innerText, `${indent} `),\n `${indent}</${NEW_BODY}>`,\n ].join('\\n');\n}\n\nfunction getInnerText(source: string, element: TmplAstElement): string {\n if (!element.endSourceSpan) {\n return '';\n }\n\n return source.slice(element.startSourceSpan.end.offset, element.endSourceSpan.start.offset);\n}\n\nfunction removeElementRanges(source: string, parent: TmplAstElement, elements: readonly TmplAstElement[]): string {\n const parentContentStart = parent.startSourceSpan.end.offset;\n let result = source;\n\n for (const element of [...elements].sort((a, b) => b.sourceSpan.start.offset - a.sourceSpan.start.offset)) {\n const start = element.sourceSpan.start.offset - parentContentStart;\n const end = element.sourceSpan.end.offset - parentContentStart;\n result = result.slice(0, start) + result.slice(end);\n }\n\n return result;\n}\n\nfunction getAttributeText(source: string, element: TmplAstElement, tagName: string): string {\n const startTag = source.slice(element.startSourceSpan.start.offset, element.startSourceSpan.end.offset);\n const tagStart = startTag.indexOf(tagName);\n\n if (tagStart === -1) {\n return '';\n }\n\n const contentEnd = startTag.endsWith('/>') ? startTag.length - 2 : startTag.length - 1;\n return startTag.slice(tagStart + tagName.length, contentEnd).trimEnd();\n}\n\nfunction getIndent(source: string, offset: number): string {\n const lineStart = source.lastIndexOf('\\n', offset - 1) + 1;\n const prefix = source.slice(lineStart, offset);\n return prefix.match(/^\\s*/)?.[0] ?? '';\n}\n\nfunction formatInnerLines(source: string, indent: string): string[] {\n const trimmed = source.trim();\n\n if (!trimmed) {\n return [];\n }\n\n return trimmed.split(/\\r?\\n/).map((line) => `${indent}${line.trim()}`);\n}\n\nfunction withoutOverlaps(changes: TextChange[]): TextChange[] {\n const accepted: TextChange[] = [];\n\n for (const change of [...changes].sort((a, b) => a.start - b.start || b.end - a.end)) {\n if (!accepted.some((current) => change.start < current.end && current.start < change.end)) {\n accepted.push(change);\n }\n }\n\n return accepted;\n}\n\nfunction applyChanges(source: string, changes: readonly TextChange[]): string {\n let result = source;\n\n for (const change of [...changes].sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n\n return result;\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
2921
2921
|
"displayName": "Schema",
|
|
2922
2922
|
"properties": [
|
|
2923
2923
|
{
|
|
@@ -2929,7 +2929,7 @@
|
|
|
2929
2929
|
"indexKey": "",
|
|
2930
2930
|
"optional": true,
|
|
2931
2931
|
"description": "",
|
|
2932
|
-
"line":
|
|
2932
|
+
"line": 20,
|
|
2933
2933
|
"rawdescription": "\n"
|
|
2934
2934
|
},
|
|
2935
2935
|
{
|
|
@@ -2941,7 +2941,7 @@
|
|
|
2941
2941
|
"indexKey": "",
|
|
2942
2942
|
"optional": true,
|
|
2943
2943
|
"description": "",
|
|
2944
|
-
"line":
|
|
2944
|
+
"line": 19,
|
|
2945
2945
|
"rawdescription": "\n"
|
|
2946
2946
|
}
|
|
2947
2947
|
],
|
|
@@ -2959,12 +2959,12 @@
|
|
|
2959
2959
|
},
|
|
2960
2960
|
{
|
|
2961
2961
|
"name": "Schema",
|
|
2962
|
-
"id": "interface-Schema-
|
|
2963
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2962
|
+
"id": "interface-Schema-a806c1769fb526271565003a6a3ef9ab4c67e421d93ee0cb54e1f6de223807afc1f16ad294656ef614a77a91a38cc914ce41ac97ed3a8a4195a1e74a729c0c08-17",
|
|
2963
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
2964
2964
|
"deprecated": false,
|
|
2965
2965
|
"deprecationMessage": "",
|
|
2966
2966
|
"type": "interface",
|
|
2967
|
-
"sourceCode": "import { BindingPipe, parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute, AST, ASTWithSource, Interpolation } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Edit { start: number; end: number; replacement: string; }\n\n// --- Table-level input renames (on elements with euiTable attribute) ---\nconst TABLE_INPUT_RENAMES = new Map([\n ['rows', 'data'],\n ['loading', 'isLoading'],\n ['asyncTable', 'isAsync'],\n ['euiTableResponsive', 'isTableResponsive'],\n ['euiTableFixedLayout', 'isTableFixedLayout'],\n ['euiTableCompact', 'isTableCompact'],\n ['hasStickyColumns', 'hasStickyCols'],\n]);\n\n// --- Child element input renames (scoped to euiTable context) ---\nconst TH_TD_INPUT_RENAMES = new Map([\n ['isStickyColumn', 'isStickyCol'],\n ['sortable', 'isSortable'],\n]);\n\nconst TR_INPUT_RENAMES = new Map([\n ['isSelectableHeader', 'isHeaderSelectable'],\n ['isSelectable', 'isDataSelectable'],\n]);\n\n// --- Removed inputs ---\nconst REMOVED_INPUTS = new Set(['euiTableBordered', 'isHoverable', 'defaultMultiOrder', 'paginable']);\n\n// --- Output renames/removals ---\nconst OUTPUT_RENAMES = new Map([['selectedRows', 'rowsSelect']]);\nconst REMOVED_OUTPUTS = new Set(['multiSortChange']);\n\n// --- Pipe rename ---\nconst OLD_PIPE = 'euiTableHighlightFilter';\nconst NEW_PIPE = 'euiTableHighlight';\n\n// --- TS property renames ---\nconst TS_PROPERTY_RENAMES = new Map([['filteredRows', 'getFilteredData']]);\n\nconst PAGINATOR_IMPORT_PATH = '@eui/components/eui-paginator';\nconst PAGINATOR_COMPONENT = 'EuiPaginatorComponent';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nexport function migrateEuiTable(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const paginatorHtmlFiles = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('euiTable') && !original.includes(OLD_PIPE) && !original.includes('filteredRows') && !original.includes('setSort')) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n const { output, hasPaginator } = migrateTemplateWithPaginator(original, path, context);\n result = output;\n if (hasPaginator) paginatorHtmlFiles.add(path);\n } else {\n const { output, hasPaginator } = migrateTypeScript(original, path, context);\n result = output;\n if (hasPaginator) {\n result = addPaginatorImport(result, path);\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-table breaking changes in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n // Handle paginator imports for external templates\n if (paginatorHtmlFiles.size > 0) {\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const source = buffer.toString('utf-8');\n if (!source.includes('templateUrl')) return;\n\n for (const htmlFile of paginatorHtmlFiles) {\n const htmlFileName = htmlFile.split('/').pop()!;\n if (source.includes(htmlFileName)) {\n const updated = addPaginatorImport(source, path);\n if (updated !== source) {\n if (options.dryRun) {\n logDryRun(context, `Would add paginator import in ${path}`);\n } else {\n tree.overwrite(path, updated);\n }\n count++;\n }\n break;\n }\n }\n });\n }\n\n context.logger.info(`Migrated eui-table in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplateWithPaginator(source: string, filePath: string, context: SchematicContext): { output: string; hasPaginator: boolean } {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n let hasPaginator = false;\n\n const paginatorResult = visitNodesForTable(parsed.nodes, source, edits, false, filePath, context);\n if (paginatorResult) hasPaginator = true;\n\n collectPipeRenames(parsed.nodes, source, edits);\n\n return { output: applyEdits(source, edits), hasPaginator };\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): string {\n return migrateTemplateWithPaginator(source, filePath, context).output;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): { output: string; hasPaginator: boolean } {\n let result = source;\n let hasPaginator = false;\n\n // Migrate inline templates\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = result.slice(start, end);\n if (!rawTemplate.includes('euiTable') && !rawTemplate.includes(OLD_PIPE)) {\n ts.forEachChild(node, visit); return;\n}\n const { output: migrated, hasPaginator: pag } = migrateTemplateWithPaginator(rawTemplate, filePath, context);\n if (pag) hasPaginator = true;\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n result = applyEdits(result, changes);\n\n // Rename TS property accesses\n result = renameTsProperties(result);\n\n // Warn about setSort\n warnSetSort(result, filePath, context);\n\n return { output: result, hasPaginator };\n}\n\nfunction renameTsProperties(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && TS_PROPERTY_RENAMES.has(node.name.text)) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: TS_PROPERTY_RENAMES.get(node.name.text)! });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction warnSetSort(source: string, filePath: string, context: SchematicContext): void {\n if (!source.includes('setSort')) return;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) &&\n ts.isIdentifier(node.expression.name) && node.expression.name.text === 'setSort') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${filePath}:${line + 1} - \"setSort\" signature changed from setSort(sort: string, order: \"asc\" | \"desc\") to setSort(Sort[]). Update manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n}\n\n// --- Template AST visitors ---\n\nfunction visitNodesForTable(\n nodes: TmplAstNode[], source: string, edits: Edit[], insideEuiTable: boolean, filePath: string, context: SchematicContext,\n): boolean {\n let hasPaginator = false;\n\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n const isEuiTable = hasEuiTableAttribute(node);\n\n if (isEuiTable) {\n collectTableInputRenames(node, edits);\n collectInputRemovals(node, source, edits, filePath, context);\n collectOutputChanges(node, source, edits, filePath, context);\n if (collectPaginatorMigration(node, source, edits)) hasPaginator = true;\n }\n\n if (isEuiTable || insideEuiTable) {\n collectChildElementRenames(node, edits);\n collectChildInputRemovals(node, source, edits, filePath, context);\n collectEmptyMessageRename(node, edits);\n }\n\n const childResult = visitNodesForTable(node.children, source, edits, isEuiTable || insideEuiTable, filePath, context);\n if (childResult) hasPaginator = true;\n }\n\n if (node instanceof TmplAstTemplate) {\n if (insideEuiTable) {\n collectTemplateEmptyMessageRename(node, edits);\n }\n const childResult = visitNodesForTable(node.children, source, edits, insideEuiTable, filePath, context);\n if (childResult) hasPaginator = true;\n }\n }\n\n return hasPaginator;\n}\n\nfunction hasEuiTableAttribute(element: TmplAstElement): boolean {\n return element.attributes.some((a) => a.name === 'euiTable') ||\n element.inputs.some((i) => i.name === 'euiTable');\n}\n\nfunction collectTableInputRenames(element: TmplAstElement, edits: Edit[]): void {\n for (const attr of element.attributes) {\n const newName = TABLE_INPUT_RENAMES.get(attr.name);\n if (newName) edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n for (const input of element.inputs) {\n const newName = TABLE_INPUT_RENAMES.get(input.name);\n if (newName) edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n}\n\nfunction collectChildElementRenames(element: TmplAstElement, edits: Edit[]): void {\n const renames = (element.name === 'th' || element.name === 'td') ? TH_TD_INPUT_RENAMES\n : element.name === 'tr' ? TR_INPUT_RENAMES : null;\n if (!renames) return;\n\n for (const attr of element.attributes) {\n const newName = renames.get(attr.name);\n if (newName) edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n for (const input of element.inputs) {\n const newName = renames.get(input.name);\n if (newName) edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n}\n\nfunction collectChildInputRemovals(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n const childRemovedInputs = new Set(['defaultMultiOrder']);\n\n for (const attr of element.attributes) {\n if (childRemovedInputs.has(attr.name)) {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n logRemovalWarning(attr.name, filePath, element, context);\n }\n }\n for (const input of element.inputs) {\n if (childRemovedInputs.has(input.name)) {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n logRemovalWarning(input.name, filePath, element, context);\n }\n }\n}\n\nfunction collectInputRemovals(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name) && attr.name !== 'paginable') {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n logRemovalWarning(attr.name, filePath, element, context);\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name) && input.name !== 'paginable') {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n logRemovalWarning(input.name, filePath, element, context);\n }\n }\n}\n\nfunction collectOutputChanges(element: TmplAstElement, source: string, edits: Edit[], filePath: string, context: SchematicContext): void {\n for (const output of element.outputs) {\n const newName = OUTPUT_RENAMES.get(output.name);\n if (newName) {\n edits.push({ start: output.keySpan!.start.offset, end: output.keySpan!.end.offset, replacement: newName });\n }\n if (REMOVED_OUTPUTS.has(output.name)) {\n removeAttribute(output.sourceSpan.start.offset, output.sourceSpan.end.offset, source, edits);\n const { line } = element.startSourceSpan.start;\n context.logger.warn(\n `${filePath}:${line + 1} - \"(${output.name})\" removed. Multi-sort is now supported by (sortChange) output.`,\n );\n }\n }\n}\n\nfunction collectPaginatorMigration(element: TmplAstElement, source: string, edits: Edit[]): boolean {\n let found = false;\n\n for (const attr of element.attributes) {\n if (attr.name === 'paginable') {\n removeAttribute(attr.sourceSpan.start.offset, attr.sourceSpan.end.offset, source, edits);\n found = true;\n }\n }\n for (const input of element.inputs) {\n if (input.name === 'paginable') {\n removeAttribute(input.sourceSpan.start.offset, input.sourceSpan.end.offset, source, edits);\n found = true;\n }\n }\n\n if (found) {\n // Add [paginator]=\"paginator\" before closing > of opening tag\n const insertPos = element.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' [paginator]=\"paginator\"' });\n\n // Add eui-paginator after </table>\n if (element.endSourceSpan) {\n const afterTable = element.endSourceSpan.end.offset;\n edits.push({\n start: afterTable,\n end: afterTable,\n replacement: '\\n<!-- TODO: Configure paginator and implement onPageChange handler -->\\n<eui-paginator #paginator [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\" />',\n });\n }\n }\n\n return found;\n}\n\nfunction collectEmptyMessageRename(element: TmplAstElement, edits: Edit[]): void {\n // Handle direct attribute on elements (unlikely but handle)\n for (const attr of element.attributes) {\n if (attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n}\n\nfunction collectTemplateEmptyMessageRename(template: TmplAstTemplate, edits: Edit[]): void {\n for (const attr of template.templateAttrs) {\n if (attr instanceof TmplAstTextAttribute && attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n for (const attr of template.attributes) {\n if (attr.name === 'euiTemplate' && attr.value === 'emptyMessage' && attr.valueSpan) {\n edits.push({ start: attr.valueSpan.start.offset, end: attr.valueSpan.end.offset, replacement: 'footer' });\n }\n }\n}\n\n// --- Pipe rename via AST ---\n\nfunction collectPipeRenames(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n for (const input of node.inputs) {\n visitExpressionForPipes(input.value, edits);\n }\n for (const output of node.outputs) {\n if (output.handler) visitExpressionForPipes(output.handler, edits);\n }\n collectPipeRenames(node.children, source, edits);\n }\n if (node instanceof TmplAstTemplate) {\n for (const input of node.inputs) {\n visitExpressionForPipes(input.value, edits);\n }\n collectPipeRenames(node.children, source, edits);\n }\n if (node instanceof TmplAstBoundText) {\n visitExpressionForPipes(node.value, edits);\n }\n }\n}\n\nfunction visitExpressionForPipes(expr: AST, edits: Edit[]): void {\n if (expr instanceof ASTWithSource && expr.ast) {\n visitAstForPipes(expr.ast, edits);\n } else {\n visitAstForPipes(expr, edits);\n }\n}\n\nfunction visitAstForPipes(ast: AST, edits: Edit[]): void {\n if (ast instanceof BindingPipe) {\n if (ast.name === OLD_PIPE && ast.nameSpan) {\n edits.push({ start: ast.nameSpan.start, end: ast.nameSpan.end, replacement: NEW_PIPE });\n }\n visitAstForPipes(ast.exp, edits);\n for (const arg of ast.args) {\n visitAstForPipes(arg, edits);\n }\n return;\n }\n\n if (ast instanceof Interpolation) {\n for (const expr of ast.expressions) {\n visitAstForPipes(expr, edits);\n }\n return;\n }\n\n // Recursively visit all properties that could contain AST nodes\n for (const key of Object.keys(ast)) {\n // eslint-disable-next-line\n const val = (ast as any)[key];\n if (val instanceof AST) {\n visitAstForPipes(val, edits);\n } else if (Array.isArray(val)) {\n for (const item of val) {\n if (item instanceof AST) visitAstForPipes(item, edits);\n }\n }\n }\n}\n\n// --- Import handling for paginator ---\n\nfunction addPaginatorImport(source: string, filePath: string): string {\n if (source.includes(PAGINATOR_COMPONENT)) return source;\n\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Add import statement after last import\n let lastImportEnd = 0;\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n }\n }\n\n if (lastImportEnd > 0) {\n edits.push({\n start: lastImportEnd,\n end: lastImportEnd,\n replacement: `\\nimport { ${PAGINATOR_COMPONENT} } from '${PAGINATOR_IMPORT_PATH}';`,\n });\n }\n\n // Add to component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name) && node.name.text === 'imports' && isComponentMetadataProperty(node)) {\n if (ts.isArrayLiteralExpression(node.initializer)) {\n const arr = node.initializer;\n const elements = arr.elements;\n if (elements.length > 0) {\n const lastElement = elements[elements.length - 1];\n edits.push({\n start: lastElement.getEnd(),\n end: lastElement.getEnd(),\n replacement: `, ${PAGINATOR_COMPONENT}`,\n });\n } else {\n const insertPos = arr.getStart(sourceFile) + 1;\n edits.push({ start: insertPos, end: insertPos, replacement: PAGINATOR_COMPONENT });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\n// --- Helpers ---\n\nfunction removeAttribute(start: number, end: number, source: string, edits: Edit[]): void {\n let adjustedStart = start;\n while (adjustedStart > 0 && (source[adjustedStart - 1] === ' ' || source[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n edits.push({ start: adjustedStart, end, replacement: '' });\n}\n\nfunction logRemovalWarning(name: string, filePath: string, element: TmplAstElement, context: SchematicContext): void {\n const { line } = element.startSourceSpan.start;\n if (name === 'defaultMultiOrder') {\n context.logger.warn(`${filePath}:${line + 1} - \"[${name}]\" removed. Use setSort(Sort[]) to initialize sorting.`);\n } else {\n context.logger.warn(`${filePath}:${line + 1} - \"[${name}]\" removed to align to Design System.`);\n }\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n unique.set(key, edit);\n }\n let result = source;\n for (const edit of [...unique.values()].sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
2967
|
+
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['type']);\n\nexport function migrateEuiPopover(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-popover')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'type' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && (original.includes('eui-popover') || original.includes('euiPopover') || original.includes('EuiPopover'))) {\n if (original.includes('type')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'type') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"type\" is no longer a valid input on eui-popover. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Removed deprecated eui-popover 'type' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n // Extend start backwards to consume leading whitespace\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-popover')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-popover') {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
|
|
2968
2968
|
"displayName": "Schema",
|
|
2969
2969
|
"properties": [
|
|
2970
2970
|
{
|
|
@@ -2976,7 +2976,7 @@
|
|
|
2976
2976
|
"indexKey": "",
|
|
2977
2977
|
"optional": true,
|
|
2978
2978
|
"description": "",
|
|
2979
|
-
"line":
|
|
2979
|
+
"line": 8,
|
|
2980
2980
|
"rawdescription": "\n"
|
|
2981
2981
|
},
|
|
2982
2982
|
{
|
|
@@ -2988,7 +2988,7 @@
|
|
|
2988
2988
|
"indexKey": "",
|
|
2989
2989
|
"optional": true,
|
|
2990
2990
|
"description": "",
|
|
2991
|
-
"line":
|
|
2991
|
+
"line": 7,
|
|
2992
2992
|
"rawdescription": "\n"
|
|
2993
2993
|
}
|
|
2994
2994
|
],
|
|
@@ -3006,12 +3006,12 @@
|
|
|
3006
3006
|
},
|
|
3007
3007
|
{
|
|
3008
3008
|
"name": "Schema",
|
|
3009
|
-
"id": "interface-Schema-
|
|
3010
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
3009
|
+
"id": "interface-Schema-d36032102ed30a7ada1e3d36bb9ca41b7234b855760cac9783a25818f7ffe2097e1ebd8e808b574ddec0760f827272f6cd561f45f3eb1578f87f39ee2633730a-18",
|
|
3010
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
3011
3011
|
"deprecated": false,
|
|
3012
3012
|
"deprecationMessage": "",
|
|
3013
3013
|
"type": "interface",
|
|
3014
|
-
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface TextChange {\n start: number;\n end: number;\n text: string;\n}\n\ninterface MigrationResult {\n content: string;\n migrated: number;\n skipped: number;\n}\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_LABEL = 'eui-tab-label';\nconst OLD_SUB_LABEL = 'euiTabSubLabel';\nconst OLD_CONTENT = 'eui-tab-content';\nconst NEW_HEADER = 'eui-tab-header';\nconst NEW_HEADER_LABEL = 'eui-tab-header-label';\nconst NEW_HEADER_SUB_LABEL = 'eui-tab-header-sub-label';\nconst NEW_BODY = 'eui-tab-body';\n\nexport function migrateEuiTabs(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let migrated = 0;\n let skipped = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) {\n return;\n }\n\n const original = buffer.toString('utf-8');\n const result = path.endsWith('.html')\n ? migrateTemplate(original, path, context)\n : migrateInlineTemplates(original, path, context);\n\n migrated += result.migrated;\n skipped += result.skipped;\n\n if (result.content !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${result.migrated} tab block(s) in ${path}`);\n } else {\n tree.overwrite(path, result.content);\n }\n }\n });\n\n context.logger.info(`Migrated ${migrated} EUI tab template block(s).`);\n if (skipped > 0) {\n context.logger.warn(`Skipped ${skipped} malformed EUI tab template block(s).`);\n }\n if (options.dryRun) {\n logDryRunNote(context);\n }\n\n return tree;\n };\n}\n\nfunction migrateInlineTemplates(source: string, filePath: string, context: SchematicContext): MigrationResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: TextChange[] = [];\n let migrated = 0;\n let skipped = 0;\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const initializer = unwrapExpression(node.initializer);\n\n if (ts.isStringLiteral(initializer) || ts.isNoSubstitutionTemplateLiteral(initializer)) {\n const start = initializer.getStart(sourceFile) + 1;\n const end = initializer.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n const result = migrateTemplate(rawTemplate, `${filePath}@inline-template`, context);\n\n migrated += result.migrated;\n skipped += result.skipped;\n\n if (result.content !== rawTemplate) {\n changes.push({ start, end, text: result.content });\n }\n } else if (ts.isTemplateExpression(initializer)) {\n context.logger.warn(`Skipping interpolated inline template in ${filePath}.`);\n skipped++;\n }\n }\n\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return {\n content: applyChanges(source, changes),\n migrated,\n skipped,\n };\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (\n (ts.isIdentifier(name) && name.text === 'template') ||\n (ts.isStringLiteral(name) && name.text === 'template')\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n\n return current;\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) {\n return false;\n }\n\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) {\n return false;\n }\n\n return (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction migrateTemplate(source: string, filePath: string, context: SchematicContext): MigrationResult {\n const parsed = parseTemplate(source, filePath, { preserveWhitespaces: true });\n const changes: TextChange[] = [];\n let migrated = 0;\n let skipped = 0;\n\n for (const error of parsed.errors ?? []) {\n context.logger.warn(`Template parse warning in ${filePath}: ${error.msg}`);\n }\n\n for (const tab of findElements(parsed.nodes, 'eui-tab')) {\n const label = findDirectChild(tab, OLD_LABEL);\n const content = findDirectChild(tab, OLD_CONTENT);\n const hasOldMarkup = Boolean(label || content);\n const hasNewMarkup = Boolean(findDirectChild(tab, NEW_HEADER) || findDirectChild(tab, NEW_BODY));\n\n if (!hasOldMarkup || hasNewMarkup) {\n continue;\n }\n\n if (!label || !content) {\n context.logger.warn(`Skipping malformed <eui-tab> in ${filePath}.`);\n skipped++;\n continue;\n }\n\n changes.push({\n start: label.sourceSpan.start.offset,\n end: label.sourceSpan.end.offset,\n text: buildHeaderReplacement(source, label),\n });\n changes.push({\n start: content.sourceSpan.start.offset,\n end: content.sourceSpan.end.offset,\n text: buildBodyReplacement(source, content),\n });\n migrated++;\n }\n\n return {\n content: applyChanges(source, withoutOverlaps(changes)),\n migrated,\n skipped,\n };\n}\n\nfunction findElements(nodes: readonly TmplAstNode[], name: string): TmplAstElement[] {\n const matches: TmplAstElement[] = [];\n\n for (const node of nodes) {\n if (isElement(node)) {\n if (node.name === name) {\n matches.push(node);\n }\n matches.push(...findElements(node.children, name));\n }\n }\n\n return matches;\n}\n\nfunction findDirectChild(element: TmplAstElement, name: string): TmplAstElement | undefined {\n return element.children.find((child): child is TmplAstElement => isElement(child) && child.name === name);\n}\n\nfunction isElement(node: TmplAstNode): node is TmplAstElement {\n return node instanceof TmplAstElement;\n}\n\nfunction buildHeaderReplacement(source: string, label: TmplAstElement): string {\n const indent = getIndent(source, label.sourceSpan.start.offset);\n const labelAttributes = getAttributeText(source, label, OLD_LABEL);\n const subLabels = findElements(label.children, OLD_SUB_LABEL);\n const mainLabelContent = removeElementRanges(getInnerText(source, label), label, subLabels);\n const lines = [\n `<${NEW_HEADER}>`,\n `${indent} <${NEW_HEADER_LABEL}${labelAttributes}>`,\n ...formatInnerLines(mainLabelContent, `${indent} `),\n `${indent} </${NEW_HEADER_LABEL}>`,\n ];\n\n for (const subLabel of subLabels) {\n const subLabelAttributes = getAttributeText(source, subLabel, OLD_SUB_LABEL);\n lines.push(\n `${indent} <${NEW_HEADER_SUB_LABEL}${subLabelAttributes}>`,\n ...formatInnerLines(getInnerText(source, subLabel), `${indent} `),\n `${indent} </${NEW_HEADER_SUB_LABEL}>`,\n );\n }\n\n lines.push(`${indent}</${NEW_HEADER}>`);\n\n return lines.join('\\n');\n}\n\nfunction buildBodyReplacement(source: string, content: TmplAstElement): string {\n const indent = getIndent(source, content.sourceSpan.start.offset);\n const attributes = getAttributeText(source, content, OLD_CONTENT);\n const innerText = getInnerText(source, content);\n const trimmed = innerText.trim();\n\n if (trimmed && !trimmed.includes('\\n')) {\n return `<${NEW_BODY}${attributes}>${trimmed}</${NEW_BODY}>`;\n }\n\n return [\n `<${NEW_BODY}${attributes}>`,\n ...formatInnerLines(innerText, `${indent} `),\n `${indent}</${NEW_BODY}>`,\n ].join('\\n');\n}\n\nfunction getInnerText(source: string, element: TmplAstElement): string {\n if (!element.endSourceSpan) {\n return '';\n }\n\n return source.slice(element.startSourceSpan.end.offset, element.endSourceSpan.start.offset);\n}\n\nfunction removeElementRanges(source: string, parent: TmplAstElement, elements: readonly TmplAstElement[]): string {\n const parentContentStart = parent.startSourceSpan.end.offset;\n let result = source;\n\n for (const element of [...elements].sort((a, b) => b.sourceSpan.start.offset - a.sourceSpan.start.offset)) {\n const start = element.sourceSpan.start.offset - parentContentStart;\n const end = element.sourceSpan.end.offset - parentContentStart;\n result = result.slice(0, start) + result.slice(end);\n }\n\n return result;\n}\n\nfunction getAttributeText(source: string, element: TmplAstElement, tagName: string): string {\n const startTag = source.slice(element.startSourceSpan.start.offset, element.startSourceSpan.end.offset);\n const tagStart = startTag.indexOf(tagName);\n\n if (tagStart === -1) {\n return '';\n }\n\n const contentEnd = startTag.endsWith('/>') ? startTag.length - 2 : startTag.length - 1;\n return startTag.slice(tagStart + tagName.length, contentEnd).trimEnd();\n}\n\nfunction getIndent(source: string, offset: number): string {\n const lineStart = source.lastIndexOf('\\n', offset - 1) + 1;\n const prefix = source.slice(lineStart, offset);\n return prefix.match(/^\\s*/)?.[0] ?? '';\n}\n\nfunction formatInnerLines(source: string, indent: string): string[] {\n const trimmed = source.trim();\n\n if (!trimmed) {\n return [];\n }\n\n return trimmed.split(/\\r?\\n/).map((line) => `${indent}${line.trim()}`);\n}\n\nfunction withoutOverlaps(changes: TextChange[]): TextChange[] {\n const accepted: TextChange[] = [];\n\n for (const change of [...changes].sort((a, b) => a.start - b.start || b.end - a.end)) {\n if (!accepted.some((current) => change.start < current.end && current.start < change.end)) {\n accepted.push(change);\n }\n }\n\n return accepted;\n}\n\nfunction applyChanges(source: string, changes: readonly TextChange[]): string {\n let result = source;\n\n for (const change of [...changes].sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n\n return result;\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
3014
|
+
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nconst OLD_CLASS = 'EuiTooltipConfig';\nconst NEW_INTERFACE = 'EuiTooltipInterface';\n\nexport function migrateEuiTooltip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_CLASS)) return;\n\n const result = migrateTypeScript(original, path, context);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate EuiTooltipConfig → EuiTooltipInterface in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated EuiTooltipConfig → EuiTooltipInterface in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiTooltipInterface is already imported\n let hasInterfaceImport = false;\n let classImportDecl: ts.ImportDeclaration | null = null;\n let classImportModuleSpecifier: string | null = null;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE) {\n hasInterfaceImport = true;\n }\n if (specifier.name.text === OLD_CLASS) {\n classImportDecl = stmt;\n classImportModuleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n }\n }\n }\n\n // Second pass: handle import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const specifiers = namedBindings.elements;\n const classSpecifier = specifiers.find((s) => s.name.text === OLD_CLASS);\n if (!classSpecifier) continue;\n\n if (hasInterfaceImport) {\n // EuiTooltipInterface is already imported elsewhere → remove EuiTooltipConfig from this import\n removeImportSpecifier(namedBindings, classSpecifier, sourceFile, edits);\n } else {\n // Rename EuiTooltipConfig → EuiTooltipInterface in the import\n edits.push({\n start: classSpecifier.name.getStart(sourceFile),\n end: classSpecifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n hasInterfaceImport = true;\n }\n }\n\n // Third pass: replace `new EuiTooltipConfig(...)` → spread/cast to interface\n const visitNewExpressions = (node: ts.Node): void => {\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) {\n const args = node.arguments;\n if (args && args.length === 1) {\n const arg = args[0];\n // `new EuiTooltipConfig({ ... })` → `{ ... } as EuiTooltipInterface`\n // But if the argument is just a variable, we keep it: `varName as EuiTooltipInterface`\n const argText = source.slice(arg.getStart(sourceFile), arg.getEnd());\n\n if (ts.isObjectLiteralExpression(arg)) {\n // Inline object: `new EuiTooltipConfig({ x: 1 })` → `{ x: 1 }`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n } else {\n // Variable or expression: `new EuiTooltipConfig(opts)` → `opts`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n }\n } else if (!args || args.length === 0) {\n // `new EuiTooltipConfig()` → `{} as EuiTooltipInterface`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: `{} as ${NEW_INTERFACE}`,\n });\n }\n return; // don't recurse into children we've already replaced\n }\n ts.forEachChild(node, visitNewExpressions);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitNewExpressions(stmt);\n }\n }\n\n // Fourth pass: rename all remaining identifier references (type annotations, etc.)\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return;\n // Skip nodes we already covered in new expressions\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) return;\n\n if (ts.isIdentifier(node) && node.text === OLD_CLASS) {\n // Ensure this is not part of an import declaration\n if (!isPartOfImport(node)) {\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n return applyEdits(source, edits);\n}\n\nfunction isPartOfImport(node: ts.Node): boolean {\n let current: ts.Node | undefined = node.parent;\n while (current) {\n if (ts.isImportDeclaration(current)) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n let end = importDecl.getEnd();\n // Also remove trailing newline if present\n const fullText = sourceFile.getFullText();\n if (fullText[end] === '\\n') end++;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end,\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n // Not the last → remove from this specifier start to next specifier start\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n // Last element → remove from previous element end to this end\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
3015
3015
|
"displayName": "Schema",
|
|
3016
3016
|
"properties": [
|
|
3017
3017
|
{
|
|
@@ -3023,7 +3023,7 @@
|
|
|
3023
3023
|
"indexKey": "",
|
|
3024
3024
|
"optional": true,
|
|
3025
3025
|
"description": "",
|
|
3026
|
-
"line":
|
|
3026
|
+
"line": 7,
|
|
3027
3027
|
"rawdescription": "\n"
|
|
3028
3028
|
},
|
|
3029
3029
|
{
|
|
@@ -3035,7 +3035,7 @@
|
|
|
3035
3035
|
"indexKey": "",
|
|
3036
3036
|
"optional": true,
|
|
3037
3037
|
"description": "",
|
|
3038
|
-
"line":
|
|
3038
|
+
"line": 6,
|
|
3039
3039
|
"rawdescription": "\n"
|
|
3040
3040
|
}
|
|
3041
3041
|
],
|
|
@@ -3100,12 +3100,12 @@
|
|
|
3100
3100
|
},
|
|
3101
3101
|
{
|
|
3102
3102
|
"name": "Schema",
|
|
3103
|
-
"id": "interface-Schema-
|
|
3104
|
-
"file": "packages/core/schematics/migrate-
|
|
3103
|
+
"id": "interface-Schema-cac2ac952d8245647e8a48b450e8f127a36bcffb394cf2cd81fe9c0810ed02c19e5e1629dbf29a68a5c6f675aed99570e9ac04ae470e13315e20c92cc0c6c453-20",
|
|
3104
|
+
"file": "packages/core/schematics/migrate-to-signals/index.ts",
|
|
3105
3105
|
"deprecated": false,
|
|
3106
3106
|
"deprecationMessage": "",
|
|
3107
3107
|
"type": "interface",
|
|
3108
|
-
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nconst OLD_CLASS = 'EuiTooltipConfig';\nconst NEW_INTERFACE = 'EuiTooltipInterface';\n\nexport function migrateEuiTooltip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(OLD_CLASS)) return;\n\n const result = migrateTypeScript(original, path, context);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate EuiTooltipConfig → EuiTooltipInterface in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated EuiTooltipConfig → EuiTooltipInterface in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTypeScript(source: string, filePath: string, context: SchematicContext): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Track if EuiTooltipInterface is already imported\n let hasInterfaceImport = false;\n let classImportDecl: ts.ImportDeclaration | null = null;\n let classImportModuleSpecifier: string | null = null;\n\n // First pass: analyze imports\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n for (const specifier of namedBindings.elements) {\n if (specifier.name.text === NEW_INTERFACE) {\n hasInterfaceImport = true;\n }\n if (specifier.name.text === OLD_CLASS) {\n classImportDecl = stmt;\n classImportModuleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n }\n }\n }\n\n // Second pass: handle import declarations\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) continue;\n const namedBindings = stmt.importClause?.namedBindings;\n if (!namedBindings || !ts.isNamedImports(namedBindings)) continue;\n\n const specifiers = namedBindings.elements;\n const classSpecifier = specifiers.find((s) => s.name.text === OLD_CLASS);\n if (!classSpecifier) continue;\n\n if (hasInterfaceImport) {\n // EuiTooltipInterface is already imported elsewhere → remove EuiTooltipConfig from this import\n removeImportSpecifier(namedBindings, classSpecifier, sourceFile, edits);\n } else {\n // Rename EuiTooltipConfig → EuiTooltipInterface in the import\n edits.push({\n start: classSpecifier.name.getStart(sourceFile),\n end: classSpecifier.name.getEnd(),\n replacement: NEW_INTERFACE,\n });\n hasInterfaceImport = true;\n }\n }\n\n // Third pass: replace `new EuiTooltipConfig(...)` → spread/cast to interface\n const visitNewExpressions = (node: ts.Node): void => {\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) {\n const args = node.arguments;\n if (args && args.length === 1) {\n const arg = args[0];\n // `new EuiTooltipConfig({ ... })` → `{ ... } as EuiTooltipInterface`\n // But if the argument is just a variable, we keep it: `varName as EuiTooltipInterface`\n const argText = source.slice(arg.getStart(sourceFile), arg.getEnd());\n\n if (ts.isObjectLiteralExpression(arg)) {\n // Inline object: `new EuiTooltipConfig({ x: 1 })` → `{ x: 1 }`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n } else {\n // Variable or expression: `new EuiTooltipConfig(opts)` → `opts`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: argText,\n });\n }\n } else if (!args || args.length === 0) {\n // `new EuiTooltipConfig()` → `{} as EuiTooltipInterface`\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: `{} as ${NEW_INTERFACE}`,\n });\n }\n return; // don't recurse into children we've already replaced\n }\n ts.forEachChild(node, visitNewExpressions);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitNewExpressions(stmt);\n }\n }\n\n // Fourth pass: rename all remaining identifier references (type annotations, etc.)\n const visitRefs = (node: ts.Node): void => {\n if (ts.isImportDeclaration(node)) return;\n // Skip nodes we already covered in new expressions\n if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === OLD_CLASS) return;\n\n if (ts.isIdentifier(node) && node.text === OLD_CLASS) {\n // Ensure this is not part of an import declaration\n if (!isPartOfImport(node)) {\n edits.push({\n start: node.getStart(sourceFile),\n end: node.getEnd(),\n replacement: NEW_INTERFACE,\n });\n }\n }\n ts.forEachChild(node, visitRefs);\n };\n\n for (const stmt of sourceFile.statements) {\n if (!ts.isImportDeclaration(stmt)) {\n visitRefs(stmt);\n }\n }\n\n return applyEdits(source, edits);\n}\n\nfunction isPartOfImport(node: ts.Node): boolean {\n let current: ts.Node | undefined = node.parent;\n while (current) {\n if (ts.isImportDeclaration(current)) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction removeImportSpecifier(\n namedImports: ts.NamedImports,\n specifier: ts.ImportSpecifier,\n sourceFile: ts.SourceFile,\n edits: Edit[],\n): void {\n const elements = namedImports.elements;\n if (elements.length === 1) {\n // Remove the entire import declaration\n const importDecl = namedImports.parent.parent;\n let end = importDecl.getEnd();\n // Also remove trailing newline if present\n const fullText = sourceFile.getFullText();\n if (fullText[end] === '\\n') end++;\n edits.push({\n start: importDecl.getStart(sourceFile),\n end,\n replacement: '',\n });\n } else {\n // Remove just this specifier with surrounding comma/whitespace\n const idx = elements.indexOf(specifier);\n let start: number;\n let end: number;\n if (idx < elements.length - 1) {\n // Not the last → remove from this specifier start to next specifier start\n start = specifier.getStart(sourceFile);\n end = elements[idx + 1].getStart(sourceFile);\n } else {\n // Last element → remove from previous element end to this end\n start = elements[idx - 1].getEnd();\n end = specifier.getEnd();\n }\n edits.push({ start, end, replacement: '' });\n }\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
3108
|
+
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport { EUI_SIGNAL_MAP, EUI_SELECTOR_TO_CLASS } from './signal-map';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\n/**\n * Migrates consumer code that accesses EUI component instances programmatically.\n *\n * When EUI migrated @Input() → input(), @ViewChild() → viewChild(), and\n * @ContentChild() → contentChild(), properties that were plain class fields\n * became signal getters. Consumers who access them via @ViewChild need to\n * change `comp.prop` to `comp.prop()`.\n *\n * This schematic:\n * 1. Finds @ViewChild / @ContentChild fields typed as EUI component classes\n * 2. Resolves untyped @ViewChild('refName') by reading the component template\n * and matching #refName to an EUI element tag/selector\n * 3. Tracks which local variable names hold EUI component references (incl. aliases)\n * 4. Rewrites property accesses on those references: `ref.prop` → `ref.prop()`\n * (only for properties listed in the signal map)\n * 5. Does NOT touch template bindings — those are unaffected by signal migrations\n */\nexport function migrateToSignals(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n let propCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n // Skip spec files — test code may use different patterns\n if (path.endsWith('.spec.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n // Fast bail: file must mention at least one EUI class name or have\n // ViewChild/ContentChild with string refs (which might reference EUI elements)\n if (!hasEuiReference(original) && !hasStringRefQuery(original)) return;\n\n const result = migrateTypeScript(original, path, tree, context); if (result.source !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${result.editCount} signal property access(es) in ${path}`);\n } else {\n tree.overwrite(path, result.source);\n }\n fileCount++;\n propCount += result.editCount;\n }\n });\n\n context.logger.info(`Migrated ${propCount} property access(es) to signal getters in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\n/** Quick check: does the file reference any EUI class name from the signal map? */\nfunction hasEuiReference(source: string): boolean {\n for (const className of Object.keys(EUI_SIGNAL_MAP)) {\n if (source.includes(className)) return true;\n }\n return false;\n}\n\n/** Quick check: does the file have @ViewChild('...') or @ContentChild('...') with string refs? */\nfunction hasStringRefQuery(source: string): boolean {\n return /(@ViewChild|@ContentChild|@ViewChildren|@ContentChildren)\\s*\\(\\s*['\"]/.test(source);\n}\n\ninterface MigrateResult {\n source: string;\n editCount: number;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, tree: Tree, context: SchematicContext): MigrateResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Phase 0: Build template ref map (#refName → EUI class name) from the component's template\n const templateRefMap = buildTemplateRefMap(sourceFile, source, filePath, tree);\n\n // Phase 1: Collect all variables/properties typed as EUI classes\n const euiRefs = collectEuiReferences(sourceFile, source, templateRefMap);\n\n if (euiRefs.size === 0) {\n return { source, editCount: 0 };\n }\n\n // Phase 2: Find property accesses on those references and rewrite signal props\n const visitNode = (node: ts.Node): void => {\n // Match: ref.prop (PropertyAccessExpression)\n if (ts.isPropertyAccessExpression(node)) {\n const rewrite = tryRewritePropertyAccess(node, euiRefs, sourceFile, source);\n if (rewrite) {\n edits.push(rewrite);\n }\n }\n ts.forEachChild(node, visitNode);\n };\n\n ts.forEachChild(sourceFile, visitNode);\n\n if (edits.length === 0) {\n return { source, editCount: 0 };\n }\n\n return {\n source: applyEdits(source, edits),\n editCount: edits.length,\n };\n}\n\n/**\n * Scans the source file for class properties or variables typed as EUI component classes.\n * Returns a map: localName → Set of signal property names.\n *\n * Handles:\n * @ViewChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild(EuiXxxComponent) name!: EuiXxxComponent;\n * @ViewChild('ref') name: EuiXxxComponent;\n * @ContentChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild('ref') name: ElementRef; (resolved via template #ref → EUI selector)\n * someVar: EuiXxxComponent; (typed class field, even without decorator)\n * const alias = this.viewChildRef; (alias tracking)\n */\nfunction collectEuiReferences(\n sourceFile: ts.SourceFile,\n source: string,\n templateRefMap: Map<string, string>,\n): Map<string, ReadonlySet<string>> {\n const refs = new Map<string, ReadonlySet<string>>();\n\n // Pass 1: collect directly-typed references\n const visitDirect = (node: ts.Node): void => {\n // Class property declarations\n if (ts.isPropertyDeclaration(node) && node.name && ts.isIdentifier(node.name)) {\n const euiClass = resolveEuiClassName(node, sourceFile, templateRefMap);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[euiClass]);\n }\n }\n\n // Variable declarations (const x: EuiXxxComponent = ...)\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n // Parameter declarations (method(ref: EuiXxxComponent))\n if (ts.isParameter(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n ts.forEachChild(node, visitDirect);\n };\n\n ts.forEachChild(sourceFile, visitDirect);\n\n // Pass 2: track aliases — variables assigned from already-tracked references\n // e.g. const alias = this.viewChildRef; or const alias = someParam;\n const visitAlias = (node: ts.Node): void => {\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {\n // Skip if already tracked (has explicit type annotation)\n if (refs.has(node.name.text)) {\n ts.forEachChild(node, visitAlias);\n return;\n }\n\n const aliasedRef = resolveRefName(node.initializer);\n if (aliasedRef && refs.has(aliasedRef)) {\n refs.set(node.name.text, refs.get(aliasedRef)!);\n }\n }\n\n ts.forEachChild(node, visitAlias);\n };\n\n ts.forEachChild(sourceFile, visitAlias);\n return refs;\n}\n\n/**\n * Resolves the EUI class name from a property declaration.\n * Checks: type annotation → decorator class argument → template ref map.\n */\nfunction resolveEuiClassName(\n node: ts.PropertyDeclaration,\n sourceFile: ts.SourceFile,\n templateRefMap: Map<string, string>,\n): string | null {\n // Check type annotation first\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n return typeName;\n }\n\n // Check generic type argument: ElementRef<EuiXxxComponent>\n if (node.type && ts.isTypeReferenceNode(node.type) && node.type.typeArguments?.length) {\n const genericArg = getTypeAnnotationName(node.type.typeArguments[0]);\n if (genericArg && EUI_SIGNAL_MAP[genericArg]) {\n return genericArg;\n }\n }\n\n // Check decorator arguments: @ViewChild(EuiXxxComponent) or @ViewChild('refName')\n if (node.modifiers) {\n for (const modifier of node.modifiers) {\n if (!ts.isDecorator(modifier)) continue;\n if (!ts.isCallExpression(modifier.expression)) continue;\n\n const decoratorName = getDecoratorName(modifier.expression);\n if (!decoratorName) continue;\n if (!['ViewChild', 'ViewChildren', 'ContentChild', 'ContentChildren'].includes(decoratorName)) continue;\n\n const args = modifier.expression.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n\n // @ViewChild(EuiXxxComponent) — class reference\n if (ts.isIdentifier(firstArg) && EUI_SIGNAL_MAP[firstArg.text]) {\n return firstArg.text;\n }\n\n // @ViewChild('refName') — string template ref, resolve via template\n if (ts.isStringLiteralLike(firstArg)) {\n const refName = firstArg.text;\n const euiClass = templateRefMap.get(refName);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n return euiClass;\n }\n }\n }\n }\n }\n\n return null;\n}\n\nfunction getDecoratorName(callExpr: ts.CallExpression): string | null {\n if (ts.isIdentifier(callExpr.expression)) {\n return callExpr.expression.text;\n }\n return null;\n}\n\nfunction getTypeAnnotationName(typeNode: ts.TypeNode | undefined): string | null {\n if (!typeNode) return null;\n if (ts.isTypeReferenceNode(typeNode) && ts.isIdentifier(typeNode.typeName)) {\n return typeNode.typeName.text;\n }\n return null;\n}\n\n/**\n * Checks if a property access `ref.prop` should be rewritten to `ref.prop()`.\n *\n * We rewrite if:\n * - `ref` is tracked in euiRefs\n * - `prop` is in the signal set for that EUI class\n * - The access is NOT already a call expression (not `ref.prop()` or `ref.prop(args)`)\n * - The access is NOT a write target (not `ref.prop = value`)\n * - The access is NOT a template binding argument (those are unaffected)\n */\nfunction tryRewritePropertyAccess(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n // Resolve the reference name — handle `this.ref.prop` and `ref.prop`\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Skip if parent is already a call expression on this property: ref.prop(...)\n if (ts.isCallExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if this is the left side of an assignment: ref.prop = value\n if (ts.isBinaryExpression(node.parent) &&\n node.parent.operatorToken.kind === ts.SyntaxKind.EqualsToken &&\n node.parent.left === node) {\n return null;\n }\n\n // Skip if this is a compound assignment: ref.prop += value, ref.prop &&= value, etc.\n if (ts.isBinaryExpression(node.parent) && isAssignmentOperator(node.parent.operatorToken.kind) && node.parent.left === node) {\n return null;\n }\n\n // Skip if this is used with delete: delete ref.prop\n if (ts.isDeleteExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if inside a typeof: typeof ref.prop\n if (ts.isTypeOfExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip property access chains that go deeper: ref.prop.something → ref.prop().something\n // This IS correct — we still want to add ()\n\n // Rewrite: insert () after the property name\n const end = node.name.getEnd();\n return {\n start: end,\n end: end,\n replacement: '()',\n };\n}\n\nfunction isAssignmentOperator(kind: ts.SyntaxKind): boolean {\n return kind >= ts.SyntaxKind.FirstAssignment && kind <= ts.SyntaxKind.LastAssignment;\n}\n\n/**\n * Resolves a reference name from an expression.\n * Handles: `ref`, `this.ref`, `this._ref`\n */\nfunction resolveRefName(expr: ts.Expression): string | null {\n // Direct identifier: ref.prop\n if (ts.isIdentifier(expr)) {\n return expr.text;\n }\n\n // this.ref.prop\n if (ts.isPropertyAccessExpression(expr) && expr.expression.kind === ts.SyntaxKind.ThisKeyword) {\n return expr.name.text;\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Template ref resolution\n// ---------------------------------------------------------------------------\n\n/**\n * Builds a map of template reference variable names (#ref) to EUI class names.\n *\n * Parses the component's template (inline or external) and finds elements like:\n * <eui-alert #myAlert> → myAlert → EuiAlertComponent\n * <input euiAutocomplete #ac> → ac → EuiAutocompleteComponent\n *\n * Returns Map<refName, euiClassName>.\n */\nfunction buildTemplateRefMap(\n sourceFile: ts.SourceFile,\n source: string,\n filePath: string,\n tree: Tree,\n): Map<string, string> {\n const refMap = new Map<string, string>();\n\n // Find @Component decorator\n const componentMeta = findComponentMetadata(sourceFile, source);\n if (!componentMeta) return refMap;\n\n let templateSource: string | null = null;\n\n if (componentMeta.inlineTemplate !== null) {\n templateSource = componentMeta.inlineTemplate;\n } else if (componentMeta.templateUrl) {\n // Resolve templateUrl relative to the TS file\n const dir = filePath.substring(0, filePath.lastIndexOf('/'));\n const templatePath = `${dir}/${componentMeta.templateUrl}`;\n const buffer = tree.read(templatePath);\n if (buffer) {\n templateSource = buffer.toString('utf-8');\n }\n }\n\n if (!templateSource) return refMap;\n\n // Parse the template and collect #refs\n try {\n const parsed = parseTemplate(templateSource, '', { preserveWhitespaces: true });\n collectTemplateRefs(parsed.nodes, refMap);\n } catch {\n // Template parse failure — silently skip (might be malformed or use third-party syntax)\n }\n\n return refMap;\n}\n\n/**\n * Extracts @Component metadata: templateUrl or inline template content.\n */\nfunction findComponentMetadata(\n sourceFile: ts.SourceFile,\n source: string,\n): { templateUrl: string | null; inlineTemplate: string | null } | null {\n let result: { templateUrl: string | null; inlineTemplate: string | null } | null = null;\n\n const visit = (node: ts.Node): void => {\n if (result) return;\n\n if (ts.isDecorator(node) && ts.isCallExpression(node.expression)) {\n const name = getDecoratorName(node.expression);\n if (name !== 'Component') {\n ts.forEachChild(node, visit);\n return;\n }\n\n const args = node.expression.arguments;\n if (args.length === 0 || !ts.isObjectLiteralExpression(args[0])) {\n ts.forEachChild(node, visit);\n return;\n }\n\n const meta: { templateUrl: string | null; inlineTemplate: string | null } = {\n templateUrl: null,\n inlineTemplate: null,\n };\n\n for (const prop of args[0].properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) continue;\n\n if (prop.name.text === 'templateUrl') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.templateUrl = init.text;\n }\n }\n\n if (prop.name.text === 'template') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.inlineTemplate = init.text;\n } else if (ts.isNoSubstitutionTemplateLiteral(init)) {\n meta.inlineTemplate = init.text;\n }\n }\n }\n\n result = meta;\n return;\n }\n\n ts.forEachChild(node, visit);\n };\n\n ts.forEachChild(sourceFile, visit);\n return result;\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\n/**\n * Recursively walks template AST nodes, collecting #refName → EUI class name mappings.\n *\n * For each element with a template reference (#ref), we try to resolve its EUI class:\n * 1. Match element tag name against EUI_SELECTOR_TO_CLASS (e.g. 'eui-alert' → EuiAlertComponent)\n * 2. Match element attributes against attribute selectors (e.g. [euiAutocomplete] → EuiAutocompleteComponent)\n */\nfunction collectTemplateRefs(nodes: TmplAstNode[], refMap: Map<string, string>): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.references && node.references.length > 0) {\n const euiClass = resolveElementToEuiClass(node);\n if (euiClass) {\n for (const ref of node.references) {\n refMap.set(ref.name, euiClass);\n }\n }\n }\n collectTemplateRefs(node.children, refMap);\n }\n }\n}\n\n/**\n * Given a template element, resolves it to an EUI class name by checking:\n * 1. Tag name: <eui-alert> → look up 'eui-alert' in EUI_SELECTOR_TO_CLASS\n * 2. Attribute selectors: <input euiAutocomplete> → look up 'input[euiAutocomplete]' or '[euiAutocomplete]'\n */\nfunction resolveElementToEuiClass(element: TmplAstElement): string | null {\n const tag = element.name;\n\n // Direct tag match: eui-alert, eui-dialog, etc.\n if (EUI_SELECTOR_TO_CLASS[tag]) {\n return EUI_SELECTOR_TO_CLASS[tag];\n }\n\n // Attribute selector match: check all attributes against known patterns\n const allAttrNames = [\n ...element.attributes.map((a) => a.name),\n ...element.inputs.map((i) => i.name),\n ];\n\n for (const attrName of allAttrNames) {\n // Try tag[attr] pattern first (e.g. 'button[euiButton]', 'input[euiAutocomplete]')\n const tagAttrSelector = `${tag}[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[tagAttrSelector]) {\n return EUI_SELECTOR_TO_CLASS[tagAttrSelector];\n }\n\n // Try [attr] pattern (e.g. '[euiTooltip]', '[euiLoading]')\n const attrSelector = `[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[attrSelector]) {\n return EUI_SELECTOR_TO_CLASS[attrSelector];\n }\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Edit helpers\n// ---------------------------------------------------------------------------\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
3109
3109
|
"displayName": "Schema",
|
|
3110
3110
|
"properties": [
|
|
3111
3111
|
{
|
|
@@ -3117,7 +3117,7 @@
|
|
|
3117
3117
|
"indexKey": "",
|
|
3118
3118
|
"optional": true,
|
|
3119
3119
|
"description": "",
|
|
3120
|
-
"line":
|
|
3120
|
+
"line": 9,
|
|
3121
3121
|
"rawdescription": "\n"
|
|
3122
3122
|
},
|
|
3123
3123
|
{
|
|
@@ -3129,7 +3129,7 @@
|
|
|
3129
3129
|
"indexKey": "",
|
|
3130
3130
|
"optional": true,
|
|
3131
3131
|
"description": "",
|
|
3132
|
-
"line":
|
|
3132
|
+
"line": 8,
|
|
3133
3133
|
"rawdescription": "\n"
|
|
3134
3134
|
}
|
|
3135
3135
|
],
|
|
@@ -3147,12 +3147,12 @@
|
|
|
3147
3147
|
},
|
|
3148
3148
|
{
|
|
3149
3149
|
"name": "Schema",
|
|
3150
|
-
"id": "interface-Schema-
|
|
3151
|
-
"file": "packages/core/schematics/migrate-to-
|
|
3150
|
+
"id": "interface-Schema-817c4b549cc3eab9fcf4936acab2e71182d90a4480369f5c003cbbda10792efa587ad99d65acf049f64e7030e32589e4fabc4a6d7a5621e4fe54725ef91dc9e8-21",
|
|
3151
|
+
"file": "packages/core/schematics/migrate-to-standalone/index.ts",
|
|
3152
3152
|
"deprecated": false,
|
|
3153
3153
|
"deprecationMessage": "",
|
|
3154
3154
|
"type": "interface",
|
|
3155
|
-
"sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport { EUI_SIGNAL_MAP, EUI_SELECTOR_TO_CLASS } from './signal-map';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\n/**\n * Migrates consumer code that accesses EUI component instances programmatically.\n *\n * When EUI migrated @Input() → input(), @ViewChild() → viewChild(), and\n * @ContentChild() → contentChild(), properties that were plain class fields\n * became signal getters. Consumers who access them via @ViewChild need to\n * change `comp.prop` to `comp.prop()`.\n *\n * This schematic:\n * 1. Finds @ViewChild / @ContentChild fields typed as EUI component classes\n * 2. Resolves untyped @ViewChild('refName') by reading the component template\n * and matching #refName to an EUI element tag/selector\n * 3. Tracks which local variable names hold EUI component references (incl. aliases)\n * 4. Rewrites property accesses on those references: `ref.prop` → `ref.prop()`\n * (only for properties listed in the signal map)\n * 5. Does NOT touch template bindings — those are unaffected by signal migrations\n */\nexport function migrateToSignals(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n let propCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n // Skip spec files — test code may use different patterns\n if (path.endsWith('.spec.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n // Fast bail: file must mention at least one EUI class name or have\n // ViewChild/ContentChild with string refs (which might reference EUI elements)\n if (!hasEuiReference(original) && !hasStringRefQuery(original)) return;\n\n const result = migrateTypeScript(original, path, tree, context); if (result.source !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${result.editCount} signal property access(es) in ${path}`);\n } else {\n tree.overwrite(path, result.source);\n }\n fileCount++;\n propCount += result.editCount;\n }\n });\n\n context.logger.info(`Migrated ${propCount} property access(es) to signal getters in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\n/** Quick check: does the file reference any EUI class name from the signal map? */\nfunction hasEuiReference(source: string): boolean {\n for (const className of Object.keys(EUI_SIGNAL_MAP)) {\n if (source.includes(className)) return true;\n }\n return false;\n}\n\n/** Quick check: does the file have @ViewChild('...') or @ContentChild('...') with string refs? */\nfunction hasStringRefQuery(source: string): boolean {\n return /(@ViewChild|@ContentChild|@ViewChildren|@ContentChildren)\\s*\\(\\s*['\"]/.test(source);\n}\n\ninterface MigrateResult {\n source: string;\n editCount: number;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, tree: Tree, context: SchematicContext): MigrateResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n\n // Phase 0: Build template ref map (#refName → EUI class name) from the component's template\n const templateRefMap = buildTemplateRefMap(sourceFile, source, filePath, tree);\n\n // Phase 1: Collect all variables/properties typed as EUI classes\n const euiRefs = collectEuiReferences(sourceFile, source, templateRefMap);\n\n if (euiRefs.size === 0) {\n return { source, editCount: 0 };\n }\n\n // Phase 2: Find property accesses on those references and rewrite signal props\n const visitNode = (node: ts.Node): void => {\n // Match: ref.prop (PropertyAccessExpression)\n if (ts.isPropertyAccessExpression(node)) {\n const rewrite = tryRewritePropertyAccess(node, euiRefs, sourceFile, source);\n if (rewrite) {\n edits.push(rewrite);\n }\n }\n ts.forEachChild(node, visitNode);\n };\n\n ts.forEachChild(sourceFile, visitNode);\n\n if (edits.length === 0) {\n return { source, editCount: 0 };\n }\n\n return {\n source: applyEdits(source, edits),\n editCount: edits.length,\n };\n}\n\n/**\n * Scans the source file for class properties or variables typed as EUI component classes.\n * Returns a map: localName → Set of signal property names.\n *\n * Handles:\n * @ViewChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild(EuiXxxComponent) name!: EuiXxxComponent;\n * @ViewChild('ref') name: EuiXxxComponent;\n * @ContentChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild('ref') name: ElementRef; (resolved via template #ref → EUI selector)\n * someVar: EuiXxxComponent; (typed class field, even without decorator)\n * const alias = this.viewChildRef; (alias tracking)\n */\nfunction collectEuiReferences(\n sourceFile: ts.SourceFile,\n source: string,\n templateRefMap: Map<string, string>,\n): Map<string, ReadonlySet<string>> {\n const refs = new Map<string, ReadonlySet<string>>();\n\n // Pass 1: collect directly-typed references\n const visitDirect = (node: ts.Node): void => {\n // Class property declarations\n if (ts.isPropertyDeclaration(node) && node.name && ts.isIdentifier(node.name)) {\n const euiClass = resolveEuiClassName(node, sourceFile, templateRefMap);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[euiClass]);\n }\n }\n\n // Variable declarations (const x: EuiXxxComponent = ...)\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n // Parameter declarations (method(ref: EuiXxxComponent))\n if (ts.isParameter(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n ts.forEachChild(node, visitDirect);\n };\n\n ts.forEachChild(sourceFile, visitDirect);\n\n // Pass 2: track aliases — variables assigned from already-tracked references\n // e.g. const alias = this.viewChildRef; or const alias = someParam;\n const visitAlias = (node: ts.Node): void => {\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {\n // Skip if already tracked (has explicit type annotation)\n if (refs.has(node.name.text)) {\n ts.forEachChild(node, visitAlias);\n return;\n }\n\n const aliasedRef = resolveRefName(node.initializer);\n if (aliasedRef && refs.has(aliasedRef)) {\n refs.set(node.name.text, refs.get(aliasedRef)!);\n }\n }\n\n ts.forEachChild(node, visitAlias);\n };\n\n ts.forEachChild(sourceFile, visitAlias);\n return refs;\n}\n\n/**\n * Resolves the EUI class name from a property declaration.\n * Checks: type annotation → decorator class argument → template ref map.\n */\nfunction resolveEuiClassName(\n node: ts.PropertyDeclaration,\n sourceFile: ts.SourceFile,\n templateRefMap: Map<string, string>,\n): string | null {\n // Check type annotation first\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n return typeName;\n }\n\n // Check generic type argument: ElementRef<EuiXxxComponent>\n if (node.type && ts.isTypeReferenceNode(node.type) && node.type.typeArguments?.length) {\n const genericArg = getTypeAnnotationName(node.type.typeArguments[0]);\n if (genericArg && EUI_SIGNAL_MAP[genericArg]) {\n return genericArg;\n }\n }\n\n // Check decorator arguments: @ViewChild(EuiXxxComponent) or @ViewChild('refName')\n if (node.modifiers) {\n for (const modifier of node.modifiers) {\n if (!ts.isDecorator(modifier)) continue;\n if (!ts.isCallExpression(modifier.expression)) continue;\n\n const decoratorName = getDecoratorName(modifier.expression);\n if (!decoratorName) continue;\n if (!['ViewChild', 'ViewChildren', 'ContentChild', 'ContentChildren'].includes(decoratorName)) continue;\n\n const args = modifier.expression.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n\n // @ViewChild(EuiXxxComponent) — class reference\n if (ts.isIdentifier(firstArg) && EUI_SIGNAL_MAP[firstArg.text]) {\n return firstArg.text;\n }\n\n // @ViewChild('refName') — string template ref, resolve via template\n if (ts.isStringLiteralLike(firstArg)) {\n const refName = firstArg.text;\n const euiClass = templateRefMap.get(refName);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n return euiClass;\n }\n }\n }\n }\n }\n\n return null;\n}\n\nfunction getDecoratorName(callExpr: ts.CallExpression): string | null {\n if (ts.isIdentifier(callExpr.expression)) {\n return callExpr.expression.text;\n }\n return null;\n}\n\nfunction getTypeAnnotationName(typeNode: ts.TypeNode | undefined): string | null {\n if (!typeNode) return null;\n if (ts.isTypeReferenceNode(typeNode) && ts.isIdentifier(typeNode.typeName)) {\n return typeNode.typeName.text;\n }\n return null;\n}\n\n/**\n * Checks if a property access `ref.prop` should be rewritten to `ref.prop()`.\n *\n * We rewrite if:\n * - `ref` is tracked in euiRefs\n * - `prop` is in the signal set for that EUI class\n * - The access is NOT already a call expression (not `ref.prop()` or `ref.prop(args)`)\n * - The access is NOT a write target (not `ref.prop = value`)\n * - The access is NOT a template binding argument (those are unaffected)\n */\nfunction tryRewritePropertyAccess(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n // Resolve the reference name — handle `this.ref.prop` and `ref.prop`\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Skip if parent is already a call expression on this property: ref.prop(...)\n if (ts.isCallExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if this is the left side of an assignment: ref.prop = value\n if (ts.isBinaryExpression(node.parent) &&\n node.parent.operatorToken.kind === ts.SyntaxKind.EqualsToken &&\n node.parent.left === node) {\n return null;\n }\n\n // Skip if this is a compound assignment: ref.prop += value, ref.prop &&= value, etc.\n if (ts.isBinaryExpression(node.parent) && isAssignmentOperator(node.parent.operatorToken.kind) && node.parent.left === node) {\n return null;\n }\n\n // Skip if this is used with delete: delete ref.prop\n if (ts.isDeleteExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if inside a typeof: typeof ref.prop\n if (ts.isTypeOfExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip property access chains that go deeper: ref.prop.something → ref.prop().something\n // This IS correct — we still want to add ()\n\n // Rewrite: insert () after the property name\n const end = node.name.getEnd();\n return {\n start: end,\n end: end,\n replacement: '()',\n };\n}\n\nfunction isAssignmentOperator(kind: ts.SyntaxKind): boolean {\n return kind >= ts.SyntaxKind.FirstAssignment && kind <= ts.SyntaxKind.LastAssignment;\n}\n\n/**\n * Resolves a reference name from an expression.\n * Handles: `ref`, `this.ref`, `this._ref`\n */\nfunction resolveRefName(expr: ts.Expression): string | null {\n // Direct identifier: ref.prop\n if (ts.isIdentifier(expr)) {\n return expr.text;\n }\n\n // this.ref.prop\n if (ts.isPropertyAccessExpression(expr) && expr.expression.kind === ts.SyntaxKind.ThisKeyword) {\n return expr.name.text;\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Template ref resolution\n// ---------------------------------------------------------------------------\n\n/**\n * Builds a map of template reference variable names (#ref) to EUI class names.\n *\n * Parses the component's template (inline or external) and finds elements like:\n * <eui-alert #myAlert> → myAlert → EuiAlertComponent\n * <input euiAutocomplete #ac> → ac → EuiAutocompleteComponent\n *\n * Returns Map<refName, euiClassName>.\n */\nfunction buildTemplateRefMap(\n sourceFile: ts.SourceFile,\n source: string,\n filePath: string,\n tree: Tree,\n): Map<string, string> {\n const refMap = new Map<string, string>();\n\n // Find @Component decorator\n const componentMeta = findComponentMetadata(sourceFile, source);\n if (!componentMeta) return refMap;\n\n let templateSource: string | null = null;\n\n if (componentMeta.inlineTemplate !== null) {\n templateSource = componentMeta.inlineTemplate;\n } else if (componentMeta.templateUrl) {\n // Resolve templateUrl relative to the TS file\n const dir = filePath.substring(0, filePath.lastIndexOf('/'));\n const templatePath = `${dir}/${componentMeta.templateUrl}`;\n const buffer = tree.read(templatePath);\n if (buffer) {\n templateSource = buffer.toString('utf-8');\n }\n }\n\n if (!templateSource) return refMap;\n\n // Parse the template and collect #refs\n try {\n const parsed = parseTemplate(templateSource, '', { preserveWhitespaces: true });\n collectTemplateRefs(parsed.nodes, refMap);\n } catch {\n // Template parse failure — silently skip (might be malformed or use third-party syntax)\n }\n\n return refMap;\n}\n\n/**\n * Extracts @Component metadata: templateUrl or inline template content.\n */\nfunction findComponentMetadata(\n sourceFile: ts.SourceFile,\n source: string,\n): { templateUrl: string | null; inlineTemplate: string | null } | null {\n let result: { templateUrl: string | null; inlineTemplate: string | null } | null = null;\n\n const visit = (node: ts.Node): void => {\n if (result) return;\n\n if (ts.isDecorator(node) && ts.isCallExpression(node.expression)) {\n const name = getDecoratorName(node.expression);\n if (name !== 'Component') {\n ts.forEachChild(node, visit);\n return;\n }\n\n const args = node.expression.arguments;\n if (args.length === 0 || !ts.isObjectLiteralExpression(args[0])) {\n ts.forEachChild(node, visit);\n return;\n }\n\n const meta: { templateUrl: string | null; inlineTemplate: string | null } = {\n templateUrl: null,\n inlineTemplate: null,\n };\n\n for (const prop of args[0].properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) continue;\n\n if (prop.name.text === 'templateUrl') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.templateUrl = init.text;\n }\n }\n\n if (prop.name.text === 'template') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.inlineTemplate = init.text;\n } else if (ts.isNoSubstitutionTemplateLiteral(init)) {\n meta.inlineTemplate = init.text;\n }\n }\n }\n\n result = meta;\n return;\n }\n\n ts.forEachChild(node, visit);\n };\n\n ts.forEachChild(sourceFile, visit);\n return result;\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\n/**\n * Recursively walks template AST nodes, collecting #refName → EUI class name mappings.\n *\n * For each element with a template reference (#ref), we try to resolve its EUI class:\n * 1. Match element tag name against EUI_SELECTOR_TO_CLASS (e.g. 'eui-alert' → EuiAlertComponent)\n * 2. Match element attributes against attribute selectors (e.g. [euiAutocomplete] → EuiAutocompleteComponent)\n */\nfunction collectTemplateRefs(nodes: TmplAstNode[], refMap: Map<string, string>): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.references && node.references.length > 0) {\n const euiClass = resolveElementToEuiClass(node);\n if (euiClass) {\n for (const ref of node.references) {\n refMap.set(ref.name, euiClass);\n }\n }\n }\n collectTemplateRefs(node.children, refMap);\n }\n }\n}\n\n/**\n * Given a template element, resolves it to an EUI class name by checking:\n * 1. Tag name: <eui-alert> → look up 'eui-alert' in EUI_SELECTOR_TO_CLASS\n * 2. Attribute selectors: <input euiAutocomplete> → look up 'input[euiAutocomplete]' or '[euiAutocomplete]'\n */\nfunction resolveElementToEuiClass(element: TmplAstElement): string | null {\n const tag = element.name;\n\n // Direct tag match: eui-alert, eui-dialog, etc.\n if (EUI_SELECTOR_TO_CLASS[tag]) {\n return EUI_SELECTOR_TO_CLASS[tag];\n }\n\n // Attribute selector match: check all attributes against known patterns\n const allAttrNames = [\n ...element.attributes.map((a) => a.name),\n ...element.inputs.map((i) => i.name),\n ];\n\n for (const attrName of allAttrNames) {\n // Try tag[attr] pattern first (e.g. 'button[euiButton]', 'input[euiAutocomplete]')\n const tagAttrSelector = `${tag}[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[tagAttrSelector]) {\n return EUI_SELECTOR_TO_CLASS[tagAttrSelector];\n }\n\n // Try [attr] pattern (e.g. '[euiTooltip]', '[euiLoading]')\n const attrSelector = `[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[attrSelector]) {\n return EUI_SELECTOR_TO_CLASS[attrSelector];\n }\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Edit helpers\n// ---------------------------------------------------------------------------\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
|
|
3155
|
+
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface ModuleMapping {\n importPath: string;\n selectors: Record<string, string>;\n}\n\nconst MODULE_MAPPINGS: Record<string, ModuleMapping> = {\n EuiAccordionModule: {\n importPath: '@eui/components/eui-accordion',\n selectors: {\n 'eui-accordion': 'EuiAccordionComponent',\n 'eui-accordion-item': 'EuiAccordionItemComponent',\n euiAccordionItemHeader: 'EuiAccordionItemHeaderDirective',\n },\n },\n EuiAlertModule: {\n importPath: '@eui/components/eui-alert',\n selectors: {\n 'eui-alert': 'EuiAlertComponent',\n euiAlert: 'EuiAlertComponent',\n 'eui-alert-title': 'EuiAlertTitleComponent',\n },\n },\n EuiAutocompleteModule: {\n importPath: '@eui/components/eui-autocomplete',\n selectors: {\n 'eui-autocomplete': 'EuiAutocompleteComponent',\n euiAutocomplete: 'EuiAutocompleteComponent',\n 'eui-autocomplete-option': 'EuiAutocompleteOptionComponent',\n 'eui-autocomplete-option-group': 'EuiAutocompleteOptionGroupComponent',\n 'eui-autocomplete-panel': 'EuiAutocompletePanelComponent',\n },\n },\n EuiAvatarModule: {\n importPath: '@eui/components/eui-avatar',\n selectors: {\n 'eui-avatar': 'EuiAvatarComponent',\n euiAvatar: 'EuiAvatarComponent',\n },\n },\n EuiBadgeModule: {\n importPath: '@eui/components/eui-badge',\n selectors: {\n 'eui-badge': 'EuiBadgeComponent',\n euiBadge: 'EuiBadgeComponent',\n },\n },\n EuiBlockContentModule: {\n importPath: '@eui/components/eui-block-content',\n selectors: {\n 'eui-block-content': 'EuiBlockContentComponent',\n },\n },\n EuiBreadcrumbModule: {\n importPath: '@eui/components/eui-breadcrumb',\n selectors: {\n 'eui-breadcrumb': 'EuiBreadcrumbComponent',\n },\n },\n EuiButtonModule: {\n importPath: '@eui/components/eui-button',\n selectors: {\n euiButton: 'EuiButtonComponent',\n },\n },\n EuiButtonGroupModule: {\n importPath: '@eui/components/eui-button-group',\n selectors: {\n 'eui-button-group': 'EuiButtonGroupComponent',\n },\n },\n EuiCardModule: {\n importPath: '@eui/components/eui-card',\n selectors: {\n 'eui-card': 'EuiCardComponent',\n 'eui-card-header': 'EuiCardHeaderComponent',\n 'eui-card-header-title': 'EuiCardHeaderTitleComponent',\n 'eui-card-content': 'EuiCardContentComponent',\n 'eui-card-footer': 'EuiCardFooterComponent',\n 'eui-card-media': 'EuiCardMediaComponent',\n },\n },\n EuiChipModule: {\n importPath: '@eui/components/eui-chip',\n selectors: {\n 'eui-chip': 'EuiChipComponent',\n euiChip: 'EuiChipComponent',\n },\n },\n EuiChipListModule: {\n importPath: '@eui/components/eui-chip-list',\n selectors: {\n 'eui-chip-list': 'EuiChipListComponent',\n },\n },\n EuiChipGroupModule: {\n importPath: '@eui/components/eui-chip-group',\n selectors: {\n 'eui-chip-group': 'EuiChipGroupComponent',\n },\n },\n EuiDashboardCardModule: {\n importPath: '@eui/components/eui-dashboard-card',\n selectors: {\n 'eui-dashboard-card': 'EuiDashboardCardComponent',\n 'eui-dashboard-card-content': 'EuiDashboardCardContentComponent',\n 'eui-dashboard-card-content-header': 'EuiDashboardCardContentHeaderComponent',\n 'eui-dashboard-card-content-body': 'EuiDashboardCardContentBodyComponent',\n 'eui-dashboard-card-content-footer': 'EuiDashboardCardContentFooterComponent',\n },\n },\n EuiDashboardButtonModule: {\n importPath: '@eui/components/eui-dashboard-card',\n selectors: {\n 'eui-dashboard-card': 'EuiDashboardCardComponent',\n 'eui-dashboard-card-content': 'EuiDashboardCardContentComponent',\n 'eui-dashboard-card-content-header': 'EuiDashboardCardContentHeaderComponent',\n 'eui-dashboard-card-content-body': 'EuiDashboardCardContentBodyComponent',\n 'eui-dashboard-card-content-footer': 'EuiDashboardCardContentFooterComponent',\n },\n },\n EuiDatepickerModule: {\n importPath: '@eui/components/eui-datepicker',\n selectors: {\n 'eui-datepicker': 'EuiDatepickerComponent',\n },\n },\n EuiDateRangeSelectorModule: {\n importPath: '@eui/components/eui-date-range-selector',\n selectors: {\n 'eui-date-range-selector': 'EuiDateRangeSelectorComponent',\n },\n },\n EuiDialogModule: {\n importPath: '@eui/components/eui-dialog',\n selectors: {\n 'eui-dialog': 'EuiDialogComponent',\n 'eui-dialog-header': 'EuiDialogHeaderDirective',\n 'eui-dialog-footer': 'EuiDialogFooterDirective',\n 'eui-dialog-container': 'EuiDialogContainerComponent',\n },\n },\n EuiDisableContentModule: {\n importPath: '@eui/components/eui-disable-content',\n selectors: {\n 'eui-disable-content': 'EuiDisableContentComponent',\n },\n },\n EuiDiscussionThreadModule: {\n importPath: '@eui/components/eui-discussion-thread',\n selectors: {\n 'eui-discussion-thread': 'EuiDiscussionThreadComponent',\n 'eui-discussion-thread-item': 'EuiDiscussionThreadItemComponent',\n },\n },\n EuiDropdownModule: {\n importPath: '@eui/components/eui-dropdown',\n selectors: {\n 'eui-dropdown': 'EuiDropdownComponent',\n },\n },\n EuiFeedbackMessageModule: {\n importPath: '@eui/components/eui-feedback-message',\n selectors: {\n 'eui-feedback-message': 'EuiFeedbackMessageComponent',\n },\n },\n EuiFieldsetModule: {\n importPath: '@eui/components/eui-fieldset',\n selectors: {\n 'eui-fieldset': 'EuiFieldsetComponent',\n euiFieldsetLabelRightContent: 'EuiFieldsetLabelRightContentTagDirective',\n euiFieldsetLabelExtraContent: 'EuiFieldsetLabelExtraContentTagDirective',\n },\n },\n EuiFileUploadModule: {\n importPath: '@eui/components/eui-file-upload',\n selectors: {\n 'eui-file-upload': 'EuiFileUploadComponent',\n },\n },\n EuiGrowlModule: {\n importPath: '@eui/components/eui-growl',\n selectors: {\n 'eui-growl': 'EuiGrowlComponent',\n },\n },\n EuiIconModule: {\n importPath: '@eui/components/eui-icon',\n selectors: {\n 'eui-icon-svg': 'EuiIconSvgComponent',\n euiIconSvg: 'EuiIconSvgComponent',\n },\n },\n EuiIconButtonModule: {\n importPath: '@eui/components/eui-icon-button',\n selectors: {\n 'eui-icon-button': 'EuiIconButtonComponent',\n },\n },\n EuiIconToggleModule: {\n importPath: '@eui/components/eui-icon-toggle',\n selectors: {\n 'eui-icon-toggle': 'EuiIconToggleComponent',\n },\n },\n EuiInputCheckboxModule: {\n importPath: '@eui/components/eui-input-checkbox',\n selectors: {\n euiInputCheckBox: 'EuiInputCheckboxComponent',\n },\n },\n EuiInputGroupModule: {\n importPath: '@eui/components/eui-input-group',\n selectors: {\n euiInputGroup: 'EuiInputGroupComponent',\n 'eui-input-group-addon': 'EuiInputGroupAddOnComponent',\n euiInputGroupAddOn: 'EuiInputGroupAddOnComponent',\n 'eui-input-group-addon-item': 'EuiInputGroupAddOnItemComponent',\n euiInputGroupAddOnItem: 'EuiInputGroupAddOnItemComponent',\n },\n },\n EuiInputNumberModule: {\n importPath: '@eui/components/eui-input-number',\n selectors: {\n euiInputNumber: 'EuiInputNumberComponent',\n },\n },\n EuiInputRadioModule: {\n importPath: '@eui/components/eui-input-radio',\n selectors: {\n euiInputRadio: 'EuiInputRadioComponent',\n },\n },\n EuiInputTextModule: {\n importPath: '@eui/components/eui-input-text',\n selectors: {\n euiInputText: 'EuiInputTextComponent',\n },\n },\n EuiLabelModule: {\n importPath: '@eui/components/eui-label',\n selectors: {\n 'eui-label': 'EuiLabelComponent',\n euiLabel: 'EuiLabelComponent',\n },\n },\n EuiListModule: {\n importPath: '@eui/components/eui-list',\n selectors: {\n 'eui-list': 'EuiListComponent',\n euiList: 'EuiListComponent',\n 'eui-list-item': 'EuiListItemComponent',\n euiListItem: 'EuiListItemComponent',\n },\n },\n EuiMenuModule: {\n importPath: '@eui/components/eui-menu',\n selectors: {\n 'eui-menu': 'EuiMenuComponent',\n 'eui-menu-item': 'EuiMenuItemComponent',\n },\n },\n EuiMessageBoxModule: {\n importPath: '@eui/components/eui-message-box',\n selectors: {\n 'eui-message-box': 'EuiMessageBoxComponent',\n 'eui-message-box-footer': 'EuiMessageBoxFooterDirective',\n },\n },\n EuiOverlayModule: {\n importPath: '@eui/components/eui-overlay',\n selectors: {\n 'eui-overlay': 'EuiOverlayComponent',\n },\n },\n EuiPageModule: {\n importPath: '@eui/components/eui-page',\n selectors: {\n 'eui-page': 'EuiPageComponent',\n },\n },\n EuiPaginatorModule: {\n importPath: '@eui/components/eui-paginator',\n selectors: {\n 'eui-paginator': 'EuiPaginatorComponent',\n },\n },\n EuiPopoverModule: {\n importPath: '@eui/components/eui-popover',\n selectors: {\n 'eui-popover': 'EuiPopoverComponent',\n },\n },\n EuiProgressBarModule: {\n importPath: '@eui/components/eui-progress-bar',\n selectors: {\n 'eui-progress-bar': 'EuiProgressBarComponent',\n },\n },\n EuiProgressCircleModule: {\n importPath: '@eui/components/eui-progress-circle',\n selectors: {\n 'eui-progress-circle': 'EuiProgressCircleComponent',\n },\n },\n EuiSelectModule: {\n importPath: '@eui/components/eui-select',\n selectors: {\n euiSelect: 'EuiSelectComponent',\n },\n },\n EuiSidebarMenuModule: {\n importPath: '@eui/components/eui-sidebar-menu',\n selectors: {\n 'eui-sidebar-menu': 'EuiSidebarMenuComponent',\n },\n },\n EuiSkeletonModule: {\n importPath: '@eui/components/eui-skeleton',\n selectors: {\n 'eui-skeleton': 'EuiSkeletonComponent',\n },\n },\n EuiSlideToggleModule: {\n importPath: '@eui/components/eui-slide-toggle',\n selectors: {\n 'eui-slide-toggle': 'EuiSlideToggleComponent',\n },\n },\n EuiTableModule: {\n importPath: '@eui/components/eui-table',\n selectors: {\n 'eui-table': 'EuiTableComponent',\n euiTable: 'EuiTableComponent',\n 'eui-table-filter': 'EuiTableFilterComponent',\n isSortable: 'EuiTableSortableColComponent',\n isStickyCol: 'EuiTableStickyColDirective',\n isHeaderSelectable: 'EuiTableSelectableHeaderComponent',\n isDataSelectable: 'EuiTableSelectableRowComponent',\n isExpandableRow: 'EuiTableExpandableRowDirective',\n },\n },\n EuiTableV2Module: {\n importPath: '@eui/components/eui-table',\n selectors: {\n 'eui-table': 'EuiTableComponent',\n euiTable: 'EuiTableComponent',\n 'eui-table-filter': 'EuiTableFilterComponent',\n isSortable: 'EuiTableSortableColComponent',\n isStickyCol: 'EuiTableStickyColDirective',\n isHeaderSelectable: 'EuiTableSelectableHeaderComponent',\n isDataSelectable: 'EuiTableSelectableRowComponent',\n isExpandableRow: 'EuiTableExpandableRowDirective',\n },\n },\n EuiTabsModule: {\n importPath: '@eui/components/eui-tabs',\n selectors: {\n 'eui-tabs': 'EuiTabsComponent',\n 'eui-tab': 'EuiTabComponent',\n 'eui-tab-header': 'EuiTabHeaderComponent',\n 'eui-tab-body': 'EuiTabBodyComponent',\n },\n },\n EuiTextAreaModule: {\n importPath: '@eui/components/eui-textarea',\n selectors: {\n euiTextArea: 'EuiTextareaComponent',\n },\n },\n EuiTimelineModule: {\n importPath: '@eui/components/eui-timeline',\n selectors: {\n 'eui-timeline': 'EuiTimelineComponent',\n 'eui-timeline-item': 'EuiTimelineItemComponent',\n },\n },\n EuiTimepickerModule: {\n importPath: '@eui/components/eui-timepicker',\n selectors: {\n 'eui-timepicker': 'EuiTimepickerComponent',\n },\n },\n EuiTreeModule: {\n importPath: '@eui/components/eui-tree',\n selectors: {\n 'eui-tree': 'EuiTreeComponent',\n },\n },\n EuiTreeListModule: {\n importPath: '@eui/components/eui-tree-list',\n selectors: {\n 'eui-tree-list': 'EuiTreeListComponent',\n 'eui-tree-list-item': 'EuiTreeListItemComponent',\n },\n },\n EuiUserProfileModule: {\n importPath: '@eui/components/eui-user-profile',\n selectors: {\n 'eui-user-profile': 'EuiUserProfileComponent',\n },\n },\n EuiWizardModule: {\n importPath: '@eui/components/eui-wizard',\n selectors: {\n 'eui-wizard': 'EuiWizardComponent',\n 'eui-wizard-step': 'EuiWizardStepComponent',\n },\n },\n EuiTooltipDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiTooltip: 'EuiTooltipDirective',\n },\n },\n EuiTemplateDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiTemplate: 'EuiTemplateDirective',\n },\n },\n EuiResizableDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiResizable: 'EuiResizableDirective',\n 'eui-resizable': 'EuiResizableComponent',\n },\n },\n EuiMaxLengthDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiEditorMaxlength: 'EuiMaxLengthDirective',\n },\n },\n EuiTruncatePipeModule: {\n importPath: '@eui/components/pipes',\n selectors: {\n euiTruncate: 'EuiTruncatePipe',\n },\n },\n EuiLayoutModule: {\n importPath: '@eui/components/layout',\n selectors: {\n 'eui-app': 'EuiAppComponent',\n 'eui-header': 'EuiHeaderComponent',\n 'eui-footer': 'EuiFooterComponent',\n 'eui-toolbar': 'EuiToolbarComponent',\n 'eui-sidebar-toggle': 'EuiSidebarToggleComponent',\n },\n },\n};\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nexport function migrateToStandalone(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n const allModuleNames = Object.keys(MODULE_MAPPINGS);\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const source = buffer.toString('utf-8');\n if (!allModuleNames.some((m) => source.includes(m))) return;\n\n const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.Latest, true);\n const componentDecorators = findComponentDecorators(sourceFile);\n\n for (const decorator of componentDecorators) {\n const importsNode = findImportsArrayNode(decorator);\n if (!importsNode) continue;\n\n const currentSource = tree.read(path)!.toString('utf-8');\n const modulesInArray = allModuleNames.filter((m) => hasModuleInArray(importsNode, m, source));\n if (modulesInArray.length === 0) continue;\n\n const templateSelectors = getTemplateSelectors(tree, path, decorator, source);\n const replacements = buildReplacements(modulesInArray, templateSelectors);\n if (replacements.size === 0) continue;\n\n const result = applyReplacements(currentSource, path, replacements);\n if (options.dryRun) {\n logDryRun(context, `Would replace module imports with standalone imports in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n }\n });\n\n context.logger.info('Migration to standalone imports complete.');\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction buildReplacements(moduleNames: string[], templateSelectors: Set<string>): Map<string, { components: string[]; importPath: string }> {\n const map = new Map<string, { components: string[]; importPath: string }>();\n\n for (const moduleName of moduleNames) {\n const mapping = MODULE_MAPPINGS[moduleName];\n const components: string[] = [];\n\n for (const [selector, component] of Object.entries(mapping.selectors)) {\n if (templateSelectors.has(selector)) {\n components.push(component);\n }\n }\n\n if (components.length > 0) {\n map.set(moduleName, { components: [...new Set(components)].sort(), importPath: mapping.importPath });\n }\n }\n\n return map;\n}\n\nfunction findComponentDecorators(sourceFile: ts.SourceFile): ts.Decorator[] {\n const decorators: ts.Decorator[] = [];\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (decs) {\n for (const dec of decs) {\n if (ts.isCallExpression(dec.expression) && ts.isIdentifier(dec.expression.expression) && dec.expression.expression.text === 'Component') {\n decorators.push(dec);\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n return decorators;\n}\n\nfunction findImportsArrayNode(decorator: ts.Decorator): ts.ArrayLiteralExpression | undefined {\n const call = decorator.expression as ts.CallExpression;\n const metadata = call.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) return undefined;\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'imports') {\n if (ts.isArrayLiteralExpression(prop.initializer)) {\n return prop.initializer;\n }\n }\n }\n return undefined;\n}\n\nfunction hasModuleInArray(array: ts.ArrayLiteralExpression, moduleName: string, source: string): boolean {\n return array.elements.some((el) => source.slice(el.getStart(), el.getEnd()).trim() === moduleName);\n}\n\nfunction getTemplateSelectors(tree: Tree, tsPath: string, decorator: ts.Decorator, source: string): Set<string> {\n const call = decorator.expression as ts.CallExpression;\n const metadata = call.arguments[0] as ts.ObjectLiteralExpression;\n const allSelectors = Object.values(MODULE_MAPPINGS).flatMap((m) => Object.keys(m.selectors));\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'template') {\n const init = prop.initializer;\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n return findSelectorsInTemplate(init.text, allSelectors);\n }\n }\n }\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'templateUrl') {\n if (ts.isStringLiteral(prop.initializer)) {\n const dir = tsPath.substring(0, tsPath.lastIndexOf('/'));\n const templateBuffer = tree.read(`${dir}/${prop.initializer.text}`);\n if (templateBuffer) {\n return findSelectorsInTemplate(templateBuffer.toString('utf-8'), allSelectors);\n }\n }\n }\n }\n\n return new Set();\n}\n\nfunction findSelectorsInTemplate(html: string, knownSelectors: string[]): Set<string> {\n const selectors = new Set<string>();\n const parsed = parseTemplate(html, '', { preserveWhitespaces: true });\n\n const visit = (nodes: TmplAstNode[]): void => {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (knownSelectors.includes(node.name)) selectors.add(node.name);\n for (const attr of node.attributes) {\n if (knownSelectors.includes(attr.name)) selectors.add(attr.name);\n }\n visit(node.children);\n }\n }\n };\n visit(parsed.nodes);\n return selectors;\n}\n\nfunction applyReplacements(source: string, filePath: string, replacements: Map<string, { components: string[]; importPath: string }>): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n let result = replaceInImportsArray(source, sourceFile, replacements);\n result = updateEsImports(result, filePath, replacements);\n return result;\n}\n\nfunction replaceInImportsArray(source: string, sourceFile: ts.SourceFile, replacements: Map<string, { components: string[]; importPath: string }>): string {\n let result = source;\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const newElements = prop.initializer.elements\n .map((el) => {\n const text = result.slice(el.getStart(sourceFile), el.getEnd()).trim();\n const replacement = replacements.get(text);\n return replacement ? replacement.components.join(', ') : text;\n })\n .join(', ');\n result = result.slice(0, prop.initializer.getStart(sourceFile) + 1) + newElements + result.slice(prop.initializer.getEnd() - 1);\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n return result;\n}\n\nfunction updateEsImports(source: string, filePath: string, replacements: Map<string, { components: string[]; importPath: string }>): string {\n let result = source;\n\n for (const [moduleName, { components, importPath }] of replacements) {\n const sf = ts.createSourceFile(filePath, result, ts.ScriptTarget.Latest, true);\n\n for (const stmt of sf.statements) {\n if (!ts.isImportDeclaration(stmt) || !stmt.importClause?.namedBindings || !ts.isNamedImports(stmt.importClause.namedBindings)) continue;\n const namedBindings = stmt.importClause.namedBindings;\n const importNames = namedBindings.elements.map((el) => el.name.text);\n if (!importNames.includes(moduleName)) continue;\n\n const moduleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n const remaining = importNames.filter((n) => n !== moduleName);\n const toAdd = components.filter((c) => !importNames.includes(c));\n\n if (moduleSpecifier === importPath) {\n const newNames = [...remaining, ...toAdd].sort();\n const newClause = `{ ${newNames.join(', ')} }`;\n result = result.slice(0, namedBindings.getStart(sf)) + newClause + result.slice(namedBindings.getEnd());\n } else {\n if (remaining.length > 0) {\n const newClause = `{ ${remaining.join(', ')} }`;\n result = result.slice(0, namedBindings.getStart(sf)) + newClause + result.slice(namedBindings.getEnd());\n } else {\n result = result.slice(0, stmt.getStart(sf)) + result.slice(stmt.getEnd()).replace(/^\\r?\\n/, '');\n }\n\n if (toAdd.length > 0) {\n const updatedSf = ts.createSourceFile(filePath, result, ts.ScriptTarget.Latest, true);\n const existing = updatedSf.statements.find(\n (s) => ts.isImportDeclaration(s) && ts.isStringLiteral(s.moduleSpecifier) && s.moduleSpecifier.text === importPath,\n ) as ts.ImportDeclaration | undefined;\n\n if (existing?.importClause?.namedBindings && ts.isNamedImports(existing.importClause.namedBindings)) {\n const existingNames = existing.importClause.namedBindings.elements.map((el) => el.name.text);\n const allNames = [...new Set([...existingNames, ...toAdd])].sort();\n const newClause = `{ ${allNames.join(', ')} }`;\n result = result.slice(0, existing.importClause.namedBindings.getStart(updatedSf)) + newClause + result.slice(existing.importClause.namedBindings.getEnd());\n } else {\n const newImport = `import { ${toAdd.join(', ')} } from '${importPath}';\\n`;\n result = newImport + result;\n }\n }\n }\n break;\n }\n }\n\n return result;\n}\n",
|
|
3156
3156
|
"displayName": "Schema",
|
|
3157
3157
|
"properties": [
|
|
3158
3158
|
{
|
|
@@ -3164,7 +3164,7 @@
|
|
|
3164
3164
|
"indexKey": "",
|
|
3165
3165
|
"optional": true,
|
|
3166
3166
|
"description": "",
|
|
3167
|
-
"line":
|
|
3167
|
+
"line": 460,
|
|
3168
3168
|
"rawdescription": "\n"
|
|
3169
3169
|
},
|
|
3170
3170
|
{
|
|
@@ -3176,7 +3176,7 @@
|
|
|
3176
3176
|
"indexKey": "",
|
|
3177
3177
|
"optional": true,
|
|
3178
3178
|
"description": "",
|
|
3179
|
-
"line":
|
|
3179
|
+
"line": 459,
|
|
3180
3180
|
"rawdescription": "\n"
|
|
3181
3181
|
}
|
|
3182
3182
|
],
|
|
@@ -3194,12 +3194,12 @@
|
|
|
3194
3194
|
},
|
|
3195
3195
|
{
|
|
3196
3196
|
"name": "Schema",
|
|
3197
|
-
"id": "interface-Schema-
|
|
3198
|
-
"file": "packages/core/schematics/migrate-
|
|
3197
|
+
"id": "interface-Schema-90e62c16ce9ada881e8d434336bb633dae9745236106ddf60964afbd11de6aa579255a13d6036b384281860eb6ed2ee329194b519c51fdaf20f79bc511d0f64f-22",
|
|
3198
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
3199
3199
|
"deprecated": false,
|
|
3200
3200
|
"deprecationMessage": "",
|
|
3201
3201
|
"type": "interface",
|
|
3202
|
-
"sourceCode": "import { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface ModuleMapping {\n importPath: string;\n selectors: Record<string, string>;\n}\n\nconst MODULE_MAPPINGS: Record<string, ModuleMapping> = {\n EuiAccordionModule: {\n importPath: '@eui/components/eui-accordion',\n selectors: {\n 'eui-accordion': 'EuiAccordionComponent',\n 'eui-accordion-item': 'EuiAccordionItemComponent',\n euiAccordionItemHeader: 'EuiAccordionItemHeaderDirective',\n },\n },\n EuiAlertModule: {\n importPath: '@eui/components/eui-alert',\n selectors: {\n 'eui-alert': 'EuiAlertComponent',\n euiAlert: 'EuiAlertComponent',\n 'eui-alert-title': 'EuiAlertTitleComponent',\n },\n },\n EuiAutocompleteModule: {\n importPath: '@eui/components/eui-autocomplete',\n selectors: {\n 'eui-autocomplete': 'EuiAutocompleteComponent',\n euiAutocomplete: 'EuiAutocompleteComponent',\n 'eui-autocomplete-option': 'EuiAutocompleteOptionComponent',\n 'eui-autocomplete-option-group': 'EuiAutocompleteOptionGroupComponent',\n 'eui-autocomplete-panel': 'EuiAutocompletePanelComponent',\n },\n },\n EuiAvatarModule: {\n importPath: '@eui/components/eui-avatar',\n selectors: {\n 'eui-avatar': 'EuiAvatarComponent',\n euiAvatar: 'EuiAvatarComponent',\n },\n },\n EuiBadgeModule: {\n importPath: '@eui/components/eui-badge',\n selectors: {\n 'eui-badge': 'EuiBadgeComponent',\n euiBadge: 'EuiBadgeComponent',\n },\n },\n EuiBlockContentModule: {\n importPath: '@eui/components/eui-block-content',\n selectors: {\n 'eui-block-content': 'EuiBlockContentComponent',\n },\n },\n EuiBreadcrumbModule: {\n importPath: '@eui/components/eui-breadcrumb',\n selectors: {\n 'eui-breadcrumb': 'EuiBreadcrumbComponent',\n },\n },\n EuiButtonModule: {\n importPath: '@eui/components/eui-button',\n selectors: {\n euiButton: 'EuiButtonComponent',\n },\n },\n EuiButtonGroupModule: {\n importPath: '@eui/components/eui-button-group',\n selectors: {\n 'eui-button-group': 'EuiButtonGroupComponent',\n },\n },\n EuiCardModule: {\n importPath: '@eui/components/eui-card',\n selectors: {\n 'eui-card': 'EuiCardComponent',\n 'eui-card-header': 'EuiCardHeaderComponent',\n 'eui-card-header-title': 'EuiCardHeaderTitleComponent',\n 'eui-card-content': 'EuiCardContentComponent',\n 'eui-card-footer': 'EuiCardFooterComponent',\n 'eui-card-media': 'EuiCardMediaComponent',\n },\n },\n EuiChipModule: {\n importPath: '@eui/components/eui-chip',\n selectors: {\n 'eui-chip': 'EuiChipComponent',\n euiChip: 'EuiChipComponent',\n },\n },\n EuiChipListModule: {\n importPath: '@eui/components/eui-chip-list',\n selectors: {\n 'eui-chip-list': 'EuiChipListComponent',\n },\n },\n EuiChipGroupModule: {\n importPath: '@eui/components/eui-chip-group',\n selectors: {\n 'eui-chip-group': 'EuiChipGroupComponent',\n },\n },\n EuiDashboardCardModule: {\n importPath: '@eui/components/eui-dashboard-card',\n selectors: {\n 'eui-dashboard-card': 'EuiDashboardCardComponent',\n 'eui-dashboard-card-content': 'EuiDashboardCardContentComponent',\n 'eui-dashboard-card-content-header': 'EuiDashboardCardContentHeaderComponent',\n 'eui-dashboard-card-content-body': 'EuiDashboardCardContentBodyComponent',\n 'eui-dashboard-card-content-footer': 'EuiDashboardCardContentFooterComponent',\n },\n },\n EuiDashboardButtonModule: {\n importPath: '@eui/components/eui-dashboard-card',\n selectors: {\n 'eui-dashboard-card': 'EuiDashboardCardComponent',\n 'eui-dashboard-card-content': 'EuiDashboardCardContentComponent',\n 'eui-dashboard-card-content-header': 'EuiDashboardCardContentHeaderComponent',\n 'eui-dashboard-card-content-body': 'EuiDashboardCardContentBodyComponent',\n 'eui-dashboard-card-content-footer': 'EuiDashboardCardContentFooterComponent',\n },\n },\n EuiDatepickerModule: {\n importPath: '@eui/components/eui-datepicker',\n selectors: {\n 'eui-datepicker': 'EuiDatepickerComponent',\n },\n },\n EuiDateRangeSelectorModule: {\n importPath: '@eui/components/eui-date-range-selector',\n selectors: {\n 'eui-date-range-selector': 'EuiDateRangeSelectorComponent',\n },\n },\n EuiDialogModule: {\n importPath: '@eui/components/eui-dialog',\n selectors: {\n 'eui-dialog': 'EuiDialogComponent',\n 'eui-dialog-header': 'EuiDialogHeaderDirective',\n 'eui-dialog-footer': 'EuiDialogFooterDirective',\n 'eui-dialog-container': 'EuiDialogContainerComponent',\n },\n },\n EuiDisableContentModule: {\n importPath: '@eui/components/eui-disable-content',\n selectors: {\n 'eui-disable-content': 'EuiDisableContentComponent',\n },\n },\n EuiDiscussionThreadModule: {\n importPath: '@eui/components/eui-discussion-thread',\n selectors: {\n 'eui-discussion-thread': 'EuiDiscussionThreadComponent',\n 'eui-discussion-thread-item': 'EuiDiscussionThreadItemComponent',\n },\n },\n EuiDropdownModule: {\n importPath: '@eui/components/eui-dropdown',\n selectors: {\n 'eui-dropdown': 'EuiDropdownComponent',\n },\n },\n EuiFeedbackMessageModule: {\n importPath: '@eui/components/eui-feedback-message',\n selectors: {\n 'eui-feedback-message': 'EuiFeedbackMessageComponent',\n },\n },\n EuiFieldsetModule: {\n importPath: '@eui/components/eui-fieldset',\n selectors: {\n 'eui-fieldset': 'EuiFieldsetComponent',\n euiFieldsetLabelRightContent: 'EuiFieldsetLabelRightContentTagDirective',\n euiFieldsetLabelExtraContent: 'EuiFieldsetLabelExtraContentTagDirective',\n },\n },\n EuiFileUploadModule: {\n importPath: '@eui/components/eui-file-upload',\n selectors: {\n 'eui-file-upload': 'EuiFileUploadComponent',\n },\n },\n EuiGrowlModule: {\n importPath: '@eui/components/eui-growl',\n selectors: {\n 'eui-growl': 'EuiGrowlComponent',\n },\n },\n EuiIconModule: {\n importPath: '@eui/components/eui-icon',\n selectors: {\n 'eui-icon-svg': 'EuiIconSvgComponent',\n euiIconSvg: 'EuiIconSvgComponent',\n },\n },\n EuiIconButtonModule: {\n importPath: '@eui/components/eui-icon-button',\n selectors: {\n 'eui-icon-button': 'EuiIconButtonComponent',\n },\n },\n EuiIconToggleModule: {\n importPath: '@eui/components/eui-icon-toggle',\n selectors: {\n 'eui-icon-toggle': 'EuiIconToggleComponent',\n },\n },\n EuiInputCheckboxModule: {\n importPath: '@eui/components/eui-input-checkbox',\n selectors: {\n euiInputCheckBox: 'EuiInputCheckboxComponent',\n },\n },\n EuiInputGroupModule: {\n importPath: '@eui/components/eui-input-group',\n selectors: {\n euiInputGroup: 'EuiInputGroupComponent',\n 'eui-input-group-addon': 'EuiInputGroupAddOnComponent',\n euiInputGroupAddOn: 'EuiInputGroupAddOnComponent',\n 'eui-input-group-addon-item': 'EuiInputGroupAddOnItemComponent',\n euiInputGroupAddOnItem: 'EuiInputGroupAddOnItemComponent',\n },\n },\n EuiInputNumberModule: {\n importPath: '@eui/components/eui-input-number',\n selectors: {\n euiInputNumber: 'EuiInputNumberComponent',\n },\n },\n EuiInputRadioModule: {\n importPath: '@eui/components/eui-input-radio',\n selectors: {\n euiInputRadio: 'EuiInputRadioComponent',\n },\n },\n EuiInputTextModule: {\n importPath: '@eui/components/eui-input-text',\n selectors: {\n euiInputText: 'EuiInputTextComponent',\n },\n },\n EuiLabelModule: {\n importPath: '@eui/components/eui-label',\n selectors: {\n 'eui-label': 'EuiLabelComponent',\n euiLabel: 'EuiLabelComponent',\n },\n },\n EuiListModule: {\n importPath: '@eui/components/eui-list',\n selectors: {\n 'eui-list': 'EuiListComponent',\n euiList: 'EuiListComponent',\n 'eui-list-item': 'EuiListItemComponent',\n euiListItem: 'EuiListItemComponent',\n },\n },\n EuiMenuModule: {\n importPath: '@eui/components/eui-menu',\n selectors: {\n 'eui-menu': 'EuiMenuComponent',\n 'eui-menu-item': 'EuiMenuItemComponent',\n },\n },\n EuiMessageBoxModule: {\n importPath: '@eui/components/eui-message-box',\n selectors: {\n 'eui-message-box': 'EuiMessageBoxComponent',\n 'eui-message-box-footer': 'EuiMessageBoxFooterDirective',\n },\n },\n EuiOverlayModule: {\n importPath: '@eui/components/eui-overlay',\n selectors: {\n 'eui-overlay': 'EuiOverlayComponent',\n },\n },\n EuiPageModule: {\n importPath: '@eui/components/eui-page',\n selectors: {\n 'eui-page': 'EuiPageComponent',\n },\n },\n EuiPaginatorModule: {\n importPath: '@eui/components/eui-paginator',\n selectors: {\n 'eui-paginator': 'EuiPaginatorComponent',\n },\n },\n EuiPopoverModule: {\n importPath: '@eui/components/eui-popover',\n selectors: {\n 'eui-popover': 'EuiPopoverComponent',\n },\n },\n EuiProgressBarModule: {\n importPath: '@eui/components/eui-progress-bar',\n selectors: {\n 'eui-progress-bar': 'EuiProgressBarComponent',\n },\n },\n EuiProgressCircleModule: {\n importPath: '@eui/components/eui-progress-circle',\n selectors: {\n 'eui-progress-circle': 'EuiProgressCircleComponent',\n },\n },\n EuiSelectModule: {\n importPath: '@eui/components/eui-select',\n selectors: {\n euiSelect: 'EuiSelectComponent',\n },\n },\n EuiSidebarMenuModule: {\n importPath: '@eui/components/eui-sidebar-menu',\n selectors: {\n 'eui-sidebar-menu': 'EuiSidebarMenuComponent',\n },\n },\n EuiSkeletonModule: {\n importPath: '@eui/components/eui-skeleton',\n selectors: {\n 'eui-skeleton': 'EuiSkeletonComponent',\n },\n },\n EuiSlideToggleModule: {\n importPath: '@eui/components/eui-slide-toggle',\n selectors: {\n 'eui-slide-toggle': 'EuiSlideToggleComponent',\n },\n },\n EuiTableModule: {\n importPath: '@eui/components/eui-table',\n selectors: {\n 'eui-table': 'EuiTableComponent',\n euiTable: 'EuiTableComponent',\n 'eui-table-filter': 'EuiTableFilterComponent',\n isSortable: 'EuiTableSortableColComponent',\n isStickyCol: 'EuiTableStickyColDirective',\n isHeaderSelectable: 'EuiTableSelectableHeaderComponent',\n isDataSelectable: 'EuiTableSelectableRowComponent',\n isExpandableRow: 'EuiTableExpandableRowDirective',\n },\n },\n EuiTableV2Module: {\n importPath: '@eui/components/eui-table',\n selectors: {\n 'eui-table': 'EuiTableComponent',\n euiTable: 'EuiTableComponent',\n 'eui-table-filter': 'EuiTableFilterComponent',\n isSortable: 'EuiTableSortableColComponent',\n isStickyCol: 'EuiTableStickyColDirective',\n isHeaderSelectable: 'EuiTableSelectableHeaderComponent',\n isDataSelectable: 'EuiTableSelectableRowComponent',\n isExpandableRow: 'EuiTableExpandableRowDirective',\n },\n },\n EuiTabsModule: {\n importPath: '@eui/components/eui-tabs',\n selectors: {\n 'eui-tabs': 'EuiTabsComponent',\n 'eui-tab': 'EuiTabComponent',\n 'eui-tab-header': 'EuiTabHeaderComponent',\n 'eui-tab-body': 'EuiTabBodyComponent',\n },\n },\n EuiTextAreaModule: {\n importPath: '@eui/components/eui-textarea',\n selectors: {\n euiTextArea: 'EuiTextareaComponent',\n },\n },\n EuiTimelineModule: {\n importPath: '@eui/components/eui-timeline',\n selectors: {\n 'eui-timeline': 'EuiTimelineComponent',\n 'eui-timeline-item': 'EuiTimelineItemComponent',\n },\n },\n EuiTimepickerModule: {\n importPath: '@eui/components/eui-timepicker',\n selectors: {\n 'eui-timepicker': 'EuiTimepickerComponent',\n },\n },\n EuiTreeModule: {\n importPath: '@eui/components/eui-tree',\n selectors: {\n 'eui-tree': 'EuiTreeComponent',\n },\n },\n EuiTreeListModule: {\n importPath: '@eui/components/eui-tree-list',\n selectors: {\n 'eui-tree-list': 'EuiTreeListComponent',\n 'eui-tree-list-item': 'EuiTreeListItemComponent',\n },\n },\n EuiUserProfileModule: {\n importPath: '@eui/components/eui-user-profile',\n selectors: {\n 'eui-user-profile': 'EuiUserProfileComponent',\n },\n },\n EuiWizardModule: {\n importPath: '@eui/components/eui-wizard',\n selectors: {\n 'eui-wizard': 'EuiWizardComponent',\n 'eui-wizard-step': 'EuiWizardStepComponent',\n },\n },\n EuiTooltipDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiTooltip: 'EuiTooltipDirective',\n },\n },\n EuiTemplateDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiTemplate: 'EuiTemplateDirective',\n },\n },\n EuiResizableDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiResizable: 'EuiResizableDirective',\n 'eui-resizable': 'EuiResizableComponent',\n },\n },\n EuiMaxLengthDirectiveModule: {\n importPath: '@eui/components/directives',\n selectors: {\n euiEditorMaxlength: 'EuiMaxLengthDirective',\n },\n },\n EuiTruncatePipeModule: {\n importPath: '@eui/components/pipes',\n selectors: {\n euiTruncate: 'EuiTruncatePipe',\n },\n },\n EuiLayoutModule: {\n importPath: '@eui/components/layout',\n selectors: {\n 'eui-app': 'EuiAppComponent',\n 'eui-header': 'EuiHeaderComponent',\n 'eui-footer': 'EuiFooterComponent',\n 'eui-toolbar': 'EuiToolbarComponent',\n 'eui-sidebar-toggle': 'EuiSidebarToggleComponent',\n },\n },\n};\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nexport function migrateToStandalone(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n const allModuleNames = Object.keys(MODULE_MAPPINGS);\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const source = buffer.toString('utf-8');\n if (!allModuleNames.some((m) => source.includes(m))) return;\n\n const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.Latest, true);\n const componentDecorators = findComponentDecorators(sourceFile);\n\n for (const decorator of componentDecorators) {\n const importsNode = findImportsArrayNode(decorator);\n if (!importsNode) continue;\n\n const currentSource = tree.read(path)!.toString('utf-8');\n const modulesInArray = allModuleNames.filter((m) => hasModuleInArray(importsNode, m, source));\n if (modulesInArray.length === 0) continue;\n\n const templateSelectors = getTemplateSelectors(tree, path, decorator, source);\n const replacements = buildReplacements(modulesInArray, templateSelectors);\n if (replacements.size === 0) continue;\n\n const result = applyReplacements(currentSource, path, replacements);\n if (options.dryRun) {\n logDryRun(context, `Would replace module imports with standalone imports in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n }\n });\n\n context.logger.info('Migration to standalone imports complete.');\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction buildReplacements(moduleNames: string[], templateSelectors: Set<string>): Map<string, { components: string[]; importPath: string }> {\n const map = new Map<string, { components: string[]; importPath: string }>();\n\n for (const moduleName of moduleNames) {\n const mapping = MODULE_MAPPINGS[moduleName];\n const components: string[] = [];\n\n for (const [selector, component] of Object.entries(mapping.selectors)) {\n if (templateSelectors.has(selector)) {\n components.push(component);\n }\n }\n\n if (components.length > 0) {\n map.set(moduleName, { components: [...new Set(components)].sort(), importPath: mapping.importPath });\n }\n }\n\n return map;\n}\n\nfunction findComponentDecorators(sourceFile: ts.SourceFile): ts.Decorator[] {\n const decorators: ts.Decorator[] = [];\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (decs) {\n for (const dec of decs) {\n if (ts.isCallExpression(dec.expression) && ts.isIdentifier(dec.expression.expression) && dec.expression.expression.text === 'Component') {\n decorators.push(dec);\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n return decorators;\n}\n\nfunction findImportsArrayNode(decorator: ts.Decorator): ts.ArrayLiteralExpression | undefined {\n const call = decorator.expression as ts.CallExpression;\n const metadata = call.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) return undefined;\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'imports') {\n if (ts.isArrayLiteralExpression(prop.initializer)) {\n return prop.initializer;\n }\n }\n }\n return undefined;\n}\n\nfunction hasModuleInArray(array: ts.ArrayLiteralExpression, moduleName: string, source: string): boolean {\n return array.elements.some((el) => source.slice(el.getStart(), el.getEnd()).trim() === moduleName);\n}\n\nfunction getTemplateSelectors(tree: Tree, tsPath: string, decorator: ts.Decorator, source: string): Set<string> {\n const call = decorator.expression as ts.CallExpression;\n const metadata = call.arguments[0] as ts.ObjectLiteralExpression;\n const allSelectors = Object.values(MODULE_MAPPINGS).flatMap((m) => Object.keys(m.selectors));\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'template') {\n const init = prop.initializer;\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n return findSelectorsInTemplate(init.text, allSelectors);\n }\n }\n }\n\n for (const prop of metadata.properties) {\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'templateUrl') {\n if (ts.isStringLiteral(prop.initializer)) {\n const dir = tsPath.substring(0, tsPath.lastIndexOf('/'));\n const templateBuffer = tree.read(`${dir}/${prop.initializer.text}`);\n if (templateBuffer) {\n return findSelectorsInTemplate(templateBuffer.toString('utf-8'), allSelectors);\n }\n }\n }\n }\n\n return new Set();\n}\n\nfunction findSelectorsInTemplate(html: string, knownSelectors: string[]): Set<string> {\n const selectors = new Set<string>();\n const parsed = parseTemplate(html, '', { preserveWhitespaces: true });\n\n const visit = (nodes: TmplAstNode[]): void => {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (knownSelectors.includes(node.name)) selectors.add(node.name);\n for (const attr of node.attributes) {\n if (knownSelectors.includes(attr.name)) selectors.add(attr.name);\n }\n visit(node.children);\n }\n }\n };\n visit(parsed.nodes);\n return selectors;\n}\n\nfunction applyReplacements(source: string, filePath: string, replacements: Map<string, { components: string[]; importPath: string }>): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n let result = replaceInImportsArray(source, sourceFile, replacements);\n result = updateEsImports(result, filePath, replacements);\n return result;\n}\n\nfunction replaceInImportsArray(source: string, sourceFile: ts.SourceFile, replacements: Map<string, { components: string[]; importPath: string }>): string {\n let result = source;\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const newElements = prop.initializer.elements\n .map((el) => {\n const text = result.slice(el.getStart(sourceFile), el.getEnd()).trim();\n const replacement = replacements.get(text);\n return replacement ? replacement.components.join(', ') : text;\n })\n .join(', ');\n result = result.slice(0, prop.initializer.getStart(sourceFile) + 1) + newElements + result.slice(prop.initializer.getEnd() - 1);\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n return result;\n}\n\nfunction updateEsImports(source: string, filePath: string, replacements: Map<string, { components: string[]; importPath: string }>): string {\n let result = source;\n\n for (const [moduleName, { components, importPath }] of replacements) {\n const sf = ts.createSourceFile(filePath, result, ts.ScriptTarget.Latest, true);\n\n for (const stmt of sf.statements) {\n if (!ts.isImportDeclaration(stmt) || !stmt.importClause?.namedBindings || !ts.isNamedImports(stmt.importClause.namedBindings)) continue;\n const namedBindings = stmt.importClause.namedBindings;\n const importNames = namedBindings.elements.map((el) => el.name.text);\n if (!importNames.includes(moduleName)) continue;\n\n const moduleSpecifier = (stmt.moduleSpecifier as ts.StringLiteral).text;\n const remaining = importNames.filter((n) => n !== moduleName);\n const toAdd = components.filter((c) => !importNames.includes(c));\n\n if (moduleSpecifier === importPath) {\n const newNames = [...remaining, ...toAdd].sort();\n const newClause = `{ ${newNames.join(', ')} }`;\n result = result.slice(0, namedBindings.getStart(sf)) + newClause + result.slice(namedBindings.getEnd());\n } else {\n if (remaining.length > 0) {\n const newClause = `{ ${remaining.join(', ')} }`;\n result = result.slice(0, namedBindings.getStart(sf)) + newClause + result.slice(namedBindings.getEnd());\n } else {\n result = result.slice(0, stmt.getStart(sf)) + result.slice(stmt.getEnd()).replace(/^\\r?\\n/, '');\n }\n\n if (toAdd.length > 0) {\n const updatedSf = ts.createSourceFile(filePath, result, ts.ScriptTarget.Latest, true);\n const existing = updatedSf.statements.find(\n (s) => ts.isImportDeclaration(s) && ts.isStringLiteral(s.moduleSpecifier) && s.moduleSpecifier.text === importPath,\n ) as ts.ImportDeclaration | undefined;\n\n if (existing?.importClause?.namedBindings && ts.isNamedImports(existing.importClause.namedBindings)) {\n const existingNames = existing.importClause.namedBindings.elements.map((el) => el.name.text);\n const allNames = [...new Set([...existingNames, ...toAdd])].sort();\n const newClause = `{ ${allNames.join(', ')} }`;\n result = result.slice(0, existing.importClause.namedBindings.getStart(updatedSf)) + newClause + result.slice(existing.importClause.namedBindings.getEnd());\n } else {\n const newImport = `import { ${toAdd.join(', ')} } from '${importPath}';\\n`;\n result = newImport + result;\n }\n }\n }\n break;\n }\n }\n\n return result;\n}\n",
|
|
3202
|
+
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst INPUT_RENAMES = new Map([\n ['iconLabelClass', 'icon'],\n ['iconLabelStyleClass', 'fillColor'],\n]);\n\nexport function migrateEuiProgressCircle(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const oldNames = [...INPUT_RENAMES.keys()];\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n if (original.includes('eui-progress-circle')) {\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n }\n\n // Warn about TS property access usages (merged from warnTsUsages)\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (oldNames.some((name) => original.includes(name))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && INPUT_RENAMES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n const newName = INPUT_RENAMES.get(node.name.text);\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been renamed to \"${newName}\" on eui-progress-circle. Update this reference manually.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Renamed deprecated eui-progress-circle inputs in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n visitNodes(parsed.nodes, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: { start: number; end: number; text: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes('eui-progress-circle')) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-progress-circle') {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n const newName = INPUT_RENAMES.get(attr.name);\n if (newName) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n }\n for (const input of element.inputs) {\n const newName = INPUT_RENAMES.get(input.name);\n if (newName) {\n edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n }\n}\n\nfunction applyEdits(source: string, edits: { start: number; end: number; replacement: string }[]): string {\n let result = source;\n for (const edit of edits.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n",
|
|
3203
3203
|
"displayName": "Schema",
|
|
3204
3204
|
"properties": [
|
|
3205
3205
|
{
|
|
@@ -3211,7 +3211,7 @@
|
|
|
3211
3211
|
"indexKey": "",
|
|
3212
3212
|
"optional": true,
|
|
3213
3213
|
"description": "",
|
|
3214
|
-
"line":
|
|
3214
|
+
"line": 8,
|
|
3215
3215
|
"rawdescription": "\n"
|
|
3216
3216
|
},
|
|
3217
3217
|
{
|
|
@@ -3223,7 +3223,7 @@
|
|
|
3223
3223
|
"indexKey": "",
|
|
3224
3224
|
"optional": true,
|
|
3225
3225
|
"description": "",
|
|
3226
|
-
"line":
|
|
3226
|
+
"line": 7,
|
|
3227
3227
|
"rawdescription": "\n"
|
|
3228
3228
|
}
|
|
3229
3229
|
],
|
|
@@ -23213,23 +23213,23 @@
|
|
|
23213
23213
|
"name": "NEW_INTERFACE",
|
|
23214
23214
|
"ctype": "miscellaneous",
|
|
23215
23215
|
"subtype": "variable",
|
|
23216
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
23216
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
23217
23217
|
"coverageIgnore": false,
|
|
23218
23218
|
"deprecated": false,
|
|
23219
23219
|
"deprecationMessage": "",
|
|
23220
23220
|
"type": "string",
|
|
23221
|
-
"defaultValue": "'
|
|
23221
|
+
"defaultValue": "'EuiTooltipInterface'"
|
|
23222
23222
|
},
|
|
23223
23223
|
{
|
|
23224
23224
|
"name": "NEW_INTERFACE",
|
|
23225
23225
|
"ctype": "miscellaneous",
|
|
23226
23226
|
"subtype": "variable",
|
|
23227
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
23227
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
23228
23228
|
"coverageIgnore": false,
|
|
23229
23229
|
"deprecated": false,
|
|
23230
23230
|
"deprecationMessage": "",
|
|
23231
23231
|
"type": "string",
|
|
23232
|
-
"defaultValue": "'
|
|
23232
|
+
"defaultValue": "'EuiMenuItem'"
|
|
23233
23233
|
},
|
|
23234
23234
|
{
|
|
23235
23235
|
"name": "NEW_INTERFACE_PATH",
|
|
@@ -23593,45 +23593,45 @@
|
|
|
23593
23593
|
"name": "REMOVED_INPUTS",
|
|
23594
23594
|
"ctype": "miscellaneous",
|
|
23595
23595
|
"subtype": "variable",
|
|
23596
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
23596
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
23597
23597
|
"coverageIgnore": false,
|
|
23598
23598
|
"deprecated": false,
|
|
23599
23599
|
"deprecationMessage": "",
|
|
23600
23600
|
"type": "unknown",
|
|
23601
|
-
"defaultValue": "new Set(['
|
|
23601
|
+
"defaultValue": "new Set(['maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel', 'isChipsSorted', 'chipsSortOrder'])"
|
|
23602
23602
|
},
|
|
23603
23603
|
{
|
|
23604
23604
|
"name": "REMOVED_INPUTS",
|
|
23605
23605
|
"ctype": "miscellaneous",
|
|
23606
23606
|
"subtype": "variable",
|
|
23607
|
-
"file": "packages/core/schematics/migrate-eui-chip
|
|
23607
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
23608
23608
|
"coverageIgnore": false,
|
|
23609
23609
|
"deprecated": false,
|
|
23610
23610
|
"deprecationMessage": "",
|
|
23611
23611
|
"type": "unknown",
|
|
23612
|
-
"defaultValue": "new Set(['
|
|
23612
|
+
"defaultValue": "new Set(['isSquared'])"
|
|
23613
23613
|
},
|
|
23614
23614
|
{
|
|
23615
23615
|
"name": "REMOVED_INPUTS",
|
|
23616
23616
|
"ctype": "miscellaneous",
|
|
23617
23617
|
"subtype": "variable",
|
|
23618
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
23618
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
23619
23619
|
"coverageIgnore": false,
|
|
23620
23620
|
"deprecated": false,
|
|
23621
23621
|
"deprecationMessage": "",
|
|
23622
23622
|
"type": "unknown",
|
|
23623
|
-
"defaultValue": "new Set(['
|
|
23623
|
+
"defaultValue": "new Set(['euiTableBordered', 'isHoverable', 'defaultMultiOrder', 'paginable'])"
|
|
23624
23624
|
},
|
|
23625
23625
|
{
|
|
23626
23626
|
"name": "REMOVED_INPUTS",
|
|
23627
23627
|
"ctype": "miscellaneous",
|
|
23628
23628
|
"subtype": "variable",
|
|
23629
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
23629
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
23630
23630
|
"coverageIgnore": false,
|
|
23631
23631
|
"deprecated": false,
|
|
23632
23632
|
"deprecationMessage": "",
|
|
23633
23633
|
"type": "unknown",
|
|
23634
|
-
"defaultValue": "new Set(['
|
|
23634
|
+
"defaultValue": "new Set(['type'])"
|
|
23635
23635
|
},
|
|
23636
23636
|
{
|
|
23637
23637
|
"name": "REMOVED_OUTPUT",
|
|
@@ -24698,7 +24698,7 @@
|
|
|
24698
24698
|
},
|
|
24699
24699
|
{
|
|
24700
24700
|
"name": "applyEdits",
|
|
24701
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24701
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
24702
24702
|
"ctype": "miscellaneous",
|
|
24703
24703
|
"subtype": "function",
|
|
24704
24704
|
"coverageIgnore": false,
|
|
@@ -24743,7 +24743,7 @@
|
|
|
24743
24743
|
},
|
|
24744
24744
|
{
|
|
24745
24745
|
"name": "applyEdits",
|
|
24746
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24746
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
24747
24747
|
"ctype": "miscellaneous",
|
|
24748
24748
|
"subtype": "function",
|
|
24749
24749
|
"coverageIgnore": false,
|
|
@@ -24833,7 +24833,7 @@
|
|
|
24833
24833
|
},
|
|
24834
24834
|
{
|
|
24835
24835
|
"name": "applyEdits",
|
|
24836
|
-
"file": "packages/core/schematics/migrate-
|
|
24836
|
+
"file": "packages/core/schematics/migrate-to-signals/index.ts",
|
|
24837
24837
|
"ctype": "miscellaneous",
|
|
24838
24838
|
"subtype": "function",
|
|
24839
24839
|
"coverageIgnore": false,
|
|
@@ -24878,7 +24878,7 @@
|
|
|
24878
24878
|
},
|
|
24879
24879
|
{
|
|
24880
24880
|
"name": "applyEdits",
|
|
24881
|
-
"file": "packages/core/schematics/migrate-
|
|
24881
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
24882
24882
|
"ctype": "miscellaneous",
|
|
24883
24883
|
"subtype": "function",
|
|
24884
24884
|
"coverageIgnore": false,
|
|
@@ -26040,7 +26040,7 @@
|
|
|
26040
26040
|
},
|
|
26041
26041
|
{
|
|
26042
26042
|
"name": "collectRemovals",
|
|
26043
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26043
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
26044
26044
|
"ctype": "miscellaneous",
|
|
26045
26045
|
"subtype": "function",
|
|
26046
26046
|
"coverageIgnore": false,
|
|
@@ -26056,6 +26056,12 @@
|
|
|
26056
26056
|
"deprecated": false,
|
|
26057
26057
|
"deprecationMessage": ""
|
|
26058
26058
|
},
|
|
26059
|
+
{
|
|
26060
|
+
"name": "source",
|
|
26061
|
+
"type": "string",
|
|
26062
|
+
"deprecated": false,
|
|
26063
|
+
"deprecationMessage": ""
|
|
26064
|
+
},
|
|
26059
26065
|
{
|
|
26060
26066
|
"name": "removals",
|
|
26061
26067
|
"deprecated": false,
|
|
@@ -26073,6 +26079,15 @@
|
|
|
26073
26079
|
"text": "param"
|
|
26074
26080
|
}
|
|
26075
26081
|
},
|
|
26082
|
+
{
|
|
26083
|
+
"name": "source",
|
|
26084
|
+
"type": "string",
|
|
26085
|
+
"deprecated": false,
|
|
26086
|
+
"deprecationMessage": "",
|
|
26087
|
+
"tagName": {
|
|
26088
|
+
"text": "param"
|
|
26089
|
+
}
|
|
26090
|
+
},
|
|
26076
26091
|
{
|
|
26077
26092
|
"name": "removals",
|
|
26078
26093
|
"deprecated": false,
|
|
@@ -26085,7 +26100,7 @@
|
|
|
26085
26100
|
},
|
|
26086
26101
|
{
|
|
26087
26102
|
"name": "collectRemovals",
|
|
26088
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26103
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
26089
26104
|
"ctype": "miscellaneous",
|
|
26090
26105
|
"subtype": "function",
|
|
26091
26106
|
"coverageIgnore": false,
|
|
@@ -26101,12 +26116,6 @@
|
|
|
26101
26116
|
"deprecated": false,
|
|
26102
26117
|
"deprecationMessage": ""
|
|
26103
26118
|
},
|
|
26104
|
-
{
|
|
26105
|
-
"name": "source",
|
|
26106
|
-
"type": "string",
|
|
26107
|
-
"deprecated": false,
|
|
26108
|
-
"deprecationMessage": ""
|
|
26109
|
-
},
|
|
26110
26119
|
{
|
|
26111
26120
|
"name": "removals",
|
|
26112
26121
|
"deprecated": false,
|
|
@@ -26124,15 +26133,6 @@
|
|
|
26124
26133
|
"text": "param"
|
|
26125
26134
|
}
|
|
26126
26135
|
},
|
|
26127
|
-
{
|
|
26128
|
-
"name": "source",
|
|
26129
|
-
"type": "string",
|
|
26130
|
-
"deprecated": false,
|
|
26131
|
-
"deprecationMessage": "",
|
|
26132
|
-
"tagName": {
|
|
26133
|
-
"text": "param"
|
|
26134
|
-
}
|
|
26135
|
-
},
|
|
26136
26136
|
{
|
|
26137
26137
|
"name": "removals",
|
|
26138
26138
|
"deprecated": false,
|
|
@@ -27038,7 +27038,7 @@
|
|
|
27038
27038
|
},
|
|
27039
27039
|
{
|
|
27040
27040
|
"name": "deduplicateEdits",
|
|
27041
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
27041
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
27042
27042
|
"ctype": "miscellaneous",
|
|
27043
27043
|
"subtype": "function",
|
|
27044
27044
|
"coverageIgnore": false,
|
|
@@ -27068,7 +27068,7 @@
|
|
|
27068
27068
|
},
|
|
27069
27069
|
{
|
|
27070
27070
|
"name": "deduplicateEdits",
|
|
27071
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
27071
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
27072
27072
|
"ctype": "miscellaneous",
|
|
27073
27073
|
"subtype": "function",
|
|
27074
27074
|
"coverageIgnore": false,
|
|
@@ -29754,7 +29754,7 @@
|
|
|
29754
29754
|
},
|
|
29755
29755
|
{
|
|
29756
29756
|
"name": "isChipElement",
|
|
29757
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
29757
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
29758
29758
|
"ctype": "miscellaneous",
|
|
29759
29759
|
"subtype": "function",
|
|
29760
29760
|
"coverageIgnore": false,
|
|
@@ -29786,7 +29786,7 @@
|
|
|
29786
29786
|
},
|
|
29787
29787
|
{
|
|
29788
29788
|
"name": "isChipElement",
|
|
29789
|
-
"file": "packages/core/schematics/migrate-eui-chip
|
|
29789
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
29790
29790
|
"ctype": "miscellaneous",
|
|
29791
29791
|
"subtype": "function",
|
|
29792
29792
|
"coverageIgnore": false,
|
|
@@ -30058,6 +30058,96 @@
|
|
|
30058
30058
|
}
|
|
30059
30059
|
]
|
|
30060
30060
|
},
|
|
30061
|
+
{
|
|
30062
|
+
"name": "isComponentMetadataProperty",
|
|
30063
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
30064
|
+
"ctype": "miscellaneous",
|
|
30065
|
+
"subtype": "function",
|
|
30066
|
+
"coverageIgnore": false,
|
|
30067
|
+
"deprecated": false,
|
|
30068
|
+
"deprecationMessage": "",
|
|
30069
|
+
"rawdescription": "",
|
|
30070
|
+
"description": "",
|
|
30071
|
+
"displayName": "isComponentMetadataProperty",
|
|
30072
|
+
"args": [
|
|
30073
|
+
{
|
|
30074
|
+
"name": "node",
|
|
30075
|
+
"deprecated": false,
|
|
30076
|
+
"deprecationMessage": ""
|
|
30077
|
+
}
|
|
30078
|
+
],
|
|
30079
|
+
"returnType": "boolean",
|
|
30080
|
+
"jsdoctags": [
|
|
30081
|
+
{
|
|
30082
|
+
"name": "node",
|
|
30083
|
+
"deprecated": false,
|
|
30084
|
+
"deprecationMessage": "",
|
|
30085
|
+
"tagName": {
|
|
30086
|
+
"text": "param"
|
|
30087
|
+
}
|
|
30088
|
+
}
|
|
30089
|
+
]
|
|
30090
|
+
},
|
|
30091
|
+
{
|
|
30092
|
+
"name": "isComponentMetadataProperty",
|
|
30093
|
+
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
30094
|
+
"ctype": "miscellaneous",
|
|
30095
|
+
"subtype": "function",
|
|
30096
|
+
"coverageIgnore": false,
|
|
30097
|
+
"deprecated": false,
|
|
30098
|
+
"deprecationMessage": "",
|
|
30099
|
+
"rawdescription": "",
|
|
30100
|
+
"description": "",
|
|
30101
|
+
"displayName": "isComponentMetadataProperty",
|
|
30102
|
+
"args": [
|
|
30103
|
+
{
|
|
30104
|
+
"name": "node",
|
|
30105
|
+
"deprecated": false,
|
|
30106
|
+
"deprecationMessage": ""
|
|
30107
|
+
}
|
|
30108
|
+
],
|
|
30109
|
+
"returnType": "boolean",
|
|
30110
|
+
"jsdoctags": [
|
|
30111
|
+
{
|
|
30112
|
+
"name": "node",
|
|
30113
|
+
"deprecated": false,
|
|
30114
|
+
"deprecationMessage": "",
|
|
30115
|
+
"tagName": {
|
|
30116
|
+
"text": "param"
|
|
30117
|
+
}
|
|
30118
|
+
}
|
|
30119
|
+
]
|
|
30120
|
+
},
|
|
30121
|
+
{
|
|
30122
|
+
"name": "isComponentMetadataProperty",
|
|
30123
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
30124
|
+
"ctype": "miscellaneous",
|
|
30125
|
+
"subtype": "function",
|
|
30126
|
+
"coverageIgnore": false,
|
|
30127
|
+
"deprecated": false,
|
|
30128
|
+
"deprecationMessage": "",
|
|
30129
|
+
"rawdescription": "",
|
|
30130
|
+
"description": "",
|
|
30131
|
+
"displayName": "isComponentMetadataProperty",
|
|
30132
|
+
"args": [
|
|
30133
|
+
{
|
|
30134
|
+
"name": "node",
|
|
30135
|
+
"deprecated": false,
|
|
30136
|
+
"deprecationMessage": ""
|
|
30137
|
+
}
|
|
30138
|
+
],
|
|
30139
|
+
"returnType": "boolean",
|
|
30140
|
+
"jsdoctags": [
|
|
30141
|
+
{
|
|
30142
|
+
"name": "node",
|
|
30143
|
+
"deprecated": false,
|
|
30144
|
+
"deprecationMessage": "",
|
|
30145
|
+
"tagName": {
|
|
30146
|
+
"text": "param"
|
|
30147
|
+
}
|
|
30148
|
+
}
|
|
30149
|
+
]
|
|
30150
|
+
},
|
|
30061
30151
|
{
|
|
30062
30152
|
"name": "isComponentMetadataProperty",
|
|
30063
30153
|
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
@@ -30088,96 +30178,6 @@
|
|
|
30088
30178
|
}
|
|
30089
30179
|
]
|
|
30090
30180
|
},
|
|
30091
|
-
{
|
|
30092
|
-
"name": "isComponentMetadataProperty",
|
|
30093
|
-
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
30094
|
-
"ctype": "miscellaneous",
|
|
30095
|
-
"subtype": "function",
|
|
30096
|
-
"coverageIgnore": false,
|
|
30097
|
-
"deprecated": false,
|
|
30098
|
-
"deprecationMessage": "",
|
|
30099
|
-
"rawdescription": "",
|
|
30100
|
-
"description": "",
|
|
30101
|
-
"displayName": "isComponentMetadataProperty",
|
|
30102
|
-
"args": [
|
|
30103
|
-
{
|
|
30104
|
-
"name": "node",
|
|
30105
|
-
"deprecated": false,
|
|
30106
|
-
"deprecationMessage": ""
|
|
30107
|
-
}
|
|
30108
|
-
],
|
|
30109
|
-
"returnType": "boolean",
|
|
30110
|
-
"jsdoctags": [
|
|
30111
|
-
{
|
|
30112
|
-
"name": "node",
|
|
30113
|
-
"deprecated": false,
|
|
30114
|
-
"deprecationMessage": "",
|
|
30115
|
-
"tagName": {
|
|
30116
|
-
"text": "param"
|
|
30117
|
-
}
|
|
30118
|
-
}
|
|
30119
|
-
]
|
|
30120
|
-
},
|
|
30121
|
-
{
|
|
30122
|
-
"name": "isComponentMetadataProperty",
|
|
30123
|
-
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
30124
|
-
"ctype": "miscellaneous",
|
|
30125
|
-
"subtype": "function",
|
|
30126
|
-
"coverageIgnore": false,
|
|
30127
|
-
"deprecated": false,
|
|
30128
|
-
"deprecationMessage": "",
|
|
30129
|
-
"rawdescription": "",
|
|
30130
|
-
"description": "",
|
|
30131
|
-
"displayName": "isComponentMetadataProperty",
|
|
30132
|
-
"args": [
|
|
30133
|
-
{
|
|
30134
|
-
"name": "node",
|
|
30135
|
-
"deprecated": false,
|
|
30136
|
-
"deprecationMessage": ""
|
|
30137
|
-
}
|
|
30138
|
-
],
|
|
30139
|
-
"returnType": "boolean",
|
|
30140
|
-
"jsdoctags": [
|
|
30141
|
-
{
|
|
30142
|
-
"name": "node",
|
|
30143
|
-
"deprecated": false,
|
|
30144
|
-
"deprecationMessage": "",
|
|
30145
|
-
"tagName": {
|
|
30146
|
-
"text": "param"
|
|
30147
|
-
}
|
|
30148
|
-
}
|
|
30149
|
-
]
|
|
30150
|
-
},
|
|
30151
|
-
{
|
|
30152
|
-
"name": "isComponentMetadataProperty",
|
|
30153
|
-
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
30154
|
-
"ctype": "miscellaneous",
|
|
30155
|
-
"subtype": "function",
|
|
30156
|
-
"coverageIgnore": false,
|
|
30157
|
-
"deprecated": false,
|
|
30158
|
-
"deprecationMessage": "",
|
|
30159
|
-
"rawdescription": "",
|
|
30160
|
-
"description": "",
|
|
30161
|
-
"displayName": "isComponentMetadataProperty",
|
|
30162
|
-
"args": [
|
|
30163
|
-
{
|
|
30164
|
-
"name": "node",
|
|
30165
|
-
"deprecated": false,
|
|
30166
|
-
"deprecationMessage": ""
|
|
30167
|
-
}
|
|
30168
|
-
],
|
|
30169
|
-
"returnType": "boolean",
|
|
30170
|
-
"jsdoctags": [
|
|
30171
|
-
{
|
|
30172
|
-
"name": "node",
|
|
30173
|
-
"deprecated": false,
|
|
30174
|
-
"deprecationMessage": "",
|
|
30175
|
-
"tagName": {
|
|
30176
|
-
"text": "param"
|
|
30177
|
-
}
|
|
30178
|
-
}
|
|
30179
|
-
]
|
|
30180
|
-
},
|
|
30181
30181
|
{
|
|
30182
30182
|
"name": "isElement",
|
|
30183
30183
|
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
@@ -30605,7 +30605,7 @@
|
|
|
30605
30605
|
},
|
|
30606
30606
|
{
|
|
30607
30607
|
"name": "isTemplateProperty",
|
|
30608
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30608
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
30609
30609
|
"ctype": "miscellaneous",
|
|
30610
30610
|
"subtype": "function",
|
|
30611
30611
|
"coverageIgnore": false,
|
|
@@ -30635,7 +30635,7 @@
|
|
|
30635
30635
|
},
|
|
30636
30636
|
{
|
|
30637
30637
|
"name": "isTemplateProperty",
|
|
30638
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30638
|
+
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
30639
30639
|
"ctype": "miscellaneous",
|
|
30640
30640
|
"subtype": "function",
|
|
30641
30641
|
"coverageIgnore": false,
|
|
@@ -30665,7 +30665,7 @@
|
|
|
30665
30665
|
},
|
|
30666
30666
|
{
|
|
30667
30667
|
"name": "isTemplateProperty",
|
|
30668
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30668
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
30669
30669
|
"ctype": "miscellaneous",
|
|
30670
30670
|
"subtype": "function",
|
|
30671
30671
|
"coverageIgnore": false,
|
|
@@ -30695,7 +30695,7 @@
|
|
|
30695
30695
|
},
|
|
30696
30696
|
{
|
|
30697
30697
|
"name": "isTemplateProperty",
|
|
30698
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30698
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
30699
30699
|
"ctype": "miscellaneous",
|
|
30700
30700
|
"subtype": "function",
|
|
30701
30701
|
"coverageIgnore": false,
|
|
@@ -32355,7 +32355,7 @@
|
|
|
32355
32355
|
},
|
|
32356
32356
|
{
|
|
32357
32357
|
"name": "migrateInlineTemplates",
|
|
32358
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
32358
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
32359
32359
|
"ctype": "miscellaneous",
|
|
32360
32360
|
"subtype": "function",
|
|
32361
32361
|
"coverageIgnore": false,
|
|
@@ -32387,7 +32387,7 @@
|
|
|
32387
32387
|
},
|
|
32388
32388
|
{
|
|
32389
32389
|
"name": "migrateInlineTemplates",
|
|
32390
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32390
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
32391
32391
|
"ctype": "miscellaneous",
|
|
32392
32392
|
"subtype": "function",
|
|
32393
32393
|
"coverageIgnore": false,
|
|
@@ -32419,7 +32419,7 @@
|
|
|
32419
32419
|
},
|
|
32420
32420
|
{
|
|
32421
32421
|
"name": "migrateInlineTemplates",
|
|
32422
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32422
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
32423
32423
|
"ctype": "miscellaneous",
|
|
32424
32424
|
"subtype": "function",
|
|
32425
32425
|
"coverageIgnore": false,
|
|
@@ -32577,70 +32577,6 @@
|
|
|
32577
32577
|
}
|
|
32578
32578
|
]
|
|
32579
32579
|
},
|
|
32580
|
-
{
|
|
32581
|
-
"name": "migrateInlineTemplates",
|
|
32582
|
-
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
32583
|
-
"ctype": "miscellaneous",
|
|
32584
|
-
"subtype": "function",
|
|
32585
|
-
"coverageIgnore": false,
|
|
32586
|
-
"deprecated": false,
|
|
32587
|
-
"deprecationMessage": "",
|
|
32588
|
-
"rawdescription": "",
|
|
32589
|
-
"description": "",
|
|
32590
|
-
"displayName": "migrateInlineTemplates",
|
|
32591
|
-
"args": [
|
|
32592
|
-
{
|
|
32593
|
-
"name": "source",
|
|
32594
|
-
"type": "string",
|
|
32595
|
-
"deprecated": false,
|
|
32596
|
-
"deprecationMessage": ""
|
|
32597
|
-
}
|
|
32598
|
-
],
|
|
32599
|
-
"returnType": "string",
|
|
32600
|
-
"jsdoctags": [
|
|
32601
|
-
{
|
|
32602
|
-
"name": "source",
|
|
32603
|
-
"type": "string",
|
|
32604
|
-
"deprecated": false,
|
|
32605
|
-
"deprecationMessage": "",
|
|
32606
|
-
"tagName": {
|
|
32607
|
-
"text": "param"
|
|
32608
|
-
}
|
|
32609
|
-
}
|
|
32610
|
-
]
|
|
32611
|
-
},
|
|
32612
|
-
{
|
|
32613
|
-
"name": "migrateInlineTemplates",
|
|
32614
|
-
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
32615
|
-
"ctype": "miscellaneous",
|
|
32616
|
-
"subtype": "function",
|
|
32617
|
-
"coverageIgnore": false,
|
|
32618
|
-
"deprecated": false,
|
|
32619
|
-
"deprecationMessage": "",
|
|
32620
|
-
"rawdescription": "",
|
|
32621
|
-
"description": "",
|
|
32622
|
-
"displayName": "migrateInlineTemplates",
|
|
32623
|
-
"args": [
|
|
32624
|
-
{
|
|
32625
|
-
"name": "source",
|
|
32626
|
-
"type": "string",
|
|
32627
|
-
"deprecated": false,
|
|
32628
|
-
"deprecationMessage": ""
|
|
32629
|
-
}
|
|
32630
|
-
],
|
|
32631
|
-
"returnType": "string",
|
|
32632
|
-
"jsdoctags": [
|
|
32633
|
-
{
|
|
32634
|
-
"name": "source",
|
|
32635
|
-
"type": "string",
|
|
32636
|
-
"deprecated": false,
|
|
32637
|
-
"deprecationMessage": "",
|
|
32638
|
-
"tagName": {
|
|
32639
|
-
"text": "param"
|
|
32640
|
-
}
|
|
32641
|
-
}
|
|
32642
|
-
]
|
|
32643
|
-
},
|
|
32644
32580
|
{
|
|
32645
32581
|
"name": "migrateInlineTemplates",
|
|
32646
32582
|
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
@@ -32705,7 +32641,7 @@
|
|
|
32705
32641
|
},
|
|
32706
32642
|
{
|
|
32707
32643
|
"name": "migrateInlineTemplates",
|
|
32708
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32644
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
32709
32645
|
"ctype": "miscellaneous",
|
|
32710
32646
|
"subtype": "function",
|
|
32711
32647
|
"coverageIgnore": false,
|
|
@@ -32720,18 +32656,6 @@
|
|
|
32720
32656
|
"type": "string",
|
|
32721
32657
|
"deprecated": false,
|
|
32722
32658
|
"deprecationMessage": ""
|
|
32723
|
-
},
|
|
32724
|
-
{
|
|
32725
|
-
"name": "filePath",
|
|
32726
|
-
"type": "string",
|
|
32727
|
-
"deprecated": false,
|
|
32728
|
-
"deprecationMessage": ""
|
|
32729
|
-
},
|
|
32730
|
-
{
|
|
32731
|
-
"name": "context",
|
|
32732
|
-
"type": "SchematicContext",
|
|
32733
|
-
"deprecated": false,
|
|
32734
|
-
"deprecationMessage": ""
|
|
32735
32659
|
}
|
|
32736
32660
|
],
|
|
32737
32661
|
"returnType": "string",
|
|
@@ -32744,30 +32668,12 @@
|
|
|
32744
32668
|
"tagName": {
|
|
32745
32669
|
"text": "param"
|
|
32746
32670
|
}
|
|
32747
|
-
},
|
|
32748
|
-
{
|
|
32749
|
-
"name": "filePath",
|
|
32750
|
-
"type": "string",
|
|
32751
|
-
"deprecated": false,
|
|
32752
|
-
"deprecationMessage": "",
|
|
32753
|
-
"tagName": {
|
|
32754
|
-
"text": "param"
|
|
32755
|
-
}
|
|
32756
|
-
},
|
|
32757
|
-
{
|
|
32758
|
-
"name": "context",
|
|
32759
|
-
"type": "SchematicContext",
|
|
32760
|
-
"deprecated": false,
|
|
32761
|
-
"deprecationMessage": "",
|
|
32762
|
-
"tagName": {
|
|
32763
|
-
"text": "param"
|
|
32764
|
-
}
|
|
32765
32671
|
}
|
|
32766
32672
|
]
|
|
32767
32673
|
},
|
|
32768
32674
|
{
|
|
32769
|
-
"name": "
|
|
32770
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32675
|
+
"name": "migrateInlineTemplates",
|
|
32676
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
32771
32677
|
"ctype": "miscellaneous",
|
|
32772
32678
|
"subtype": "function",
|
|
32773
32679
|
"coverageIgnore": false,
|
|
@@ -32775,13 +32681,25 @@
|
|
|
32775
32681
|
"deprecationMessage": "",
|
|
32776
32682
|
"rawdescription": "",
|
|
32777
32683
|
"description": "",
|
|
32778
|
-
"displayName": "
|
|
32684
|
+
"displayName": "migrateInlineTemplates",
|
|
32779
32685
|
"args": [
|
|
32780
32686
|
{
|
|
32781
32687
|
"name": "source",
|
|
32782
32688
|
"type": "string",
|
|
32783
32689
|
"deprecated": false,
|
|
32784
32690
|
"deprecationMessage": ""
|
|
32691
|
+
},
|
|
32692
|
+
{
|
|
32693
|
+
"name": "filePath",
|
|
32694
|
+
"type": "string",
|
|
32695
|
+
"deprecated": false,
|
|
32696
|
+
"deprecationMessage": ""
|
|
32697
|
+
},
|
|
32698
|
+
{
|
|
32699
|
+
"name": "context",
|
|
32700
|
+
"type": "SchematicContext",
|
|
32701
|
+
"deprecated": false,
|
|
32702
|
+
"deprecationMessage": ""
|
|
32785
32703
|
}
|
|
32786
32704
|
],
|
|
32787
32705
|
"returnType": "string",
|
|
@@ -32794,33 +32712,19 @@
|
|
|
32794
32712
|
"tagName": {
|
|
32795
32713
|
"text": "param"
|
|
32796
32714
|
}
|
|
32797
|
-
}
|
|
32798
|
-
]
|
|
32799
|
-
},
|
|
32800
|
-
{
|
|
32801
|
-
"name": "migrateTemplate",
|
|
32802
|
-
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
32803
|
-
"ctype": "miscellaneous",
|
|
32804
|
-
"subtype": "function",
|
|
32805
|
-
"coverageIgnore": false,
|
|
32806
|
-
"deprecated": false,
|
|
32807
|
-
"deprecationMessage": "",
|
|
32808
|
-
"rawdescription": "",
|
|
32809
|
-
"description": "",
|
|
32810
|
-
"displayName": "migrateTemplate",
|
|
32811
|
-
"args": [
|
|
32715
|
+
},
|
|
32812
32716
|
{
|
|
32813
|
-
"name": "
|
|
32717
|
+
"name": "filePath",
|
|
32814
32718
|
"type": "string",
|
|
32815
32719
|
"deprecated": false,
|
|
32816
|
-
"deprecationMessage": ""
|
|
32817
|
-
|
|
32818
|
-
|
|
32819
|
-
|
|
32820
|
-
|
|
32720
|
+
"deprecationMessage": "",
|
|
32721
|
+
"tagName": {
|
|
32722
|
+
"text": "param"
|
|
32723
|
+
}
|
|
32724
|
+
},
|
|
32821
32725
|
{
|
|
32822
|
-
"name": "
|
|
32823
|
-
"type": "
|
|
32726
|
+
"name": "context",
|
|
32727
|
+
"type": "SchematicContext",
|
|
32824
32728
|
"deprecated": false,
|
|
32825
32729
|
"deprecationMessage": "",
|
|
32826
32730
|
"tagName": {
|
|
@@ -32830,8 +32734,8 @@
|
|
|
32830
32734
|
]
|
|
32831
32735
|
},
|
|
32832
32736
|
{
|
|
32833
|
-
"name": "
|
|
32834
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32737
|
+
"name": "migrateInlineTemplates",
|
|
32738
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
32835
32739
|
"ctype": "miscellaneous",
|
|
32836
32740
|
"subtype": "function",
|
|
32837
32741
|
"coverageIgnore": false,
|
|
@@ -32839,7 +32743,7 @@
|
|
|
32839
32743
|
"deprecationMessage": "",
|
|
32840
32744
|
"rawdescription": "",
|
|
32841
32745
|
"description": "",
|
|
32842
|
-
"displayName": "
|
|
32746
|
+
"displayName": "migrateInlineTemplates",
|
|
32843
32747
|
"args": [
|
|
32844
32748
|
{
|
|
32845
32749
|
"name": "source",
|
|
@@ -32863,7 +32767,7 @@
|
|
|
32863
32767
|
},
|
|
32864
32768
|
{
|
|
32865
32769
|
"name": "migrateTemplate",
|
|
32866
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32770
|
+
"file": "packages/core/schematics/migrate-eui-accent/index.ts",
|
|
32867
32771
|
"ctype": "miscellaneous",
|
|
32868
32772
|
"subtype": "function",
|
|
32869
32773
|
"coverageIgnore": false,
|
|
@@ -32895,7 +32799,7 @@
|
|
|
32895
32799
|
},
|
|
32896
32800
|
{
|
|
32897
32801
|
"name": "migrateTemplate",
|
|
32898
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32802
|
+
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
32899
32803
|
"ctype": "miscellaneous",
|
|
32900
32804
|
"subtype": "function",
|
|
32901
32805
|
"coverageIgnore": false,
|
|
@@ -32927,7 +32831,7 @@
|
|
|
32927
32831
|
},
|
|
32928
32832
|
{
|
|
32929
32833
|
"name": "migrateTemplate",
|
|
32930
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32834
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
32931
32835
|
"ctype": "miscellaneous",
|
|
32932
32836
|
"subtype": "function",
|
|
32933
32837
|
"coverageIgnore": false,
|
|
@@ -32959,7 +32863,7 @@
|
|
|
32959
32863
|
},
|
|
32960
32864
|
{
|
|
32961
32865
|
"name": "migrateTemplate",
|
|
32962
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32866
|
+
"file": "packages/core/schematics/migrate-eui-button/index.ts",
|
|
32963
32867
|
"ctype": "miscellaneous",
|
|
32964
32868
|
"subtype": "function",
|
|
32965
32869
|
"coverageIgnore": false,
|
|
@@ -32991,7 +32895,7 @@
|
|
|
32991
32895
|
},
|
|
32992
32896
|
{
|
|
32993
32897
|
"name": "migrateTemplate",
|
|
32994
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32898
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
32995
32899
|
"ctype": "miscellaneous",
|
|
32996
32900
|
"subtype": "function",
|
|
32997
32901
|
"coverageIgnore": false,
|
|
@@ -33023,7 +32927,7 @@
|
|
|
33023
32927
|
},
|
|
33024
32928
|
{
|
|
33025
32929
|
"name": "migrateTemplate",
|
|
33026
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32930
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
33027
32931
|
"ctype": "miscellaneous",
|
|
33028
32932
|
"subtype": "function",
|
|
33029
32933
|
"coverageIgnore": false,
|
|
@@ -33055,7 +32959,7 @@
|
|
|
33055
32959
|
},
|
|
33056
32960
|
{
|
|
33057
32961
|
"name": "migrateTemplate",
|
|
33058
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32962
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
33059
32963
|
"ctype": "miscellaneous",
|
|
33060
32964
|
"subtype": "function",
|
|
33061
32965
|
"coverageIgnore": false,
|
|
@@ -33087,7 +32991,7 @@
|
|
|
33087
32991
|
},
|
|
33088
32992
|
{
|
|
33089
32993
|
"name": "migrateTemplate",
|
|
33090
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32994
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
33091
32995
|
"ctype": "miscellaneous",
|
|
33092
32996
|
"subtype": "function",
|
|
33093
32997
|
"coverageIgnore": false,
|
|
@@ -33119,7 +33023,7 @@
|
|
|
33119
33023
|
},
|
|
33120
33024
|
{
|
|
33121
33025
|
"name": "migrateTemplate",
|
|
33122
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33026
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
33123
33027
|
"ctype": "miscellaneous",
|
|
33124
33028
|
"subtype": "function",
|
|
33125
33029
|
"coverageIgnore": false,
|
|
@@ -33151,7 +33055,39 @@
|
|
|
33151
33055
|
},
|
|
33152
33056
|
{
|
|
33153
33057
|
"name": "migrateTemplate",
|
|
33154
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33058
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
33059
|
+
"ctype": "miscellaneous",
|
|
33060
|
+
"subtype": "function",
|
|
33061
|
+
"coverageIgnore": false,
|
|
33062
|
+
"deprecated": false,
|
|
33063
|
+
"deprecationMessage": "",
|
|
33064
|
+
"rawdescription": "",
|
|
33065
|
+
"description": "",
|
|
33066
|
+
"displayName": "migrateTemplate",
|
|
33067
|
+
"args": [
|
|
33068
|
+
{
|
|
33069
|
+
"name": "source",
|
|
33070
|
+
"type": "string",
|
|
33071
|
+
"deprecated": false,
|
|
33072
|
+
"deprecationMessage": ""
|
|
33073
|
+
}
|
|
33074
|
+
],
|
|
33075
|
+
"returnType": "string",
|
|
33076
|
+
"jsdoctags": [
|
|
33077
|
+
{
|
|
33078
|
+
"name": "source",
|
|
33079
|
+
"type": "string",
|
|
33080
|
+
"deprecated": false,
|
|
33081
|
+
"deprecationMessage": "",
|
|
33082
|
+
"tagName": {
|
|
33083
|
+
"text": "param"
|
|
33084
|
+
}
|
|
33085
|
+
}
|
|
33086
|
+
]
|
|
33087
|
+
},
|
|
33088
|
+
{
|
|
33089
|
+
"name": "migrateTemplate",
|
|
33090
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
33155
33091
|
"ctype": "miscellaneous",
|
|
33156
33092
|
"subtype": "function",
|
|
33157
33093
|
"coverageIgnore": false,
|
|
@@ -33305,6 +33241,38 @@
|
|
|
33305
33241
|
}
|
|
33306
33242
|
]
|
|
33307
33243
|
},
|
|
33244
|
+
{
|
|
33245
|
+
"name": "migrateTemplate",
|
|
33246
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
33247
|
+
"ctype": "miscellaneous",
|
|
33248
|
+
"subtype": "function",
|
|
33249
|
+
"coverageIgnore": false,
|
|
33250
|
+
"deprecated": false,
|
|
33251
|
+
"deprecationMessage": "",
|
|
33252
|
+
"rawdescription": "",
|
|
33253
|
+
"description": "",
|
|
33254
|
+
"displayName": "migrateTemplate",
|
|
33255
|
+
"args": [
|
|
33256
|
+
{
|
|
33257
|
+
"name": "source",
|
|
33258
|
+
"type": "string",
|
|
33259
|
+
"deprecated": false,
|
|
33260
|
+
"deprecationMessage": ""
|
|
33261
|
+
}
|
|
33262
|
+
],
|
|
33263
|
+
"returnType": "string",
|
|
33264
|
+
"jsdoctags": [
|
|
33265
|
+
{
|
|
33266
|
+
"name": "source",
|
|
33267
|
+
"type": "string",
|
|
33268
|
+
"deprecated": false,
|
|
33269
|
+
"deprecationMessage": "",
|
|
33270
|
+
"tagName": {
|
|
33271
|
+
"text": "param"
|
|
33272
|
+
}
|
|
33273
|
+
}
|
|
33274
|
+
]
|
|
33275
|
+
},
|
|
33308
33276
|
{
|
|
33309
33277
|
"name": "migrateTemplate",
|
|
33310
33278
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
@@ -33367,6 +33335,38 @@
|
|
|
33367
33335
|
}
|
|
33368
33336
|
]
|
|
33369
33337
|
},
|
|
33338
|
+
{
|
|
33339
|
+
"name": "migrateTemplate",
|
|
33340
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
33341
|
+
"ctype": "miscellaneous",
|
|
33342
|
+
"subtype": "function",
|
|
33343
|
+
"coverageIgnore": false,
|
|
33344
|
+
"deprecated": false,
|
|
33345
|
+
"deprecationMessage": "",
|
|
33346
|
+
"rawdescription": "",
|
|
33347
|
+
"description": "",
|
|
33348
|
+
"displayName": "migrateTemplate",
|
|
33349
|
+
"args": [
|
|
33350
|
+
{
|
|
33351
|
+
"name": "source",
|
|
33352
|
+
"type": "string",
|
|
33353
|
+
"deprecated": false,
|
|
33354
|
+
"deprecationMessage": ""
|
|
33355
|
+
}
|
|
33356
|
+
],
|
|
33357
|
+
"returnType": "string",
|
|
33358
|
+
"jsdoctags": [
|
|
33359
|
+
{
|
|
33360
|
+
"name": "source",
|
|
33361
|
+
"type": "string",
|
|
33362
|
+
"deprecated": false,
|
|
33363
|
+
"deprecationMessage": "",
|
|
33364
|
+
"tagName": {
|
|
33365
|
+
"text": "param"
|
|
33366
|
+
}
|
|
33367
|
+
}
|
|
33368
|
+
]
|
|
33369
|
+
},
|
|
33370
33370
|
{
|
|
33371
33371
|
"name": "migrateTemplateWithPaginator",
|
|
33372
33372
|
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
@@ -33561,7 +33561,7 @@
|
|
|
33561
33561
|
},
|
|
33562
33562
|
{
|
|
33563
33563
|
"name": "migrateTypeScript",
|
|
33564
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33564
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
33565
33565
|
"ctype": "miscellaneous",
|
|
33566
33566
|
"subtype": "function",
|
|
33567
33567
|
"coverageIgnore": false,
|
|
@@ -33623,7 +33623,7 @@
|
|
|
33623
33623
|
},
|
|
33624
33624
|
{
|
|
33625
33625
|
"name": "migrateTypeScript",
|
|
33626
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33626
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
33627
33627
|
"ctype": "miscellaneous",
|
|
33628
33628
|
"subtype": "function",
|
|
33629
33629
|
"coverageIgnore": false,
|
|
@@ -34139,7 +34139,7 @@
|
|
|
34139
34139
|
},
|
|
34140
34140
|
{
|
|
34141
34141
|
"name": "removeImportSpecifier",
|
|
34142
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
34142
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
34143
34143
|
"ctype": "miscellaneous",
|
|
34144
34144
|
"subtype": "function",
|
|
34145
34145
|
"coverageIgnore": false,
|
|
@@ -34208,7 +34208,7 @@
|
|
|
34208
34208
|
},
|
|
34209
34209
|
{
|
|
34210
34210
|
"name": "removeImportSpecifier",
|
|
34211
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
34211
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
34212
34212
|
"ctype": "miscellaneous",
|
|
34213
34213
|
"subtype": "function",
|
|
34214
34214
|
"coverageIgnore": false,
|
|
@@ -35511,7 +35511,7 @@
|
|
|
35511
35511
|
},
|
|
35512
35512
|
{
|
|
35513
35513
|
"name": "unwrapExpression",
|
|
35514
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35514
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
35515
35515
|
"ctype": "miscellaneous",
|
|
35516
35516
|
"subtype": "function",
|
|
35517
35517
|
"coverageIgnore": false,
|
|
@@ -35541,7 +35541,7 @@
|
|
|
35541
35541
|
},
|
|
35542
35542
|
{
|
|
35543
35543
|
"name": "unwrapExpression",
|
|
35544
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35544
|
+
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
35545
35545
|
"ctype": "miscellaneous",
|
|
35546
35546
|
"subtype": "function",
|
|
35547
35547
|
"coverageIgnore": false,
|
|
@@ -35571,7 +35571,7 @@
|
|
|
35571
35571
|
},
|
|
35572
35572
|
{
|
|
35573
35573
|
"name": "unwrapExpression",
|
|
35574
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35574
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
35575
35575
|
"ctype": "miscellaneous",
|
|
35576
35576
|
"subtype": "function",
|
|
35577
35577
|
"coverageIgnore": false,
|
|
@@ -35601,7 +35601,7 @@
|
|
|
35601
35601
|
},
|
|
35602
35602
|
{
|
|
35603
35603
|
"name": "unwrapExpression",
|
|
35604
|
-
"file": "packages/core/schematics/migrate-
|
|
35604
|
+
"file": "packages/core/schematics/migrate-to-signals/index.ts",
|
|
35605
35605
|
"ctype": "miscellaneous",
|
|
35606
35606
|
"subtype": "function",
|
|
35607
35607
|
"coverageIgnore": false,
|
|
@@ -35631,7 +35631,7 @@
|
|
|
35631
35631
|
},
|
|
35632
35632
|
{
|
|
35633
35633
|
"name": "unwrapExpression",
|
|
35634
|
-
"file": "packages/core/schematics/migrate-
|
|
35634
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
35635
35635
|
"ctype": "miscellaneous",
|
|
35636
35636
|
"subtype": "function",
|
|
35637
35637
|
"coverageIgnore": false,
|
|
@@ -36124,7 +36124,7 @@
|
|
|
36124
36124
|
},
|
|
36125
36125
|
{
|
|
36126
36126
|
"name": "visitDir",
|
|
36127
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
36127
|
+
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
36128
36128
|
"ctype": "miscellaneous",
|
|
36129
36129
|
"subtype": "function",
|
|
36130
36130
|
"coverageIgnore": false,
|
|
@@ -36169,7 +36169,7 @@
|
|
|
36169
36169
|
},
|
|
36170
36170
|
{
|
|
36171
36171
|
"name": "visitDir",
|
|
36172
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36172
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
36173
36173
|
"ctype": "miscellaneous",
|
|
36174
36174
|
"subtype": "function",
|
|
36175
36175
|
"coverageIgnore": false,
|
|
@@ -36214,7 +36214,7 @@
|
|
|
36214
36214
|
},
|
|
36215
36215
|
{
|
|
36216
36216
|
"name": "visitDir",
|
|
36217
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36217
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
36218
36218
|
"ctype": "miscellaneous",
|
|
36219
36219
|
"subtype": "function",
|
|
36220
36220
|
"coverageIgnore": false,
|
|
@@ -36439,7 +36439,7 @@
|
|
|
36439
36439
|
},
|
|
36440
36440
|
{
|
|
36441
36441
|
"name": "visitDir",
|
|
36442
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36442
|
+
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
36443
36443
|
"ctype": "miscellaneous",
|
|
36444
36444
|
"subtype": "function",
|
|
36445
36445
|
"coverageIgnore": false,
|
|
@@ -36484,7 +36484,7 @@
|
|
|
36484
36484
|
},
|
|
36485
36485
|
{
|
|
36486
36486
|
"name": "visitDir",
|
|
36487
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36487
|
+
"file": "packages/core/schematics/migrate-eui-tabs/index.ts",
|
|
36488
36488
|
"ctype": "miscellaneous",
|
|
36489
36489
|
"subtype": "function",
|
|
36490
36490
|
"coverageIgnore": false,
|
|
@@ -36529,7 +36529,7 @@
|
|
|
36529
36529
|
},
|
|
36530
36530
|
{
|
|
36531
36531
|
"name": "visitDir",
|
|
36532
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36532
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
36533
36533
|
"ctype": "miscellaneous",
|
|
36534
36534
|
"subtype": "function",
|
|
36535
36535
|
"coverageIgnore": false,
|
|
@@ -36574,7 +36574,7 @@
|
|
|
36574
36574
|
},
|
|
36575
36575
|
{
|
|
36576
36576
|
"name": "visitDir",
|
|
36577
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36577
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
36578
36578
|
"ctype": "miscellaneous",
|
|
36579
36579
|
"subtype": "function",
|
|
36580
36580
|
"coverageIgnore": false,
|
|
@@ -36664,7 +36664,7 @@
|
|
|
36664
36664
|
},
|
|
36665
36665
|
{
|
|
36666
36666
|
"name": "visitDir",
|
|
36667
|
-
"file": "packages/core/schematics/migrate-
|
|
36667
|
+
"file": "packages/core/schematics/migrate-to-signals/index.ts",
|
|
36668
36668
|
"ctype": "miscellaneous",
|
|
36669
36669
|
"subtype": "function",
|
|
36670
36670
|
"coverageIgnore": false,
|
|
@@ -36709,7 +36709,7 @@
|
|
|
36709
36709
|
},
|
|
36710
36710
|
{
|
|
36711
36711
|
"name": "visitDir",
|
|
36712
|
-
"file": "packages/core/schematics/migrate-to-
|
|
36712
|
+
"file": "packages/core/schematics/migrate-to-standalone/index.ts",
|
|
36713
36713
|
"ctype": "miscellaneous",
|
|
36714
36714
|
"subtype": "function",
|
|
36715
36715
|
"coverageIgnore": false,
|
|
@@ -36754,7 +36754,7 @@
|
|
|
36754
36754
|
},
|
|
36755
36755
|
{
|
|
36756
36756
|
"name": "visitDir",
|
|
36757
|
-
"file": "packages/core/schematics/migrate-
|
|
36757
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
36758
36758
|
"ctype": "miscellaneous",
|
|
36759
36759
|
"subtype": "function",
|
|
36760
36760
|
"coverageIgnore": false,
|
|
@@ -37014,49 +37014,6 @@
|
|
|
37014
37014
|
}
|
|
37015
37015
|
]
|
|
37016
37016
|
},
|
|
37017
|
-
{
|
|
37018
|
-
"name": "visitNodes",
|
|
37019
|
-
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
37020
|
-
"ctype": "miscellaneous",
|
|
37021
|
-
"subtype": "function",
|
|
37022
|
-
"coverageIgnore": false,
|
|
37023
|
-
"deprecated": false,
|
|
37024
|
-
"deprecationMessage": "",
|
|
37025
|
-
"rawdescription": "",
|
|
37026
|
-
"description": "",
|
|
37027
|
-
"displayName": "visitNodes",
|
|
37028
|
-
"args": [
|
|
37029
|
-
{
|
|
37030
|
-
"name": "nodes",
|
|
37031
|
-
"deprecated": false,
|
|
37032
|
-
"deprecationMessage": ""
|
|
37033
|
-
},
|
|
37034
|
-
{
|
|
37035
|
-
"name": "removals",
|
|
37036
|
-
"deprecated": false,
|
|
37037
|
-
"deprecationMessage": ""
|
|
37038
|
-
}
|
|
37039
|
-
],
|
|
37040
|
-
"returnType": "void",
|
|
37041
|
-
"jsdoctags": [
|
|
37042
|
-
{
|
|
37043
|
-
"name": "nodes",
|
|
37044
|
-
"deprecated": false,
|
|
37045
|
-
"deprecationMessage": "",
|
|
37046
|
-
"tagName": {
|
|
37047
|
-
"text": "param"
|
|
37048
|
-
}
|
|
37049
|
-
},
|
|
37050
|
-
{
|
|
37051
|
-
"name": "removals",
|
|
37052
|
-
"deprecated": false,
|
|
37053
|
-
"deprecationMessage": "",
|
|
37054
|
-
"tagName": {
|
|
37055
|
-
"text": "param"
|
|
37056
|
-
}
|
|
37057
|
-
}
|
|
37058
|
-
]
|
|
37059
|
-
},
|
|
37060
37017
|
{
|
|
37061
37018
|
"name": "visitNodes",
|
|
37062
37019
|
"file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
|
|
@@ -37175,7 +37132,7 @@
|
|
|
37175
37132
|
},
|
|
37176
37133
|
{
|
|
37177
37134
|
"name": "visitNodes",
|
|
37178
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37135
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
37179
37136
|
"ctype": "miscellaneous",
|
|
37180
37137
|
"subtype": "function",
|
|
37181
37138
|
"coverageIgnore": false,
|
|
@@ -37191,7 +37148,7 @@
|
|
|
37191
37148
|
"deprecationMessage": ""
|
|
37192
37149
|
},
|
|
37193
37150
|
{
|
|
37194
|
-
"name": "
|
|
37151
|
+
"name": "removals",
|
|
37195
37152
|
"deprecated": false,
|
|
37196
37153
|
"deprecationMessage": ""
|
|
37197
37154
|
}
|
|
@@ -37207,7 +37164,7 @@
|
|
|
37207
37164
|
}
|
|
37208
37165
|
},
|
|
37209
37166
|
{
|
|
37210
|
-
"name": "
|
|
37167
|
+
"name": "removals",
|
|
37211
37168
|
"deprecated": false,
|
|
37212
37169
|
"deprecationMessage": "",
|
|
37213
37170
|
"tagName": {
|
|
@@ -37218,7 +37175,7 @@
|
|
|
37218
37175
|
},
|
|
37219
37176
|
{
|
|
37220
37177
|
"name": "visitNodes",
|
|
37221
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37178
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
37222
37179
|
"ctype": "miscellaneous",
|
|
37223
37180
|
"subtype": "function",
|
|
37224
37181
|
"coverageIgnore": false,
|
|
@@ -37261,7 +37218,7 @@
|
|
|
37261
37218
|
},
|
|
37262
37219
|
{
|
|
37263
37220
|
"name": "visitNodes",
|
|
37264
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37221
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
37265
37222
|
"ctype": "miscellaneous",
|
|
37266
37223
|
"subtype": "function",
|
|
37267
37224
|
"coverageIgnore": false,
|
|
@@ -37304,7 +37261,7 @@
|
|
|
37304
37261
|
},
|
|
37305
37262
|
{
|
|
37306
37263
|
"name": "visitNodes",
|
|
37307
|
-
"file": "packages/core/schematics/migrate-eui-icon-
|
|
37264
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
37308
37265
|
"ctype": "miscellaneous",
|
|
37309
37266
|
"subtype": "function",
|
|
37310
37267
|
"coverageIgnore": false,
|
|
@@ -37347,7 +37304,7 @@
|
|
|
37347
37304
|
},
|
|
37348
37305
|
{
|
|
37349
37306
|
"name": "visitNodes",
|
|
37350
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37307
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
37351
37308
|
"ctype": "miscellaneous",
|
|
37352
37309
|
"subtype": "function",
|
|
37353
37310
|
"coverageIgnore": false,
|
|
@@ -37363,7 +37320,7 @@
|
|
|
37363
37320
|
"deprecationMessage": ""
|
|
37364
37321
|
},
|
|
37365
37322
|
{
|
|
37366
|
-
"name": "
|
|
37323
|
+
"name": "edits",
|
|
37367
37324
|
"deprecated": false,
|
|
37368
37325
|
"deprecationMessage": ""
|
|
37369
37326
|
}
|
|
@@ -37379,7 +37336,7 @@
|
|
|
37379
37336
|
}
|
|
37380
37337
|
},
|
|
37381
37338
|
{
|
|
37382
|
-
"name": "
|
|
37339
|
+
"name": "edits",
|
|
37383
37340
|
"deprecated": false,
|
|
37384
37341
|
"deprecationMessage": "",
|
|
37385
37342
|
"tagName": {
|
|
@@ -37390,7 +37347,7 @@
|
|
|
37390
37347
|
},
|
|
37391
37348
|
{
|
|
37392
37349
|
"name": "visitNodes",
|
|
37393
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37350
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
37394
37351
|
"ctype": "miscellaneous",
|
|
37395
37352
|
"subtype": "function",
|
|
37396
37353
|
"coverageIgnore": false,
|
|
@@ -37406,7 +37363,7 @@
|
|
|
37406
37363
|
"deprecationMessage": ""
|
|
37407
37364
|
},
|
|
37408
37365
|
{
|
|
37409
|
-
"name": "
|
|
37366
|
+
"name": "removals",
|
|
37410
37367
|
"deprecated": false,
|
|
37411
37368
|
"deprecationMessage": ""
|
|
37412
37369
|
}
|
|
@@ -37422,7 +37379,7 @@
|
|
|
37422
37379
|
}
|
|
37423
37380
|
},
|
|
37424
37381
|
{
|
|
37425
|
-
"name": "
|
|
37382
|
+
"name": "removals",
|
|
37426
37383
|
"deprecated": false,
|
|
37427
37384
|
"deprecationMessage": "",
|
|
37428
37385
|
"tagName": {
|
|
@@ -37519,6 +37476,49 @@
|
|
|
37519
37476
|
}
|
|
37520
37477
|
]
|
|
37521
37478
|
},
|
|
37479
|
+
{
|
|
37480
|
+
"name": "visitNodes",
|
|
37481
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
37482
|
+
"ctype": "miscellaneous",
|
|
37483
|
+
"subtype": "function",
|
|
37484
|
+
"coverageIgnore": false,
|
|
37485
|
+
"deprecated": false,
|
|
37486
|
+
"deprecationMessage": "",
|
|
37487
|
+
"rawdescription": "",
|
|
37488
|
+
"description": "",
|
|
37489
|
+
"displayName": "visitNodes",
|
|
37490
|
+
"args": [
|
|
37491
|
+
{
|
|
37492
|
+
"name": "nodes",
|
|
37493
|
+
"deprecated": false,
|
|
37494
|
+
"deprecationMessage": ""
|
|
37495
|
+
},
|
|
37496
|
+
{
|
|
37497
|
+
"name": "edits",
|
|
37498
|
+
"deprecated": false,
|
|
37499
|
+
"deprecationMessage": ""
|
|
37500
|
+
}
|
|
37501
|
+
],
|
|
37502
|
+
"returnType": "void",
|
|
37503
|
+
"jsdoctags": [
|
|
37504
|
+
{
|
|
37505
|
+
"name": "nodes",
|
|
37506
|
+
"deprecated": false,
|
|
37507
|
+
"deprecationMessage": "",
|
|
37508
|
+
"tagName": {
|
|
37509
|
+
"text": "param"
|
|
37510
|
+
}
|
|
37511
|
+
},
|
|
37512
|
+
{
|
|
37513
|
+
"name": "edits",
|
|
37514
|
+
"deprecated": false,
|
|
37515
|
+
"deprecationMessage": "",
|
|
37516
|
+
"tagName": {
|
|
37517
|
+
"text": "param"
|
|
37518
|
+
}
|
|
37519
|
+
}
|
|
37520
|
+
]
|
|
37521
|
+
},
|
|
37522
37522
|
{
|
|
37523
37523
|
"name": "visitNodesForTable",
|
|
37524
37524
|
"file": "packages/core/schematics/migrate-eui-table/index.ts",
|
|
@@ -47161,10 +47161,10 @@
|
|
|
47161
47161
|
]
|
|
47162
47162
|
}
|
|
47163
47163
|
],
|
|
47164
|
-
"packages/core/schematics/migrate-eui-
|
|
47164
|
+
"packages/core/schematics/migrate-eui-tooltip/index.ts": [
|
|
47165
47165
|
{
|
|
47166
47166
|
"name": "applyEdits",
|
|
47167
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47167
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47168
47168
|
"ctype": "miscellaneous",
|
|
47169
47169
|
"subtype": "function",
|
|
47170
47170
|
"coverageIgnore": false,
|
|
@@ -47208,8 +47208,8 @@
|
|
|
47208
47208
|
]
|
|
47209
47209
|
},
|
|
47210
47210
|
{
|
|
47211
|
-
"name": "
|
|
47212
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47211
|
+
"name": "deduplicateEdits",
|
|
47212
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47213
47213
|
"ctype": "miscellaneous",
|
|
47214
47214
|
"subtype": "function",
|
|
47215
47215
|
"coverageIgnore": false,
|
|
@@ -47217,31 +47217,16 @@
|
|
|
47217
47217
|
"deprecationMessage": "",
|
|
47218
47218
|
"rawdescription": "",
|
|
47219
47219
|
"description": "",
|
|
47220
|
-
"displayName": "
|
|
47220
|
+
"displayName": "deduplicateEdits",
|
|
47221
47221
|
"args": [
|
|
47222
|
-
{
|
|
47223
|
-
"name": "element",
|
|
47224
|
-
"type": "TmplAstElement",
|
|
47225
|
-
"deprecated": false,
|
|
47226
|
-
"deprecationMessage": ""
|
|
47227
|
-
},
|
|
47228
47222
|
{
|
|
47229
47223
|
"name": "edits",
|
|
47230
47224
|
"deprecated": false,
|
|
47231
47225
|
"deprecationMessage": ""
|
|
47232
47226
|
}
|
|
47233
47227
|
],
|
|
47234
|
-
"returnType": "
|
|
47228
|
+
"returnType": "Edit[]",
|
|
47235
47229
|
"jsdoctags": [
|
|
47236
|
-
{
|
|
47237
|
-
"name": "element",
|
|
47238
|
-
"type": "TmplAstElement",
|
|
47239
|
-
"deprecated": false,
|
|
47240
|
-
"deprecationMessage": "",
|
|
47241
|
-
"tagName": {
|
|
47242
|
-
"text": "param"
|
|
47243
|
-
}
|
|
47244
|
-
},
|
|
47245
47230
|
{
|
|
47246
47231
|
"name": "edits",
|
|
47247
47232
|
"deprecated": false,
|
|
@@ -47253,38 +47238,8 @@
|
|
|
47253
47238
|
]
|
|
47254
47239
|
},
|
|
47255
47240
|
{
|
|
47256
|
-
"name": "
|
|
47257
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47258
|
-
"ctype": "miscellaneous",
|
|
47259
|
-
"subtype": "function",
|
|
47260
|
-
"coverageIgnore": false,
|
|
47261
|
-
"deprecated": false,
|
|
47262
|
-
"deprecationMessage": "",
|
|
47263
|
-
"rawdescription": "",
|
|
47264
|
-
"description": "",
|
|
47265
|
-
"displayName": "isComponentMetadataProperty",
|
|
47266
|
-
"args": [
|
|
47267
|
-
{
|
|
47268
|
-
"name": "node",
|
|
47269
|
-
"deprecated": false,
|
|
47270
|
-
"deprecationMessage": ""
|
|
47271
|
-
}
|
|
47272
|
-
],
|
|
47273
|
-
"returnType": "boolean",
|
|
47274
|
-
"jsdoctags": [
|
|
47275
|
-
{
|
|
47276
|
-
"name": "node",
|
|
47277
|
-
"deprecated": false,
|
|
47278
|
-
"deprecationMessage": "",
|
|
47279
|
-
"tagName": {
|
|
47280
|
-
"text": "param"
|
|
47281
|
-
}
|
|
47282
|
-
}
|
|
47283
|
-
]
|
|
47284
|
-
},
|
|
47285
|
-
{
|
|
47286
|
-
"name": "isTemplateProperty",
|
|
47287
|
-
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
47241
|
+
"name": "isPartOfImport",
|
|
47242
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47288
47243
|
"ctype": "miscellaneous",
|
|
47289
47244
|
"subtype": "function",
|
|
47290
47245
|
"coverageIgnore": false,
|
|
@@ -47292,7 +47247,7 @@
|
|
|
47292
47247
|
"deprecationMessage": "",
|
|
47293
47248
|
"rawdescription": "",
|
|
47294
47249
|
"description": "",
|
|
47295
|
-
"displayName": "
|
|
47250
|
+
"displayName": "isPartOfImport",
|
|
47296
47251
|
"args": [
|
|
47297
47252
|
{
|
|
47298
47253
|
"name": "node",
|
|
@@ -47313,8 +47268,8 @@
|
|
|
47313
47268
|
]
|
|
47314
47269
|
},
|
|
47315
47270
|
{
|
|
47316
|
-
"name": "
|
|
47317
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47271
|
+
"name": "migrateEuiTooltip",
|
|
47272
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47318
47273
|
"ctype": "miscellaneous",
|
|
47319
47274
|
"subtype": "function",
|
|
47320
47275
|
"coverageIgnore": false,
|
|
@@ -47322,7 +47277,7 @@
|
|
|
47322
47277
|
"deprecationMessage": "",
|
|
47323
47278
|
"rawdescription": "",
|
|
47324
47279
|
"description": "",
|
|
47325
|
-
"displayName": "
|
|
47280
|
+
"displayName": "migrateEuiTooltip",
|
|
47326
47281
|
"args": [
|
|
47327
47282
|
{
|
|
47328
47283
|
"name": "options",
|
|
@@ -47347,8 +47302,8 @@
|
|
|
47347
47302
|
]
|
|
47348
47303
|
},
|
|
47349
47304
|
{
|
|
47350
|
-
"name": "
|
|
47351
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47305
|
+
"name": "migrateTypeScript",
|
|
47306
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47352
47307
|
"ctype": "miscellaneous",
|
|
47353
47308
|
"subtype": "function",
|
|
47354
47309
|
"coverageIgnore": false,
|
|
@@ -47356,43 +47311,23 @@
|
|
|
47356
47311
|
"deprecationMessage": "",
|
|
47357
47312
|
"rawdescription": "",
|
|
47358
47313
|
"description": "",
|
|
47359
|
-
"displayName": "
|
|
47314
|
+
"displayName": "migrateTypeScript",
|
|
47360
47315
|
"args": [
|
|
47361
47316
|
{
|
|
47362
47317
|
"name": "source",
|
|
47363
47318
|
"type": "string",
|
|
47364
47319
|
"deprecated": false,
|
|
47365
47320
|
"deprecationMessage": ""
|
|
47366
|
-
}
|
|
47367
|
-
],
|
|
47368
|
-
"returnType": "string",
|
|
47369
|
-
"jsdoctags": [
|
|
47321
|
+
},
|
|
47370
47322
|
{
|
|
47371
|
-
"name": "
|
|
47323
|
+
"name": "filePath",
|
|
47372
47324
|
"type": "string",
|
|
47373
47325
|
"deprecated": false,
|
|
47374
|
-
"deprecationMessage": ""
|
|
47375
|
-
|
|
47376
|
-
"text": "param"
|
|
47377
|
-
}
|
|
47378
|
-
}
|
|
47379
|
-
]
|
|
47380
|
-
},
|
|
47381
|
-
{
|
|
47382
|
-
"name": "migrateTemplate",
|
|
47383
|
-
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
47384
|
-
"ctype": "miscellaneous",
|
|
47385
|
-
"subtype": "function",
|
|
47386
|
-
"coverageIgnore": false,
|
|
47387
|
-
"deprecated": false,
|
|
47388
|
-
"deprecationMessage": "",
|
|
47389
|
-
"rawdescription": "",
|
|
47390
|
-
"description": "",
|
|
47391
|
-
"displayName": "migrateTemplate",
|
|
47392
|
-
"args": [
|
|
47326
|
+
"deprecationMessage": ""
|
|
47327
|
+
},
|
|
47393
47328
|
{
|
|
47394
|
-
"name": "
|
|
47395
|
-
"type": "
|
|
47329
|
+
"name": "context",
|
|
47330
|
+
"type": "SchematicContext",
|
|
47396
47331
|
"deprecated": false,
|
|
47397
47332
|
"deprecationMessage": ""
|
|
47398
47333
|
}
|
|
@@ -47407,31 +47342,19 @@
|
|
|
47407
47342
|
"tagName": {
|
|
47408
47343
|
"text": "param"
|
|
47409
47344
|
}
|
|
47410
|
-
}
|
|
47411
|
-
]
|
|
47412
|
-
},
|
|
47413
|
-
{
|
|
47414
|
-
"name": "unwrapExpression",
|
|
47415
|
-
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
47416
|
-
"ctype": "miscellaneous",
|
|
47417
|
-
"subtype": "function",
|
|
47418
|
-
"coverageIgnore": false,
|
|
47419
|
-
"deprecated": false,
|
|
47420
|
-
"deprecationMessage": "",
|
|
47421
|
-
"rawdescription": "",
|
|
47422
|
-
"description": "",
|
|
47423
|
-
"displayName": "unwrapExpression",
|
|
47424
|
-
"args": [
|
|
47345
|
+
},
|
|
47425
47346
|
{
|
|
47426
|
-
"name": "
|
|
47347
|
+
"name": "filePath",
|
|
47348
|
+
"type": "string",
|
|
47427
47349
|
"deprecated": false,
|
|
47428
|
-
"deprecationMessage": ""
|
|
47429
|
-
|
|
47430
|
-
|
|
47431
|
-
|
|
47432
|
-
|
|
47350
|
+
"deprecationMessage": "",
|
|
47351
|
+
"tagName": {
|
|
47352
|
+
"text": "param"
|
|
47353
|
+
}
|
|
47354
|
+
},
|
|
47433
47355
|
{
|
|
47434
|
-
"name": "
|
|
47356
|
+
"name": "context",
|
|
47357
|
+
"type": "SchematicContext",
|
|
47435
47358
|
"deprecated": false,
|
|
47436
47359
|
"deprecationMessage": "",
|
|
47437
47360
|
"tagName": {
|
|
@@ -47441,8 +47364,8 @@
|
|
|
47441
47364
|
]
|
|
47442
47365
|
},
|
|
47443
47366
|
{
|
|
47444
|
-
"name": "
|
|
47445
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47367
|
+
"name": "removeImportSpecifier",
|
|
47368
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47446
47369
|
"ctype": "miscellaneous",
|
|
47447
47370
|
"subtype": "function",
|
|
47448
47371
|
"coverageIgnore": false,
|
|
@@ -47450,16 +47373,25 @@
|
|
|
47450
47373
|
"deprecationMessage": "",
|
|
47451
47374
|
"rawdescription": "",
|
|
47452
47375
|
"description": "",
|
|
47453
|
-
"displayName": "
|
|
47376
|
+
"displayName": "removeImportSpecifier",
|
|
47454
47377
|
"args": [
|
|
47455
47378
|
{
|
|
47456
|
-
"name": "
|
|
47457
|
-
"type": "DirEntry",
|
|
47379
|
+
"name": "namedImports",
|
|
47458
47380
|
"deprecated": false,
|
|
47459
47381
|
"deprecationMessage": ""
|
|
47460
47382
|
},
|
|
47461
47383
|
{
|
|
47462
|
-
"name": "
|
|
47384
|
+
"name": "specifier",
|
|
47385
|
+
"deprecated": false,
|
|
47386
|
+
"deprecationMessage": ""
|
|
47387
|
+
},
|
|
47388
|
+
{
|
|
47389
|
+
"name": "sourceFile",
|
|
47390
|
+
"deprecated": false,
|
|
47391
|
+
"deprecationMessage": ""
|
|
47392
|
+
},
|
|
47393
|
+
{
|
|
47394
|
+
"name": "edits",
|
|
47463
47395
|
"deprecated": false,
|
|
47464
47396
|
"deprecationMessage": ""
|
|
47465
47397
|
}
|
|
@@ -47467,8 +47399,7 @@
|
|
|
47467
47399
|
"returnType": "void",
|
|
47468
47400
|
"jsdoctags": [
|
|
47469
47401
|
{
|
|
47470
|
-
"name": "
|
|
47471
|
-
"type": "DirEntry",
|
|
47402
|
+
"name": "namedImports",
|
|
47472
47403
|
"deprecated": false,
|
|
47473
47404
|
"deprecationMessage": "",
|
|
47474
47405
|
"tagName": {
|
|
@@ -47476,7 +47407,23 @@
|
|
|
47476
47407
|
}
|
|
47477
47408
|
},
|
|
47478
47409
|
{
|
|
47479
|
-
"name": "
|
|
47410
|
+
"name": "specifier",
|
|
47411
|
+
"deprecated": false,
|
|
47412
|
+
"deprecationMessage": "",
|
|
47413
|
+
"tagName": {
|
|
47414
|
+
"text": "param"
|
|
47415
|
+
}
|
|
47416
|
+
},
|
|
47417
|
+
{
|
|
47418
|
+
"name": "sourceFile",
|
|
47419
|
+
"deprecated": false,
|
|
47420
|
+
"deprecationMessage": "",
|
|
47421
|
+
"tagName": {
|
|
47422
|
+
"text": "param"
|
|
47423
|
+
}
|
|
47424
|
+
},
|
|
47425
|
+
{
|
|
47426
|
+
"name": "edits",
|
|
47480
47427
|
"deprecated": false,
|
|
47481
47428
|
"deprecationMessage": "",
|
|
47482
47429
|
"tagName": {
|
|
@@ -47486,8 +47433,8 @@
|
|
|
47486
47433
|
]
|
|
47487
47434
|
},
|
|
47488
47435
|
{
|
|
47489
|
-
"name": "
|
|
47490
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47436
|
+
"name": "visitDir",
|
|
47437
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47491
47438
|
"ctype": "miscellaneous",
|
|
47492
47439
|
"subtype": "function",
|
|
47493
47440
|
"coverageIgnore": false,
|
|
@@ -47495,15 +47442,16 @@
|
|
|
47495
47442
|
"deprecationMessage": "",
|
|
47496
47443
|
"rawdescription": "",
|
|
47497
47444
|
"description": "",
|
|
47498
|
-
"displayName": "
|
|
47445
|
+
"displayName": "visitDir",
|
|
47499
47446
|
"args": [
|
|
47500
47447
|
{
|
|
47501
|
-
"name": "
|
|
47448
|
+
"name": "dir",
|
|
47449
|
+
"type": "DirEntry",
|
|
47502
47450
|
"deprecated": false,
|
|
47503
47451
|
"deprecationMessage": ""
|
|
47504
47452
|
},
|
|
47505
47453
|
{
|
|
47506
|
-
"name": "
|
|
47454
|
+
"name": "callback",
|
|
47507
47455
|
"deprecated": false,
|
|
47508
47456
|
"deprecationMessage": ""
|
|
47509
47457
|
}
|
|
@@ -47511,7 +47459,8 @@
|
|
|
47511
47459
|
"returnType": "void",
|
|
47512
47460
|
"jsdoctags": [
|
|
47513
47461
|
{
|
|
47514
|
-
"name": "
|
|
47462
|
+
"name": "dir",
|
|
47463
|
+
"type": "DirEntry",
|
|
47515
47464
|
"deprecated": false,
|
|
47516
47465
|
"deprecationMessage": "",
|
|
47517
47466
|
"tagName": {
|
|
@@ -47519,7 +47468,7 @@
|
|
|
47519
47468
|
}
|
|
47520
47469
|
},
|
|
47521
47470
|
{
|
|
47522
|
-
"name": "
|
|
47471
|
+
"name": "callback",
|
|
47523
47472
|
"deprecated": false,
|
|
47524
47473
|
"deprecationMessage": "",
|
|
47525
47474
|
"tagName": {
|
|
@@ -48390,323 +48339,6 @@
|
|
|
48390
48339
|
]
|
|
48391
48340
|
}
|
|
48392
48341
|
],
|
|
48393
|
-
"packages/core/schematics/migrate-eui-tooltip/index.ts": [
|
|
48394
|
-
{
|
|
48395
|
-
"name": "applyEdits",
|
|
48396
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48397
|
-
"ctype": "miscellaneous",
|
|
48398
|
-
"subtype": "function",
|
|
48399
|
-
"coverageIgnore": false,
|
|
48400
|
-
"deprecated": false,
|
|
48401
|
-
"deprecationMessage": "",
|
|
48402
|
-
"rawdescription": "",
|
|
48403
|
-
"description": "",
|
|
48404
|
-
"displayName": "applyEdits",
|
|
48405
|
-
"args": [
|
|
48406
|
-
{
|
|
48407
|
-
"name": "source",
|
|
48408
|
-
"type": "string",
|
|
48409
|
-
"deprecated": false,
|
|
48410
|
-
"deprecationMessage": ""
|
|
48411
|
-
},
|
|
48412
|
-
{
|
|
48413
|
-
"name": "edits",
|
|
48414
|
-
"deprecated": false,
|
|
48415
|
-
"deprecationMessage": ""
|
|
48416
|
-
}
|
|
48417
|
-
],
|
|
48418
|
-
"returnType": "string",
|
|
48419
|
-
"jsdoctags": [
|
|
48420
|
-
{
|
|
48421
|
-
"name": "source",
|
|
48422
|
-
"type": "string",
|
|
48423
|
-
"deprecated": false,
|
|
48424
|
-
"deprecationMessage": "",
|
|
48425
|
-
"tagName": {
|
|
48426
|
-
"text": "param"
|
|
48427
|
-
}
|
|
48428
|
-
},
|
|
48429
|
-
{
|
|
48430
|
-
"name": "edits",
|
|
48431
|
-
"deprecated": false,
|
|
48432
|
-
"deprecationMessage": "",
|
|
48433
|
-
"tagName": {
|
|
48434
|
-
"text": "param"
|
|
48435
|
-
}
|
|
48436
|
-
}
|
|
48437
|
-
]
|
|
48438
|
-
},
|
|
48439
|
-
{
|
|
48440
|
-
"name": "deduplicateEdits",
|
|
48441
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48442
|
-
"ctype": "miscellaneous",
|
|
48443
|
-
"subtype": "function",
|
|
48444
|
-
"coverageIgnore": false,
|
|
48445
|
-
"deprecated": false,
|
|
48446
|
-
"deprecationMessage": "",
|
|
48447
|
-
"rawdescription": "",
|
|
48448
|
-
"description": "",
|
|
48449
|
-
"displayName": "deduplicateEdits",
|
|
48450
|
-
"args": [
|
|
48451
|
-
{
|
|
48452
|
-
"name": "edits",
|
|
48453
|
-
"deprecated": false,
|
|
48454
|
-
"deprecationMessage": ""
|
|
48455
|
-
}
|
|
48456
|
-
],
|
|
48457
|
-
"returnType": "Edit[]",
|
|
48458
|
-
"jsdoctags": [
|
|
48459
|
-
{
|
|
48460
|
-
"name": "edits",
|
|
48461
|
-
"deprecated": false,
|
|
48462
|
-
"deprecationMessage": "",
|
|
48463
|
-
"tagName": {
|
|
48464
|
-
"text": "param"
|
|
48465
|
-
}
|
|
48466
|
-
}
|
|
48467
|
-
]
|
|
48468
|
-
},
|
|
48469
|
-
{
|
|
48470
|
-
"name": "isPartOfImport",
|
|
48471
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48472
|
-
"ctype": "miscellaneous",
|
|
48473
|
-
"subtype": "function",
|
|
48474
|
-
"coverageIgnore": false,
|
|
48475
|
-
"deprecated": false,
|
|
48476
|
-
"deprecationMessage": "",
|
|
48477
|
-
"rawdescription": "",
|
|
48478
|
-
"description": "",
|
|
48479
|
-
"displayName": "isPartOfImport",
|
|
48480
|
-
"args": [
|
|
48481
|
-
{
|
|
48482
|
-
"name": "node",
|
|
48483
|
-
"deprecated": false,
|
|
48484
|
-
"deprecationMessage": ""
|
|
48485
|
-
}
|
|
48486
|
-
],
|
|
48487
|
-
"returnType": "boolean",
|
|
48488
|
-
"jsdoctags": [
|
|
48489
|
-
{
|
|
48490
|
-
"name": "node",
|
|
48491
|
-
"deprecated": false,
|
|
48492
|
-
"deprecationMessage": "",
|
|
48493
|
-
"tagName": {
|
|
48494
|
-
"text": "param"
|
|
48495
|
-
}
|
|
48496
|
-
}
|
|
48497
|
-
]
|
|
48498
|
-
},
|
|
48499
|
-
{
|
|
48500
|
-
"name": "migrateEuiTooltip",
|
|
48501
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48502
|
-
"ctype": "miscellaneous",
|
|
48503
|
-
"subtype": "function",
|
|
48504
|
-
"coverageIgnore": false,
|
|
48505
|
-
"deprecated": false,
|
|
48506
|
-
"deprecationMessage": "",
|
|
48507
|
-
"rawdescription": "",
|
|
48508
|
-
"description": "",
|
|
48509
|
-
"displayName": "migrateEuiTooltip",
|
|
48510
|
-
"args": [
|
|
48511
|
-
{
|
|
48512
|
-
"name": "options",
|
|
48513
|
-
"type": "Schema",
|
|
48514
|
-
"deprecated": false,
|
|
48515
|
-
"deprecationMessage": "",
|
|
48516
|
-
"defaultValue": "{}"
|
|
48517
|
-
}
|
|
48518
|
-
],
|
|
48519
|
-
"returnType": "Rule",
|
|
48520
|
-
"jsdoctags": [
|
|
48521
|
-
{
|
|
48522
|
-
"name": "options",
|
|
48523
|
-
"type": "Schema",
|
|
48524
|
-
"deprecated": false,
|
|
48525
|
-
"deprecationMessage": "",
|
|
48526
|
-
"defaultValue": "{}",
|
|
48527
|
-
"tagName": {
|
|
48528
|
-
"text": "param"
|
|
48529
|
-
}
|
|
48530
|
-
}
|
|
48531
|
-
]
|
|
48532
|
-
},
|
|
48533
|
-
{
|
|
48534
|
-
"name": "migrateTypeScript",
|
|
48535
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48536
|
-
"ctype": "miscellaneous",
|
|
48537
|
-
"subtype": "function",
|
|
48538
|
-
"coverageIgnore": false,
|
|
48539
|
-
"deprecated": false,
|
|
48540
|
-
"deprecationMessage": "",
|
|
48541
|
-
"rawdescription": "",
|
|
48542
|
-
"description": "",
|
|
48543
|
-
"displayName": "migrateTypeScript",
|
|
48544
|
-
"args": [
|
|
48545
|
-
{
|
|
48546
|
-
"name": "source",
|
|
48547
|
-
"type": "string",
|
|
48548
|
-
"deprecated": false,
|
|
48549
|
-
"deprecationMessage": ""
|
|
48550
|
-
},
|
|
48551
|
-
{
|
|
48552
|
-
"name": "filePath",
|
|
48553
|
-
"type": "string",
|
|
48554
|
-
"deprecated": false,
|
|
48555
|
-
"deprecationMessage": ""
|
|
48556
|
-
},
|
|
48557
|
-
{
|
|
48558
|
-
"name": "context",
|
|
48559
|
-
"type": "SchematicContext",
|
|
48560
|
-
"deprecated": false,
|
|
48561
|
-
"deprecationMessage": ""
|
|
48562
|
-
}
|
|
48563
|
-
],
|
|
48564
|
-
"returnType": "string",
|
|
48565
|
-
"jsdoctags": [
|
|
48566
|
-
{
|
|
48567
|
-
"name": "source",
|
|
48568
|
-
"type": "string",
|
|
48569
|
-
"deprecated": false,
|
|
48570
|
-
"deprecationMessage": "",
|
|
48571
|
-
"tagName": {
|
|
48572
|
-
"text": "param"
|
|
48573
|
-
}
|
|
48574
|
-
},
|
|
48575
|
-
{
|
|
48576
|
-
"name": "filePath",
|
|
48577
|
-
"type": "string",
|
|
48578
|
-
"deprecated": false,
|
|
48579
|
-
"deprecationMessage": "",
|
|
48580
|
-
"tagName": {
|
|
48581
|
-
"text": "param"
|
|
48582
|
-
}
|
|
48583
|
-
},
|
|
48584
|
-
{
|
|
48585
|
-
"name": "context",
|
|
48586
|
-
"type": "SchematicContext",
|
|
48587
|
-
"deprecated": false,
|
|
48588
|
-
"deprecationMessage": "",
|
|
48589
|
-
"tagName": {
|
|
48590
|
-
"text": "param"
|
|
48591
|
-
}
|
|
48592
|
-
}
|
|
48593
|
-
]
|
|
48594
|
-
},
|
|
48595
|
-
{
|
|
48596
|
-
"name": "removeImportSpecifier",
|
|
48597
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48598
|
-
"ctype": "miscellaneous",
|
|
48599
|
-
"subtype": "function",
|
|
48600
|
-
"coverageIgnore": false,
|
|
48601
|
-
"deprecated": false,
|
|
48602
|
-
"deprecationMessage": "",
|
|
48603
|
-
"rawdescription": "",
|
|
48604
|
-
"description": "",
|
|
48605
|
-
"displayName": "removeImportSpecifier",
|
|
48606
|
-
"args": [
|
|
48607
|
-
{
|
|
48608
|
-
"name": "namedImports",
|
|
48609
|
-
"deprecated": false,
|
|
48610
|
-
"deprecationMessage": ""
|
|
48611
|
-
},
|
|
48612
|
-
{
|
|
48613
|
-
"name": "specifier",
|
|
48614
|
-
"deprecated": false,
|
|
48615
|
-
"deprecationMessage": ""
|
|
48616
|
-
},
|
|
48617
|
-
{
|
|
48618
|
-
"name": "sourceFile",
|
|
48619
|
-
"deprecated": false,
|
|
48620
|
-
"deprecationMessage": ""
|
|
48621
|
-
},
|
|
48622
|
-
{
|
|
48623
|
-
"name": "edits",
|
|
48624
|
-
"deprecated": false,
|
|
48625
|
-
"deprecationMessage": ""
|
|
48626
|
-
}
|
|
48627
|
-
],
|
|
48628
|
-
"returnType": "void",
|
|
48629
|
-
"jsdoctags": [
|
|
48630
|
-
{
|
|
48631
|
-
"name": "namedImports",
|
|
48632
|
-
"deprecated": false,
|
|
48633
|
-
"deprecationMessage": "",
|
|
48634
|
-
"tagName": {
|
|
48635
|
-
"text": "param"
|
|
48636
|
-
}
|
|
48637
|
-
},
|
|
48638
|
-
{
|
|
48639
|
-
"name": "specifier",
|
|
48640
|
-
"deprecated": false,
|
|
48641
|
-
"deprecationMessage": "",
|
|
48642
|
-
"tagName": {
|
|
48643
|
-
"text": "param"
|
|
48644
|
-
}
|
|
48645
|
-
},
|
|
48646
|
-
{
|
|
48647
|
-
"name": "sourceFile",
|
|
48648
|
-
"deprecated": false,
|
|
48649
|
-
"deprecationMessage": "",
|
|
48650
|
-
"tagName": {
|
|
48651
|
-
"text": "param"
|
|
48652
|
-
}
|
|
48653
|
-
},
|
|
48654
|
-
{
|
|
48655
|
-
"name": "edits",
|
|
48656
|
-
"deprecated": false,
|
|
48657
|
-
"deprecationMessage": "",
|
|
48658
|
-
"tagName": {
|
|
48659
|
-
"text": "param"
|
|
48660
|
-
}
|
|
48661
|
-
}
|
|
48662
|
-
]
|
|
48663
|
-
},
|
|
48664
|
-
{
|
|
48665
|
-
"name": "visitDir",
|
|
48666
|
-
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
48667
|
-
"ctype": "miscellaneous",
|
|
48668
|
-
"subtype": "function",
|
|
48669
|
-
"coverageIgnore": false,
|
|
48670
|
-
"deprecated": false,
|
|
48671
|
-
"deprecationMessage": "",
|
|
48672
|
-
"rawdescription": "",
|
|
48673
|
-
"description": "",
|
|
48674
|
-
"displayName": "visitDir",
|
|
48675
|
-
"args": [
|
|
48676
|
-
{
|
|
48677
|
-
"name": "dir",
|
|
48678
|
-
"type": "DirEntry",
|
|
48679
|
-
"deprecated": false,
|
|
48680
|
-
"deprecationMessage": ""
|
|
48681
|
-
},
|
|
48682
|
-
{
|
|
48683
|
-
"name": "callback",
|
|
48684
|
-
"deprecated": false,
|
|
48685
|
-
"deprecationMessage": ""
|
|
48686
|
-
}
|
|
48687
|
-
],
|
|
48688
|
-
"returnType": "void",
|
|
48689
|
-
"jsdoctags": [
|
|
48690
|
-
{
|
|
48691
|
-
"name": "dir",
|
|
48692
|
-
"type": "DirEntry",
|
|
48693
|
-
"deprecated": false,
|
|
48694
|
-
"deprecationMessage": "",
|
|
48695
|
-
"tagName": {
|
|
48696
|
-
"text": "param"
|
|
48697
|
-
}
|
|
48698
|
-
},
|
|
48699
|
-
{
|
|
48700
|
-
"name": "callback",
|
|
48701
|
-
"deprecated": false,
|
|
48702
|
-
"deprecationMessage": "",
|
|
48703
|
-
"tagName": {
|
|
48704
|
-
"text": "param"
|
|
48705
|
-
}
|
|
48706
|
-
}
|
|
48707
|
-
]
|
|
48708
|
-
}
|
|
48709
|
-
],
|
|
48710
48342
|
"packages/core/schematics/migrate-to-signals/index.ts": [
|
|
48711
48343
|
{
|
|
48712
48344
|
"name": "applyEdits",
|
|
@@ -49542,6 +49174,374 @@
|
|
|
49542
49174
|
]
|
|
49543
49175
|
}
|
|
49544
49176
|
],
|
|
49177
|
+
"packages/core/schematics/migrate-eui-progress-circle/index.ts": [
|
|
49178
|
+
{
|
|
49179
|
+
"name": "applyEdits",
|
|
49180
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49181
|
+
"ctype": "miscellaneous",
|
|
49182
|
+
"subtype": "function",
|
|
49183
|
+
"coverageIgnore": false,
|
|
49184
|
+
"deprecated": false,
|
|
49185
|
+
"deprecationMessage": "",
|
|
49186
|
+
"rawdescription": "",
|
|
49187
|
+
"description": "",
|
|
49188
|
+
"displayName": "applyEdits",
|
|
49189
|
+
"args": [
|
|
49190
|
+
{
|
|
49191
|
+
"name": "source",
|
|
49192
|
+
"type": "string",
|
|
49193
|
+
"deprecated": false,
|
|
49194
|
+
"deprecationMessage": ""
|
|
49195
|
+
},
|
|
49196
|
+
{
|
|
49197
|
+
"name": "edits",
|
|
49198
|
+
"deprecated": false,
|
|
49199
|
+
"deprecationMessage": ""
|
|
49200
|
+
}
|
|
49201
|
+
],
|
|
49202
|
+
"returnType": "string",
|
|
49203
|
+
"jsdoctags": [
|
|
49204
|
+
{
|
|
49205
|
+
"name": "source",
|
|
49206
|
+
"type": "string",
|
|
49207
|
+
"deprecated": false,
|
|
49208
|
+
"deprecationMessage": "",
|
|
49209
|
+
"tagName": {
|
|
49210
|
+
"text": "param"
|
|
49211
|
+
}
|
|
49212
|
+
},
|
|
49213
|
+
{
|
|
49214
|
+
"name": "edits",
|
|
49215
|
+
"deprecated": false,
|
|
49216
|
+
"deprecationMessage": "",
|
|
49217
|
+
"tagName": {
|
|
49218
|
+
"text": "param"
|
|
49219
|
+
}
|
|
49220
|
+
}
|
|
49221
|
+
]
|
|
49222
|
+
},
|
|
49223
|
+
{
|
|
49224
|
+
"name": "collectRenames",
|
|
49225
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49226
|
+
"ctype": "miscellaneous",
|
|
49227
|
+
"subtype": "function",
|
|
49228
|
+
"coverageIgnore": false,
|
|
49229
|
+
"deprecated": false,
|
|
49230
|
+
"deprecationMessage": "",
|
|
49231
|
+
"rawdescription": "",
|
|
49232
|
+
"description": "",
|
|
49233
|
+
"displayName": "collectRenames",
|
|
49234
|
+
"args": [
|
|
49235
|
+
{
|
|
49236
|
+
"name": "element",
|
|
49237
|
+
"type": "TmplAstElement",
|
|
49238
|
+
"deprecated": false,
|
|
49239
|
+
"deprecationMessage": ""
|
|
49240
|
+
},
|
|
49241
|
+
{
|
|
49242
|
+
"name": "edits",
|
|
49243
|
+
"deprecated": false,
|
|
49244
|
+
"deprecationMessage": ""
|
|
49245
|
+
}
|
|
49246
|
+
],
|
|
49247
|
+
"returnType": "void",
|
|
49248
|
+
"jsdoctags": [
|
|
49249
|
+
{
|
|
49250
|
+
"name": "element",
|
|
49251
|
+
"type": "TmplAstElement",
|
|
49252
|
+
"deprecated": false,
|
|
49253
|
+
"deprecationMessage": "",
|
|
49254
|
+
"tagName": {
|
|
49255
|
+
"text": "param"
|
|
49256
|
+
}
|
|
49257
|
+
},
|
|
49258
|
+
{
|
|
49259
|
+
"name": "edits",
|
|
49260
|
+
"deprecated": false,
|
|
49261
|
+
"deprecationMessage": "",
|
|
49262
|
+
"tagName": {
|
|
49263
|
+
"text": "param"
|
|
49264
|
+
}
|
|
49265
|
+
}
|
|
49266
|
+
]
|
|
49267
|
+
},
|
|
49268
|
+
{
|
|
49269
|
+
"name": "isComponentMetadataProperty",
|
|
49270
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49271
|
+
"ctype": "miscellaneous",
|
|
49272
|
+
"subtype": "function",
|
|
49273
|
+
"coverageIgnore": false,
|
|
49274
|
+
"deprecated": false,
|
|
49275
|
+
"deprecationMessage": "",
|
|
49276
|
+
"rawdescription": "",
|
|
49277
|
+
"description": "",
|
|
49278
|
+
"displayName": "isComponentMetadataProperty",
|
|
49279
|
+
"args": [
|
|
49280
|
+
{
|
|
49281
|
+
"name": "node",
|
|
49282
|
+
"deprecated": false,
|
|
49283
|
+
"deprecationMessage": ""
|
|
49284
|
+
}
|
|
49285
|
+
],
|
|
49286
|
+
"returnType": "boolean",
|
|
49287
|
+
"jsdoctags": [
|
|
49288
|
+
{
|
|
49289
|
+
"name": "node",
|
|
49290
|
+
"deprecated": false,
|
|
49291
|
+
"deprecationMessage": "",
|
|
49292
|
+
"tagName": {
|
|
49293
|
+
"text": "param"
|
|
49294
|
+
}
|
|
49295
|
+
}
|
|
49296
|
+
]
|
|
49297
|
+
},
|
|
49298
|
+
{
|
|
49299
|
+
"name": "isTemplateProperty",
|
|
49300
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49301
|
+
"ctype": "miscellaneous",
|
|
49302
|
+
"subtype": "function",
|
|
49303
|
+
"coverageIgnore": false,
|
|
49304
|
+
"deprecated": false,
|
|
49305
|
+
"deprecationMessage": "",
|
|
49306
|
+
"rawdescription": "",
|
|
49307
|
+
"description": "",
|
|
49308
|
+
"displayName": "isTemplateProperty",
|
|
49309
|
+
"args": [
|
|
49310
|
+
{
|
|
49311
|
+
"name": "node",
|
|
49312
|
+
"deprecated": false,
|
|
49313
|
+
"deprecationMessage": ""
|
|
49314
|
+
}
|
|
49315
|
+
],
|
|
49316
|
+
"returnType": "boolean",
|
|
49317
|
+
"jsdoctags": [
|
|
49318
|
+
{
|
|
49319
|
+
"name": "node",
|
|
49320
|
+
"deprecated": false,
|
|
49321
|
+
"deprecationMessage": "",
|
|
49322
|
+
"tagName": {
|
|
49323
|
+
"text": "param"
|
|
49324
|
+
}
|
|
49325
|
+
}
|
|
49326
|
+
]
|
|
49327
|
+
},
|
|
49328
|
+
{
|
|
49329
|
+
"name": "migrateEuiProgressCircle",
|
|
49330
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49331
|
+
"ctype": "miscellaneous",
|
|
49332
|
+
"subtype": "function",
|
|
49333
|
+
"coverageIgnore": false,
|
|
49334
|
+
"deprecated": false,
|
|
49335
|
+
"deprecationMessage": "",
|
|
49336
|
+
"rawdescription": "",
|
|
49337
|
+
"description": "",
|
|
49338
|
+
"displayName": "migrateEuiProgressCircle",
|
|
49339
|
+
"args": [
|
|
49340
|
+
{
|
|
49341
|
+
"name": "options",
|
|
49342
|
+
"type": "Schema",
|
|
49343
|
+
"deprecated": false,
|
|
49344
|
+
"deprecationMessage": "",
|
|
49345
|
+
"defaultValue": "{}"
|
|
49346
|
+
}
|
|
49347
|
+
],
|
|
49348
|
+
"returnType": "Rule",
|
|
49349
|
+
"jsdoctags": [
|
|
49350
|
+
{
|
|
49351
|
+
"name": "options",
|
|
49352
|
+
"type": "Schema",
|
|
49353
|
+
"deprecated": false,
|
|
49354
|
+
"deprecationMessage": "",
|
|
49355
|
+
"defaultValue": "{}",
|
|
49356
|
+
"tagName": {
|
|
49357
|
+
"text": "param"
|
|
49358
|
+
}
|
|
49359
|
+
}
|
|
49360
|
+
]
|
|
49361
|
+
},
|
|
49362
|
+
{
|
|
49363
|
+
"name": "migrateInlineTemplates",
|
|
49364
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49365
|
+
"ctype": "miscellaneous",
|
|
49366
|
+
"subtype": "function",
|
|
49367
|
+
"coverageIgnore": false,
|
|
49368
|
+
"deprecated": false,
|
|
49369
|
+
"deprecationMessage": "",
|
|
49370
|
+
"rawdescription": "",
|
|
49371
|
+
"description": "",
|
|
49372
|
+
"displayName": "migrateInlineTemplates",
|
|
49373
|
+
"args": [
|
|
49374
|
+
{
|
|
49375
|
+
"name": "source",
|
|
49376
|
+
"type": "string",
|
|
49377
|
+
"deprecated": false,
|
|
49378
|
+
"deprecationMessage": ""
|
|
49379
|
+
}
|
|
49380
|
+
],
|
|
49381
|
+
"returnType": "string",
|
|
49382
|
+
"jsdoctags": [
|
|
49383
|
+
{
|
|
49384
|
+
"name": "source",
|
|
49385
|
+
"type": "string",
|
|
49386
|
+
"deprecated": false,
|
|
49387
|
+
"deprecationMessage": "",
|
|
49388
|
+
"tagName": {
|
|
49389
|
+
"text": "param"
|
|
49390
|
+
}
|
|
49391
|
+
}
|
|
49392
|
+
]
|
|
49393
|
+
},
|
|
49394
|
+
{
|
|
49395
|
+
"name": "migrateTemplate",
|
|
49396
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49397
|
+
"ctype": "miscellaneous",
|
|
49398
|
+
"subtype": "function",
|
|
49399
|
+
"coverageIgnore": false,
|
|
49400
|
+
"deprecated": false,
|
|
49401
|
+
"deprecationMessage": "",
|
|
49402
|
+
"rawdescription": "",
|
|
49403
|
+
"description": "",
|
|
49404
|
+
"displayName": "migrateTemplate",
|
|
49405
|
+
"args": [
|
|
49406
|
+
{
|
|
49407
|
+
"name": "source",
|
|
49408
|
+
"type": "string",
|
|
49409
|
+
"deprecated": false,
|
|
49410
|
+
"deprecationMessage": ""
|
|
49411
|
+
}
|
|
49412
|
+
],
|
|
49413
|
+
"returnType": "string",
|
|
49414
|
+
"jsdoctags": [
|
|
49415
|
+
{
|
|
49416
|
+
"name": "source",
|
|
49417
|
+
"type": "string",
|
|
49418
|
+
"deprecated": false,
|
|
49419
|
+
"deprecationMessage": "",
|
|
49420
|
+
"tagName": {
|
|
49421
|
+
"text": "param"
|
|
49422
|
+
}
|
|
49423
|
+
}
|
|
49424
|
+
]
|
|
49425
|
+
},
|
|
49426
|
+
{
|
|
49427
|
+
"name": "unwrapExpression",
|
|
49428
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49429
|
+
"ctype": "miscellaneous",
|
|
49430
|
+
"subtype": "function",
|
|
49431
|
+
"coverageIgnore": false,
|
|
49432
|
+
"deprecated": false,
|
|
49433
|
+
"deprecationMessage": "",
|
|
49434
|
+
"rawdescription": "",
|
|
49435
|
+
"description": "",
|
|
49436
|
+
"displayName": "unwrapExpression",
|
|
49437
|
+
"args": [
|
|
49438
|
+
{
|
|
49439
|
+
"name": "expression",
|
|
49440
|
+
"deprecated": false,
|
|
49441
|
+
"deprecationMessage": ""
|
|
49442
|
+
}
|
|
49443
|
+
],
|
|
49444
|
+
"returnType": "ts.Expression",
|
|
49445
|
+
"jsdoctags": [
|
|
49446
|
+
{
|
|
49447
|
+
"name": "expression",
|
|
49448
|
+
"deprecated": false,
|
|
49449
|
+
"deprecationMessage": "",
|
|
49450
|
+
"tagName": {
|
|
49451
|
+
"text": "param"
|
|
49452
|
+
}
|
|
49453
|
+
}
|
|
49454
|
+
]
|
|
49455
|
+
},
|
|
49456
|
+
{
|
|
49457
|
+
"name": "visitDir",
|
|
49458
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49459
|
+
"ctype": "miscellaneous",
|
|
49460
|
+
"subtype": "function",
|
|
49461
|
+
"coverageIgnore": false,
|
|
49462
|
+
"deprecated": false,
|
|
49463
|
+
"deprecationMessage": "",
|
|
49464
|
+
"rawdescription": "",
|
|
49465
|
+
"description": "",
|
|
49466
|
+
"displayName": "visitDir",
|
|
49467
|
+
"args": [
|
|
49468
|
+
{
|
|
49469
|
+
"name": "dir",
|
|
49470
|
+
"type": "DirEntry",
|
|
49471
|
+
"deprecated": false,
|
|
49472
|
+
"deprecationMessage": ""
|
|
49473
|
+
},
|
|
49474
|
+
{
|
|
49475
|
+
"name": "callback",
|
|
49476
|
+
"deprecated": false,
|
|
49477
|
+
"deprecationMessage": ""
|
|
49478
|
+
}
|
|
49479
|
+
],
|
|
49480
|
+
"returnType": "void",
|
|
49481
|
+
"jsdoctags": [
|
|
49482
|
+
{
|
|
49483
|
+
"name": "dir",
|
|
49484
|
+
"type": "DirEntry",
|
|
49485
|
+
"deprecated": false,
|
|
49486
|
+
"deprecationMessage": "",
|
|
49487
|
+
"tagName": {
|
|
49488
|
+
"text": "param"
|
|
49489
|
+
}
|
|
49490
|
+
},
|
|
49491
|
+
{
|
|
49492
|
+
"name": "callback",
|
|
49493
|
+
"deprecated": false,
|
|
49494
|
+
"deprecationMessage": "",
|
|
49495
|
+
"tagName": {
|
|
49496
|
+
"text": "param"
|
|
49497
|
+
}
|
|
49498
|
+
}
|
|
49499
|
+
]
|
|
49500
|
+
},
|
|
49501
|
+
{
|
|
49502
|
+
"name": "visitNodes",
|
|
49503
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
49504
|
+
"ctype": "miscellaneous",
|
|
49505
|
+
"subtype": "function",
|
|
49506
|
+
"coverageIgnore": false,
|
|
49507
|
+
"deprecated": false,
|
|
49508
|
+
"deprecationMessage": "",
|
|
49509
|
+
"rawdescription": "",
|
|
49510
|
+
"description": "",
|
|
49511
|
+
"displayName": "visitNodes",
|
|
49512
|
+
"args": [
|
|
49513
|
+
{
|
|
49514
|
+
"name": "nodes",
|
|
49515
|
+
"deprecated": false,
|
|
49516
|
+
"deprecationMessage": ""
|
|
49517
|
+
},
|
|
49518
|
+
{
|
|
49519
|
+
"name": "edits",
|
|
49520
|
+
"deprecated": false,
|
|
49521
|
+
"deprecationMessage": ""
|
|
49522
|
+
}
|
|
49523
|
+
],
|
|
49524
|
+
"returnType": "void",
|
|
49525
|
+
"jsdoctags": [
|
|
49526
|
+
{
|
|
49527
|
+
"name": "nodes",
|
|
49528
|
+
"deprecated": false,
|
|
49529
|
+
"deprecationMessage": "",
|
|
49530
|
+
"tagName": {
|
|
49531
|
+
"text": "param"
|
|
49532
|
+
}
|
|
49533
|
+
},
|
|
49534
|
+
{
|
|
49535
|
+
"name": "edits",
|
|
49536
|
+
"deprecated": false,
|
|
49537
|
+
"deprecationMessage": "",
|
|
49538
|
+
"tagName": {
|
|
49539
|
+
"text": "param"
|
|
49540
|
+
}
|
|
49541
|
+
}
|
|
49542
|
+
]
|
|
49543
|
+
}
|
|
49544
|
+
],
|
|
49545
49545
|
"packages/core/schematics/migrate-to-standalone/index.ts": [
|
|
49546
49546
|
{
|
|
49547
49547
|
"name": "applyReplacements",
|
|
@@ -50395,302 +50395,7 @@
|
|
|
50395
50395
|
},
|
|
50396
50396
|
{
|
|
50397
50397
|
"name": "visitDir",
|
|
50398
|
-
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
50399
|
-
"ctype": "miscellaneous",
|
|
50400
|
-
"subtype": "function",
|
|
50401
|
-
"coverageIgnore": false,
|
|
50402
|
-
"deprecated": false,
|
|
50403
|
-
"deprecationMessage": "",
|
|
50404
|
-
"rawdescription": "",
|
|
50405
|
-
"description": "",
|
|
50406
|
-
"displayName": "visitDir",
|
|
50407
|
-
"args": [
|
|
50408
|
-
{
|
|
50409
|
-
"name": "dir",
|
|
50410
|
-
"type": "DirEntry",
|
|
50411
|
-
"deprecated": false,
|
|
50412
|
-
"deprecationMessage": ""
|
|
50413
|
-
},
|
|
50414
|
-
{
|
|
50415
|
-
"name": "callback",
|
|
50416
|
-
"deprecated": false,
|
|
50417
|
-
"deprecationMessage": ""
|
|
50418
|
-
}
|
|
50419
|
-
],
|
|
50420
|
-
"returnType": "void",
|
|
50421
|
-
"jsdoctags": [
|
|
50422
|
-
{
|
|
50423
|
-
"name": "dir",
|
|
50424
|
-
"type": "DirEntry",
|
|
50425
|
-
"deprecated": false,
|
|
50426
|
-
"deprecationMessage": "",
|
|
50427
|
-
"tagName": {
|
|
50428
|
-
"text": "param"
|
|
50429
|
-
}
|
|
50430
|
-
},
|
|
50431
|
-
{
|
|
50432
|
-
"name": "callback",
|
|
50433
|
-
"deprecated": false,
|
|
50434
|
-
"deprecationMessage": "",
|
|
50435
|
-
"tagName": {
|
|
50436
|
-
"text": "param"
|
|
50437
|
-
}
|
|
50438
|
-
}
|
|
50439
|
-
]
|
|
50440
|
-
},
|
|
50441
|
-
{
|
|
50442
|
-
"name": "visitNodes",
|
|
50443
|
-
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
50444
|
-
"ctype": "miscellaneous",
|
|
50445
|
-
"subtype": "function",
|
|
50446
|
-
"coverageIgnore": false,
|
|
50447
|
-
"deprecated": false,
|
|
50448
|
-
"deprecationMessage": "",
|
|
50449
|
-
"rawdescription": "",
|
|
50450
|
-
"description": "",
|
|
50451
|
-
"displayName": "visitNodes",
|
|
50452
|
-
"args": [
|
|
50453
|
-
{
|
|
50454
|
-
"name": "nodes",
|
|
50455
|
-
"deprecated": false,
|
|
50456
|
-
"deprecationMessage": ""
|
|
50457
|
-
},
|
|
50458
|
-
{
|
|
50459
|
-
"name": "removals",
|
|
50460
|
-
"deprecated": false,
|
|
50461
|
-
"deprecationMessage": ""
|
|
50462
|
-
}
|
|
50463
|
-
],
|
|
50464
|
-
"returnType": "void",
|
|
50465
|
-
"jsdoctags": [
|
|
50466
|
-
{
|
|
50467
|
-
"name": "nodes",
|
|
50468
|
-
"deprecated": false,
|
|
50469
|
-
"deprecationMessage": "",
|
|
50470
|
-
"tagName": {
|
|
50471
|
-
"text": "param"
|
|
50472
|
-
}
|
|
50473
|
-
},
|
|
50474
|
-
{
|
|
50475
|
-
"name": "removals",
|
|
50476
|
-
"deprecated": false,
|
|
50477
|
-
"deprecationMessage": "",
|
|
50478
|
-
"tagName": {
|
|
50479
|
-
"text": "param"
|
|
50480
|
-
}
|
|
50481
|
-
}
|
|
50482
|
-
]
|
|
50483
|
-
}
|
|
50484
|
-
],
|
|
50485
|
-
"packages/core/schematics/migrate-eui-avatar/index.ts": [
|
|
50486
|
-
{
|
|
50487
|
-
"name": "collectRemovals",
|
|
50488
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50489
|
-
"ctype": "miscellaneous",
|
|
50490
|
-
"subtype": "function",
|
|
50491
|
-
"coverageIgnore": false,
|
|
50492
|
-
"deprecated": false,
|
|
50493
|
-
"deprecationMessage": "",
|
|
50494
|
-
"rawdescription": "",
|
|
50495
|
-
"description": "",
|
|
50496
|
-
"displayName": "collectRemovals",
|
|
50497
|
-
"args": [
|
|
50498
|
-
{
|
|
50499
|
-
"name": "element",
|
|
50500
|
-
"type": "TmplAstElement",
|
|
50501
|
-
"deprecated": false,
|
|
50502
|
-
"deprecationMessage": ""
|
|
50503
|
-
},
|
|
50504
|
-
{
|
|
50505
|
-
"name": "removals",
|
|
50506
|
-
"deprecated": false,
|
|
50507
|
-
"deprecationMessage": ""
|
|
50508
|
-
}
|
|
50509
|
-
],
|
|
50510
|
-
"returnType": "void",
|
|
50511
|
-
"jsdoctags": [
|
|
50512
|
-
{
|
|
50513
|
-
"name": "element",
|
|
50514
|
-
"type": "TmplAstElement",
|
|
50515
|
-
"deprecated": false,
|
|
50516
|
-
"deprecationMessage": "",
|
|
50517
|
-
"tagName": {
|
|
50518
|
-
"text": "param"
|
|
50519
|
-
}
|
|
50520
|
-
},
|
|
50521
|
-
{
|
|
50522
|
-
"name": "removals",
|
|
50523
|
-
"deprecated": false,
|
|
50524
|
-
"deprecationMessage": "",
|
|
50525
|
-
"tagName": {
|
|
50526
|
-
"text": "param"
|
|
50527
|
-
}
|
|
50528
|
-
}
|
|
50529
|
-
]
|
|
50530
|
-
},
|
|
50531
|
-
{
|
|
50532
|
-
"name": "getAttributeSpan",
|
|
50533
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50534
|
-
"ctype": "miscellaneous",
|
|
50535
|
-
"subtype": "function",
|
|
50536
|
-
"coverageIgnore": false,
|
|
50537
|
-
"deprecated": false,
|
|
50538
|
-
"deprecationMessage": "",
|
|
50539
|
-
"rawdescription": "",
|
|
50540
|
-
"description": "",
|
|
50541
|
-
"displayName": "getAttributeSpan",
|
|
50542
|
-
"args": [
|
|
50543
|
-
{
|
|
50544
|
-
"name": "attr",
|
|
50545
|
-
"deprecated": false,
|
|
50546
|
-
"deprecationMessage": ""
|
|
50547
|
-
}
|
|
50548
|
-
],
|
|
50549
|
-
"returnType": "{ start: number; end: number }",
|
|
50550
|
-
"jsdoctags": [
|
|
50551
|
-
{
|
|
50552
|
-
"name": "attr",
|
|
50553
|
-
"deprecated": false,
|
|
50554
|
-
"deprecationMessage": "",
|
|
50555
|
-
"tagName": {
|
|
50556
|
-
"text": "param"
|
|
50557
|
-
}
|
|
50558
|
-
}
|
|
50559
|
-
]
|
|
50560
|
-
},
|
|
50561
|
-
{
|
|
50562
|
-
"name": "isAvatarElement",
|
|
50563
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50564
|
-
"ctype": "miscellaneous",
|
|
50565
|
-
"subtype": "function",
|
|
50566
|
-
"coverageIgnore": false,
|
|
50567
|
-
"deprecated": false,
|
|
50568
|
-
"deprecationMessage": "",
|
|
50569
|
-
"rawdescription": "",
|
|
50570
|
-
"description": "",
|
|
50571
|
-
"displayName": "isAvatarElement",
|
|
50572
|
-
"args": [
|
|
50573
|
-
{
|
|
50574
|
-
"name": "element",
|
|
50575
|
-
"type": "TmplAstElement",
|
|
50576
|
-
"deprecated": false,
|
|
50577
|
-
"deprecationMessage": ""
|
|
50578
|
-
}
|
|
50579
|
-
],
|
|
50580
|
-
"returnType": "boolean",
|
|
50581
|
-
"jsdoctags": [
|
|
50582
|
-
{
|
|
50583
|
-
"name": "element",
|
|
50584
|
-
"type": "TmplAstElement",
|
|
50585
|
-
"deprecated": false,
|
|
50586
|
-
"deprecationMessage": "",
|
|
50587
|
-
"tagName": {
|
|
50588
|
-
"text": "param"
|
|
50589
|
-
}
|
|
50590
|
-
}
|
|
50591
|
-
]
|
|
50592
|
-
},
|
|
50593
|
-
{
|
|
50594
|
-
"name": "migrateEuiAvatar",
|
|
50595
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50596
|
-
"ctype": "miscellaneous",
|
|
50597
|
-
"subtype": "function",
|
|
50598
|
-
"coverageIgnore": false,
|
|
50599
|
-
"deprecated": false,
|
|
50600
|
-
"deprecationMessage": "",
|
|
50601
|
-
"rawdescription": "",
|
|
50602
|
-
"description": "",
|
|
50603
|
-
"displayName": "migrateEuiAvatar",
|
|
50604
|
-
"args": [
|
|
50605
|
-
{
|
|
50606
|
-
"name": "options",
|
|
50607
|
-
"type": "Schema",
|
|
50608
|
-
"deprecated": false,
|
|
50609
|
-
"deprecationMessage": "",
|
|
50610
|
-
"defaultValue": "{}"
|
|
50611
|
-
}
|
|
50612
|
-
],
|
|
50613
|
-
"returnType": "Rule",
|
|
50614
|
-
"jsdoctags": [
|
|
50615
|
-
{
|
|
50616
|
-
"name": "options",
|
|
50617
|
-
"type": "Schema",
|
|
50618
|
-
"deprecated": false,
|
|
50619
|
-
"deprecationMessage": "",
|
|
50620
|
-
"defaultValue": "{}",
|
|
50621
|
-
"tagName": {
|
|
50622
|
-
"text": "param"
|
|
50623
|
-
}
|
|
50624
|
-
}
|
|
50625
|
-
]
|
|
50626
|
-
},
|
|
50627
|
-
{
|
|
50628
|
-
"name": "migrateInlineTemplates",
|
|
50629
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50630
|
-
"ctype": "miscellaneous",
|
|
50631
|
-
"subtype": "function",
|
|
50632
|
-
"coverageIgnore": false,
|
|
50633
|
-
"deprecated": false,
|
|
50634
|
-
"deprecationMessage": "",
|
|
50635
|
-
"rawdescription": "",
|
|
50636
|
-
"description": "",
|
|
50637
|
-
"displayName": "migrateInlineTemplates",
|
|
50638
|
-
"args": [
|
|
50639
|
-
{
|
|
50640
|
-
"name": "source",
|
|
50641
|
-
"type": "string",
|
|
50642
|
-
"deprecated": false,
|
|
50643
|
-
"deprecationMessage": ""
|
|
50644
|
-
}
|
|
50645
|
-
],
|
|
50646
|
-
"returnType": "string",
|
|
50647
|
-
"jsdoctags": [
|
|
50648
|
-
{
|
|
50649
|
-
"name": "source",
|
|
50650
|
-
"type": "string",
|
|
50651
|
-
"deprecated": false,
|
|
50652
|
-
"deprecationMessage": "",
|
|
50653
|
-
"tagName": {
|
|
50654
|
-
"text": "param"
|
|
50655
|
-
}
|
|
50656
|
-
}
|
|
50657
|
-
]
|
|
50658
|
-
},
|
|
50659
|
-
{
|
|
50660
|
-
"name": "migrateTemplate",
|
|
50661
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50662
|
-
"ctype": "miscellaneous",
|
|
50663
|
-
"subtype": "function",
|
|
50664
|
-
"coverageIgnore": false,
|
|
50665
|
-
"deprecated": false,
|
|
50666
|
-
"deprecationMessage": "",
|
|
50667
|
-
"rawdescription": "",
|
|
50668
|
-
"description": "",
|
|
50669
|
-
"displayName": "migrateTemplate",
|
|
50670
|
-
"args": [
|
|
50671
|
-
{
|
|
50672
|
-
"name": "source",
|
|
50673
|
-
"type": "string",
|
|
50674
|
-
"deprecated": false,
|
|
50675
|
-
"deprecationMessage": ""
|
|
50676
|
-
}
|
|
50677
|
-
],
|
|
50678
|
-
"returnType": "string",
|
|
50679
|
-
"jsdoctags": [
|
|
50680
|
-
{
|
|
50681
|
-
"name": "source",
|
|
50682
|
-
"type": "string",
|
|
50683
|
-
"deprecated": false,
|
|
50684
|
-
"deprecationMessage": "",
|
|
50685
|
-
"tagName": {
|
|
50686
|
-
"text": "param"
|
|
50687
|
-
}
|
|
50688
|
-
}
|
|
50689
|
-
]
|
|
50690
|
-
},
|
|
50691
|
-
{
|
|
50692
|
-
"name": "visitDir",
|
|
50693
|
-
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50398
|
+
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
50694
50399
|
"ctype": "miscellaneous",
|
|
50695
50400
|
"subtype": "function",
|
|
50696
50401
|
"coverageIgnore": false,
|
|
@@ -50735,7 +50440,7 @@
|
|
|
50735
50440
|
},
|
|
50736
50441
|
{
|
|
50737
50442
|
"name": "visitNodes",
|
|
50738
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50443
|
+
"file": "packages/core/schematics/migrate-eui-alert/index.ts",
|
|
50739
50444
|
"ctype": "miscellaneous",
|
|
50740
50445
|
"subtype": "function",
|
|
50741
50446
|
"coverageIgnore": false,
|
|
@@ -50777,10 +50482,10 @@
|
|
|
50777
50482
|
]
|
|
50778
50483
|
}
|
|
50779
50484
|
],
|
|
50780
|
-
"packages/core/schematics/migrate-eui-
|
|
50485
|
+
"packages/core/schematics/migrate-eui-avatar/index.ts": [
|
|
50781
50486
|
{
|
|
50782
50487
|
"name": "collectRemovals",
|
|
50783
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50488
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50784
50489
|
"ctype": "miscellaneous",
|
|
50785
50490
|
"subtype": "function",
|
|
50786
50491
|
"coverageIgnore": false,
|
|
@@ -50825,7 +50530,7 @@
|
|
|
50825
50530
|
},
|
|
50826
50531
|
{
|
|
50827
50532
|
"name": "getAttributeSpan",
|
|
50828
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50533
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50829
50534
|
"ctype": "miscellaneous",
|
|
50830
50535
|
"subtype": "function",
|
|
50831
50536
|
"coverageIgnore": false,
|
|
@@ -50854,8 +50559,8 @@
|
|
|
50854
50559
|
]
|
|
50855
50560
|
},
|
|
50856
50561
|
{
|
|
50857
|
-
"name": "
|
|
50858
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50562
|
+
"name": "isAvatarElement",
|
|
50563
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50859
50564
|
"ctype": "miscellaneous",
|
|
50860
50565
|
"subtype": "function",
|
|
50861
50566
|
"coverageIgnore": false,
|
|
@@ -50863,7 +50568,7 @@
|
|
|
50863
50568
|
"deprecationMessage": "",
|
|
50864
50569
|
"rawdescription": "",
|
|
50865
50570
|
"description": "",
|
|
50866
|
-
"displayName": "
|
|
50571
|
+
"displayName": "isAvatarElement",
|
|
50867
50572
|
"args": [
|
|
50868
50573
|
{
|
|
50869
50574
|
"name": "element",
|
|
@@ -50886,8 +50591,8 @@
|
|
|
50886
50591
|
]
|
|
50887
50592
|
},
|
|
50888
50593
|
{
|
|
50889
|
-
"name": "
|
|
50890
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50594
|
+
"name": "migrateEuiAvatar",
|
|
50595
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50891
50596
|
"ctype": "miscellaneous",
|
|
50892
50597
|
"subtype": "function",
|
|
50893
50598
|
"coverageIgnore": false,
|
|
@@ -50895,7 +50600,7 @@
|
|
|
50895
50600
|
"deprecationMessage": "",
|
|
50896
50601
|
"rawdescription": "",
|
|
50897
50602
|
"description": "",
|
|
50898
|
-
"displayName": "
|
|
50603
|
+
"displayName": "migrateEuiAvatar",
|
|
50899
50604
|
"args": [
|
|
50900
50605
|
{
|
|
50901
50606
|
"name": "options",
|
|
@@ -50921,7 +50626,7 @@
|
|
|
50921
50626
|
},
|
|
50922
50627
|
{
|
|
50923
50628
|
"name": "migrateInlineTemplates",
|
|
50924
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50629
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50925
50630
|
"ctype": "miscellaneous",
|
|
50926
50631
|
"subtype": "function",
|
|
50927
50632
|
"coverageIgnore": false,
|
|
@@ -50953,7 +50658,7 @@
|
|
|
50953
50658
|
},
|
|
50954
50659
|
{
|
|
50955
50660
|
"name": "migrateTemplate",
|
|
50956
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50661
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50957
50662
|
"ctype": "miscellaneous",
|
|
50958
50663
|
"subtype": "function",
|
|
50959
50664
|
"coverageIgnore": false,
|
|
@@ -50985,7 +50690,7 @@
|
|
|
50985
50690
|
},
|
|
50986
50691
|
{
|
|
50987
50692
|
"name": "visitDir",
|
|
50988
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50693
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
50989
50694
|
"ctype": "miscellaneous",
|
|
50990
50695
|
"subtype": "function",
|
|
50991
50696
|
"coverageIgnore": false,
|
|
@@ -51030,7 +50735,7 @@
|
|
|
51030
50735
|
},
|
|
51031
50736
|
{
|
|
51032
50737
|
"name": "visitNodes",
|
|
51033
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
50738
|
+
"file": "packages/core/schematics/migrate-eui-avatar/index.ts",
|
|
51034
50739
|
"ctype": "miscellaneous",
|
|
51035
50740
|
"subtype": "function",
|
|
51036
50741
|
"coverageIgnore": false,
|
|
@@ -51335,6 +51040,301 @@
|
|
|
51335
51040
|
]
|
|
51336
51041
|
}
|
|
51337
51042
|
],
|
|
51043
|
+
"packages/core/schematics/migrate-eui-chip/index.ts": [
|
|
51044
|
+
{
|
|
51045
|
+
"name": "collectRemovals",
|
|
51046
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51047
|
+
"ctype": "miscellaneous",
|
|
51048
|
+
"subtype": "function",
|
|
51049
|
+
"coverageIgnore": false,
|
|
51050
|
+
"deprecated": false,
|
|
51051
|
+
"deprecationMessage": "",
|
|
51052
|
+
"rawdescription": "",
|
|
51053
|
+
"description": "",
|
|
51054
|
+
"displayName": "collectRemovals",
|
|
51055
|
+
"args": [
|
|
51056
|
+
{
|
|
51057
|
+
"name": "element",
|
|
51058
|
+
"type": "TmplAstElement",
|
|
51059
|
+
"deprecated": false,
|
|
51060
|
+
"deprecationMessage": ""
|
|
51061
|
+
},
|
|
51062
|
+
{
|
|
51063
|
+
"name": "removals",
|
|
51064
|
+
"deprecated": false,
|
|
51065
|
+
"deprecationMessage": ""
|
|
51066
|
+
}
|
|
51067
|
+
],
|
|
51068
|
+
"returnType": "void",
|
|
51069
|
+
"jsdoctags": [
|
|
51070
|
+
{
|
|
51071
|
+
"name": "element",
|
|
51072
|
+
"type": "TmplAstElement",
|
|
51073
|
+
"deprecated": false,
|
|
51074
|
+
"deprecationMessage": "",
|
|
51075
|
+
"tagName": {
|
|
51076
|
+
"text": "param"
|
|
51077
|
+
}
|
|
51078
|
+
},
|
|
51079
|
+
{
|
|
51080
|
+
"name": "removals",
|
|
51081
|
+
"deprecated": false,
|
|
51082
|
+
"deprecationMessage": "",
|
|
51083
|
+
"tagName": {
|
|
51084
|
+
"text": "param"
|
|
51085
|
+
}
|
|
51086
|
+
}
|
|
51087
|
+
]
|
|
51088
|
+
},
|
|
51089
|
+
{
|
|
51090
|
+
"name": "getAttributeSpan",
|
|
51091
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51092
|
+
"ctype": "miscellaneous",
|
|
51093
|
+
"subtype": "function",
|
|
51094
|
+
"coverageIgnore": false,
|
|
51095
|
+
"deprecated": false,
|
|
51096
|
+
"deprecationMessage": "",
|
|
51097
|
+
"rawdescription": "",
|
|
51098
|
+
"description": "",
|
|
51099
|
+
"displayName": "getAttributeSpan",
|
|
51100
|
+
"args": [
|
|
51101
|
+
{
|
|
51102
|
+
"name": "attr",
|
|
51103
|
+
"deprecated": false,
|
|
51104
|
+
"deprecationMessage": ""
|
|
51105
|
+
}
|
|
51106
|
+
],
|
|
51107
|
+
"returnType": "{ start: number; end: number }",
|
|
51108
|
+
"jsdoctags": [
|
|
51109
|
+
{
|
|
51110
|
+
"name": "attr",
|
|
51111
|
+
"deprecated": false,
|
|
51112
|
+
"deprecationMessage": "",
|
|
51113
|
+
"tagName": {
|
|
51114
|
+
"text": "param"
|
|
51115
|
+
}
|
|
51116
|
+
}
|
|
51117
|
+
]
|
|
51118
|
+
},
|
|
51119
|
+
{
|
|
51120
|
+
"name": "isChipElement",
|
|
51121
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51122
|
+
"ctype": "miscellaneous",
|
|
51123
|
+
"subtype": "function",
|
|
51124
|
+
"coverageIgnore": false,
|
|
51125
|
+
"deprecated": false,
|
|
51126
|
+
"deprecationMessage": "",
|
|
51127
|
+
"rawdescription": "",
|
|
51128
|
+
"description": "",
|
|
51129
|
+
"displayName": "isChipElement",
|
|
51130
|
+
"args": [
|
|
51131
|
+
{
|
|
51132
|
+
"name": "element",
|
|
51133
|
+
"type": "TmplAstElement",
|
|
51134
|
+
"deprecated": false,
|
|
51135
|
+
"deprecationMessage": ""
|
|
51136
|
+
}
|
|
51137
|
+
],
|
|
51138
|
+
"returnType": "boolean",
|
|
51139
|
+
"jsdoctags": [
|
|
51140
|
+
{
|
|
51141
|
+
"name": "element",
|
|
51142
|
+
"type": "TmplAstElement",
|
|
51143
|
+
"deprecated": false,
|
|
51144
|
+
"deprecationMessage": "",
|
|
51145
|
+
"tagName": {
|
|
51146
|
+
"text": "param"
|
|
51147
|
+
}
|
|
51148
|
+
}
|
|
51149
|
+
]
|
|
51150
|
+
},
|
|
51151
|
+
{
|
|
51152
|
+
"name": "migrateEuiChip",
|
|
51153
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51154
|
+
"ctype": "miscellaneous",
|
|
51155
|
+
"subtype": "function",
|
|
51156
|
+
"coverageIgnore": false,
|
|
51157
|
+
"deprecated": false,
|
|
51158
|
+
"deprecationMessage": "",
|
|
51159
|
+
"rawdescription": "",
|
|
51160
|
+
"description": "",
|
|
51161
|
+
"displayName": "migrateEuiChip",
|
|
51162
|
+
"args": [
|
|
51163
|
+
{
|
|
51164
|
+
"name": "options",
|
|
51165
|
+
"type": "Schema",
|
|
51166
|
+
"deprecated": false,
|
|
51167
|
+
"deprecationMessage": "",
|
|
51168
|
+
"defaultValue": "{}"
|
|
51169
|
+
}
|
|
51170
|
+
],
|
|
51171
|
+
"returnType": "Rule",
|
|
51172
|
+
"jsdoctags": [
|
|
51173
|
+
{
|
|
51174
|
+
"name": "options",
|
|
51175
|
+
"type": "Schema",
|
|
51176
|
+
"deprecated": false,
|
|
51177
|
+
"deprecationMessage": "",
|
|
51178
|
+
"defaultValue": "{}",
|
|
51179
|
+
"tagName": {
|
|
51180
|
+
"text": "param"
|
|
51181
|
+
}
|
|
51182
|
+
}
|
|
51183
|
+
]
|
|
51184
|
+
},
|
|
51185
|
+
{
|
|
51186
|
+
"name": "migrateInlineTemplates",
|
|
51187
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51188
|
+
"ctype": "miscellaneous",
|
|
51189
|
+
"subtype": "function",
|
|
51190
|
+
"coverageIgnore": false,
|
|
51191
|
+
"deprecated": false,
|
|
51192
|
+
"deprecationMessage": "",
|
|
51193
|
+
"rawdescription": "",
|
|
51194
|
+
"description": "",
|
|
51195
|
+
"displayName": "migrateInlineTemplates",
|
|
51196
|
+
"args": [
|
|
51197
|
+
{
|
|
51198
|
+
"name": "source",
|
|
51199
|
+
"type": "string",
|
|
51200
|
+
"deprecated": false,
|
|
51201
|
+
"deprecationMessage": ""
|
|
51202
|
+
}
|
|
51203
|
+
],
|
|
51204
|
+
"returnType": "string",
|
|
51205
|
+
"jsdoctags": [
|
|
51206
|
+
{
|
|
51207
|
+
"name": "source",
|
|
51208
|
+
"type": "string",
|
|
51209
|
+
"deprecated": false,
|
|
51210
|
+
"deprecationMessage": "",
|
|
51211
|
+
"tagName": {
|
|
51212
|
+
"text": "param"
|
|
51213
|
+
}
|
|
51214
|
+
}
|
|
51215
|
+
]
|
|
51216
|
+
},
|
|
51217
|
+
{
|
|
51218
|
+
"name": "migrateTemplate",
|
|
51219
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51220
|
+
"ctype": "miscellaneous",
|
|
51221
|
+
"subtype": "function",
|
|
51222
|
+
"coverageIgnore": false,
|
|
51223
|
+
"deprecated": false,
|
|
51224
|
+
"deprecationMessage": "",
|
|
51225
|
+
"rawdescription": "",
|
|
51226
|
+
"description": "",
|
|
51227
|
+
"displayName": "migrateTemplate",
|
|
51228
|
+
"args": [
|
|
51229
|
+
{
|
|
51230
|
+
"name": "source",
|
|
51231
|
+
"type": "string",
|
|
51232
|
+
"deprecated": false,
|
|
51233
|
+
"deprecationMessage": ""
|
|
51234
|
+
}
|
|
51235
|
+
],
|
|
51236
|
+
"returnType": "string",
|
|
51237
|
+
"jsdoctags": [
|
|
51238
|
+
{
|
|
51239
|
+
"name": "source",
|
|
51240
|
+
"type": "string",
|
|
51241
|
+
"deprecated": false,
|
|
51242
|
+
"deprecationMessage": "",
|
|
51243
|
+
"tagName": {
|
|
51244
|
+
"text": "param"
|
|
51245
|
+
}
|
|
51246
|
+
}
|
|
51247
|
+
]
|
|
51248
|
+
},
|
|
51249
|
+
{
|
|
51250
|
+
"name": "visitDir",
|
|
51251
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51252
|
+
"ctype": "miscellaneous",
|
|
51253
|
+
"subtype": "function",
|
|
51254
|
+
"coverageIgnore": false,
|
|
51255
|
+
"deprecated": false,
|
|
51256
|
+
"deprecationMessage": "",
|
|
51257
|
+
"rawdescription": "",
|
|
51258
|
+
"description": "",
|
|
51259
|
+
"displayName": "visitDir",
|
|
51260
|
+
"args": [
|
|
51261
|
+
{
|
|
51262
|
+
"name": "dir",
|
|
51263
|
+
"type": "DirEntry",
|
|
51264
|
+
"deprecated": false,
|
|
51265
|
+
"deprecationMessage": ""
|
|
51266
|
+
},
|
|
51267
|
+
{
|
|
51268
|
+
"name": "callback",
|
|
51269
|
+
"deprecated": false,
|
|
51270
|
+
"deprecationMessage": ""
|
|
51271
|
+
}
|
|
51272
|
+
],
|
|
51273
|
+
"returnType": "void",
|
|
51274
|
+
"jsdoctags": [
|
|
51275
|
+
{
|
|
51276
|
+
"name": "dir",
|
|
51277
|
+
"type": "DirEntry",
|
|
51278
|
+
"deprecated": false,
|
|
51279
|
+
"deprecationMessage": "",
|
|
51280
|
+
"tagName": {
|
|
51281
|
+
"text": "param"
|
|
51282
|
+
}
|
|
51283
|
+
},
|
|
51284
|
+
{
|
|
51285
|
+
"name": "callback",
|
|
51286
|
+
"deprecated": false,
|
|
51287
|
+
"deprecationMessage": "",
|
|
51288
|
+
"tagName": {
|
|
51289
|
+
"text": "param"
|
|
51290
|
+
}
|
|
51291
|
+
}
|
|
51292
|
+
]
|
|
51293
|
+
},
|
|
51294
|
+
{
|
|
51295
|
+
"name": "visitNodes",
|
|
51296
|
+
"file": "packages/core/schematics/migrate-eui-chip/index.ts",
|
|
51297
|
+
"ctype": "miscellaneous",
|
|
51298
|
+
"subtype": "function",
|
|
51299
|
+
"coverageIgnore": false,
|
|
51300
|
+
"deprecated": false,
|
|
51301
|
+
"deprecationMessage": "",
|
|
51302
|
+
"rawdescription": "",
|
|
51303
|
+
"description": "",
|
|
51304
|
+
"displayName": "visitNodes",
|
|
51305
|
+
"args": [
|
|
51306
|
+
{
|
|
51307
|
+
"name": "nodes",
|
|
51308
|
+
"deprecated": false,
|
|
51309
|
+
"deprecationMessage": ""
|
|
51310
|
+
},
|
|
51311
|
+
{
|
|
51312
|
+
"name": "removals",
|
|
51313
|
+
"deprecated": false,
|
|
51314
|
+
"deprecationMessage": ""
|
|
51315
|
+
}
|
|
51316
|
+
],
|
|
51317
|
+
"returnType": "void",
|
|
51318
|
+
"jsdoctags": [
|
|
51319
|
+
{
|
|
51320
|
+
"name": "nodes",
|
|
51321
|
+
"deprecated": false,
|
|
51322
|
+
"deprecationMessage": "",
|
|
51323
|
+
"tagName": {
|
|
51324
|
+
"text": "param"
|
|
51325
|
+
}
|
|
51326
|
+
},
|
|
51327
|
+
{
|
|
51328
|
+
"name": "removals",
|
|
51329
|
+
"deprecated": false,
|
|
51330
|
+
"deprecationMessage": "",
|
|
51331
|
+
"tagName": {
|
|
51332
|
+
"text": "param"
|
|
51333
|
+
}
|
|
51334
|
+
}
|
|
51335
|
+
]
|
|
51336
|
+
}
|
|
51337
|
+
],
|
|
51338
51338
|
"packages/core/schematics/migrate-eui-popover/index.ts": [
|
|
51339
51339
|
{
|
|
51340
51340
|
"name": "collectRemovals",
|