@eui/core 22.0.0-alpha.53 → 22.0.0-alpha.55

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.
@@ -2771,12 +2771,12 @@
2771
2771
  },
2772
2772
  {
2773
2773
  "name": "Schema",
2774
- "id": "interface-Schema-21147930d3fbc38fbb3052a2ed9e7aa2b7505e6ed8c88c28796ce7101bd2ad914726eb230dda5826647036190edec6dae7e7e1d172387cd3803aa00bcdf790be-13",
2775
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
2774
+ "id": "interface-Schema-b3ff4600c4a5ca1888c45e5baf3600fa6dc6477f1e473e5241ff6682e2929dc8950a5dfa8b1048a348dba7ad1f0ce8cc3681471933911b689e04713334ef4811-13",
2775
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
2776
2776
  "deprecated": false,
2777
2777
  "deprecationMessage": "",
2778
2778
  "type": "interface",
2779
- "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",
2779
+ "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",
2780
2780
  "displayName": "Schema",
2781
2781
  "properties": [
2782
2782
  {
@@ -2818,12 +2818,12 @@
2818
2818
  },
2819
2819
  {
2820
2820
  "name": "Schema",
2821
- "id": "interface-Schema-a806c1769fb526271565003a6a3ef9ab4c67e421d93ee0cb54e1f6de223807afc1f16ad294656ef614a77a91a38cc914ce41ac97ed3a8a4195a1e74a729c0c08-14",
2822
- "file": "packages/core/schematics/migrate-eui-popover/index.ts",
2821
+ "id": "interface-Schema-21147930d3fbc38fbb3052a2ed9e7aa2b7505e6ed8c88c28796ce7101bd2ad914726eb230dda5826647036190edec6dae7e7e1d172387cd3803aa00bcdf790be-14",
2822
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
2823
2823
  "deprecated": false,
2824
2824
  "deprecationMessage": "",
2825
2825
  "type": "interface",
2826
- "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['type']);\n\nexport function migrateEuiPopover(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-popover')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'type' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && (original.includes('eui-popover') || original.includes('euiPopover') || original.includes('EuiPopover'))) {\n if (original.includes('type')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'type') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"type\" is no longer a valid input on eui-popover. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Removed deprecated eui-popover 'type' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n // Extend start backwards to consume leading whitespace\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-popover')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-popover') {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
2826
+ "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",
2827
2827
  "displayName": "Schema",
2828
2828
  "properties": [
2829
2829
  {
@@ -2865,12 +2865,12 @@
2865
2865
  },
2866
2866
  {
2867
2867
  "name": "Schema",
2868
- "id": "interface-Schema-b3ff4600c4a5ca1888c45e5baf3600fa6dc6477f1e473e5241ff6682e2929dc8950a5dfa8b1048a348dba7ad1f0ce8cc3681471933911b689e04713334ef4811-15",
2869
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
2868
+ "id": "interface-Schema-a806c1769fb526271565003a6a3ef9ab4c67e421d93ee0cb54e1f6de223807afc1f16ad294656ef614a77a91a38cc914ce41ac97ed3a8a4195a1e74a729c0c08-15",
2869
+ "file": "packages/core/schematics/migrate-eui-popover/index.ts",
2870
2870
  "deprecated": false,
2871
2871
  "deprecationMessage": "",
2872
2872
  "type": "interface",
2873
- "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",
2873
+ "sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst REMOVED_INPUTS = new Set(['type']);\n\nexport function migrateEuiPopover(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes('eui-popover')) return;\n\n const result = path.endsWith('.html')\n ? migrateTemplate(original)\n : migrateInlineTemplates(original);\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would remove 'type' input in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS usages inline\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && (original.includes('eui-popover') || original.includes('euiPopover') || original.includes('EuiPopover'))) {\n if (original.includes('type')) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === 'type') {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(\n `${path}:${line + 1} - Manual action needed: \"type\" is no longer a valid input on eui-popover. Remove this assignment.`,\n );\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n }\n });\n\n context.logger.info(`Removed deprecated eui-popover 'type' input from ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const removals: { start: number; end: number }[] = [];\n\n visitNodes(parsed.nodes, removals);\n\n let result = source;\n for (const { start, end } of removals.sort((a, b) => b.start - a.start)) {\n // Extend start backwards to consume leading whitespace\n let adjustedStart = start;\n while (adjustedStart > 0 && (result[adjustedStart - 1] === ' ' || result[adjustedStart - 1] === '\\t')) {\n adjustedStart--;\n }\n result = result.slice(0, adjustedStart) + result.slice(end);\n }\n\n return result;\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const templateRegex = /template\\s*:\\s*`([^`]*)`/gs;\n return source.replace(templateRegex, (match, templateContent: string) => {\n if (!templateContent.includes('eui-popover')) return match;\n const migrated = migrateTemplate(templateContent);\n if (migrated === templateContent) return match;\n return match.replace(templateContent, migrated);\n });\n}\n\nfunction visitNodes(nodes: TmplAstNode[], removals: { start: number; end: number }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === 'eui-popover') {\n collectRemovals(node, removals);\n }\n visitNodes(node.children, removals);\n }\n }\n}\n\nfunction collectRemovals(element: TmplAstElement, removals: { start: number; end: number }[]): void {\n for (const attr of element.attributes) {\n if (REMOVED_INPUTS.has(attr.name)) {\n removals.push(getAttributeSpan(attr));\n }\n }\n for (const input of element.inputs) {\n if (REMOVED_INPUTS.has(input.name)) {\n removals.push(getAttributeSpan(input));\n }\n }\n}\n\nfunction getAttributeSpan(attr: TmplAstTextAttribute | TmplAstBoundAttribute): { start: number; end: number } {\n return { start: attr.sourceSpan.start.offset, end: attr.sourceSpan.end.offset };\n}\n",
2874
2874
  "displayName": "Schema",
2875
2875
  "properties": [
2876
2876
  {
@@ -22325,23 +22325,23 @@
22325
22325
  "name": "COMPONENT_TAG",
22326
22326
  "ctype": "miscellaneous",
22327
22327
  "subtype": "variable",
22328
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
22328
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
22329
22329
  "coverageIgnore": false,
22330
22330
  "deprecated": false,
22331
22331
  "deprecationMessage": "",
22332
22332
  "type": "string",
22333
- "defaultValue": "'eui-icon-toggle'"
22333
+ "defaultValue": "'eui-icon-svg'"
22334
22334
  },
22335
22335
  {
22336
22336
  "name": "COMPONENT_TAG",
22337
22337
  "ctype": "miscellaneous",
22338
22338
  "subtype": "variable",
22339
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
22339
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
22340
22340
  "coverageIgnore": false,
22341
22341
  "deprecated": false,
22342
22342
  "deprecationMessage": "",
22343
22343
  "type": "string",
22344
- "defaultValue": "'eui-icon-svg'"
22344
+ "defaultValue": "'eui-icon-toggle'"
22345
22345
  },
22346
22346
  {
22347
22347
  "name": "CONFIG_TOKEN",
@@ -24608,7 +24608,7 @@
24608
24608
  },
24609
24609
  {
24610
24610
  "name": "applyEdits",
24611
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
24611
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
24612
24612
  "ctype": "miscellaneous",
24613
24613
  "subtype": "function",
24614
24614
  "coverageIgnore": false,
@@ -24653,7 +24653,7 @@
24653
24653
  },
24654
24654
  {
24655
24655
  "name": "applyEdits",
24656
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
24656
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
24657
24657
  "ctype": "miscellaneous",
24658
24658
  "subtype": "function",
24659
24659
  "coverageIgnore": false,
@@ -26370,7 +26370,7 @@
26370
26370
  },
26371
26371
  {
26372
26372
  "name": "collectRenames",
26373
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
26373
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
26374
26374
  "ctype": "miscellaneous",
26375
26375
  "subtype": "function",
26376
26376
  "coverageIgnore": false,
@@ -26415,7 +26415,7 @@
26415
26415
  },
26416
26416
  {
26417
26417
  "name": "collectRenames",
26418
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
26418
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
26419
26419
  "ctype": "miscellaneous",
26420
26420
  "subtype": "function",
26421
26421
  "coverageIgnore": false,
@@ -30000,7 +30000,7 @@
30000
30000
  },
30001
30001
  {
30002
30002
  "name": "isComponentMetadataProperty",
30003
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30003
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30004
30004
  "ctype": "miscellaneous",
30005
30005
  "subtype": "function",
30006
30006
  "coverageIgnore": false,
@@ -30030,7 +30030,7 @@
30030
30030
  },
30031
30031
  {
30032
30032
  "name": "isComponentMetadataProperty",
30033
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30033
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30034
30034
  "ctype": "miscellaneous",
30035
30035
  "subtype": "function",
30036
30036
  "coverageIgnore": false,
@@ -30545,7 +30545,7 @@
30545
30545
  },
30546
30546
  {
30547
30547
  "name": "isTemplateProperty",
30548
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30548
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30549
30549
  "ctype": "miscellaneous",
30550
30550
  "subtype": "function",
30551
30551
  "coverageIgnore": false,
@@ -30575,7 +30575,7 @@
30575
30575
  },
30576
30576
  {
30577
30577
  "name": "isTemplateProperty",
30578
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
30578
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
30579
30579
  "ctype": "miscellaneous",
30580
30580
  "subtype": "function",
30581
30581
  "coverageIgnore": false,
@@ -32515,7 +32515,7 @@
32515
32515
  },
32516
32516
  {
32517
32517
  "name": "migrateInlineTemplates",
32518
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
32518
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
32519
32519
  "ctype": "miscellaneous",
32520
32520
  "subtype": "function",
32521
32521
  "coverageIgnore": false,
@@ -32547,7 +32547,7 @@
32547
32547
  },
32548
32548
  {
32549
32549
  "name": "migrateInlineTemplates",
32550
- "file": "packages/core/schematics/migrate-eui-popover/index.ts",
32550
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
32551
32551
  "ctype": "miscellaneous",
32552
32552
  "subtype": "function",
32553
32553
  "coverageIgnore": false,
@@ -32579,7 +32579,7 @@
32579
32579
  },
32580
32580
  {
32581
32581
  "name": "migrateInlineTemplates",
32582
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
32582
+ "file": "packages/core/schematics/migrate-eui-popover/index.ts",
32583
32583
  "ctype": "miscellaneous",
32584
32584
  "subtype": "function",
32585
32585
  "coverageIgnore": false,
@@ -33055,7 +33055,7 @@
33055
33055
  },
33056
33056
  {
33057
33057
  "name": "migrateTemplate",
33058
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
33058
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
33059
33059
  "ctype": "miscellaneous",
33060
33060
  "subtype": "function",
33061
33061
  "coverageIgnore": false,
@@ -33087,7 +33087,7 @@
33087
33087
  },
33088
33088
  {
33089
33089
  "name": "migrateTemplate",
33090
- "file": "packages/core/schematics/migrate-eui-popover/index.ts",
33090
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
33091
33091
  "ctype": "miscellaneous",
33092
33092
  "subtype": "function",
33093
33093
  "coverageIgnore": false,
@@ -33119,7 +33119,7 @@
33119
33119
  },
33120
33120
  {
33121
33121
  "name": "migrateTemplate",
33122
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
33122
+ "file": "packages/core/schematics/migrate-eui-popover/index.ts",
33123
33123
  "ctype": "miscellaneous",
33124
33124
  "subtype": "function",
33125
33125
  "coverageIgnore": false,
@@ -34341,7 +34341,7 @@
34341
34341
  },
34342
34342
  {
34343
34343
  "name": "renameTsPropertyAccesses",
34344
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
34344
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
34345
34345
  "ctype": "miscellaneous",
34346
34346
  "subtype": "function",
34347
34347
  "coverageIgnore": false,
@@ -34373,7 +34373,7 @@
34373
34373
  },
34374
34374
  {
34375
34375
  "name": "renameTsPropertyAccesses",
34376
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
34376
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
34377
34377
  "ctype": "miscellaneous",
34378
34378
  "subtype": "function",
34379
34379
  "coverageIgnore": false,
@@ -35451,7 +35451,7 @@
35451
35451
  },
35452
35452
  {
35453
35453
  "name": "unwrapExpression",
35454
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
35454
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
35455
35455
  "ctype": "miscellaneous",
35456
35456
  "subtype": "function",
35457
35457
  "coverageIgnore": false,
@@ -35481,7 +35481,7 @@
35481
35481
  },
35482
35482
  {
35483
35483
  "name": "unwrapExpression",
35484
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
35484
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
35485
35485
  "ctype": "miscellaneous",
35486
35486
  "subtype": "function",
35487
35487
  "coverageIgnore": false,
@@ -36349,7 +36349,7 @@
36349
36349
  },
36350
36350
  {
36351
36351
  "name": "visitDir",
36352
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
36352
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
36353
36353
  "ctype": "miscellaneous",
36354
36354
  "subtype": "function",
36355
36355
  "coverageIgnore": false,
@@ -36394,7 +36394,7 @@
36394
36394
  },
36395
36395
  {
36396
36396
  "name": "visitDir",
36397
- "file": "packages/core/schematics/migrate-eui-popover/index.ts",
36397
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
36398
36398
  "ctype": "miscellaneous",
36399
36399
  "subtype": "function",
36400
36400
  "coverageIgnore": false,
@@ -36439,7 +36439,7 @@
36439
36439
  },
36440
36440
  {
36441
36441
  "name": "visitDir",
36442
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
36442
+ "file": "packages/core/schematics/migrate-eui-popover/index.ts",
36443
36443
  "ctype": "miscellaneous",
36444
36444
  "subtype": "function",
36445
36445
  "coverageIgnore": false,
@@ -37261,7 +37261,7 @@
37261
37261
  },
37262
37262
  {
37263
37263
  "name": "visitNodes",
37264
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
37264
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
37265
37265
  "ctype": "miscellaneous",
37266
37266
  "subtype": "function",
37267
37267
  "coverageIgnore": false,
@@ -37304,7 +37304,7 @@
37304
37304
  },
37305
37305
  {
37306
37306
  "name": "visitNodes",
37307
- "file": "packages/core/schematics/migrate-eui-popover/index.ts",
37307
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
37308
37308
  "ctype": "miscellaneous",
37309
37309
  "subtype": "function",
37310
37310
  "coverageIgnore": false,
@@ -37320,7 +37320,7 @@
37320
37320
  "deprecationMessage": ""
37321
37321
  },
37322
37322
  {
37323
- "name": "removals",
37323
+ "name": "edits",
37324
37324
  "deprecated": false,
37325
37325
  "deprecationMessage": ""
37326
37326
  }
@@ -37336,7 +37336,7 @@
37336
37336
  }
37337
37337
  },
37338
37338
  {
37339
- "name": "removals",
37339
+ "name": "edits",
37340
37340
  "deprecated": false,
37341
37341
  "deprecationMessage": "",
37342
37342
  "tagName": {
@@ -37347,7 +37347,7 @@
37347
37347
  },
37348
37348
  {
37349
37349
  "name": "visitNodes",
37350
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
37350
+ "file": "packages/core/schematics/migrate-eui-popover/index.ts",
37351
37351
  "ctype": "miscellaneous",
37352
37352
  "subtype": "function",
37353
37353
  "coverageIgnore": false,
@@ -37363,7 +37363,7 @@
37363
37363
  "deprecationMessage": ""
37364
37364
  },
37365
37365
  {
37366
- "name": "edits",
37366
+ "name": "removals",
37367
37367
  "deprecated": false,
37368
37368
  "deprecationMessage": ""
37369
37369
  }
@@ -37379,7 +37379,7 @@
37379
37379
  }
37380
37380
  },
37381
37381
  {
37382
- "name": "edits",
37382
+ "name": "removals",
37383
37383
  "deprecated": false,
37384
37384
  "deprecationMessage": "",
37385
37385
  "tagName": {
@@ -39159,74 +39159,74 @@
39159
39159
  "defaultValue": "'iconSvgType'"
39160
39160
  }
39161
39161
  ],
39162
- "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
39162
+ "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
39163
39163
  {
39164
39164
  "name": "COMPONENT_TAG",
39165
39165
  "ctype": "miscellaneous",
39166
39166
  "subtype": "variable",
39167
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39167
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39168
39168
  "coverageIgnore": false,
39169
39169
  "deprecated": false,
39170
39170
  "deprecationMessage": "",
39171
39171
  "type": "string",
39172
- "defaultValue": "'eui-icon-toggle'"
39172
+ "defaultValue": "'eui-icon-svg'"
39173
39173
  },
39174
39174
  {
39175
- "name": "NEW_NAME",
39175
+ "name": "INPUT_RENAMES",
39176
39176
  "ctype": "miscellaneous",
39177
39177
  "subtype": "variable",
39178
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39178
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39179
39179
  "coverageIgnore": false,
39180
39180
  "deprecated": false,
39181
39181
  "deprecationMessage": "",
39182
- "type": "string",
39183
- "defaultValue": "'iconSvgName'"
39182
+ "type": "unknown",
39183
+ "defaultValue": "new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n])"
39184
39184
  },
39185
39185
  {
39186
- "name": "OLD_NAME",
39186
+ "name": "TS_PROPERTY_RENAMES",
39187
39187
  "ctype": "miscellaneous",
39188
39188
  "subtype": "variable",
39189
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39189
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39190
39190
  "coverageIgnore": false,
39191
39191
  "deprecated": false,
39192
39192
  "deprecationMessage": "",
39193
- "type": "string",
39194
- "defaultValue": "'iconSet'"
39193
+ "type": "unknown",
39194
+ "defaultValue": "new Map([\n ['variant', 'fillColor'],\n])"
39195
39195
  }
39196
39196
  ],
39197
- "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
39197
+ "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
39198
39198
  {
39199
39199
  "name": "COMPONENT_TAG",
39200
39200
  "ctype": "miscellaneous",
39201
39201
  "subtype": "variable",
39202
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39202
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39203
39203
  "coverageIgnore": false,
39204
39204
  "deprecated": false,
39205
39205
  "deprecationMessage": "",
39206
39206
  "type": "string",
39207
- "defaultValue": "'eui-icon-svg'"
39207
+ "defaultValue": "'eui-icon-toggle'"
39208
39208
  },
39209
39209
  {
39210
- "name": "INPUT_RENAMES",
39210
+ "name": "NEW_NAME",
39211
39211
  "ctype": "miscellaneous",
39212
39212
  "subtype": "variable",
39213
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39213
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39214
39214
  "coverageIgnore": false,
39215
39215
  "deprecated": false,
39216
39216
  "deprecationMessage": "",
39217
- "type": "unknown",
39218
- "defaultValue": "new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n])"
39217
+ "type": "string",
39218
+ "defaultValue": "'iconSvgName'"
39219
39219
  },
39220
39220
  {
39221
- "name": "TS_PROPERTY_RENAMES",
39221
+ "name": "OLD_NAME",
39222
39222
  "ctype": "miscellaneous",
39223
39223
  "subtype": "variable",
39224
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
39224
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
39225
39225
  "coverageIgnore": false,
39226
39226
  "deprecated": false,
39227
39227
  "deprecationMessage": "",
39228
- "type": "unknown",
39229
- "defaultValue": "new Map([\n ['variant', 'fillColor'],\n])"
39228
+ "type": "string",
39229
+ "defaultValue": "'iconSet'"
39230
39230
  }
39231
39231
  ],
39232
39232
  "packages/core/src/lib/helpers/event-helpers.ts": [
@@ -46361,10 +46361,10 @@
46361
46361
  ]
46362
46362
  }
