@eui/core 22.0.0-alpha.79 → 22.0.0-alpha.80

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.
@@ -1327,12 +1327,12 @@
1327
1327
  },
1328
1328
  {
1329
1329
  "name": "Edit",
1330
- "id": "interface-Edit-980d307276c8b7dbd48ad94213df663d231afab569cba05a1947cf59716ec7dcf4bd8878195c0cc50bb9e36acbd400e34de218d6fae8086e413d6940631f1c42-9",
1331
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
1330
+ "id": "interface-Edit-c843ea269fc3d8500d533d44ebe7f67bffa8e4aed85455b57074dc76d3ff5194978ffa833f2b9d24a19121c6b30a501194aca63413c9498c63f7892da328ad45-9",
1331
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
1332
1332
  "deprecated": false,
1333
1333
  "deprecationMessage": "",
1334
1334
  "type": "interface",
1335
- "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\n/**\n * Migrates the removed `ecl-site-footer` element selector to\n * `footer[eclSiteFooter]`.\n *\n * In v22 the `ecl-site-footer` element selector was removed; the component only\n * matches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\n * to `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n * `.html` templates and inline `@Component` templates, preserving existing\n * attributes and content.\n */\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_TAG = 'ecl-site-footer';\nconst NEW_TAG = 'footer';\nconst ATTRIBUTE = 'eclSiteFooter';\n\nexport function migrateEclSiteFooter(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
1335
+ "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\n/**\n * Migrates the removed `ecl-tab` element selector to `div[eclTab]`.\n *\n * In v22 the legacy `ecl-tab` element selector was removed; the component only\n * matches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n * (and the closing tag to `</div>`) in external `.html` templates and inline\n * `@Component` templates, preserving existing attributes and content.\n */\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_TAG = 'ecl-tab';\nconst NEW_TAG = 'div';\nconst ATTRIBUTE = 'eclTab';\n\nexport function migrateEclTabs(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n // Exact tag match only — must not touch e.g. `ecl-tabs` or `ecl-tab-header`.\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
1336
1336
  "displayName": "Edit",
1337
1337
  "properties": [
1338
1338
  {
@@ -1344,7 +1344,7 @@
1344
1344
  "indexKey": "",
1345
1345
  "optional": false,
1346
1346
  "description": "",
1347
- "line": 24,
1347
+ "line": 22,
1348
1348
  "rawdescription": "\n"
1349
1349
  },
1350
1350
  {
@@ -1356,7 +1356,7 @@
1356
1356
  "indexKey": "",
1357
1357
  "optional": false,
1358
1358
  "description": "",
1359
- "line": 25,
1359
+ "line": 23,
1360
1360
  "rawdescription": "\n"
1361
1361
  },
1362
1362
  {
@@ -1368,7 +1368,7 @@
1368
1368
  "indexKey": "",
1369
1369
  "optional": false,
1370
1370
  "description": "",
1371
- "line": 23,
1371
+ "line": 21,
1372
1372
  "rawdescription": "\n"
1373
1373
  }
1374
1374
  ],
@@ -1386,12 +1386,12 @@
1386
1386
  },
1387
1387
  {
1388
1388
  "name": "Edit",
1389
- "id": "interface-Edit-c843ea269fc3d8500d533d44ebe7f67bffa8e4aed85455b57074dc76d3ff5194978ffa833f2b9d24a19121c6b30a501194aca63413c9498c63f7892da328ad45-10",
1390
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
1389
+ "id": "interface-Edit-980d307276c8b7dbd48ad94213df663d231afab569cba05a1947cf59716ec7dcf4bd8878195c0cc50bb9e36acbd400e34de218d6fae8086e413d6940631f1c42-10",
1390
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
1391
1391
  "deprecated": false,
1392
1392
  "deprecationMessage": "",
1393
1393
  "type": "interface",
1394
- "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\n/**\n * Migrates the removed `ecl-tab` element selector to `div[eclTab]`.\n *\n * In v22 the legacy `ecl-tab` element selector was removed; the component only\n * matches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n * (and the closing tag to `</div>`) in external `.html` templates and inline\n * `@Component` templates, preserving existing attributes and content.\n */\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_TAG = 'ecl-tab';\nconst NEW_TAG = 'div';\nconst ATTRIBUTE = 'eclTab';\n\nexport function migrateEclTabs(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n // Exact tag match only — must not touch e.g. `ecl-tabs` or `ecl-tab-header`.\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
1394
+ "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\n/**\n * Migrates the removed `ecl-site-footer` element selector to\n * `footer[eclSiteFooter]`.\n *\n * In v22 the `ecl-site-footer` element selector was removed; the component only\n * matches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\n * to `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n * `.html` templates and inline `@Component` templates, preserving existing\n * attributes and content.\n */\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_TAG = 'ecl-site-footer';\nconst NEW_TAG = 'footer';\nconst ATTRIBUTE = 'eclSiteFooter';\n\nexport function migrateEclSiteFooter(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
1395
1395
  "displayName": "Edit",
1396
1396
  "properties": [
1397
1397
  {
@@ -1403,7 +1403,7 @@
1403
1403
  "indexKey": "",
1404
1404
  "optional": false,
1405
1405
  "description": "",
1406
- "line": 22,
1406
+ "line": 24,
1407
1407
  "rawdescription": "\n"
1408
1408
  },
1409
1409
  {
@@ -1415,7 +1415,7 @@
1415
1415
  "indexKey": "",
1416
1416
  "optional": false,
1417
1417
  "description": "",
1418
- "line": 23,
1418
+ "line": 25,
1419
1419
  "rawdescription": "\n"
1420
1420
  },
1421
1421
  {
@@ -1427,7 +1427,7 @@
1427
1427
  "indexKey": "",
1428
1428
  "optional": false,
1429
1429
  "description": "",
1430
- "line": 21,
1430
+ "line": 23,
1431
1431
  "rawdescription": "\n"
1432
1432
  }
1433
1433
  ],
@@ -3819,12 +3819,12 @@
3819
3819
  },
3820
3820
  {
3821
3821
  "name": "Schema",
3822
- "id": "interface-Schema-980d307276c8b7dbd48ad94213df663d231afab569cba05a1947cf59716ec7dcf4bd8878195c0cc50bb9e36acbd400e34de218d6fae8086e413d6940631f1c42-14",
3823
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
3822
+ "id": "interface-Schema-c843ea269fc3d8500d533d44ebe7f67bffa8e4aed85455b57074dc76d3ff5194978ffa833f2b9d24a19121c6b30a501194aca63413c9498c63f7892da328ad45-14",
3823
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
3824
3824
  "deprecated": false,
3825
3825
  "deprecationMessage": "",
3826
3826
  "type": "interface",
3827
- "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\n/**\n * Migrates the removed `ecl-site-footer` element selector to\n * `footer[eclSiteFooter]`.\n *\n * In v22 the `ecl-site-footer` element selector was removed; the component only\n * matches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\n * to `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n * `.html` templates and inline `@Component` templates, preserving existing\n * attributes and content.\n */\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_TAG = 'ecl-site-footer';\nconst NEW_TAG = 'footer';\nconst ATTRIBUTE = 'eclSiteFooter';\n\nexport function migrateEclSiteFooter(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
3827
+ "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\n/**\n * Migrates the removed `ecl-tab` element selector to `div[eclTab]`.\n *\n * In v22 the legacy `ecl-tab` element selector was removed; the component only\n * matches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n * (and the closing tag to `</div>`) in external `.html` templates and inline\n * `@Component` templates, preserving existing attributes and content.\n */\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_TAG = 'ecl-tab';\nconst NEW_TAG = 'div';\nconst ATTRIBUTE = 'eclTab';\n\nexport function migrateEclTabs(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n // Exact tag match only — must not touch e.g. `ecl-tabs` or `ecl-tab-header`.\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
3828
3828
  "displayName": "Schema",
3829
3829
  "properties": [
3830
3830
  {
@@ -3836,7 +3836,7 @@
3836
3836
  "indexKey": "",
3837
3837
  "optional": true,
3838
3838
  "description": "",
3839
- "line": 19,
3839
+ "line": 17,
3840
3840
  "rawdescription": "\n"
3841
3841
  },
3842
3842
  {
@@ -3848,14 +3848,14 @@
3848
3848
  "indexKey": "",
3849
3849
  "optional": true,
3850
3850
  "description": "",
3851
- "line": 18,
3851
+ "line": 16,
3852
3852
  "rawdescription": "\n"
3853
3853
  }
3854
3854
  ],
3855
3855
  "indexSignatures": [],
3856
3856
  "kind": 172,
3857
- "description": "<p>Migrates the removed <code>ecl-site-footer</code> element selector to\n<code>footer[eclSiteFooter]</code>.</p>\n<p>In v22 the <code>ecl-site-footer</code> element selector was removed; the component only\nmatches <code>footer[eclSiteFooter]</code>. This schematic rewrites <code>&lt;ecl-site-footer&gt;</code>\nto <code>&lt;footer eclSiteFooter&gt;</code> (and the closing tag to <code>&lt;/footer&gt;</code>) in external\n<code>.html</code> templates and inline <code>@Component</code> templates, preserving existing\nattributes and content.</p>\n",
3858
- "rawdescription": "\n\nMigrates the removed `ecl-site-footer` element selector to\n`footer[eclSiteFooter]`.\n\nIn v22 the `ecl-site-footer` element selector was removed; the component only\nmatches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\nto `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n`.html` templates and inline `@Component` templates, preserving existing\nattributes and content.\n",
3857
+ "description": "<p>Migrates the removed <code>ecl-tab</code> element selector to <code>div[eclTab]</code>.</p>\n<p>In v22 the legacy <code>ecl-tab</code> element selector was removed; the component only\nmatches <code>div[eclTab]</code>. This schematic rewrites <code>&lt;ecl-tab&gt;</code> to <code>&lt;div eclTab&gt;</code>\n(and the closing tag to <code>&lt;/div&gt;</code>) in external <code>.html</code> templates and inline\n<code>@Component</code> templates, preserving existing attributes and content.</p>\n",
3858
+ "rawdescription": "\n\nMigrates the removed `ecl-tab` element selector to `div[eclTab]`.\n\nIn v22 the legacy `ecl-tab` element selector was removed; the component only\nmatches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n(and the closing tag to `</div>`) in external `.html` templates and inline\n`@Component` templates, preserving existing attributes and content.\n",
3859
3859
  "methods": [],
3860
3860
  "extends": [],
3861
3861
  "isDuplicate": true,
@@ -3868,12 +3868,12 @@
3868
3868
  },
3869
3869
  {
3870
3870
  "name": "Schema",
3871
- "id": "interface-Schema-c843ea269fc3d8500d533d44ebe7f67bffa8e4aed85455b57074dc76d3ff5194978ffa833f2b9d24a19121c6b30a501194aca63413c9498c63f7892da328ad45-15",
3872
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
3871
+ "id": "interface-Schema-980d307276c8b7dbd48ad94213df663d231afab569cba05a1947cf59716ec7dcf4bd8878195c0cc50bb9e36acbd400e34de218d6fae8086e413d6940631f1c42-15",
3872
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
3873
3873
  "deprecated": false,
3874
3874
  "deprecationMessage": "",
3875
3875
  "type": "interface",
3876
- "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\n/**\n * Migrates the removed `ecl-tab` element selector to `div[eclTab]`.\n *\n * In v22 the legacy `ecl-tab` element selector was removed; the component only\n * matches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n * (and the closing tag to `</div>`) in external `.html` templates and inline\n * `@Component` templates, preserving existing attributes and content.\n */\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_TAG = 'ecl-tab';\nconst NEW_TAG = 'div';\nconst ATTRIBUTE = 'eclTab';\n\nexport function migrateEclTabs(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n // Exact tag match only — must not touch e.g. `ecl-tabs` or `ecl-tab-header`.\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
3876
+ "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\n/**\n * Migrates the removed `ecl-site-footer` element selector to\n * `footer[eclSiteFooter]`.\n *\n * In v22 the `ecl-site-footer` element selector was removed; the component only\n * matches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\n * to `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n * `.html` templates and inline `@Component` templates, preserving existing\n * attributes and content.\n */\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_TAG = 'ecl-site-footer';\nconst NEW_TAG = 'footer';\nconst ATTRIBUTE = 'eclSiteFooter';\n\nexport function migrateEclSiteFooter(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)) return;\n\n const result = path.endsWith('.html') ? migrateTemplate(original) : migrateTypeScript(original, path);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would migrate ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n fileCount++;\n }\n });\n\n context.logger.info(`Migrated ${OLD_TAG} → ${NEW_TAG}[${ATTRIBUTE}] in ${fileCount} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction migrateTemplate(source: string): string {\n let parsed;\n try {\n parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n } catch {\n return source;\n }\n\n const edits: Edit[] = [];\n visitNodes(parsed.nodes, edits);\n return applyEdits(source, edits);\n}\n\nfunction migrateTypeScript(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: 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 const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n edits.push({ start, end, replacement: migrated });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n return applyEdits(source, edits);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === OLD_TAG) {\n collectElementRename(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectElementRename(element: TmplAstElement, edits: Edit[]): void {\n const openTagNameStart = element.startSourceSpan.start.offset + 1; // skip '<'\n const openTagNameEnd = openTagNameStart + OLD_TAG.length;\n\n const alreadyHasAttribute =\n element.attributes.some((a) => a.name === ATTRIBUTE) || element.inputs.some((i) => i.name === ATTRIBUTE);\n\n const replacement = alreadyHasAttribute ? NEW_TAG : `${NEW_TAG} ${ATTRIBUTE}`;\n edits.push({ start: openTagNameStart, end: openTagNameEnd, replacement });\n\n if (element.endSourceSpan) {\n const closeTagNameStart = element.endSourceSpan.start.offset + 2; // skip '</'\n edits.push({ start: closeTagNameStart, end: closeTagNameStart + OLD_TAG.length, replacement: NEW_TAG });\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 (\n ts.isDecorator(callExpression.parent) &&\n ts.isIdentifier(callExpression.expression) &&\n callExpression.expression.text === 'Component'\n );\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n 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('.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",
3877
3877
  "displayName": "Schema",
3878
3878
  "properties": [
3879
3879
  {
@@ -3885,7 +3885,7 @@
3885
3885
  "indexKey": "",
3886
3886
  "optional": true,
3887
3887
  "description": "",
3888
- "line": 17,
3888
+ "line": 19,
3889
3889
  "rawdescription": "\n"
3890
3890
  },
3891
3891
  {
@@ -3897,14 +3897,14 @@
3897
3897
  "indexKey": "",
3898
3898
  "optional": true,
3899
3899
  "description": "",
3900
- "line": 16,
3900
+ "line": 18,
3901
3901
  "rawdescription": "\n"
3902
3902
  }
3903
3903
  ],
3904
3904
  "indexSignatures": [],
3905
3905
  "kind": 172,
3906
- "description": "<p>Migrates the removed <code>ecl-tab</code> element selector to <code>div[eclTab]</code>.</p>\n<p>In v22 the legacy <code>ecl-tab</code> element selector was removed; the component only\nmatches <code>div[eclTab]</code>. This schematic rewrites <code>&lt;ecl-tab&gt;</code> to <code>&lt;div eclTab&gt;</code>\n(and the closing tag to <code>&lt;/div&gt;</code>) in external <code>.html</code> templates and inline\n<code>@Component</code> templates, preserving existing attributes and content.</p>\n",
3907
- "rawdescription": "\n\nMigrates the removed `ecl-tab` element selector to `div[eclTab]`.\n\nIn v22 the legacy `ecl-tab` element selector was removed; the component only\nmatches `div[eclTab]`. This schematic rewrites `<ecl-tab>` to `<div eclTab>`\n(and the closing tag to `</div>`) in external `.html` templates and inline\n`@Component` templates, preserving existing attributes and content.\n",
3906
+ "description": "<p>Migrates the removed <code>ecl-site-footer</code> element selector to\n<code>footer[eclSiteFooter]</code>.</p>\n<p>In v22 the <code>ecl-site-footer</code> element selector was removed; the component only\nmatches <code>footer[eclSiteFooter]</code>. This schematic rewrites <code>&lt;ecl-site-footer&gt;</code>\nto <code>&lt;footer eclSiteFooter&gt;</code> (and the closing tag to <code>&lt;/footer&gt;</code>) in external\n<code>.html</code> templates and inline <code>@Component</code> templates, preserving existing\nattributes and content.</p>\n",
3907
+ "rawdescription": "\n\nMigrates the removed `ecl-site-footer` element selector to\n`footer[eclSiteFooter]`.\n\nIn v22 the `ecl-site-footer` element selector was removed; the component only\nmatches `footer[eclSiteFooter]`. This schematic rewrites `<ecl-site-footer>`\nto `<footer eclSiteFooter>` (and the closing tag to `</footer>`) in external\n`.html` templates and inline `@Component` templates, preserving existing\nattributes and content.\n",
3908
3908
  "methods": [],
3909
3909
  "extends": [],
3910
3910
  "isDuplicate": true,
@@ -3966,12 +3966,12 @@
3966
3966
  },
3967
3967
  {
3968
3968
  "name": "Schema",
3969
- "id": "interface-Schema-e96d29c1785a16147de773cebe7ab5d4ed82aa23c6b1f7737113252a14d156e236f46f7a16340432dec900b664c8005be0aef5d0a628c2f5b8dd2ec7e41edf56-17",
3970
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
3969
+ "id": "interface-Schema-7b851472e7880564b5c23c64840d46f99fe7de22cba4c1f05f48fcf19501ac8e8f64116ace6cff269eb2cbe6cc058271b115f59cfd8f9dfda1f26145c65c5049-17",
3970
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
3971
3971
  "deprecated": false,
3972
3972
  "deprecationMessage": "",
3973
3973
  "type": "interface",
3974
- "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'euiAccent';\nconst NEW_NAME = 'euiPrimary';\nconst EUI_DIRECTIVES = ['euiButton', 'euiList', 'euiListItem'];\n\nexport function migrateEuiAccent(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(OLD_NAME)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would replace '${OLD_NAME}' → '${NEW_NAME}' in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on EUI components 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 isEuiElement(element: TmplAstElement): boolean {\n if (element.name.startsWith('eui-')) return true;\n return element.attributes.some((a) => EUI_DIRECTIVES.includes(a.name)) ||\n element.inputs.some((i) => EUI_DIRECTIVES.includes(i.name));\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(OLD_NAME)) {\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 renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: NEW_NAME });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\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 (isEuiElement(node)) 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
3974
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['alertIconType', 'alertIconFillColor', 'isMuted', 'isBordered']);\n\nexport function migrateEuiAlert(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-alert') && !original.includes('euiAlert')) 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 deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (![...REMOVED_INPUTS].some((input) => original.includes(input))) return;\n\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) && REMOVED_INPUTS.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"${node.name.text}\" is no longer a valid input on eui-alert. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-alert inputs from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n // Apply removals in reverse order\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, start) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n // Simple approach: find template strings containing eui-alert and process them\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-alert') && !templateContent.includes('euiAlert')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-alert' || hasAttribute(node, 'euiAlert')) {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction hasAttribute(element: TmplAstElement, attrName: string): boolean {\n return element.attributes.some((a) => a.name === attrName);\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
3975
3975
  "displayName": "Schema",
3976
3976
  "properties": [
3977
3977
  {
@@ -4013,12 +4013,12 @@
4013
4013
  },
4014
4014
  {
4015
4015
  "name": "Schema",
4016
- "id": "interface-Schema-7b851472e7880564b5c23c64840d46f99fe7de22cba4c1f05f48fcf19501ac8e8f64116ace6cff269eb2cbe6cc058271b115f59cfd8f9dfda1f26145c65c5049-18",
4017
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
4016
+ "id": "interface-Schema-c7e2cc0add09c97d83ec2675d59c86951681f8e2d49f133fb2f216ca98d0da1fdf892d45af31f19ecbbfd0d32f4ad70dd99e862f75725d3812f66a73ec34362c-18",
4017
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
4018
4018
  "deprecated": false,
4019
4019
  "deprecationMessage": "",
4020
4020
  "type": "interface",
4021
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['alertIconType', 'alertIconFillColor', 'isMuted', 'isBordered']);\n\nexport function migrateEuiAlert(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-alert') && !original.includes('euiAlert')) 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 deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (![...REMOVED_INPUTS].some((input) => original.includes(input))) return;\n\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) && REMOVED_INPUTS.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"${node.name.text}\" is no longer a valid input on eui-alert. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-alert inputs from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n // Apply removals in reverse order\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, start) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n // Simple approach: find template strings containing eui-alert and process them\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-alert') && !templateContent.includes('euiAlert')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-alert' || hasAttribute(node, 'euiAlert')) {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction hasAttribute(element: TmplAstElement, attrName: string): boolean {\n return element.attributes.some((a) => a.name === attrName);\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
4021
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isFlat']);\n\nexport function migrateEuiAvatar(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-avatar') && !original.includes('euiAvatar')) 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 'isFlat' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (!original.includes('isFlat')) return;\n\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 === 'isFlat') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isFlat\" is no longer a valid input on eui-avatar. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-avatar 'isFlat' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-avatar') && !templateContent.includes('euiAvatar')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isAvatarElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-avatar') return true;\n return element.attributes.some((a) => a.name === 'euiAvatar');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isAvatarElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
4022
4022
  "displayName": "Schema",
4023
4023
  "properties": [
4024
4024
  {
@@ -4060,12 +4060,12 @@
4060
4060
  },
4061
4061
  {
4062
4062
  "name": "Schema",
4063
- "id": "interface-Schema-c7e2cc0add09c97d83ec2675d59c86951681f8e2d49f133fb2f216ca98d0da1fdf892d45af31f19ecbbfd0d32f4ad70dd99e862f75725d3812f66a73ec34362c-19",
4064
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
4063
+ "id": "interface-Schema-c0c08f5e83da9afa13ce8375f982fb280b9bde854e00c914f41b04d44deecd531496c2cee264b50314e92a6260c26cebe35741a2cf5ec068d8b6da5c5267539e-19",
4064
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
4065
4065
  "deprecated": false,
4066
4066
  "deprecationMessage": "",
4067
4067
  "type": "interface",
4068
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isFlat']);\n\nexport function migrateEuiAvatar(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-avatar') && !original.includes('euiAvatar')) 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 'isFlat' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (!original.includes('isFlat')) return;\n\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 === 'isFlat') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isFlat\" is no longer a valid input on eui-avatar. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-avatar 'isFlat' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-avatar') && !templateContent.includes('euiAvatar')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isAvatarElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-avatar') return true;\n return element.attributes.some((a) => a.name === 'euiAvatar');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isAvatarElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
4068
+ "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'euiButtonCall';\nconst NEW_NAME = 'euiCTAButton';\n\nexport function migrateEuiButton(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(OLD_NAME)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n }\n\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 // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (!original.includes(OLD_NAME)) return;\n\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 === OLD_NAME) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"${OLD_NAME}\" has been renamed to \"${NEW_NAME}\". Update this reference manually.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on elements with euiButton 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(OLD_NAME)) {\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 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 hasEuiButtonAttribute(element: TmplAstElement): boolean {\n return element.attributes.some((a) => a.name === 'euiButton') ||\n element.inputs.some((i) => i.name === 'euiButton');\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 (hasEuiButtonAttribute(node)) 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4069
4069
  "displayName": "Schema",
4070
4070
  "properties": [
4071
4071
  {
@@ -4107,12 +4107,12 @@
4107
4107
  },
4108
4108
  {
4109
4109
  "name": "Schema",
4110
- "id": "interface-Schema-c0c08f5e83da9afa13ce8375f982fb280b9bde854e00c914f41b04d44deecd531496c2cee264b50314e92a6260c26cebe35741a2cf5ec068d8b6da5c5267539e-20",
4111
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
4110
+ "id": "interface-Schema-39d3d52e788050bebc4e0b99ed0756f7e9727556cb090ae8796bd4261a56463fe1f479c322b23028cd4134d71e4d1dc44cd248ac62a9a148b5fc46a665466f7c-20",
4111
+ "file": "packages/core/schematics/migrate-eui-chip/index.ts",
4112
4112
  "deprecated": false,
4113
4113
  "deprecationMessage": "",
4114
4114
  "type": "interface",
4115
- "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'euiButtonCall';\nconst NEW_NAME = 'euiCTAButton';\n\nexport function migrateEuiButton(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(OLD_NAME)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n }\n\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 // Warn about TS property access usages\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if (!original.includes(OLD_NAME)) return;\n\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 === OLD_NAME) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"${OLD_NAME}\" has been renamed to \"${NEW_NAME}\". Update this reference manually.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on elements with euiButton 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(OLD_NAME)) {\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 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 hasEuiButtonAttribute(element: TmplAstElement): boolean {\n return element.attributes.some((a) => a.name === 'euiButton') ||\n element.inputs.some((i) => i.name === 'euiButton');\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 (hasEuiButtonAttribute(node)) 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4115
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isSquared']);\n\nexport function migrateEuiChip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-chip') && !original.includes('euiChip')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'isSquared' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes('isSquared')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'isSquared') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isSquared\" is no longer a valid input on eui-chip. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-chip 'isSquared' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-chip') && !templateContent.includes('euiChip')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-chip') return true;\n return element.attributes.some((a) => a.name === 'euiChip');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
4116
4116
  "displayName": "Schema",
4117
4117
  "properties": [
4118
4118
  {
@@ -4154,12 +4154,12 @@
4154
4154
  },
4155
4155
  {
4156
4156
  "name": "Schema",
4157
- "id": "interface-Schema-39d3d52e788050bebc4e0b99ed0756f7e9727556cb090ae8796bd4261a56463fe1f479c322b23028cd4134d71e4d1dc44cd248ac62a9a148b5fc46a665466f7c-21",
4158
- "file": "packages/core/schematics/migrate-eui-chip/index.ts",
4157
+ "id": "interface-Schema-182700f0e4bd2873ad878a9ebb097ec4a991ece85f645d0d984eafdb08bbeac1adc7999ea9f13567b82a8bcd36ea346d8041dfe4af3b82fa97ad6027eb9f8fde-21",
4158
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
4159
4159
  "deprecated": false,
4160
4160
  "deprecationMessage": "",
4161
4161
  "type": "interface",
4162
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['isSquared']);\n\nexport function migrateEuiChip(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-chip') && !original.includes('euiChip')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'isSquared' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes('isSquared')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'isSquared') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"isSquared\" is no longer a valid input on eui-chip. Remove this assignment.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Removed deprecated eui-chip 'isSquared' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-chip') && !templateContent.includes('euiChip')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === 'eui-chip') return true;\n return element.attributes.some((a) => a.name === 'euiChip');\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) collectRemovals(node, removals);\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
4162
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst CHIP_LIST_TAG = 'eui-chip-list';\nconst CHIP_LIST_ATTR = 'euiChipList';\nconst CHIP_TAG = 'eui-chip';\nconst CHIP_ATTR = 'euiChip';\n\nconst PROPAGATED_INPUTS = new Set([\n 'euiPrimary', 'euiSecondary', 'euiSuccess', 'euiInfo', 'euiWarning',\n 'euiDanger', 'euiAccent', 'euiVariant', 'euiSizeS', 'euiSizeVariant',\n 'euiOutline', 'euiDisabled',\n]);\n\nconst WARN_PROPERTIES = new Set([...PROPAGATED_INPUTS, 'chipRemove', 'isChipsRemovable', 'chipsLabelTruncateCount',\n 'maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel',\n 'isChipsSorted', 'chipsSortOrder']);\n\nconst REMOVED_INPUTS = new Set(['maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel', 'isChipsSorted', 'chipsSortOrder']);\n\nconst TRUNCATE_PIPE_IMPORT = 'EuiTruncatePipe';\nconst TRUNCATE_PIPE_PATH = '@eui/components/pipes';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiChipList(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const filesNeedingTruncateImport = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(CHIP_LIST_TAG) && !original.includes(CHIP_LIST_ATTR)) return;\n\n let result: string;\n let addedTruncate = false;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n // Find the associated .ts file\n const tsPath = path.replace(/\\.html$/, '.ts');\n if (tree.exists(tsPath)) {\n filesNeedingTruncateImport.add(tsPath);\n } else {\n // Try component naming convention\n const componentTsPath = path.replace(/\\.html$/, '.component.ts');\n if (tree.exists(componentTsPath)) {\n filesNeedingTruncateImport.add(componentTsPath);\n }\n }\n }\n } else {\n result = migrateInlineTemplates(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n addedTruncate = true;\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would move variant/size/outline inputs to child eui-chip in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n if (addedTruncate) {\n filesNeedingTruncateImport.add(path);\n }\n\n // Warn about TS usages of removed properties\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if ([...WARN_PROPERTIES].some((p) => original.includes(p))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && WARN_PROPERTIES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been removed from eui-chip-list. Move it to individual eui-chip elements.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n // Add EuiTruncatePipe import to component files that need it\n for (const tsPath of filesNeedingTruncateImport) {\n const buffer = tree.read(tsPath);\n if (!buffer) continue;\n const source = buffer.toString('utf-8');\n if (source.includes(TRUNCATE_PIPE_IMPORT)) continue;\n const result = addTruncatePipeImport(source, tsPath);\n if (result !== source) {\n if (!options.dryRun) {\n tree.overwrite(tsPath, result);\n }\n }\n }\n\n context.logger.info(`Migrated eui-chip-list inputs/outputs to child eui-chip in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction addTruncatePipeImport(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n const edits: Edit[] = [];\n\n // 1. Add ES import statement for EuiTruncatePipe\n let hasEsImport = false;\n let lastImportEnd = 0;\n\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n if (moduleSpec === TRUNCATE_PIPE_PATH) {\n const namedBindings = stmt.importClause?.namedBindings;\n if (namedBindings && ts.isNamedImports(namedBindings)) {\n if (namedBindings.elements.some((el) => el.name.text === TRUNCATE_PIPE_IMPORT)) {\n hasEsImport = true;\n } else {\n // Add to existing import from same path\n const lastEl = namedBindings.elements[namedBindings.elements.length - 1];\n edits.push({ start: lastEl.getEnd(), end: lastEl.getEnd(), replacement: `, ${TRUNCATE_PIPE_IMPORT}` });\n hasEsImport = true;\n }\n }\n }\n }\n }\n\n if (!hasEsImport) {\n const importStatement = `\\nimport { ${TRUNCATE_PIPE_IMPORT} } from '${TRUNCATE_PIPE_PATH}';`;\n edits.push({ start: lastImportEnd, end: lastImportEnd, replacement: importStatement });\n }\n\n // 2. Add EuiTruncatePipe to @Component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const arr = prop.initializer;\n const arrText = source.slice(arr.getStart(sourceFile), arr.getEnd());\n if (arrText.includes(TRUNCATE_PIPE_IMPORT)) continue;\n if (arr.elements.length > 0) {\n const lastElement = arr.elements[arr.elements.length - 1];\n edits.push({ start: lastElement.getEnd(), end: lastElement.getEnd(), replacement: `,\\n ${TRUNCATE_PIPE_IMPORT}` });\n } else {\n edits.push({ start: arr.getStart(sourceFile) + 1, end: arr.getEnd() - 1, replacement: TRUNCATE_PIPE_IMPORT });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(CHIP_LIST_TAG) && !rawTemplate.includes(CHIP_LIST_ATTR)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, changes);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipListElement(node)) {\n migrateChipListElement(node, source, edits);\n }\n visitNodes(node.children, source, edits);\n }\n }\n}\n\nfunction isChipListElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_LIST_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_LIST_ATTR);\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_ATTR);\n}\n\nfunction findChildChips(nodes: TmplAstNode[]): TmplAstElement[] {\n const chips: TmplAstElement[] = [];\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) {\n chips.push(node);\n } else {\n chips.push(...findChildChips(node.children));\n }\n }\n }\n return chips;\n}\n\nfunction migrateChipListElement(element: TmplAstElement, source: string, edits: Edit[]): void {\n const childChips = findChildChips(element.children);\n const insertions: string[] = [];\n let truncateValue: string | null = null;\n\n // Collect and remove propagated static attributes\n for (const attr of element.attributes) {\n if (PROPAGATED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n insertions.push(attr.value ? `${attr.name}=\"${attr.value}\"` : attr.name);\n }\n if (attr.name === 'isChipsRemovable') {\n edits.push(removalEdit(attr, source));\n insertions.push('isChipRemovable');\n }\n if (attr.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(attr, source));\n truncateValue = attr.value || null;\n }\n if (REMOVED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n }\n }\n\n // Collect and remove propagated bound inputs\n for (const input of element.inputs) {\n if (PROPAGATED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n insertions.push(raw);\n }\n if (input.name === 'isChipsRemovable') {\n edits.push(removalEdit(input, source));\n const valueText = extractBindingValue(input, source);\n insertions.push(`[isChipRemovable]=\"${valueText}\"`);\n }\n if (input.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(input, source));\n truncateValue = extractBindingValue(input, source);\n }\n if (REMOVED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n }\n }\n\n // Collect and remove (chipRemove) output\n let chipRemoveHandler: string | null = null;\n for (const output of element.outputs) {\n if (output.name === 'chipRemove') {\n edits.push(removalEdit(output, source));\n chipRemoveHandler = extractHandlerExpression(output, source);\n }\n }\n\n if (chipRemoveHandler) {\n insertions.push(`(remove)=\"${chipRemoveHandler}\"`);\n }\n\n // Add collected attributes to each child eui-chip\n if (insertions.length > 0) {\n for (const chip of childChips) {\n const existingNames = getExistingAttrNames(chip);\n const toInsert = insertions.filter((ins) => {\n const name = extractAttrName(ins);\n return !existingNames.has(name);\n });\n if (toInsert.length > 0) {\n const insertPos = chip.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' ' + toInsert.join(' ') });\n }\n }\n }\n\n // Add euiTruncate pipe to chip label content\n if (truncateValue) {\n for (const chip of childChips) {\n const labelEdit = buildTruncatePipeEdit(chip, source, truncateValue);\n if (labelEdit) edits.push(labelEdit);\n }\n }\n}\n\nfunction buildTruncatePipeEdit(chip: TmplAstElement, source: string, truncateValue: string): Edit | null {\n // Find <span euiLabel>...</span> inside the chip\n const labelEl = findLabelElement(chip.children);\n if (labelEl !== null && labelEl !== undefined && labelEl.endSourceSpan) {\n const contentStart = labelEl.startSourceSpan.end.offset;\n const contentEnd = labelEl.endSourceSpan.start.offset;\n const content = source.slice(contentStart, contentEnd);\n if (content && !content.includes('euiTruncate')) {\n const trimmed = content.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch) {\n return { start: contentStart, end: contentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n return { start: contentStart, end: contentEnd, replacement: `{{ '${trimmed}' | euiTruncate: ${truncateValue} }}` };\n }\n }\n\n // Check direct text content inside chip (no label element)\n if (chip.endSourceSpan) {\n const chipContentStart = chip.startSourceSpan.end.offset;\n const chipContentEnd = chip.endSourceSpan.start.offset;\n const chipContent = source.slice(chipContentStart, chipContentEnd);\n const trimmed = chipContent.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch && !chipContent.includes('euiTruncate')) {\n return { start: chipContentStart, end: chipContentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n }\n return null;\n}\n\nfunction findLabelElement(nodes: TmplAstNode[]): TmplAstElement | null {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.attributes.some((a) => a.name === 'euiLabel')) return node;\n const nested = findLabelElement(node.children);\n if (nested) return nested;\n }\n }\n return null;\n}\n\nfunction getExistingAttrNames(element: TmplAstElement): Set<string> {\n const names = new Set<string>();\n for (const attr of element.attributes) names.add(attr.name);\n for (const input of element.inputs) names.add(input.name);\n for (const output of element.outputs) names.add(output.name);\n return names;\n}\n\nfunction extractAttrName(insertion: string): string {\n const outputMatch = insertion.match(/^\\(([^)]+)\\)/);\n if (outputMatch) return outputMatch[1];\n const inputMatch = insertion.match(/^\\[([^\\]]+)\\]/);\n if (inputMatch) return inputMatch[1];\n return insertion.split('=')[0];\n}\n\nfunction removalEdit(node: TmplAstTextAttribute | TmplAstBoundAttribute | TmplAstBoundEvent, source: string): Edit {\n let start = node.sourceSpan.start.offset;\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n return { start, end: node.sourceSpan.end.offset, replacement: '' };\n}\n\nfunction extractBindingValue(input: TmplAstBoundAttribute, source: string): string {\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : 'true';\n}\n\nfunction extractHandlerExpression(output: TmplAstBoundEvent, source: string): string {\n const raw = source.slice(output.sourceSpan.start.offset, output.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : '';\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n seen.set(`${edit.start}:${edit.end}`, edit);\n }\n return Array.from(seen.values());\n}\n",
4163
4163
  "displayName": "Schema",
