@eui/core 22.0.0-alpha.30 → 22.0.0-alpha.32

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.
@@ -2348,12 +2348,12 @@
2348
2348
  },
2349
2349
  {
2350
2350
  "name": "Schema",
2351
- "id": "interface-Schema-585b211d989563bbec5bd67bcdb58d5f264396adbe0ed2e51d0b4a0ecaf8b3ec36d821647c170d616bb409fc603c5a4c0e699eb7511e02c6add8d8670fc9cb9f-4",
2352
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
2351
+ "id": "interface-Schema-e96d29c1785a16147de773cebe7ab5d4ed82aa23c6b1f7737113252a14d156e236f46f7a16340432dec900b664c8005be0aef5d0a628c2f5b8dd2ec7e41edf56-4",
2352
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
2353
2353
  "deprecated": false,
2354
2354
  "deprecationMessage": "",
2355
2355
  "type": "interface",
2356
- "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, name: string): boolean {\n return element.attributes.some((a) => a.name === name);\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",
2356
+ "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",
2357
2357
  "displayName": "Schema",
2358
2358
  "properties": [
2359
2359
  {
@@ -2395,12 +2395,12 @@
2395
2395
  },
2396
2396
  {
2397
2397
  "name": "Schema",
2398
- "id": "interface-Schema-c7e2cc0add09c97d83ec2675d59c86951681f8e2d49f133fb2f216ca98d0da1fdf892d45af31f19ecbbfd0d32f4ad70dd99e862f75725d3812f66a73ec34362c-5",
2399
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
2398
+ "id": "interface-Schema-585b211d989563bbec5bd67bcdb58d5f264396adbe0ed2e51d0b4a0ecaf8b3ec36d821647c170d616bb409fc603c5a4c0e699eb7511e02c6add8d8670fc9cb9f-5",
2399
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
2400
2400
  "deprecated": false,
2401
2401
  "deprecationMessage": "",
2402
2402
  "type": "interface",
2403
- "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",
2403
+ "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, name: string): boolean {\n return element.attributes.some((a) => a.name === name);\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",
2404
2404
  "displayName": "Schema",
2405
2405
  "properties": [
2406
2406
  {
@@ -2442,12 +2442,12 @@
2442
2442
  },
2443
2443
  {
2444
2444
  "name": "Schema",
2445
- "id": "interface-Schema-c0c08f5e83da9afa13ce8375f982fb280b9bde854e00c914f41b04d44deecd531496c2cee264b50314e92a6260c26cebe35741a2cf5ec068d8b6da5c5267539e-6",
2446
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
2445
+ "id": "interface-Schema-c7e2cc0add09c97d83ec2675d59c86951681f8e2d49f133fb2f216ca98d0da1fdf892d45af31f19ecbbfd0d32f4ad70dd99e862f75725d3812f66a73ec34362c-6",
2446
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
2447
2447
  "deprecated": false,
2448
2448
  "deprecationMessage": "",
2449
2449
  "type": "interface",
2450
- "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",
2450
+ "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",
2451
2451
  "displayName": "Schema",
2452
2452
  "properties": [
2453
2453
  {
@@ -2489,12 +2489,12 @@
2489
2489
  },
2490
2490
  {
2491
2491
  "name": "Schema",
2492
- "id": "interface-Schema-e96d29c1785a16147de773cebe7ab5d4ed82aa23c6b1f7737113252a14d156e236f46f7a16340432dec900b664c8005be0aef5d0a628c2f5b8dd2ec7e41edf56-7",
2493
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
2492
+ "id": "interface-Schema-c0c08f5e83da9afa13ce8375f982fb280b9bde854e00c914f41b04d44deecd531496c2cee264b50314e92a6260c26cebe35741a2cf5ec068d8b6da5c5267539e-7",
2493
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
2494
2494
  "deprecated": false,
2495
2495
  "deprecationMessage": "",
2496
2496
  "type": "interface",
2497
- "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",
2497
+ "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",
2498
2498
  "displayName": "Schema",
2499
2499
  "properties": [
2500
2500
  {
@@ -23246,23 +23246,23 @@
23246
23246
  "name": "NEW_NAME",
23247
23247
  "ctype": "miscellaneous",
23248
23248
  "subtype": "variable",
23249
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
23249
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
23250
23250
  "coverageIgnore": false,
23251
23251
  "deprecated": false,
23252
23252
  "deprecationMessage": "",
23253
23253
  "type": "string",
23254
- "defaultValue": "'euiCTAButton'"
23254
+ "defaultValue": "'euiPrimary'"
23255
23255
  },
23256
23256
  {
23257
23257
  "name": "NEW_NAME",
23258
23258
  "ctype": "miscellaneous",
23259
23259
  "subtype": "variable",
23260
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
23260
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
23261
23261
  "coverageIgnore": false,
23262
23262
  "deprecated": false,
23263
23263
  "deprecationMessage": "",
23264
23264
  "type": "string",
23265
- "defaultValue": "'euiPrimary'"
23265
+ "defaultValue": "'euiCTAButton'"
23266
23266
  },
23267
23267
  {
23268
23268
  "name": "NEW_NAME",
@@ -23391,23 +23391,23 @@
23391
23391
  "name": "OLD_NAME",
23392
23392
  "ctype": "miscellaneous",
23393
23393
  "subtype": "variable",
23394
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
23394
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
23395
23395
  "coverageIgnore": false,
23396
23396
  "deprecated": false,
23397
23397
  "deprecationMessage": "",
23398
23398
  "type": "string",
23399
- "defaultValue": "'euiButtonCall'"
23399
+ "defaultValue": "'euiAccent'"
23400
23400
  },
23401
23401
  {
23402
23402
  "name": "OLD_NAME",
23403
23403
  "ctype": "miscellaneous",
23404
23404
  "subtype": "variable",
23405
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
23405
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
23406
23406
  "coverageIgnore": false,
23407
23407
  "deprecated": false,
23408
23408
  "deprecationMessage": "",
23409
23409
  "type": "string",
23410
- "defaultValue": "'euiAccent'"
23410
+ "defaultValue": "'euiButtonCall'"
23411
23411
  },
23412
23412
  {
23413
23413
  "name": "OLD_NAME",
@@ -24383,7 +24383,7 @@
24383
24383
  },
24384
24384
  {
24385
24385
  "name": "applyEdits",
24386
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
24386
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
24387
24387
  "ctype": "miscellaneous",
24388
24388
  "subtype": "function",
24389
24389
  "coverageIgnore": false,
@@ -24428,7 +24428,7 @@
24428
24428
  },
24429
24429
  {
24430
24430
  "name": "applyEdits",
24431
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
24431
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
24432
24432
  "ctype": "miscellaneous",
24433
24433
  "subtype": "function",
24434
24434
  "coverageIgnore": false,
@@ -26190,7 +26190,7 @@
26190
26190
  },
26191
26191
  {
26192
26192
  "name": "collectRenames",
26193
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
26193
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
26194
26194
  "ctype": "miscellaneous",
26195
26195
  "subtype": "function",
26196
26196
  "coverageIgnore": false,
@@ -26235,7 +26235,7 @@
26235
26235
  },
26236
26236
  {
26237
26237
  "name": "collectRenames",
26238
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
26238
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
26239
26239
  "ctype": "miscellaneous",
26240
26240
  "subtype": "function",
26241
26241
  "coverageIgnore": false,
@@ -29850,7 +29850,7 @@
29850
29850
  },
29851
29851
  {
29852
29852
  "name": "isComponentMetadataProperty",
29853
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
29853
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
29854
29854
  "ctype": "miscellaneous",
29855
29855
  "subtype": "function",
29856
29856
  "coverageIgnore": false,
@@ -29880,7 +29880,7 @@
29880
29880
  },
29881
29881
  {
29882
29882
  "name": "isComponentMetadataProperty",
29883
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
29883
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
29884
29884
  "ctype": "miscellaneous",
29885
29885
  "subtype": "function",
29886
29886
  "coverageIgnore": false,
@@ -30395,7 +30395,7 @@
30395
30395
  },
30396
30396
  {
30397
30397
  "name": "isTemplateProperty",
30398
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
30398
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
30399
30399
  "ctype": "miscellaneous",
30400
30400
  "subtype": "function",
30401
30401
  "coverageIgnore": false,
@@ -30425,7 +30425,7 @@
30425
30425
  },
30426
30426
  {
30427
30427
  "name": "isTemplateProperty",
30428
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
30428
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
30429
30429
  "ctype": "miscellaneous",
30430
30430
  "subtype": "function",
30431
30431
  "coverageIgnore": false,
@@ -32227,7 +32227,7 @@
32227
32227
  },
32228
32228
  {
32229
32229
  "name": "migrateInlineTemplates",
32230
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
32230
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
32231
32231
  "ctype": "miscellaneous",
32232
32232
  "subtype": "function",
32233
32233
  "coverageIgnore": false,
@@ -32259,7 +32259,7 @@
32259
32259
  },
32260
32260
  {
32261
32261
  "name": "migrateInlineTemplates",
32262
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
32262
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
32263
32263
  "ctype": "miscellaneous",
32264
32264
  "subtype": "function",
32265
32265
  "coverageIgnore": false,
@@ -32291,7 +32291,7 @@
32291
32291
  },
32292
32292
  {
32293
32293
  "name": "migrateInlineTemplates",
32294
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
32294
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
32295
32295
  "ctype": "miscellaneous",
32296
32296
  "subtype": "function",
32297
32297
  "coverageIgnore": false,
@@ -32323,7 +32323,7 @@
32323
32323
  },
32324
32324
  {
32325
32325
  "name": "migrateInlineTemplates",
32326
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
32326
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
32327
32327
  "ctype": "miscellaneous",
32328
32328
  "subtype": "function",
32329
32329
  "coverageIgnore": false,
@@ -32767,7 +32767,7 @@
32767
32767
  },
32768
32768
  {
32769
32769
  "name": "migrateTemplate",
32770
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
32770
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
32771
32771
  "ctype": "miscellaneous",
32772
32772
  "subtype": "function",
32773
32773
  "coverageIgnore": false,
@@ -32799,7 +32799,7 @@
32799
32799
  },
32800
32800
  {
32801
32801
  "name": "migrateTemplate",
32802
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
32802
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
32803
32803
  "ctype": "miscellaneous",
32804
32804
  "subtype": "function",
32805
32805
  "coverageIgnore": false,
@@ -32831,7 +32831,7 @@
32831
32831
  },
32832
32832
  {
32833
32833
  "name": "migrateTemplate",
32834
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
32834
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
32835
32835
  "ctype": "miscellaneous",
32836
32836
  "subtype": "function",
32837
32837
  "coverageIgnore": false,
@@ -32863,7 +32863,7 @@
32863
32863
  },
32864
32864
  {
32865
32865
  "name": "migrateTemplate",
32866
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
32866
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
32867
32867
  "ctype": "miscellaneous",
32868
32868
  "subtype": "function",
32869
32869
  "coverageIgnore": false,
@@ -35301,7 +35301,7 @@
35301
35301
  },
35302
35302
  {
35303
35303
  "name": "unwrapExpression",
35304
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
35304
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
35305
35305
  "ctype": "miscellaneous",
35306
35306
  "subtype": "function",
35307
35307
  "coverageIgnore": false,
@@ -35331,7 +35331,7 @@
35331
35331
  },
35332
35332
  {
35333
35333
  "name": "unwrapExpression",
35334
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
35334
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
35335
35335
  "ctype": "miscellaneous",
35336
35336
  "subtype": "function",
35337
35337
  "coverageIgnore": false,
@@ -35944,7 +35944,7 @@
35944
35944
  },
35945
35945
  {
35946
35946
  "name": "visitDir",
35947
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
35947
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
35948
35948
  "ctype": "miscellaneous",
35949
35949
  "subtype": "function",
35950
35950
  "coverageIgnore": false,
@@ -35989,7 +35989,7 @@
35989
35989
  },
35990
35990
  {
35991
35991
  "name": "visitDir",
35992
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
35992
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
35993
35993
  "ctype": "miscellaneous",
35994
35994
  "subtype": "function",
35995
35995
  "coverageIgnore": false,
@@ -36034,7 +36034,7 @@
36034
36034
  },
36035
36035
  {
36036
36036
  "name": "visitDir",
36037
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
36037
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
36038
36038
  "ctype": "miscellaneous",
36039
36039
  "subtype": "function",
36040
36040
  "coverageIgnore": false,
@@ -36079,7 +36079,7 @@
36079
36079
  },
36080
36080
  {
36081
36081
  "name": "visitDir",
36082
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
36082
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
36083
36083
  "ctype": "miscellaneous",
36084
36084
  "subtype": "function",
36085
36085
  "coverageIgnore": false,
@@ -36844,7 +36844,7 @@
36844
36844
  },
36845
36845
  {
36846
36846
  "name": "visitNodes",
36847
- "file": "packages/core/schematics/migrate-eui-alert/index.ts",
36847
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
36848
36848
  "ctype": "miscellaneous",
36849
36849
  "subtype": "function",
36850
36850
  "coverageIgnore": false,
@@ -36860,7 +36860,7 @@
36860
36860
  "deprecationMessage": ""
36861
36861
  },
36862
36862
  {
36863
- "name": "removals",
36863
+ "name": "edits",
36864
36864
  "deprecated": false,
36865
36865
  "deprecationMessage": ""
36866
36866
  }
@@ -36876,7 +36876,7 @@
36876
36876
  }
36877
36877
  },
36878
36878
  {
36879
- "name": "removals",
36879
+ "name": "edits",
36880
36880
  "deprecated": false,
36881
36881
  "deprecationMessage": "",
36882
36882
  "tagName": {
@@ -36887,7 +36887,7 @@
36887
36887
  },
36888
36888
  {
36889
36889
  "name": "visitNodes",
36890
- "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
36890
+ "file": "packages/core/schematics/migrate-eui-alert/index.ts",
36891
36891
  "ctype": "miscellaneous",
36892
36892
  "subtype": "function",
36893
36893
  "coverageIgnore": false,
@@ -36930,7 +36930,7 @@
36930
36930
  },
36931
36931
  {
36932
36932
  "name": "visitNodes",
36933
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
36933
+ "file": "packages/core/schematics/migrate-eui-avatar/index.ts",
36934
36934
  "ctype": "miscellaneous",
36935
36935
  "subtype": "function",
36936
36936
  "coverageIgnore": false,
@@ -36946,7 +36946,7 @@
36946
36946
  "deprecationMessage": ""
36947
36947
  },
36948
36948
  {
36949
- "name": "edits",
36949
+ "name": "removals",
36950
36950
  "deprecated": false,
36951
36951
  "deprecationMessage": ""
36952
36952
  }
@@ -36962,7 +36962,7 @@
36962
36962
  }
36963
36963
  },
36964
36964
  {
36965
- "name": "edits",
36965
+ "name": "removals",
36966
36966
  "deprecated": false,
36967
36967
  "deprecationMessage": "",
36968
36968
  "tagName": {
@@ -36973,7 +36973,7 @@
36973
36973
  },
36974
36974
  {
36975
36975
  "name": "visitNodes",
36976
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
36976
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
36977
36977
  "ctype": "miscellaneous",
36978
36978
  "subtype": "function",
36979
36979
  "coverageIgnore": false,
@@ -44731,10 +44731,10 @@
44731
44731
  ]
44732
44732
  }
44733
44733
  ],
44734
- "packages/core/schematics/migrate-eui-button/index.ts": [
44734
+ "packages/core/schematics/migrate-eui-accent/index.ts": [
44735
44735
  {
44736
44736
  "name": "applyEdits",
44737
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44737
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44738
44738
  "ctype": "miscellaneous",
44739
44739
  "subtype": "function",
44740
44740
  "coverageIgnore": false,
@@ -44779,7 +44779,7 @@
44779
44779
  },
44780
44780
  {
44781
44781
  "name": "collectRenames",
44782
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44782
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44783
44783
  "ctype": "miscellaneous",
44784
44784
  "subtype": "function",
44785
44785
  "coverageIgnore": false,
@@ -44823,8 +44823,8 @@
44823
44823
  ]
44824
44824
  },
44825
44825
  {
44826
- "name": "hasEuiButtonAttribute",
44827
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44826
+ "name": "isComponentMetadataProperty",
44827
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44828
44828
  "ctype": "miscellaneous",
44829
44829
  "subtype": "function",
44830
44830
  "coverageIgnore": false,
@@ -44832,11 +44832,10 @@
44832
44832
  "deprecationMessage": "",
44833
44833
  "rawdescription": "",
44834
44834
  "description": "",
44835
- "displayName": "hasEuiButtonAttribute",
44835
+ "displayName": "isComponentMetadataProperty",
44836
44836
  "args": [
44837
44837
  {
44838
- "name": "element",
44839
- "type": "TmplAstElement",
44838
+ "name": "node",
44840
44839
  "deprecated": false,
44841
44840
  "deprecationMessage": ""
44842
44841
  }
@@ -44844,8 +44843,7 @@
44844
44843
  "returnType": "boolean",
44845
44844
  "jsdoctags": [
44846
44845
  {
44847
- "name": "element",
44848
- "type": "TmplAstElement",
44846
+ "name": "node",
44849
44847
  "deprecated": false,
44850
44848
  "deprecationMessage": "",
44851
44849
  "tagName": {
@@ -44855,8 +44853,8 @@
44855
44853
  ]
44856
44854
  },
44857
44855
  {
44858
- "name": "isComponentMetadataProperty",
44859
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44856
+ "name": "isEuiElement",
44857
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44860
44858
  "ctype": "miscellaneous",
44861
44859
  "subtype": "function",
44862
44860
  "coverageIgnore": false,
@@ -44864,10 +44862,11 @@
44864
44862
  "deprecationMessage": "",
44865
44863
  "rawdescription": "",
44866
44864
  "description": "",
44867
- "displayName": "isComponentMetadataProperty",
44865
+ "displayName": "isEuiElement",
44868
44866
  "args": [
44869
44867
  {
44870
- "name": "node",
44868
+ "name": "element",
44869
+ "type": "TmplAstElement",
44871
44870
  "deprecated": false,
44872
44871
  "deprecationMessage": ""
44873
44872
  }
@@ -44875,7 +44874,8 @@
44875
44874
  "returnType": "boolean",
44876
44875
  "jsdoctags": [
44877
44876
  {
44878
- "name": "node",
44877
+ "name": "element",
44878
+ "type": "TmplAstElement",
44879
44879
  "deprecated": false,
44880
44880
  "deprecationMessage": "",
44881
44881
  "tagName": {
@@ -44886,7 +44886,7 @@
44886
44886
  },
44887
44887
  {
44888
44888
  "name": "isTemplateProperty",
44889
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44889
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44890
44890
  "ctype": "miscellaneous",
44891
44891
  "subtype": "function",
44892
44892
  "coverageIgnore": false,
@@ -44915,8 +44915,8 @@
44915
44915
  ]
44916
44916
  },
44917
44917
  {
44918
- "name": "migrateEuiButton",
44919
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44918
+ "name": "migrateEuiAccent",
44919
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44920
44920
  "ctype": "miscellaneous",
44921
44921
  "subtype": "function",
44922
44922
  "coverageIgnore": false,
@@ -44924,7 +44924,7 @@
44924
44924
  "deprecationMessage": "",
44925
44925
  "rawdescription": "",
44926
44926
  "description": "",
44927
- "displayName": "migrateEuiButton",
44927
+ "displayName": "migrateEuiAccent",
44928
44928
  "args": [
44929
44929
  {
44930
44930
  "name": "options",
@@ -44950,7 +44950,7 @@
44950
44950
  },
44951
44951
  {
44952
44952
  "name": "migrateInlineTemplates",
44953
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44953
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44954
44954
  "ctype": "miscellaneous",
44955
44955
  "subtype": "function",
44956
44956
  "coverageIgnore": false,
@@ -44982,7 +44982,7 @@
44982
44982
  },
44983
44983
  {
44984
44984
  "name": "migrateTemplate",
44985
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
44985
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
44986
44986
  "ctype": "miscellaneous",
44987
44987
  "subtype": "function",
44988
44988
  "coverageIgnore": false,
@@ -45012,9 +45012,41 @@
45012
45012
  }
45013
45013
  ]
45014
45014
  },
45015
+ {
45016
+ "name": "renameTsPropertyAccesses",
45017
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45018
+ "ctype": "miscellaneous",
45019
+ "subtype": "function",
45020
+ "coverageIgnore": false,
45021
+ "deprecated": false,
45022
+ "deprecationMessage": "",
45023
+ "rawdescription": "",
45024
+ "description": "",
45025
+ "displayName": "renameTsPropertyAccesses",
45026
+ "args": [
45027
+ {
45028
+ "name": "source",
45029
+ "type": "string",
45030
+ "deprecated": false,
45031
+ "deprecationMessage": ""
45032
+ }
45033
+ ],
45034
+ "returnType": "string",
45035
+ "jsdoctags": [
45036
+ {
45037
+ "name": "source",
45038
+ "type": "string",
45039
+ "deprecated": false,
45040
+ "deprecationMessage": "",
45041
+ "tagName": {
45042
+ "text": "param"
45043
+ }
45044
+ }
45045
+ ]
45046
+ },
45015
45047
  {
45016
45048
  "name": "unwrapExpression",
45017
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
45049
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45018
45050
  "ctype": "miscellaneous",
45019
45051
  "subtype": "function",
45020
45052
  "coverageIgnore": false,
@@ -45044,7 +45076,7 @@
45044
45076
  },
45045
45077
  {
45046
45078
  "name": "visitDir",
45047
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
45079
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45048
45080
  "ctype": "miscellaneous",
45049
45081
  "subtype": "function",
45050
45082
  "coverageIgnore": false,
@@ -45089,7 +45121,7 @@
45089
45121
  },
45090
45122
  {
45091
45123
  "name": "visitNodes",
45092
- "file": "packages/core/schematics/migrate-eui-button/index.ts",
45124
+ "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45093
45125
  "ctype": "miscellaneous",
45094
45126
  "subtype": "function",
45095
45127
  "coverageIgnore": false,
@@ -45131,10 +45163,10 @@
45131
45163
  ]
45132
45164
  }
45133
45165
  ],
45134
- "packages/core/schematics/migrate-eui-accent/index.ts": [
45166
+ "packages/core/schematics/migrate-eui-button/index.ts": [
45135
45167
  {
45136
45168
  "name": "applyEdits",
45137
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45169
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45138
45170
  "ctype": "miscellaneous",
45139
45171
  "subtype": "function",
45140
45172
  "coverageIgnore": false,
@@ -45179,7 +45211,7 @@
45179
45211
  },
45180
45212
  {
45181
45213
  "name": "collectRenames",
45182
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45214
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45183
45215
  "ctype": "miscellaneous",
45184
45216
  "subtype": "function",
45185
45217
  "coverageIgnore": false,
@@ -45223,8 +45255,8 @@
45223
45255
  ]
45224
45256
  },
45225
45257
  {
45226
- "name": "isComponentMetadataProperty",
45227
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45258
+ "name": "hasEuiButtonAttribute",
45259
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45228
45260
  "ctype": "miscellaneous",
45229
45261
  "subtype": "function",
45230
45262
  "coverageIgnore": false,
@@ -45232,10 +45264,11 @@
45232
45264
  "deprecationMessage": "",
45233
45265
  "rawdescription": "",
45234
45266
  "description": "",
45235
- "displayName": "isComponentMetadataProperty",
45267
+ "displayName": "hasEuiButtonAttribute",
45236
45268
  "args": [
45237
45269
  {
45238
- "name": "node",
45270
+ "name": "element",
45271
+ "type": "TmplAstElement",
45239
45272
  "deprecated": false,
45240
45273
  "deprecationMessage": ""
45241
45274
  }
@@ -45243,7 +45276,8 @@
45243
45276
  "returnType": "boolean",
45244
45277
  "jsdoctags": [
45245
45278
  {
45246
- "name": "node",
45279
+ "name": "element",
45280
+ "type": "TmplAstElement",
45247
45281
  "deprecated": false,
45248
45282
  "deprecationMessage": "",
45249
45283
  "tagName": {
@@ -45253,8 +45287,8 @@
45253
45287
  ]
45254
45288
  },
45255
45289
  {
45256
- "name": "isEuiElement",
45257
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45290
+ "name": "isComponentMetadataProperty",
45291
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45258
45292
  "ctype": "miscellaneous",
45259
45293
  "subtype": "function",
45260
45294
  "coverageIgnore": false,
@@ -45262,11 +45296,10 @@
45262
45296
  "deprecationMessage": "",
45263
45297
  "rawdescription": "",
45264
45298
  "description": "",
45265
- "displayName": "isEuiElement",
45299
+ "displayName": "isComponentMetadataProperty",
45266
45300
  "args": [
45267
45301
  {
45268
- "name": "element",
45269
- "type": "TmplAstElement",
45302
+ "name": "node",
45270
45303
  "deprecated": false,
45271
45304
  "deprecationMessage": ""
45272
45305
  }
@@ -45274,8 +45307,7 @@
45274
45307
  "returnType": "boolean",
45275
45308
  "jsdoctags": [
45276
45309
  {
45277
- "name": "element",
45278
- "type": "TmplAstElement",
45310
+ "name": "node",
45279
45311
  "deprecated": false,
45280
45312
  "deprecationMessage": "",
45281
45313
  "tagName": {
@@ -45286,7 +45318,7 @@
45286
45318
  },
45287
45319
  {
45288
45320
  "name": "isTemplateProperty",
45289
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45321
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45290
45322
  "ctype": "miscellaneous",
45291
45323
  "subtype": "function",
45292
45324
  "coverageIgnore": false,
@@ -45315,8 +45347,8 @@
45315
45347
  ]
45316
45348
  },
45317
45349
  {
45318
- "name": "migrateEuiAccent",
45319
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45350
+ "name": "migrateEuiButton",
45351
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45320
45352
  "ctype": "miscellaneous",
45321
45353
  "subtype": "function",
45322
45354
  "coverageIgnore": false,
@@ -45324,7 +45356,7 @@
45324
45356
  "deprecationMessage": "",
45325
45357
  "rawdescription": "",
45326
45358
  "description": "",
45327
- "displayName": "migrateEuiAccent",
45359
+ "displayName": "migrateEuiButton",
45328
45360
  "args": [
45329
45361
  {
45330
45362
  "name": "options",
@@ -45350,7 +45382,7 @@
45350
45382
  },
45351
45383
  {
45352
45384
  "name": "migrateInlineTemplates",
45353
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45385
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45354
45386
  "ctype": "miscellaneous",
45355
45387
  "subtype": "function",
45356
45388
  "coverageIgnore": false,
@@ -45382,7 +45414,7 @@
45382
45414
  },
45383
45415
  {
45384
45416
  "name": "migrateTemplate",
45385
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45417
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45386
45418
  "ctype": "miscellaneous",
45387
45419
  "subtype": "function",
45388
45420
  "coverageIgnore": false,
@@ -45412,41 +45444,9 @@
45412
45444
  }
45413
45445
  ]
45414
45446
  },
45415
- {
45416
- "name": "renameTsPropertyAccesses",
45417
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45418
- "ctype": "miscellaneous",
45419
- "subtype": "function",
45420
- "coverageIgnore": false,
45421
- "deprecated": false,
45422
- "deprecationMessage": "",
45423
- "rawdescription": "",
45424
- "description": "",
45425
- "displayName": "renameTsPropertyAccesses",
45426
- "args": [
45427
- {
45428
- "name": "source",
45429
- "type": "string",
45430
- "deprecated": false,
45431
- "deprecationMessage": ""
45432
- }
45433
- ],
45434
- "returnType": "string",
45435
- "jsdoctags": [
45436
- {
45437
- "name": "source",
45438
- "type": "string",
45439
- "deprecated": false,
45440
- "deprecationMessage": "",
45441
- "tagName": {
45442
- "text": "param"
45443
- }
45444
- }
45445
- ]
45446
- },
45447
45447
  {
45448
45448
  "name": "unwrapExpression",
45449
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45449
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45450
45450
  "ctype": "miscellaneous",
45451
45451
  "subtype": "function",
45452
45452
  "coverageIgnore": false,
@@ -45476,7 +45476,7 @@
45476
45476
  },
45477
45477
  {
45478
45478
  "name": "visitDir",
45479
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45479
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45480
45480
  "ctype": "miscellaneous",
45481
45481
  "subtype": "function",
45482
45482
  "coverageIgnore": false,
@@ -45521,7 +45521,7 @@
45521
45521
  },
45522
45522
  {
45523
45523
  "name": "visitNodes",
45524
- "file": "packages/core/schematics/migrate-eui-accent/index.ts",
45524
+ "file": "packages/core/schematics/migrate-eui-button/index.ts",
45525
45525
  "ctype": "miscellaneous",
45526
45526
  "subtype": "function",
45527
45527
  "coverageIgnore": false,