46363
46363
  ],
46364
- "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
46364
+ "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
46365
46365
  {
46366
46366
  "name": "applyEdits",
46367
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46367
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46368
46368
  "ctype": "miscellaneous",
46369
46369
  "subtype": "function",
46370
46370
  "coverageIgnore": false,
@@ -46409,7 +46409,7 @@
46409
46409
  },
46410
46410
  {
46411
46411
  "name": "collectRenames",
46412
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46412
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46413
46413
  "ctype": "miscellaneous",
46414
46414
  "subtype": "function",
46415
46415
  "coverageIgnore": false,
@@ -46454,7 +46454,7 @@
46454
46454
  },
46455
46455
  {
46456
46456
  "name": "isComponentMetadataProperty",
46457
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46457
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46458
46458
  "ctype": "miscellaneous",
46459
46459
  "subtype": "function",
46460
46460
  "coverageIgnore": false,
@@ -46484,7 +46484,7 @@
46484
46484
  },
46485
46485
  {
46486
46486
  "name": "isTemplateProperty",
46487
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46487
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46488
46488
  "ctype": "miscellaneous",
46489
46489
  "subtype": "function",
46490
46490
  "coverageIgnore": false,
@@ -46513,8 +46513,8 @@
46513
46513
  ]
46514
46514
  },