4164
4164
  "properties": [
4165
4165
  {
@@ -4171,7 +4171,7 @@
4171
4171
  "indexKey": "",
4172
4172
  "optional": true,
4173
4173
  "description": "",
4174
- "line": 8,
4174
+ "line": 28,
4175
4175
  "rawdescription": "\n"
4176
4176
  },
4177
4177
  {
@@ -4183,7 +4183,7 @@
4183
4183
  "indexKey": "",
4184
4184
  "optional": true,
4185
4185
  "description": "",
4186
- "line": 7,
4186
+ "line": 27,
4187
4187
  "rawdescription": "\n"
4188
4188
  }
4189
4189
  ],
@@ -4201,12 +4201,12 @@
4201
4201
  },
4202
4202
  {
4203
4203
  "name": "Schema",
4204
- "id": "interface-Schema-182700f0e4bd2873ad878a9ebb097ec4a991ece85f645d0d984eafdb08bbeac1adc7999ea9f13567b82a8bcd36ea346d8041dfe4af3b82fa97ad6027eb9f8fde-22",
4205
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
4204
+ "id": "interface-Schema-869dfc324e9111966817cbebb3553eabfe200acfe33bb77efa71a6c46e1cba0ff5852de7b9ade3060f87264035b99591361331a9e0622daaac22b8d59146c761-22",
4205
+ "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
4206
4206
  "deprecated": false,
4207
4207
  "deprecationMessage": "",
4208
4208
  "type": "interface",
4209
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\nconst CHIP_LIST_TAG = 'eui-chip-list';\nconst CHIP_LIST_ATTR = 'euiChipList';\nconst CHIP_TAG = 'eui-chip';\nconst CHIP_ATTR = 'euiChip';\n\nconst PROPAGATED_INPUTS = new Set([\n 'euiPrimary', 'euiSecondary', 'euiSuccess', 'euiInfo', 'euiWarning',\n 'euiDanger', 'euiAccent', 'euiVariant', 'euiSizeS', 'euiSizeVariant',\n 'euiOutline', 'euiDisabled',\n]);\n\nconst WARN_PROPERTIES = new Set([...PROPAGATED_INPUTS, 'chipRemove', 'isChipsRemovable', 'chipsLabelTruncateCount',\n 'maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel',\n 'isChipsSorted', 'chipsSortOrder']);\n\nconst REMOVED_INPUTS = new Set(['maxVisibleChipsCount', 'isMaxVisibleChipsOpened', 'toggleLinkMoreLabel', 'toggleLinkLessLabel', 'isChipsSorted', 'chipsSortOrder']);\n\nconst TRUNCATE_PIPE_IMPORT = 'EuiTruncatePipe';\nconst TRUNCATE_PIPE_PATH = '@eui/components/pipes';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\nexport function migrateEuiChipList(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n const filesNeedingTruncateImport = new Set<string>();\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(CHIP_LIST_TAG) && !original.includes(CHIP_LIST_ATTR)) return;\n\n let result: string;\n let addedTruncate = false;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n // Find the associated .ts file\n const tsPath = path.replace(/\\.html$/, '.ts');\n if (tree.exists(tsPath)) {\n filesNeedingTruncateImport.add(tsPath);\n } else {\n // Try component naming convention\n const componentTsPath = path.replace(/\\.html$/, '.component.ts');\n if (tree.exists(componentTsPath)) {\n filesNeedingTruncateImport.add(componentTsPath);\n }\n }\n }\n } else {\n result = migrateInlineTemplates(original);\n if (result !== original && result.includes('euiTruncate') && !original.includes('euiTruncate')) {\n addedTruncate = true;\n }\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would move variant/size/outline inputs to child eui-chip in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n if (addedTruncate) {\n filesNeedingTruncateImport.add(path);\n }\n\n // Warn about TS usages of removed properties\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts')) {\n if ([...WARN_PROPERTIES].some((p) => original.includes(p))) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && WARN_PROPERTIES.has(node.name.text)) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - \"${node.name.text}\" has been removed from eui-chip-list. Move it to individual eui-chip elements.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n // Add EuiTruncatePipe import to component files that need it\n for (const tsPath of filesNeedingTruncateImport) {\n const buffer = tree.read(tsPath);\n if (!buffer) continue;\n const source = buffer.toString('utf-8');\n if (source.includes(TRUNCATE_PIPE_IMPORT)) continue;\n const result = addTruncatePipeImport(source, tsPath);\n if (result !== source) {\n if (!options.dryRun) {\n tree.overwrite(tsPath, result);\n }\n }\n }\n\n context.logger.info(`Migrated eui-chip-list inputs/outputs to child eui-chip in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction addTruncatePipeImport(source: string, filePath: string): string {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);\n const edits: Edit[] = [];\n\n // 1. Add ES import statement for EuiTruncatePipe\n let hasEsImport = false;\n let lastImportEnd = 0;\n\n for (const stmt of sourceFile.statements) {\n if (ts.isImportDeclaration(stmt)) {\n lastImportEnd = stmt.getEnd();\n const moduleSpec = (stmt.moduleSpecifier as ts.StringLiteral).text;\n if (moduleSpec === TRUNCATE_PIPE_PATH) {\n const namedBindings = stmt.importClause?.namedBindings;\n if (namedBindings && ts.isNamedImports(namedBindings)) {\n if (namedBindings.elements.some((el) => el.name.text === TRUNCATE_PIPE_IMPORT)) {\n hasEsImport = true;\n } else {\n // Add to existing import from same path\n const lastEl = namedBindings.elements[namedBindings.elements.length - 1];\n edits.push({ start: lastEl.getEnd(), end: lastEl.getEnd(), replacement: `, ${TRUNCATE_PIPE_IMPORT}` });\n hasEsImport = true;\n }\n }\n }\n }\n }\n\n if (!hasEsImport) {\n const importStatement = `\\nimport { ${TRUNCATE_PIPE_IMPORT} } from '${TRUNCATE_PIPE_PATH}';`;\n edits.push({ start: lastImportEnd, end: lastImportEnd, replacement: importStatement });\n }\n\n // 2. Add EuiTruncatePipe to @Component imports array\n const visit = (node: ts.Node): void => {\n if (ts.isClassDeclaration(node)) {\n const decs = ts.getDecorators(node);\n if (!decs) return;\n for (const dec of decs) {\n if (!ts.isCallExpression(dec.expression) || !ts.isIdentifier(dec.expression.expression) || dec.expression.expression.text !== 'Component') continue;\n const metadata = dec.expression.arguments[0];\n if (!ts.isObjectLiteralExpression(metadata)) continue;\n for (const prop of metadata.properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name) || prop.name.text !== 'imports') continue;\n if (!ts.isArrayLiteralExpression(prop.initializer)) continue;\n const arr = prop.initializer;\n const arrText = source.slice(arr.getStart(sourceFile), arr.getEnd());\n if (arrText.includes(TRUNCATE_PIPE_IMPORT)) continue;\n if (arr.elements.length > 0) {\n const lastElement = arr.elements[arr.elements.length - 1];\n edits.push({ start: lastElement.getEnd(), end: lastElement.getEnd(), replacement: `,\\n ${TRUNCATE_PIPE_IMPORT}` });\n } else {\n edits.push({ start: arr.getStart(sourceFile) + 1, end: arr.getEnd() - 1, replacement: TRUNCATE_PIPE_IMPORT });\n }\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: Edit[] = [];\n\n visitNodes(parsed.nodes, source, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: Edit[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(CHIP_LIST_TAG) && !rawTemplate.includes(CHIP_LIST_ATTR)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, replacement: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, changes);\n}\n\nfunction visitNodes(nodes: TmplAstNode[], source: string, edits: Edit[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipListElement(node)) {\n migrateChipListElement(node, source, edits);\n }\n visitNodes(node.children, source, edits);\n }\n }\n}\n\nfunction isChipListElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_LIST_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_LIST_ATTR);\n}\n\nfunction isChipElement(element: TmplAstElement): boolean {\n if (element.name === CHIP_TAG) return true;\n return element.attributes.some((a) => a.name === CHIP_ATTR);\n}\n\nfunction findChildChips(nodes: TmplAstNode[]): TmplAstElement[] {\n const chips: TmplAstElement[] = [];\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (isChipElement(node)) {\n chips.push(node);\n } else {\n chips.push(...findChildChips(node.children));\n }\n }\n }\n return chips;\n}\n\nfunction migrateChipListElement(element: TmplAstElement, source: string, edits: Edit[]): void {\n const childChips = findChildChips(element.children);\n const insertions: string[] = [];\n let truncateValue: string | null = null;\n\n // Collect and remove propagated static attributes\n for (const attr of element.attributes) {\n if (PROPAGATED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n insertions.push(attr.value ? `${attr.name}=\"${attr.value}\"` : attr.name);\n }\n if (attr.name === 'isChipsRemovable') {\n edits.push(removalEdit(attr, source));\n insertions.push('isChipRemovable');\n }\n if (attr.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(attr, source));\n truncateValue = attr.value || null;\n }\n if (REMOVED_INPUTS.has(attr.name)) {\n edits.push(removalEdit(attr, source));\n }\n }\n\n // Collect and remove propagated bound inputs\n for (const input of element.inputs) {\n if (PROPAGATED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n insertions.push(raw);\n }\n if (input.name === 'isChipsRemovable') {\n edits.push(removalEdit(input, source));\n const valueText = extractBindingValue(input, source);\n insertions.push(`[isChipRemovable]=\"${valueText}\"`);\n }\n if (input.name === 'chipsLabelTruncateCount') {\n edits.push(removalEdit(input, source));\n truncateValue = extractBindingValue(input, source);\n }\n if (REMOVED_INPUTS.has(input.name)) {\n edits.push(removalEdit(input, source));\n }\n }\n\n // Collect and remove (chipRemove) output\n let chipRemoveHandler: string | null = null;\n for (const output of element.outputs) {\n if (output.name === 'chipRemove') {\n edits.push(removalEdit(output, source));\n chipRemoveHandler = extractHandlerExpression(output, source);\n }\n }\n\n if (chipRemoveHandler) {\n insertions.push(`(remove)=\"${chipRemoveHandler}\"`);\n }\n\n // Add collected attributes to each child eui-chip\n if (insertions.length > 0) {\n for (const chip of childChips) {\n const existingNames = getExistingAttrNames(chip);\n const toInsert = insertions.filter((ins) => {\n const name = extractAttrName(ins);\n return !existingNames.has(name);\n });\n if (toInsert.length > 0) {\n const insertPos = chip.startSourceSpan.end.offset - 1;\n edits.push({ start: insertPos, end: insertPos, replacement: ' ' + toInsert.join(' ') });\n }\n }\n }\n\n // Add euiTruncate pipe to chip label content\n if (truncateValue) {\n for (const chip of childChips) {\n const labelEdit = buildTruncatePipeEdit(chip, source, truncateValue);\n if (labelEdit) edits.push(labelEdit);\n }\n }\n}\n\nfunction buildTruncatePipeEdit(chip: TmplAstElement, source: string, truncateValue: string): Edit | null {\n // Find <span euiLabel>...</span> inside the chip\n const labelEl = findLabelElement(chip.children);\n if (labelEl !== null && labelEl !== undefined && labelEl.endSourceSpan) {\n const contentStart = labelEl.startSourceSpan.end.offset;\n const contentEnd = labelEl.endSourceSpan.start.offset;\n const content = source.slice(contentStart, contentEnd);\n if (content && !content.includes('euiTruncate')) {\n const trimmed = content.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch) {\n return { start: contentStart, end: contentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n return { start: contentStart, end: contentEnd, replacement: `{{ '${trimmed}' | euiTruncate: ${truncateValue} }}` };\n }\n }\n\n // Check direct text content inside chip (no label element)\n if (chip.endSourceSpan) {\n const chipContentStart = chip.startSourceSpan.end.offset;\n const chipContentEnd = chip.endSourceSpan.start.offset;\n const chipContent = source.slice(chipContentStart, chipContentEnd);\n const trimmed = chipContent.trim();\n const interpMatch = trimmed.match(/^\\{\\{\\s*(.+?)\\s*\\}\\}$/);\n if (interpMatch && !chipContent.includes('euiTruncate')) {\n return { start: chipContentStart, end: chipContentEnd, replacement: `{{ ${interpMatch[1]} | euiTruncate: ${truncateValue} }}` };\n }\n }\n return null;\n}\n\nfunction findLabelElement(nodes: TmplAstNode[]): TmplAstElement | null {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.attributes.some((a) => a.name === 'euiLabel')) return node;\n const nested = findLabelElement(node.children);\n if (nested) return nested;\n }\n }\n return null;\n}\n\nfunction getExistingAttrNames(element: TmplAstElement): Set<string> {\n const names = new Set<string>();\n for (const attr of element.attributes) names.add(attr.name);\n for (const input of element.inputs) names.add(input.name);\n for (const output of element.outputs) names.add(output.name);\n return names;\n}\n\nfunction extractAttrName(insertion: string): string {\n const outputMatch = insertion.match(/^\\(([^)]+)\\)/);\n if (outputMatch) return outputMatch[1];\n const inputMatch = insertion.match(/^\\[([^\\]]+)\\]/);\n if (inputMatch) return inputMatch[1];\n return insertion.split('=')[0];\n}\n\nfunction removalEdit(node: TmplAstTextAttribute | TmplAstBoundAttribute | TmplAstBoundEvent, source: string): Edit {\n let start = node.sourceSpan.start.offset;\n while (start > 0 && (source[start - 1] === ' ' || source[start - 1] === '\\t')) {\n start--;\n }\n return { start, end: node.sourceSpan.end.offset, replacement: '' };\n}\n\nfunction extractBindingValue(input: TmplAstBoundAttribute, source: string): string {\n const raw = source.slice(input.sourceSpan.start.offset, input.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : 'true';\n}\n\nfunction extractHandlerExpression(output: TmplAstBoundEvent, source: string): string {\n const raw = source.slice(output.sourceSpan.start.offset, output.sourceSpan.end.offset);\n const match = raw.match(/=[\"']([^\"']*)[\"']/);\n return match ? match[1] : '';\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n seen.set(`${edit.start}:${edit.end}`, edit);\n }\n return Array.from(seen.values());\n}\n",
4209
+ "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",
4210
4210
  "displayName": "Schema",
4211
4211
  "properties": [
4212
4212
  {
@@ -4218,7 +4218,7 @@
4218
4218
  "indexKey": "",
4219
4219
  "optional": true,
4220
4220
  "description": "",
4221
- "line": 28,
4221
+ "line": 8,
4222
4222
  "rawdescription": "\n"
4223
4223
  },
4224
4224
  {
@@ -4230,7 +4230,7 @@
4230
4230
  "indexKey": "",
4231
4231
  "optional": true,
4232
4232
  "description": "",
4233
- "line": 27,
4233
+ "line": 7,
4234
4234
  "rawdescription": "\n"
4235
4235
  }
4236
4236
  ],
@@ -4248,12 +4248,12 @@
4248
4248
  },
4249
4249
  {
4250
4250
  "name": "Schema",
4251
- "id": "interface-Schema-917f311f65aa7c65dcfb1dfa7cf090e0082b8754d7572783033a75d6c91566f8f9d3a3269086d3a99e294250ef0e5b0a053767f917b256bfd87692e7daec4989-23",
4252
- "file": "packages/core/schematics/migrate-eui-date-range-selector/index.ts",
4251
+ "id": "interface-Schema-0c8b7650bdaca7af428e47e70e20200b09ea63158a394aa0fed5f2310b81e3e1b41ae59cd62c3e0479f8e9634ef4546f0046c67823ab301ce7749feef4e96fc9-23",
4252
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
4253
4253
  "deprecated": false,
4254
4254
  "deprecationMessage": "",
4255
4255
  "type": "interface",
4256
- "sourceCode": "import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { logDryRunNote } from '../utils/dry-run';\nimport {\n AdapterKind,\n collectSourceFiles,\n componentTemplates,\n detectAppAdapter,\n forEachElement,\n parseTemplateNodes,\n resolveFileAdapter,\n templateUsesElement,\n} from '../utils/date-adapter';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst SELECTOR_TAG = 'eui-date-range-selector';\nconst ADAPTER_NAMES: Record<AdapterKind, string> = { moment: 'MomentDateAdapter', luxon: 'LuxonDateAdapter', native: 'NativeDateAdapter' };\nconst NATIVE_TYPE: Record<AdapterKind, string> = { moment: 'moment', luxon: 'Luxon DateTime', native: 'Date' };\n\n/**\n * Advisory migration for the moment-free eui-date-range-selector. It makes no edits; it reports:\n * - usages not on a Luxon or native adapter, which must now import the moment locales they use;\n * - time-range usages with a Luxon or native adapter, which now get the adapter's own date type back\n * after a time change (moment objects before);\n * - code reading the `euiDateRangeInvalid` error payload with a Luxon or native adapter, whose\n * `actual` / `end` dates are now of the adapter's type;\n * - `euiStartEndDateValidator` usages, which no longer report an empty or partial range (unparseable\n * dates are reported by the component as `euiDateRangeParse` instead).\n */\nexport function migrateEuiDateRangeSelector(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const files = collectSourceFiles(tree, options.path);\n const appAdapter = detectAppAdapter(tree, files);\n let manualActions = 0;\n const warn = (message: string): void => {\n manualActions++;\n context.logger.warn(` Manual action needed: ${message}`);\n };\n\n const localeFiles: string[] = [];\n\n for (const path of files.filter((file) => file.endsWith('.ts'))) {\n const source = tree.read(path)?.toString('utf-8');\n if (!source) continue;\n const adapter = resolveFileAdapter(source, appAdapter);\n const isNonMoment = adapter === 'luxon' || adapter === 'native';\n const templates = componentTemplates(tree, path, source, SELECTOR_TAG).filter((t) => templateUsesElement(t.content, SELECTOR_TAG));\n\n if (!isNonMoment) {\n localeFiles.push(...templates.map((t) => t.file).filter((file) => !localeFiles.includes(file)));\n }\n\n if (isNonMoment) {\n for (const template of templates) {\n if (usesTimeRange(template.content)) {\n warn(\n `${template.file} uses eui-date-range-selector with isTimeRange and ${ADAPTER_NAMES[adapter]}. `\n + `After a time change the range now holds ${NATIVE_TYPE[adapter]} values instead of moment objects; `\n + 'update code that calls moment methods on them.',\n );\n }\n }\n if (/\\beuiDateRangeInvalid\\b/.test(source)) {\n warn(\n `${path} reads the euiDateRangeInvalid error with ${ADAPTER_NAMES[adapter]}. `\n + `Its actual / end dates are now ${NATIVE_TYPE[adapter]} values instead of moment objects.`,\n );\n }\n }\n\n if (/\\beuiStartEndDateValidator\\s*\\(/.test(source)) {\n warn(\n `${path} uses euiStartEndDateValidator, which no longer reports an empty or partial range. `\n + 'Add Validators.required to the control if both dates are required. Dates that cannot be parsed are now '\n + 'reported by the component as euiDateRangeParse: show a message for that error key.',\n );\n }\n }\n\n if (localeFiles.length > 0) {\n context.logger.warn(\n 'Breaking change: eUI no longer bundles moment locale data. With the MomentDateAdapter, import the moment locales '\n + 'your app uses (e.g. `import \\'moment/locale/fr\\';`); otherwise eui-date-range-selector falls back to the `en` '\n + 'locale and dates are shown as MM/DD/YYYY.',\n );\n for (const file of localeFiles) {\n warn(`${file} uses eui-date-range-selector — ensure the required moment locale(s) are imported.`);\n }\n }\n\n context.logger.info(`eui-date-range-selector check: ${manualActions} manual action(s) reported, no files modified.`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction usesTimeRange(template: string): boolean {\n const nodes = parseTemplateNodes(template);\n if (!nodes) return /\\bisTimeRange\\b/.test(template);\n let found = false;\n forEachElement(nodes, SELECTOR_TAG, (element) => {\n const enabledByAttribute = element.attributes.some((a) => a.name === 'isTimeRange' && a.value !== 'false');\n const bound = element.inputs.some((input) => input.name === 'isTimeRange');\n found ||= enabledByAttribute || bound;\n });\n return found;\n}\n",
4256
+ "sourceCode": "import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport {\n collectSourceFiles,\n componentTemplates,\n detectAppAdapter,\n forEachElement,\n inlineTemplates,\n parseTemplateNodes,\n resolveFileAdapter,\n templateUsesElement,\n} from '../utils/date-adapter';\n\nconst DATEPICKER_TAG = 'eui-datepicker';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface TextEdit {\n start: number;\n end: number;\n text: string;\n}\n\nconst MOMENT_PRESETS = ['DEFAULT_FORMATS', 'LETTER_FORMAT', 'YEAR_FORMAT', 'MONTH_YEAR_FORMAT'];\n\n// Moment tokens that have an identical-meaning Luxon token. Anything else is left for manual review.\nconst MOMENT_TO_LUXON_TOKENS: Record<string, string> = {\n YYYY: 'yyyy', YY: 'yy',\n MMMM: 'MMMM', MMM: 'MMM', MM: 'MM', M: 'M',\n DD: 'dd', D: 'd',\n HH: 'HH', H: 'H', hh: 'hh', h: 'h',\n mm: 'mm', m: 'm', ss: 'ss', s: 's', SSS: 'SSS',\n A: 'a',\n};\n\n/**\n * Migrates eui-datepicker usages to the moment-free datepicker:\n * - moment locales are no longer bundled (report only);\n * - with a Luxon adapter, moment-token presets are replaced by their `LUXON_*` equivalents and static\n * `dateOutputFormat` values are converted to Luxon tokens;\n * - with the native adapter, `dateOutputFormat` is no longer supported (report only).\n *\n * The adapter is detected from the component file, falling back to the one provided in\n * app.config.ts / app.module.ts / main.ts.\n */\nexport function migrateEuiDatepicker(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const files = collectSourceFiles(tree, options.path);\n\n reportMomentLocales(tree, context, files);\n\n const appAdapter = detectAppAdapter(tree, files);\n let editedFiles = 0;\n let manualActions = 0;\n\n for (const path of files.filter((file) => file.endsWith('.ts'))) {\n const source = tree.read(path)?.toString('utf-8');\n if (!source) continue;\n\n const adapter = resolveFileAdapter(source, appAdapter);\n if (adapter !== 'luxon' && adapter !== 'native') continue;\n\n const fileEdits = new Map<string, TextEdit[]>();\n const addEdits = (file: string, edits: TextEdit[]): void => {\n if (edits.length) fileEdits.set(file, [...(fileEdits.get(file) ?? []), ...edits]);\n };\n\n if (adapter === 'luxon') {\n addEdits(path, luxonPresetEdits(source));\n }\n\n for (const template of componentTemplates(tree, path, source, DATEPICKER_TAG)) {\n for (const usage of findOutputFormatUsages(template.content)) {\n if (adapter === 'native') {\n manualActions++;\n context.logger.warn(\n ` Manual action needed: ${template.file} uses dateOutputFormat with NativeDateAdapter, which is no longer supported. `\n + 'Keep the Date value and map it to a string in your code (e.g. with Intl.DateTimeFormat), or switch to a moment/Luxon adapter.',\n );\n continue;\n }\n if (usage.staticValue !== undefined && isLikelyLuxonFormat(usage.staticValue)) continue;\n const converted = usage.staticValue !== undefined ? momentFormatToLuxon(usage.staticValue) : null;\n if (converted === null) {\n manualActions++;\n context.logger.warn(\n ` Manual action needed: ${template.file} uses dateOutputFormat \"${usage.staticValue ?? usage.expression}\" with LuxonDateAdapter. `\n + 'dateOutputFormat is now formatted by the adapter: make sure it uses Luxon tokens (e.g. yyyy-MM-dd).',\n );\n } else if (converted !== usage.staticValue) {\n addEdits(template.file, [{ start: template.offset + usage.start, end: template.offset + usage.end, text: converted }]);\n }\n }\n }\n\n for (const [file, edits] of fileEdits) {\n editedFiles++;\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-datepicker Luxon formats in ${file}`);\n } else {\n tree.overwrite(file, applyEdits(tree.read(file)!.toString('utf-8'), edits));\n context.logger.info(`Migrated eui-datepicker Luxon formats in ${file}`);\n }\n }\n }\n\n context.logger.info(`eui-datepicker adapter migration: ${editedFiles} file(s) updated, ${manualActions} manual action(s) reported.`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction reportMomentLocales(tree: Tree, context: SchematicContext, files: string[]): void {\n const matches = files.filter((path) => {\n const content = tree.read(path)?.toString('utf-8') ?? '';\n if (!content.includes(DATEPICKER_TAG)) return false;\n return path.endsWith('.html')\n ? templateUsesElement(content, DATEPICKER_TAG)\n : inlineTemplates(content).some((t) => templateUsesElement(t.content, DATEPICKER_TAG));\n });\n\n if (matches.length === 0) {\n context.logger.info('No eui-datepicker usage found; no moment-locale action required.');\n return;\n }\n\n context.logger.warn(\n 'Breaking change: eui-datepicker no longer bundles moment locale data. '\n + 'Import the moment locales your app uses (e.g. `import \\'moment/locale/fr\\';`) '\n + 'in the module/bootstrap where the datepicker is used; otherwise dates fall back '\n + 'to the active moment locale and may format incorrectly.',\n );\n for (const path of matches) {\n context.logger.warn(` Manual action needed: ${path} uses eui-datepicker — ensure the required moment locale(s) are imported.`);\n }\n context.logger.info(`eui-datepicker moment-locale check: ${matches.length} file(s) use eui-datepicker.`);\n}\n\n// Moment date formats practically always contain Y or D tokens, which Luxon does not use, so a\n// format without them is treated as already migrated (keeps the schematic idempotent).\nfunction isLikelyLuxonFormat(format: string): boolean {\n return !/[YD]/.test(format.replace(/\\[[^\\]]*\\]|'[^']*'/g, ''));\n}\n\n/** Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent. */\nexport function momentFormatToLuxon(format: string): string | null {\n let result = '';\n let i = 0;\n while (i < format.length) {\n const char = format[i];\n if (char === '[') {\n const close = format.indexOf(']', i);\n const literal = close === -1 ? null : format.slice(i + 1, close);\n if (literal === null || literal.includes('\\'')) return null;\n result += `'${literal}'`;\n i = close + 1;\n } else if (/[A-Za-z]/.test(char)) {\n let end = i;\n while (format[end] === char) end++;\n const luxonToken = MOMENT_TO_LUXON_TOKENS[format.slice(i, end)];\n if (luxonToken === undefined) return null;\n result += luxonToken;\n i = end;\n } else if (char === '\\'') {\n return null;\n } else {\n result += char;\n i++;\n }\n }\n return result;\n}\n\nfunction luxonPresetEdits(source: string): TextEdit[] {\n const importRegex = /import\\s*\\{([^}]*)\\}\\s*from\\s*['\"]@eui\\/components\\/eui-datepicker['\"]/g;\n const edits: TextEdit[] = [];\n const renamedLocals = new Set<string>();\n let match: RegExpExecArray | null;\n\n while ((match = importRegex.exec(source)) !== null) {\n const clauseStart = match.index + match[0].indexOf('{') + 1;\n const specifierRegex = /\\b([A-Z_]+)\\b(\\s+as\\s+\\w+)?/g;\n let specifier: RegExpExecArray | null;\n while ((specifier = specifierRegex.exec(match[1])) !== null) {\n const [, name, alias] = specifier;\n if (!MOMENT_PRESETS.includes(name)) continue;\n const start = clauseStart + specifier.index;\n edits.push({ start, end: start + name.length, text: `LUXON_${name}` });\n if (!alias) renamedLocals.add(name);\n }\n }\n\n for (const name of renamedLocals) {\n const usageRegex = new RegExp(`(?<![\\\\w.$])${name}(?![\\\\w$])`, 'g');\n let usage: RegExpExecArray | null;\n while ((usage = usageRegex.exec(source)) !== null) {\n const usageStart = usage.index;\n if (!edits.some((edit) => edit.start === usageStart)) {\n edits.push({ start: usageStart, end: usageStart + name.length, text: `LUXON_${name}` });\n }\n }\n }\n return edits;\n}\n\ninterface OutputFormatUsage {\n staticValue?: string;\n expression?: string;\n start: number;\n end: number;\n}\n\nfunction findOutputFormatUsages(template: string): OutputFormatUsage[] {\n const usages: OutputFormatUsage[] = [];\n const nodes = parseTemplateNodes(template);\n if (!nodes) {\n return usages;\n }\n forEachElement(nodes, DATEPICKER_TAG, (element) => {\n for (const attribute of element.attributes) {\n if (attribute.name === 'dateOutputFormat' && attribute.valueSpan) {\n usages.push({ staticValue: attribute.value, start: attribute.valueSpan.start.offset, end: attribute.valueSpan.end.offset });\n }\n }\n for (const binding of element.inputs) {\n if (binding.name === 'dateOutputFormat') {\n usages.push({ expression: binding.valueSpan?.toString() ?? binding.name, start: binding.sourceSpan.start.offset, end: binding.sourceSpan.end.offset });\n }\n }\n });\n return usages;\n}\n\nfunction applyEdits(content: string, edits: TextEdit[]): string {\n return [...edits]\n .sort((a, b) => b.start - a.start)\n .reduce((result, edit) => result.slice(0, edit.start) + edit.text + result.slice(edit.end), content);\n}\n",
4257
4257
  "displayName": "Schema",
4258
4258
  "properties": [
4259
4259
  {
@@ -4265,7 +4265,7 @@
4265
4265
  "indexKey": "",
4266
4266
  "optional": true,
4267
4267
  "description": "",
4268
- "line": 16,
4268
+ "line": 18,
4269
4269
  "rawdescription": "\n"
4270
4270
  },
4271
4271
  {
@@ -4277,7 +4277,7 @@
4277
4277
  "indexKey": "",
4278
4278
  "optional": true,
4279
4279
  "description": "",
4280
- "line": 15,
4280
+ "line": 17,
4281
4281
  "rawdescription": "\n"
4282
4282
  }
4283
4283
  ],
@@ -4295,12 +4295,12 @@
4295
4295
  },
