@eui/core 22.0.0-alpha.46 → 22.0.0-alpha.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/assets/i18n-eui/et.json +9 -2
- package/assets/i18n-eui/fi.json +1 -1
- package/docs/changelog.html +32 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +126 -126
- package/docs/llms.txt +1 -1
- package/docs/properties.html +1 -1
- package/package.json +2 -2
|
@@ -2724,12 +2724,12 @@
|
|
|
2724
2724
|
},
|
|
2725
2725
|
{
|
|
2726
2726
|
"name": "Schema",
|
|
2727
|
-
"id": "interface-Schema-
|
|
2728
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2727
|
+
"id": "interface-Schema-b3ff4600c4a5ca1888c45e5baf3600fa6dc6477f1e473e5241ff6682e2929dc8950a5dfa8b1048a348dba7ad1f0ce8cc3681471933911b689e04713334ef4811-12",
|
|
2728
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
2729
2729
|
"deprecated": false,
|
|
2730
2730
|
"deprecationMessage": "",
|
|
2731
2731
|
"type": "interface",
|
|
2732
|
-
"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-
|
|
2732
|
+
"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",
|
|
2733
2733
|
"displayName": "Schema",
|
|
2734
2734
|
"properties": [
|
|
2735
2735
|
{
|
|
@@ -2771,12 +2771,12 @@
|
|
|
2771
2771
|
},
|
|
2772
2772
|
{
|
|
2773
2773
|
"name": "Schema",
|
|
2774
|
-
"id": "interface-Schema-
|
|
2775
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2774
|
+
"id": "interface-Schema-0ee574e11dd651dd971057cb66220845e5b87b2949c69c623c8ddf7355af92a396c58c237a52a05f18c22a5332a2695b717bcfeb8ea840c4e7df8d0084c2b49c-13",
|
|
2775
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
2776
2776
|
"deprecated": false,
|
|
2777
2777
|
"deprecationMessage": "",
|
|
2778
2778
|
"type": "interface",
|
|
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-
|
|
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-fieldset';\nconst OLD_NAME = 'iconSvgType';\nconst NEW_NAME = 'iconSvgName';\n\nexport function migrateEuiFieldset(options: Schema = {}): Rule {\n return (tree: Tree, context: SchematicContext) => {\n const scanPath = options.path ? '/' + options.path.replace(/^\\.?\\//, '').replace(/\\/$/, '') : '';\n let count = 0;\n\n const dir = tree.getDir(scanPath || '/');\n visitDir(dir, (path) => {\n const buffer = tree.read(path);\n if (!buffer) return;\n\n const original = buffer.toString('utf-8');\n if (!original.includes(COMPONENT_TAG)) return;\n\n let result: string;\n\n if (path.endsWith('.html')) {\n result = migrateTemplate(original);\n } else {\n result = migrateInlineTemplates(original);\n }\n\n if (result !== original) {\n if (options.dryRun) {\n logDryRun(context, `Would rename '${OLD_NAME}' → '${NEW_NAME}' in ${path}`);\n } else {\n tree.overwrite(path, result);\n }\n count++;\n }\n\n // Warn about TS property access usages (merged from warnTsUsages)\n if (path.endsWith('.ts') && !path.endsWith('.spec.ts') && original.includes(OLD_NAME)) {\n const sourceFile = ts.createSourceFile(path, original, ts.ScriptTarget.Latest, true);\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.name) && node.name.text === OLD_NAME) {\n const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n context.logger.warn(`${path}:${line + 1} - \"${OLD_NAME}\" has been renamed to \"${NEW_NAME}\" on ${COMPONENT_TAG}. Update this reference manually.`);\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n }\n });\n\n context.logger.info(`Renamed '${OLD_NAME}' → '${NEW_NAME}' on ${COMPONENT_TAG} in ${count} file(s).`);\n if (options.dryRun) {\n logDryRunNote(context);\n }\n return tree;\n };\n}\n\nfunction visitDir(dir: DirEntry, callback: (path: string) => void): void {\n for (const file of dir.subfiles) {\n if (file.endsWith('.d.ts')) continue;\n if (!file.endsWith('.html') && !file.endsWith('.ts')) continue;\n callback(`${dir.path}/${file}`);\n }\n for (const sub of dir.subdirs) {\n if (sub === 'node_modules' || sub === 'dist') continue;\n visitDir(dir.dir(sub), callback);\n }\n}\n\nfunction migrateTemplate(source: string): string {\n const parsed = parseTemplate(source, '', { preserveWhitespaces: true });\n const edits: { start: number; end: number; replacement: string }[] = [];\n\n visitNodes(parsed.nodes, edits);\n\n return applyEdits(source, edits);\n}\n\nfunction migrateInlineTemplates(source: string): string {\n const sourceFile = ts.createSourceFile('', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n const changes: { start: number; end: number; text: string }[] = [];\n\n const visit = (node: ts.Node): void => {\n if (ts.isPropertyAssignment(node) && isTemplateProperty(node) && isComponentMetadataProperty(node)) {\n const init = unwrapExpression(node.initializer);\n if (ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init)) {\n const start = init.getStart(sourceFile) + 1;\n const end = init.getEnd() - 1;\n const rawTemplate = source.slice(start, end);\n if (!rawTemplate.includes(COMPONENT_TAG)) {\n ts.forEachChild(node, visit); return; \n}\n const migrated = migrateTemplate(rawTemplate);\n if (migrated !== rawTemplate) changes.push({ start, end, text: migrated });\n }\n }\n ts.forEachChild(node, visit);\n };\n\n visit(sourceFile);\n\n let result = source;\n for (const change of changes.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, change.start) + change.text + result.slice(change.end);\n }\n return result;\n}\n\nfunction isTemplateProperty(node: ts.PropertyAssignment): boolean {\n const name = node.name;\n return (ts.isIdentifier(name) && name.text === 'template') || (ts.isStringLiteral(name) && name.text === 'template');\n}\n\nfunction isComponentMetadataProperty(node: ts.PropertyAssignment): boolean {\n const objectLiteral = node.parent;\n if (!ts.isObjectLiteralExpression(objectLiteral)) return false;\n const callExpression = objectLiteral.parent;\n if (!ts.isCallExpression(callExpression) || callExpression.arguments[0] !== objectLiteral) return false;\n return ts.isDecorator(callExpression.parent) && ts.isIdentifier(callExpression.expression) && callExpression.expression.text === 'Component';\n}\n\nfunction unwrapExpression(expression: ts.Expression): ts.Expression {\n let current = expression;\n while (ts.isParenthesizedExpression(current)) current = current.expression;\n return current;\n}\n\nfunction visitNodes(nodes: TmplAstNode[], edits: { start: number; end: number; replacement: string }[]): void {\n for (const node of nodes) {\n if (node instanceof TmplAstElement) {\n if (node.name === COMPONENT_TAG) collectRenames(node, edits);\n visitNodes(node.children, edits);\n }\n }\n}\n\nfunction collectRenames(element: TmplAstElement, edits: { start: number; end: number; replacement: string }[]): void {\n for (const attr of element.attributes) {\n if (attr.name === OLD_NAME) {\n edits.push({ start: attr.keySpan!.start.offset, end: attr.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n for (const input of element.inputs) {\n if (input.name === OLD_NAME) {\n edits.push({ start: input.keySpan!.start.offset, end: input.keySpan!.end.offset, replacement: NEW_NAME });\n }\n }\n}\n\nfunction applyEdits(source: string, edits: { start: number; end: number; replacement: string }[]): string {\n let result = source;\n for (const edit of edits.sort((a, b) => b.start - a.start)) {\n result = result.slice(0, edit.start) + edit.replacement + result.slice(edit.end);\n }\n return result;\n}\n",
|
|
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-
|
|
2822
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2821
|
+
"id": "interface-Schema-a806c1769fb526271565003a6a3ef9ab4c67e421d93ee0cb54e1f6de223807afc1f16ad294656ef614a77a91a38cc914ce41ac97ed3a8a4195a1e74a729c0c08-14",
|
|
2822
|
+
"file": "packages/core/schematics/migrate-eui-popover/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
|
|
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",
|
|
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-
|
|
2869
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
2868
|
+
"id": "interface-Schema-21147930d3fbc38fbb3052a2ed9e7aa2b7505e6ed8c88c28796ce7101bd2ad914726eb230dda5826647036190edec6dae7e7e1d172387cd3803aa00bcdf790be-15",
|
|
2869
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
2870
2870
|
"deprecated": false,
|
|
2871
2871
|
"deprecationMessage": "",
|
|
2872
2872
|
"type": "interface",
|
|
2873
|
-
"sourceCode": "import { parseTemplate, TmplAstBoundAttribute, TmplAstElement, TmplAstNode, TmplAstTextAttribute } from '@angular/compiler';\nimport { DirEntry, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';\nimport * as ts from 'typescript';\nimport { logDryRun, logDryRunNote } from '../utils/dry-run';\n\ninterface Schema {\n path?: string;\n dryRun?: boolean;\n}\n\nconst
|
|
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 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",
|
|
2874
2874
|
"displayName": "Schema",
|
|
2875
2875
|
"properties": [
|
|
2876
2876
|
{
|
|
@@ -22314,23 +22314,23 @@
|
|
|
22314
22314
|
"name": "COMPONENT_TAG",
|
|
22315
22315
|
"ctype": "miscellaneous",
|
|
22316
22316
|
"subtype": "variable",
|
|
22317
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22317
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
22318
22318
|
"coverageIgnore": false,
|
|
22319
22319
|
"deprecated": false,
|
|
22320
22320
|
"deprecationMessage": "",
|
|
22321
22321
|
"type": "string",
|
|
22322
|
-
"defaultValue": "'eui-
|
|
22322
|
+
"defaultValue": "'eui-icon-svg'"
|
|
22323
22323
|
},
|
|
22324
22324
|
{
|
|
22325
22325
|
"name": "COMPONENT_TAG",
|
|
22326
22326
|
"ctype": "miscellaneous",
|
|
22327
22327
|
"subtype": "variable",
|
|
22328
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
22328
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
22329
22329
|
"coverageIgnore": false,
|
|
22330
22330
|
"deprecated": false,
|
|
22331
22331
|
"deprecationMessage": "",
|
|
22332
22332
|
"type": "string",
|
|
22333
|
-
"defaultValue": "'eui-
|
|
22333
|
+
"defaultValue": "'eui-fieldset'"
|
|
22334
22334
|
},
|
|
22335
22335
|
{
|
|
22336
22336
|
"name": "COMPONENT_TAG",
|
|
@@ -24563,7 +24563,7 @@
|
|
|
24563
24563
|
},
|
|
24564
24564
|
{
|
|
24565
24565
|
"name": "applyEdits",
|
|
24566
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24566
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
24567
24567
|
"ctype": "miscellaneous",
|
|
24568
24568
|
"subtype": "function",
|
|
24569
24569
|
"coverageIgnore": false,
|
|
@@ -24608,7 +24608,7 @@
|
|
|
24608
24608
|
},
|
|
24609
24609
|
{
|
|
24610
24610
|
"name": "applyEdits",
|
|
24611
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
24611
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
24612
24612
|
"ctype": "miscellaneous",
|
|
24613
24613
|
"subtype": "function",
|
|
24614
24614
|
"coverageIgnore": false,
|
|
@@ -26325,7 +26325,7 @@
|
|
|
26325
26325
|
},
|
|
26326
26326
|
{
|
|
26327
26327
|
"name": "collectRenames",
|
|
26328
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26328
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
26329
26329
|
"ctype": "miscellaneous",
|
|
26330
26330
|
"subtype": "function",
|
|
26331
26331
|
"coverageIgnore": false,
|
|
@@ -26370,7 +26370,7 @@
|
|
|
26370
26370
|
},
|
|
26371
26371
|
{
|
|
26372
26372
|
"name": "collectRenames",
|
|
26373
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
26373
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
26374
26374
|
"ctype": "miscellaneous",
|
|
26375
26375
|
"subtype": "function",
|
|
26376
26376
|
"coverageIgnore": false,
|
|
@@ -29970,7 +29970,7 @@
|
|
|
29970
29970
|
},
|
|
29971
29971
|
{
|
|
29972
29972
|
"name": "isComponentMetadataProperty",
|
|
29973
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
29973
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
29974
29974
|
"ctype": "miscellaneous",
|
|
29975
29975
|
"subtype": "function",
|
|
29976
29976
|
"coverageIgnore": false,
|
|
@@ -30000,7 +30000,7 @@
|
|
|
30000
30000
|
},
|
|
30001
30001
|
{
|
|
30002
30002
|
"name": "isComponentMetadataProperty",
|
|
30003
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30003
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
30004
30004
|
"ctype": "miscellaneous",
|
|
30005
30005
|
"subtype": "function",
|
|
30006
30006
|
"coverageIgnore": false,
|
|
@@ -30515,7 +30515,7 @@
|
|
|
30515
30515
|
},
|
|
30516
30516
|
{
|
|
30517
30517
|
"name": "isTemplateProperty",
|
|
30518
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30518
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
30519
30519
|
"ctype": "miscellaneous",
|
|
30520
30520
|
"subtype": "function",
|
|
30521
30521
|
"coverageIgnore": false,
|
|
@@ -30545,7 +30545,7 @@
|
|
|
30545
30545
|
},
|
|
30546
30546
|
{
|
|
30547
30547
|
"name": "isTemplateProperty",
|
|
30548
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
30548
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
30549
30549
|
"ctype": "miscellaneous",
|
|
30550
30550
|
"subtype": "function",
|
|
30551
30551
|
"coverageIgnore": false,
|
|
@@ -32483,7 +32483,7 @@
|
|
|
32483
32483
|
},
|
|
32484
32484
|
{
|
|
32485
32485
|
"name": "migrateInlineTemplates",
|
|
32486
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32486
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
32487
32487
|
"ctype": "miscellaneous",
|
|
32488
32488
|
"subtype": "function",
|
|
32489
32489
|
"coverageIgnore": false,
|
|
@@ -32515,7 +32515,7 @@
|
|
|
32515
32515
|
},
|
|
32516
32516
|
{
|
|
32517
32517
|
"name": "migrateInlineTemplates",
|
|
32518
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
32518
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
32550
|
+
"file": "packages/core/schematics/migrate-eui-popover/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-
|
|
32582
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
32583
32583
|
"ctype": "miscellaneous",
|
|
32584
32584
|
"subtype": "function",
|
|
32585
32585
|
"coverageIgnore": false,
|
|
@@ -33023,7 +33023,7 @@
|
|
|
33023
33023
|
},
|
|
33024
33024
|
{
|
|
33025
33025
|
"name": "migrateTemplate",
|
|
33026
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33026
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
33027
33027
|
"ctype": "miscellaneous",
|
|
33028
33028
|
"subtype": "function",
|
|
33029
33029
|
"coverageIgnore": false,
|
|
@@ -33055,7 +33055,7 @@
|
|
|
33055
33055
|
},
|
|
33056
33056
|
{
|
|
33057
33057
|
"name": "migrateTemplate",
|
|
33058
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
33058
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
33090
|
+
"file": "packages/core/schematics/migrate-eui-popover/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-
|
|
33122
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
33123
33123
|
"ctype": "miscellaneous",
|
|
33124
33124
|
"subtype": "function",
|
|
33125
33125
|
"coverageIgnore": false,
|
|
@@ -35421,7 +35421,7 @@
|
|
|
35421
35421
|
},
|
|
35422
35422
|
{
|
|
35423
35423
|
"name": "unwrapExpression",
|
|
35424
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35424
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
35425
35425
|
"ctype": "miscellaneous",
|
|
35426
35426
|
"subtype": "function",
|
|
35427
35427
|
"coverageIgnore": false,
|
|
@@ -35451,7 +35451,7 @@
|
|
|
35451
35451
|
},
|
|
35452
35452
|
{
|
|
35453
35453
|
"name": "unwrapExpression",
|
|
35454
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
35454
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
35455
35455
|
"ctype": "miscellaneous",
|
|
35456
35456
|
"subtype": "function",
|
|
35457
35457
|
"coverageIgnore": false,
|
|
@@ -36304,7 +36304,7 @@
|
|
|
36304
36304
|
},
|
|
36305
36305
|
{
|
|
36306
36306
|
"name": "visitDir",
|
|
36307
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36307
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
36308
36308
|
"ctype": "miscellaneous",
|
|
36309
36309
|
"subtype": "function",
|
|
36310
36310
|
"coverageIgnore": false,
|
|
@@ -36349,7 +36349,7 @@
|
|
|
36349
36349
|
},
|
|
36350
36350
|
{
|
|
36351
36351
|
"name": "visitDir",
|
|
36352
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
36352
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
36397
|
+
"file": "packages/core/schematics/migrate-eui-popover/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-
|
|
36442
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/index.ts",
|
|
36443
36443
|
"ctype": "miscellaneous",
|
|
36444
36444
|
"subtype": "function",
|
|
36445
36445
|
"coverageIgnore": false,
|
|
@@ -37218,7 +37218,7 @@
|
|
|
37218
37218
|
},
|
|
37219
37219
|
{
|
|
37220
37220
|
"name": "visitNodes",
|
|
37221
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37221
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
37222
37222
|
"ctype": "miscellaneous",
|
|
37223
37223
|
"subtype": "function",
|
|
37224
37224
|
"coverageIgnore": false,
|
|
@@ -37261,7 +37261,7 @@
|
|
|
37261
37261
|
},
|
|
37262
37262
|
{
|
|
37263
37263
|
"name": "visitNodes",
|
|
37264
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
37264
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
37307
|
+
"file": "packages/core/schematics/migrate-eui-popover/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": "
|
|
37323
|
+
"name": "removals",
|
|
37324
37324
|
"deprecated": false,
|
|
37325
37325
|
"deprecationMessage": ""
|
|
37326
37326
|
}
|
|
@@ -37336,7 +37336,7 @@
|
|
|
37336
37336
|
}
|
|
37337
37337
|
},
|
|
37338
37338
|
{
|
|
37339
|
-
"name": "
|
|
37339
|
+
"name": "removals",
|
|
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-
|
|
37350
|
+
"file": "packages/core/schematics/migrate-eui-icon-toggle/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": "
|
|
37366
|
+
"name": "edits",
|
|
37367
37367
|
"deprecated": false,
|
|
37368
37368
|
"deprecationMessage": ""
|
|
37369
37369
|
}
|
|
@@ -37379,7 +37379,7 @@
|
|
|
37379
37379
|
}
|
|
37380
37380
|
},
|
|
37381
37381
|
{
|
|
37382
|
-
"name": "
|
|
37382
|
+
"name": "edits",
|
|
37383
37383
|
"deprecated": false,
|
|
37384
37384
|
"deprecationMessage": "",
|
|
37385
37385
|
"tagName": {
|
|
@@ -39124,74 +39124,74 @@
|
|
|
39124
39124
|
"defaultValue": "'onEditorChanged'"
|
|
39125
39125
|
}
|
|
39126
39126
|
],
|
|
39127
|
-
"packages/core/schematics/migrate-eui-
|
|
39127
|
+
"packages/core/schematics/migrate-eui-icon-svg/index.ts": [
|
|
39128
39128
|
{
|
|
39129
39129
|
"name": "COMPONENT_TAG",
|
|
39130
39130
|
"ctype": "miscellaneous",
|
|
39131
39131
|
"subtype": "variable",
|
|
39132
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39132
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
39133
39133
|
"coverageIgnore": false,
|
|
39134
39134
|
"deprecated": false,
|
|
39135
39135
|
"deprecationMessage": "",
|
|
39136
39136
|
"type": "string",
|
|
39137
|
-
"defaultValue": "'eui-
|
|
39137
|
+
"defaultValue": "'eui-icon-svg'"
|
|
39138
39138
|
},
|
|
39139
39139
|
{
|
|
39140
|
-
"name": "
|
|
39140
|
+
"name": "INPUT_RENAMES",
|
|
39141
39141
|
"ctype": "miscellaneous",
|
|
39142
39142
|
"subtype": "variable",
|
|
39143
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39143
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
39144
39144
|
"coverageIgnore": false,
|
|
39145
39145
|
"deprecated": false,
|
|
39146
39146
|
"deprecationMessage": "",
|
|
39147
|
-
"type": "
|
|
39148
|
-
"defaultValue": "'
|
|
39147
|
+
"type": "unknown",
|
|
39148
|
+
"defaultValue": "new Map([\n ['variant', 'fillColor'],\n ['aria-label', 'ariaLabel'],\n])"
|
|
39149
39149
|
},
|
|
39150
39150
|
{
|
|
39151
|
-
"name": "
|
|
39151
|
+
"name": "TS_PROPERTY_RENAMES",
|
|
39152
39152
|
"ctype": "miscellaneous",
|
|
39153
39153
|
"subtype": "variable",
|
|
39154
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39154
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
39155
39155
|
"coverageIgnore": false,
|
|
39156
39156
|
"deprecated": false,
|
|
39157
39157
|
"deprecationMessage": "",
|
|
39158
|
-
"type": "
|
|
39159
|
-
"defaultValue": "'
|
|
39158
|
+
"type": "unknown",
|
|
39159
|
+
"defaultValue": "new Map([\n ['variant', 'fillColor'],\n])"
|
|
39160
39160
|
}
|
|
39161
39161
|
],
|
|
39162
|
-
"packages/core/schematics/migrate-eui-
|
|
39162
|
+
"packages/core/schematics/migrate-eui-fieldset/index.ts": [
|
|
39163
39163
|
{
|
|
39164
39164
|
"name": "COMPONENT_TAG",
|
|
39165
39165
|
"ctype": "miscellaneous",
|
|
39166
39166
|
"subtype": "variable",
|
|
39167
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39167
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
39168
39168
|
"coverageIgnore": false,
|
|
39169
39169
|
"deprecated": false,
|
|
39170
39170
|
"deprecationMessage": "",
|
|
39171
39171
|
"type": "string",
|
|
39172
|
-
"defaultValue": "'eui-
|
|
39172
|
+
"defaultValue": "'eui-fieldset'"
|
|
39173
39173
|
},
|
|
39174
39174
|
{
|
|
39175
|
-
"name": "
|
|
39175
|
+
"name": "NEW_NAME",
|
|
39176
39176
|
"ctype": "miscellaneous",
|
|
39177
39177
|
"subtype": "variable",
|
|
39178
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39178
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
39179
39179
|
"coverageIgnore": false,
|
|
39180
39180
|
"deprecated": false,
|
|
39181
39181
|
"deprecationMessage": "",
|
|
39182
|
-
"type": "
|
|
39183
|
-
"defaultValue": "
|
|
39182
|
+
"type": "string",
|
|
39183
|
+
"defaultValue": "'iconSvgName'"
|
|
39184
39184
|
},
|
|
39185
39185
|
{
|
|
39186
|
-
"name": "
|
|
39186
|
+
"name": "OLD_NAME",
|
|
39187
39187
|
"ctype": "miscellaneous",
|
|
39188
39188
|
"subtype": "variable",
|
|
39189
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
39189
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
39190
39190
|
"coverageIgnore": false,
|
|
39191
39191
|
"deprecated": false,
|
|
39192
39192
|
"deprecationMessage": "",
|
|
39193
|
-
"type": "
|
|
39194
|
-
"defaultValue": "
|
|
39193
|
+
"type": "string",
|
|
39194
|
+
"defaultValue": "'iconSvgType'"
|
|
39195
39195
|
}
|
|
39196
39196
|
],
|
|
39197
39197
|
"packages/core/schematics/migrate-eui-icon-toggle/index.ts": [
|
|
@@ -45993,10 +45993,10 @@
|
|
|
45993
45993
|
]
|
|
45994
45994
|
}
|
|
45995
45995
|
],
|
|
45996
|
-
"packages/core/schematics/migrate-eui-
|
|
45996
|
+
"packages/core/schematics/migrate-eui-icon-svg/index.ts": [
|
|
45997
45997
|
{
|
|
45998
45998
|
"name": "applyEdits",
|
|
45999
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
45999
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46000
46000
|
"ctype": "miscellaneous",
|
|
46001
46001
|
"subtype": "function",
|
|
46002
46002
|
"coverageIgnore": false,
|
|
@@ -46041,7 +46041,7 @@
|
|
|
46041
46041
|
},
|
|
46042
46042
|
{
|
|
46043
46043
|
"name": "collectRenames",
|
|
46044
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46044
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46045
46045
|
"ctype": "miscellaneous",
|
|
46046
46046
|
"subtype": "function",
|
|
46047
46047
|
"coverageIgnore": false,
|
|
@@ -46086,7 +46086,7 @@
|
|
|
46086
46086
|
},
|
|
46087
46087
|
{
|
|
46088
46088
|
"name": "isComponentMetadataProperty",
|
|
46089
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46089
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46090
46090
|
"ctype": "miscellaneous",
|
|
46091
46091
|
"subtype": "function",
|
|
46092
46092
|
"coverageIgnore": false,
|
|
@@ -46116,7 +46116,7 @@
|
|
|
46116
46116
|
},
|
|
46117
46117
|
{
|
|
46118
46118
|
"name": "isTemplateProperty",
|
|
46119
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46119
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46120
46120
|
"ctype": "miscellaneous",
|
|
46121
46121
|
"subtype": "function",
|
|
46122
46122
|
"coverageIgnore": false,
|
|
@@ -46145,8 +46145,8 @@
|
|
|
46145
46145
|
]
|
|
46146
46146
|
},
|
|
46147
46147
|
{
|
|
46148
|
-
"name": "
|
|
46149
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46148
|
+
"name": "migrateEuiIconSvg",
|
|
46149
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46150
46150
|
"ctype": "miscellaneous",
|
|
46151
46151
|
"subtype": "function",
|
|
46152
46152
|
"coverageIgnore": false,
|
|
@@ -46154,7 +46154,7 @@
|
|
|
46154
46154
|
"deprecationMessage": "",
|
|
46155
46155
|
"rawdescription": "",
|
|
46156
46156
|
"description": "",
|
|
46157
|
-
"displayName": "
|
|
46157
|
+
"displayName": "migrateEuiIconSvg",
|
|
46158
46158
|
"args": [
|
|
46159
46159
|
{
|
|
46160
46160
|
"name": "options",
|
|
@@ -46180,7 +46180,7 @@
|
|
|
46180
46180
|
},
|
|
46181
46181
|
{
|
|
46182
46182
|
"name": "migrateInlineTemplates",
|
|
46183
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46183
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46184
46184
|
"ctype": "miscellaneous",
|
|
46185
46185
|
"subtype": "function",
|
|
46186
46186
|
"coverageIgnore": false,
|
|
@@ -46212,7 +46212,7 @@
|
|
|
46212
46212
|
},
|
|
46213
46213
|
{
|
|
46214
46214
|
"name": "migrateTemplate",
|
|
46215
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46215
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46216
46216
|
"ctype": "miscellaneous",
|
|
46217
46217
|
"subtype": "function",
|
|
46218
46218
|
"coverageIgnore": false,
|
|
@@ -46242,9 +46242,41 @@
|
|
|
46242
46242
|
}
|
|
46243
46243
|
]
|
|
46244
46244
|
},
|
|
46245
|
+
{
|
|
46246
|
+
"name": "renameTsPropertyAccesses",
|
|
46247
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46248
|
+
"ctype": "miscellaneous",
|
|
46249
|
+
"subtype": "function",
|
|
46250
|
+
"coverageIgnore": false,
|
|
46251
|
+
"deprecated": false,
|
|
46252
|
+
"deprecationMessage": "",
|
|
46253
|
+
"rawdescription": "",
|
|
46254
|
+
"description": "",
|
|
46255
|
+
"displayName": "renameTsPropertyAccesses",
|
|
46256
|
+
"args": [
|
|
46257
|
+
{
|
|
46258
|
+
"name": "source",
|
|
46259
|
+
"type": "string",
|
|
46260
|
+
"deprecated": false,
|
|
46261
|
+
"deprecationMessage": ""
|
|
46262
|
+
}
|
|
46263
|
+
],
|
|
46264
|
+
"returnType": "string",
|
|
46265
|
+
"jsdoctags": [
|
|
46266
|
+
{
|
|
46267
|
+
"name": "source",
|
|
46268
|
+
"type": "string",
|
|
46269
|
+
"deprecated": false,
|
|
46270
|
+
"deprecationMessage": "",
|
|
46271
|
+
"tagName": {
|
|
46272
|
+
"text": "param"
|
|
46273
|
+
}
|
|
46274
|
+
}
|
|
46275
|
+
]
|
|
46276
|
+
},
|
|
46245
46277
|
{
|
|
46246
46278
|
"name": "unwrapExpression",
|
|
46247
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46279
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46248
46280
|
"ctype": "miscellaneous",
|
|
46249
46281
|
"subtype": "function",
|
|
46250
46282
|
"coverageIgnore": false,
|
|
@@ -46274,7 +46306,7 @@
|
|
|
46274
46306
|
},
|
|
46275
46307
|
{
|
|
46276
46308
|
"name": "visitDir",
|
|
46277
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46309
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46278
46310
|
"ctype": "miscellaneous",
|
|
46279
46311
|
"subtype": "function",
|
|
46280
46312
|
"coverageIgnore": false,
|
|
@@ -46319,7 +46351,7 @@
|
|
|
46319
46351
|
},
|
|
46320
46352
|
{
|
|
46321
46353
|
"name": "visitNodes",
|
|
46322
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46354
|
+
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46323
46355
|
"ctype": "miscellaneous",
|
|
46324
46356
|
"subtype": "function",
|
|
46325
46357
|
"coverageIgnore": false,
|
|
@@ -46361,10 +46393,10 @@
|
|
|
46361
46393
|
]
|
|
46362
46394
|
}
|
|
46363
46395
|
],
|
|
46364
|
-
"packages/core/schematics/migrate-eui-
|
|
46396
|
+
"packages/core/schematics/migrate-eui-fieldset/index.ts": [
|
|
46365
46397
|
{
|
|
46366
46398
|
"name": "applyEdits",
|
|
46367
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46399
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46368
46400
|
"ctype": "miscellaneous",
|
|
46369
46401
|
"subtype": "function",
|
|
46370
46402
|
"coverageIgnore": false,
|
|
@@ -46409,7 +46441,7 @@
|
|
|
46409
46441
|
},
|
|
46410
46442
|
{
|
|
46411
46443
|
"name": "collectRenames",
|
|
46412
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46444
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46413
46445
|
"ctype": "miscellaneous",
|
|
46414
46446
|
"subtype": "function",
|
|
46415
46447
|
"coverageIgnore": false,
|
|
@@ -46454,7 +46486,7 @@
|
|
|
46454
46486
|
},
|
|
46455
46487
|
{
|
|
46456
46488
|
"name": "isComponentMetadataProperty",
|
|
46457
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46489
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46458
46490
|
"ctype": "miscellaneous",
|
|
46459
46491
|
"subtype": "function",
|
|
46460
46492
|
"coverageIgnore": false,
|
|
@@ -46484,7 +46516,7 @@
|
|
|
46484
46516
|
},
|
|
46485
46517
|
{
|
|
46486
46518
|
"name": "isTemplateProperty",
|
|
46487
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46519
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46488
46520
|
"ctype": "miscellaneous",
|
|
46489
46521
|
"subtype": "function",
|
|
46490
46522
|
"coverageIgnore": false,
|
|
@@ -46513,8 +46545,8 @@
|
|
|
46513
46545
|
]
|
|
46514
46546
|
},
|
|
46515
46547
|
{
|
|
46516
|
-
"name": "
|
|
46517
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46548
|
+
"name": "migrateEuiFieldset",
|
|
46549
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46518
46550
|
"ctype": "miscellaneous",
|
|
46519
46551
|
"subtype": "function",
|
|
46520
46552
|
"coverageIgnore": false,
|
|
@@ -46522,7 +46554,7 @@
|
|
|
46522
46554
|
"deprecationMessage": "",
|
|
46523
46555
|
"rawdescription": "",
|
|
46524
46556
|
"description": "",
|
|
46525
|
-
"displayName": "
|
|
46557
|
+
"displayName": "migrateEuiFieldset",
|
|
46526
46558
|
"args": [
|
|
46527
46559
|
{
|
|
46528
46560
|
"name": "options",
|
|
@@ -46548,7 +46580,7 @@
|
|
|
46548
46580
|
},
|
|
46549
46581
|
{
|
|
46550
46582
|
"name": "migrateInlineTemplates",
|
|
46551
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46583
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46552
46584
|
"ctype": "miscellaneous",
|
|
46553
46585
|
"subtype": "function",
|
|
46554
46586
|
"coverageIgnore": false,
|
|
@@ -46580,7 +46612,7 @@
|
|
|
46580
46612
|
},
|
|
46581
46613
|
{
|
|
46582
46614
|
"name": "migrateTemplate",
|
|
46583
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46615
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46584
46616
|
"ctype": "miscellaneous",
|
|
46585
46617
|
"subtype": "function",
|
|
46586
46618
|
"coverageIgnore": false,
|
|
@@ -46610,41 +46642,9 @@
|
|
|
46610
46642
|
}
|
|
46611
46643
|
]
|
|
46612
46644
|
},
|
|
46613
|
-
{
|
|
46614
|
-
"name": "renameTsPropertyAccesses",
|
|
46615
|
-
"file": "packages/core/schematics/migrate-eui-icon-svg/index.ts",
|
|
46616
|
-
"ctype": "miscellaneous",
|
|
46617
|
-
"subtype": "function",
|
|
46618
|
-
"coverageIgnore": false,
|
|
46619
|
-
"deprecated": false,
|
|
46620
|
-
"deprecationMessage": "",
|
|
46621
|
-
"rawdescription": "",
|
|
46622
|
-
"description": "",
|
|
46623
|
-
"displayName": "renameTsPropertyAccesses",
|
|
46624
|
-
"args": [
|
|
46625
|
-
{
|
|
46626
|
-
"name": "source",
|
|
46627
|
-
"type": "string",
|
|
46628
|
-
"deprecated": false,
|
|
46629
|
-
"deprecationMessage": ""
|
|
46630
|
-
}
|
|
46631
|
-
],
|
|
46632
|
-
"returnType": "string",
|
|
46633
|
-
"jsdoctags": [
|
|
46634
|
-
{
|
|
46635
|
-
"name": "source",
|
|
46636
|
-
"type": "string",
|
|
46637
|
-
"deprecated": false,
|
|
46638
|
-
"deprecationMessage": "",
|
|
46639
|
-
"tagName": {
|
|
46640
|
-
"text": "param"
|
|
46641
|
-
}
|
|
46642
|
-
}
|
|
46643
|
-
]
|
|
46644
|
-
},
|
|
46645
46645
|
{
|
|
46646
46646
|
"name": "unwrapExpression",
|
|
46647
|
-
"file": "packages/core/schematics/migrate-eui-
|
|
46647
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
46677
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/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-
|
|
46722
|
+
"file": "packages/core/schematics/migrate-eui-fieldset/index.ts",
|
|
46723
46723
|
"ctype": "miscellaneous",
|
|
46724
46724
|
"subtype": "function",
|
|
46725
46725
|
"coverageIgnore": false,
|