Index

packages/core/schematics/add-eui-imports/index.ts

addEsImports
addEsImports(source: string, filePath: string, imports)
Parameters :
Name Type Optional
source string No
filePath string No
imports No
Returns : string
addEuiImports
addEuiImports(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
addImportsToFile
addImportsToFile(source: string, filePath: string, decoratorStartHint: number, imports, useClassArray: boolean)
Parameters :
Name Type Optional
source string No
filePath string No
decoratorStartHint number No
imports No
useClassArray boolean No
Returns : string
buildNgModuleIndex
buildNgModuleIndex(tree: Tree, dir: DirEntry)
Parameters :
Name Type Optional
tree Tree No
dir DirEntry No
Returns : NgModuleInfo[]
detectIndent
detectIndent(source: string, pos: number)
Parameters :
Name Type Optional
source string No
pos number No
Returns : string
extractArrayProperty
extractArrayProperty(decorator, propName: string, source: string)
Parameters :
Name Type Optional
decorator No
propName string No
source string No
Returns : string[]
findComponentDecorators
findComponentDecorators(sourceFile)
Parameters :
Name Optional
sourceFile No
Returns : ComponentInfo[]
findDeclaringModule
findDeclaringModule(modules, componentClassName: string)
Parameters :
Name Type Optional
modules No
componentClassName string No
findDecoratorImportsArray
findDecoratorImportsArray(sf, source: string, decoratorStartHint: number)
Parameters :
Name Type Optional
sf No
source string No
decoratorStartHint number No
findImportsArrayInSource
findImportsArrayInSource(sf)
Parameters :
Name Optional
sf No
Returns : ts.ArrayLiteralExpression | null
getTemplateContent
getTemplateContent(tree: Tree, tsPath: string, decorator, source: string)
Parameters :
Name Type Optional
tree Tree No
tsPath string No
decorator No
source string No
Returns : string | null
hasStandaloneFalse
hasStandaloneFalse(decorator)
Parameters :
Name Optional
decorator No
Returns : boolean
matchElement
matchElement(element: TmplAstElement, matched)
Parameters :
Name Type Optional
element TmplAstElement No
matched No
Returns : void
matchSelectorsInTemplate
matchSelectorsInTemplate(html: string)
Parameters :
Name Type Optional
html string No
Returns : SelectorEntry[]
removeFromEsImports
removeFromEsImports(source: string, filePath: string, symbolsToRemove)
Parameters :
Name Type Optional
source string No
filePath string No
symbolsToRemove No
Returns : string
resolveImports
resolveImports(matched, useClassArray: boolean)
Parameters :
Name Type Optional
matched No
useClassArray boolean No
Returns : ImportToAdd[]
updateDecoratorImportsArray
updateDecoratorImportsArray(source: string, filePath: string, arrayNode, toAdd, toRemove)
Parameters :
Name Type Optional
source string No
filePath string No
arrayNode No
toAdd No
toRemove No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitTemplateNodes
visitTemplateNodes(nodes, matched)
Parameters :
Name Optional
nodes No
matched No
Returns : void

packages/core/schematics/migrate-eui-table/index.ts

addPaginatorImport
addPaginatorImport(source: string, filePath: string)
Parameters :
Name Type Optional
source string No
filePath string No
Returns : string
applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectChildElementRenames
collectChildElementRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
collectChildInputRemovals
collectChildInputRemovals(element: TmplAstElement, source: string, edits, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
filePath string No
context SchematicContext No
Returns : void
collectEmptyMessageRename
collectEmptyMessageRename(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
collectInputRemovals
collectInputRemovals(element: TmplAstElement, source: string, edits, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
filePath string No
context SchematicContext No
Returns : void
collectOutputChanges
collectOutputChanges(element: TmplAstElement, source: string, edits, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
filePath string No
context SchematicContext No
Returns : void
collectPaginatorMigration
collectPaginatorMigration(element: TmplAstElement, source: string, edits)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
Returns : boolean
collectPipeRenames
collectPipeRenames(nodes, source: string, edits)
Parameters :
Name Type Optional
nodes No
source string No
edits No
Returns : void
collectTableInputRenames
collectTableInputRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
collectTemplateEmptyMessageRename
collectTemplateEmptyMessageRename(template: TmplAstTemplate, edits)
Parameters :
Name Type Optional
template TmplAstTemplate No
edits No
Returns : void
hasEuiTableAttribute
hasEuiTableAttribute(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
logRemovalWarning
logRemovalWarning(name: string, filePath: string, element: TmplAstElement, context: SchematicContext)
Parameters :
Name Type Optional
name string No
filePath string No
element TmplAstElement No
context SchematicContext No
Returns : void
migrateEuiTable
migrateEuiTable(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateTemplate
migrateTemplate(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : string
migrateTemplateWithPaginator
migrateTemplateWithPaginator(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : literal type
migrateTypeScript
migrateTypeScript(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : literal type
removeAttribute
removeAttribute(start: number, end: number, source: string, edits)
Parameters :
Name Type Optional
start number No
end number No
source string No
edits No
Returns : void
renameTsProperties
renameTsProperties(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitAstForPipes
visitAstForPipes(ast: AST, edits)
Parameters :
Name Type Optional
ast AST No
edits No
Returns : void
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitExpressionForPipes
visitExpressionForPipes(expr: AST, edits)
Parameters :
Name Type Optional
expr AST No
edits No
Returns : void
visitNodesForTable
visitNodesForTable(nodes, source: string, edits, insideEuiTable: boolean, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
nodes No
source string No
edits No
insideEuiTable boolean No
filePath string No
context SchematicContext No
Returns : boolean
warnSetSort
warnSetSort(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : void

packages/core/schematics/migrate-eui-chip-list/index.ts

addTruncatePipeImport
addTruncatePipeImport(source: string, filePath: string)
Parameters :
Name Type Optional
source string No
filePath string No
Returns : string
applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
buildTruncatePipeEdit
buildTruncatePipeEdit(chip: TmplAstElement, source: string, truncateValue: string)
Parameters :
Name Type Optional
chip TmplAstElement No
source string No
truncateValue string No
Returns : Edit | null
deduplicateEdits
deduplicateEdits(edits)
Parameters :
Name Optional
edits No
Returns : Edit[]
extractAttrName
extractAttrName(insertion: string)
Parameters :
Name Type Optional
insertion string No
Returns : string
extractBindingValue
extractBindingValue(input: TmplAstBoundAttribute, source: string)
Parameters :
Name Type Optional
input TmplAstBoundAttribute No
source string No
Returns : string
extractHandlerExpression
extractHandlerExpression(output: TmplAstBoundEvent, source: string)
Parameters :
Name Type Optional
output TmplAstBoundEvent No
source string No
Returns : string
findChildChips
findChildChips(nodes)
Parameters :
Name Optional
nodes No
Returns : TmplAstElement[]
findLabelElement
findLabelElement(nodes)
Parameters :
Name Optional
nodes No
Returns : TmplAstElement | null
getExistingAttrNames
getExistingAttrNames(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : Set<string>
isChipElement
isChipElement(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
isChipListElement
isChipListElement(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateChipListElement
migrateChipListElement(element: TmplAstElement, source: string, edits)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
Returns : void
migrateEuiChipList
migrateEuiChipList(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
removalEdit
removalEdit(node, source: string)
Parameters :
Name Type Optional
node No
source string No
Returns : Edit
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, source: string, edits)
Parameters :
Name Type Optional
nodes No
source string No
edits No
Returns : void

packages/core/src/lib/services/errors/http-error-handler-callback-functions.ts

AlertHttpErrorCallbackFn
AlertHttpErrorCallbackFn(error: HttpErrorResponse)
Parameters :
Name Type Optional
error HttpErrorResponse No
Returns : void
ConsoleHttpErrorCallbackFn
ConsoleHttpErrorCallbackFn(error: HttpErrorResponse)
Parameters :
Name Type Optional
error HttpErrorResponse No
Returns : void
GrowlHttpErrorCallbackFn
GrowlHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector)
Parameters :
Name Type Optional
error HttpErrorResponse No
injector Injector No
Returns : void
LogHttpErrorCallbackFn
LogHttpErrorCallbackFn(error: HttpErrorResponse, injector: Injector)
Parameters :
Name Type Optional
error HttpErrorResponse No
injector Injector No
Returns : void

packages/core/schematics/migrate-eui-tabs/index.ts

applyChanges
applyChanges(source: string, changes)
Parameters :
Name Type Optional
source string No
changes No
Returns : string
buildBodyReplacement
buildBodyReplacement(source: string, content: TmplAstElement)
Parameters :
Name Type Optional
source string No
content TmplAstElement No
Returns : string
buildHeaderReplacement
buildHeaderReplacement(source: string, label: TmplAstElement)
Parameters :
Name Type Optional
source string No
label TmplAstElement No
Returns : string
findDirectChild
findDirectChild(element: TmplAstElement, name: string)
Parameters :
Name Type Optional
element TmplAstElement No
name string No
Returns : TmplAstElement | undefined
findElements
findElements(nodes, name: string)
Parameters :
Name Type Optional
nodes No
name string No
Returns : TmplAstElement[]
formatInnerLines
formatInnerLines(source: string, indent: string)
Parameters :
Name Type Optional
source string No
indent string No
Returns : string[]
getAttributeText
getAttributeText(source: string, element: TmplAstElement, tagName: string)
Parameters :
Name Type Optional
source string No
element TmplAstElement No
tagName string No
Returns : string
getIndent
getIndent(source: string, offset: number)
Parameters :
Name Type Optional
source string No
offset number No
Returns : string
getInnerText
getInnerText(source: string, element: TmplAstElement)
Parameters :
Name Type Optional
source string No
element TmplAstElement No
Returns : string
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isElement
isElement(node: TmplAstNode)
Parameters :
Name Type Optional
node TmplAstNode No
Returns : TmplAstElement
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiTabs
migrateEuiTabs(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : MigrationResult
migrateTemplate
migrateTemplate(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : MigrationResult
removeElementRanges
removeElementRanges(source: string, parent: TmplAstElement, elements)
Parameters :
Name Type Optional
source string No
parent TmplAstElement No
elements No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
withoutOverlaps
withoutOverlaps(changes)
Parameters :
Name Optional
changes No
Returns : TextChange[]

packages/core/schematics/migrate-eui-accent/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isEuiElement
isEuiElement(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiAccent
migrateEuiAccent(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
renameTsPropertyAccesses
renameTsPropertyAccesses(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-button/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
hasEuiButtonAttribute
hasEuiButtonAttribute(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiButton
migrateEuiButton(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-editor/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiEditor
migrateEuiEditor(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void
warnPropertyAccesses
warnPropertyAccesses(path: string, source: string, context: SchematicContext)
Parameters :
Name Type Optional
path string No
source string No
context SchematicContext No
Returns : void

packages/core/schematics/migrate-eui-fieldset/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiFieldset
migrateEuiFieldset(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-icon-svg/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiIconSvg
migrateEuiIconSvg(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
renameTsPropertyAccesses
renameTsPropertyAccesses(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-icon-toggle/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiIconToggle
migrateEuiIconToggle(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
renameTsPropertyAccesses
renameTsPropertyAccesses(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-progress-circle/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectRenames
collectRenames(element: TmplAstElement, edits)
Parameters :
Name Type Optional
element TmplAstElement No
edits No
Returns : void
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiProgressCircle
migrateEuiProgressCircle(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, edits)
Parameters :
Name Optional
nodes No
edits No
Returns : void

packages/core/schematics/migrate-eui-toolbar-menu/index.ts

applyEdits
applyEdits(source: string, edits)
Parameters :
Name Type Optional
source string No
edits No
Returns : string
collectOutputRemovals
collectOutputRemovals(element: TmplAstElement, source: string, edits, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
filePath string No
context SchematicContext No
Returns : void
collectTagRenames
collectTagRenames(element: TmplAstElement, source: string, edits)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
edits No
Returns : void
deduplicateEdits
deduplicateEdits(edits)
Parameters :
Name Optional
edits No
Returns : Edit[]
isComponentMetadataProperty
isComponentMetadataProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
isTemplateProperty
isTemplateProperty(node)
Parameters :
Name Optional
node No
Returns : boolean
migrateEuiToolbarMenu
migrateEuiToolbarMenu(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateImportsAndTypes
migrateImportsAndTypes(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : string
migrateInlineTemplates
migrateInlineTemplates(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : string
migrateTemplate
migrateTemplate(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : string
migrateTypeScript
migrateTypeScript(source: string, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
source string No
filePath string No
context SchematicContext No
Returns : string
removeImportSpecifier
removeImportSpecifier(namedImports, specifier, sourceFile, edits)
Parameters :
Name Optional
namedImports No
specifier No
sourceFile No
edits No
Returns : void
unwrapExpression
unwrapExpression(expression)
Parameters :
Name Optional
expression No
Returns : ts.Expression
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, source: string, edits, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
nodes No
source string No
edits No
filePath string No
context SchematicContext No
Returns : void
warnRemovedProperties
warnRemovedProperties(sourceFile, filePath: string, context: SchematicContext)
Parameters :
Name Type Optional
sourceFile No
filePath string No
context SchematicContext No
Returns : void

packages/core/schematics/migrate-to-standalone/index.ts

applyReplacements
applyReplacements(source: string, filePath: string, replacements: Map)
Parameters :
Name Type Optional
source string No
filePath string No
replacements Map No
Returns : string
buildReplacements
buildReplacements(moduleNames, templateSelectors: Set)
Parameters :
Name Type Optional
moduleNames No
templateSelectors Set No
Returns : Map<string, literal type>
findComponentDecorators
findComponentDecorators(sourceFile)
Parameters :
Name Optional
sourceFile No
Returns : ts.Decorator[]
findImportsArrayNode
findImportsArrayNode(decorator)
Parameters :
Name Optional
decorator No
Returns : ts.ArrayLiteralExpression | undefined
findSelectorsInTemplate
findSelectorsInTemplate(html: string, knownSelectors)
Parameters :
Name Type Optional
html string No
knownSelectors No
Returns : Set<string>
getTemplateSelectors
getTemplateSelectors(tree: Tree, tsPath: string, decorator, source: string)
Parameters :
Name Type Optional
tree Tree No
tsPath string No
decorator No
source string No
Returns : Set<string>
hasModuleInArray
hasModuleInArray(array, moduleName: string, source: string)
Parameters :
Name Type Optional
array No
moduleName string No
source string No
Returns : boolean
migrateToStandalone
migrateToStandalone(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
replaceInImportsArray
replaceInImportsArray(source: string, sourceFile, replacements: Map)
Parameters :
Name Type Optional
source string No
sourceFile No
replacements Map No
Returns : string
updateEsImports
updateEsImports(source: string, filePath: string, replacements: Map)
Parameters :
Name Type Optional
source string No
filePath string No
replacements Map No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void

packages/core/schematics/add-eui-imports/selector-map.ts

buildSelectorMap
buildSelectorMap()
Returns : SelectorEntry[]
getClassNamesForArray
getClassNamesForArray(arrayName: string)

Given a classArray name, returns all class names that belong to that array. Used to detect when individual class names can be consolidated into a spread.

Parameters :
Name Type Optional
arrayName string No
Returns : string[]
parseSelector
parseSelector(raw: string)

Parses a raw CSS-like selector string into element + attributes. Examples: "button[euiButton]" → { element: "button", attributes: ["euiButton"] } "[euiTooltip]" → { element: null, attributes: ["euiTooltip"] } "eui-tabs" → { element: "eui-tabs", attributes: [] } "input[euiInputNumber][formControlName]" → { element: "input", attributes: ["euiInputNumber", "formControlName"] }

Parameters :
Name Type Optional
raw string No
Returns : literal type

packages/core/schematics/migrate-eui-alert/index.ts

collectRemovals
collectRemovals(element: TmplAstElement, removals)
Parameters :
Name Type Optional
element TmplAstElement No
removals No
Returns : void
getAttributeSpan
getAttributeSpan(attr)
Parameters :
Name Optional
attr No
Returns : literal type
hasAttribute
hasAttribute(element: TmplAstElement, name: string)
Parameters :
Name Type Optional
element TmplAstElement No
name string No
Returns : boolean
migrateEuiAlert
migrateEuiAlert(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, removals)
Parameters :
Name Optional
nodes No
removals No
Returns : void

packages/core/schematics/migrate-eui-avatar/index.ts

collectRemovals
collectRemovals(element: TmplAstElement, removals)
Parameters :
Name Type Optional
element TmplAstElement No
removals No
Returns : void
getAttributeSpan
getAttributeSpan(attr)
Parameters :
Name Optional
attr No
Returns : literal type
isAvatarElement
isAvatarElement(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
migrateEuiAvatar
migrateEuiAvatar(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, removals)
Parameters :
Name Optional
nodes No
removals No
Returns : void

packages/core/schematics/migrate-eui-chip/index.ts

collectRemovals
collectRemovals(element: TmplAstElement, removals)
Parameters :
Name Type Optional
element TmplAstElement No
removals No
Returns : void
getAttributeSpan
getAttributeSpan(attr)
Parameters :
Name Optional
attr No
Returns : literal type
isChipElement
isChipElement(element: TmplAstElement)
Parameters :
Name Type Optional
element TmplAstElement No
Returns : boolean
migrateEuiChip
migrateEuiChip(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, removals)
Parameters :
Name Optional
nodes No
removals No
Returns : void

packages/core/schematics/migrate-eui-discussion-thread/index.ts

collectRemovals
collectRemovals(element: TmplAstElement, source: string, removals)
Parameters :
Name Type Optional
element TmplAstElement No
source string No
removals No
Returns : void
migrateEuiDiscussionThread
migrateEuiDiscussionThread(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, source: string, removals)
Parameters :
Name Type Optional
nodes No
source string No
removals No
Returns : void

packages/core/schematics/migrate-eui-popover/index.ts

collectRemovals
collectRemovals(element: TmplAstElement, removals)
Parameters :
Name Type Optional
element TmplAstElement No
removals No
Returns : void
getAttributeSpan
getAttributeSpan(attr)
Parameters :
Name Optional
attr No
Returns : literal type
migrateEuiPopover
migrateEuiPopover(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
migrateInlineTemplates
migrateInlineTemplates(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
migrateTemplate
migrateTemplate(source: string)
Parameters :
Name Type Optional
source string No
Returns : string
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void
visitNodes
visitNodes(nodes, removals)
Parameters :
Name Optional
nodes No
removals No
Returns : void

packages/core/src/lib/services/i18n/i18n-utils.ts

convertLegacyInterpolations
convertLegacyInterpolations(value: string)

Converts legacy ngx-translate interpolations ({{var}}) to ICU-compatible format ({var}). Double braces are never valid ICU syntax, so any {{word}} is guaranteed to be legacy.

Parameters :
Name Type Optional
value string No
Returns : string
transformTranslations
transformTranslations(translations: T)

Recursively walks a translation object and converts all legacy {{var}} interpolations to ICU-compatible {var} format in string leaf values.

Parameters :
Name Type Optional
translations T No
Returns : T

packages/core/src/lib/services/store/ngrx_kit.ts

createSelector
createSelector(s1: Selector, projector)
Parameters :
Name Type Optional
s1 Selector No
projector No
createSelector
createSelector(selectors, projector)
Parameters :
Name Optional
selectors No
projector No
createSelector
createSelector(...input: undefined)
Parameters :
Name Optional
input No
Returns : MemoizedSelector | MemoizedSelectorWithProps
createSelectorFactory
createSelectorFactory(memoize: MemoizeFn)
Parameters :
Name Type Optional
memoize MemoizeFn No
createSelectorFactory
createSelectorFactory(memoize: MemoizeFn, options: SelectorFactoryConfig)
Parameters :
Name Type Optional Default value Description
memoize MemoizeFn No

The function used to memoize selectors

options SelectorFactoryConfig No { stateFn: defaultStateFn, }

Config Object that may include a stateFn function defining how to return the selector's value, given the entire Store's state, parent Selectors, Props, and a MemoizedProjection

defaultMemoize
defaultMemoize(projectionFn: AnyFn, isArgumentsEqual: unknown, isResultEqual: unknown)
Parameters :
Name Type Optional Default value
projectionFn AnyFn No
isArgumentsEqual unknown No isEqualCheck
isResultEqual unknown No isEqualCheck
Returns : MemoizedProjection
defaultStateFn
defaultStateFn(state: any, selectors, props: any, memoizedProjector: MemoizedProjection)
Parameters :
Name Type Optional
state any No
selectors No
props any No
memoizedProjector MemoizedProjection No
Returns : any
extractArgsFromSelectorsDictionary
extractArgsFromSelectorsDictionary(selectorsDictionary: Record)
Parameters :
Name Type Optional
selectorsDictionary Record No
Returns : unknown
isArgumentsChanged
isArgumentsChanged(args: IArguments, lastArguments: IArguments, comparator: ComparatorFn)
Parameters :
Name Type Optional
args IArguments No
lastArguments IArguments No
comparator ComparatorFn No
isEqualCheck
isEqualCheck(a: any, b: any)
Parameters :
Name Type Optional
a any No
b any No
Returns : boolean
isSelectorsDictionary
isSelectorsDictionary(selectors)
Parameters :
Name Optional
selectors No

packages/core/schematics/migrate/utils.ts

detectEuiVersion
detectEuiVersion(tree: Tree)

Auto-detects the eUI version from the installed

Parameters :
Name Type Optional
tree Tree No
Returns : string | null
getEndImportBlockPos
getEndImportBlockPos(lines)

Finds the position where the import block ends. Looks for

Parameters :
Name Optional
lines No
Returns : number
getFilesFromTree
getFilesFromTree(tree: Tree, dirPath: string, extensions)

Collects all file paths matching given extensions under a directory in the Tree.

Parameters :
Name Type Optional
tree Tree No
dirPath string No
extensions No
Returns : string[]
getSiblingHtmlFiles
getSiblingHtmlFiles(tree: Tree, tsFilePath: string)

Gets sibling HTML files for a given TS file path from the Tree.

Parameters :
Name Type Optional
tree Tree No
tsFilePath string No
Returns : string[]

packages/core/src/lib/services/app/factories/log.ts

euiLogServiceFactory
euiLogServiceFactory(injector: Injector, rootBaseLoggerName: string, rootConfig: LogConfig, childBaseLoggerName: string, childConfig: LogConfig)
Parameters :
Name Type Optional Default value
injector Injector No
rootBaseLoggerName string No
rootConfig LogConfig No
childBaseLoggerName string No null
childConfig LogConfig No {}
Returns : LogService
getLogAppendersConfig
getLogAppendersConfig(config: LogConfig, injector: Injector)

Helper function to provide a list of log appenders from a log configuration

Parameters :
Name Type Optional Default value
config LogConfig No DEFAULT_LOG_CONFIG
injector Injector No null
Returns : LogAppender[]

an array of log appenders

isLogConfigDefined
isLogConfigDefined(config: LogConfig)

Helper function to check if the log config is defined. Does not check only for empty object, because the config can have other (non-log) parameters

Parameters :
Name Type Optional
config LogConfig No
Returns : boolean

true/false

logServiceFactory
logServiceFactory(config: LogConfig, injector: Injector)

Helper function to provide an instance of LogService from a configuration

Parameters :
Name Type Optional Default value
config LogConfig No DEFAULT_LOG_CONFIG
injector Injector No null
Returns : LogService

an instance of log service

packages/core/schematics/fix-no-multiple-empty-lines/index.ts

fixNoMultipleEmptyLines
fixNoMultipleEmptyLines(options: Schema)
Parameters :
Name Type Optional Default value
options Schema No {}
Returns : Rule
visitDir
visitDir(dir: DirEntry, callback)
Parameters :
Name Type Optional
dir DirEntry No
callback No
Returns : void

packages/core/src/lib/services/app/eui-startup.ts

getCoreChildProviders
getCoreChildProviders(moduleName: string)
Parameters :
Name Type Optional
moduleName string No
Returns : Provider[]
getCoreProviders
getCoreProviders()
Returns : Provider[]
getDependencyProviders
getDependencyProviders()
Returns : Provider[]

packages/core/src/lib/services/config/tokens.ts

getGlobalConfig
getGlobalConfig(appConfig: EuiAppConfig)
Parameters :
Name Type Optional
appConfig EuiAppConfig No
Returns : GlobalConfig
getHttpErrorHandlingConfig
getHttpErrorHandlingConfig(appConfig: EuiAppConfig)
Parameters :
Name Type Optional
appConfig EuiAppConfig No
getModuleConfig
getModuleConfig(appConfig: EuiAppConfig, moduleName: string)
Parameters :
Name Type Optional
appConfig EuiAppConfig No
moduleName string No
Returns : ModuleConfig
getRootLogConfig
getRootLogConfig(appConfig: EuiAppConfig)
Parameters :
Name Type Optional
appConfig EuiAppConfig No
Returns : LogConfig
getShowConnectionStatus
getShowConnectionStatus(globalConfig: GlobalConfig)
Parameters :
Name Type Optional
globalConfig GlobalConfig No
Returns : ConnectionStatus
mergeAppHandlerConfigToAppConfig
mergeAppHandlerConfigToAppConfig(euiAppConfig: EuiAppConfig, envAppHandler: EuiAppHandlersConfig)
Parameters :
Name Type Optional
euiAppConfig EuiAppConfig No
envAppHandler EuiAppHandlersConfig No
Returns : EuiAppConfig
mergeAppJsonConfigToAppConfig
mergeAppJsonConfigToAppConfig(euiAppConfig: EuiAppConfig, envAppJsonConfig: EuiAppJsonConfig, merge: Array, isDeepMerge: boolean)
Parameters :
Name Type Optional
euiAppConfig EuiAppConfig No
envAppJsonConfig EuiAppJsonConfig No
merge Array No
isDeepMerge boolean No
Returns : EuiAppConfig
prepareEuiAppConfigToken
prepareEuiAppConfigToken(euiConfig: EuiConfig)
Parameters :
Name Type Optional
euiConfig EuiConfig No
Returns : EuiAppConfig

packages/core/schematics/icon-migrate/index.ts

iconMigrate
iconMigrate(options: Schema)
Parameters :
Name Type Optional
options Schema No
Returns : Rule
replaceIconsInTemplate
replaceIconsInTemplate(content: string)

Replaces icon values in HTML template content by matching component selectors and their icon inputs. Handles both static bindings (icon="value") and bound bindings ([icon]="'value'").

Parameters :
Name Type Optional
content string No
Returns : literal type
replaceIconsInTypeScript
replaceIconsInTypeScript(content: string)

Replaces icon string literals in TypeScript files where icons are assigned to component inputs. Targets patterns like: icon = 'eui-delete', icon: 'eui-delete', expandedSvgIconClass: 'eui-chevron-right'

Parameters :
Name Type Optional
content string No
Returns : literal type

packages/core/src/lib/helpers/injector.ts

injectOptional
injectOptional(token, injector: unknown)

Safely resolves a service from the injector only when needed. Avoids instantiation errors that can occur with inject(..., { optional: true }).

Parameters :
Name Type Optional Default value Description
token No

The service token to inject

injector unknown No inject(Injector)

The injector to use (defaults to the current injector)

Returns : T | null

The service instance or null if unavailable

packages/core/src/lib/services/app/eui-pre-init-app.ts

loadEuiDynamicEnvironmentConfig
loadEuiDynamicEnvironmentConfig(url: string, timeout?: number)

Function to load asynchronously a dynamic configuration (from a local path or a web service)

Parameters :
Name Type Optional Description
url string No

the path to the configuration

timeout number Yes

possible timeout

Returns : Promise<EuiAppJsonConfig>

EuiAppJsonConfig promise

preInitApp
preInitApp(envConfig: EuiEnvConfig)

Function to be used before the AppModule is bootstrapped. It is currently used to load dynamic configurations. It needs to be added in your application main.ts file.

Parameters :
Name Type Optional Description
envConfig EuiEnvConfig No

the current environment configuration

Returns : Promise<EuiEnvConfig>

the updated environment configuration, as a promise

packages/core/src/lib/services/store/reducers/meta.reducers.ts

localStorageSync
it will be removed in the next major version
localStorageSync(platformId)

Utility meta-reducer to load the state from the local storage

Parameters :
Name Optional Description
platformId No

the platformId based on PLATFORM_ID token of Angular

Returns : function
localStorageSync
localStorageSync(reducer: ActionReducer)

Utility meta-reducer to load the state from the local storage

Parameters :
Name Type Optional Description
reducer ActionReducer No

the action reducer

Returns : S
localStorageSync
localStorageSync(reducer: ActionReducer, platformId?)
Parameters :
Name Type Optional
reducer ActionReducer No
platformId Yes
Returns : Function
sessionStorageSync
it will be removed in the next major version
sessionStorageSync(platformId)

Utility meta-reducer to load the state from the session storage

Parameters :
Name Optional Description
platformId No

the platformId based on PLATFORM_ID token of Angular

Returns : function
sessionStorageSync
it will be removed in the next major version
sessionStorageSync(reducer: ActionReducer)

Utility meta-reducer to load the state from the session storage

Parameters :
Name Type Optional Description
reducer ActionReducer No

the action reducer

Returns : S
sessionStorageSync
sessionStorageSync(reducer: ActionReducer, platformId?)
Parameters :
Name Type Optional
reducer ActionReducer No
platformId Yes
Returns : Function

packages/core/schematics/utils/dry-run.ts

logDryRun
logDryRun(context: SchematicContext, message: string)
Parameters :
Name Type Optional
context SchematicContext No
message string No
Returns : void
logDryRunNote
logDryRunNote(context: SchematicContext)
Parameters :
Name Type Optional
context SchematicContext No
Returns : void

packages/core/schematics/migrate/index.ts

migrate
migrate(options: Schema)
Parameters :
Name Type Optional
options Schema No
Returns : Rule

packages/core/schematics/migrate-all/index.ts

migrateAll
migrateAll(options: MigrateAllSchema)
Parameters :
Name Type Optional
options MigrateAllSchema No
Returns : Rule

packages/core/src/lib/services/app/eui-init-app.ts

provideEuiInitializer
provideEuiInitializer()

Initializes the app with the necessary configurations. Use this in combination with provideAppInitializer(euiInitApp_Env)

Returns : EnvironmentProviders

packages/core/schematics/migrate/replacements/eui-modules.ts

replaceEclAllModule
replaceEclAllModule(tree: Tree, filePath: string, content: string)

Replaces EclAllModule with specific ECL component imports detected from sibling HTML files.

Parameters :
Name Type Optional
tree Tree No
filePath string No
content string No
Returns : string
replaceEuiAllModule
replaceEuiAllModule(tree: Tree, filePath: string, content: string)

Replaces EuiAllModule with specific component imports detected from sibling HTML files.

Parameters :
Name Type Optional
tree Tree No
filePath string No
content string No
Returns : string
replaceEuiModules
replaceEuiModules(fileContent: string, lines)

Replaces individual EUI module references with their new standalone imports. Handles import statements (removes module, adds new import) and usage in arrays (replaces with spread).

Parameters :
Name Type Optional
fileContent string No
lines No
Returns : literal type

packages/core/schematics/migrate/replacements/breaking-changes.ts

replaceEuiBreakingChanges
replaceEuiBreakingChanges(lines, index: number)

Applies EUI and ECL breaking change replacements to a single line. Ported from csdr-engine/migrate/index.js replaceEuiBreakingChanges. Returns true if the line was modified.

Parameters :
Name Type Optional
lines No
index number No
Returns : boolean

packages/core/schematics/migrate/replacements/icons.ts

replaceIcons
replaceIcons(lines, index: number)

Replaces old icon names with new ones in a single line. Only replaces in quoted strings, skipping import lines and element tags. Returns true if the line was modified.

Parameters :
Name Type Optional
lines No
index number No
Returns : boolean

packages/core/schematics/migrate/replacements/mwp.ts

replaceMwp
replaceMwp(filePath: string, lines, index: number)

Applies MyWorkplace-specific replacements to a single line. Ported from csdr-engine/migrate/index.js replaceMwp. Returns true if the line was modified.

Parameters :
Name Type Optional
filePath string No
lines No
index number No
Returns : boolean

results matching ""

    No results matching ""