4296
4296
  {
4297
4297
  "name": "Schema",
4298
- "id": "interface-Schema-0c8b7650bdaca7af428e47e70e20200b09ea63158a394aa0fed5f2310b81e3e1b41ae59cd62c3e0479f8e9634ef4546f0046c67823ab301ce7749feef4e96fc9-24",
4299
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
4298
+ "id": "interface-Schema-917f311f65aa7c65dcfb1dfa7cf090e0082b8754d7572783033a75d6c91566f8f9d3a3269086d3a99e294250ef0e5b0a053767f917b256bfd87692e7daec4989-24",
4299
+ "file": "packages/core/schematics/migrate-eui-date-range-selector/index.ts",
4300
4300
  "deprecated": false,
4301
4301
  "deprecationMessage": "",
4302
4302
  "type": "interface",
4303
- "sourceCode": "import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport {\n collectSourceFiles,\n componentTemplates,\n detectAppAdapter,\n forEachElement,\n inlineTemplates,\n parseTemplateNodes,\n resolveFileAdapter,\n templateUsesElement,\n} from '../utils/date-adapter';\n\nconst DATEPICKER_TAG = 'eui-datepicker';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface TextEdit {\n start: number;\n end: number;\n text: string;\n}\n\nconst MOMENT_PRESETS = ['DEFAULT_FORMATS', 'LETTER_FORMAT', 'YEAR_FORMAT', 'MONTH_YEAR_FORMAT'];\n\n// Moment tokens that have an identical-meaning Luxon token. Anything else is left for manual review.\nconst MOMENT_TO_LUXON_TOKENS: Record<string, string> = {\n YYYY: 'yyyy', YY: 'yy',\n MMMM: 'MMMM', MMM: 'MMM', MM: 'MM', M: 'M',\n DD: 'dd', D: 'd',\n HH: 'HH', H: 'H', hh: 'hh', h: 'h',\n mm: 'mm', m: 'm', ss: 'ss', s: 's', SSS: 'SSS',\n A: 'a',\n};\n\n/**\n * Migrates eui-datepicker usages to the moment-free datepicker:\n * - moment locales are no longer bundled (report only);\n * - with a Luxon adapter, moment-token presets are replaced by their `LUXON_*` equivalents and static\n * `dateOutputFormat` values are converted to Luxon tokens;\n * - with the native adapter, `dateOutputFormat` is no longer supported (report only).\n *\n * The adapter is detected from the component file, falling back to the one provided in\n * app.config.ts / app.module.ts / main.ts.\n */\nexport function migrateEuiDatepicker(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const files = collectSourceFiles(tree, options.path);\n\n reportMomentLocales(tree, context, files);\n\n const appAdapter = detectAppAdapter(tree, files);\n let editedFiles = 0;\n let manualActions = 0;\n\n for (const path of files.filter((file) => file.endsWith('.ts'))) {\n const source = tree.read(path)?.toString('utf-8');\n if (!source) continue;\n\n const adapter = resolveFileAdapter(source, appAdapter);\n if (adapter !== 'luxon' && adapter !== 'native') continue;\n\n const fileEdits = new Map<string, TextEdit[]>();\n const addEdits = (file: string, edits: TextEdit[]): void => {\n if (edits.length) fileEdits.set(file, [...(fileEdits.get(file) ?? []), ...edits]);\n };\n\n if (adapter === 'luxon') {\n addEdits(path, luxonPresetEdits(source));\n }\n\n for (const template of componentTemplates(tree, path, source, DATEPICKER_TAG)) {\n for (const usage of findOutputFormatUsages(template.content)) {\n if (adapter === 'native') {\n manualActions++;\n context.logger.warn(\n ` Manual action needed: ${template.file} uses dateOutputFormat with NativeDateAdapter, which is no longer supported. `\n + 'Keep the Date value and map it to a string in your code (e.g. with Intl.DateTimeFormat), or switch to a moment/Luxon adapter.',\n );\n continue;\n }\n if (usage.staticValue !== undefined && isLikelyLuxonFormat(usage.staticValue)) continue;\n const converted = usage.staticValue !== undefined ? momentFormatToLuxon(usage.staticValue) : null;\n if (converted === null) {\n manualActions++;\n context.logger.warn(\n ` Manual action needed: ${template.file} uses dateOutputFormat \"${usage.staticValue ?? usage.expression}\" with LuxonDateAdapter. `\n + 'dateOutputFormat is now formatted by the adapter: make sure it uses Luxon tokens (e.g. yyyy-MM-dd).',\n );\n } else if (converted !== usage.staticValue) {\n addEdits(template.file, [{ start: template.offset + usage.start, end: template.offset + usage.end, text: converted }]);\n }\n }\n }\n\n for (const [file, edits] of fileEdits) {\n editedFiles++;\n if (options.dryRun) {\n logDryRun(context, `Would migrate eui-datepicker Luxon formats in ${file}`);\n } else {\n tree.overwrite(file, applyEdits(tree.read(file)!.toString('utf-8'), edits));\n context.logger.info(`Migrated eui-datepicker Luxon formats in ${file}`);\n }\n }\n }\n\n context.logger.info(`eui-datepicker adapter migration: ${editedFiles} file(s) updated, ${manualActions} manual action(s) reported.`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction reportMomentLocales(tree: Tree, context: SchematicContext, files: string[]): void {\n const matches = files.filter((path) => {\n const content = tree.read(path)?.toString('utf-8') ?? '';\n if (!content.includes(DATEPICKER_TAG)) return false;\n return path.endsWith('.html')\n ? templateUsesElement(content, DATEPICKER_TAG)\n : inlineTemplates(content).some((t) => templateUsesElement(t.content, DATEPICKER_TAG));\n });\n\n if (matches.length === 0) {\n context.logger.info('No eui-datepicker usage found; no moment-locale action required.');\n return;\n }\n\n context.logger.warn(\n 'Breaking change: eui-datepicker no longer bundles moment locale data. '\n + 'Import the moment locales your app uses (e.g. `import \\'moment/locale/fr\\';`) '\n + 'in the module/bootstrap where the datepicker is used; otherwise dates fall back '\n + 'to the active moment locale and may format incorrectly.',\n );\n for (const path of matches) {\n context.logger.warn(` Manual action needed: ${path} uses eui-datepicker — ensure the required moment locale(s) are imported.`);\n }\n context.logger.info(`eui-datepicker moment-locale check: ${matches.length} file(s) use eui-datepicker.`);\n}\n\n// Moment date formats practically always contain Y or D tokens, which Luxon does not use, so a\n// format without them is treated as already migrated (keeps the schematic idempotent).\nfunction isLikelyLuxonFormat(format: string): boolean {\n return !/[YD]/.test(format.replace(/\\[[^\\]]*\\]|'[^']*'/g, ''));\n}\n\n/** Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent. */\nexport function momentFormatToLuxon(format: string): string | null {\n let result = '';\n let i = 0;\n while (i < format.length) {\n const char = format[i];\n if (char === '[') {\n const close = format.indexOf(']', i);\n const literal = close === -1 ? null : format.slice(i + 1, close);\n if (literal === null || literal.includes('\\'')) return null;\n result += `'${literal}'`;\n i = close + 1;\n } else if (/[A-Za-z]/.test(char)) {\n let end = i;\n while (format[end] === char) end++;\n const luxonToken = MOMENT_TO_LUXON_TOKENS[format.slice(i, end)];\n if (luxonToken === undefined) return null;\n result += luxonToken;\n i = end;\n } else if (char === '\\'') {\n return null;\n } else {\n result += char;\n i++;\n }\n }\n return result;\n}\n\nfunction luxonPresetEdits(source: string): TextEdit[] {\n const importRegex = /import\\s*\\{([^}]*)\\}\\s*from\\s*['\"]@eui\\/components\\/eui-datepicker['\"]/g;\n const edits: TextEdit[] = [];\n const renamedLocals = new Set<string>();\n let match: RegExpExecArray | null;\n\n while ((match = importRegex.exec(source)) !== null) {\n const clauseStart = match.index + match[0].indexOf('{') + 1;\n const specifierRegex = /\\b([A-Z_]+)\\b(\\s+as\\s+\\w+)?/g;\n let specifier: RegExpExecArray | null;\n while ((specifier = specifierRegex.exec(match[1])) !== null) {\n const [, name, alias] = specifier;\n if (!MOMENT_PRESETS.includes(name)) continue;\n const start = clauseStart + specifier.index;\n edits.push({ start, end: start + name.length, text: `LUXON_${name}` });\n if (!alias) renamedLocals.add(name);\n }\n }\n\n for (const name of renamedLocals) {\n const usageRegex = new RegExp(`(?<![\\\\w.$])${name}(?![\\\\w$])`, 'g');\n let usage: RegExpExecArray | null;\n while ((usage = usageRegex.exec(source)) !== null) {\n const usageStart = usage.index;\n if (!edits.some((edit) => edit.start === usageStart)) {\n edits.push({ start: usageStart, end: usageStart + name.length, text: `LUXON_${name}` });\n }\n }\n }\n return edits;\n}\n\ninterface OutputFormatUsage {\n staticValue?: string;\n expression?: string;\n start: number;\n end: number;\n}\n\nfunction findOutputFormatUsages(template: string): OutputFormatUsage[] {\n const usages: OutputFormatUsage[] = [];\n const nodes = parseTemplateNodes(template);\n if (!nodes) {\n return usages;\n }\n forEachElement(nodes, DATEPICKER_TAG, (element) => {\n for (const attribute of element.attributes) {\n if (attribute.name === 'dateOutputFormat' && attribute.valueSpan) {\n usages.push({ staticValue: attribute.value, start: attribute.valueSpan.start.offset, end: attribute.valueSpan.end.offset });\n }\n }\n for (const binding of element.inputs) {\n if (binding.name === 'dateOutputFormat') {\n usages.push({ expression: binding.valueSpan?.toString() ?? binding.name, start: binding.sourceSpan.start.offset, end: binding.sourceSpan.end.offset });\n }\n }\n });\n return usages;\n}\n\nfunction applyEdits(content: string, edits: TextEdit[]): string {\n return [...edits]\n .sort((a, b) => b.start - a.start)\n .reduce((result, edit) => result.slice(0, edit.start) + edit.text + result.slice(edit.end), content);\n}\n",
4303
+ "sourceCode": "import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { logDryRunNote } from '../utils/dry-run';\nimport {\n AdapterKind,\n collectSourceFiles,\n componentTemplates,\n detectAppAdapter,\n forEachElement,\n parseTemplateNodes,\n resolveFileAdapter,\n templateUsesElement,\n} from '../utils/date-adapter';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst SELECTOR_TAG = 'eui-date-range-selector';\nconst ADAPTER_NAMES: Record<AdapterKind, string> = { moment: 'MomentDateAdapter', luxon: 'LuxonDateAdapter', native: 'NativeDateAdapter' };\nconst NATIVE_TYPE: Record<AdapterKind, string> = { moment: 'moment', luxon: 'Luxon DateTime', native: 'Date' };\n\n/**\n * Advisory migration for the moment-free eui-date-range-selector. It makes no edits; it reports:\n * - usages not on a Luxon or native adapter, which must now import the moment locales they use;\n * - time-range usages with a Luxon or native adapter, which now get the adapter's own date type back\n * after a time change (moment objects before);\n * - code reading the `euiDateRangeInvalid` error payload with a Luxon or native adapter, whose\n * `actual` / `end` dates are now of the adapter's type;\n * - `euiStartEndDateValidator` usages, which no longer report an empty or partial range (unparseable\n * dates are reported by the component as `euiDateRangeParse` instead).\n */\nexport function migrateEuiDateRangeSelector(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const files = collectSourceFiles(tree, options.path);\n const appAdapter = detectAppAdapter(tree, files);\n let manualActions = 0;\n const warn = (message: string): void => {\n manualActions++;\n context.logger.warn(` Manual action needed: ${message}`);\n };\n\n const localeFiles: string[] = [];\n\n for (const path of files.filter((file) => file.endsWith('.ts'))) {\n const source = tree.read(path)?.toString('utf-8');\n if (!source) continue;\n const adapter = resolveFileAdapter(source, appAdapter);\n const isNonMoment = adapter === 'luxon' || adapter === 'native';\n const templates = componentTemplates(tree, path, source, SELECTOR_TAG).filter((t) => templateUsesElement(t.content, SELECTOR_TAG));\n\n if (!isNonMoment) {\n localeFiles.push(...templates.map((t) => t.file).filter((file) => !localeFiles.includes(file)));\n }\n\n if (isNonMoment) {\n for (const template of templates) {\n if (usesTimeRange(template.content)) {\n warn(\n `${template.file} uses eui-date-range-selector with isTimeRange and ${ADAPTER_NAMES[adapter]}. `\n + `After a time change the range now holds ${NATIVE_TYPE[adapter]} values instead of moment objects; `\n + 'update code that calls moment methods on them.',\n );\n }\n }\n if (/\\beuiDateRangeInvalid\\b/.test(source)) {\n warn(\n `${path} reads the euiDateRangeInvalid error with ${ADAPTER_NAMES[adapter]}. `\n + `Its actual / end dates are now ${NATIVE_TYPE[adapter]} values instead of moment objects.`,\n );\n }\n }\n\n if (/\\beuiStartEndDateValidator\\s*\\(/.test(source)) {\n warn(\n `${path} uses euiStartEndDateValidator, which no longer reports an empty or partial range. `\n + 'Add Validators.required to the control if both dates are required. Dates that cannot be parsed are now '\n + 'reported by the component as euiDateRangeParse: show a message for that error key.',\n );\n }\n }\n\n if (localeFiles.length > 0) {\n context.logger.warn(\n 'Breaking change: eUI no longer bundles moment locale data. With the MomentDateAdapter, import the moment locales '\n + 'your app uses (e.g. `import \\'moment/locale/fr\\';`); otherwise eui-date-range-selector falls back to the `en` '\n + 'locale and dates are shown as MM/DD/YYYY.',\n );\n for (const file of localeFiles) {\n warn(`${file} uses eui-date-range-selector — ensure the required moment locale(s) are imported.`);\n }\n }\n\n context.logger.info(`eui-date-range-selector check: ${manualActions} manual action(s) reported, no files modified.`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction usesTimeRange(template: string): boolean {\n const nodes = parseTemplateNodes(template);\n if (!nodes) return /\\bisTimeRange\\b/.test(template);\n let found = false;\n forEachElement(nodes, SELECTOR_TAG, (element) => {\n const enabledByAttribute = element.attributes.some((a) => a.name === 'isTimeRange' && a.value !== 'false');\n const bound = element.inputs.some((input) => input.name === 'isTimeRange');\n found ||= enabledByAttribute || bound;\n });\n return found;\n}\n",
4304
4304
  "displayName": "Schema",
4305
4305
  "properties": [
4306
4306
  {
@@ -4312,7 +4312,7 @@
4312
4312
  "indexKey": "",
4313
4313
  "optional": true,
4314
4314
  "description": "",
4315
- "line": 18,
4315
+ "line": 16,
4316
4316
  "rawdescription": "\n"
4317
4317
  },
4318
4318
  {
@@ -4324,7 +4324,7 @@
4324
4324
  "indexKey": "",
4325
4325
  "optional": true,
4326
4326
  "description": "",
4327
- "line": 17,
4327
+ "line": 15,
4328
4328
  "rawdescription": "\n"
4329
4329
  }
4330
4330
  ],
@@ -4342,12 +4342,12 @@
4342
4342
  },
4343
4343
  {
4344
4344
  "name": "Schema",
4345
- "id": "interface-Schema-869dfc324e9111966817cbebb3553eabfe200acfe33bb77efa71a6c46e1cba0ff5852de7b9ade3060f87264035b99591361331a9e0622daaac22b8d59146c761-25",
4346
- "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
4345
+ "id": "interface-Schema-375dc0924084a2acbafe4a6a32577d59f631c9a386d151180d8fb1c89e7e7cd23da9fd459e597592ed823692adb6ad2633c50baf16621f003246e8c9bb1c6ce0-25",
4346
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
4347
4347
  "deprecated": false,
4348
4348
  "deprecationMessage": "",
4349
4349
  "type": "interface",
4350
- "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",
4350
+ "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",
4351
4351
  "displayName": "Schema",
4352
4352
  "properties": [
4353
4353
  {
@@ -4359,7 +4359,7 @@
4359
4359
  "indexKey": "",
4360
4360
  "optional": true,
4361
4361
  "description": "",
4362
- "line": 8,
4362
+ "line": 12,
4363
4363
  "rawdescription": "\n"
4364
4364
  },
4365
4365
  {
@@ -4371,7 +4371,7 @@
4371
4371
  "indexKey": "",
4372
4372
  "optional": true,
4373
4373
  "description": "",
4374
- "line": 7,
4374
+ "line": 11,
4375
4375
  "rawdescription": "\n"
4376
4376
  }
4377
4377
  ],
@@ -4389,12 +4389,12 @@
4389
4389
  },
4390
4390
  {
4391
4391
  "name": "Schema",
4392
- "id": "interface-Schema-375dc0924084a2acbafe4a6a32577d59f631c9a386d151180d8fb1c89e7e7cd23da9fd459e597592ed823692adb6ad2633c50baf16621f003246e8c9bb1c6ce0-26",
4393
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
4392
+ "id": "interface-Schema-0ee574e11dd651dd971057cb66220845e5b87b2949c69c623c8ddf7355af92a396c58c237a52a05f18c22a5332a2695b717bcfeb8ea840c4e7df8d0084c2b49c-26",
4393
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
4394
4394
  "deprecated": false,
4395
4395
  "deprecationMessage": "",
4396
4396
  "type": "interface",
4397
- "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",
4397
+ "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst COMPONENT_TAG = 'eui-fieldset';\nconst OLD_NAME = 'iconSvgType';\nconst NEW_NAME = 'iconSvgName';\n\nexport function migrateEuiFieldset(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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n }\n\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 // Warn about TS property access usages (merged from warnTsUsages)\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes(OLD_NAME)) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && 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 });\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 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4398
4398
  "displayName": "Schema",
4399
4399
  "properties": [
4400
4400
  {
@@ -4406,7 +4406,7 @@
4406
4406
  "indexKey": "",
4407
4407
  "optional": true,
4408
4408
  "description": "",
4409
- "line": 12,
4409
+ "line": 8,
4410
4410
  "rawdescription": "\n"
4411
4411
  },
4412
4412
  {
@@ -4418,7 +4418,7 @@
4418
4418
  "indexKey": "",
4419
4419
  "optional": true,
4420
4420
  "description": "",
4421
- "line": 11,
4421
+ "line": 7,
4422
4422
  "rawdescription": "\n"
4423
4423
  }
4424
4424
  ],
@@ -4436,12 +4436,12 @@
4436
4436
  },
