@eui/core 23.0.0-alpha.7 → 23.0.0-alpha.8
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 +45 -0
- package/docs/interfaces/Schema-13.html +1 -1
- package/docs/interfaces/Schema-14.html +1 -1
- package/docs/interfaces/Schema-15.html +1 -1
- package/docs/interfaces/Schema-16.html +1 -1
- package/docs/interfaces/Schema-17.html +1 -1
- package/docs/interfaces/Schema-18.html +1 -1
- package/docs/interfaces/Schema-19.html +1 -1
- package/docs/interfaces/Schema-2.html +15 -33
- package/docs/interfaces/Schema-20.html +1 -1
- package/docs/interfaces/Schema-21.html +1 -1
- package/docs/interfaces/Schema-3.html +33 -15
- package/docs/interfaces/Schema-6.html +1 -1
- package/docs/interfaces/Schema-7.html +1 -1
- package/docs/interfaces/Schema-8.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +589 -589
- package/docs/llms.txt +58 -58
- package/docs/miscellaneous/functions.html +594 -594
- package/docs/miscellaneous/variables.html +41 -41
- 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-e1cd02924eb82a618c71a0b26c081bdd020519d2699aa0e2dc98640c4e0f347c3649b967c5fc87543e41bbbfabd1304835850ccc38f40684d6521c242b2030ed-2",
|
|
913
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
914
914
|
"deprecated": false,
|
|
915
915
|
"deprecationMessage": "",
|
|
916
916
|
"type": "interface",
|
|
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",
|
|
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",
|
|
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": 23,
|
|
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": 24,
|
|
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": 22,
|
|
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-d36032102ed30a7ada1e3d36bb9ca41b7234b855760cac9783a25818f7ffe2097e1ebd8e808b574ddec0760f827272f6cd561f45f3eb1578f87f39ee2633730a-3",
|
|
972
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
973
973
|
"deprecated": false,
|
|
974
974
|
"deprecationMessage": "",
|
|
975
975
|
"type": "interface",
|
|
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",
|
|
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",
|
|
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": 12,
|
|
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": 13,
|
|
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": 11,
|
|
1013
1013
|
"rawdescription": "\n"
|
|
1014
1014
|
}
|
|
1015
1015
|
],
|
|
@@ -2527,12 +2527,12 @@
|
|
|
2527
2527
|
},
|
|
2528
2528
|
{
|
|
2529
2529
|
"name": "Schema",
|
|
2530
|
-
"id": "interface-Schema-
|
|
2531
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2530
|
+
"id": "interface-Schema-869dfc324e9111966817cbebb3553eabfe200acfe33bb77efa71a6c46e1cba0ff5852de7b9ade3060f87264035b99591361331a9e0622daaac22b8d59146c761-10",
|
|
2531
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
2532
2532
|
"deprecated": false,
|
|
2533
2533
|
"deprecationMessage": "",
|
|
2534
2534
|
"type": "interface",
|
|
2535
|
-
"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\
|
|
2535
|
+
"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",
|
|
2536
2536
|
"displayName": "Schema",
|
|
2537
2537
|
"properties": [
|
|
2538
2538
|
{
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
"indexKey": "",
|
|
2545
2545
|
"optional": true,
|
|
2546
2546
|
"description": "",
|
|
2547
|
-
"line":
|
|
2547
|
+
"line": 8,
|
|
2548
2548
|
"rawdescription": "\n"
|
|
2549
2549
|
},
|
|
2550
2550
|
{
|
|
@@ -2556,7 +2556,7 @@
|
|
|
2556
2556
|
"indexKey": "",
|
|
2557
2557
|
"optional": true,
|
|
2558
2558
|
"description": "",
|
|
2559
|
-
"line":
|
|
2559
|
+
"line": 7,
|
|
2560
2560
|
"rawdescription": "\n"
|
|
2561
2561
|
}
|
|
2562
2562
|
],
|
|
@@ -2574,12 +2574,12 @@
|
|
|
2574
2574
|
},
|
|
2575
2575
|
{
|
|
2576
2576
|
"name": "Schema",
|
|
2577
|
-
"id": "interface-Schema-
|
|
2578
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2577
|
+
"id": "interface-Schema-375dc0924084a2acbafe4a6a32577d59f631c9a386d151180d8fb1c89e7e7cd23da9fd459e597592ed823692adb6ad2633c50baf16621f003246e8c9bb1c6ce0-11",
|
|
2578
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
2579
2579
|
"deprecated": false,
|
|
2580
2580
|
"deprecationMessage": "",
|
|
2581
2581
|
"type": "interface",
|
|
2582
|
-
"sourceCode": "import { parseTemplate,
|
|
2582
|
+
"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 COMPONENT_TAG = 'eui-editor';\nconst OLD_NAME = 'onEditorChanged';\nconst NEW_NAME = 'contentChange';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nexport function migrateEuiEditor(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\n if (path.endsWith('.html')) {\n if (!original.includes(COMPONENT_TAG)) return;\n const result = migrateTemplate(original);\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename '${OLD_NAME}' → '${NEW_NAME}' in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n return;\n }\n\n // .ts file — handle both migration and warnings in one pass\n const hasTag = original.includes(COMPONENT_TAG);\n const hasOldName = original.includes(OLD_NAME);\n if (!hasTag && !hasOldName) return;\n\n if (hasTag) {\n const result = migrateInlineTemplates(original);\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename '${OLD_NAME}' → '${NEW_NAME}' in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n }\n\n // Warn about TS property access usages (skip spec files)\n if (hasOldName && !path.endsWith('.spec.ts')) {\n warnPropertyAccesses(path, original, context);\n }\n });\n\n context.logger.info(`Renamed '(${OLD_NAME})' → '(${NEW_NAME})' on ${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 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(COMPONENT_TAG)) {\n ts.forEachChild(node, visit); return;\n}\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, text: migrated });\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 warnPropertyAccesses(path: string, source: string, context: SchematicContext): void {\n const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"${OLD_NAME}\" has been renamed to \"${NEW_NAME}\" on ${COMPONENT_TAG}. Update this reference manually.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\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 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 === COMPONENT_TAG) collectRenames(node, edits);\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const output of element.outputs) {\n if (output.name === OLD_NAME) {\n edits.push({ start: output.keySpan!.start.offset, end: output.keySpan!.end.offset, replacement: NEW_NAME });\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",
|
|
2583
2583
|
"displayName": "Schema",
|
|
2584
2584
|
"properties": [
|
|
2585
2585
|
{
|
|
@@ -2591,7 +2591,7 @@
|
|
|
2591
2591
|
"indexKey": "",
|
|
2592
2592
|
"optional": true,
|
|
2593
2593
|
"description": "",
|
|
2594
|
-
"line":
|
|
2594
|
+
"line": 12,
|
|
2595
2595
|
"rawdescription": "\n"
|
|
2596
2596
|
},
|
|
2597
2597
|
{
|
|
@@ -2603,7 +2603,7 @@
|
|
|
2603
2603
|
"indexKey": "",
|
|
2604
2604
|
"optional": true,
|
|
2605
2605
|
"description": "",
|
|
2606
|
-
"line":
|
|
2606
|
+
"line": 11,
|
|
2607
2607
|
"rawdescription": "\n"
|
|
2608
2608
|
}
|
|
2609
2609
|
],
|
|
@@ -2950,12 +2950,12 @@
|
|
|
2950
2950
|
},
|
|
2951
2951
|
{
|
|
2952
2952
|
"name": "Schema",
|
|
2953
|
-
"id": "interface-Schema-
|
|
2954
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2953
|
+
"id": "interface-Schema-e1cd02924eb82a618c71a0b26c081bdd020519d2699aa0e2dc98640c4e0f347c3649b967c5fc87543e41bbbfabd1304835850ccc38f40684d6521c242b2030ed-19",
|
|
2954
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
2955
2955
|
"deprecated": false,
|
|
2956
2956
|
"deprecationMessage": "",
|
|
2957
2957
|
"type": "interface",
|
|
2958
|
-
"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",
|
|
2958
|
+
"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",
|
|
2959
2959
|
"displayName": "Schema",
|
|
2960
2960
|
"properties": [
|
|
2961
2961
|
{
|
|
@@ -2967,7 +2967,7 @@
|
|
|
2967
2967
|
"indexKey": "",
|
|
2968
2968
|
"optional": true,
|
|
2969
2969
|
"description": "",
|
|
2970
|
-
"line":
|
|
2970
|
+
"line": 18,
|
|
2971
2971
|
"rawdescription": "\n"
|
|
2972
2972
|
},
|
|
2973
2973
|
{
|
|
@@ -2979,7 +2979,7 @@
|
|
|
2979
2979
|
"indexKey": "",
|
|
2980
2980
|
"optional": true,
|
|
2981
2981
|
"description": "",
|
|
2982
|
-
"line":
|
|
2982
|
+
"line": 17,
|
|
2983
2983
|
"rawdescription": "\n"
|
|
2984
2984
|
}
|
|
2985
2985
|
],
|
|
@@ -2997,12 +2997,12 @@
|
|
|
2997
2997
|
},
|
|
2998
2998
|
{
|
|
2999
2999
|
"name": "Schema",
|
|
3000
|
-
"id": "interface-Schema-
|
|
3001
|
-
"file": "packages/core/schematics/migrate-
|
|
3000
|
+
"id": "interface-Schema-d36032102ed30a7ada1e3d36bb9ca41b7234b855760cac9783a25818f7ffe2097e1ebd8e808b574ddec0760f827272f6cd561f45f3eb1578f87f39ee2633730a-20",
|
|
3001
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
3002
3002
|
"deprecated": false,
|
|
3003
3003
|
"deprecationMessage": "",
|
|
3004
3004
|
"type": "interface",
|
|
3005
|
-
"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",
|
|
3005
|
+
"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",
|
|
3006
3006
|
"displayName": "Schema",
|
|
3007
3007
|
"properties": [
|
|
3008
3008
|
{
|
|
@@ -3014,7 +3014,7 @@
|
|
|
3014
3014
|
"indexKey": "",
|
|
3015
3015
|
"optional": true,
|
|
3016
3016
|
"description": "",
|
|
3017
|
-
"line":
|
|
3017
|
+
"line": 7,
|
|
3018
3018
|
"rawdescription": "\n"
|
|
3019
3019
|
},
|
|
3020
3020
|
{
|
|
@@ -3026,7 +3026,7 @@
|
|
|
3026
3026
|
"indexKey": "",
|
|
3027
3027
|
"optional": true,
|
|
3028
3028
|
"description": "",
|
|
3029
|
-
"line":
|
|
3029
|
+
"line": 6,
|
|
3030
3030
|
"rawdescription": "\n"
|
|
3031
3031
|
}
|
|
3032
3032
|
],
|
|
@@ -3044,12 +3044,12 @@
|
|
|
3044
3044
|
},
|
|
3045
3045
|
{
|
|
3046
3046
|
"name": "Schema",
|
|
3047
|
-
"id": "interface-Schema-
|
|
3048
|
-
"file": "packages/core/schematics/migrate-
|
|
3047
|
+
"id": "interface-Schema-817c4b549cc3eab9fcf4936acab2e71182d90a4480369f5c003cbbda10792efa587ad99d65acf049f64e7030e32589e4fabc4a6d7a5621e4fe54725ef91dc9e8-21",
|
|
3048
|
+
"file": "packages/core/schematics/migrate-to-standalone/index.ts",
|
|
3049
3049
|
"deprecated": false,
|
|
3050
3050
|
"deprecationMessage": "",
|
|
3051
3051
|
"type": "interface",
|
|
3052
|
-
"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",
|
|
3052
|
+
"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",
|
|
3053
3053
|
"displayName": "Schema",
|
|
3054
3054
|
"properties": [
|
|
3055
3055
|
{
|
|
@@ -3061,7 +3061,7 @@
|
|
|
3061
3061
|
"indexKey": "",
|
|
3062
3062
|
"optional": true,
|
|
3063
3063
|
"description": "",
|
|
3064
|
-
"line":
|
|
3064
|
+
"line": 460,
|
|
3065
3065
|
"rawdescription": "\n"
|
|
3066
3066
|
},
|
|
3067
3067
|
{
|
|
@@ -3073,7 +3073,7 @@
|
|
|
3073
3073
|
"indexKey": "",
|
|
3074
3074
|
"optional": true,
|
|
3075
3075
|
"description": "",
|
|
3076
|
-
"line":
|
|
3076
|
+
"line": 459,
|
|
3077
3077
|
"rawdescription": "\n"
|
|
3078
3078
|
}
|
|
3079
3079
|
],
|
|
@@ -22081,23 +22081,23 @@
|
|
|
22081
22081
|
"name": "COMPONENT_TAG",
|
|
22082
22082
|
"ctype": "miscellaneous",
|
|
22083
22083
|
"subtype": "variable",
|
|
22084
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22084
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
22085
22085
|
"coverageIgnore": false,
|
|
22086
22086
|
"deprecated": false,
|
|
22087
22087
|
"deprecationMessage": "",
|
|
22088
22088
|
"type": "string",
|
|
22089
|
-
"defaultValue": "'eui-
|
|
22089
|
+
"defaultValue": "'eui-discussion-thread'"
|
|
22090
22090
|
},
|
|
22091
22091
|
{
|
|
22092
22092
|
"name": "COMPONENT_TAG",
|
|
22093
22093
|
"ctype": "miscellaneous",
|
|
22094
22094
|
"subtype": "variable",
|
|
22095
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22095
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
22096
22096
|
"coverageIgnore": false,
|
|
22097
22097
|
"deprecated": false,
|
|
22098
22098
|
"deprecationMessage": "",
|
|
22099
22099
|
"type": "string",
|
|
22100
|
-
"defaultValue": "'eui-
|
|
22100
|
+
"defaultValue": "'eui-editor'"
|
|
22101
22101
|
},
|
|
22102
22102
|
{
|
|
22103
22103
|
"name": "COMPONENT_TAG",
|
|
@@ -22976,23 +22976,23 @@
|
|
|
22976
22976
|
"name": "NEW_INTERFACE",
|
|
22977
22977
|
"ctype": "miscellaneous",
|
|
22978
22978
|
"subtype": "variable",
|
|
22979
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22979
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
22980
22980
|
"coverageIgnore": false,
|
|
22981
22981
|
"deprecated": false,
|
|
22982
22982
|
"deprecationMessage": "",
|
|
22983
22983
|
"type": "string",
|
|
22984
|
-
"defaultValue": "'
|
|
22984
|
+
"defaultValue": "'EuiMenuItem'"
|
|
22985
22985
|
},
|
|
22986
22986
|
{
|
|
22987
22987
|
"name": "NEW_INTERFACE",
|
|
22988
22988
|
"ctype": "miscellaneous",
|
|
22989
22989
|
"subtype": "variable",
|
|
22990
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22990
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
22991
22991
|
"coverageIgnore": false,
|
|
22992
22992
|
"deprecated": false,
|
|
22993
22993
|
"deprecationMessage": "",
|
|
22994
22994
|
"type": "string",
|
|
22995
|
-
"defaultValue": "'
|
|
22995
|
+
"defaultValue": "'EuiTooltipInterface'"
|
|
22996
22996
|
},
|
|
22997
22997
|
{
|
|
22998
22998
|
"name": "NEW_INTERFACE_PATH",
|
|
@@ -24551,7 +24551,7 @@
|
|
|
24551
24551
|
},
|
|
24552
24552
|
{
|
|
24553
24553
|
"name": "applyEdits",
|
|
24554
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24554
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
24555
24555
|
"ctype": "miscellaneous",
|
|
24556
24556
|
"subtype": "function",
|
|
24557
24557
|
"coverageIgnore": false,
|
|
@@ -24596,7 +24596,7 @@
|
|
|
24596
24596
|
},
|
|
24597
24597
|
{
|
|
24598
24598
|
"name": "applyEdits",
|
|
24599
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24599
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
24600
24600
|
"ctype": "miscellaneous",
|
|
24601
24601
|
"subtype": "function",
|
|
24602
24602
|
"coverageIgnore": false,
|
|
@@ -26576,7 +26576,7 @@
|
|
|
26576
26576
|
},
|
|
26577
26577
|
{
|
|
26578
26578
|
"name": "deduplicateEdits",
|
|
26579
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26579
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
26580
26580
|
"ctype": "miscellaneous",
|
|
26581
26581
|
"subtype": "function",
|
|
26582
26582
|
"coverageIgnore": false,
|
|
@@ -26606,7 +26606,7 @@
|
|
|
26606
26606
|
},
|
|
26607
26607
|
{
|
|
26608
26608
|
"name": "deduplicateEdits",
|
|
26609
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26609
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
26610
26610
|
"ctype": "miscellaneous",
|
|
26611
26611
|
"subtype": "function",
|
|
26612
26612
|
"coverageIgnore": false,
|
|
@@ -31728,7 +31728,7 @@
|
|
|
31728
31728
|
},
|
|
31729
31729
|
{
|
|
31730
31730
|
"name": "migrateInlineTemplates",
|
|
31731
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
31731
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
31732
31732
|
"ctype": "miscellaneous",
|
|
31733
31733
|
"subtype": "function",
|
|
31734
31734
|
"coverageIgnore": false,
|
|
@@ -31760,7 +31760,7 @@
|
|
|
31760
31760
|
},
|
|
31761
31761
|
{
|
|
31762
31762
|
"name": "migrateInlineTemplates",
|
|
31763
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
31763
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
31764
31764
|
"ctype": "miscellaneous",
|
|
31765
31765
|
"subtype": "function",
|
|
31766
31766
|
"coverageIgnore": false,
|
|
@@ -32268,7 +32268,7 @@
|
|
|
32268
32268
|
},
|
|
32269
32269
|
{
|
|
32270
32270
|
"name": "migrateTemplate",
|
|
32271
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32271
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
32272
32272
|
"ctype": "miscellaneous",
|
|
32273
32273
|
"subtype": "function",
|
|
32274
32274
|
"coverageIgnore": false,
|
|
@@ -32300,7 +32300,7 @@
|
|
|
32300
32300
|
},
|
|
32301
32301
|
{
|
|
32302
32302
|
"name": "migrateTemplate",
|
|
32303
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32303
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
32304
32304
|
"ctype": "miscellaneous",
|
|
32305
32305
|
"subtype": "function",
|
|
32306
32306
|
"coverageIgnore": false,
|
|
@@ -32836,7 +32836,7 @@
|
|
|
32836
32836
|
},
|
|
32837
32837
|
{
|
|
32838
32838
|
"name": "migrateTypeScript",
|
|
32839
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32839
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
32840
32840
|
"ctype": "miscellaneous",
|
|
32841
32841
|
"subtype": "function",
|
|
32842
32842
|
"coverageIgnore": false,
|
|
@@ -32898,7 +32898,7 @@
|
|
|
32898
32898
|
},
|
|
32899
32899
|
{
|
|
32900
32900
|
"name": "migrateTypeScript",
|
|
32901
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32901
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
32902
32902
|
"ctype": "miscellaneous",
|
|
32903
32903
|
"subtype": "function",
|
|
32904
32904
|
"coverageIgnore": false,
|
|
@@ -33337,7 +33337,7 @@
|
|
|
33337
33337
|
},
|
|
33338
33338
|
{
|
|
33339
33339
|
"name": "removeImportSpecifier",
|
|
33340
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33340
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
33341
33341
|
"ctype": "miscellaneous",
|
|
33342
33342
|
"subtype": "function",
|
|
33343
33343
|
"coverageIgnore": false,
|
|
@@ -33406,7 +33406,7 @@
|
|
|
33406
33406
|
},
|
|
33407
33407
|
{
|
|
33408
33408
|
"name": "removeImportSpecifier",
|
|
33409
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33409
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
33410
33410
|
"ctype": "miscellaneous",
|
|
33411
33411
|
"subtype": "function",
|
|
33412
33412
|
"coverageIgnore": false,
|
|
@@ -35189,7 +35189,7 @@
|
|
|
35189
35189
|
},
|
|
35190
35190
|
{
|
|
35191
35191
|
"name": "visitDir",
|
|
35192
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35192
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
35193
35193
|
"ctype": "miscellaneous",
|
|
35194
35194
|
"subtype": "function",
|
|
35195
35195
|
"coverageIgnore": false,
|
|
@@ -35234,7 +35234,7 @@
|
|
|
35234
35234
|
},
|
|
35235
35235
|
{
|
|
35236
35236
|
"name": "visitDir",
|
|
35237
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35237
|
+
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
35238
35238
|
"ctype": "miscellaneous",
|
|
35239
35239
|
"subtype": "function",
|
|
35240
35240
|
"coverageIgnore": false,
|
|
@@ -35594,7 +35594,7 @@
|
|
|
35594
35594
|
},
|
|
35595
35595
|
{
|
|
35596
35596
|
"name": "visitDir",
|
|
35597
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35597
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
35598
35598
|
"ctype": "miscellaneous",
|
|
35599
35599
|
"subtype": "function",
|
|
35600
35600
|
"coverageIgnore": false,
|
|
@@ -35639,7 +35639,7 @@
|
|
|
35639
35639
|
},
|
|
35640
35640
|
{
|
|
35641
35641
|
"name": "visitDir",
|
|
35642
|
-
"file": "packages/core/schematics/migrate-
|
|
35642
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
35643
35643
|
"ctype": "miscellaneous",
|
|
35644
35644
|
"subtype": "function",
|
|
35645
35645
|
"coverageIgnore": false,
|
|
@@ -35684,7 +35684,7 @@
|
|
|
35684
35684
|
},
|
|
35685
35685
|
{
|
|
35686
35686
|
"name": "visitDir",
|
|
35687
|
-
"file": "packages/core/schematics/migrate-
|
|
35687
|
+
"file": "packages/core/schematics/migrate-to-standalone/index.ts",
|
|
35688
35688
|
"ctype": "miscellaneous",
|
|
35689
35689
|
"subtype": "function",
|
|
35690
35690
|
"coverageIgnore": false,
|
|
@@ -36045,6 +36045,64 @@
|
|
|
36045
36045
|
}
|
|
36046
36046
|
]
|
|
36047
36047
|
},
|
|
36048
|
+
{
|
|
36049
|
+
"name": "visitNodes",
|
|
36050
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
36051
|
+
"ctype": "miscellaneous",
|
|
36052
|
+
"subtype": "function",
|
|
36053
|
+
"coverageIgnore": false,
|
|
36054
|
+
"deprecated": false,
|
|
36055
|
+
"deprecationMessage": "",
|
|
36056
|
+
"rawdescription": "",
|
|
36057
|
+
"description": "",
|
|
36058
|
+
"displayName": "visitNodes",
|
|
36059
|
+
"args": [
|
|
36060
|
+
{
|
|
36061
|
+
"name": "nodes",
|
|
36062
|
+
"deprecated": false,
|
|
36063
|
+
"deprecationMessage": ""
|
|
36064
|
+
},
|
|
36065
|
+
{
|
|
36066
|
+
"name": "source",
|
|
36067
|
+
"type": "string",
|
|
36068
|
+
"deprecated": false,
|
|
36069
|
+
"deprecationMessage": ""
|
|
36070
|
+
},
|
|
36071
|
+
{
|
|
36072
|
+
"name": "removals",
|
|
36073
|
+
"deprecated": false,
|
|
36074
|
+
"deprecationMessage": ""
|
|
36075
|
+
}
|
|
36076
|
+
],
|
|
36077
|
+
"returnType": "void",
|
|
36078
|
+
"jsdoctags": [
|
|
36079
|
+
{
|
|
36080
|
+
"name": "nodes",
|
|
36081
|
+
"deprecated": false,
|
|
36082
|
+
"deprecationMessage": "",
|
|
36083
|
+
"tagName": {
|
|
36084
|
+
"text": "param"
|
|
36085
|
+
}
|
|
36086
|
+
},
|
|
36087
|
+
{
|
|
36088
|
+
"name": "source",
|
|
36089
|
+
"type": "string",
|
|
36090
|
+
"deprecated": false,
|
|
36091
|
+
"deprecationMessage": "",
|
|
36092
|
+
"tagName": {
|
|
36093
|
+
"text": "param"
|
|
36094
|
+
}
|
|
36095
|
+
},
|
|
36096
|
+
{
|
|
36097
|
+
"name": "removals",
|
|
36098
|
+
"deprecated": false,
|
|
36099
|
+
"deprecationMessage": "",
|
|
36100
|
+
"tagName": {
|
|
36101
|
+
"text": "param"
|
|
36102
|
+
}
|
|
36103
|
+
}
|
|
36104
|
+
]
|
|
36105
|
+
},
|
|
36048
36106
|
{
|
|
36049
36107
|
"name": "visitNodes",
|
|
36050
36108
|
"file": "packages/core/schematics/migrate-eui-editor/index.ts",
|
|
@@ -36090,7 +36148,7 @@
|
|
|
36090
36148
|
},
|
|
36091
36149
|
{
|
|
36092
36150
|
"name": "visitNodes",
|
|
36093
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36151
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
36094
36152
|
"ctype": "miscellaneous",
|
|
36095
36153
|
"subtype": "function",
|
|
36096
36154
|
"coverageIgnore": false,
|
|
@@ -36106,13 +36164,50 @@
|
|
|
36106
36164
|
"deprecationMessage": ""
|
|
36107
36165
|
},
|
|
36108
36166
|
{
|
|
36109
|
-
"name": "
|
|
36110
|
-
"type": "string",
|
|
36167
|
+
"name": "edits",
|
|
36111
36168
|
"deprecated": false,
|
|
36112
36169
|
"deprecationMessage": ""
|
|
36170
|
+
}
|
|
36171
|
+
],
|
|
36172
|
+
"returnType": "void",
|
|
36173
|
+
"jsdoctags": [
|
|
36174
|
+
{
|
|
36175
|
+
"name": "nodes",
|
|
36176
|
+
"deprecated": false,
|
|
36177
|
+
"deprecationMessage": "",
|
|
36178
|
+
"tagName": {
|
|
36179
|
+
"text": "param"
|
|
36180
|
+
}
|
|
36113
36181
|
},
|
|
36114
36182
|
{
|
|
36115
|
-
"name": "
|
|
36183
|
+
"name": "edits",
|
|
36184
|
+
"deprecated": false,
|
|
36185
|
+
"deprecationMessage": "",
|
|
36186
|
+
"tagName": {
|
|
36187
|
+
"text": "param"
|
|
36188
|
+
}
|
|
36189
|
+
}
|
|
36190
|
+
]
|
|
36191
|
+
},
|
|
36192
|
+
{
|
|
36193
|
+
"name": "visitNodes",
|
|
36194
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
36195
|
+
"ctype": "miscellaneous",
|
|
36196
|
+
"subtype": "function",
|
|
36197
|
+
"coverageIgnore": false,
|
|
36198
|
+
"deprecated": false,
|
|
36199
|
+
"deprecationMessage": "",
|
|
36200
|
+
"rawdescription": "",
|
|
36201
|
+
"description": "",
|
|
36202
|
+
"displayName": "visitNodes",
|
|
36203
|
+
"args": [
|
|
36204
|
+
{
|
|
36205
|
+
"name": "nodes",
|
|
36206
|
+
"deprecated": false,
|
|
36207
|
+
"deprecationMessage": ""
|
|
36208
|
+
},
|
|
36209
|
+
{
|
|
36210
|
+
"name": "edits",
|
|
36116
36211
|
"deprecated": false,
|
|
36117
36212
|
"deprecationMessage": ""
|
|
36118
36213
|
}
|
|
@@ -36128,16 +36223,50 @@
|
|
|
36128
36223
|
}
|
|
36129
36224
|
},
|
|
36130
36225
|
{
|
|
36131
|
-
"name": "
|
|
36132
|
-
"type": "string",
|
|
36226
|
+
"name": "edits",
|
|
36133
36227
|
"deprecated": false,
|
|
36134
36228
|
"deprecationMessage": "",
|
|
36135
36229
|
"tagName": {
|
|
36136
36230
|
"text": "param"
|
|
36137
36231
|
}
|
|
36232
|
+
}
|
|
36233
|
+
]
|
|
36234
|
+
},
|
|
36235
|
+
{
|
|
36236
|
+
"name": "visitNodes",
|
|
36237
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
36238
|
+
"ctype": "miscellaneous",
|
|
36239
|
+
"subtype": "function",
|
|
36240
|
+
"coverageIgnore": false,
|
|
36241
|
+
"deprecated": false,
|
|
36242
|
+
"deprecationMessage": "",
|
|
36243
|
+
"rawdescription": "",
|
|
36244
|
+
"description": "",
|
|
36245
|
+
"displayName": "visitNodes",
|
|
36246
|
+
"args": [
|
|
36247
|
+
{
|
|
36248
|
+
"name": "nodes",
|
|
36249
|
+
"deprecated": false,
|
|
36250
|
+
"deprecationMessage": ""
|
|
36138
36251
|
},
|
|
36139
36252
|
{
|
|
36140
|
-
"name": "
|
|
36253
|
+
"name": "edits",
|
|
36254
|
+
"deprecated": false,
|
|
36255
|
+
"deprecationMessage": ""
|
|
36256
|
+
}
|
|
36257
|
+
],
|
|
36258
|
+
"returnType": "void",
|
|
36259
|
+
"jsdoctags": [
|
|
36260
|
+
{
|
|
36261
|
+
"name": "nodes",
|
|
36262
|
+
"deprecated": false,
|
|
36263
|
+
"deprecationMessage": "",
|
|
36264
|
+
"tagName": {
|
|
36265
|
+
"text": "param"
|
|
36266
|
+
}
|
|
36267
|
+
},
|
|
36268
|
+
{
|
|
36269
|
+
"name": "edits",
|
|
36141
36270
|
"deprecated": false,
|
|
36142
36271
|
"deprecationMessage": "",
|
|
36143
36272
|
"tagName": {
|
|
@@ -36148,7 +36277,7 @@
|
|
|
36148
36277
|
},
|
|
36149
36278
|
{
|
|
36150
36279
|
"name": "visitNodes",
|
|
36151
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36280
|
+
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
36152
36281
|
"ctype": "miscellaneous",
|
|
36153
36282
|
"subtype": "function",
|
|
36154
36283
|
"coverageIgnore": false,
|
|
@@ -36164,7 +36293,7 @@
|
|
|
36164
36293
|
"deprecationMessage": ""
|
|
36165
36294
|
},
|
|
36166
36295
|
{
|
|
36167
|
-
"name": "
|
|
36296
|
+
"name": "removals",
|
|
36168
36297
|
"deprecated": false,
|
|
36169
36298
|
"deprecationMessage": ""
|
|
36170
36299
|
}
|
|
@@ -36180,7 +36309,7 @@
|
|
|
36180
36309
|
}
|
|
36181
36310
|
},
|
|
36182
36311
|
{
|
|
36183
|
-
"name": "
|
|
36312
|
+
"name": "removals",
|
|
36184
36313
|
"deprecated": false,
|
|
36185
36314
|
"deprecationMessage": "",
|
|
36186
36315
|
"tagName": {
|
|
@@ -36191,136 +36320,7 @@
|
|
|
36191
36320
|
},
|
|
36192
36321
|
{
|
|
36193
36322
|
"name": "visitNodes",
|
|
36194
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36195
|
-
"ctype": "miscellaneous",
|
|
36196
|
-
"subtype": "function",
|
|
36197
|
-
"coverageIgnore": false,
|
|
36198
|
-
"deprecated": false,
|
|
36199
|
-
"deprecationMessage": "",
|
|
36200
|
-
"rawdescription": "",
|
|
36201
|
-
"description": "",
|
|
36202
|
-
"displayName": "visitNodes",
|
|
36203
|
-
"args": [
|
|
36204
|
-
{
|
|
36205
|
-
"name": "nodes",
|
|
36206
|
-
"deprecated": false,
|
|
36207
|
-
"deprecationMessage": ""
|
|
36208
|
-
},
|
|
36209
|
-
{
|
|
36210
|
-
"name": "edits",
|
|
36211
|
-
"deprecated": false,
|
|
36212
|
-
"deprecationMessage": ""
|
|
36213
|
-
}
|
|
36214
|
-
],
|
|
36215
|
-
"returnType": "void",
|
|
36216
|
-
"jsdoctags": [
|
|
36217
|
-
{
|
|
36218
|
-
"name": "nodes",
|
|
36219
|
-
"deprecated": false,
|
|
36220
|
-
"deprecationMessage": "",
|
|
36221
|
-
"tagName": {
|
|
36222
|
-
"text": "param"
|
|
36223
|
-
}
|
|
36224
|
-
},
|
|
36225
|
-
{
|
|
36226
|
-
"name": "edits",
|
|
36227
|
-
"deprecated": false,
|
|
36228
|
-
"deprecationMessage": "",
|
|
36229
|
-
"tagName": {
|
|
36230
|
-
"text": "param"
|
|
36231
|
-
}
|
|
36232
|
-
}
|
|
36233
|
-
]
|
|
36234
|
-
},
|
|
36235
|
-
{
|
|
36236
|
-
"name": "visitNodes",
|
|
36237
|
-
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
36238
|
-
"ctype": "miscellaneous",
|
|
36239
|
-
"subtype": "function",
|
|
36240
|
-
"coverageIgnore": false,
|
|
36241
|
-
"deprecated": false,
|
|
36242
|
-
"deprecationMessage": "",
|
|
36243
|
-
"rawdescription": "",
|
|
36244
|
-
"description": "",
|
|
36245
|
-
"displayName": "visitNodes",
|
|
36246
|
-
"args": [
|
|
36247
|
-
{
|
|
36248
|
-
"name": "nodes",
|
|
36249
|
-
"deprecated": false,
|
|
36250
|
-
"deprecationMessage": ""
|
|
36251
|
-
},
|
|
36252
|
-
{
|
|
36253
|
-
"name": "edits",
|
|
36254
|
-
"deprecated": false,
|
|
36255
|
-
"deprecationMessage": ""
|
|
36256
|
-
}
|
|
36257
|
-
],
|
|
36258
|
-
"returnType": "void",
|
|
36259
|
-
"jsdoctags": [
|
|
36260
|
-
{
|
|
36261
|
-
"name": "nodes",
|
|
36262
|
-
"deprecated": false,
|
|
36263
|
-
"deprecationMessage": "",
|
|
36264
|
-
"tagName": {
|
|
36265
|
-
"text": "param"
|
|
36266
|
-
}
|
|
36267
|
-
},
|
|
36268
|
-
{
|
|
36269
|
-
"name": "edits",
|
|
36270
|
-
"deprecated": false,
|
|
36271
|
-
"deprecationMessage": "",
|
|
36272
|
-
"tagName": {
|
|
36273
|
-
"text": "param"
|
|
36274
|
-
}
|
|
36275
|
-
}
|
|
36276
|
-
]
|
|
36277
|
-
},
|
|
36278
|
-
{
|
|
36279
|
-
"name": "visitNodes",
|
|
36280
|
-
"file": "packages/core/schematics/migrate-eui-popover/index.ts",
|
|
36281
|
-
"ctype": "miscellaneous",
|
|
36282
|
-
"subtype": "function",
|
|
36283
|
-
"coverageIgnore": false,
|
|
36284
|
-
"deprecated": false,
|
|
36285
|
-
"deprecationMessage": "",
|
|
36286
|
-
"rawdescription": "",
|
|
36287
|
-
"description": "",
|
|
36288
|
-
"displayName": "visitNodes",
|
|
36289
|
-
"args": [
|
|
36290
|
-
{
|
|
36291
|
-
"name": "nodes",
|
|
36292
|
-
"deprecated": false,
|
|
36293
|
-
"deprecationMessage": ""
|
|
36294
|
-
},
|
|
36295
|
-
{
|
|
36296
|
-
"name": "removals",
|
|
36297
|
-
"deprecated": false,
|
|
36298
|
-
"deprecationMessage": ""
|
|
36299
|
-
}
|
|
36300
|
-
],
|
|
36301
|
-
"returnType": "void",
|
|
36302
|
-
"jsdoctags": [
|
|
36303
|
-
{
|
|
36304
|
-
"name": "nodes",
|
|
36305
|
-
"deprecated": false,
|
|
36306
|
-
"deprecationMessage": "",
|
|
36307
|
-
"tagName": {
|
|
36308
|
-
"text": "param"
|
|
36309
|
-
}
|
|
36310
|
-
},
|
|
36311
|
-
{
|
|
36312
|
-
"name": "removals",
|
|
36313
|
-
"deprecated": false,
|
|
36314
|
-
"deprecationMessage": "",
|
|
36315
|
-
"tagName": {
|
|
36316
|
-
"text": "param"
|
|
36317
|
-
}
|
|
36318
|
-
}
|
|
36319
|
-
]
|
|
36320
|
-
},
|
|
36321
|
-
{
|
|
36322
|
-
"name": "visitNodes",
|
|
36323
|
-
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
36323
|
+
"file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
|
|
36324
36324
|
"ctype": "miscellaneous",
|
|
36325
36325
|
"subtype": "function",
|
|
36326
36326
|
"coverageIgnore": false,
|
|
@@ -38006,6 +38006,19 @@
|
|
|
38006
38006
|
"description": "<p>Provides read-only equivalent of jQuery's position function:\n<a href=\"http://api.jquery.com/position/\">http://api.jquery.com/position/</a></p>\n"
|
|
38007
38007
|
}
|
|
38008
38008
|
],
|
|
38009
|
+
"packages/core/schematics/migrate-eui-discussion-thread/index.ts": [
|
|
38010
|
+
{
|
|
38011
|
+
"name": "COMPONENT_TAG",
|
|
38012
|
+
"ctype": "miscellaneous",
|
|
38013
|
+
"subtype": "variable",
|
|
38014
|
+
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
38015
|
+
"coverageIgnore": false,
|
|
38016
|
+
"deprecated": false,
|
|
38017
|
+
"deprecationMessage": "",
|
|
38018
|
+
"type": "string",
|
|
38019
|
+
"defaultValue": "'eui-discussion-thread'"
|
|
38020
|
+
}
|
|
38021
|
+
],
|
|
38009
38022
|
"packages/core/schematics/migrate-eui-editor/index.ts": [
|
|
38010
38023
|
{
|
|
38011
38024
|
"name": "COMPONENT_TAG",
|
|
@@ -38041,19 +38054,6 @@
|
|
|
38041
38054
|
"defaultValue": "'onEditorChanged'"
|
|
38042
38055
|
}
|
|
38043
38056
|
],
|
|
38044
|
-
"packages/core/schematics/migrate-eui-discussion-thread/index.ts": [
|
|
38045
|
-
{
|
|
38046
|
-
"name": "COMPONENT_TAG",
|
|
38047
|
-
"ctype": "miscellaneous",
|
|
38048
|
-
"subtype": "variable",
|
|
38049
|
-
"file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
|
|
38050
|
-
"coverageIgnore": false,
|
|
38051
|
-
"deprecated": false,
|
|
38052
|
-
"deprecationMessage": "",
|
|
38053
|
-
"type": "string",
|
|
38054
|
-
"defaultValue": "'eui-discussion-thread'"
|
|
38055
|
-
}
|
|
38056
|
-
],
|
|
38057
38057
|
"packages/core/schematics/migrate-eui-fieldset/index.ts": [
|
|
38058
38058
|
{
|
|
38059
38059
|
"name": "COMPONENT_TAG",
|
|
@@ -46431,10 +46431,10 @@
|
|
|
46431
46431
|
]
|
|
46432
46432
|
}
|
|
46433
46433
|
],
|
|
46434
|
-
"packages/core/schematics/migrate-eui-
|
|
46434
|
+
"packages/core/schematics/migrate-eui-toolbar-menu/index.ts": [
|
|
46435
46435
|
{
|
|
46436
46436
|
"name": "applyEdits",
|
|
46437
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46437
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46438
46438
|
"ctype": "miscellaneous",
|
|
46439
46439
|
"subtype": "function",
|
|
46440
46440
|
"coverageIgnore": false,
|
|
@@ -46477,9 +46477,159 @@
|
|
|
46477
46477
|
}
|
|
46478
46478
|
]
|
|
46479
46479
|
},
|
|
46480
|
+
{
|
|
46481
|
+
"name": "collectOutputRemovals",
|
|
46482
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46483
|
+
"ctype": "miscellaneous",
|
|
46484
|
+
"subtype": "function",
|
|
46485
|
+
"coverageIgnore": false,
|
|
46486
|
+
"deprecated": false,
|
|
46487
|
+
"deprecationMessage": "",
|
|
46488
|
+
"rawdescription": "",
|
|
46489
|
+
"description": "",
|
|
46490
|
+
"displayName": "collectOutputRemovals",
|
|
46491
|
+
"args": [
|
|
46492
|
+
{
|
|
46493
|
+
"name": "element",
|
|
46494
|
+
"type": "TmplAstElement",
|
|
46495
|
+
"deprecated": false,
|
|
46496
|
+
"deprecationMessage": ""
|
|
46497
|
+
},
|
|
46498
|
+
{
|
|
46499
|
+
"name": "source",
|
|
46500
|
+
"type": "string",
|
|
46501
|
+
"deprecated": false,
|
|
46502
|
+
"deprecationMessage": ""
|
|
46503
|
+
},
|
|
46504
|
+
{
|
|
46505
|
+
"name": "edits",
|
|
46506
|
+
"deprecated": false,
|
|
46507
|
+
"deprecationMessage": ""
|
|
46508
|
+
},
|
|
46509
|
+
{
|
|
46510
|
+
"name": "filePath",
|
|
46511
|
+
"type": "string",
|
|
46512
|
+
"deprecated": false,
|
|
46513
|
+
"deprecationMessage": ""
|
|
46514
|
+
},
|
|
46515
|
+
{
|
|
46516
|
+
"name": "context",
|
|
46517
|
+
"type": "SchematicContext",
|
|
46518
|
+
"deprecated": false,
|
|
46519
|
+
"deprecationMessage": ""
|
|
46520
|
+
}
|
|
46521
|
+
],
|
|
46522
|
+
"returnType": "void",
|
|
46523
|
+
"jsdoctags": [
|
|
46524
|
+
{
|
|
46525
|
+
"name": "element",
|
|
46526
|
+
"type": "TmplAstElement",
|
|
46527
|
+
"deprecated": false,
|
|
46528
|
+
"deprecationMessage": "",
|
|
46529
|
+
"tagName": {
|
|
46530
|
+
"text": "param"
|
|
46531
|
+
}
|
|
46532
|
+
},
|
|
46533
|
+
{
|
|
46534
|
+
"name": "source",
|
|
46535
|
+
"type": "string",
|
|
46536
|
+
"deprecated": false,
|
|
46537
|
+
"deprecationMessage": "",
|
|
46538
|
+
"tagName": {
|
|
46539
|
+
"text": "param"
|
|
46540
|
+
}
|
|
46541
|
+
},
|
|
46542
|
+
{
|
|
46543
|
+
"name": "edits",
|
|
46544
|
+
"deprecated": false,
|
|
46545
|
+
"deprecationMessage": "",
|
|
46546
|
+
"tagName": {
|
|
46547
|
+
"text": "param"
|
|
46548
|
+
}
|
|
46549
|
+
},
|
|
46550
|
+
{
|
|
46551
|
+
"name": "filePath",
|
|
46552
|
+
"type": "string",
|
|
46553
|
+
"deprecated": false,
|
|
46554
|
+
"deprecationMessage": "",
|
|
46555
|
+
"tagName": {
|
|
46556
|
+
"text": "param"
|
|
46557
|
+
}
|
|
46558
|
+
},
|
|
46559
|
+
{
|
|
46560
|
+
"name": "context",
|
|
46561
|
+
"type": "SchematicContext",
|
|
46562
|
+
"deprecated": false,
|
|
46563
|
+
"deprecationMessage": "",
|
|
46564
|
+
"tagName": {
|
|
46565
|
+
"text": "param"
|
|
46566
|
+
}
|
|
46567
|
+
}
|
|
46568
|
+
]
|
|
46569
|
+
},
|
|
46570
|
+
{
|
|
46571
|
+
"name": "collectTagRenames",
|
|
46572
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46573
|
+
"ctype": "miscellaneous",
|
|
46574
|
+
"subtype": "function",
|
|
46575
|
+
"coverageIgnore": false,
|
|
46576
|
+
"deprecated": false,
|
|
46577
|
+
"deprecationMessage": "",
|
|
46578
|
+
"rawdescription": "",
|
|
46579
|
+
"description": "",
|
|
46580
|
+
"displayName": "collectTagRenames",
|
|
46581
|
+
"args": [
|
|
46582
|
+
{
|
|
46583
|
+
"name": "element",
|
|
46584
|
+
"type": "TmplAstElement",
|
|
46585
|
+
"deprecated": false,
|
|
46586
|
+
"deprecationMessage": ""
|
|
46587
|
+
},
|
|
46588
|
+
{
|
|
46589
|
+
"name": "source",
|
|
46590
|
+
"type": "string",
|
|
46591
|
+
"deprecated": false,
|
|
46592
|
+
"deprecationMessage": ""
|
|
46593
|
+
},
|
|
46594
|
+
{
|
|
46595
|
+
"name": "edits",
|
|
46596
|
+
"deprecated": false,
|
|
46597
|
+
"deprecationMessage": ""
|
|
46598
|
+
}
|
|
46599
|
+
],
|
|
46600
|
+
"returnType": "void",
|
|
46601
|
+
"jsdoctags": [
|
|
46602
|
+
{
|
|
46603
|
+
"name": "element",
|
|
46604
|
+
"type": "TmplAstElement",
|
|
46605
|
+
"deprecated": false,
|
|
46606
|
+
"deprecationMessage": "",
|
|
46607
|
+
"tagName": {
|
|
46608
|
+
"text": "param"
|
|
46609
|
+
}
|
|
46610
|
+
},
|
|
46611
|
+
{
|
|
46612
|
+
"name": "source",
|
|
46613
|
+
"type": "string",
|
|
46614
|
+
"deprecated": false,
|
|
46615
|
+
"deprecationMessage": "",
|
|
46616
|
+
"tagName": {
|
|
46617
|
+
"text": "param"
|
|
46618
|
+
}
|
|
46619
|
+
},
|
|
46620
|
+
{
|
|
46621
|
+
"name": "edits",
|
|
46622
|
+
"deprecated": false,
|
|
46623
|
+
"deprecationMessage": "",
|
|
46624
|
+
"tagName": {
|
|
46625
|
+
"text": "param"
|
|
46626
|
+
}
|
|
46627
|
+
}
|
|
46628
|
+
]
|
|
46629
|
+
},
|
|
46480
46630
|
{
|
|
46481
46631
|
"name": "deduplicateEdits",
|
|
46482
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46632
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46483
46633
|
"ctype": "miscellaneous",
|
|
46484
46634
|
"subtype": "function",
|
|
46485
46635
|
"coverageIgnore": false,
|
|
@@ -46508,8 +46658,8 @@
|
|
|
46508
46658
|
]
|
|
46509
46659
|
},
|
|
46510
46660
|
{
|
|
46511
|
-
"name": "
|
|
46512
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46661
|
+
"name": "isComponentMetadataProperty",
|
|
46662
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46513
46663
|
"ctype": "miscellaneous",
|
|
46514
46664
|
"subtype": "function",
|
|
46515
46665
|
"coverageIgnore": false,
|
|
@@ -46517,7 +46667,7 @@
|
|
|
46517
46667
|
"deprecationMessage": "",
|
|
46518
46668
|
"rawdescription": "",
|
|
46519
46669
|
"description": "",
|
|
46520
|
-
"displayName": "
|
|
46670
|
+
"displayName": "isComponentMetadataProperty",
|
|
46521
46671
|
"args": [
|
|
46522
46672
|
{
|
|
46523
46673
|
"name": "node",
|
|
@@ -46538,8 +46688,8 @@
|
|
|
46538
46688
|
]
|
|
46539
46689
|
},
|
|
46540
46690
|
{
|
|
46541
|
-
"name": "
|
|
46542
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46691
|
+
"name": "isTemplateProperty",
|
|
46692
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46543
46693
|
"ctype": "miscellaneous",
|
|
46544
46694
|
"subtype": "function",
|
|
46545
46695
|
"coverageIgnore": false,
|
|
@@ -46547,7 +46697,37 @@
|
|
|
46547
46697
|
"deprecationMessage": "",
|
|
46548
46698
|
"rawdescription": "",
|
|
46549
46699
|
"description": "",
|
|
46550
|
-
"displayName": "
|
|
46700
|
+
"displayName": "isTemplateProperty",
|
|
46701
|
+
"args": [
|
|
46702
|
+
{
|
|
46703
|
+
"name": "node",
|
|
46704
|
+
"deprecated": false,
|
|
46705
|
+
"deprecationMessage": ""
|
|
46706
|
+
}
|
|
46707
|
+
],
|
|
46708
|
+
"returnType": "boolean",
|
|
46709
|
+
"jsdoctags": [
|
|
46710
|
+
{
|
|
46711
|
+
"name": "node",
|
|
46712
|
+
"deprecated": false,
|
|
46713
|
+
"deprecationMessage": "",
|
|
46714
|
+
"tagName": {
|
|
46715
|
+
"text": "param"
|
|
46716
|
+
}
|
|
46717
|
+
}
|
|
46718
|
+
]
|
|
46719
|
+
},
|
|
46720
|
+
{
|
|
46721
|
+
"name": "migrateEuiToolbarMenu",
|
|
46722
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46723
|
+
"ctype": "miscellaneous",
|
|
46724
|
+
"subtype": "function",
|
|
46725
|
+
"coverageIgnore": false,
|
|
46726
|
+
"deprecated": false,
|
|
46727
|
+
"deprecationMessage": "",
|
|
46728
|
+
"rawdescription": "",
|
|
46729
|
+
"description": "",
|
|
46730
|
+
"displayName": "migrateEuiToolbarMenu",
|
|
46551
46731
|
"args": [
|
|
46552
46732
|
{
|
|
46553
46733
|
"name": "options",
|
|
@@ -46572,8 +46752,8 @@
|
|
|
46572
46752
|
]
|
|
46573
46753
|
},
|
|
46574
46754
|
{
|
|
46575
|
-
"name": "
|
|
46576
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46755
|
+
"name": "migrateImportsAndTypes",
|
|
46756
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46577
46757
|
"ctype": "miscellaneous",
|
|
46578
46758
|
"subtype": "function",
|
|
46579
46759
|
"coverageIgnore": false,
|
|
@@ -46581,7 +46761,7 @@
|
|
|
46581
46761
|
"deprecationMessage": "",
|
|
46582
46762
|
"rawdescription": "",
|
|
46583
46763
|
"description": "",
|
|
46584
|
-
"displayName": "
|
|
46764
|
+
"displayName": "migrateImportsAndTypes",
|
|
46585
46765
|
"args": [
|
|
46586
46766
|
{
|
|
46587
46767
|
"name": "source",
|
|
@@ -46634,8 +46814,8 @@
|
|
|
46634
46814
|
]
|
|
46635
46815
|
},
|
|
46636
46816
|
{
|
|
46637
|
-
"name": "
|
|
46638
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46817
|
+
"name": "migrateInlineTemplates",
|
|
46818
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46639
46819
|
"ctype": "miscellaneous",
|
|
46640
46820
|
"subtype": "function",
|
|
46641
46821
|
"coverageIgnore": false,
|
|
@@ -46643,41 +46823,32 @@
|
|
|
46643
46823
|
"deprecationMessage": "",
|
|
46644
46824
|
"rawdescription": "",
|
|
46645
46825
|
"description": "",
|
|
46646
|
-
"displayName": "
|
|
46826
|
+
"displayName": "migrateInlineTemplates",
|
|
46647
46827
|
"args": [
|
|
46648
46828
|
{
|
|
46649
|
-
"name": "
|
|
46650
|
-
"
|
|
46651
|
-
"deprecationMessage": ""
|
|
46652
|
-
},
|
|
46653
|
-
{
|
|
46654
|
-
"name": "specifier",
|
|
46829
|
+
"name": "source",
|
|
46830
|
+
"type": "string",
|
|
46655
46831
|
"deprecated": false,
|
|
46656
46832
|
"deprecationMessage": ""
|
|
46657
46833
|
},
|
|
46658
46834
|
{
|
|
46659
|
-
"name": "
|
|
46835
|
+
"name": "filePath",
|
|
46836
|
+
"type": "string",
|
|
46660
46837
|
"deprecated": false,
|
|
46661
46838
|
"deprecationMessage": ""
|
|
46662
46839
|
},
|
|
46663
46840
|
{
|
|
46664
|
-
"name": "
|
|
46841
|
+
"name": "context",
|
|
46842
|
+
"type": "SchematicContext",
|
|
46665
46843
|
"deprecated": false,
|
|
46666
46844
|
"deprecationMessage": ""
|
|
46667
46845
|
}
|
|
46668
46846
|
],
|
|
46669
|
-
"returnType": "
|
|
46847
|
+
"returnType": "string",
|
|
46670
46848
|
"jsdoctags": [
|
|
46671
46849
|
{
|
|
46672
|
-
"name": "
|
|
46673
|
-
"
|
|
46674
|
-
"deprecationMessage": "",
|
|
46675
|
-
"tagName": {
|
|
46676
|
-
"text": "param"
|
|
46677
|
-
}
|
|
46678
|
-
},
|
|
46679
|
-
{
|
|
46680
|
-
"name": "specifier",
|
|
46850
|
+
"name": "source",
|
|
46851
|
+
"type": "string",
|
|
46681
46852
|
"deprecated": false,
|
|
46682
46853
|
"deprecationMessage": "",
|
|
46683
46854
|
"tagName": {
|
|
@@ -46685,7 +46856,8 @@
|
|
|
46685
46856
|
}
|
|
46686
46857
|
},
|
|
46687
46858
|
{
|
|
46688
|
-
"name": "
|
|
46859
|
+
"name": "filePath",
|
|
46860
|
+
"type": "string",
|
|
46689
46861
|
"deprecated": false,
|
|
46690
46862
|
"deprecationMessage": "",
|
|
46691
46863
|
"tagName": {
|
|
@@ -46693,7 +46865,8 @@
|
|
|
46693
46865
|
}
|
|
46694
46866
|
},
|
|
46695
46867
|
{
|
|
46696
|
-
"name": "
|
|
46868
|
+
"name": "context",
|
|
46869
|
+
"type": "SchematicContext",
|
|
46697
46870
|
"deprecated": false,
|
|
46698
46871
|
"deprecationMessage": "",
|
|
46699
46872
|
"tagName": {
|
|
@@ -46703,8 +46876,8 @@
|
|
|
46703
46876
|
]
|
|
46704
46877
|
},
|
|
46705
46878
|
{
|
|
46706
|
-
"name": "
|
|
46707
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46879
|
+
"name": "migrateTemplate",
|
|
46880
|
+
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46708
46881
|
"ctype": "miscellaneous",
|
|
46709
46882
|
"subtype": "function",
|
|
46710
46883
|
"coverageIgnore": false,
|
|
@@ -46712,63 +46885,23 @@
|
|
|
46712
46885
|
"deprecationMessage": "",
|
|
46713
46886
|
"rawdescription": "",
|
|
46714
46887
|
"description": "",
|
|
46715
|
-
"displayName": "
|
|
46888
|
+
"displayName": "migrateTemplate",
|
|
46716
46889
|
"args": [
|
|
46717
46890
|
{
|
|
46718
|
-
"name": "
|
|
46719
|
-
"type": "
|
|
46720
|
-
"deprecated": false,
|
|
46721
|
-
"deprecationMessage": ""
|
|
46722
|
-
},
|
|
46723
|
-
{
|
|
46724
|
-
"name": "callback",
|
|
46891
|
+
"name": "source",
|
|
46892
|
+
"type": "string",
|
|
46725
46893
|
"deprecated": false,
|
|
46726
46894
|
"deprecationMessage": ""
|
|
46727
|
-
}
|
|
46728
|
-
],
|
|
46729
|
-
"returnType": "void",
|
|
46730
|
-
"jsdoctags": [
|
|
46731
|
-
{
|
|
46732
|
-
"name": "dir",
|
|
46733
|
-
"type": "DirEntry",
|
|
46734
|
-
"deprecated": false,
|
|
46735
|
-
"deprecationMessage": "",
|
|
46736
|
-
"tagName": {
|
|
46737
|
-
"text": "param"
|
|
46738
|
-
}
|
|
46739
46895
|
},
|
|
46740
46896
|
{
|
|
46741
|
-
"name": "
|
|
46742
|
-
"deprecated": false,
|
|
46743
|
-
"deprecationMessage": "",
|
|
46744
|
-
"tagName": {
|
|
46745
|
-
"text": "param"
|
|
46746
|
-
}
|
|
46747
|
-
}
|
|
46748
|
-
]
|
|
46749
|
-
}
|
|
46750
|
-
],
|
|
46751
|
-
"packages/core/schematics/migrate-eui-toolbar-menu/index.ts": [
|
|
46752
|
-
{
|
|
46753
|
-
"name": "applyEdits",
|
|
46754
|
-
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46755
|
-
"ctype": "miscellaneous",
|
|
46756
|
-
"subtype": "function",
|
|
46757
|
-
"coverageIgnore": false,
|
|
46758
|
-
"deprecated": false,
|
|
46759
|
-
"deprecationMessage": "",
|
|
46760
|
-
"rawdescription": "",
|
|
46761
|
-
"description": "",
|
|
46762
|
-
"displayName": "applyEdits",
|
|
46763
|
-
"args": [
|
|
46764
|
-
{
|
|
46765
|
-
"name": "source",
|
|
46897
|
+
"name": "filePath",
|
|
46766
46898
|
"type": "string",
|
|
46767
46899
|
"deprecated": false,
|
|
46768
46900
|
"deprecationMessage": ""
|
|
46769
46901
|
},
|
|
46770
46902
|
{
|
|
46771
|
-
"name": "
|
|
46903
|
+
"name": "context",
|
|
46904
|
+
"type": "SchematicContext",
|
|
46772
46905
|
"deprecated": false,
|
|
46773
46906
|
"deprecationMessage": ""
|
|
46774
46907
|
}
|
|
@@ -46785,7 +46918,17 @@
|
|
|
46785
46918
|
}
|
|
46786
46919
|
},
|
|
46787
46920
|
{
|
|
46788
|
-
"name": "
|
|
46921
|
+
"name": "filePath",
|
|
46922
|
+
"type": "string",
|
|
46923
|
+
"deprecated": false,
|
|
46924
|
+
"deprecationMessage": "",
|
|
46925
|
+
"tagName": {
|
|
46926
|
+
"text": "param"
|
|
46927
|
+
}
|
|
46928
|
+
},
|
|
46929
|
+
{
|
|
46930
|
+
"name": "context",
|
|
46931
|
+
"type": "SchematicContext",
|
|
46789
46932
|
"deprecated": false,
|
|
46790
46933
|
"deprecationMessage": "",
|
|
46791
46934
|
"tagName": {
|
|
@@ -46795,7 +46938,7 @@
|
|
|
46795
46938
|
]
|
|
46796
46939
|
},
|
|
46797
46940
|
{
|
|
46798
|
-
"name": "
|
|
46941
|
+
"name": "migrateTypeScript",
|
|
46799
46942
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46800
46943
|
"ctype": "miscellaneous",
|
|
46801
46944
|
"subtype": "function",
|
|
@@ -46804,25 +46947,14 @@
|
|
|
46804
46947
|
"deprecationMessage": "",
|
|
46805
46948
|
"rawdescription": "",
|
|
46806
46949
|
"description": "",
|
|
46807
|
-
"displayName": "
|
|
46950
|
+
"displayName": "migrateTypeScript",
|
|
46808
46951
|
"args": [
|
|
46809
|
-
{
|
|
46810
|
-
"name": "element",
|
|
46811
|
-
"type": "TmplAstElement",
|
|
46812
|
-
"deprecated": false,
|
|
46813
|
-
"deprecationMessage": ""
|
|
46814
|
-
},
|
|
46815
46952
|
{
|
|
46816
46953
|
"name": "source",
|
|
46817
46954
|
"type": "string",
|
|
46818
46955
|
"deprecated": false,
|
|
46819
46956
|
"deprecationMessage": ""
|
|
46820
46957
|
},
|
|
46821
|
-
{
|
|
46822
|
-
"name": "edits",
|
|
46823
|
-
"deprecated": false,
|
|
46824
|
-
"deprecationMessage": ""
|
|
46825
|
-
},
|
|
46826
46958
|
{
|
|
46827
46959
|
"name": "filePath",
|
|
46828
46960
|
"type": "string",
|
|
@@ -46836,17 +46968,8 @@
|
|
|
46836
46968
|
"deprecationMessage": ""
|
|
46837
46969
|
}
|
|
46838
46970
|
],
|
|
46839
|
-
"returnType": "
|
|
46971
|
+
"returnType": "string",
|
|
46840
46972
|
"jsdoctags": [
|
|
46841
|
-
{
|
|
46842
|
-
"name": "element",
|
|
46843
|
-
"type": "TmplAstElement",
|
|
46844
|
-
"deprecated": false,
|
|
46845
|
-
"deprecationMessage": "",
|
|
46846
|
-
"tagName": {
|
|
46847
|
-
"text": "param"
|
|
46848
|
-
}
|
|
46849
|
-
},
|
|
46850
46973
|
{
|
|
46851
46974
|
"name": "source",
|
|
46852
46975
|
"type": "string",
|
|
@@ -46856,14 +46979,6 @@
|
|
|
46856
46979
|
"text": "param"
|
|
46857
46980
|
}
|
|
46858
46981
|
},
|
|
46859
|
-
{
|
|
46860
|
-
"name": "edits",
|
|
46861
|
-
"deprecated": false,
|
|
46862
|
-
"deprecationMessage": "",
|
|
46863
|
-
"tagName": {
|
|
46864
|
-
"text": "param"
|
|
46865
|
-
}
|
|
46866
|
-
},
|
|
46867
46982
|
{
|
|
46868
46983
|
"name": "filePath",
|
|
46869
46984
|
"type": "string",
|
|
@@ -46885,7 +47000,7 @@
|
|
|
46885
47000
|
]
|
|
46886
47001
|
},
|
|
46887
47002
|
{
|
|
46888
|
-
"name": "
|
|
47003
|
+
"name": "removeImportSpecifier",
|
|
46889
47004
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46890
47005
|
"ctype": "miscellaneous",
|
|
46891
47006
|
"subtype": "function",
|
|
@@ -46894,17 +47009,20 @@
|
|
|
46894
47009
|
"deprecationMessage": "",
|
|
46895
47010
|
"rawdescription": "",
|
|
46896
47011
|
"description": "",
|
|
46897
|
-
"displayName": "
|
|
47012
|
+
"displayName": "removeImportSpecifier",
|
|
46898
47013
|
"args": [
|
|
46899
47014
|
{
|
|
46900
|
-
"name": "
|
|
46901
|
-
"type": "TmplAstElement",
|
|
47015
|
+
"name": "namedImports",
|
|
46902
47016
|
"deprecated": false,
|
|
46903
47017
|
"deprecationMessage": ""
|
|
46904
47018
|
},
|
|
46905
47019
|
{
|
|
46906
|
-
"name": "
|
|
46907
|
-
"
|
|
47020
|
+
"name": "specifier",
|
|
47021
|
+
"deprecated": false,
|
|
47022
|
+
"deprecationMessage": ""
|
|
47023
|
+
},
|
|
47024
|
+
{
|
|
47025
|
+
"name": "sourceFile",
|
|
46908
47026
|
"deprecated": false,
|
|
46909
47027
|
"deprecationMessage": ""
|
|
46910
47028
|
},
|
|
@@ -46917,8 +47035,7 @@
|
|
|
46917
47035
|
"returnType": "void",
|
|
46918
47036
|
"jsdoctags": [
|
|
46919
47037
|
{
|
|
46920
|
-
"name": "
|
|
46921
|
-
"type": "TmplAstElement",
|
|
47038
|
+
"name": "namedImports",
|
|
46922
47039
|
"deprecated": false,
|
|
46923
47040
|
"deprecationMessage": "",
|
|
46924
47041
|
"tagName": {
|
|
@@ -46926,8 +47043,7 @@
|
|
|
46926
47043
|
}
|
|
46927
47044
|
},
|
|
46928
47045
|
{
|
|
46929
|
-
"name": "
|
|
46930
|
-
"type": "string",
|
|
47046
|
+
"name": "specifier",
|
|
46931
47047
|
"deprecated": false,
|
|
46932
47048
|
"deprecationMessage": "",
|
|
46933
47049
|
"tagName": {
|
|
@@ -46935,35 +47051,13 @@
|
|
|
46935
47051
|
}
|
|
46936
47052
|
},
|
|
46937
47053
|
{
|
|
46938
|
-
"name": "
|
|
47054
|
+
"name": "sourceFile",
|
|
46939
47055
|
"deprecated": false,
|
|
46940
47056
|
"deprecationMessage": "",
|
|
46941
47057
|
"tagName": {
|
|
46942
47058
|
"text": "param"
|
|
46943
47059
|
}
|
|
46944
|
-
}
|
|
46945
|
-
]
|
|
46946
|
-
},
|
|
46947
|
-
{
|
|
46948
|
-
"name": "deduplicateEdits",
|
|
46949
|
-
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46950
|
-
"ctype": "miscellaneous",
|
|
46951
|
-
"subtype": "function",
|
|
46952
|
-
"coverageIgnore": false,
|
|
46953
|
-
"deprecated": false,
|
|
46954
|
-
"deprecationMessage": "",
|
|
46955
|
-
"rawdescription": "",
|
|
46956
|
-
"description": "",
|
|
46957
|
-
"displayName": "deduplicateEdits",
|
|
46958
|
-
"args": [
|
|
46959
|
-
{
|
|
46960
|
-
"name": "edits",
|
|
46961
|
-
"deprecated": false,
|
|
46962
|
-
"deprecationMessage": ""
|
|
46963
|
-
}
|
|
46964
|
-
],
|
|
46965
|
-
"returnType": "Edit[]",
|
|
46966
|
-
"jsdoctags": [
|
|
47060
|
+
},
|
|
46967
47061
|
{
|
|
46968
47062
|
"name": "edits",
|
|
46969
47063
|
"deprecated": false,
|
|
@@ -46975,7 +47069,7 @@
|
|
|
46975
47069
|
]
|
|
46976
47070
|
},
|
|
46977
47071
|
{
|
|
46978
|
-
"name": "
|
|
47072
|
+
"name": "unwrapExpression",
|
|
46979
47073
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
46980
47074
|
"ctype": "miscellaneous",
|
|
46981
47075
|
"subtype": "function",
|
|
@@ -46984,18 +47078,18 @@
|
|
|
46984
47078
|
"deprecationMessage": "",
|
|
46985
47079
|
"rawdescription": "",
|
|
46986
47080
|
"description": "",
|
|
46987
|
-
"displayName": "
|
|
47081
|
+
"displayName": "unwrapExpression",
|
|
46988
47082
|
"args": [
|
|
46989
47083
|
{
|
|
46990
|
-
"name": "
|
|
47084
|
+
"name": "expression",
|
|
46991
47085
|
"deprecated": false,
|
|
46992
47086
|
"deprecationMessage": ""
|
|
46993
47087
|
}
|
|
46994
47088
|
],
|
|
46995
|
-
"returnType": "
|
|
47089
|
+
"returnType": "ts.Expression",
|
|
46996
47090
|
"jsdoctags": [
|
|
46997
47091
|
{
|
|
46998
|
-
"name": "
|
|
47092
|
+
"name": "expression",
|
|
46999
47093
|
"deprecated": false,
|
|
47000
47094
|
"deprecationMessage": "",
|
|
47001
47095
|
"tagName": {
|
|
@@ -47005,7 +47099,7 @@
|
|
|
47005
47099
|
]
|
|
47006
47100
|
},
|
|
47007
47101
|
{
|
|
47008
|
-
"name": "
|
|
47102
|
+
"name": "visitDir",
|
|
47009
47103
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
47010
47104
|
"ctype": "miscellaneous",
|
|
47011
47105
|
"subtype": "function",
|
|
@@ -47014,54 +47108,35 @@
|
|
|
47014
47108
|
"deprecationMessage": "",
|
|
47015
47109
|
"rawdescription": "",
|
|
47016
47110
|
"description": "",
|
|
47017
|
-
"displayName": "
|
|
47111
|
+
"displayName": "visitDir",
|
|
47018
47112
|
"args": [
|
|
47019
47113
|
{
|
|
47020
|
-
"name": "
|
|
47114
|
+
"name": "dir",
|
|
47115
|
+
"type": "DirEntry",
|
|
47116
|
+
"deprecated": false,
|
|
47117
|
+
"deprecationMessage": ""
|
|
47118
|
+
},
|
|
47119
|
+
{
|
|
47120
|
+
"name": "callback",
|
|
47021
47121
|
"deprecated": false,
|
|
47022
47122
|
"deprecationMessage": ""
|
|
47023
47123
|
}
|
|
47024
47124
|
],
|
|
47025
|
-
"returnType": "
|
|
47125
|
+
"returnType": "void",
|
|
47026
47126
|
"jsdoctags": [
|
|
47027
47127
|
{
|
|
47028
|
-
"name": "
|
|
47128
|
+
"name": "dir",
|
|
47129
|
+
"type": "DirEntry",
|
|
47029
47130
|
"deprecated": false,
|
|
47030
47131
|
"deprecationMessage": "",
|
|
47031
47132
|
"tagName": {
|
|
47032
47133
|
"text": "param"
|
|
47033
47134
|
}
|
|
47034
|
-
}
|
|
47035
|
-
]
|
|
47036
|
-
},
|
|
47037
|
-
{
|
|
47038
|
-
"name": "migrateEuiToolbarMenu",
|
|
47039
|
-
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
47040
|
-
"ctype": "miscellaneous",
|
|
47041
|
-
"subtype": "function",
|
|
47042
|
-
"coverageIgnore": false,
|
|
47043
|
-
"deprecated": false,
|
|
47044
|
-
"deprecationMessage": "",
|
|
47045
|
-
"rawdescription": "",
|
|
47046
|
-
"description": "",
|
|
47047
|
-
"displayName": "migrateEuiToolbarMenu",
|
|
47048
|
-
"args": [
|
|
47049
|
-
{
|
|
47050
|
-
"name": "options",
|
|
47051
|
-
"type": "Schema",
|
|
47052
|
-
"deprecated": false,
|
|
47053
|
-
"deprecationMessage": "",
|
|
47054
|
-
"defaultValue": "{}"
|
|
47055
|
-
}
|
|
47056
|
-
],
|
|
47057
|
-
"returnType": "Rule",
|
|
47058
|
-
"jsdoctags": [
|
|
47135
|
+
},
|
|
47059
47136
|
{
|
|
47060
|
-
"name": "
|
|
47061
|
-
"type": "Schema",
|
|
47137
|
+
"name": "callback",
|
|
47062
47138
|
"deprecated": false,
|
|
47063
47139
|
"deprecationMessage": "",
|
|
47064
|
-
"defaultValue": "{}",
|
|
47065
47140
|
"tagName": {
|
|
47066
47141
|
"text": "param"
|
|
47067
47142
|
}
|
|
@@ -47069,7 +47144,7 @@
|
|
|
47069
47144
|
]
|
|
47070
47145
|
},
|
|
47071
47146
|
{
|
|
47072
|
-
"name": "
|
|
47147
|
+
"name": "visitNodes",
|
|
47073
47148
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
47074
47149
|
"ctype": "miscellaneous",
|
|
47075
47150
|
"subtype": "function",
|
|
@@ -47078,14 +47153,24 @@
|
|
|
47078
47153
|
"deprecationMessage": "",
|
|
47079
47154
|
"rawdescription": "",
|
|
47080
47155
|
"description": "",
|
|
47081
|
-
"displayName": "
|
|
47156
|
+
"displayName": "visitNodes",
|
|
47082
47157
|
"args": [
|
|
47158
|
+
{
|
|
47159
|
+
"name": "nodes",
|
|
47160
|
+
"deprecated": false,
|
|
47161
|
+
"deprecationMessage": ""
|
|
47162
|
+
},
|
|
47083
47163
|
{
|
|
47084
47164
|
"name": "source",
|
|
47085
47165
|
"type": "string",
|
|
47086
47166
|
"deprecated": false,
|
|
47087
47167
|
"deprecationMessage": ""
|
|
47088
47168
|
},
|
|
47169
|
+
{
|
|
47170
|
+
"name": "edits",
|
|
47171
|
+
"deprecated": false,
|
|
47172
|
+
"deprecationMessage": ""
|
|
47173
|
+
},
|
|
47089
47174
|
{
|
|
47090
47175
|
"name": "filePath",
|
|
47091
47176
|
"type": "string",
|
|
@@ -47099,8 +47184,16 @@
|
|
|
47099
47184
|
"deprecationMessage": ""
|
|
47100
47185
|
}
|
|
47101
47186
|
],
|
|
47102
|
-
"returnType": "
|
|
47187
|
+
"returnType": "void",
|
|
47103
47188
|
"jsdoctags": [
|
|
47189
|
+
{
|
|
47190
|
+
"name": "nodes",
|
|
47191
|
+
"deprecated": false,
|
|
47192
|
+
"deprecationMessage": "",
|
|
47193
|
+
"tagName": {
|
|
47194
|
+
"text": "param"
|
|
47195
|
+
}
|
|
47196
|
+
},
|
|
47104
47197
|
{
|
|
47105
47198
|
"name": "source",
|
|
47106
47199
|
"type": "string",
|
|
@@ -47110,6 +47203,14 @@
|
|
|
47110
47203
|
"text": "param"
|
|
47111
47204
|
}
|
|
47112
47205
|
},
|
|
47206
|
+
{
|
|
47207
|
+
"name": "edits",
|
|
47208
|
+
"deprecated": false,
|
|
47209
|
+
"deprecationMessage": "",
|
|
47210
|
+
"tagName": {
|
|
47211
|
+
"text": "param"
|
|
47212
|
+
}
|
|
47213
|
+
},
|
|
47113
47214
|
{
|
|
47114
47215
|
"name": "filePath",
|
|
47115
47216
|
"type": "string",
|
|
@@ -47131,7 +47232,7 @@
|
|
|
47131
47232
|
]
|
|
47132
47233
|
},
|
|
47133
47234
|
{
|
|
47134
|
-
"name": "
|
|
47235
|
+
"name": "warnRemovedProperties",
|
|
47135
47236
|
"file": "packages/core/schematics/migrate-eui-toolbar-menu/index.ts",
|
|
47136
47237
|
"ctype": "miscellaneous",
|
|
47137
47238
|
"subtype": "function",
|
|
@@ -47140,11 +47241,10 @@
|
|
|
47140
47241
|
"deprecationMessage": "",
|
|
47141
47242
|
"rawdescription": "",
|
|
47142
47243
|
"description": "",
|
|
47143
|
-
"displayName": "
|
|
47244
|
+
"displayName": "warnRemovedProperties",
|
|
47144
47245
|
"args": [
|
|
47145
47246
|
{
|
|
47146
|
-
"name": "
|
|
47147
|
-
"type": "string",
|
|
47247
|
+
"name": "sourceFile",
|
|
47148
47248
|
"deprecated": false,
|
|
47149
47249
|
"deprecationMessage": ""
|
|
47150
47250
|
},
|
|
@@ -47161,11 +47261,10 @@
|
|
|
47161
47261
|
"deprecationMessage": ""
|
|
47162
47262
|
}
|
|
47163
47263
|
],
|
|
47164
|
-
"returnType": "
|
|
47264
|
+
"returnType": "void",
|
|
47165
47265
|
"jsdoctags": [
|
|
47166
47266
|
{
|
|
47167
|
-
"name": "
|
|
47168
|
-
"type": "string",
|
|
47267
|
+
"name": "sourceFile",
|
|
47169
47268
|
"deprecated": false,
|
|
47170
47269
|
"deprecationMessage": "",
|
|
47171
47270
|
"tagName": {
|
|
@@ -47191,10 +47290,12 @@
|
|
|
47191
47290
|
}
|
|
47192
47291
|
}
|
|
47193
47292
|
]
|
|
47194
|
-
}
|
|
47293
|
+
}
|
|
47294
|
+
],
|
|
47295
|
+
"packages/core/schematics/migrate-eui-tooltip/index.ts": [
|
|
47195
47296
|
{
|
|
47196
|
-
"name": "
|
|
47197
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47297
|
+
"name": "applyEdits",
|
|
47298
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47198
47299
|
"ctype": "miscellaneous",
|
|
47199
47300
|
"subtype": "function",
|
|
47200
47301
|
"coverageIgnore": false,
|
|
@@ -47202,7 +47303,7 @@
|
|
|
47202
47303
|
"deprecationMessage": "",
|
|
47203
47304
|
"rawdescription": "",
|
|
47204
47305
|
"description": "",
|
|
47205
|
-
"displayName": "
|
|
47306
|
+
"displayName": "applyEdits",
|
|
47206
47307
|
"args": [
|
|
47207
47308
|
{
|
|
47208
47309
|
"name": "source",
|
|
@@ -47211,14 +47312,7 @@
|
|
|
47211
47312
|
"deprecationMessage": ""
|
|
47212
47313
|
},
|
|
47213
47314
|
{
|
|
47214
|
-
"name": "
|
|
47215
|
-
"type": "string",
|
|
47216
|
-
"deprecated": false,
|
|
47217
|
-
"deprecationMessage": ""
|
|
47218
|
-
},
|
|
47219
|
-
{
|
|
47220
|
-
"name": "context",
|
|
47221
|
-
"type": "SchematicContext",
|
|
47315
|
+
"name": "edits",
|
|
47222
47316
|
"deprecated": false,
|
|
47223
47317
|
"deprecationMessage": ""
|
|
47224
47318
|
}
|
|
@@ -47235,17 +47329,7 @@
|
|
|
47235
47329
|
}
|
|
47236
47330
|
},
|
|
47237
47331
|
{
|
|
47238
|
-
"name": "
|
|
47239
|
-
"type": "string",
|
|
47240
|
-
"deprecated": false,
|
|
47241
|
-
"deprecationMessage": "",
|
|
47242
|
-
"tagName": {
|
|
47243
|
-
"text": "param"
|
|
47244
|
-
}
|
|
47245
|
-
},
|
|
47246
|
-
{
|
|
47247
|
-
"name": "context",
|
|
47248
|
-
"type": "SchematicContext",
|
|
47332
|
+
"name": "edits",
|
|
47249
47333
|
"deprecated": false,
|
|
47250
47334
|
"deprecationMessage": "",
|
|
47251
47335
|
"tagName": {
|
|
@@ -47255,8 +47339,8 @@
|
|
|
47255
47339
|
]
|
|
47256
47340
|
},
|
|
47257
47341
|
{
|
|
47258
|
-
"name": "
|
|
47259
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47342
|
+
"name": "deduplicateEdits",
|
|
47343
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47260
47344
|
"ctype": "miscellaneous",
|
|
47261
47345
|
"subtype": "function",
|
|
47262
47346
|
"coverageIgnore": false,
|
|
@@ -47264,50 +47348,18 @@
|
|
|
47264
47348
|
"deprecationMessage": "",
|
|
47265
47349
|
"rawdescription": "",
|
|
47266
47350
|
"description": "",
|
|
47267
|
-
"displayName": "
|
|
47351
|
+
"displayName": "deduplicateEdits",
|
|
47268
47352
|
"args": [
|
|
47269
47353
|
{
|
|
47270
|
-
"name": "
|
|
47271
|
-
"type": "string",
|
|
47272
|
-
"deprecated": false,
|
|
47273
|
-
"deprecationMessage": ""
|
|
47274
|
-
},
|
|
47275
|
-
{
|
|
47276
|
-
"name": "filePath",
|
|
47277
|
-
"type": "string",
|
|
47278
|
-
"deprecated": false,
|
|
47279
|
-
"deprecationMessage": ""
|
|
47280
|
-
},
|
|
47281
|
-
{
|
|
47282
|
-
"name": "context",
|
|
47283
|
-
"type": "SchematicContext",
|
|
47354
|
+
"name": "edits",
|
|
47284
47355
|
"deprecated": false,
|
|
47285
47356
|
"deprecationMessage": ""
|
|
47286
47357
|
}
|
|
47287
47358
|
],
|
|
47288
|
-
"returnType": "
|
|
47359
|
+
"returnType": "Edit[]",
|
|
47289
47360
|
"jsdoctags": [
|
|
47290
47361
|
{
|
|
47291
|
-
"name": "
|
|
47292
|
-
"type": "string",
|
|
47293
|
-
"deprecated": false,
|
|
47294
|
-
"deprecationMessage": "",
|
|
47295
|
-
"tagName": {
|
|
47296
|
-
"text": "param"
|
|
47297
|
-
}
|
|
47298
|
-
},
|
|
47299
|
-
{
|
|
47300
|
-
"name": "filePath",
|
|
47301
|
-
"type": "string",
|
|
47302
|
-
"deprecated": false,
|
|
47303
|
-
"deprecationMessage": "",
|
|
47304
|
-
"tagName": {
|
|
47305
|
-
"text": "param"
|
|
47306
|
-
}
|
|
47307
|
-
},
|
|
47308
|
-
{
|
|
47309
|
-
"name": "context",
|
|
47310
|
-
"type": "SchematicContext",
|
|
47362
|
+
"name": "edits",
|
|
47311
47363
|
"deprecated": false,
|
|
47312
47364
|
"deprecationMessage": "",
|
|
47313
47365
|
"tagName": {
|
|
@@ -47317,8 +47369,8 @@
|
|
|
47317
47369
|
]
|
|
47318
47370
|
},
|
|
47319
47371
|
{
|
|
47320
|
-
"name": "
|
|
47321
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47372
|
+
"name": "isPartOfImport",
|
|
47373
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47322
47374
|
"ctype": "miscellaneous",
|
|
47323
47375
|
"subtype": "function",
|
|
47324
47376
|
"coverageIgnore": false,
|
|
@@ -47326,57 +47378,18 @@
|
|
|
47326
47378
|
"deprecationMessage": "",
|
|
47327
47379
|
"rawdescription": "",
|
|
47328
47380
|
"description": "",
|
|
47329
|
-
"displayName": "
|
|
47381
|
+
"displayName": "isPartOfImport",
|
|
47330
47382
|
"args": [
|
|
47331
47383
|
{
|
|
47332
|
-
"name": "
|
|
47333
|
-
"deprecated": false,
|
|
47334
|
-
"deprecationMessage": ""
|
|
47335
|
-
},
|
|
47336
|
-
{
|
|
47337
|
-
"name": "specifier",
|
|
47338
|
-
"deprecated": false,
|
|
47339
|
-
"deprecationMessage": ""
|
|
47340
|
-
},
|
|
47341
|
-
{
|
|
47342
|
-
"name": "sourceFile",
|
|
47343
|
-
"deprecated": false,
|
|
47344
|
-
"deprecationMessage": ""
|
|
47345
|
-
},
|
|
47346
|
-
{
|
|
47347
|
-
"name": "edits",
|
|
47384
|
+
"name": "node",
|
|
47348
47385
|
"deprecated": false,
|
|
47349
47386
|
"deprecationMessage": ""
|
|
47350
47387
|
}
|
|
47351
47388
|
],
|
|
47352
|
-
"returnType": "
|
|
47389
|
+
"returnType": "boolean",
|
|
47353
47390
|
"jsdoctags": [
|
|
47354
47391
|
{
|
|
47355
|
-
"name": "
|
|
47356
|
-
"deprecated": false,
|
|
47357
|
-
"deprecationMessage": "",
|
|
47358
|
-
"tagName": {
|
|
47359
|
-
"text": "param"
|
|
47360
|
-
}
|
|
47361
|
-
},
|
|
47362
|
-
{
|
|
47363
|
-
"name": "specifier",
|
|
47364
|
-
"deprecated": false,
|
|
47365
|
-
"deprecationMessage": "",
|
|
47366
|
-
"tagName": {
|
|
47367
|
-
"text": "param"
|
|
47368
|
-
}
|
|
47369
|
-
},
|
|
47370
|
-
{
|
|
47371
|
-
"name": "sourceFile",
|
|
47372
|
-
"deprecated": false,
|
|
47373
|
-
"deprecationMessage": "",
|
|
47374
|
-
"tagName": {
|
|
47375
|
-
"text": "param"
|
|
47376
|
-
}
|
|
47377
|
-
},
|
|
47378
|
-
{
|
|
47379
|
-
"name": "edits",
|
|
47392
|
+
"name": "node",
|
|
47380
47393
|
"deprecated": false,
|
|
47381
47394
|
"deprecationMessage": "",
|
|
47382
47395
|
"tagName": {
|
|
@@ -47386,8 +47399,8 @@
|
|
|
47386
47399
|
]
|
|
47387
47400
|
},
|
|
47388
47401
|
{
|
|
47389
|
-
"name": "
|
|
47390
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47402
|
+
"name": "migrateEuiTooltip",
|
|
47403
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47391
47404
|
"ctype": "miscellaneous",
|
|
47392
47405
|
"subtype": "function",
|
|
47393
47406
|
"coverageIgnore": false,
|
|
@@ -47395,20 +47408,24 @@
|
|
|
47395
47408
|
"deprecationMessage": "",
|
|
47396
47409
|
"rawdescription": "",
|
|
47397
47410
|
"description": "",
|
|
47398
|
-
"displayName": "
|
|
47411
|
+
"displayName": "migrateEuiTooltip",
|
|
47399
47412
|
"args": [
|
|
47400
47413
|
{
|
|
47401
|
-
"name": "
|
|
47414
|
+
"name": "options",
|
|
47415
|
+
"type": "Schema",
|
|
47402
47416
|
"deprecated": false,
|
|
47403
|
-
"deprecationMessage": ""
|
|
47417
|
+
"deprecationMessage": "",
|
|
47418
|
+
"defaultValue": "{}"
|
|
47404
47419
|
}
|
|
47405
47420
|
],
|
|
47406
|
-
"returnType": "
|
|
47421
|
+
"returnType": "Rule",
|
|
47407
47422
|
"jsdoctags": [
|
|
47408
47423
|
{
|
|
47409
|
-
"name": "
|
|
47424
|
+
"name": "options",
|
|
47425
|
+
"type": "Schema",
|
|
47410
47426
|
"deprecated": false,
|
|
47411
47427
|
"deprecationMessage": "",
|
|
47428
|
+
"defaultValue": "{}",
|
|
47412
47429
|
"tagName": {
|
|
47413
47430
|
"text": "param"
|
|
47414
47431
|
}
|
|
@@ -47416,8 +47433,8 @@
|
|
|
47416
47433
|
]
|
|
47417
47434
|
},
|
|
47418
47435
|
{
|
|
47419
|
-
"name": "
|
|
47420
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47436
|
+
"name": "migrateTypeScript",
|
|
47437
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47421
47438
|
"ctype": "miscellaneous",
|
|
47422
47439
|
"subtype": "function",
|
|
47423
47440
|
"coverageIgnore": false,
|
|
@@ -47425,25 +47442,32 @@
|
|
|
47425
47442
|
"deprecationMessage": "",
|
|
47426
47443
|
"rawdescription": "",
|
|
47427
47444
|
"description": "",
|
|
47428
|
-
"displayName": "
|
|
47445
|
+
"displayName": "migrateTypeScript",
|
|
47429
47446
|
"args": [
|
|
47430
47447
|
{
|
|
47431
|
-
"name": "
|
|
47432
|
-
"type": "
|
|
47448
|
+
"name": "source",
|
|
47449
|
+
"type": "string",
|
|
47433
47450
|
"deprecated": false,
|
|
47434
47451
|
"deprecationMessage": ""
|
|
47435
47452
|
},
|
|
47436
47453
|
{
|
|
47437
|
-
"name": "
|
|
47454
|
+
"name": "filePath",
|
|
47455
|
+
"type": "string",
|
|
47456
|
+
"deprecated": false,
|
|
47457
|
+
"deprecationMessage": ""
|
|
47458
|
+
},
|
|
47459
|
+
{
|
|
47460
|
+
"name": "context",
|
|
47461
|
+
"type": "SchematicContext",
|
|
47438
47462
|
"deprecated": false,
|
|
47439
47463
|
"deprecationMessage": ""
|
|
47440
47464
|
}
|
|
47441
47465
|
],
|
|
47442
|
-
"returnType": "
|
|
47466
|
+
"returnType": "string",
|
|
47443
47467
|
"jsdoctags": [
|
|
47444
47468
|
{
|
|
47445
|
-
"name": "
|
|
47446
|
-
"type": "
|
|
47469
|
+
"name": "source",
|
|
47470
|
+
"type": "string",
|
|
47447
47471
|
"deprecated": false,
|
|
47448
47472
|
"deprecationMessage": "",
|
|
47449
47473
|
"tagName": {
|
|
@@ -47451,7 +47475,17 @@
|
|
|
47451
47475
|
}
|
|
47452
47476
|
},
|
|
47453
47477
|
{
|
|
47454
|
-
"name": "
|
|
47478
|
+
"name": "filePath",
|
|
47479
|
+
"type": "string",
|
|
47480
|
+
"deprecated": false,
|
|
47481
|
+
"deprecationMessage": "",
|
|
47482
|
+
"tagName": {
|
|
47483
|
+
"text": "param"
|
|
47484
|
+
}
|
|
47485
|
+
},
|
|
47486
|
+
{
|
|
47487
|
+
"name": "context",
|
|
47488
|
+
"type": "SchematicContext",
|
|
47455
47489
|
"deprecated": false,
|
|
47456
47490
|
"deprecationMessage": "",
|
|
47457
47491
|
"tagName": {
|
|
@@ -47461,8 +47495,8 @@
|
|
|
47461
47495
|
]
|
|
47462
47496
|
},
|
|
47463
47497
|
{
|
|
47464
|
-
"name": "
|
|
47465
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47498
|
+
"name": "removeImportSpecifier",
|
|
47499
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47466
47500
|
"ctype": "miscellaneous",
|
|
47467
47501
|
"subtype": "function",
|
|
47468
47502
|
"coverageIgnore": false,
|
|
@@ -47470,33 +47504,25 @@
|
|
|
47470
47504
|
"deprecationMessage": "",
|
|
47471
47505
|
"rawdescription": "",
|
|
47472
47506
|
"description": "",
|
|
47473
|
-
"displayName": "
|
|
47507
|
+
"displayName": "removeImportSpecifier",
|
|
47474
47508
|
"args": [
|
|
47475
47509
|
{
|
|
47476
|
-
"name": "
|
|
47477
|
-
"deprecated": false,
|
|
47478
|
-
"deprecationMessage": ""
|
|
47479
|
-
},
|
|
47480
|
-
{
|
|
47481
|
-
"name": "source",
|
|
47482
|
-
"type": "string",
|
|
47510
|
+
"name": "namedImports",
|
|
47483
47511
|
"deprecated": false,
|
|
47484
47512
|
"deprecationMessage": ""
|
|
47485
47513
|
},
|
|
47486
47514
|
{
|
|
47487
|
-
"name": "
|
|
47515
|
+
"name": "specifier",
|
|
47488
47516
|
"deprecated": false,
|
|
47489
47517
|
"deprecationMessage": ""
|
|
47490
47518
|
},
|
|
47491
47519
|
{
|
|
47492
|
-
"name": "
|
|
47493
|
-
"type": "string",
|
|
47520
|
+
"name": "sourceFile",
|
|
47494
47521
|
"deprecated": false,
|
|
47495
47522
|
"deprecationMessage": ""
|
|
47496
47523
|
},
|
|
47497
47524
|
{
|
|
47498
|
-
"name": "
|
|
47499
|
-
"type": "SchematicContext",
|
|
47525
|
+
"name": "edits",
|
|
47500
47526
|
"deprecated": false,
|
|
47501
47527
|
"deprecationMessage": ""
|
|
47502
47528
|
}
|
|
@@ -47504,16 +47530,7 @@
|
|
|
47504
47530
|
"returnType": "void",
|
|
47505
47531
|
"jsdoctags": [
|
|
47506
47532
|
{
|
|
47507
|
-
"name": "
|
|
47508
|
-
"deprecated": false,
|
|
47509
|
-
"deprecationMessage": "",
|
|
47510
|
-
"tagName": {
|
|
47511
|
-
"text": "param"
|
|
47512
|
-
}
|
|
47513
|
-
},
|
|
47514
|
-
{
|
|
47515
|
-
"name": "source",
|
|
47516
|
-
"type": "string",
|
|
47533
|
+
"name": "namedImports",
|
|
47517
47534
|
"deprecated": false,
|
|
47518
47535
|
"deprecationMessage": "",
|
|
47519
47536
|
"tagName": {
|
|
@@ -47521,7 +47538,7 @@
|
|
|
47521
47538
|
}
|
|
47522
47539
|
},
|
|
47523
47540
|
{
|
|
47524
|
-
"name": "
|
|
47541
|
+
"name": "specifier",
|
|
47525
47542
|
"deprecated": false,
|
|
47526
47543
|
"deprecationMessage": "",
|
|
47527
47544
|
"tagName": {
|
|
@@ -47529,8 +47546,7 @@
|
|
|
47529
47546
|
}
|
|
47530
47547
|
},
|
|
47531
47548
|
{
|
|
47532
|
-
"name": "
|
|
47533
|
-
"type": "string",
|
|
47549
|
+
"name": "sourceFile",
|
|
47534
47550
|
"deprecated": false,
|
|
47535
47551
|
"deprecationMessage": "",
|
|
47536
47552
|
"tagName": {
|
|
@@ -47538,8 +47554,7 @@
|
|
|
47538
47554
|
}
|
|
47539
47555
|
},
|
|
47540
47556
|
{
|
|
47541
|
-
"name": "
|
|
47542
|
-
"type": "SchematicContext",
|
|
47557
|
+
"name": "edits",
|
|
47543
47558
|
"deprecated": false,
|
|
47544
47559
|
"deprecationMessage": "",
|
|
47545
47560
|
"tagName": {
|
|
@@ -47549,8 +47564,8 @@
|
|
|
47549
47564
|
]
|
|
47550
47565
|
},
|
|
47551
47566
|
{
|
|
47552
|
-
"name": "
|
|
47553
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
47567
|
+
"name": "visitDir",
|
|
47568
|
+
"file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
|
|
47554
47569
|
"ctype": "miscellaneous",
|
|
47555
47570
|
"subtype": "function",
|
|
47556
47571
|
"coverageIgnore": false,
|
|
@@ -47558,22 +47573,16 @@
|
|
|
47558
47573
|
"deprecationMessage": "",
|
|
47559
47574
|
"rawdescription": "",
|
|
47560
47575
|
"description": "",
|
|
47561
|
-
"displayName": "
|
|
47576
|
+
"displayName": "visitDir",
|
|
47562
47577
|
"args": [
|
|
47563
47578
|
{
|
|
47564
|
-
"name": "
|
|
47565
|
-
"
|
|
47566
|
-
"deprecationMessage": ""
|
|
47567
|
-
},
|
|
47568
|
-
{
|
|
47569
|
-
"name": "filePath",
|
|
47570
|
-
"type": "string",
|
|
47579
|
+
"name": "dir",
|
|
47580
|
+
"type": "DirEntry",
|
|
47571
47581
|
"deprecated": false,
|
|
47572
47582
|
"deprecationMessage": ""
|
|
47573
47583
|
},
|
|
47574
47584
|
{
|
|
47575
|
-
"name": "
|
|
47576
|
-
"type": "SchematicContext",
|
|
47585
|
+
"name": "callback",
|
|
47577
47586
|
"deprecated": false,
|
|
47578
47587
|
"deprecationMessage": ""
|
|
47579
47588
|
}
|
|
@@ -47581,16 +47590,8 @@
|
|
|
47581
47590
|
"returnType": "void",
|
|
47582
47591
|
"jsdoctags": [
|
|
47583
47592
|
{
|
|
47584
|
-
"name": "
|
|
47585
|
-
"
|
|
47586
|
-
"deprecationMessage": "",
|
|
47587
|
-
"tagName": {
|
|
47588
|
-
"text": "param"
|
|
47589
|
-
}
|
|
47590
|
-
},
|
|
47591
|
-
{
|
|
47592
|
-
"name": "filePath",
|
|
47593
|
-
"type": "string",
|
|
47593
|
+
"name": "dir",
|
|
47594
|
+
"type": "DirEntry",
|
|
47594
47595
|
"deprecated": false,
|
|
47595
47596
|
"deprecationMessage": "",
|
|
47596
47597
|
"tagName": {
|
|
@@ -47598,8 +47599,7 @@
|
|
|
47598
47599
|
}
|
|
47599
47600
|
},
|
|
47600
47601
|
{
|
|
47601
|
-
"name": "
|
|
47602
|
-
"type": "SchematicContext",
|
|
47602
|
+
"name": "callback",
|
|
47603
47603
|
"deprecated": false,
|
|
47604
47604
|
"deprecationMessage": "",
|
|
47605
47605
|
"tagName": {
|