46515
46515
  {
46516
- "name": "migrateEuiIconToggle",
46517
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46516
+ "name": "migrateEuiIconSvg",
46517
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46518
46518
  "ctype": "miscellaneous",
46519
46519
  "subtype": "function",
46520
46520
  "coverageIgnore": false,
@@ -46522,7 +46522,7 @@
46522
46522
  "deprecationMessage": "",
46523
46523
  "rawdescription": "",
46524
46524
  "description": "",
46525
- "displayName": "migrateEuiIconToggle",
46525
+ "displayName": "migrateEuiIconSvg",
46526
46526
  "args": [
46527
46527
  {
46528
46528
  "name": "options",
@@ -46548,7 +46548,7 @@
46548
46548
  },
46549
46549
  {
46550
46550
  "name": "migrateInlineTemplates",
46551
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46551
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46552
46552
  "ctype": "miscellaneous",
46553
46553
  "subtype": "function",
46554
46554
  "coverageIgnore": false,
@@ -46580,7 +46580,7 @@
46580
46580
  },
46581
46581
  {
46582
46582
  "name": "migrateTemplate",
46583
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46583
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46584
46584
  "ctype": "miscellaneous",
46585
46585
  "subtype": "function",
46586
46586
  "coverageIgnore": false,
@@ -46612,7 +46612,7 @@
46612
46612
  },
46613
46613
  {
46614
46614
  "name": "renameTsPropertyAccesses",
46615
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46615
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46616
46616
  "ctype": "miscellaneous",
46617
46617
  "subtype": "function",
46618
46618
  "coverageIgnore": false,
@@ -46644,7 +46644,7 @@
46644
46644
  },
46645
46645
  {
46646
46646
  "name": "unwrapExpression",
46647
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46647
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46648
46648
  "ctype": "miscellaneous",
46649
46649
  "subtype": "function",
46650
46650
  "coverageIgnore": false,
@@ -46674,7 +46674,7 @@
46674
46674
  },
46675
46675
  {
46676
46676
  "name": "visitDir",
46677
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46677
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46678
46678
  "ctype": "miscellaneous",
46679
46679
  "subtype": "function",
46680
46680
  "coverageIgnore": false,
@@ -46719,7 +46719,7 @@
46719
46719
  },
46720
46720
  {
46721
46721
  "name": "visitNodes",
46722
- "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46722
+ "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46723
46723
  "ctype": "miscellaneous",
46724
46724
  "subtype": "function",
46725
46725
  "coverageIgnore": false,
@@ -46761,10 +46761,10 @@
46761
46761
  ]
46762
46762
  }
46763
46763
  ],