4437
4437
  {
4438
4438
  "name": "Schema",
4439
- "id": "interface-Schema-0ee574e11dd651dd971057cb66220845e5b87b2949c69c623c8ddf7355af92a396c58c237a52a05f18c22a5332a2695b717bcfeb8ea840c4e7df8d0084c2b49c-27",
4440
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
4439
+ "id": "interface-Schema-e96d29c1785a16147de773cebe7ab5d4ed82aa23c6b1f7737113252a14d156e236f46f7a16340432dec900b664c8005be0aef5d0a628c2f5b8dd2ec7e41edf56-27",
4440
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
4441
4441
  "deprecated": false,
4442
4442
  "deprecationMessage": "",
4443
4443
  "type": "interface",
4444
- "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst COMPONENT_TAG = 'eui-fieldset';\nconst OLD_NAME = 'iconSvgType';\nconst NEW_NAME = 'iconSvgName';\n\nexport function migrateEuiFieldset(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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n }\n\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 // Warn about TS property access usages (merged from warnTsUsages)\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes(OLD_NAME)) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && 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 });\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 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4444
+ "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'euiAccent';\nconst NEW_NAME = 'euiPrimary';\nconst EUI_DIRECTIVES = ['euiButton', 'euiList', 'euiListItem'];\n\nexport function migrateEuiAccent(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(OLD_NAME)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would replace '${OLD_NAME}' → '${NEW_NAME}' in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on EUI components 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 isEuiElement(element: TmplAstElement): boolean {\n if (element.name.startsWith('eui-')) return true;\n return element.attributes.some((a) => EUI_DIRECTIVES.includes(a.name)) ||\n element.inputs.some((i) => EUI_DIRECTIVES.includes(i.name));\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(OLD_NAME)) {\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 renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: NEW_NAME });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\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 (isEuiElement(node)) 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 attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4445
4445
  "displayName": "Schema",
4446
4446
  "properties": [
4447
4447
  {
@@ -4483,12 +4483,12 @@
4483
4483
  },
4484
4484
  {
4485
4485
  "name": "Schema",
4486
- "id": "interface-Schema-b3ff4600c4a5ca1888c45e5baf3600fa6dc6477f1e473e5241ff6682e2929dc8950a5dfa8b1048a348dba7ad1f0ce8cc3681471933911b689e04713334ef4811-28",
4487
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
4486
+ "id": "interface-Schema-21147930d3fbc38fbb3052a2ed9e7aa2b7505e6ed8c88c28796ce7101bd2ad914726eb230dda5826647036190edec6dae7e7e1d172387cd3803aa00bcdf790be-28",
4487
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
4488
4488
  "deprecated": false,
4489
4489
  "deprecationMessage": "",
4490
4490
  "type": "interface",
4491
- "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst COMPONENT_TAG = 'eui-icon-svg';\n\nconst INPUT_RENAMES = new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n]);\n\nconst TS_PROPERTY_RENAMES = new Map([\n ['variant', 'fillColor'],\n]);\n\nexport function migrateEuiIconSvg(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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n context.logger.info(`Migrated eui-icon-svg inputs in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n visitNodes(parsed.nodes, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: { start: number; end: number; text: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(COMPONENT_TAG)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && TS_PROPERTY_RENAMES.has(node.name.text)) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: TS_PROPERTY_RENAMES.get(node.name.text)! });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n const newName = INPUT_RENAMES.get(attr.name);\n if (newName) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n }\n for (const input of element.inputs) {\n const newName = INPUT_RENAMES.get(input.name);\n if (newName) {\n edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n }\n}\n\nfunction applyEdits(source: string, edits: { start: number; end: number; replacement: string }[]): string {\n let result = source;\n for (const edit of edits.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n",
4491
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'iconSet';\nconst NEW_NAME = 'iconSvgName';\nconst COMPONENT_TAG = 'eui-icon-toggle';\n\nexport function migrateEuiIconToggle(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let templateCount = 0;\n let tsCount = 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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\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 if (path.endsWith('.html')) templateCount++;\n else tsCount++;\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on ${COMPONENT_TAG} in ${templateCount + tsCount} 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);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: NEW_NAME });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4492
4492
  "displayName": "Schema",
4493
4493
  "properties": [
4494
4494
  {
@@ -4530,12 +4530,12 @@
4530
4530
  },
4531
4531
  {
4532
4532
  "name": "Schema",
4533
- "id": "interface-Schema-21147930d3fbc38fbb3052a2ed9e7aa2b7505e6ed8c88c28796ce7101bd2ad914726eb230dda5826647036190edec6dae7e7e1d172387cd3803aa00bcdf790be-29",
4534
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
4533
+ "id": "interface-Schema-b3ff4600c4a5ca1888c45e5baf3600fa6dc6477f1e473e5241ff6682e2929dc8950a5dfa8b1048a348dba7ad1f0ce8cc3681471933911b689e04713334ef4811-29",
4534
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
4535
4535
  "deprecated": false,
4536
4536
  "deprecationMessage": "",
4537
4537
  "type": "interface",
4538
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst OLD_NAME = 'iconSet';\nconst NEW_NAME = 'iconSvgName';\nconst COMPONENT_TAG = 'eui-icon-toggle';\n\nexport function migrateEuiIconToggle(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let templateCount = 0;\n let tsCount = 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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\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 if (path.endsWith('.html')) templateCount++;\n else tsCount++;\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on ${COMPONENT_TAG} in ${templateCount + tsCount} 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);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: NEW_NAME });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.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",
4538
+ "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 Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst COMPONENT_TAG = 'eui-icon-svg';\n\nconst INPUT_RENAMES = new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n]);\n\nconst TS_PROPERTY_RENAMES = new Map([\n ['variant', 'fillColor'],\n]);\n\nexport function migrateEuiIconSvg(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 let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n result = renameTsPropertyAccesses(result);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename deprecated inputs in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n });\n\n context.logger.info(`Migrated eui-icon-svg inputs in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n visitNodes(parsed.nodes, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: { start: number; end: number; text: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(COMPONENT_TAG)) {\n ts.forEachChild(node, visit);\n return;\n }\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) {\n changes.push({ start, end, text: migrated });\n }\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction renameTsPropertyAccesses(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && TS_PROPERTY_RENAMES.has(node.name.text)) {\n edits.push({ start: node.name.getStart(sourceFile), end: node.name.getEnd(), replacement: TS_PROPERTY_RENAMES.get(node.name.text)! });\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n return applyEdits(source, edits);\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) {\n current = current.expression;\n }\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) {\n collectRenames(node, edits);\n }\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n const newName = INPUT_RENAMES.get(attr.name);\n if (newName) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: newName });\n }\n }\n for (const input of element.inputs) {\n const newName = INPUT_RENAMES.get(input.name);\n if (newName) {\n edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: newName });\n }\n }\n}\n\nfunction applyEdits(source: string, edits: { start: number; end: number; replacement: string }[]): string {\n let result = source;\n for (const edit of edits.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n",
4539
4539
  "displayName": "Schema",
4540
4540
  "properties": [
4541
4541
  {
@@ -4812,12 +4812,12 @@
4812
4812
  },
4813
4813
  {
4814
4814
  "name": "Schema",
4815
- "id": "interface-Schema-4cb077d32343381bb83ccb84352da33556a5f9624c8e097b0c0ef272bcdb4fd9f45081cefdca9d9bd76951a09ee5c26505e76dc4433492894677abe814cb1cf4-35",
4816
- "file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
4815
+ "id": "interface-Schema-817c4b549cc3eab9fcf4936acab2e71182d90a4480369f5c003cbbda10792efa587ad99d65acf049f64e7030e32589e4fabc4a6d7a5621e4fe54725ef91dc9e8-35",
4816
+ "file": "packages/core/schematics/migrate-to-standalone/index.ts",
4817
4817
  "deprecated": false,
4818
4818
  "deprecationMessage": "",
4819
4819
  "type": "interface",
4820
- "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 !== undefined && 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 === undefined || 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",
4820
+ "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",
4821
4821
  "displayName": "Schema",
4822
4822
  "properties": [
4823
4823
  {
@@ -4829,7 +4829,7 @@
4829
4829
  "indexKey": "",
4830
4830
  "optional": true,
4831
4831
  "description": "",
4832
- "line": 7,
4832
+ "line": 460,
4833
4833
  "rawdescription": "\n"
4834
4834
  },
4835
4835
  {
@@ -4841,7 +4841,7 @@
4841
4841
  "indexKey": "",
4842
4842
  "optional": true,
4843
4843
  "description": "",
4844
- "line": 6,
4844
+ "line": 459,
4845
4845
  "rawdescription": "\n"
4846
4846
  }
4847
4847
  ],
@@ -4859,12 +4859,12 @@
4859
4859
  },
4860
4860
  {
4861
4861
  "name": "Schema",
4862
- "id": "interface-Schema-011b93ba7cd66f79bca18e2dd1256bde1673d02c379216083dfa63991cd53df801dffd8f9e4019d6fe8839a3cf1e154ea4f2234e183a836693cb2331e36e8e07-36",
4863
- "file": "packages/core/schematics/migrate-to-signals/index.ts",
4862
+ "id": "interface-Schema-4cb077d32343381bb83ccb84352da33556a5f9624c8e097b0c0ef272bcdb4fd9f45081cefdca9d9bd76951a09ee5c26505e76dc4433492894677abe814cb1cf4-36",
4863
+ "file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
4864
4864
  "deprecated": false,
4865
4865
  "deprecationMessage": "",
4866
4866
  "type": "interface",
4867
- "sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport { EUI_SIGNAL_MAP as EUI_SIGNAL_MAP_RAW, EUI_SELECTOR_TO_CLASS as EUI_SELECTOR_TO_CLASS_RAW } from './signal-map';\nimport { ECL_SIGNAL_MAP, ECL_SELECTOR_TO_CLASS } from './ecl-signal-map';\n\n/**\n * Combined EUI + ECL signal maps. The migration logic is identical for both\n * libraries (plain field → signal getter), so the maps are merged and the rest\n * of the engine treats them uniformly. EUI and ECL class names don't collide\n * (Eui* vs Ecl* prefixes), and the selector namespaces are disjoint.\n */\nconst EUI_SIGNAL_MAP: Record<string, ReadonlySet<string>> = { ...EUI_SIGNAL_MAP_RAW, ...ECL_SIGNAL_MAP };\nconst EUI_SELECTOR_TO_CLASS: Record<string, string> = { ...EUI_SELECTOR_TO_CLASS_RAW, ...ECL_SELECTOR_TO_CLASS };\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\n/**\n * Migrates consumer code that accesses EUI or ECL component instances\n * programmatically.\n *\n * When EUI/ECL migrated @Input() → input(), @ViewChild() → viewChild(), and\n * @ContentChild() → contentChild(), properties that were plain class fields\n * became signal getters. Consumers who access them via @ViewChild need to\n * change `comp.prop` to `comp.prop()`.\n *\n * This schematic:\n * 1. Finds @ViewChild / @ContentChild fields typed as EUI component classes\n * 2. Resolves untyped @ViewChild('refName') by reading the component template\n * and matching #refName to an EUI element tag/selector\n * 3. Tracks which local variable names hold EUI component references (incl. aliases)\n * 4. Rewrites property accesses on those references: `ref.prop` → `ref.prop()`\n * (only for properties listed in the signal map)\n * 5. Does NOT touch template bindings — those are unaffected by signal migrations\n */\nexport function migrateToSignals(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n let propCount = 0;\n let todoCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n // Skip spec files — test code may use different patterns\n if (path.endsWith('.spec.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n // Fast bail: file must mention at least one EUI class name or have\n // ViewChild/ContentChild with string refs (which might reference EUI elements)\n if (!hasEuiReference(original) && !hasStringRefQuery(original)) return;\n\n const result = migrateTypeScript(original, path, tree, context); if (result.source !== original) {\n if (options.dryRun) {\n if (result.editCount > 0) {\n logDryRun(context, `Would migrate ${result.editCount} signal property access(es) in ${path}`);\n }\n if (result.todoCount > 0) {\n logDryRun(\n context,\n `Would comment out ${result.todoCount} programmatic signal-input write(s) with a TODO in ${path}`,\n );\n }\n } else {\n tree.overwrite(path, result.source);\n }\n fileCount++;\n propCount += result.editCount;\n todoCount += result.todoCount;\n }\n });\n\n context.logger.info(`Migrated ${propCount} property access(es) to signal getters in ${fileCount} file(s).`);\n if (todoCount > 0) {\n context.logger.info(\n `Commented out ${todoCount} programmatic signal-input write(s) and left a TODO — these cannot be migrated automatically and need a manual fix.`,\n );\n }\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\n/** Quick check: does the file reference any EUI class name from the signal map? */\nfunction hasEuiReference(source: string): boolean {\n for (const className of Object.keys(EUI_SIGNAL_MAP)) {\n if (source.includes(className)) return true;\n }\n return false;\n}\n\n/** Quick check: does the file have @ViewChild('...') or @ContentChild('...') with string refs? */\nfunction hasStringRefQuery(source: string): boolean {\n return /(@ViewChild|@ContentChild|@ViewChildren|@ContentChildren)\\s*\\(\\s*['\"]/.test(source);\n}\n\ninterface MigrateResult {\n source: string;\n editCount: number;\n todoCount: number;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, tree: Tree, context: SchematicContext): MigrateResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n const todoEdits: Edit[] = [];\n\n // Phase 0: Build template ref map (#refName → EUI class name) from the component's template\n const templateRefMap = buildTemplateRefMap(sourceFile, source, filePath, tree);\n\n // Phase 1: Collect all variables/properties typed as EUI classes\n const euiRefs = collectEuiReferences(sourceFile, source, templateRefMap);\n\n if (euiRefs.size === 0) {\n return { source, editCount: 0, todoCount: 0 };\n }\n\n // Phase 2: Find property accesses on those references and rewrite signal props\n const visitNode = (node: ts.Node): void => {\n // Match: ref.prop (PropertyAccessExpression)\n if (ts.isPropertyAccessExpression(node)) {\n const rewrite = tryRewritePropertyAccess(node, euiRefs, sourceFile, source);\n if (rewrite) {\n edits.push(rewrite);\n }\n\n // Separately: a programmatic WRITE to a now-signal input cannot be\n // migrated automatically. Flag it with a TODO instead of silently\n // leaving a line that will fail to compile against the signal API.\n const todo = tryInsertWriteTodo(node, euiRefs, sourceFile, source);\n if (todo) {\n todoEdits.push(todo);\n }\n }\n ts.forEachChild(node, visitNode);\n };\n\n ts.forEachChild(sourceFile, visitNode);\n\n if (edits.length === 0 && todoEdits.length === 0) {\n return { source, editCount: 0, todoCount: 0 };\n }\n\n const dedupedTodos = deduplicateEdits(todoEdits);\n\n // A TODO edit comments out the whole write statement. Any read-rewrite `()`\n // edit whose position falls inside that commented-out range must be dropped,\n // otherwise we'd both edit and comment the same text (and produce overlapping\n // edits that corrupt the output).\n const keptEdits = edits.filter((edit) => !isInsideAnyRange(edit, dedupedTodos));\n\n return {\n source: applyEdits(source, [...keptEdits, ...dedupedTodos]),\n editCount: keptEdits.length,\n todoCount: dedupedTodos.length,\n };\n}\n\n/**\n * Scans the source file for class properties or variables typed as EUI component classes.\n * Returns a map: localName → Set of signal property names.\n *\n * Handles:\n * @ViewChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild(EuiXxxComponent) name!: EuiXxxComponent;\n * @ViewChild('ref') name: EuiXxxComponent;\n * @ContentChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild('ref') name: ElementRef; (resolved via template #ref → EUI selector)\n * someVar: EuiXxxComponent; (typed class field, even without decorator)\n * const alias = this.viewChildRef; (alias tracking)\n */\nfunction collectEuiReferences(\n sourceFile: ts.SourceFile,\n source: string,\n templateRefMap: Map<string, string>,\n): Map<string, ReadonlySet<string>> {\n const refs = new Map<string, ReadonlySet<string>>();\n\n // Pass 1: collect directly-typed references\n const visitDirect = (node: ts.Node): void => {\n // Class property declarations\n if (ts.isPropertyDeclaration(node) && node.name && ts.isIdentifier(node.name)) {\n const euiClass = resolveEuiClassName(node, sourceFile, templateRefMap);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[euiClass]);\n }\n }\n\n // Variable declarations (const x: EuiXxxComponent = ...)\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n // Parameter declarations (method(ref: EuiXxxComponent))\n if (ts.isParameter(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n ts.forEachChild(node, visitDirect);\n };\n\n ts.forEachChild(sourceFile, visitDirect);\n\n // Pass 2: track aliases — variables assigned from already-tracked references\n // e.g. const alias = this.viewChildRef; or const alias = someParam;\n const visitAlias = (node: ts.Node): void => {\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {\n // Skip if already tracked (has explicit type annotation)\n if (refs.has(node.name.text)) {\n ts.forEachChild(node, visitAlias);\n return;\n }\n\n const aliasedRef = resolveRefName(node.initializer);\n if (aliasedRef && refs.has(aliasedRef)) {\n refs.set(node.name.text, refs.get(aliasedRef)!);\n }\n }\n\n ts.forEachChild(node, visitAlias);\n };\n\n ts.forEachChild(sourceFile, visitAlias);\n return refs;\n}\n\n/**\n * Resolves the EUI class name from a property declaration.\n * Checks: type annotation → decorator class argument → template ref map.\n */\nfunction resolveEuiClassName(\n node: ts.PropertyDeclaration,\n sourceFile: ts.SourceFile,\n templateRefMap: Map<string, string>,\n): string | null {\n // Check type annotation first\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n return typeName;\n }\n\n // Check generic type argument: ElementRef<EuiXxxComponent>\n if (node.type && ts.isTypeReferenceNode(node.type) && node.type.typeArguments?.length) {\n const genericArg = getTypeAnnotationName(node.type.typeArguments[0]);\n if (genericArg && EUI_SIGNAL_MAP[genericArg]) {\n return genericArg;\n }\n }\n\n // Check decorator arguments: @ViewChild(EuiXxxComponent) or @ViewChild('refName')\n if (node.modifiers) {\n for (const modifier of node.modifiers) {\n if (!ts.isDecorator(modifier)) continue;\n if (!ts.isCallExpression(modifier.expression)) continue;\n\n const decoratorName = getDecoratorName(modifier.expression);\n if (!decoratorName) continue;\n if (!['ViewChild', 'ViewChildren', 'ContentChild', 'ContentChildren'].includes(decoratorName)) continue;\n\n const args = modifier.expression.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n\n // @ViewChild(EuiXxxComponent) — class reference\n if (ts.isIdentifier(firstArg) && EUI_SIGNAL_MAP[firstArg.text]) {\n return firstArg.text;\n }\n\n // @ViewChild('refName') — string template ref, resolve via template\n if (ts.isStringLiteralLike(firstArg)) {\n const refName = firstArg.text;\n const euiClass = templateRefMap.get(refName);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n return euiClass;\n }\n }\n }\n }\n }\n\n return null;\n}\n\nfunction getDecoratorName(callExpr: ts.CallExpression): string | null {\n if (ts.isIdentifier(callExpr.expression)) {\n return callExpr.expression.text;\n }\n return null;\n}\n\nfunction getTypeAnnotationName(typeNode: ts.TypeNode | undefined): string | null {\n if (!typeNode) return null;\n if (ts.isTypeReferenceNode(typeNode) && ts.isIdentifier(typeNode.typeName)) {\n return typeNode.typeName.text;\n }\n return null;\n}\n\n/**\n * Checks if a property access `ref.prop` should be rewritten to `ref.prop()`.\n *\n * We rewrite if:\n * - `ref` is tracked in euiRefs\n * - `prop` is in the signal set for that EUI class\n * - The access is NOT already a call expression (not `ref.prop()` or `ref.prop(args)`)\n * - The access is NOT a write target (not `ref.prop = value`)\n * - The access is NOT a template binding argument (those are unaffected)\n */\nfunction tryRewritePropertyAccess(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n // Resolve the reference name — handle `this.ref.prop` and `ref.prop`\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Skip if parent is already a call expression on this property: ref.prop(...)\n if (ts.isCallExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if this is the left side of an assignment: ref.prop = value\n if (ts.isBinaryExpression(node.parent) &&\n node.parent.operatorToken.kind === ts.SyntaxKind.EqualsToken &&\n node.parent.left === node) {\n return null;\n }\n\n // Skip if this is a compound assignment: ref.prop += value, ref.prop &&= value, etc.\n if (ts.isBinaryExpression(node.parent) && isAssignmentOperator(node.parent.operatorToken.kind) && node.parent.left === node) {\n return null;\n }\n\n // Skip if this is used with delete: delete ref.prop\n if (ts.isDeleteExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if inside a typeof: typeof ref.prop\n if (ts.isTypeOfExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip property access chains that go deeper: ref.prop.something → ref.prop().something\n // This IS correct — we still want to add ()\n\n // Rewrite: insert () after the property name\n const end = node.name.getEnd();\n return {\n start: end,\n end: end,\n replacement: '()',\n };\n}\n\nfunction isAssignmentOperator(kind: ts.SyntaxKind): boolean {\n return kind >= ts.SyntaxKind.FirstAssignment && kind <= ts.SyntaxKind.LastAssignment;\n}\n\n/** Marker used to detect an already-inserted TODO so the schematic stays idempotent. */\nconst WRITE_TODO_MARKER = 'TODO(eui-signals):';\n\n/**\n * Detects a programmatic WRITE to a now-signal input and returns an edit that\n * comments out the offending statement and prepends an explanatory TODO.\n *\n * A signal input (`input()`) exposes a read-only getter — it cannot be assigned\n * from outside the component (`comp.prop = value` no longer compiles, and\n * `comp.prop()` is a getter, not a setter). There is no safe, mechanical\n * rewrite: the correct fix is to drive the value declaratively through a\n * template binding (`[prop]=\"...\"`) or, when a ComponentRef is genuinely\n * available, `componentRef.setInput('prop', value)`. Both require human\n * judgement, so instead of rewriting we comment the statement out (keeping the\n * build green) and leave a TODO pointing at the manual fix.\n *\n * Only acts when the assignment is the ENTIRE statement\n * (`ExpressionStatement` whose expression is exactly this assignment):\n * ref.prop = value (simple assignment)\n * ref.prop += value, etc. (compound assignment)\n * where `ref` is a tracked EUI/ECL reference and `prop` is in its signal set.\n *\n * When the write is only part of a larger statement (e.g. inside an `if`\n * without a block, or nested in another expression), commenting it out would\n * also remove unrelated logic, so we leave it untouched (it will surface as a\n * compile error the developer must resolve by hand).\n */\nfunction tryInsertWriteTodo(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Only act on assignment targets: `ref.prop = ...` or `ref.prop <op>= ...`\n if (\n !ts.isBinaryExpression(node.parent) ||\n node.parent.left !== node ||\n !isAssignmentOperator(node.parent.operatorToken.kind)\n ) {\n return null;\n }\n\n const assignment = node.parent;\n\n // Only comment out when the assignment IS the whole statement — otherwise we'd\n // delete unrelated logic from a larger statement.\n const statement = node.parent.parent;\n if (!statement || !ts.isExpressionStatement(statement) || statement.expression !== assignment) {\n return null;\n }\n\n // The statement must stand on its own (a direct child of a block/source), not\n // be the unbraced body of an `if`/`for`/`while` etc. — commenting those out by\n // line would swallow the surrounding `if (...)` and break the code.\n const parent = statement.parent;\n if (\n !parent ||\n !(ts.isBlock(parent) || ts.isSourceFile(parent) || ts.isModuleBlock(parent) || ts.isCaseClause(parent) || ts.isDefaultClause(parent))\n ) {\n return null;\n }\n\n const stmtStart = statement.getStart(sourceFile);\n const stmtEnd = statement.getEnd(); // includes the trailing semicolon\n const lineStart = getLineStartPosition(source, stmtStart);\n const indent = source.slice(lineStart, stmtStart);\n\n // The statement text, as written (may span multiple lines).\n const statementText = source.slice(stmtStart, stmtEnd);\n\n // Comment out every line of the statement, preserving each line's own\n // indentation (insert `// ` after the leading whitespace). The first line's\n // indentation was stripped by starting the replacement at lineStart, so we\n // re-add it explicitly.\n const commentedStatement = statementText\n .split('\\n')\n .map((line, i) => {\n if (i === 0) return `${indent}// ${line}`;\n const lineIndent = line.slice(0, line.length - line.trimStart().length);\n return `${lineIndent}// ${line.trimStart()}`;\n })\n .join('\\n');\n\n const todo =\n `${indent}// ${WRITE_TODO_MARKER} '${propName}' is now a signal input and cannot be assigned directly.\\n` +\n `${indent}// Set it via a template binding ([${propName}]=\"...\") or componentRef.setInput('${propName}', ...).\\n` +\n `${indent}// The original statement is commented out below so the build does not fail:\\n`;\n\n // Replace the statement (from the start of its line, to drop the original\n // indentation we re-add) with the TODO + commented-out statement.\n return {\n start: lineStart,\n end: stmtEnd,\n replacement: todo + commentedStatement,\n };\n}\n\n/** True if `edit`'s position falls within any of the given ranges. */\nfunction isInsideAnyRange(edit: Edit, ranges: Edit[]): boolean {\n return ranges.some((range) => edit.start >= range.start && edit.end <= range.end);\n}\n\n/** Returns the index of the first character of the line containing `pos`. */\nfunction getLineStartPosition(source: string, pos: number): number {\n const newlineIndex = source.lastIndexOf('\\n', pos - 1);\n return newlineIndex === -1 ? 0 : newlineIndex + 1;\n}\n\n/**\n * Resolves a reference name from an expression.\n * Handles: `ref`, `this.ref`, `this._ref`\n */\nfunction resolveRefName(expr: ts.Expression): string | null {\n // Direct identifier: ref.prop\n if (ts.isIdentifier(expr)) {\n return expr.text;\n }\n\n // this.ref.prop\n if (ts.isPropertyAccessExpression(expr) && expr.expression.kind === ts.SyntaxKind.ThisKeyword) {\n return expr.name.text;\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Template ref resolution\n// ---------------------------------------------------------------------------\n\n/**\n * Builds a map of template reference variable names (#ref) to EUI class names.\n *\n * Parses the component's template (inline or external) and finds elements like:\n * <eui-alert #myAlert> → myAlert → EuiAlertComponent\n * <input euiAutocomplete #ac> → ac → EuiAutocompleteComponent\n *\n * Returns Map<refName, euiClassName>.\n */\nfunction buildTemplateRefMap(\n sourceFile: ts.SourceFile,\n source: string,\n filePath: string,\n tree: Tree,\n): Map<string, string> {\n const refMap = new Map<string, string>();\n\n // Find @Component decorator\n const componentMeta = findComponentMetadata(sourceFile, source);\n if (!componentMeta) return refMap;\n\n let templateSource: string | null = null;\n\n if (componentMeta.inlineTemplate !== null) {\n templateSource = componentMeta.inlineTemplate;\n } else if (componentMeta.templateUrl) {\n // Resolve templateUrl relative to the TS file\n const dir = filePath.substring(0, filePath.lastIndexOf('/'));\n const templatePath = `${dir}/${componentMeta.templateUrl}`;\n const buffer = tree.read(templatePath);\n if (buffer) {\n templateSource = buffer.toString('utf-8');\n }\n }\n\n if (!templateSource) return refMap;\n\n // Parse the template and collect #refs\n try {\n const parsed = parseTemplate(templateSource, '', { preserveWhitespaces: true });\n collectTemplateRefs(parsed.nodes, refMap);\n } catch {\n // Template parse failure — silently skip (might be malformed or use third-party syntax)\n }\n\n return refMap;\n}\n\n/**\n * Extracts @Component metadata: templateUrl or inline template content.\n */\nfunction findComponentMetadata(\n sourceFile: ts.SourceFile,\n source: string,\n): { templateUrl: string | null; inlineTemplate: string | null } | null {\n let result: { templateUrl: string | null; inlineTemplate: string | null } | null = null;\n\n const visit = (node: ts.Node): void => {\n if (result) return;\n\n if (ts.isDecorator(node) && ts.isCallExpression(node.expression)) {\n const name = getDecoratorName(node.expression);\n if (name !== 'Component') {\n ts.forEachChild(node, visit);\n return;\n }\n\n const args = node.expression.arguments;\n if (args.length === 0 || !ts.isObjectLiteralExpression(args[0])) {\n ts.forEachChild(node, visit);\n return;\n }\n\n const meta: { templateUrl: string | null; inlineTemplate: string | null } = {\n templateUrl: null,\n inlineTemplate: null,\n };\n\n for (const prop of args[0].properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) continue;\n\n if (prop.name.text === 'templateUrl') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.templateUrl = init.text;\n }\n }\n\n if (prop.name.text === 'template') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.inlineTemplate = init.text;\n } else if (ts.isNoSubstitutionTemplateLiteral(init)) {\n meta.inlineTemplate = init.text;\n }\n }\n }\n\n result = meta;\n return;\n }\n\n ts.forEachChild(node, visit);\n };\n\n ts.forEachChild(sourceFile, visit);\n return result;\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\n/**\n * Recursively walks template AST nodes, collecting #refName → EUI class name mappings.\n *\n * For each element with a template reference (#ref), we try to resolve its EUI class:\n * 1. Match element tag name against EUI_SELECTOR_TO_CLASS (e.g. 'eui-alert' → EuiAlertComponent)\n * 2. Match element attributes against attribute selectors (e.g. [euiAutocomplete] → EuiAutocompleteComponent)\n */\nfunction collectTemplateRefs(nodes: TmplAstNode[], refMap: Map<string, string>): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.references !== undefined && node.references.length > 0) {\n const euiClass = resolveElementToEuiClass(node);\n if (euiClass) {\n for (const ref of node.references) {\n refMap.set(ref.name, euiClass);\n }\n }\n }\n collectTemplateRefs(node.children, refMap);\n }\n }\n}\n\n/**\n * Given a template element, resolves it to an EUI class name by checking:\n * 1. Tag name: <eui-alert> → look up 'eui-alert' in EUI_SELECTOR_TO_CLASS\n * 2. Attribute selectors: <input euiAutocomplete> → look up 'input[euiAutocomplete]' or '[euiAutocomplete]'\n */\nfunction resolveElementToEuiClass(element: TmplAstElement): string | null {\n const tag = element.name;\n\n // Direct tag match: eui-alert, eui-dialog, etc.\n if (EUI_SELECTOR_TO_CLASS[tag]) {\n return EUI_SELECTOR_TO_CLASS[tag];\n }\n\n // Attribute selector match: check all attributes against known patterns\n const allAttrNames = [\n ...element.attributes.map((a) => a.name),\n ...element.inputs.map((i) => i.name),\n ];\n\n for (const attrName of allAttrNames) {\n // Try tag[attr] pattern first (e.g. 'button[euiButton]', 'input[euiAutocomplete]')\n const tagAttrSelector = `${tag}[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[tagAttrSelector]) {\n return EUI_SELECTOR_TO_CLASS[tagAttrSelector];\n }\n\n // Try [attr] pattern (e.g. '[euiTooltip]', '[euiLoading]')\n const attrSelector = `[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[attrSelector]) {\n return EUI_SELECTOR_TO_CLASS[attrSelector];\n }\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Edit helpers\n// ---------------------------------------------------------------------------\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
4867
+ "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 !== undefined && 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 === undefined || 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",
4868
4868
  "displayName": "Schema",
4869
4869
  "properties": [
4870
4870
  {
@@ -4876,7 +4876,7 @@
4876
4876
  "indexKey": "",
4877
4877
  "optional": true,
4878
4878
  "description": "",
4879
- "line": 19,
4879
+ "line": 7,
4880
4880
  "rawdescription": "\n"
4881
4881
  },
4882
4882
  {
@@ -4888,7 +4888,7 @@
4888
4888
  "indexKey": "",
4889
4889
  "optional": true,
4890
4890
  "description": "",
4891
- "line": 18,
4891
+ "line": 6,
4892
4892
  "rawdescription": "\n"
4893
4893
  }
4894
4894
  ],
@@ -4906,12 +4906,12 @@
4906
4906
  },
4907
4907
  {
4908
4908
  "name": "Schema",
4909
- "id": "interface-Schema-817c4b549cc3eab9fcf4936acab2e71182d90a4480369f5c003cbbda10792efa587ad99d65acf049f64e7030e32589e4fabc4a6d7a5621e4fe54725ef91dc9e8-37",
4910
- "file": "packages/core/schematics/migrate-to-standalone/index.ts",
4909
+ "id": "interface-Schema-011b93ba7cd66f79bca18e2dd1256bde1673d02c379216083dfa63991cd53df801dffd8f9e4019d6fe8839a3cf1e154ea4f2234e183a836693cb2331e36e8e07-37",
4910
+ "file": "packages/core/schematics/migrate-to-signals/index.ts",
4911
4911
  "deprecated": false,
4912
4912
  "deprecationMessage": "",
4913
4913
  "type": "interface",
4914
- "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",
4914
+ "sourceCode": "import { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport { parseTemplate, TmplAstElement, TmplAstNode } from '@angular/compiler';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\nimport { EUI_SIGNAL_MAP as EUI_SIGNAL_MAP_RAW, EUI_SELECTOR_TO_CLASS as EUI_SELECTOR_TO_CLASS_RAW } from './signal-map';\nimport { ECL_SIGNAL_MAP, ECL_SELECTOR_TO_CLASS } from './ecl-signal-map';\n\n/**\n * Combined EUI + ECL signal maps. The migration logic is identical for both\n * libraries (plain field → signal getter), so the maps are merged and the rest\n * of the engine treats them uniformly. EUI and ECL class names don't collide\n * (Eui* vs Ecl* prefixes), and the selector namespaces are disjoint.\n */\nconst EUI_SIGNAL_MAP: Record<string, ReadonlySet<string>> = { ...EUI_SIGNAL_MAP_RAW, ...ECL_SIGNAL_MAP };\nconst EUI_SELECTOR_TO_CLASS: Record<string, string> = { ...EUI_SELECTOR_TO_CLASS_RAW, ...ECL_SELECTOR_TO_CLASS };\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\ninterface Edit {\n start: number;\n end: number;\n replacement: string;\n}\n\n/**\n * Migrates consumer code that accesses EUI or ECL component instances\n * programmatically.\n *\n * When EUI/ECL migrated @Input() → input(), @ViewChild() → viewChild(), and\n * @ContentChild() → contentChild(), properties that were plain class fields\n * became signal getters. Consumers who access them via @ViewChild need to\n * change `comp.prop` to `comp.prop()`.\n *\n * This schematic:\n * 1. Finds @ViewChild / @ContentChild fields typed as EUI component classes\n * 2. Resolves untyped @ViewChild('refName') by reading the component template\n * and matching #refName to an EUI element tag/selector\n * 3. Tracks which local variable names hold EUI component references (incl. aliases)\n * 4. Rewrites property accesses on those references: `ref.prop` → `ref.prop()`\n * (only for properties listed in the signal map)\n * 5. Does NOT touch template bindings — those are unaffected by signal migrations\n */\nexport function migrateToSignals(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let fileCount = 0;\n let propCount = 0;\n let todoCount = 0;\n\n visitDir(tree.getDir(scanPath || '/'), (path) => {\n if (!path.endsWith('.ts')) return;\n // Skip spec files — test code may use different patterns\n if (path.endsWith('.spec.ts')) return;\n\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n\n // Fast bail: file must mention at least one EUI class name or have\n // ViewChild/ContentChild with string refs (which might reference EUI elements)\n if (!hasEuiReference(original) && !hasStringRefQuery(original)) return;\n\n const result = migrateTypeScript(original, path, tree, context); if (result.source !== original) {\n if (options.dryRun) {\n if (result.editCount > 0) {\n logDryRun(context, `Would migrate ${result.editCount} signal property access(es) in ${path}`);\n }\n if (result.todoCount > 0) {\n logDryRun(\n context,\n `Would comment out ${result.todoCount} programmatic signal-input write(s) with a TODO in ${path}`,\n );\n }\n } else {\n tree.overwrite(path, result.source);\n }\n fileCount++;\n propCount += result.editCount;\n todoCount += result.todoCount;\n }\n });\n\n context.logger.info(`Migrated ${propCount} property access(es) to signal getters in ${fileCount} file(s).`);\n if (todoCount > 0) {\n context.logger.info(\n `Commented out ${todoCount} programmatic signal-input write(s) and left a TODO — these cannot be migrated automatically and need a manual fix.`,\n );\n }\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\n/** Quick check: does the file reference any EUI class name from the signal map? */\nfunction hasEuiReference(source: string): boolean {\n for (const className of Object.keys(EUI_SIGNAL_MAP)) {\n if (source.includes(className)) return true;\n }\n return false;\n}\n\n/** Quick check: does the file have @ViewChild('...') or @ContentChild('...') with string refs? */\nfunction hasStringRefQuery(source: string): boolean {\n return /(@ViewChild|@ContentChild|@ViewChildren|@ContentChildren)\\s*\\(\\s*['\"]/.test(source);\n}\n\ninterface MigrateResult {\n source: string;\n editCount: number;\n todoCount: number;\n}\n\nfunction migrateTypeScript(source: string, filePath: string, tree: Tree, context: SchematicContext): MigrateResult {\n const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const edits: Edit[] = [];\n const todoEdits: Edit[] = [];\n\n // Phase 0: Build template ref map (#refName → EUI class name) from the component's template\n const templateRefMap = buildTemplateRefMap(sourceFile, source, filePath, tree);\n\n // Phase 1: Collect all variables/properties typed as EUI classes\n const euiRefs = collectEuiReferences(sourceFile, source, templateRefMap);\n\n if (euiRefs.size === 0) {\n return { source, editCount: 0, todoCount: 0 };\n }\n\n // Phase 2: Find property accesses on those references and rewrite signal props\n const visitNode = (node: ts.Node): void => {\n // Match: ref.prop (PropertyAccessExpression)\n if (ts.isPropertyAccessExpression(node)) {\n const rewrite = tryRewritePropertyAccess(node, euiRefs, sourceFile, source);\n if (rewrite) {\n edits.push(rewrite);\n }\n\n // Separately: a programmatic WRITE to a now-signal input cannot be\n // migrated automatically. Flag it with a TODO instead of silently\n // leaving a line that will fail to compile against the signal API.\n const todo = tryInsertWriteTodo(node, euiRefs, sourceFile, source);\n if (todo) {\n todoEdits.push(todo);\n }\n }\n ts.forEachChild(node, visitNode);\n };\n\n ts.forEachChild(sourceFile, visitNode);\n\n if (edits.length === 0 && todoEdits.length === 0) {\n return { source, editCount: 0, todoCount: 0 };\n }\n\n const dedupedTodos = deduplicateEdits(todoEdits);\n\n // A TODO edit comments out the whole write statement. Any read-rewrite `()`\n // edit whose position falls inside that commented-out range must be dropped,\n // otherwise we'd both edit and comment the same text (and produce overlapping\n // edits that corrupt the output).\n const keptEdits = edits.filter((edit) => !isInsideAnyRange(edit, dedupedTodos));\n\n return {\n source: applyEdits(source, [...keptEdits, ...dedupedTodos]),\n editCount: keptEdits.length,\n todoCount: dedupedTodos.length,\n };\n}\n\n/**\n * Scans the source file for class properties or variables typed as EUI component classes.\n * Returns a map: localName → Set of signal property names.\n *\n * Handles:\n * @ViewChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild(EuiXxxComponent) name!: EuiXxxComponent;\n * @ViewChild('ref') name: EuiXxxComponent;\n * @ContentChild(EuiXxxComponent) name: EuiXxxComponent;\n * @ViewChild('ref') name: ElementRef; (resolved via template #ref → EUI selector)\n * someVar: EuiXxxComponent; (typed class field, even without decorator)\n * const alias = this.viewChildRef; (alias tracking)\n */\nfunction collectEuiReferences(\n sourceFile: ts.SourceFile,\n source: string,\n templateRefMap: Map<string, string>,\n): Map<string, ReadonlySet<string>> {\n const refs = new Map<string, ReadonlySet<string>>();\n\n // Pass 1: collect directly-typed references\n const visitDirect = (node: ts.Node): void => {\n // Class property declarations\n if (ts.isPropertyDeclaration(node) && node.name && ts.isIdentifier(node.name)) {\n const euiClass = resolveEuiClassName(node, sourceFile, templateRefMap);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[euiClass]);\n }\n }\n\n // Variable declarations (const x: EuiXxxComponent = ...)\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n // Parameter declarations (method(ref: EuiXxxComponent))\n if (ts.isParameter(node) && ts.isIdentifier(node.name)) {\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n refs.set(node.name.text, EUI_SIGNAL_MAP[typeName]);\n }\n }\n\n ts.forEachChild(node, visitDirect);\n };\n\n ts.forEachChild(sourceFile, visitDirect);\n\n // Pass 2: track aliases — variables assigned from already-tracked references\n // e.g. const alias = this.viewChildRef; or const alias = someParam;\n const visitAlias = (node: ts.Node): void => {\n if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {\n // Skip if already tracked (has explicit type annotation)\n if (refs.has(node.name.text)) {\n ts.forEachChild(node, visitAlias);\n return;\n }\n\n const aliasedRef = resolveRefName(node.initializer);\n if (aliasedRef && refs.has(aliasedRef)) {\n refs.set(node.name.text, refs.get(aliasedRef)!);\n }\n }\n\n ts.forEachChild(node, visitAlias);\n };\n\n ts.forEachChild(sourceFile, visitAlias);\n return refs;\n}\n\n/**\n * Resolves the EUI class name from a property declaration.\n * Checks: type annotation → decorator class argument → template ref map.\n */\nfunction resolveEuiClassName(\n node: ts.PropertyDeclaration,\n sourceFile: ts.SourceFile,\n templateRefMap: Map<string, string>,\n): string | null {\n // Check type annotation first\n const typeName = getTypeAnnotationName(node.type);\n if (typeName && EUI_SIGNAL_MAP[typeName]) {\n return typeName;\n }\n\n // Check generic type argument: ElementRef<EuiXxxComponent>\n if (node.type && ts.isTypeReferenceNode(node.type) && node.type.typeArguments?.length) {\n const genericArg = getTypeAnnotationName(node.type.typeArguments[0]);\n if (genericArg && EUI_SIGNAL_MAP[genericArg]) {\n return genericArg;\n }\n }\n\n // Check decorator arguments: @ViewChild(EuiXxxComponent) or @ViewChild('refName')\n if (node.modifiers) {\n for (const modifier of node.modifiers) {\n if (!ts.isDecorator(modifier)) continue;\n if (!ts.isCallExpression(modifier.expression)) continue;\n\n const decoratorName = getDecoratorName(modifier.expression);\n if (!decoratorName) continue;\n if (!['ViewChild', 'ViewChildren', 'ContentChild', 'ContentChildren'].includes(decoratorName)) continue;\n\n const args = modifier.expression.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n\n // @ViewChild(EuiXxxComponent) — class reference\n if (ts.isIdentifier(firstArg) && EUI_SIGNAL_MAP[firstArg.text]) {\n return firstArg.text;\n }\n\n // @ViewChild('refName') — string template ref, resolve via template\n if (ts.isStringLiteralLike(firstArg)) {\n const refName = firstArg.text;\n const euiClass = templateRefMap.get(refName);\n if (euiClass && EUI_SIGNAL_MAP[euiClass]) {\n return euiClass;\n }\n }\n }\n }\n }\n\n return null;\n}\n\nfunction getDecoratorName(callExpr: ts.CallExpression): string | null {\n if (ts.isIdentifier(callExpr.expression)) {\n return callExpr.expression.text;\n }\n return null;\n}\n\nfunction getTypeAnnotationName(typeNode: ts.TypeNode | undefined): string | null {\n if (!typeNode) return null;\n if (ts.isTypeReferenceNode(typeNode) && ts.isIdentifier(typeNode.typeName)) {\n return typeNode.typeName.text;\n }\n return null;\n}\n\n/**\n * Checks if a property access `ref.prop` should be rewritten to `ref.prop()`.\n *\n * We rewrite if:\n * - `ref` is tracked in euiRefs\n * - `prop` is in the signal set for that EUI class\n * - The access is NOT already a call expression (not `ref.prop()` or `ref.prop(args)`)\n * - The access is NOT a write target (not `ref.prop = value`)\n * - The access is NOT a template binding argument (those are unaffected)\n */\nfunction tryRewritePropertyAccess(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n // Resolve the reference name — handle `this.ref.prop` and `ref.prop`\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Skip if parent is already a call expression on this property: ref.prop(...)\n if (ts.isCallExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if this is the left side of an assignment: ref.prop = value\n if (ts.isBinaryExpression(node.parent) &&\n node.parent.operatorToken.kind === ts.SyntaxKind.EqualsToken &&\n node.parent.left === node) {\n return null;\n }\n\n // Skip if this is a compound assignment: ref.prop += value, ref.prop &&= value, etc.\n if (ts.isBinaryExpression(node.parent) && isAssignmentOperator(node.parent.operatorToken.kind) && node.parent.left === node) {\n return null;\n }\n\n // Skip if this is used with delete: delete ref.prop\n if (ts.isDeleteExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip if inside a typeof: typeof ref.prop\n if (ts.isTypeOfExpression(node.parent) && node.parent.expression === node) {\n return null;\n }\n\n // Skip property access chains that go deeper: ref.prop.something → ref.prop().something\n // This IS correct — we still want to add ()\n\n // Rewrite: insert () after the property name\n const end = node.name.getEnd();\n return {\n start: end,\n end: end,\n replacement: '()',\n };\n}\n\nfunction isAssignmentOperator(kind: ts.SyntaxKind): boolean {\n return kind >= ts.SyntaxKind.FirstAssignment && kind <= ts.SyntaxKind.LastAssignment;\n}\n\n/** Marker used to detect an already-inserted TODO so the schematic stays idempotent. */\nconst WRITE_TODO_MARKER = 'TODO(eui-signals):';\n\n/**\n * Detects a programmatic WRITE to a now-signal input and returns an edit that\n * comments out the offending statement and prepends an explanatory TODO.\n *\n * A signal input (`input()`) exposes a read-only getter — it cannot be assigned\n * from outside the component (`comp.prop = value` no longer compiles, and\n * `comp.prop()` is a getter, not a setter). There is no safe, mechanical\n * rewrite: the correct fix is to drive the value declaratively through a\n * template binding (`[prop]=\"...\"`) or, when a ComponentRef is genuinely\n * available, `componentRef.setInput('prop', value)`. Both require human\n * judgement, so instead of rewriting we comment the statement out (keeping the\n * build green) and leave a TODO pointing at the manual fix.\n *\n * Only acts when the assignment is the ENTIRE statement\n * (`ExpressionStatement` whose expression is exactly this assignment):\n * ref.prop = value (simple assignment)\n * ref.prop += value, etc. (compound assignment)\n * where `ref` is a tracked EUI/ECL reference and `prop` is in its signal set.\n *\n * When the write is only part of a larger statement (e.g. inside an `if`\n * without a block, or nested in another expression), commenting it out would\n * also remove unrelated logic, so we leave it untouched (it will surface as a\n * compile error the developer must resolve by hand).\n */\nfunction tryInsertWriteTodo(\n node: ts.PropertyAccessExpression,\n euiRefs: Map<string, ReadonlySet<string>>,\n sourceFile: ts.SourceFile,\n source: string,\n): Edit | null {\n const propName = node.name.text;\n\n const refName = resolveRefName(node.expression);\n if (!refName) return null;\n\n const signalProps = euiRefs.get(refName);\n if (!signalProps || !signalProps.has(propName)) return null;\n\n // Only act on assignment targets: `ref.prop = ...` or `ref.prop <op>= ...`\n if (\n !ts.isBinaryExpression(node.parent) ||\n node.parent.left !== node ||\n !isAssignmentOperator(node.parent.operatorToken.kind)\n ) {\n return null;\n }\n\n const assignment = node.parent;\n\n // Only comment out when the assignment IS the whole statement — otherwise we'd\n // delete unrelated logic from a larger statement.\n const statement = node.parent.parent;\n if (!statement || !ts.isExpressionStatement(statement) || statement.expression !== assignment) {\n return null;\n }\n\n // The statement must stand on its own (a direct child of a block/source), not\n // be the unbraced body of an `if`/`for`/`while` etc. — commenting those out by\n // line would swallow the surrounding `if (...)` and break the code.\n const parent = statement.parent;\n if (\n !parent ||\n !(ts.isBlock(parent) || ts.isSourceFile(parent) || ts.isModuleBlock(parent) || ts.isCaseClause(parent) || ts.isDefaultClause(parent))\n ) {\n return null;\n }\n\n const stmtStart = statement.getStart(sourceFile);\n const stmtEnd = statement.getEnd(); // includes the trailing semicolon\n const lineStart = getLineStartPosition(source, stmtStart);\n const indent = source.slice(lineStart, stmtStart);\n\n // The statement text, as written (may span multiple lines).\n const statementText = source.slice(stmtStart, stmtEnd);\n\n // Comment out every line of the statement, preserving each line's own\n // indentation (insert `// ` after the leading whitespace). The first line's\n // indentation was stripped by starting the replacement at lineStart, so we\n // re-add it explicitly.\n const commentedStatement = statementText\n .split('\\n')\n .map((line, i) => {\n if (i === 0) return `${indent}// ${line}`;\n const lineIndent = line.slice(0, line.length - line.trimStart().length);\n return `${lineIndent}// ${line.trimStart()}`;\n })\n .join('\\n');\n\n const todo =\n `${indent}// ${WRITE_TODO_MARKER} '${propName}' is now a signal input and cannot be assigned directly.\\n` +\n `${indent}// Set it via a template binding ([${propName}]=\"...\") or componentRef.setInput('${propName}', ...).\\n` +\n `${indent}// The original statement is commented out below so the build does not fail:\\n`;\n\n // Replace the statement (from the start of its line, to drop the original\n // indentation we re-add) with the TODO + commented-out statement.\n return {\n start: lineStart,\n end: stmtEnd,\n replacement: todo + commentedStatement,\n };\n}\n\n/** True if `edit`'s position falls within any of the given ranges. */\nfunction isInsideAnyRange(edit: Edit, ranges: Edit[]): boolean {\n return ranges.some((range) => edit.start >= range.start && edit.end <= range.end);\n}\n\n/** Returns the index of the first character of the line containing `pos`. */\nfunction getLineStartPosition(source: string, pos: number): number {\n const newlineIndex = source.lastIndexOf('\\n', pos - 1);\n return newlineIndex === -1 ? 0 : newlineIndex + 1;\n}\n\n/**\n * Resolves a reference name from an expression.\n * Handles: `ref`, `this.ref`, `this._ref`\n */\nfunction resolveRefName(expr: ts.Expression): string | null {\n // Direct identifier: ref.prop\n if (ts.isIdentifier(expr)) {\n return expr.text;\n }\n\n // this.ref.prop\n if (ts.isPropertyAccessExpression(expr) && expr.expression.kind === ts.SyntaxKind.ThisKeyword) {\n return expr.name.text;\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Template ref resolution\n// ---------------------------------------------------------------------------\n\n/**\n * Builds a map of template reference variable names (#ref) to EUI class names.\n *\n * Parses the component's template (inline or external) and finds elements like:\n * <eui-alert #myAlert> → myAlert → EuiAlertComponent\n * <input euiAutocomplete #ac> → ac → EuiAutocompleteComponent\n *\n * Returns Map<refName, euiClassName>.\n */\nfunction buildTemplateRefMap(\n sourceFile: ts.SourceFile,\n source: string,\n filePath: string,\n tree: Tree,\n): Map<string, string> {\n const refMap = new Map<string, string>();\n\n // Find @Component decorator\n const componentMeta = findComponentMetadata(sourceFile, source);\n if (!componentMeta) return refMap;\n\n let templateSource: string | null = null;\n\n if (componentMeta.inlineTemplate !== null) {\n templateSource = componentMeta.inlineTemplate;\n } else if (componentMeta.templateUrl) {\n // Resolve templateUrl relative to the TS file\n const dir = filePath.substring(0, filePath.lastIndexOf('/'));\n const templatePath = `${dir}/${componentMeta.templateUrl}`;\n const buffer = tree.read(templatePath);\n if (buffer) {\n templateSource = buffer.toString('utf-8');\n }\n }\n\n if (!templateSource) return refMap;\n\n // Parse the template and collect #refs\n try {\n const parsed = parseTemplate(templateSource, '', { preserveWhitespaces: true });\n collectTemplateRefs(parsed.nodes, refMap);\n } catch {\n // Template parse failure — silently skip (might be malformed or use third-party syntax)\n }\n\n return refMap;\n}\n\n/**\n * Extracts @Component metadata: templateUrl or inline template content.\n */\nfunction findComponentMetadata(\n sourceFile: ts.SourceFile,\n source: string,\n): { templateUrl: string | null; inlineTemplate: string | null } | null {\n let result: { templateUrl: string | null; inlineTemplate: string | null } | null = null;\n\n const visit = (node: ts.Node): void => {\n if (result) return;\n\n if (ts.isDecorator(node) && ts.isCallExpression(node.expression)) {\n const name = getDecoratorName(node.expression);\n if (name !== 'Component') {\n ts.forEachChild(node, visit);\n return;\n }\n\n const args = node.expression.arguments;\n if (args.length === 0 || !ts.isObjectLiteralExpression(args[0])) {\n ts.forEachChild(node, visit);\n return;\n }\n\n const meta: { templateUrl: string | null; inlineTemplate: string | null } = {\n templateUrl: null,\n inlineTemplate: null,\n };\n\n for (const prop of args[0].properties) {\n if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) continue;\n\n if (prop.name.text === 'templateUrl') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.templateUrl = init.text;\n }\n }\n\n if (prop.name.text === 'template') {\n const init = unwrapExpression(prop.initializer);\n if (ts.isStringLiteralLike(init)) {\n meta.inlineTemplate = init.text;\n } else if (ts.isNoSubstitutionTemplateLiteral(init)) {\n meta.inlineTemplate = init.text;\n }\n }\n }\n\n result = meta;\n return;\n }\n\n ts.forEachChild(node, visit);\n };\n\n ts.forEachChild(sourceFile, visit);\n return result;\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\n/**\n * Recursively walks template AST nodes, collecting #refName → EUI class name mappings.\n *\n * For each element with a template reference (#ref), we try to resolve its EUI class:\n * 1. Match element tag name against EUI_SELECTOR_TO_CLASS (e.g. 'eui-alert' → EuiAlertComponent)\n * 2. Match element attributes against attribute selectors (e.g. [euiAutocomplete] → EuiAutocompleteComponent)\n */\nfunction collectTemplateRefs(nodes: TmplAstNode[], refMap: Map<string, string>): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.references !== undefined && node.references.length > 0) {\n const euiClass = resolveElementToEuiClass(node);\n if (euiClass) {\n for (const ref of node.references) {\n refMap.set(ref.name, euiClass);\n }\n }\n }\n collectTemplateRefs(node.children, refMap);\n }\n }\n}\n\n/**\n * Given a template element, resolves it to an EUI class name by checking:\n * 1. Tag name: <eui-alert> → look up 'eui-alert' in EUI_SELECTOR_TO_CLASS\n * 2. Attribute selectors: <input euiAutocomplete> → look up 'input[euiAutocomplete]' or '[euiAutocomplete]'\n */\nfunction resolveElementToEuiClass(element: TmplAstElement): string | null {\n const tag = element.name;\n\n // Direct tag match: eui-alert, eui-dialog, etc.\n if (EUI_SELECTOR_TO_CLASS[tag]) {\n return EUI_SELECTOR_TO_CLASS[tag];\n }\n\n // Attribute selector match: check all attributes against known patterns\n const allAttrNames = [\n ...element.attributes.map((a) => a.name),\n ...element.inputs.map((i) => i.name),\n ];\n\n for (const attrName of allAttrNames) {\n // Try tag[attr] pattern first (e.g. 'button[euiButton]', 'input[euiAutocomplete]')\n const tagAttrSelector = `${tag}[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[tagAttrSelector]) {\n return EUI_SELECTOR_TO_CLASS[tagAttrSelector];\n }\n\n // Try [attr] pattern (e.g. '[euiTooltip]', '[euiLoading]')\n const attrSelector = `[${attrName}]`;\n if (EUI_SELECTOR_TO_CLASS[attrSelector]) {\n return EUI_SELECTOR_TO_CLASS[attrSelector];\n }\n }\n\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Edit helpers\n// ---------------------------------------------------------------------------\n\nfunction applyEdits(source: string, edits: Edit[]): string {\n const unique = deduplicateEdits(edits);\n let result = source;\n for (const edit of unique.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n\nfunction deduplicateEdits(edits: Edit[]): Edit[] {\n const seen = new Map<string, Edit>();\n for (const edit of edits) {\n const key = `${edit.start}:${edit.end}`;\n seen.set(key, edit);\n }\n return Array.from(seen.values());\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n",
4915
4915
  "displayName": "Schema",
4916
4916
  "properties": [
4917
4917
  {
@@ -4923,7 +4923,7 @@
4923
4923
  "indexKey": "",
4924
4924
  "optional": true,
4925
4925
  "description": "",
4926
- "line": 460,
4926
+ "line": 19,
4927
4927
  "rawdescription": "\n"
4928
4928
  },
4929
4929
  {
@@ -4935,7 +4935,7 @@
4935
4935
  "indexKey": "",
4936
4936
  "optional": true,
4937
4937
  "description": "",
4938
- "line": 459,
4938
+ "line": 18,
4939
4939
  "rawdescription": "\n"
4940
4940
  }
4941
4941
  ],
@@ -24202,23 +24202,23 @@
24202
24202
  "name": "ATTRIBUTE",
24203
24203
  "ctype": "miscellaneous",
24204
24204
  "subtype": "variable",
24205
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
24205
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
24206
24206
  "coverageIgnore": false,
24207
24207
  "deprecated": false,
24208
24208
  "deprecationMessage": "",
24209
24209
  "type": "string",
24210
- "defaultValue": "'eclSiteFooter'"
24210
+ "defaultValue": "'eclTab'"
24211
24211
  },
24212
24212
  {
24213
24213
  "name": "ATTRIBUTE",
24214
24214
  "ctype": "miscellaneous",
24215
24215
  "subtype": "variable",
24216
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
24216
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
24217
24217
  "coverageIgnore": false,
24218
24218
  "deprecated": false,
24219
24219
  "deprecationMessage": "",
24220
24220
  "type": "string",
24221
- "defaultValue": "'eclTab'"
24221
+ "defaultValue": "'eclSiteFooter'"
24222
24222
  },
24223
24223
  {
24224
24224
  "name": "BASE_LOGGER_NAME_TOKEN",
@@ -24345,23 +24345,23 @@
24345
24345
  "name": "COMPONENT_TAG",
24346
24346
  "ctype": "miscellaneous",
24347
24347
  "subtype": "variable",
24348
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
24348
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
24349
24349
  "coverageIgnore": false,
24350
24350
  "deprecated": false,
24351
24351
  "deprecationMessage": "",
24352
24352
  "type": "string",
24353
- "defaultValue": "'eui-icon-svg'"
24353
+ "defaultValue": "'eui-icon-toggle'"
24354
24354
  },
24355
24355
  {
24356
24356
  "name": "COMPONENT_TAG",
24357
24357
  "ctype": "miscellaneous",
24358
24358
  "subtype": "variable",
24359
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
24359
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
24360
24360
  "coverageIgnore": false,
24361
24361
  "deprecated": false,
24362
24362
  "deprecationMessage": "",
24363
24363
  "type": "string",
24364
- "defaultValue": "'eui-icon-toggle'"
24364
+ "defaultValue": "'eui-icon-svg'"
24365
24365
  },
24366
24366
  {
24367
24367
  "name": "CONFIG_TOKEN",
@@ -25547,45 +25547,45 @@
25547
25547
  "name": "NEW_NAME",
25548
25548
  "ctype": "miscellaneous",
25549
25549
  "subtype": "variable",
25550
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
25550
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
25551
25551
  "coverageIgnore": false,
25552
25552
  "deprecated": false,
25553
25553
  "deprecationMessage": "",
25554
25554
  "type": "string",
25555
- "defaultValue": "'euiPrimary'"
25555
+ "defaultValue": "'euiCTAButton'"
25556
25556
  },
25557
25557
  {
25558
25558
  "name": "NEW_NAME",
25559
25559
  "ctype": "miscellaneous",
25560
25560
  "subtype": "variable",
25561
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
25561
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
25562
25562
  "coverageIgnore": false,
25563
25563
  "deprecated": false,
25564
25564
  "deprecationMessage": "",
25565
25565
  "type": "string",
25566
- "defaultValue": "'euiCTAButton'"
25566
+ "defaultValue": "'contentChange'"
25567
25567
  },
25568
25568
  {
25569
25569
  "name": "NEW_NAME",
25570
25570
  "ctype": "miscellaneous",
25571
25571
  "subtype": "variable",
25572
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
25572
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
25573
25573
  "coverageIgnore": false,
25574
25574
  "deprecated": false,
25575
25575
  "deprecationMessage": "",
25576
25576
  "type": "string",
25577
- "defaultValue": "'contentChange'"
25577
+ "defaultValue": "'iconSvgName'"
25578
25578
  },
25579
25579
  {
25580
25580
  "name": "NEW_NAME",
25581
25581
  "ctype": "miscellaneous",
25582
25582
  "subtype": "variable",
25583
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
25583
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
25584
25584
  "coverageIgnore": false,
25585
25585
  "deprecated": false,
25586
25586
  "deprecationMessage": "",
25587
25587
  "type": "string",
25588
- "defaultValue": "'iconSvgName'"
25588
+ "defaultValue": "'euiPrimary'"
25589
25589
  },
25590
25590
  {
25591
25591
  "name": "NEW_NAME",
@@ -25668,23 +25668,23 @@
25668
25668
  "name": "NEW_TAG",
25669
25669
  "ctype": "miscellaneous",
25670
25670
  "subtype": "variable",
25671
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
25671
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
25672
25672
  "coverageIgnore": false,
25673
25673
  "deprecated": false,
25674
25674
  "deprecationMessage": "",
25675
25675
  "type": "string",
25676
- "defaultValue": "'footer'"
25676
+ "defaultValue": "'div'"
25677
25677
  },
25678
25678
  {
25679
25679
  "name": "NEW_TAG",
25680
25680
  "ctype": "miscellaneous",
25681
25681
  "subtype": "variable",
25682
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
25682
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
25683
25683
  "coverageIgnore": false,
25684
25684
  "deprecated": false,
25685
25685
  "deprecationMessage": "",
25686
25686
  "type": "string",
25687
- "defaultValue": "'div'"
25687
+ "defaultValue": "'footer'"
25688
25688
  },
25689
25689
  {
25690
25690
  "name": "NEW_TAG",
@@ -25769,45 +25769,45 @@
25769
25769
  "name": "OLD_NAME",
25770
25770
  "ctype": "miscellaneous",
25771
25771
  "subtype": "variable",
25772
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
25772
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
25773
25773
  "coverageIgnore": false,
25774
25774
  "deprecated": false,
25775
25775
  "deprecationMessage": "",
25776
25776
  "type": "string",
25777
- "defaultValue": "'euiAccent'"
25777
+ "defaultValue": "'euiButtonCall'"
25778
25778
  },
25779
25779
  {
25780
25780
  "name": "OLD_NAME",
25781
25781
  "ctype": "miscellaneous",
25782
25782
  "subtype": "variable",
25783
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
25783
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
25784
25784
  "coverageIgnore": false,
25785
25785
  "deprecated": false,
25786
25786
  "deprecationMessage": "",
25787
25787
  "type": "string",
25788
- "defaultValue": "'euiButtonCall'"
25788
+ "defaultValue": "'onEditorChanged'"
25789
25789
  },
25790
25790
  {
25791
25791
  "name": "OLD_NAME",
25792
25792
  "ctype": "miscellaneous",
25793
25793
  "subtype": "variable",
25794
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
25794
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
25795
25795
  "coverageIgnore": false,
25796
25796
  "deprecated": false,
25797
25797
  "deprecationMessage": "",
25798
25798
  "type": "string",
25799
- "defaultValue": "'onEditorChanged'"
25799
+ "defaultValue": "'iconSvgType'"
25800
25800
  },
25801
25801
  {
25802
25802
  "name": "OLD_NAME",
25803
25803
  "ctype": "miscellaneous",
25804
25804
  "subtype": "variable",
25805
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
25805
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
25806
25806
  "coverageIgnore": false,
25807
25807
  "deprecated": false,
25808
25808
  "deprecationMessage": "",
25809
25809
  "type": "string",
25810
- "defaultValue": "'iconSvgType'"
25810
+ "defaultValue": "'euiAccent'"
25811
25811
  },
25812
25812
  {
25813
25813
  "name": "OLD_NAME",
@@ -25901,23 +25901,23 @@
25901
25901
  "name": "OLD_TAG",
25902
25902
  "ctype": "miscellaneous",
25903
25903
  "subtype": "variable",
25904
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
25904
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
25905
25905
  "coverageIgnore": false,
25906
25906
  "deprecated": false,
25907
25907
  "deprecationMessage": "",
25908
25908
  "type": "string",
25909
- "defaultValue": "'ecl-site-footer'"
25909
+ "defaultValue": "'ecl-tab'"
25910
25910
  },
25911
25911
  {
25912
25912
  "name": "OLD_TAG",
25913
25913
  "ctype": "miscellaneous",
25914
25914
  "subtype": "variable",
25915
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
25915
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
25916
25916
  "coverageIgnore": false,
25917
25917
  "deprecated": false,
25918
25918
  "deprecationMessage": "",
25919
25919
  "type": "string",
25920
- "defaultValue": "'ecl-tab'"
25920
+ "defaultValue": "'ecl-site-footer'"
25921
25921
  },
25922
25922
  {
25923
25923
  "name": "OLD_TAG",
@@ -27489,51 +27489,6 @@
27489
27489
  }
27490
27490
  ]
27491
27491
  },