46764
- "packages/core/schematics/migrate-eui-icon-svg/index.ts": [
46764
+ "packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
46765
46765
  {
46766
46766
  "name": "applyEdits",
46767
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46767
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46768
46768
  "ctype": "miscellaneous",
46769
46769
  "subtype": "function",
46770
46770
  "coverageIgnore": false,
@@ -46809,7 +46809,7 @@
46809
46809
  },
46810
46810
  {
46811
46811
  "name": "collectRenames",
46812
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46812
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46813
46813
  "ctype": "miscellaneous",
46814
46814
  "subtype": "function",
46815
46815
  "coverageIgnore": false,
@@ -46854,7 +46854,7 @@
46854
46854
  },
46855
46855
  {
46856
46856
  "name": "isComponentMetadataProperty",
46857
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46857
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46858
46858
  "ctype": "miscellaneous",
46859
46859
  "subtype": "function",
46860
46860
  "coverageIgnore": false,
@@ -46884,7 +46884,7 @@
46884
46884
  },
46885
46885
  {
46886
46886
  "name": "isTemplateProperty",
46887
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46887
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46888
46888
  "ctype": "miscellaneous",
46889
46889
  "subtype": "function",
46890
46890
  "coverageIgnore": false,
@@ -46913,8 +46913,8 @@
46913
46913
  ]
46914
46914
  },