27492
- {
27493
- "name": "applyEdits",
27494
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
27495
- "ctype": "miscellaneous",
27496
- "subtype": "function",
27497
- "coverageIgnore": false,
27498
- "deprecated": false,
27499
- "deprecationMessage": "",
27500
- "rawdescription": "",
27501
- "description": "",
27502
- "displayName": "applyEdits",
27503
- "args": [
27504
- {
27505
- "name": "source",
27506
- "type": "string",
27507
- "deprecated": false,
27508
- "deprecationMessage": ""
27509
- },
27510
- {
27511
- "name": "edits",
27512
- "deprecated": false,
27513
- "deprecationMessage": ""
27514
- }
27515
- ],
27516
- "returnType": "string",
27517
- "jsdoctags": [
27518
- {
27519
- "name": "source",
27520
- "type": "string",
27521
- "deprecated": false,
27522
- "deprecationMessage": "",
27523
- "tagName": {
27524
- "text": "param"
27525
- }
27526
- },
27527
- {
27528
- "name": "edits",
27529
- "deprecated": false,
27530
- "deprecationMessage": "",
27531
- "tagName": {
27532
- "text": "param"
27533
- }
27534
- }
27535
- ]
27536
- },
27537
27492
  {
27538
27493
  "name": "applyEdits",
27539
27494
  "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
@@ -27581,7 +27536,7 @@
27581
27536
  },
27582
27537
  {
27583
27538
  "name": "applyEdits",
27584
- "file": "packages/core/schematics/migrate-ecl-timeline/index.ts",
27539
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
27585
27540
  "ctype": "miscellaneous",
27586
27541
  "subtype": "function",
27587
27542
  "coverageIgnore": false,
@@ -27626,7 +27581,7 @@
27626
27581
  },
27627
27582
  {
27628
27583
  "name": "applyEdits",
27629
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
27584
+ "file": "packages/core/schematics/migrate-ecl-timeline/index.ts",
27630
27585
  "ctype": "miscellaneous",
27631
27586
  "subtype": "function",
27632
27587
  "coverageIgnore": false,
@@ -27896,7 +27851,7 @@
27896
27851
  },
27897
27852
  {
27898
27853
  "name": "applyEdits",
27899
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
27854
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
27900
27855
  "ctype": "miscellaneous",
27901
27856
  "subtype": "function",
27902
27857
  "coverageIgnore": false,
@@ -27984,6 +27939,51 @@
27984
27939
  }
27985
27940
  ]
27986
27941
  },
27942
+ {
27943
+ "name": "applyEdits",
27944
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
27945
+ "ctype": "miscellaneous",
27946
+ "subtype": "function",
27947
+ "coverageIgnore": false,
27948
+ "deprecated": false,
27949
+ "deprecationMessage": "",
27950
+ "rawdescription": "",
27951
+ "description": "",
27952
+ "displayName": "applyEdits",
27953
+ "args": [
27954
+ {
27955
+ "name": "source",
27956
+ "type": "string",
27957
+ "deprecated": false,
27958
+ "deprecationMessage": ""
27959
+ },
27960
+ {
27961
+ "name": "edits",
27962
+ "deprecated": false,
27963
+ "deprecationMessage": ""
27964
+ }
27965
+ ],
27966
+ "returnType": "string",
27967
+ "jsdoctags": [
27968
+ {
27969
+ "name": "source",
27970
+ "type": "string",
27971
+ "deprecated": false,
27972
+ "deprecationMessage": "",
27973
+ "tagName": {
27974
+ "text": "param"
27975
+ }
27976
+ },
27977
+ {
27978
+ "name": "edits",
27979
+ "deprecated": false,
27980
+ "deprecationMessage": "",
27981
+ "tagName": {
27982
+ "text": "param"
27983
+ }
27984
+ }
27985
+ ]
27986
+ },
27987
27987
  {
27988
27988
  "name": "applyEdits",
27989
27989
  "file": "packages/core/schematics/migrate-eui-progress-circle/index.ts",
@@ -29193,7 +29193,7 @@
29193
29193
  },
29194
29194
  {
29195
29195
  "name": "collectElementRename",
29196
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
29196
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
29197
29197
  "ctype": "miscellaneous",
29198
29198
  "subtype": "function",
29199
29199
  "coverageIgnore": false,
@@ -29238,7 +29238,7 @@
29238
29238
  },
29239
29239
  {
29240
29240
  "name": "collectElementRename",
29241
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
29241
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
29242
29242
  "ctype": "miscellaneous",
29243
29243
  "subtype": "function",
29244
29244
  "coverageIgnore": false,
@@ -30346,7 +30346,7 @@
30346
30346
  },
30347
30347
  {
30348
30348
  "name": "collectRenames",
30349
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
30349
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
30350
30350
  "ctype": "miscellaneous",
30351
30351
  "subtype": "function",
30352
30352
  "coverageIgnore": false,
@@ -30391,7 +30391,7 @@
30391
30391
  },
30392
30392
  {
30393
30393
  "name": "collectRenames",
30394
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
30394
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
30395
30395
  "ctype": "miscellaneous",
30396
30396
  "subtype": "function",
30397
30397
  "coverageIgnore": false,
@@ -30436,7 +30436,7 @@
30436
30436
  },
30437
30437
  {
30438
30438
  "name": "collectRenames",
30439
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
30439
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
30440
30440
  "ctype": "miscellaneous",
30441
30441
  "subtype": "function",
30442
30442
  "coverageIgnore": false,
@@ -30481,7 +30481,7 @@
30481
30481
  },
30482
30482
  {
30483
30483
  "name": "collectRenames",
30484
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
30484
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
30485
30485
  "ctype": "miscellaneous",
30486
30486
  "subtype": "function",
30487
30487
  "coverageIgnore": false,
@@ -30526,7 +30526,7 @@
30526
30526
  },
30527
30527
  {
30528
30528
  "name": "collectRenames",
30529
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30529
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30530
30530
  "ctype": "miscellaneous",
30531
30531
  "subtype": "function",
30532
30532
  "coverageIgnore": false,
@@ -30571,7 +30571,7 @@
30571
30571
  },
30572
30572
  {
30573
30573
  "name": "collectRenames",
30574
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30574
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30575
30575
  "ctype": "miscellaneous",
30576
30576
  "subtype": "function",
30577
30577
  "coverageIgnore": false,
@@ -31776,7 +31776,7 @@
31776
31776
  },
31777
31777
  {
31778
31778
  "name": "deduplicateEdits",
31779
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
31779
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
31780
31780
  "ctype": "miscellaneous",
31781
31781
  "subtype": "function",
31782
31782
  "coverageIgnore": false,
@@ -31806,7 +31806,7 @@
31806
31806
  },
31807
31807
  {
31808
31808
  "name": "deduplicateEdits",
31809
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
31809
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
31810
31810
  "ctype": "miscellaneous",
31811
31811
  "subtype": "function",
31812
31812
  "coverageIgnore": false,
@@ -35447,7 +35447,7 @@
35447
35447
  },
35448
35448
  {
35449
35449
  "name": "isComponentMetadataProperty",
35450
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
35450
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
35451
35451
  "ctype": "miscellaneous",
35452
35452
  "subtype": "function",
35453
35453
  "coverageIgnore": false,
@@ -35477,7 +35477,7 @@
35477
35477
  },
35478
35478
  {
35479
35479
  "name": "isComponentMetadataProperty",
35480
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
35480
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
35481
35481
  "ctype": "miscellaneous",
35482
35482
  "subtype": "function",
35483
35483
  "coverageIgnore": false,
@@ -35537,7 +35537,7 @@
35537
35537
  },
35538
35538
  {
35539
35539
  "name": "isComponentMetadataProperty",
35540
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
35540
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
35541
35541
  "ctype": "miscellaneous",
35542
35542
  "subtype": "function",
35543
35543
  "coverageIgnore": false,
@@ -35567,7 +35567,7 @@
35567
35567
  },
35568
35568
  {
35569
35569
  "name": "isComponentMetadataProperty",
35570
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
35570
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
35571
35571
  "ctype": "miscellaneous",
35572
35572
  "subtype": "function",
35573
35573
  "coverageIgnore": false,
@@ -35597,7 +35597,7 @@
35597
35597
  },
35598
35598
  {
35599
35599
  "name": "isComponentMetadataProperty",
35600
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
35600
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
35601
35601
  "ctype": "miscellaneous",
35602
35602
  "subtype": "function",
35603
35603
  "coverageIgnore": false,
@@ -35627,7 +35627,7 @@
35627
35627
  },
35628
35628
  {
35629
35629
  "name": "isComponentMetadataProperty",
35630
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
35630
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
35631
35631
  "ctype": "miscellaneous",
35632
35632
  "subtype": "function",
35633
35633
  "coverageIgnore": false,
@@ -35657,7 +35657,7 @@
35657
35657
  },
35658
35658
  {
35659
35659
  "name": "isComponentMetadataProperty",
35660
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
35660
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
35661
35661
  "ctype": "miscellaneous",
35662
35662
  "subtype": "function",
35663
35663
  "coverageIgnore": false,
@@ -35687,7 +35687,7 @@
35687
35687
  },
35688
35688
  {
35689
35689
  "name": "isComponentMetadataProperty",
35690
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
35690
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
35691
35691
  "ctype": "miscellaneous",
35692
35692
  "subtype": "function",
35693
35693
  "coverageIgnore": false,
@@ -35717,7 +35717,7 @@
35717
35717
  },
35718
35718
  {
35719
35719
  "name": "isComponentMetadataProperty",
35720
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
35720
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
35721
35721
  "ctype": "miscellaneous",
35722
35722
  "subtype": "function",
35723
35723
  "coverageIgnore": false,
@@ -36459,7 +36459,7 @@
36459
36459
  },
36460
36460
  {
36461
36461
  "name": "isTemplateProperty",
36462
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
36462
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
36463
36463
  "ctype": "miscellaneous",
36464
36464
  "subtype": "function",
36465
36465
  "coverageIgnore": false,
@@ -36489,7 +36489,7 @@
36489
36489
  },
36490
36490
  {
36491
36491
  "name": "isTemplateProperty",
36492
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
36492
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
36493
36493
  "ctype": "miscellaneous",
36494
36494
  "subtype": "function",
36495
36495
  "coverageIgnore": false,
@@ -36549,7 +36549,7 @@
36549
36549
  },
36550
36550
  {
36551
36551
  "name": "isTemplateProperty",
36552
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
36552
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
36553
36553
  "ctype": "miscellaneous",
36554
36554
  "subtype": "function",
36555
36555
  "coverageIgnore": false,
@@ -36579,7 +36579,7 @@
36579
36579
  },
36580
36580
  {
36581
36581
  "name": "isTemplateProperty",
36582
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
36582
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
36583
36583
  "ctype": "miscellaneous",
36584
36584
  "subtype": "function",
36585
36585
  "coverageIgnore": false,
@@ -36609,7 +36609,7 @@
36609
36609
  },
36610
36610
  {
36611
36611
  "name": "isTemplateProperty",
36612
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
36612
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
36613
36613
  "ctype": "miscellaneous",
36614
36614
  "subtype": "function",
36615
36615
  "coverageIgnore": false,
@@ -36639,7 +36639,7 @@
36639
36639
  },
36640
36640
  {
36641
36641
  "name": "isTemplateProperty",
36642
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
36642
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
36643
36643
  "ctype": "miscellaneous",
36644
36644
  "subtype": "function",
36645
36645
  "coverageIgnore": false,
@@ -36669,7 +36669,7 @@
36669
36669
  },
36670
36670
  {
36671
36671
  "name": "isTemplateProperty",
36672
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
36672
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
36673
36673
  "ctype": "miscellaneous",
36674
36674
  "subtype": "function",
36675
36675
  "coverageIgnore": false,
@@ -36699,7 +36699,7 @@
36699
36699
  },
36700
36700
  {
36701
36701
  "name": "isTemplateProperty",
36702
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
36702
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
36703
36703
  "ctype": "miscellaneous",
36704
36704
  "subtype": "function",
36705
36705
  "coverageIgnore": false,
@@ -36729,7 +36729,7 @@
36729
36729
  },
36730
36730
  {
36731
36731
  "name": "isTemplateProperty",
36732
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
36732
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
36733
36733
  "ctype": "miscellaneous",
36734
36734
  "subtype": "function",
36735
36735
  "coverageIgnore": false,
@@ -38992,7 +38992,7 @@
38992
38992
  },
38993
38993
  {
38994
38994
  "name": "migrateInlineTemplates",
38995
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
38995
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
38996
38996
  "ctype": "miscellaneous",
38997
38997
  "subtype": "function",
38998
38998
  "coverageIgnore": false,
@@ -39024,7 +39024,7 @@
39024
39024
  },
39025
39025
  {
39026
39026
  "name": "migrateInlineTemplates",
39027
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
39027
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
39028
39028
  "ctype": "miscellaneous",
39029
39029
  "subtype": "function",
39030
39030
  "coverageIgnore": false,
@@ -39056,7 +39056,7 @@
39056
39056
  },
39057
39057
  {
39058
39058
  "name": "migrateInlineTemplates",
39059
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
39059
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
39060
39060
  "ctype": "miscellaneous",
39061
39061
  "subtype": "function",
39062
39062
  "coverageIgnore": false,
@@ -39088,7 +39088,7 @@
39088
39088
  },
39089
39089
  {
39090
39090
  "name": "migrateInlineTemplates",
39091
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
39091
+ "file": "packages/core/schematics/migrate-eui-chip/index.ts",
39092
39092
  "ctype": "miscellaneous",
39093
39093
  "subtype": "function",
39094
39094
  "coverageIgnore": false,
@@ -39120,7 +39120,7 @@
39120
39120
  },
39121
39121
  {
39122
39122
  "name": "migrateInlineTemplates",
39123
- "file": "packages/core/schematics/migrate-eui-chip/index.ts",
39123
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
39124
39124
  "ctype": "miscellaneous",
39125
39125
  "subtype": "function",
39126
39126
  "coverageIgnore": false,
@@ -39152,7 +39152,7 @@
39152
39152
  },
39153
39153
  {
39154
39154
  "name": "migrateInlineTemplates",
39155
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
39155
+ "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
39156
39156
  "ctype": "miscellaneous",
39157
39157
  "subtype": "function",
39158
39158
  "coverageIgnore": false,
@@ -39184,7 +39184,7 @@
39184
39184
  },
39185
39185
  {
39186
39186
  "name": "migrateInlineTemplates",
39187
- "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
39187
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
39188
39188
  "ctype": "miscellaneous",
39189
39189
  "subtype": "function",
39190
39190
  "coverageIgnore": false,
@@ -39216,7 +39216,7 @@
39216
39216
  },
39217
39217
  {
39218
39218
  "name": "migrateInlineTemplates",
39219
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
39219
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
39220
39220
  "ctype": "miscellaneous",
39221
39221
  "subtype": "function",
39222
39222
  "coverageIgnore": false,
@@ -39248,7 +39248,7 @@
39248
39248
  },
39249
39249
  {
39250
39250
  "name": "migrateInlineTemplates",
39251
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
39251
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
39252
39252
  "ctype": "miscellaneous",
39253
39253
  "subtype": "function",
39254
39254
  "coverageIgnore": false,
@@ -39280,7 +39280,7 @@
39280
39280
  },
39281
39281
  {
39282
39282
  "name": "migrateInlineTemplates",
39283
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39283
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39284
39284
  "ctype": "miscellaneous",
39285
39285
  "subtype": "function",
39286
39286
  "coverageIgnore": false,
@@ -39312,7 +39312,7 @@
39312
39312
  },
39313
39313
  {
39314
39314
  "name": "migrateInlineTemplates",
39315
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39315
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39316
39316
  "ctype": "miscellaneous",
39317
39317
  "subtype": "function",
39318
39318
  "coverageIgnore": false,
@@ -39910,7 +39910,7 @@
39910
39910
  },
39911
39911
  {
39912
39912
  "name": "migrateTemplate",
39913
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
39913
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
39914
39914
  "ctype": "miscellaneous",
39915
39915
  "subtype": "function",
39916
39916
  "coverageIgnore": false,
@@ -39942,7 +39942,7 @@
39942
39942
  },
39943
39943
  {
39944
39944
  "name": "migrateTemplate",
39945
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
39945
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
39946
39946
  "ctype": "miscellaneous",
39947
39947
  "subtype": "function",
39948
39948
  "coverageIgnore": false,
@@ -40006,7 +40006,7 @@
40006
40006
  },
40007
40007
  {
40008
40008
  "name": "migrateTemplate",
40009
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
40009
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
40010
40010
  "ctype": "miscellaneous",
40011
40011
  "subtype": "function",
40012
40012
  "coverageIgnore": false,
@@ -40038,7 +40038,7 @@
40038
40038
  },
40039
40039
  {
40040
40040
  "name": "migrateTemplate",
40041
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
40041
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
40042
40042
  "ctype": "miscellaneous",
40043
40043
  "subtype": "function",
40044
40044
  "coverageIgnore": false,
@@ -40070,7 +40070,7 @@
40070
40070
  },
40071
40071
  {
40072
40072
  "name": "migrateTemplate",
40073
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
40073
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
40074
40074
  "ctype": "miscellaneous",
40075
40075
  "subtype": "function",
40076
40076
  "coverageIgnore": false,
@@ -40102,7 +40102,7 @@
40102
40102
  },
40103
40103
  {
40104
40104
  "name": "migrateTemplate",
40105
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
40105
+ "file": "packages/core/schematics/migrate-eui-chip/index.ts",
40106
40106
  "ctype": "miscellaneous",
40107
40107
  "subtype": "function",
40108
40108
  "coverageIgnore": false,
@@ -40134,7 +40134,7 @@
40134
40134
  },
40135
40135
  {
40136
40136
  "name": "migrateTemplate",
40137
- "file": "packages/core/schematics/migrate-eui-chip/index.ts",
40137
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
40138
40138
  "ctype": "miscellaneous",
40139
40139
  "subtype": "function",
40140
40140
  "coverageIgnore": false,
@@ -40166,7 +40166,7 @@
40166
40166
  },
40167
40167
  {
40168
40168
  "name": "migrateTemplate",
40169
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
40169
+ "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
40170
40170
  "ctype": "miscellaneous",
40171
40171
  "subtype": "function",
40172
40172
  "coverageIgnore": false,
@@ -40198,7 +40198,7 @@
40198
40198
  },
40199
40199
  {
40200
40200
  "name": "migrateTemplate",
40201
- "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
40201
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
40202
40202
  "ctype": "miscellaneous",
40203
40203
  "subtype": "function",
40204
40204
  "coverageIgnore": false,
@@ -40230,7 +40230,7 @@
40230
40230
  },
40231
40231
  {
40232
40232
  "name": "migrateTemplate",
40233
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
40233
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
40234
40234
  "ctype": "miscellaneous",
40235
40235
  "subtype": "function",
40236
40236
  "coverageIgnore": false,
@@ -40262,7 +40262,7 @@
40262
40262
  },
40263
40263
  {
40264
40264
  "name": "migrateTemplate",
40265
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
40265
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
40266
40266
  "ctype": "miscellaneous",
40267
40267
  "subtype": "function",
40268
40268
  "coverageIgnore": false,
@@ -40294,7 +40294,7 @@
40294
40294
  },
40295
40295
  {
40296
40296
  "name": "migrateTemplate",
40297
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
40297
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
40298
40298
  "ctype": "miscellaneous",
40299
40299
  "subtype": "function",
40300
40300
  "coverageIgnore": false,
@@ -40326,7 +40326,7 @@
40326
40326
  },
40327
40327
  {
40328
40328
  "name": "migrateTemplate",
40329
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
40329
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
40330
40330
  "ctype": "miscellaneous",
40331
40331
  "subtype": "function",
40332
40332
  "coverageIgnore": false,
@@ -41206,7 +41206,7 @@
41206
41206
  },
41207
41207
  {
41208
41208
  "name": "migrateTypeScript",
41209
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
41209
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
41210
41210
  "ctype": "miscellaneous",
41211
41211
  "subtype": "function",
41212
41212
  "coverageIgnore": false,
@@ -41253,7 +41253,7 @@
41253
41253
  },
41254
41254
  {
41255
41255
  "name": "migrateTypeScript",
41256
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
41256
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
41257
41257
  "ctype": "miscellaneous",
41258
41258
  "subtype": "function",
41259
41259
  "coverageIgnore": false,
@@ -42576,7 +42576,7 @@
42576
42576
  },
42577
42577
  {
42578
42578
  "name": "renameTsPropertyAccesses",
42579
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
42579
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
42580
42580
  "ctype": "miscellaneous",
42581
42581
  "subtype": "function",
42582
42582
  "coverageIgnore": false,
@@ -42608,7 +42608,7 @@
42608
42608
  },
42609
42609
  {
42610
42610
  "name": "renameTsPropertyAccesses",
42611
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
42611
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
42612
42612
  "ctype": "miscellaneous",
42613
42613
  "subtype": "function",
42614
42614
  "coverageIgnore": false,
@@ -44352,7 +44352,7 @@
44352
44352
  },
44353
44353
  {
44354
44354
  "name": "unwrapExpression",
44355
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
44355
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
44356
44356
  "ctype": "miscellaneous",
44357
44357
  "subtype": "function",
44358
44358
  "coverageIgnore": false,
@@ -44382,7 +44382,7 @@
44382
44382
  },
44383
44383
  {
44384
44384
  "name": "unwrapExpression",
44385
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
44385
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
44386
44386
  "ctype": "miscellaneous",
44387
44387
  "subtype": "function",
44388
44388
  "coverageIgnore": false,
@@ -44442,7 +44442,7 @@
44442
44442
  },
44443
44443
  {
44444
44444
  "name": "unwrapExpression",
44445
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44445
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
44446
44446
  "ctype": "miscellaneous",
44447
44447
  "subtype": "function",
44448
44448
  "coverageIgnore": false,
@@ -44472,7 +44472,7 @@
44472
44472
  },
44473
44473
  {
44474
44474
  "name": "unwrapExpression",
44475
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44475
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
44476
44476
  "ctype": "miscellaneous",
44477
44477
  "subtype": "function",
44478
44478
  "coverageIgnore": false,
@@ -44502,7 +44502,7 @@
44502
44502
  },
44503
44503
  {
44504
44504
  "name": "unwrapExpression",
44505
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
44505
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
44506
44506
  "ctype": "miscellaneous",
44507
44507
  "subtype": "function",
44508
44508
  "coverageIgnore": false,
@@ -44532,7 +44532,7 @@
44532
44532
  },
44533
44533
  {
44534
44534
  "name": "unwrapExpression",
44535
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
44535
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
44536
44536
  "ctype": "miscellaneous",
44537
44537
  "subtype": "function",
44538
44538
  "coverageIgnore": false,
@@ -44562,7 +44562,7 @@
44562
44562
  },
44563
44563
  {
44564
44564
  "name": "unwrapExpression",
44565
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
44565
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44566
44566
  "ctype": "miscellaneous",
44567
44567
  "subtype": "function",
44568
44568
  "coverageIgnore": false,
@@ -44592,7 +44592,7 @@
44592
44592
  },
44593
44593
  {
44594
44594
  "name": "unwrapExpression",
44595
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
44595
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
44596
44596
  "ctype": "miscellaneous",
44597
44597
  "subtype": "function",
44598
44598
  "coverageIgnore": false,
@@ -44622,7 +44622,7 @@
44622
44622
  },
44623
44623
  {
44624
44624
  "name": "unwrapExpression",
44625
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
44625
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
44626
44626
  "ctype": "miscellaneous",
44627
44627
  "subtype": "function",
44628
44628
  "coverageIgnore": false,
@@ -45567,7 +45567,7 @@
45567
45567
  },
45568
45568
  {
45569
45569
  "name": "visitDir",
45570
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
45570
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
45571
45571
  "ctype": "miscellaneous",
45572
45572
  "subtype": "function",
45573
45573
  "coverageIgnore": false,
@@ -45612,7 +45612,7 @@
45612
45612
  },
45613
45613
  {
45614
45614
  "name": "visitDir",
45615
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
45615
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
45616
45616
  "ctype": "miscellaneous",
45617
45617
  "subtype": "function",
45618
45618
  "coverageIgnore": false,
@@ -45702,7 +45702,7 @@
45702
45702
  },
45703
45703
  {
45704
45704
  "name": "visitDir",
45705
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45705
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
45706
45706
  "ctype": "miscellaneous",
45707
45707
  "subtype": "function",
45708
45708
  "coverageIgnore": false,
@@ -45747,7 +45747,7 @@
45747
45747
  },
45748
45748
  {
45749
45749
  "name": "visitDir",
45750
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
45750
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
45751
45751
  "ctype": "miscellaneous",
45752
45752
  "subtype": "function",
45753
45753
  "coverageIgnore": false,
@@ -45792,7 +45792,7 @@
45792
45792
  },
45793
45793
  {
45794
45794
  "name": "visitDir",
45795
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
45795
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45796
45796
  "ctype": "miscellaneous",
45797
45797
  "subtype": "function",
45798
45798
  "coverageIgnore": false,
@@ -45837,7 +45837,7 @@
45837
45837
  },
45838
45838
  {
45839
45839
  "name": "visitDir",
45840
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
45840
+ "file": "packages/core/schematics/migrate-eui-chip/index.ts",
45841
45841
  "ctype": "miscellaneous",
45842
45842
  "subtype": "function",
45843
45843
  "coverageIgnore": false,
@@ -45882,7 +45882,7 @@
45882
45882
  },
45883
45883
  {
45884
45884
  "name": "visitDir",
45885
- "file": "packages/core/schematics/migrate-eui-chip/index.ts",
45885
+ "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
45886
45886
  "ctype": "miscellaneous",
45887
45887
  "subtype": "function",
45888
45888
  "coverageIgnore": false,
@@ -45927,7 +45927,7 @@
45927
45927
  },
45928
45928
  {
45929
45929
  "name": "visitDir",
45930
- "file": "packages/core/schematics/migrate-eui-chip-list/index.ts",
45930
+ "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
45931
45931
  "ctype": "miscellaneous",
45932
45932
  "subtype": "function",
45933
45933
  "coverageIgnore": false,
@@ -45972,7 +45972,7 @@
45972
45972
  },
45973
45973
  {
45974
45974
  "name": "visitDir",
45975
- "file": "packages/core/schematics/migrate-eui-discussion-thread/index.ts",
45975
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
45976
45976
  "ctype": "miscellaneous",
45977
45977
  "subtype": "function",
45978
45978
  "coverageIgnore": false,
@@ -46017,7 +46017,7 @@
46017
46017
  },
46018
46018
  {
46019
46019
  "name": "visitDir",
46020
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
46020
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
46021
46021
  "ctype": "miscellaneous",
46022
46022
  "subtype": "function",
46023
46023
  "coverageIgnore": false,
@@ -46062,7 +46062,7 @@
46062
46062
  },
46063
46063
  {
46064
46064
  "name": "visitDir",
46065
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
46065
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
46066
46066
  "ctype": "miscellaneous",
46067
46067
  "subtype": "function",
46068
46068
  "coverageIgnore": false,
@@ -46107,7 +46107,7 @@
46107
46107
  },
46108
46108
  {
46109
46109
  "name": "visitDir",
46110
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46110
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46111
46111
  "ctype": "miscellaneous",
46112
46112
  "subtype": "function",
46113
46113
  "coverageIgnore": false,
@@ -46152,7 +46152,7 @@
46152
46152
  },
46153
46153
  {
46154
46154
  "name": "visitDir",
46155
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46155
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46156
46156
  "ctype": "miscellaneous",
46157
46157
  "subtype": "function",
46158
46158
  "coverageIgnore": false,
@@ -46422,7 +46422,7 @@
46422
46422
  },
46423
46423
  {
46424
46424
  "name": "visitDir",
46425
- "file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
46425
+ "file": "packages/core/schematics/migrate-to-standalone/index.ts",
46426
46426
  "ctype": "miscellaneous",
46427
46427
  "subtype": "function",
46428
46428
  "coverageIgnore": false,
@@ -46467,7 +46467,7 @@
46467
46467
  },
46468
46468
  {
46469
46469
  "name": "visitDir",
46470
- "file": "packages/core/schematics/migrate-to-signals/index.ts",
46470
+ "file": "packages/core/schematics/migrate-eui-tooltip/index.ts",
46471
46471
  "ctype": "miscellaneous",
46472
46472
  "subtype": "function",
46473
46473
  "coverageIgnore": false,
@@ -46512,7 +46512,7 @@
46512
46512
  },
46513
46513
  {
46514
46514
  "name": "visitDir",
46515
- "file": "packages/core/schematics/migrate-to-standalone/index.ts",
46515
+ "file": "packages/core/schematics/migrate-to-signals/index.ts",
46516
46516
  "ctype": "miscellaneous",
46517
46517
  "subtype": "function",
46518
46518
  "coverageIgnore": false,
@@ -47137,49 +47137,6 @@
47137
47137
  }
47138
47138
  ]
47139
47139
  },
47140
- {
47141
- "name": "visitNodes",
47142
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
47143
- "ctype": "miscellaneous",
47144
- "subtype": "function",
47145
- "coverageIgnore": false,
47146
- "deprecated": false,
47147
- "deprecationMessage": "",
47148
- "rawdescription": "",
47149
- "description": "",
47150
- "displayName": "visitNodes",
47151
- "args": [
47152
- {
47153
- "name": "nodes",
47154
- "deprecated": false,
47155
- "deprecationMessage": ""
47156
- },
47157
- {
47158
- "name": "edits",
47159
- "deprecated": false,
47160
- "deprecationMessage": ""
47161
- }
47162
- ],
47163
- "returnType": "void",
47164
- "jsdoctags": [
47165
- {
47166
- "name": "nodes",
47167
- "deprecated": false,
47168
- "deprecationMessage": "",
47169
- "tagName": {
47170
- "text": "param"
47171
- }
47172
- },
47173
- {
47174
- "name": "edits",
47175
- "deprecated": false,
47176
- "deprecationMessage": "",
47177
- "tagName": {
47178
- "text": "param"
47179
- }
47180
- }
47181
- ]
47182
- },
47183
47140
  {
47184
47141
  "name": "visitNodes",
47185
47142
  "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
@@ -47225,7 +47182,7 @@
47225
47182
  },
47226
47183
  {
47227
47184
  "name": "visitNodes",
47228
- "file": "packages/core/schematics/migrate-ecl-timeline/index.ts",
47185
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
47229
47186
  "ctype": "miscellaneous",
47230
47187
  "subtype": "function",
47231
47188
  "coverageIgnore": false,
@@ -47268,7 +47225,7 @@
47268
47225
  },
47269
47226
  {
47270
47227
  "name": "visitNodes",
47271
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
47228
+ "file": "packages/core/schematics/migrate-ecl-timeline/index.ts",
47272
47229
  "ctype": "miscellaneous",
47273
47230
  "subtype": "function",
47274
47231
  "coverageIgnore": false,
@@ -47685,7 +47642,7 @@
47685
47642
  },
47686
47643
  {
47687
47644
  "name": "visitNodes",
47688
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47645
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
47689
47646
  "ctype": "miscellaneous",
47690
47647
  "subtype": "function",
47691
47648
  "coverageIgnore": false,
@@ -47769,6 +47726,49 @@
47769
47726
  }
47770
47727
  ]
47771
47728
  },
47729
+ {
47730
+ "name": "visitNodes",
47731
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47732
+ "ctype": "miscellaneous",
47733
+ "subtype": "function",
47734
+ "coverageIgnore": false,
47735
+ "deprecated": false,
47736
+ "deprecationMessage": "",
47737
+ "rawdescription": "",
47738
+ "description": "",
47739
+ "displayName": "visitNodes",
47740
+ "args": [
47741
+ {
47742
+ "name": "nodes",
47743
+ "deprecated": false,
47744
+ "deprecationMessage": ""
47745
+ },
47746
+ {
47747
+ "name": "edits",
47748
+ "deprecated": false,
47749
+ "deprecationMessage": ""
47750
+ }
47751
+ ],
47752
+ "returnType": "void",
47753
+ "jsdoctags": [
47754
+ {
47755
+ "name": "nodes",
47756
+ "deprecated": false,
47757
+ "deprecationMessage": "",
47758
+ "tagName": {
47759
+ "text": "param"
47760
+ }
47761
+ },
47762
+ {
47763
+ "name": "edits",
47764
+ "deprecated": false,
47765
+ "deprecationMessage": "",
47766
+ "tagName": {
47767
+ "text": "param"
47768
+ }
47769
+ }
47770
+ ]
47771
+ },
47772
47772
  {
47773
47773
  "name": "visitNodes",
47774
47774
  "file": "packages/core/schematics/migrate-eui-popover/index.ts",
@@ -49566,74 +49566,74 @@
49566
49566
  "defaultValue": "'ecl-pagination-item'"
49567
49567
  }
49568
49568
  ],
49569
- "packages/core/schematics/migrate-ecl-site-footer/index.ts": [
49569
+ "packages/core/schematics/migrate-ecl-tabs/index.ts": [
49570
49570
  {
49571
49571
  "name": "ATTRIBUTE",
49572
49572
  "ctype": "miscellaneous",
49573
49573
  "subtype": "variable",
49574
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49574
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49575
49575
  "coverageIgnore": false,
49576
49576
  "deprecated": false,
49577
49577
  "deprecationMessage": "",
49578
49578
  "type": "string",
49579
- "defaultValue": "'eclSiteFooter'"
49579
+ "defaultValue": "'eclTab'"
49580
49580
  },
49581
49581
  {
49582
49582
  "name": "NEW_TAG",
49583
49583
  "ctype": "miscellaneous",
49584
49584
  "subtype": "variable",
49585
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49585
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49586
49586
  "coverageIgnore": false,
49587
49587
  "deprecated": false,
49588
49588
  "deprecationMessage": "",
49589
49589
  "type": "string",
49590
- "defaultValue": "'footer'"
49590
+ "defaultValue": "'div'"
49591
49591
  },
49592
49592
  {
49593
49593
  "name": "OLD_TAG",
49594
49594
  "ctype": "miscellaneous",
49595
49595
  "subtype": "variable",
49596
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49596
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49597
49597
  "coverageIgnore": false,
49598
49598
  "deprecated": false,
49599
49599
  "deprecationMessage": "",
49600
49600
  "type": "string",
49601
- "defaultValue": "'ecl-site-footer'"
49601
+ "defaultValue": "'ecl-tab'"
49602
49602
  }
49603
49603
  ],
49604
- "packages/core/schematics/migrate-ecl-tabs/index.ts": [
49604
+ "packages/core/schematics/migrate-ecl-site-footer/index.ts": [
49605
49605
  {
49606
49606
  "name": "ATTRIBUTE",
49607
49607
  "ctype": "miscellaneous",
49608
49608
  "subtype": "variable",
49609
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49609
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49610
49610
  "coverageIgnore": false,
49611
49611
  "deprecated": false,
49612
49612
  "deprecationMessage": "",
49613
49613
  "type": "string",
49614
- "defaultValue": "'eclTab'"
49614
+ "defaultValue": "'eclSiteFooter'"
49615
49615
  },
49616
49616
  {
49617
49617
  "name": "NEW_TAG",
49618
49618
  "ctype": "miscellaneous",
49619
49619
  "subtype": "variable",
49620
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49620
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49621
49621
  "coverageIgnore": false,
49622
49622
  "deprecated": false,
49623
49623
  "deprecationMessage": "",
49624
49624
  "type": "string",
49625
- "defaultValue": "'div'"
49625
+ "defaultValue": "'footer'"
49626
49626
  },
49627
49627
  {
49628
49628
  "name": "OLD_TAG",
49629
49629
  "ctype": "miscellaneous",
49630
49630
  "subtype": "variable",
49631
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
49631
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
49632
49632
  "coverageIgnore": false,
49633
49633
  "deprecated": false,
49634
49634
  "deprecationMessage": "",
49635
49635
  "type": "string",
49636
- "defaultValue": "'ecl-tab'"
49636
+ "defaultValue": "'ecl-site-footer'"
49637
49637
  }
49638
49638
  ],
49639
49639
  "packages/core/src/lib/services/log/log.service.ts": [
@@ -50091,74 +50091,74 @@
50091
50091
  "defaultValue": "'iconSvgType'"
50092
50092
  }
50093
50093
  ],
50094
- "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
50094
+ "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
50095
50095
  {
50096
50096
  "name": "COMPONENT_TAG",
50097
50097
  "ctype": "miscellaneous",
50098
50098
  "subtype": "variable",
50099
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50099
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50100
50100
  "coverageIgnore": false,
50101
50101
  "deprecated": false,
50102
50102
  "deprecationMessage": "",
50103
50103
  "type": "string",
50104
- "defaultValue": "'eui-icon-svg'"
50104
+ "defaultValue": "'eui-icon-toggle'"
50105
50105
  },
50106
50106
  {
50107
- "name": "INPUT_RENAMES",
50107
+ "name": "NEW_NAME",
50108
50108
  "ctype": "miscellaneous",
50109
50109
  "subtype": "variable",
50110
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50110
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50111
50111
  "coverageIgnore": false,
50112
50112
  "deprecated": false,
50113
50113
  "deprecationMessage": "",
50114
- "type": "unknown",
50115
- "defaultValue": "new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n])"
50114
+ "type": "string",
50115
+ "defaultValue": "'iconSvgName'"
50116
50116
  },
50117
50117
  {
50118
- "name": "TS_PROPERTY_RENAMES",
50118
+ "name": "OLD_NAME",
50119
50119
  "ctype": "miscellaneous",
50120
50120
  "subtype": "variable",
50121
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50121
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50122
50122
  "coverageIgnore": false,
50123
50123
  "deprecated": false,
50124
50124
  "deprecationMessage": "",
50125
- "type": "unknown",
50126
- "defaultValue": "new Map([\n ['variant', 'fillColor'],\n])"
50125
+ "type": "string",
50126
+ "defaultValue": "'iconSet'"
50127
50127
  }
50128
50128
  ],
50129
- "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
50129
+ "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
50130
50130
  {
50131
50131
  "name": "COMPONENT_TAG",
50132
50132
  "ctype": "miscellaneous",
50133
50133
  "subtype": "variable",
50134
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50134
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50135
50135
  "coverageIgnore": false,
50136
50136
  "deprecated": false,
50137
50137
  "deprecationMessage": "",
50138
50138
  "type": "string",
50139
- "defaultValue": "'eui-icon-toggle'"
50139
+ "defaultValue": "'eui-icon-svg'"
50140
50140
  },
50141
50141
  {
50142
- "name": "NEW_NAME",
50142
+ "name": "INPUT_RENAMES",
50143
50143
  "ctype": "miscellaneous",
50144
50144
  "subtype": "variable",
50145
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50145
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50146
50146
  "coverageIgnore": false,
50147
50147
  "deprecated": false,
50148
50148
  "deprecationMessage": "",
50149
- "type": "string",
50150
- "defaultValue": "'iconSvgName'"
50149
+ "type": "unknown",
50150
+ "defaultValue": "new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n])"
50151
50151
  },
50152
50152
  {
50153
- "name": "OLD_NAME",
50153
+ "name": "TS_PROPERTY_RENAMES",
50154
50154
  "ctype": "miscellaneous",
50155
50155
  "subtype": "variable",
50156
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
50156
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
50157
50157
  "coverageIgnore": false,
50158
50158
  "deprecated": false,
50159
50159
  "deprecationMessage": "",
50160
- "type": "string",
50161
- "defaultValue": "'iconSet'"
50160
+ "type": "unknown",
50161
+ "defaultValue": "new Map([\n ['variant', 'fillColor'],\n])"
50162
50162
  }
50163
50163
  ],
50164
50164
  "packages/core/src/lib/helpers/event-helpers.ts": [
@@ -62220,10 +62220,10 @@
62220
62220
  ]
62221
62221
  }
62222
62222
  ],