46915
46915
  {
46916
- "name": "migrateEuiIconSvg",
46917
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46916
+ "name": "migrateEuiIconToggle",
46917
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46918
46918
  "ctype": "miscellaneous",
46919
46919
  "subtype": "function",
46920
46920
  "coverageIgnore": false,
@@ -46922,7 +46922,7 @@
46922
46922
  "deprecationMessage": "",
46923
46923
  "rawdescription": "",
46924
46924
  "description": "",
46925
- "displayName": "migrateEuiIconSvg",
46925
+ "displayName": "migrateEuiIconToggle",
46926
46926
  "args": [
46927
46927
  {
46928
46928
  "name": "options",
@@ -46948,7 +46948,7 @@
46948
46948
  },
46949
46949
  {
46950
46950
  "name": "migrateInlineTemplates",
46951
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46951
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46952
46952
  "ctype": "miscellaneous",
46953
46953
  "subtype": "function",
46954
46954
  "coverageIgnore": false,
@@ -46980,7 +46980,7 @@
46980
46980
  },
46981
46981
  {
46982
46982
  "name": "migrateTemplate",
46983
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
46983
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
46984
46984
  "ctype": "miscellaneous",
46985
46985
  "subtype": "function",
46986
46986
  "coverageIgnore": false,
@@ -47012,7 +47012,7 @@
47012
47012
  },
47013
47013
  {
47014
47014
  "name": "renameTsPropertyAccesses",
47015
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47015
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
47016
47016
  "ctype": "miscellaneous",
47017
47017
  "subtype": "function",
47018
47018
  "coverageIgnore": false,
@@ -47044,7 +47044,7 @@
47044
47044
  },
47045
47045
  {
47046
47046
  "name": "unwrapExpression",
47047
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47047
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
47048
47048
  "ctype": "miscellaneous",
47049
47049
  "subtype": "function",
47050
47050
  "coverageIgnore": false,
@@ -47074,7 +47074,7 @@
47074
47074
  },
47075
47075
  {
47076
47076
  "name": "visitDir",
47077
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47077
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
47078
47078
  "ctype": "miscellaneous",
47079
47079
  "subtype": "function",
47080
47080
  "coverageIgnore": false,
@@ -47119,7 +47119,7 @@
47119
47119
  },
47120
47120
  {
47121
47121
  "name": "visitNodes",
47122
- "file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
47122
+ "file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
47123
47123
  "ctype": "miscellaneous",
47124
47124
  "subtype": "function",
47125
47125
  "coverageIgnore": false,