62223
- "packages/core/schematics/migrate-ecl-site-footer/index.ts": [
62223
+ "packages/core/schematics/migrate-ecl-tabs/index.ts": [
62224
62224
  {
62225
62225
  "name": "applyEdits",
62226
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62226
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62227
62227
  "ctype": "miscellaneous",
62228
62228
  "subtype": "function",
62229
62229
  "coverageIgnore": false,
@@ -62268,7 +62268,7 @@
62268
62268
  },
62269
62269
  {
62270
62270
  "name": "collectElementRename",
62271
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62271
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62272
62272
  "ctype": "miscellaneous",
62273
62273
  "subtype": "function",
62274
62274
  "coverageIgnore": false,
@@ -62313,7 +62313,7 @@
62313
62313
  },
62314
62314
  {
62315
62315
  "name": "deduplicateEdits",
62316
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62316
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62317
62317
  "ctype": "miscellaneous",
62318
62318
  "subtype": "function",
62319
62319
  "coverageIgnore": false,
@@ -62343,7 +62343,7 @@
62343
62343
  },
62344
62344
  {
62345
62345
  "name": "isComponentMetadataProperty",
62346
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62346
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62347
62347
  "ctype": "miscellaneous",
62348
62348
  "subtype": "function",
62349
62349
  "coverageIgnore": false,
@@ -62373,7 +62373,7 @@
62373
62373
  },
62374
62374
  {
62375
62375
  "name": "isTemplateProperty",
62376
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62376
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62377
62377
  "ctype": "miscellaneous",
62378
62378
  "subtype": "function",
62379
62379
  "coverageIgnore": false,
@@ -62402,8 +62402,8 @@
62402
62402
  ]
62403
62403
  },
62404
62404
  {
62405
- "name": "migrateEclSiteFooter",
62406
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62405
+ "name": "migrateEclTabs",
62406
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62407
62407
  "ctype": "miscellaneous",
62408
62408
  "subtype": "function",
62409
62409
  "coverageIgnore": false,
@@ -62411,7 +62411,7 @@
62411
62411
  "deprecationMessage": "",
62412
62412
  "rawdescription": "",
62413
62413
  "description": "",
62414
- "displayName": "migrateEclSiteFooter",
62414
+ "displayName": "migrateEclTabs",
62415
62415
  "args": [
62416
62416
  {
62417
62417
  "name": "options",
@@ -62437,7 +62437,7 @@
62437
62437
  },
62438
62438
  {
62439
62439
  "name": "migrateTemplate",
62440
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62440
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62441
62441
  "ctype": "miscellaneous",
62442
62442
  "subtype": "function",
62443
62443
  "coverageIgnore": false,
@@ -62469,7 +62469,7 @@
62469
62469
  },
62470
62470
  {
62471
62471
  "name": "migrateTypeScript",
62472
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62472
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62473
62473
  "ctype": "miscellaneous",
62474
62474
  "subtype": "function",
62475
62475
  "coverageIgnore": false,
@@ -62516,7 +62516,7 @@
62516
62516
  },
62517
62517
  {
62518
62518
  "name": "unwrapExpression",
62519
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62519
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62520
62520
  "ctype": "miscellaneous",
62521
62521
  "subtype": "function",
62522
62522
  "coverageIgnore": false,
@@ -62546,7 +62546,7 @@
62546
62546
  },
62547
62547
  {
62548
62548
  "name": "visitDir",
62549
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62549
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62550
62550
  "ctype": "miscellaneous",
62551
62551
  "subtype": "function",
62552
62552
  "coverageIgnore": false,
@@ -62591,7 +62591,7 @@
62591
62591
  },
62592
62592
  {
62593
62593
  "name": "visitNodes",
62594
- "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62594
+ "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62595
62595
  "ctype": "miscellaneous",
62596
62596
  "subtype": "function",
62597
62597
  "coverageIgnore": false,
@@ -62633,10 +62633,10 @@
62633
62633
  ]
62634
62634
  }
62635
62635
  ],
62636
- "packages/core/schematics/migrate-ecl-tabs/index.ts": [
62636
+ "packages/core/schematics/migrate-ecl-site-footer/index.ts": [
62637
62637
  {
62638
62638
  "name": "applyEdits",
62639
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62639
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62640
62640
  "ctype": "miscellaneous",
62641
62641
  "subtype": "function",
62642
62642
  "coverageIgnore": false,
@@ -62681,7 +62681,7 @@
62681
62681
  },
62682
62682
  {
62683
62683
  "name": "collectElementRename",
62684
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62684
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62685
62685
  "ctype": "miscellaneous",
62686
62686
  "subtype": "function",
62687
62687
  "coverageIgnore": false,
@@ -62726,7 +62726,7 @@
62726
62726
  },
62727
62727
  {
62728
62728
  "name": "deduplicateEdits",
62729
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62729
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62730
62730
  "ctype": "miscellaneous",
62731
62731
  "subtype": "function",
62732
62732
  "coverageIgnore": false,
@@ -62756,7 +62756,7 @@
62756
62756
  },
62757
62757
  {
62758
62758
  "name": "isComponentMetadataProperty",
62759
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62759
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62760
62760
  "ctype": "miscellaneous",
62761
62761
  "subtype": "function",
62762
62762
  "coverageIgnore": false,
@@ -62786,7 +62786,7 @@
62786
62786
  },
62787
62787
  {
62788
62788
  "name": "isTemplateProperty",
62789
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62789
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62790
62790
  "ctype": "miscellaneous",
62791
62791
  "subtype": "function",
62792
62792
  "coverageIgnore": false,
@@ -62815,8 +62815,8 @@
62815
62815
  ]
62816
62816
  },
62817
62817
  {
62818
- "name": "migrateEclTabs",
62819
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62818
+ "name": "migrateEclSiteFooter",
62819
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62820
62820
  "ctype": "miscellaneous",
62821
62821
  "subtype": "function",
62822
62822
  "coverageIgnore": false,
@@ -62824,7 +62824,7 @@
62824
62824
  "deprecationMessage": "",
62825
62825
  "rawdescription": "",
62826
62826
  "description": "",
62827
- "displayName": "migrateEclTabs",
62827
+ "displayName": "migrateEclSiteFooter",
62828
62828
  "args": [
62829
62829
  {
62830
62830
  "name": "options",
@@ -62850,7 +62850,7 @@
62850
62850
  },
62851
62851
  {
62852
62852
  "name": "migrateTemplate",
62853
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62853
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62854
62854
  "ctype": "miscellaneous",
62855
62855
  "subtype": "function",
62856
62856
  "coverageIgnore": false,
@@ -62882,7 +62882,7 @@
62882
62882
  },
62883
62883
  {
62884
62884
  "name": "migrateTypeScript",
62885
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62885
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62886
62886
  "ctype": "miscellaneous",
62887
62887
  "subtype": "function",
62888
62888
  "coverageIgnore": false,
@@ -62929,7 +62929,7 @@
62929
62929
  },
62930
62930
  {
62931
62931
  "name": "unwrapExpression",
62932
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62932
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62933
62933
  "ctype": "miscellaneous",
62934
62934
  "subtype": "function",
62935
62935
  "coverageIgnore": false,
@@ -62959,7 +62959,7 @@
62959
62959
  },
62960
62960
  {
62961
62961
  "name": "visitDir",
62962
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
62962
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
62963
62963
  "ctype": "miscellaneous",
62964
62964
  "subtype": "function",
62965
62965
  "coverageIgnore": false,
@@ -63004,7 +63004,7 @@
63004
63004
  },
63005
63005
  {
63006
63006
  "name": "visitNodes",
63007
- "file": "packages/core/schematics/migrate-ecl-tabs/index.ts",
63007
+ "file": "packages/core/schematics/migrate-ecl-site-footer/index.ts",
63008
63008
  "ctype": "miscellaneous",
63009
63009
  "subtype": "function",
63010
63010
  "coverageIgnore": false,
@@ -63474,10 +63474,10 @@
63474
63474
  ]
63475
63475
  }
63476
63476
  ],
63477
- "packages/core/schematics/migrate-eui-accent/index.ts": [
63477
+ "packages/core/schematics/migrate-eui-button/index.ts": [
63478
63478
  {
63479
63479
  "name": "applyEdits",
63480
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63480
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63481
63481
  "ctype": "miscellaneous",
63482
63482
  "subtype": "function",
63483
63483
  "coverageIgnore": false,
@@ -63522,7 +63522,7 @@
63522
63522
  },
63523
63523
  {
63524
63524
  "name": "collectRenames",
63525
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63525
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63526
63526
  "ctype": "miscellaneous",
63527
63527
  "subtype": "function",
63528
63528
  "coverageIgnore": false,
@@ -63566,8 +63566,8 @@
63566
63566
  ]
63567
63567
  },
63568
63568
  {
63569
- "name": "isComponentMetadataProperty",
63570
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63569
+ "name": "hasEuiButtonAttribute",
63570
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63571
63571
  "ctype": "miscellaneous",
63572
63572
  "subtype": "function",
63573
63573
  "coverageIgnore": false,
@@ -63575,10 +63575,11 @@
63575
63575
  "deprecationMessage": "",
63576
63576
  "rawdescription": "",
63577
63577
  "description": "",
63578
- "displayName": "isComponentMetadataProperty",
63578
+ "displayName": "hasEuiButtonAttribute",
63579
63579
  "args": [
63580
63580
  {
63581
- "name": "node",
63581
+ "name": "element",
63582
+ "type": "TmplAstElement",
63582
63583
  "deprecated": false,
63583
63584
  "deprecationMessage": ""
63584
63585
  }
@@ -63586,7 +63587,8 @@
63586
63587
  "returnType": "boolean",
63587
63588
  "jsdoctags": [
63588
63589
  {
63589
- "name": "node",
63590
+ "name": "element",
63591
+ "type": "TmplAstElement",
63590
63592
  "deprecated": false,
63591
63593
  "deprecationMessage": "",
63592
63594
  "tagName": {
@@ -63596,8 +63598,8 @@
63596
63598
  ]
63597
63599
  },
63598
63600
  {
63599
- "name": "isEuiElement",
63600
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63601
+ "name": "isComponentMetadataProperty",
63602
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63601
63603
  "ctype": "miscellaneous",
63602
63604
  "subtype": "function",
63603
63605
  "coverageIgnore": false,
@@ -63605,11 +63607,10 @@
63605
63607
  "deprecationMessage": "",
63606
63608
  "rawdescription": "",
63607
63609
  "description": "",
63608
- "displayName": "isEuiElement",
63610
+ "displayName": "isComponentMetadataProperty",
63609
63611
  "args": [
63610
63612
  {
63611
- "name": "element",
63612
- "type": "TmplAstElement",
63613
+ "name": "node",
63613
63614
  "deprecated": false,
63614
63615
  "deprecationMessage": ""
63615
63616
  }
@@ -63617,8 +63618,7 @@
63617
63618
  "returnType": "boolean",
63618
63619
  "jsdoctags": [
63619
63620
  {
63620
- "name": "element",
63621
- "type": "TmplAstElement",
63621
+ "name": "node",
63622
63622
  "deprecated": false,
63623
63623
  "deprecationMessage": "",
63624
63624
  "tagName": {
@@ -63629,7 +63629,7 @@
63629
63629
  },
63630
63630
  {
63631
63631
  "name": "isTemplateProperty",
63632
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63632
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63633
63633
  "ctype": "miscellaneous",
63634
63634
  "subtype": "function",
63635
63635
  "coverageIgnore": false,
@@ -63658,8 +63658,8 @@
63658
63658
  ]
63659
63659
  },
63660
63660
  {
63661
- "name": "migrateEuiAccent",
63662
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63661
+ "name": "migrateEuiButton",
63662
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63663
63663
  "ctype": "miscellaneous",
63664
63664
  "subtype": "function",
63665
63665
  "coverageIgnore": false,
@@ -63667,7 +63667,7 @@
63667
63667
  "deprecationMessage": "",
63668
63668
  "rawdescription": "",
63669
63669
  "description": "",
63670
- "displayName": "migrateEuiAccent",
63670
+ "displayName": "migrateEuiButton",
63671
63671
  "args": [
63672
63672
  {
63673
63673
  "name": "options",
@@ -63693,7 +63693,7 @@
63693
63693
  },
63694
63694
  {
63695
63695
  "name": "migrateInlineTemplates",
63696
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63696
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63697
63697
  "ctype": "miscellaneous",
63698
63698
  "subtype": "function",
63699
63699
  "coverageIgnore": false,
@@ -63725,7 +63725,7 @@
63725
63725
  },
63726
63726
  {
63727
63727
  "name": "migrateTemplate",
63728
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63728
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63729
63729
  "ctype": "miscellaneous",
63730
63730
  "subtype": "function",
63731
63731
  "coverageIgnore": false,
@@ -63755,41 +63755,9 @@
63755
63755
  }
63756
63756
  ]
63757
63757
  },
63758
- {
63759
- "name": "renameTsPropertyAccesses",
63760
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63761
- "ctype": "miscellaneous",
63762
- "subtype": "function",
63763
- "coverageIgnore": false,
63764
- "deprecated": false,
63765
- "deprecationMessage": "",
63766
- "rawdescription": "",
63767
- "description": "",
63768
- "displayName": "renameTsPropertyAccesses",
63769
- "args": [
63770
- {
63771
- "name": "source",
63772
- "type": "string",
63773
- "deprecated": false,
63774
- "deprecationMessage": ""
63775
- }
63776
- ],
63777
- "returnType": "string",
63778
- "jsdoctags": [
63779
- {
63780
- "name": "source",
63781
- "type": "string",
63782
- "deprecated": false,
63783
- "deprecationMessage": "",
63784
- "tagName": {
63785
- "text": "param"
63786
- }
63787
- }
63788
- ]
63789
- },
63790
63758
  {
63791
63759
  "name": "unwrapExpression",
63792
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63760
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63793
63761
  "ctype": "miscellaneous",
63794
63762
  "subtype": "function",
63795
63763
  "coverageIgnore": false,
@@ -63819,7 +63787,7 @@
63819
63787
  },
63820
63788
  {
63821
63789
  "name": "visitDir",
63822
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63790
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63823
63791
  "ctype": "miscellaneous",
63824
63792
  "subtype": "function",
63825
63793
  "coverageIgnore": false,
@@ -63864,7 +63832,7 @@
63864
63832
  },
63865
63833
  {
63866
63834
  "name": "visitNodes",
63867
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
63835
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
63868
63836
  "ctype": "miscellaneous",
63869
63837
  "subtype": "function",
63870
63838
  "coverageIgnore": false,
@@ -63906,10 +63874,10 @@
63906
63874
  ]
63907
63875
  }
63908
63876
  ],
63909
- "packages/core/schematics/migrate-eui-button/index.ts": [
63877
+ "packages/core/schematics/migrate-eui-datepicker/index.ts": [
63910
63878
  {
63911
63879
  "name": "applyEdits",
63912
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
63880
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
63913
63881
  "ctype": "miscellaneous",
63914
63882
  "subtype": "function",
63915
63883
  "coverageIgnore": false,
@@ -63920,7 +63888,7 @@
63920
63888
  "displayName": "applyEdits",
63921
63889
  "args": [
63922
63890
  {
63923
- "name": "source",
63891
+ "name": "content",
63924
63892
  "type": "string",
63925
63893
  "deprecated": false,
63926
63894
  "deprecationMessage": ""
@@ -63934,7 +63902,7 @@
63934
63902
  "returnType": "string",
63935
63903
  "jsdoctags": [
63936
63904
  {
63937
- "name": "source",
63905
+ "name": "content",
63938
63906
  "type": "string",
63939
63907
  "deprecated": false,
63940
63908
  "deprecationMessage": "",
@@ -63953,53 +63921,8 @@
63953
63921
  ]
63954
63922
  },
63955
63923
  {
63956
- "name": "collectRenames",
63957
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
63958
- "ctype": "miscellaneous",
63959
- "subtype": "function",
63960
- "coverageIgnore": false,
63961
- "deprecated": false,
63962
- "deprecationMessage": "",
63963
- "rawdescription": "",
63964
- "description": "",
63965
- "displayName": "collectRenames",
63966
- "args": [
63967
- {
63968
- "name": "element",
63969
- "type": "TmplAstElement",
63970
- "deprecated": false,
63971
- "deprecationMessage": ""
63972
- },
63973
- {
63974
- "name": "edits",
63975
- "deprecated": false,
63976
- "deprecationMessage": ""
63977
- }
63978
- ],
63979
- "returnType": "void",
63980
- "jsdoctags": [
63981
- {
63982
- "name": "element",
63983
- "type": "TmplAstElement",
63984
- "deprecated": false,
63985
- "deprecationMessage": "",
63986
- "tagName": {
63987
- "text": "param"
63988
- }
63989
- },
63990
- {
63991
- "name": "edits",
63992
- "deprecated": false,
63993
- "deprecationMessage": "",
63994
- "tagName": {
63995
- "text": "param"
63996
- }
63997
- }
63998
- ]
63999
- },
64000
- {
64001
- "name": "hasEuiButtonAttribute",
64002
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
63924
+ "name": "findOutputFormatUsages",
63925
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64003
63926
  "ctype": "miscellaneous",
64004
63927
  "subtype": "function",
64005
63928
  "coverageIgnore": false,
@@ -64007,20 +63930,20 @@
64007
63930
  "deprecationMessage": "",
64008
63931
  "rawdescription": "",
64009
63932
  "description": "",
64010
- "displayName": "hasEuiButtonAttribute",
63933
+ "displayName": "findOutputFormatUsages",
64011
63934
  "args": [
64012
63935
  {
64013
- "name": "element",
64014
- "type": "TmplAstElement",
63936
+ "name": "template",
63937
+ "type": "string",
64015
63938
  "deprecated": false,
64016
63939
  "deprecationMessage": ""
64017
63940
  }
64018
63941
  ],
64019
- "returnType": "boolean",
63942
+ "returnType": "OutputFormatUsage[]",
64020
63943
  "jsdoctags": [
64021
63944
  {
64022
- "name": "element",
64023
- "type": "TmplAstElement",
63945
+ "name": "template",
63946
+ "type": "string",
64024
63947
  "deprecated": false,
64025
63948
  "deprecationMessage": "",
64026
63949
  "tagName": {
@@ -64030,8 +63953,8 @@
64030
63953
  ]
64031
63954
  },
64032
63955
  {
64033
- "name": "isComponentMetadataProperty",
64034
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
63956
+ "name": "isLikelyLuxonFormat",
63957
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64035
63958
  "ctype": "miscellaneous",
64036
63959
  "subtype": "function",
64037
63960
  "coverageIgnore": false,
@@ -64039,10 +63962,11 @@
64039
63962
  "deprecationMessage": "",
64040
63963
  "rawdescription": "",
64041
63964
  "description": "",
64042
- "displayName": "isComponentMetadataProperty",
63965
+ "displayName": "isLikelyLuxonFormat",
64043
63966
  "args": [
64044
63967
  {
64045
- "name": "node",
63968
+ "name": "format",
63969
+ "type": "string",
64046
63970
  "deprecated": false,
64047
63971
  "deprecationMessage": ""
64048
63972
  }
@@ -64050,7 +63974,8 @@
64050
63974
  "returnType": "boolean",
64051
63975
  "jsdoctags": [
64052
63976
  {
64053
- "name": "node",
63977
+ "name": "format",
63978
+ "type": "string",
64054
63979
  "deprecated": false,
64055
63980
  "deprecationMessage": "",
64056
63981
  "tagName": {
@@ -64060,8 +63985,8 @@
64060
63985
  ]
64061
63986
  },
64062
63987
  {
64063
- "name": "isTemplateProperty",
64064
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
63988
+ "name": "luxonPresetEdits",
63989
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64065
63990
  "ctype": "miscellaneous",
64066
63991
  "subtype": "function",
64067
63992
  "coverageIgnore": false,
@@ -64069,18 +63994,20 @@
64069
63994
  "deprecationMessage": "",
64070
63995
  "rawdescription": "",
64071
63996
  "description": "",
64072
- "displayName": "isTemplateProperty",
63997
+ "displayName": "luxonPresetEdits",
64073
63998
  "args": [
64074
63999
  {
64075
- "name": "node",
64000
+ "name": "source",
64001
+ "type": "string",
64076
64002
  "deprecated": false,
64077
64003
  "deprecationMessage": ""
64078
64004
  }
64079
64005
  ],
64080
- "returnType": "boolean",
64006
+ "returnType": "TextEdit[]",
64081
64007
  "jsdoctags": [
64082
64008
  {
64083
- "name": "node",
64009
+ "name": "source",
64010
+ "type": "string",
64084
64011
  "deprecated": false,
64085
64012
  "deprecationMessage": "",
64086
64013
  "tagName": {
@@ -64090,16 +64017,16 @@
64090
64017
  ]
64091
64018
  },
64092
64019
  {
64093
- "name": "migrateEuiButton",
64094
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64020
+ "name": "migrateEuiDatepicker",
64021
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64095
64022
  "ctype": "miscellaneous",
64096
64023
  "subtype": "function",
64097
64024
  "coverageIgnore": false,
64098
64025
  "deprecated": false,
64099
64026
  "deprecationMessage": "",
64100
- "rawdescription": "",
64101
- "description": "",
64102
- "displayName": "migrateEuiButton",
64027
+ "rawdescription": "Migrates eui-datepicker usages to the moment-free datepicker:\n- moment locales are no longer bundled (report only);\n- with a Luxon adapter, moment-token presets are replaced by their `LUXON_*` equivalents and static\n `dateOutputFormat` values are converted to Luxon tokens;\n- with the native adapter, `dateOutputFormat` is no longer supported (report only).\n\nThe adapter is detected from the component file, falling back to the one provided in\napp.config.ts / app.module.ts / main.ts.",
64028
+ "description": "<p>Migrates eui-datepicker usages to the moment-free datepicker:</p>\n<ul>\n<li>moment locales are no longer bundled (report only);</li>\n<li>with a Luxon adapter, moment-token presets are replaced by their <code>LUXON_*</code> equivalents and static\n<code>dateOutputFormat</code> values are converted to Luxon tokens;</li>\n<li>with the native adapter, <code>dateOutputFormat</code> is no longer supported (report only).</li>\n</ul>\n<p>The adapter is detected from the component file, falling back to the one provided in\napp.config.ts / app.module.ts / main.ts.</p>\n",
64029
+ "displayName": "migrateEuiDatepicker",
64103
64030
  "args": [
64104
64031
  {
64105
64032
  "name": "options",
@@ -64124,28 +64051,28 @@
64124
64051
  ]
64125
64052
  },
64126
64053
  {
64127
- "name": "migrateInlineTemplates",
64128
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64054
+ "name": "momentFormatToLuxon",
64055
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64129
64056
  "ctype": "miscellaneous",
64130
64057
  "subtype": "function",
64131
64058
  "coverageIgnore": false,
64132
64059
  "deprecated": false,
64133
64060
  "deprecationMessage": "",
64134
- "rawdescription": "",
64135
- "description": "",
64136
- "displayName": "migrateInlineTemplates",
64061
+ "rawdescription": "Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent.",
64062
+ "description": "<p>Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent.</p>\n",
64063
+ "displayName": "momentFormatToLuxon",
64137
64064
  "args": [
64138
64065
  {
64139
- "name": "source",
64066
+ "name": "format",
64140
64067
  "type": "string",
64141
64068
  "deprecated": false,
64142
64069
  "deprecationMessage": ""
64143
64070
  }
64144
64071
  ],
64145
- "returnType": "string",
64072
+ "returnType": "string | null",
64146
64073
  "jsdoctags": [
64147
64074
  {
64148
- "name": "source",
64075
+ "name": "format",
64149
64076
  "type": "string",
64150
64077
  "deprecated": false,
64151
64078
  "deprecationMessage": "",
@@ -64156,8 +64083,8 @@
64156
64083
  ]
64157
64084
  },
64158
64085
  {
64159
- "name": "migrateTemplate",
64160
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64086
+ "name": "reportMomentLocales",
64087
+ "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64161
64088
  "ctype": "miscellaneous",
64162
64089
  "subtype": "function",
64163
64090
  "coverageIgnore": false,
@@ -64165,50 +64092,48 @@
64165
64092
  "deprecationMessage": "",
64166
64093
  "rawdescription": "",
64167
64094
  "description": "",
64168
- "displayName": "migrateTemplate",
64095
+ "displayName": "reportMomentLocales",
64169
64096
  "args": [
64170
64097
  {
64171
- "name": "source",
64172
- "type": "string",
64098
+ "name": "tree",
64099
+ "type": "Tree",
64100
+ "deprecated": false,
64101
+ "deprecationMessage": ""
64102
+ },
64103
+ {
64104
+ "name": "context",
64105
+ "type": "SchematicContext",
64106
+ "deprecated": false,
64107
+ "deprecationMessage": ""
64108
+ },
64109
+ {
64110
+ "name": "files",
64173
64111
  "deprecated": false,
64174
64112
  "deprecationMessage": ""
64175
64113
  }
64176
64114
  ],
64177
- "returnType": "string",
64115
+ "returnType": "void",
64178
64116
  "jsdoctags": [
64179
64117
  {
64180
- "name": "source",
64181
- "type": "string",
64118
+ "name": "tree",
64119
+ "type": "Tree",
64182
64120
  "deprecated": false,
64183
64121
  "deprecationMessage": "",
64184
64122
  "tagName": {
64185
64123
  "text": "param"
64186
64124
  }
64187
- }
64188
- ]
64189
- },
64190
- {
64191
- "name": "unwrapExpression",
64192
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64193
- "ctype": "miscellaneous",
64194
- "subtype": "function",
64195
- "coverageIgnore": false,
64196
- "deprecated": false,
64197
- "deprecationMessage": "",
64198
- "rawdescription": "",
64199
- "description": "",
64200
- "displayName": "unwrapExpression",
64201
- "args": [
64125
+ },
64202
64126
  {
64203
- "name": "expression",
64127
+ "name": "context",
64128
+ "type": "SchematicContext",
64204
64129
  "deprecated": false,
64205
- "deprecationMessage": ""
64206
- }
64207
- ],
64208
- "returnType": "ts.Expression",
64209
- "jsdoctags": [
64130
+ "deprecationMessage": "",
64131
+ "tagName": {
64132
+ "text": "param"
64133
+ }
64134
+ },
64210
64135
  {
64211
- "name": "expression",
64136
+ "name": "files",
64212
64137
  "deprecated": false,
64213
64138
  "deprecationMessage": "",
64214
64139
  "tagName": {
@@ -64216,10 +64141,12 @@
64216
64141
  }
64217
64142
  }
64218
64143
  ]
64219
- },
64144
+ }
64145
+ ],
64146
+ "packages/core/schematics/migrate-eui-editor/index.ts": [
64220
64147
  {
64221
- "name": "visitDir",
64222
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64148
+ "name": "applyEdits",
64149
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64223
64150
  "ctype": "miscellaneous",
64224
64151
  "subtype": "function",
64225
64152
  "coverageIgnore": false,
@@ -64227,25 +64154,25 @@
64227
64154
  "deprecationMessage": "",
64228
64155
  "rawdescription": "",
64229
64156
  "description": "",
64230
- "displayName": "visitDir",
64157
+ "displayName": "applyEdits",
64231
64158
  "args": [
64232
64159
  {
64233
- "name": "dir",
64234
- "type": "DirEntry",
64160
+ "name": "source",
64161
+ "type": "string",
64235
64162
  "deprecated": false,
64236
64163
  "deprecationMessage": ""
64237
64164
  },
64238
64165
  {
64239
- "name": "callback",
64166
+ "name": "edits",
64240
64167
  "deprecated": false,
64241
64168
  "deprecationMessage": ""
64242
64169
  }
64243
64170
  ],
64244
- "returnType": "void",
64171
+ "returnType": "string",
64245
64172
  "jsdoctags": [
64246
64173
  {
64247
- "name": "dir",
64248
- "type": "DirEntry",
64174
+ "name": "source",
64175
+ "type": "string",
64249
64176
  "deprecated": false,
64250
64177
  "deprecationMessage": "",
64251
64178
  "tagName": {
@@ -64253,7 +64180,7 @@
64253
64180
  }
64254
64181
  },
64255
64182
  {
64256
- "name": "callback",
64183
+ "name": "edits",
64257
64184
  "deprecated": false,
64258
64185
  "deprecationMessage": "",
64259
64186
  "tagName": {
@@ -64263,8 +64190,8 @@
64263
64190
  ]
64264
64191
  },
64265
64192
  {
64266
- "name": "visitNodes",
64267
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
64193
+ "name": "collectRenames",
64194
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64268
64195
  "ctype": "miscellaneous",
64269
64196
  "subtype": "function",
64270
64197
  "coverageIgnore": false,
@@ -64272,10 +64199,11 @@
64272
64199
  "deprecationMessage": "",
64273
64200
  "rawdescription": "",
64274
64201
  "description": "",
64275
- "displayName": "visitNodes",
64202
+ "displayName": "collectRenames",
64276
64203
  "args": [
64277
64204
  {
64278
- "name": "nodes",
64205
+ "name": "element",
64206
+ "type": "TmplAstElement",
64279
64207
  "deprecated": false,
64280
64208
  "deprecationMessage": ""
64281
64209
  },
@@ -64288,7 +64216,8 @@
64288
64216
  "returnType": "void",
64289
64217
  "jsdoctags": [
64290
64218
  {
64291
- "name": "nodes",
64219
+ "name": "element",
64220
+ "type": "TmplAstElement",
64292
64221
  "deprecated": false,
64293
64222
  "deprecationMessage": "",
64294
64223
  "tagName": {
@@ -64304,12 +64233,10 @@
64304
64233
  }
64305
64234
  }
64306
64235
  ]
64307
- }
64308
- ],
64309
- "packages/core/schematics/migrate-eui-datepicker/index.ts": [
64236
+ },
64310
64237
  {
64311
- "name": "applyEdits",
64312
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64238
+ "name": "isComponentMetadataProperty",
64239
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64313
64240
  "ctype": "miscellaneous",
64314
64241
  "subtype": "function",
64315
64242
  "coverageIgnore": false,
@@ -64317,35 +64244,84 @@
64317
64244
  "deprecationMessage": "",
64318
64245
  "rawdescription": "",
64319
64246
  "description": "",
64320
- "displayName": "applyEdits",
64247
+ "displayName": "isComponentMetadataProperty",
64321
64248
  "args": [
64322
64249
  {
64323
- "name": "content",
64324
- "type": "string",
64250
+ "name": "node",
64325
64251
  "deprecated": false,
64326
64252
  "deprecationMessage": ""
64327
- },
64253
+ }
64254
+ ],
64255
+ "returnType": "boolean",
64256
+ "jsdoctags": [
64328
64257
  {
64329
- "name": "edits",
64258
+ "name": "node",
64259
+ "deprecated": false,
64260
+ "deprecationMessage": "",
64261
+ "tagName": {
64262
+ "text": "param"
64263
+ }
64264
+ }
64265
+ ]
64266
+ },
64267
+ {
64268
+ "name": "isTemplateProperty",
64269
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64270
+ "ctype": "miscellaneous",
64271
+ "subtype": "function",
64272
+ "coverageIgnore": false,
64273
+ "deprecated": false,
64274
+ "deprecationMessage": "",
64275
+ "rawdescription": "",
64276
+ "description": "",
64277
+ "displayName": "isTemplateProperty",
64278
+ "args": [
64279
+ {
64280
+ "name": "node",
64330
64281
  "deprecated": false,
64331
64282
  "deprecationMessage": ""
64332
64283
  }
64333
64284
  ],
64334
- "returnType": "string",
64285
+ "returnType": "boolean",
64335
64286
  "jsdoctags": [
64336
64287
  {
64337
- "name": "content",
64338
- "type": "string",
64288
+ "name": "node",
64339
64289
  "deprecated": false,
64340
64290
  "deprecationMessage": "",
64341
64291
  "tagName": {
64342
64292
  "text": "param"
64343
64293
  }
64344
- },
64294
+ }
64295
+ ]
64296
+ },
64297
+ {
64298
+ "name": "migrateEuiEditor",
64299
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64300
+ "ctype": "miscellaneous",
64301
+ "subtype": "function",
64302
+ "coverageIgnore": false,
64303
+ "deprecated": false,
64304
+ "deprecationMessage": "",
64305
+ "rawdescription": "",
64306
+ "description": "",
64307
+ "displayName": "migrateEuiEditor",
64308
+ "args": [
64345
64309
  {
64346
- "name": "edits",
64310
+ "name": "options",
64311
+ "type": "Schema",
64347
64312
  "deprecated": false,
64348
64313
  "deprecationMessage": "",
64314
+ "defaultValue": "{}"
64315
+ }
64316
+ ],
64317
+ "returnType": "Rule",
64318
+ "jsdoctags": [
64319
+ {
64320
+ "name": "options",
64321
+ "type": "Schema",
64322
+ "deprecated": false,
64323
+ "deprecationMessage": "",
64324
+ "defaultValue": "{}",
64349
64325
  "tagName": {
64350
64326
  "text": "param"
64351
64327
  }
@@ -64353,8 +64329,8 @@
64353
64329
  ]
64354
64330
  },
64355
64331
  {
64356
- "name": "findOutputFormatUsages",
64357
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64332
+ "name": "migrateInlineTemplates",
64333
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64358
64334
  "ctype": "miscellaneous",
64359
64335
  "subtype": "function",
64360
64336
  "coverageIgnore": false,
@@ -64362,19 +64338,19 @@
64362
64338
  "deprecationMessage": "",
64363
64339
  "rawdescription": "",
64364
64340
  "description": "",
64365
- "displayName": "findOutputFormatUsages",
64341
+ "displayName": "migrateInlineTemplates",
64366
64342
  "args": [
64367
64343
  {
64368
- "name": "template",
64344
+ "name": "source",
64369
64345
  "type": "string",
64370
64346
  "deprecated": false,
64371
64347
  "deprecationMessage": ""
64372
64348
  }
64373
64349
  ],
64374
- "returnType": "OutputFormatUsage[]",
64350
+ "returnType": "string",
64375
64351
  "jsdoctags": [
64376
64352
  {
64377
- "name": "template",
64353
+ "name": "source",
64378
64354
  "type": "string",
64379
64355
  "deprecated": false,
64380
64356
  "deprecationMessage": "",
@@ -64385,8 +64361,8 @@
64385
64361
  ]
64386
64362
  },
64387
64363
  {
64388
- "name": "isLikelyLuxonFormat",
64389
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64364
+ "name": "migrateTemplate",
64365
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64390
64366
  "ctype": "miscellaneous",
64391
64367
  "subtype": "function",
64392
64368
  "coverageIgnore": false,
@@ -64394,19 +64370,19 @@
64394
64370
  "deprecationMessage": "",
64395
64371
  "rawdescription": "",
64396
64372
  "description": "",
64397
- "displayName": "isLikelyLuxonFormat",
64373
+ "displayName": "migrateTemplate",
64398
64374
  "args": [
64399
64375
  {
64400
- "name": "format",
64376
+ "name": "source",
64401
64377
  "type": "string",
64402
64378
  "deprecated": false,
64403
64379
  "deprecationMessage": ""
64404
64380
  }
64405
64381
  ],
64406
- "returnType": "boolean",
64382
+ "returnType": "string",
64407
64383
  "jsdoctags": [
64408
64384
  {
64409
- "name": "format",
64385
+ "name": "source",
64410
64386
  "type": "string",
64411
64387
  "deprecated": false,
64412
64388
  "deprecationMessage": "",
@@ -64417,8 +64393,8 @@
64417
64393
  ]
64418
64394
  },
64419
64395
  {
64420
- "name": "luxonPresetEdits",
64421
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64396
+ "name": "unwrapExpression",
64397
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64422
64398
  "ctype": "miscellaneous",
64423
64399
  "subtype": "function",
64424
64400
  "coverageIgnore": false,
@@ -64426,20 +64402,18 @@
64426
64402
  "deprecationMessage": "",
64427
64403
  "rawdescription": "",
64428
64404
  "description": "",
64429
- "displayName": "luxonPresetEdits",
64405
+ "displayName": "unwrapExpression",
64430
64406
  "args": [
64431
64407
  {
64432
- "name": "source",
64433
- "type": "string",
64408
+ "name": "expression",
64434
64409
  "deprecated": false,
64435
64410
  "deprecationMessage": ""
64436
64411
  }
64437
64412
  ],
64438
- "returnType": "TextEdit[]",
64413
+ "returnType": "ts.Expression",
64439
64414
  "jsdoctags": [
64440
64415
  {
64441
- "name": "source",
64442
- "type": "string",
64416
+ "name": "expression",
64443
64417
  "deprecated": false,
64444
64418
  "deprecationMessage": "",
64445
64419
  "tagName": {
@@ -64449,33 +64423,44 @@
64449
64423
  ]
64450
64424
  },
64451
64425
  {
64452
- "name": "migrateEuiDatepicker",
64453
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64426
+ "name": "visitDir",
64427
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64454
64428
  "ctype": "miscellaneous",
64455
64429
  "subtype": "function",
64456
64430
  "coverageIgnore": false,
64457
64431
  "deprecated": false,
64458
64432
  "deprecationMessage": "",
64459
- "rawdescription": "Migrates eui-datepicker usages to the moment-free datepicker:\n- moment locales are no longer bundled (report only);\n- with a Luxon adapter, moment-token presets are replaced by their `LUXON_*` equivalents and static\n `dateOutputFormat` values are converted to Luxon tokens;\n- with the native adapter, `dateOutputFormat` is no longer supported (report only).\n\nThe adapter is detected from the component file, falling back to the one provided in\napp.config.ts / app.module.ts / main.ts.",
64460
- "description": "<p>Migrates eui-datepicker usages to the moment-free datepicker:</p>\n<ul>\n<li>moment locales are no longer bundled (report only);</li>\n<li>with a Luxon adapter, moment-token presets are replaced by their <code>LUXON_*</code> equivalents and static\n<code>dateOutputFormat</code> values are converted to Luxon tokens;</li>\n<li>with the native adapter, <code>dateOutputFormat</code> is no longer supported (report only).</li>\n</ul>\n<p>The adapter is detected from the component file, falling back to the one provided in\napp.config.ts / app.module.ts / main.ts.</p>\n",
64461
- "displayName": "migrateEuiDatepicker",
64433
+ "rawdescription": "",
64434
+ "description": "",
64435
+ "displayName": "visitDir",
64462
64436
  "args": [
64463
64437
  {
64464
- "name": "options",
64465
- "type": "Schema",
64438
+ "name": "dir",
64439
+ "type": "DirEntry",
64466
64440
  "deprecated": false,
64467
- "deprecationMessage": "",
64468
- "defaultValue": "{}"
64441
+ "deprecationMessage": ""
64442
+ },
64443
+ {
64444
+ "name": "callback",
64445
+ "deprecated": false,
64446
+ "deprecationMessage": ""
64469
64447
  }
64470
64448
  ],
64471
- "returnType": "Rule",
64449
+ "returnType": "void",
64472
64450
  "jsdoctags": [
64473
64451
  {
64474
- "name": "options",
64475
- "type": "Schema",
64452
+ "name": "dir",
64453
+ "type": "DirEntry",
64454
+ "deprecated": false,
64455
+ "deprecationMessage": "",
64456
+ "tagName": {
64457
+ "text": "param"
64458
+ }
64459
+ },
64460
+ {
64461
+ "name": "callback",
64476
64462
  "deprecated": false,
64477
64463
  "deprecationMessage": "",
64478
- "defaultValue": "{}",
64479
64464
  "tagName": {
64480
64465
  "text": "param"
64481
64466
  }
@@ -64483,29 +64468,40 @@
64483
64468
  ]
64484
64469
  },
64485
64470
  {
64486
- "name": "momentFormatToLuxon",
64487
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64471
+ "name": "visitNodes",
64472
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64488
64473
  "ctype": "miscellaneous",
64489
64474
  "subtype": "function",
64490
64475
  "coverageIgnore": false,
64491
64476
  "deprecated": false,
64492
64477
  "deprecationMessage": "",
64493
- "rawdescription": "Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent.",
64494
- "description": "<p>Converts a moment format to Luxon, or returns null when it contains tokens without a safe equivalent.</p>\n",
64495
- "displayName": "momentFormatToLuxon",
64478
+ "rawdescription": "",
64479
+ "description": "",
64480
+ "displayName": "visitNodes",
64496
64481
  "args": [
64497
64482
  {
64498
- "name": "format",
64499
- "type": "string",
64483
+ "name": "nodes",
64484
+ "deprecated": false,
64485
+ "deprecationMessage": ""
64486
+ },
64487
+ {
64488
+ "name": "edits",
64500
64489
  "deprecated": false,
64501
64490
  "deprecationMessage": ""
64502
64491
  }
64503
64492
  ],
64504
- "returnType": "string | null",
64493
+ "returnType": "void",
64505
64494
  "jsdoctags": [
64506
64495
  {
64507
- "name": "format",
64508
- "type": "string",
64496
+ "name": "nodes",
64497
+ "deprecated": false,
64498
+ "deprecationMessage": "",
64499
+ "tagName": {
64500
+ "text": "param"
64501
+ }
64502
+ },
64503
+ {
64504
+ "name": "edits",
64509
64505
  "deprecated": false,
64510
64506
  "deprecationMessage": "",
64511
64507
  "tagName": {
@@ -64515,8 +64511,8 @@
64515
64511
  ]
64516
64512
  },
64517
64513
  {
64518
- "name": "reportMomentLocales",
64519
- "file": "packages/core/schematics/migrate-eui-datepicker/index.ts",
64514
+ "name": "warnPropertyAccesses",
64515
+ "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64520
64516
  "ctype": "miscellaneous",
64521
64517
  "subtype": "function",
64522
64518
  "coverageIgnore": false,
@@ -64524,22 +64520,23 @@
64524
64520
  "deprecationMessage": "",
64525
64521
  "rawdescription": "",
64526
64522
  "description": "",
64527
- "displayName": "reportMomentLocales",
64523
+ "displayName": "warnPropertyAccesses",
64528
64524
  "args": [
64529
64525
  {
64530
- "name": "tree",
64531
- "type": "Tree",
64526
+ "name": "path",
64527
+ "type": "string",
64532
64528
  "deprecated": false,
64533
64529
  "deprecationMessage": ""
64534
64530
  },
64535
64531
  {
64536
- "name": "context",
64537
- "type": "SchematicContext",
64532
+ "name": "source",
64533
+ "type": "string",
64538
64534
  "deprecated": false,
64539
64535
  "deprecationMessage": ""
64540
64536
  },
64541
64537
  {
64542
- "name": "files",
64538
+ "name": "context",
64539
+ "type": "SchematicContext",
64543
64540
  "deprecated": false,
64544
64541
  "deprecationMessage": ""
64545
64542
  }
@@ -64547,8 +64544,8 @@
64547
64544
  "returnType": "void",
64548
64545
  "jsdoctags": [
64549
64546
  {
64550
- "name": "tree",
64551
- "type": "Tree",
64547
+ "name": "path",
64548
+ "type": "string",
64552
64549
  "deprecated": false,
64553
64550
  "deprecationMessage": "",
64554
64551
  "tagName": {
@@ -64556,8 +64553,8 @@
64556
64553
  }
64557
64554
  },
64558
64555
  {
64559
- "name": "context",
64560
- "type": "SchematicContext",
64556
+ "name": "source",
64557
+ "type": "string",
64561
64558
  "deprecated": false,
64562
64559
  "deprecationMessage": "",
64563
64560
  "tagName": {
@@ -64565,7 +64562,8 @@
64565
64562
  }
64566
64563
  },
64567
64564
  {
64568
- "name": "files",
64565
+ "name": "context",
64566
+ "type": "SchematicContext",
64569
64567
  "deprecated": false,
64570
64568
  "deprecationMessage": "",
64571
64569
  "tagName": {
@@ -64575,10 +64573,10 @@
64575
64573
  ]
64576
64574
  }
64577
64575
  ],
64578
- "packages/core/schematics/migrate-eui-editor/index.ts": [
64576
+ "packages/core/schematics/migrate-eui-fieldset/index.ts": [
64579
64577
  {
64580
64578
  "name": "applyEdits",
64581
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64579
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64582
64580
  "ctype": "miscellaneous",
64583
64581
  "subtype": "function",
64584
64582
  "coverageIgnore": false,
@@ -64623,7 +64621,7 @@
64623
64621
  },
64624
64622
  {
64625
64623
  "name": "collectRenames",
64626
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64624
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64627
64625
  "ctype": "miscellaneous",
64628
64626
  "subtype": "function",
64629
64627
  "coverageIgnore": false,
@@ -64668,7 +64666,7 @@
64668
64666
  },
64669
64667
  {
64670
64668
  "name": "isComponentMetadataProperty",
64671
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64669
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64672
64670
  "ctype": "miscellaneous",
64673
64671
  "subtype": "function",
64674
64672
  "coverageIgnore": false,
@@ -64698,7 +64696,7 @@
64698
64696
  },
64699
64697
  {
64700
64698
  "name": "isTemplateProperty",
64701
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64699
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64702
64700
  "ctype": "miscellaneous",
64703
64701
  "subtype": "function",
64704
64702
  "coverageIgnore": false,
@@ -64727,8 +64725,8 @@
64727
64725
  ]
64728
64726
  },
64729
64727
  {
64730
- "name": "migrateEuiEditor",
64731
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64728
+ "name": "migrateEuiFieldset",
64729
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64732
64730
  "ctype": "miscellaneous",
64733
64731
  "subtype": "function",
64734
64732
  "coverageIgnore": false,
@@ -64736,7 +64734,7 @@
64736
64734
  "deprecationMessage": "",
64737
64735
  "rawdescription": "",
64738
64736
  "description": "",
64739
- "displayName": "migrateEuiEditor",
64737
+ "displayName": "migrateEuiFieldset",
64740
64738
  "args": [
64741
64739
  {
64742
64740
  "name": "options",
@@ -64762,7 +64760,7 @@
64762
64760
  },
64763
64761
  {
64764
64762
  "name": "migrateInlineTemplates",
64765
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64763
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64766
64764
  "ctype": "miscellaneous",
64767
64765
  "subtype": "function",
64768
64766
  "coverageIgnore": false,
@@ -64794,7 +64792,7 @@
64794
64792
  },
64795
64793
  {
64796
64794
  "name": "migrateTemplate",
64797
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64795
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64798
64796
  "ctype": "miscellaneous",
64799
64797
  "subtype": "function",
64800
64798
  "coverageIgnore": false,
@@ -64826,7 +64824,7 @@
64826
64824
  },
64827
64825
  {
64828
64826
  "name": "unwrapExpression",
64829
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64827
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64830
64828
  "ctype": "miscellaneous",
64831
64829
  "subtype": "function",
64832
64830
  "coverageIgnore": false,
@@ -64856,7 +64854,7 @@
64856
64854
  },
64857
64855
  {
64858
64856
  "name": "visitDir",
64859
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64857
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64860
64858
  "ctype": "miscellaneous",
64861
64859
  "subtype": "function",
64862
64860
  "coverageIgnore": false,
@@ -64901,7 +64899,7 @@
64901
64899
  },
64902
64900
  {
64903
64901
  "name": "visitNodes",
64904
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64902
+ "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64905
64903
  "ctype": "miscellaneous",
64906
64904
  "subtype": "function",
64907
64905
  "coverageIgnore": false,
@@ -64941,10 +64939,12 @@
64941
64939
  }
64942
64940
  }
64943
64941
  ]
64944
- },
64942
+ }
64943
+ ],
64944
+ "packages/core/schematics/migrate-eui-accent/index.ts": [
64945
64945
  {
64946
- "name": "warnPropertyAccesses",
64947
- "file": "packages/core/schematics/migrate-eui-editor/index.ts",
64946
+ "name": "applyEdits",
64947
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
64948
64948
  "ctype": "miscellaneous",
64949
64949
  "subtype": "function",
64950
64950
  "coverageIgnore": false,
@@ -64952,14 +64952,8 @@
64952
64952
  "deprecationMessage": "",
64953
64953
  "rawdescription": "",
64954
64954
  "description": "",
64955
- "displayName": "warnPropertyAccesses",
64955
+ "displayName": "applyEdits",
64956
64956
  "args": [
64957
- {
64958
- "name": "path",
64959
- "type": "string",
64960
- "deprecated": false,
64961
- "deprecationMessage": ""
64962
- },
64963
64957
  {
64964
64958
  "name": "source",
64965
64959
  "type": "string",
@@ -64967,23 +64961,13 @@
64967
64961
  "deprecationMessage": ""
64968
64962
  },
64969
64963
  {
64970
- "name": "context",
64971
- "type": "SchematicContext",
64964
+ "name": "edits",
64972
64965
  "deprecated": false,
64973
64966
  "deprecationMessage": ""
64974
64967
  }
64975
64968
  ],
64976
- "returnType": "void",
64969
+ "returnType": "string",
64977
64970
  "jsdoctags": [
64978
- {
64979
- "name": "path",
64980
- "type": "string",
64981
- "deprecated": false,
64982
- "deprecationMessage": "",
64983
- "tagName": {
64984
- "text": "param"
64985
- }
64986
- },
64987
64971
  {
64988
64972
  "name": "source",
64989
64973
  "type": "string",
@@ -64994,8 +64978,7 @@
64994
64978
  }
64995
64979
  },
64996
64980
  {
64997
- "name": "context",
64998
- "type": "SchematicContext",
64981
+ "name": "edits",
64999
64982
  "deprecated": false,
65000
64983
  "deprecationMessage": "",
65001
64984
  "tagName": {
@@ -65003,12 +64986,10 @@
65003
64986
  }
65004
64987
  }
65005
64988
  ]
65006
- }
65007
- ],
65008
- "packages/core/schematics/migrate-eui-fieldset/index.ts": [
64989
+ },
65009
64990
  {
65010
- "name": "applyEdits",
65011
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
64991
+ "name": "collectRenames",
64992
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65012
64993
  "ctype": "miscellaneous",
65013
64994
  "subtype": "function",
65014
64995
  "coverageIgnore": false,
@@ -65016,11 +64997,11 @@
65016
64997
  "deprecationMessage": "",
65017
64998
  "rawdescription": "",
65018
64999
  "description": "",
65019
- "displayName": "applyEdits",
65000
+ "displayName": "collectRenames",
65020
65001
  "args": [
65021
65002
  {
65022
- "name": "source",
65023
- "type": "string",
65003
+ "name": "element",
65004
+ "type": "TmplAstElement",
65024
65005
  "deprecated": false,
65025
65006
  "deprecationMessage": ""
65026
65007
  },
@@ -65030,11 +65011,11 @@
65030
65011
  "deprecationMessage": ""
65031
65012
  }
65032
65013
  ],
65033
- "returnType": "string",
65014
+ "returnType": "void",
65034
65015
  "jsdoctags": [
65035
65016
  {
65036
- "name": "source",
65037
- "type": "string",
65017
+ "name": "element",
65018
+ "type": "TmplAstElement",
65038
65019
  "deprecated": false,
65039
65020
  "deprecationMessage": "",
65040
65021
  "tagName": {
@@ -65052,8 +65033,8 @@
65052
65033
  ]
65053
65034
  },
65054
65035
  {
65055
- "name": "collectRenames",
65056
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65036
+ "name": "isComponentMetadataProperty",
65037
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65057
65038
  "ctype": "miscellaneous",
65058
65039
  "subtype": "function",
65059
65040
  "coverageIgnore": false,
@@ -65061,33 +65042,18 @@
65061
65042
  "deprecationMessage": "",
65062
65043
  "rawdescription": "",
65063
65044
  "description": "",
65064
- "displayName": "collectRenames",
65045
+ "displayName": "isComponentMetadataProperty",
65065
65046
  "args": [
65066
65047
  {
65067
- "name": "element",
65068
- "type": "TmplAstElement",
65069
- "deprecated": false,
65070
- "deprecationMessage": ""
65071
- },
65072
- {
65073
- "name": "edits",
65048
+ "name": "node",
65074
65049
  "deprecated": false,
65075
65050
  "deprecationMessage": ""
65076
65051
  }
65077
65052
  ],
65078
- "returnType": "void",
65053
+ "returnType": "boolean",
65079
65054
  "jsdoctags": [
65080
65055
  {
65081
- "name": "element",
65082
- "type": "TmplAstElement",
65083
- "deprecated": false,
65084
- "deprecationMessage": "",
65085
- "tagName": {
65086
- "text": "param"
65087
- }
65088
- },
65089
- {
65090
- "name": "edits",
65056
+ "name": "node",
65091
65057
  "deprecated": false,
65092
65058
  "deprecationMessage": "",
65093
65059
  "tagName": {
@@ -65097,8 +65063,8 @@
65097
65063
  ]
65098
65064
  },
65099
65065
  {
65100
- "name": "isComponentMetadataProperty",
65101
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65066
+ "name": "isEuiElement",
65067
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65102
65068
  "ctype": "miscellaneous",
65103
65069
  "subtype": "function",
65104
65070
  "coverageIgnore": false,
@@ -65106,10 +65072,11 @@
65106
65072
  "deprecationMessage": "",
65107
65073
  "rawdescription": "",
65108
65074
  "description": "",
65109
- "displayName": "isComponentMetadataProperty",
65075
+ "displayName": "isEuiElement",
65110
65076
  "args": [
65111
65077
  {
65112
- "name": "node",
65078
+ "name": "element",
65079
+ "type": "TmplAstElement",
65113
65080
  "deprecated": false,
65114
65081
  "deprecationMessage": ""
65115
65082
  }
@@ -65117,7 +65084,8 @@
65117
65084
  "returnType": "boolean",
65118
65085
  "jsdoctags": [
65119
65086
  {
65120
- "name": "node",
65087
+ "name": "element",
65088
+ "type": "TmplAstElement",
65121
65089
  "deprecated": false,
65122
65090
  "deprecationMessage": "",
65123
65091
  "tagName": {
@@ -65128,7 +65096,7 @@
65128
65096
  },
65129
65097
  {
65130
65098
  "name": "isTemplateProperty",
65131
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65099
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65132
65100
  "ctype": "miscellaneous",
65133
65101
  "subtype": "function",
65134
65102
  "coverageIgnore": false,
@@ -65157,8 +65125,8 @@
65157
65125
  ]
65158
65126
  },
65159
65127
  {
65160
- "name": "migrateEuiFieldset",
65161
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65128
+ "name": "migrateEuiAccent",
65129
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65162
65130
  "ctype": "miscellaneous",
65163
65131
  "subtype": "function",
65164
65132
  "coverageIgnore": false,
@@ -65166,7 +65134,7 @@
65166
65134
  "deprecationMessage": "",
65167
65135
  "rawdescription": "",
65168
65136
  "description": "",
65169
- "displayName": "migrateEuiFieldset",
65137
+ "displayName": "migrateEuiAccent",
65170
65138
  "args": [
65171
65139
  {
65172
65140
  "name": "options",
@@ -65192,7 +65160,7 @@
65192
65160
  },
65193
65161
  {
65194
65162
  "name": "migrateInlineTemplates",
65195
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65163
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65196
65164
  "ctype": "miscellaneous",
65197
65165
  "subtype": "function",
65198
65166
  "coverageIgnore": false,
@@ -65224,7 +65192,7 @@
65224
65192
  },
65225
65193
  {
65226
65194
  "name": "migrateTemplate",
65227
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65195
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65228
65196
  "ctype": "miscellaneous",
65229
65197
  "subtype": "function",
65230
65198
  "coverageIgnore": false,
@@ -65254,9 +65222,41 @@
65254
65222
  }
65255
65223
  ]
65256
65224
  },
65225
+ {
65226
+ "name": "renameTsPropertyAccesses",
65227
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65228
+ "ctype": "miscellaneous",
65229
+ "subtype": "function",
65230
+ "coverageIgnore": false,
65231
+ "deprecated": false,
65232
+ "deprecationMessage": "",
65233
+ "rawdescription": "",
65234
+ "description": "",
65235
+ "displayName": "renameTsPropertyAccesses",
65236
+ "args": [
65237
+ {
65238
+ "name": "source",
65239
+ "type": "string",
65240
+ "deprecated": false,
65241
+ "deprecationMessage": ""
65242
+ }
65243
+ ],
65244
+ "returnType": "string",
65245
+ "jsdoctags": [
65246
+ {
65247
+ "name": "source",
65248
+ "type": "string",
65249
+ "deprecated": false,
65250
+ "deprecationMessage": "",
65251
+ "tagName": {
65252
+ "text": "param"
65253
+ }
65254
+ }
65255
+ ]
65256
+ },
65257
65257
  {
65258
65258
  "name": "unwrapExpression",
65259
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65259
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65260
65260
  "ctype": "miscellaneous",
65261
65261
  "subtype": "function",
65262
65262
  "coverageIgnore": false,
@@ -65286,7 +65286,7 @@
65286
65286
  },
65287
65287
  {
65288
65288
  "name": "visitDir",
65289
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65289
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65290
65290
  "ctype": "miscellaneous",
65291
65291
  "subtype": "function",
65292
65292
  "coverageIgnore": false,
@@ -65331,7 +65331,7 @@
65331
65331
  },
65332
65332
  {
65333
65333
  "name": "visitNodes",
65334
- "file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
65334
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
65335
65335
  "ctype": "miscellaneous",
65336
65336
  "subtype": "function",
65337
65337
  "coverageIgnore": false,
@@ -65373,10 +65373,10 @@
65373
65373
  ]
65374
65374
  }
65375
65375
  ],
65376
- "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
65376
+ "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
65377
65377
  {
65378
65378
  "name": "applyEdits",
65379
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65379
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65380
65380
  "ctype": "miscellaneous",
65381
65381
  "subtype": "function",
65382
65382
  "coverageIgnore": false,
@@ -65421,7 +65421,7 @@
65421
65421
  },
65422
65422
  {
65423
65423
  "name": "collectRenames",
65424
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65424
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65425
65425
  "ctype": "miscellaneous",
65426
65426
  "subtype": "function",
65427
65427
  "coverageIgnore": false,
@@ -65466,7 +65466,7 @@
65466
65466
  },
65467
65467
  {
65468
65468
  "name": "isComponentMetadataProperty",
65469
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65469
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65470
65470
  "ctype": "miscellaneous",
65471
65471
  "subtype": "function",
65472
65472
  "coverageIgnore": false,
@@ -65496,7 +65496,7 @@
65496
65496
  },
65497
65497
  {
65498
65498
  "name": "isTemplateProperty",
65499
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65499
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65500
65500
  "ctype": "miscellaneous",
65501
65501
  "subtype": "function",
65502
65502
  "coverageIgnore": false,
@@ -65525,8 +65525,8 @@
65525
65525
  ]
65526
65526
  },
65527
65527
  {
65528
- "name": "migrateEuiIconSvg",
65529
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65528
+ "name": "migrateEuiIconToggle",
65529
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65530
65530
  "ctype": "miscellaneous",
65531
65531
  "subtype": "function",
65532
65532
  "coverageIgnore": false,
@@ -65534,7 +65534,7 @@
65534
65534
  "deprecationMessage": "",
65535
65535
  "rawdescription": "",
65536
65536
  "description": "",
65537
- "displayName": "migrateEuiIconSvg",
65537
+ "displayName": "migrateEuiIconToggle",
65538
65538
  "args": [
65539
65539
  {
65540
65540
  "name": "options",
@@ -65560,7 +65560,7 @@
65560
65560
  },
65561
65561
  {
65562
65562
  "name": "migrateInlineTemplates",
65563
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65563
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65564
65564
  "ctype": "miscellaneous",
65565
65565
  "subtype": "function",
65566
65566
  "coverageIgnore": false,
@@ -65592,7 +65592,7 @@
65592
65592
  },
65593
65593
  {
65594
65594
  "name": "migrateTemplate",
65595
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65595
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65596
65596
  "ctype": "miscellaneous",
65597
65597
  "subtype": "function",
65598
65598
  "coverageIgnore": false,
@@ -65624,7 +65624,7 @@
65624
65624
  },
65625
65625
  {
65626
65626
  "name": "renameTsPropertyAccesses",
65627
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65627
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65628
65628
  "ctype": "miscellaneous",
65629
65629
  "subtype": "function",
65630
65630
  "coverageIgnore": false,
@@ -65656,7 +65656,7 @@
65656
65656
  },
65657
65657
  {
65658
65658
  "name": "unwrapExpression",
65659
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65659
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65660
65660
  "ctype": "miscellaneous",
65661
65661
  "subtype": "function",
65662
65662
  "coverageIgnore": false,
@@ -65686,7 +65686,7 @@
65686
65686
  },
65687
65687
  {
65688
65688
  "name": "visitDir",
65689
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65689
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65690
65690
  "ctype": "miscellaneous",
65691
65691
  "subtype": "function",
65692
65692
  "coverageIgnore": false,
@@ -65731,7 +65731,7 @@
65731
65731
  },
65732
65732
  {
65733
65733
  "name": "visitNodes",
65734
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65734
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65735
65735
  "ctype": "miscellaneous",
65736
65736
  "subtype": "function",
65737
65737
  "coverageIgnore": false,
@@ -65773,10 +65773,10 @@
65773
65773
  ]
65774
65774
  }
65775
65775
  ],
65776
- "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
65776
+ "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
65777
65777
  {
65778
65778
  "name": "applyEdits",
65779
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65779
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65780
65780
  "ctype": "miscellaneous",
65781
65781
  "subtype": "function",
65782
65782
  "coverageIgnore": false,
@@ -65821,7 +65821,7 @@
65821
65821
  },
65822
65822
  {
65823
65823
  "name": "collectRenames",
65824
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65824
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65825
65825
  "ctype": "miscellaneous",
65826
65826
  "subtype": "function",
65827
65827
  "coverageIgnore": false,
@@ -65866,7 +65866,7 @@
65866
65866
  },
65867
65867
  {
65868
65868
  "name": "isComponentMetadataProperty",
65869
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65869
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65870
65870
  "ctype": "miscellaneous",
65871
65871
  "subtype": "function",
65872
65872
  "coverageIgnore": false,
@@ -65896,7 +65896,7 @@
65896
65896
  },
65897
65897
  {
65898
65898
  "name": "isTemplateProperty",
65899
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65899
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65900
65900
  "ctype": "miscellaneous",
65901
65901
  "subtype": "function",
65902
65902
  "coverageIgnore": false,
@@ -65925,8 +65925,8 @@
65925
65925
  ]
65926
65926
  },
65927
65927
  {
65928
- "name": "migrateEuiIconToggle",
65929
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65928
+ "name": "migrateEuiIconSvg",
65929
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65930
65930
  "ctype": "miscellaneous",
65931
65931
  "subtype": "function",
65932
65932
  "coverageIgnore": false,
@@ -65934,7 +65934,7 @@
65934
65934
  "deprecationMessage": "",
65935
65935
  "rawdescription": "",
65936
65936
  "description": "",
65937
- "displayName": "migrateEuiIconToggle",
65937
+ "displayName": "migrateEuiIconSvg",
65938
65938
  "args": [
65939
65939
  {
65940
65940
  "name": "options",
@@ -65960,7 +65960,7 @@
65960
65960
  },
65961
65961
  {
65962
65962
  "name": "migrateInlineTemplates",
65963
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65963
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65964
65964
  "ctype": "miscellaneous",
65965
65965
  "subtype": "function",
65966
65966
  "coverageIgnore": false,
@@ -65992,7 +65992,7 @@
65992
65992
  },
65993
65993
  {
65994
65994
  "name": "migrateTemplate",
65995
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
65995
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
65996
65996
  "ctype": "miscellaneous",
65997
65997
  "subtype": "function",
65998
65998
  "coverageIgnore": false,
@@ -66024,7 +66024,7 @@
66024
66024
  },
66025
66025
  {
66026
66026
  "name": "renameTsPropertyAccesses",
66027
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
66027
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
66028
66028
  "ctype": "miscellaneous",
66029
66029
  "subtype": "function",
66030
66030
  "coverageIgnore": false,
@@ -66056,7 +66056,7 @@
66056
66056
  },
66057
66057
  {
66058
66058
  "name": "unwrapExpression",
66059
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
66059
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
66060
66060
  "ctype": "miscellaneous",
66061
66061
  "subtype": "function",
66062
66062
  "coverageIgnore": false,
@@ -66086,7 +66086,7 @@
66086
66086
  },
66087
66087
  {
66088
66088
  "name": "visitDir",
66089
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
66089
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
66090
66090
  "ctype": "miscellaneous",
66091
66091
  "subtype": "function",
66092
66092
  "coverageIgnore": false,
@@ -66131,7 +66131,7 @@
66131
66131
  },
66132
66132
  {
66133
66133
  "name": "visitNodes",
66134
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
66134
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
66135
66135
  "ctype": "miscellaneous",
66136
66136
  "subtype": "function",
66137
66137
  "coverageIgnore": false,