@siemens/element-ng 48.5.2 → 48.7.0
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/datatable/index.d.ts +54 -3
- package/fesm2022/siemens-element-ng-datatable.mjs +11 -5
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +4 -4
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +4 -4
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +3 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +12 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +2 -2
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +4 -4
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +41 -7
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/icon/index.d.ts +4 -4
- package/loading-spinner/index.d.ts +1 -0
- package/package.json +16 -16
- package/schematics/scss-import-to-siemens-migration/index.js +0 -3
- package/schematics/scss-import-to-siemens-migration/style-mappings.js +20 -4
- package/schematics/utils/ts-utils.js +8 -4
- package/summary-chip/index.d.ts +3 -3
- package/typeahead/index.d.ts +21 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-typeahead.mjs","sources":["../../../../projects/element-ng/typeahead/si-typeahead-item-template.directive.ts","../../../../projects/element-ng/typeahead/si-typeahead.component.ts","../../../../projects/element-ng/typeahead/si-typeahead.component.html","../../../../projects/element-ng/typeahead/si-typeahead.search.ts","../../../../projects/element-ng/typeahead/si-typeahead.sorting.ts","../../../../projects/element-ng/typeahead/si-typeahead.directive.ts","../../../../projects/element-ng/typeahead/si-typeahead.module.ts","../../../../projects/element-ng/typeahead/index.ts","../../../../projects/element-ng/typeahead/siemens-element-ng-typeahead.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { TypeaheadOptionItemContext } from './si-typeahead.model';\n\n@Directive({\n selector: '[siTypeaheadItemTemplate]'\n})\nexport class SiTypeaheadItemTemplateDirective {\n static ngTemplateContextGuard(\n dir: SiTypeaheadItemTemplateDirective,\n ctx: any\n ): ctx is TypeaheadOptionItemContext {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostListener,\n inject,\n viewChild\n} from '@angular/core';\nimport {\n SiAutocompleteDirective,\n SiAutocompleteListboxDirective,\n SiAutocompleteOptionDirective\n} from '@siemens/element-ng/autocomplete';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiTypeaheadItemTemplateDirective } from './si-typeahead-item-template.directive';\nimport { SiTypeaheadDirective } from './si-typeahead.directive';\nimport { TypeaheadMatch } from './si-typeahead.model';\n\n@Component({\n selector: 'si-typeahead',\n imports: [\n SiAutocompleteListboxDirective,\n SiAutocompleteOptionDirective,\n SiIconComponent,\n NgTemplateOutlet,\n SiTranslatePipe,\n SiTypeaheadItemTemplateDirective\n ],\n templateUrl: './si-typeahead.component.html',\n styleUrl: './si-typeahead.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'w-100' }\n})\nexport class SiTypeaheadComponent implements AfterViewInit {\n protected parent = inject(SiTypeaheadDirective);\n protected readonly matches = computed(() =>\n this.parent.typeaheadOptionsLimit()\n ? this.parent.foundMatches().slice(0, this.parent.typeaheadOptionsLimit())\n : this.parent.foundMatches()\n );\n\n protected readonly multiselect = computed(() => this.parent.typeaheadMultiSelect());\n\n private readonly typeaheadElement = viewChild.required('typeahead', {\n read: ElementRef\n });\n\n protected autocompleteDirective = inject(SiAutocompleteDirective);\n\n ngAfterViewInit(): void {\n this.setHeight(this.typeaheadElement());\n }\n\n @HostListener('mousedown', ['$event'])\n protected onMouseDown(event: Event): void {\n event.preventDefault();\n }\n\n /*\n * Set the height of the element passed to it (typeahead) if there are items displayed,\n * the number of displayed items changed and it is scrollable.\n */\n private setHeight(element: ElementRef): void {\n if (this.matches().length) {\n if (\n this.parent.typeaheadScrollable() &&\n this.parent.typeaheadOptionsInScrollableView() < this.matches().length\n ) {\n const computedStyle = getComputedStyle(element.nativeElement);\n const matchComputedStyle = getComputedStyle(element.nativeElement.firstElementChild);\n const matchHeight = parseFloat(matchComputedStyle.height || '0');\n const paddingTop = parseFloat(computedStyle.paddingTop || '0');\n const paddingBottom = parseFloat(computedStyle.paddingBottom || '');\n const height = this.parent.typeaheadOptionsInScrollableView() * matchHeight;\n element.nativeElement.style.maxBlockSize = `${\n height + paddingTop + paddingBottom + this.parent.typeaheadScrollableAdditionalHeight()\n }px`;\n } else {\n element.nativeElement.style.maxBlockSize = 'auto';\n }\n }\n }\n\n // Gets called when a match is selected by clicking on it.\n protected selectMatch(match: TypeaheadMatch): void {\n this.parent.selectMatch(match);\n }\n}\n","<!-- Template to be used for every match, can be replaced using an input. -->\n<ng-template #defaultItemTemplate let-match=\"match\" siTypeaheadItemTemplate>\n @if (multiselect()) {\n <div class=\"d-flex pe-4\" aria-hidden=\"true\">\n <span class=\"form-check-input si-form-checkbox\" [class.checked]=\"match.itemSelected\"></span>\n </div>\n }\n @if (match.iconClass) {\n <si-icon class=\"icon me-2\" [icon]=\"match.iconClass\" />\n }\n @for (segment of match.result; track $index) {\n <span [class.typeahead-match-segment-matching]=\"segment.isMatching\">{{ segment.text }}</span>\n }\n</ng-template>\n\n<!-- Only display the component if there are any matches and set the CSS transform to properly position the typeahead -->\n<ul\n #typeahead\n class=\"typeahead dropdown-menu\"\n [siAutocompleteListboxFor]=\"autocompleteDirective\"\n [siAutocompleteDefaultIndex]=\"parent.typeaheadAutoSelectIndex()\"\n [attr.aria-label]=\"parent.typeaheadAutocompleteListLabel() | translate\"\n [class.d-none]=\"!matches().length\"\n (siAutocompleteOptionSubmitted)=\"selectMatch($event)\"\n>\n <!-- Loop through every match and bind events, the mousedown prevent default is to prevent the host from losing focus on click -->\n @for (match of matches(); track $index) {\n <li\n #typeaheadMatch\n class=\"dropdown-item\"\n [siAutocompleteOption]=\"match\"\n [attr.aria-label]=\"match.text\"\n [attr.aria-selected]=\"multiselect() ? match.itemSelected : null\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <!-- Display either a template set as the input or the template above -->\n <ng-template\n [ngTemplateOutlet]=\"parent.typeaheadItemTemplate() || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{\n item: match.option,\n index: $index,\n match: match,\n query: parent.query()\n }\"\n />\n </li>\n }\n</ul>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { computed, Signal } from '@angular/core';\n\nexport interface SearchOptions<T> {\n /** The text that will be used for searching. */\n text: string;\n /** The raw option that will be also included in the Match results */\n option: T;\n}\n\nexport interface MatchSegment {\n text: string;\n isMatching: boolean;\n matches: number;\n uniqueMatches: number;\n}\n\nexport interface Match<T> {\n option: T;\n text: string;\n result: MatchSegment[];\n stringMatch: boolean;\n atBeginning: boolean;\n matches: number;\n uniqueMatches: number;\n uniqueSeparateMatches: number;\n matchesEntireQuery: boolean;\n matchesAllParts: boolean;\n matchesAllPartsSeparately: boolean;\n}\n\nexport interface SearchConfig {\n /** Defines whether to tokenize the search or match the whole search. */\n disableTokenizing?: boolean;\n /**\n * Defines whether and how to require to match with all the tokens if {@link typeaheadTokenize} is enabled.\n * - `no` does not require all of the tokens to match.\n * - `once` requires all of the parts to be found in the search.\n * - `separately` requires all of the parts to be found in the search where there is not an overlapping different result.\n * - `independently` requires all of the parts to be found in the search where there is not an overlapping or adjacent different result.\n * ('independently' also slightly changes sorting behavior in the same way.)\n */\n matchAllTokens: 'no' | 'once' | 'separately' | 'independently';\n}\n\n/**\n * Constructs a typeahead search and provides the matches as a signal.\n *\n * @param options - Factory function that should return the array of options to search in.\n * Is run in a reactive context.\n * @param query - Factory function that should return the current search query. Is run in a reactive context.\n * @param config - Configuration for the search. Is run in a reactive context.\n *\n * @example\n * In a real world, myOptions and mayQuery would be signals.\n * ```ts\n * const search = typeaheadSearch(\n * () => myOptions().map(...),\n * () => myQuery().toLowerCase(),\n * () => ({ matchAllTokens: 'separately' })\n * )\n * ```\n */\nexport const typeaheadSearch = <T>(\n options: () => SearchOptions<T>[],\n query: () => string,\n config: () => SearchConfig\n): Signal<Match<T>[]> => computed(() => new TypeaheadSearch<T>(options, query, config()).matches());\n\nclass TypeaheadSearch<T> {\n readonly matches = computed<Match<T>[]>(() => this.search(this.datasource(), this.query()));\n\n constructor(\n private readonly datasource: () => SearchOptions<T>[],\n private readonly query: () => string,\n private readonly options: SearchConfig\n ) {}\n\n private escapeRegex(query: string): string {\n return query.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n }\n\n private search(options: SearchOptions<T>[], query: string): Match<T>[] {\n try {\n const entireQueryRegex = new RegExp(this.escapeRegex(query), 'gi');\n\n const queryParts = !this.options.disableTokenizing\n ? query.split(/\\s+/g).filter(queryPart => queryPart)\n : query\n ? [query]\n : [];\n\n const queryRegexes = queryParts.map(\n queryPart => new RegExp(this.escapeRegex(queryPart), 'gi')\n );\n // Process the options.\n const matches: Match<T>[] = [];\n options.forEach(option => {\n const optionValue = option.text;\n const stringMatch =\n optionValue.toLocaleLowerCase().trim() === query.toLocaleLowerCase().trim();\n const candidate: Match<T> = {\n option: option.option,\n text: optionValue,\n result: [],\n stringMatch,\n atBeginning: false,\n matches: 0,\n uniqueMatches: 0,\n uniqueSeparateMatches: 0,\n matchesEntireQuery: false,\n matchesAllParts: false,\n matchesAllPartsSeparately: false\n };\n\n // Only search the options if a part of the query is at least one character long to prevent an endless loop.\n if (queryParts.length === 0) {\n if (optionValue) {\n candidate.result.push({\n text: optionValue,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n matches.push(candidate);\n } else {\n const allResults: { index: number; start: number; end: number; result: string }[] = [];\n const allIndexes: number[] = [];\n\n candidate.matchesEntireQuery = !!optionValue.match(entireQueryRegex);\n\n // Loop through the option value to find multiple matches, then store every segment (matching or non-matching) in the results.\n queryRegexes.forEach((queryRegex, index) => {\n let regexMatch = queryRegex.exec(optionValue);\n\n while (regexMatch) {\n allResults.push({\n index,\n start: regexMatch.index,\n end: regexMatch.index + regexMatch[0].length,\n result: regexMatch[0]\n });\n if (!regexMatch.index) {\n candidate.atBeginning = true;\n }\n if (!allIndexes.includes(index)) {\n allIndexes.push(index);\n }\n regexMatch = queryRegex.exec(optionValue);\n }\n });\n\n candidate.matchesAllParts = allIndexes.length === queryParts.length;\n\n // Check if all parts of the query match at least once (if required).\n if (this.options.matchAllTokens === 'no' || candidate.matchesAllParts) {\n const combinedResults: {\n indexes: number[];\n uniqueIndexes: number[];\n start: number;\n end: number;\n result: string;\n }[] = [];\n\n // First combine intersecting (or if set to independently adjacent) results to combined results.\n // We achieve this by first sorting them by the starting index, then by the ending index and then looking for overlaps.\n allResults\n .sort((a, b) => a.start - b.start || a.end - b.end)\n .forEach(result => {\n if (combinedResults.length) {\n const foundPreviousResult = combinedResults.find(previousResult =>\n this.options.matchAllTokens === 'independently'\n ? result.start <= previousResult.end\n : result.start < previousResult.end\n );\n if (foundPreviousResult) {\n foundPreviousResult.result += result.result.slice(\n foundPreviousResult.end - result.start,\n result.result.length\n );\n if (result.end > foundPreviousResult.end) {\n foundPreviousResult.end = result.end;\n }\n foundPreviousResult.indexes.push(result.index);\n if (!foundPreviousResult.uniqueIndexes.includes(result.index)) {\n foundPreviousResult.uniqueIndexes.push(result.index);\n }\n return;\n }\n }\n combinedResults.push({\n ...result,\n indexes: [result.index],\n uniqueIndexes: [result.index]\n });\n });\n\n // Recursively go through all unique combinations of the unique indexes to get the option which has the most indexes.\n const countUniqueSubindexes = (\n indexIndex = 0,\n previousIndexes: number[] = []\n ): number =>\n indexIndex === combinedResults.length\n ? previousIndexes.length\n : Math.max(\n previousIndexes.length,\n ...combinedResults[indexIndex].uniqueIndexes\n .filter(index => !previousIndexes.includes(index))\n .map(index =>\n countUniqueSubindexes(indexIndex + 1, [index, ...previousIndexes])\n )\n );\n\n candidate.uniqueSeparateMatches = countUniqueSubindexes();\n candidate.matchesAllPartsSeparately =\n candidate.uniqueSeparateMatches === queryParts.length;\n\n let currentPreviousEnd = 0;\n\n // Add the combined results to the candidate including the non-matching parts in between.\n combinedResults.forEach(result => {\n const textBefore = optionValue.slice(currentPreviousEnd, result.start);\n if (textBefore) {\n candidate.result.push({\n text: textBefore,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n candidate.result.push({\n text: result.result,\n isMatching: true,\n matches: result.indexes.length,\n uniqueMatches: result.uniqueIndexes.length\n });\n currentPreviousEnd = result.end;\n candidate.matches += result.indexes.length;\n candidate.uniqueMatches += result.uniqueIndexes.length;\n });\n\n // Check if there are result segments and all parts are matched independently (if required).\n if (\n candidate.result.length !== 0 &&\n ((this.options.matchAllTokens !== 'separately' &&\n this.options.matchAllTokens !== 'independently') ||\n candidate.matchesAllPartsSeparately)\n ) {\n const textAtEnd = optionValue.slice(currentPreviousEnd);\n if (textAtEnd) {\n candidate.result.push({\n text: textAtEnd,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n matches.push(candidate);\n }\n }\n }\n });\n\n return matches;\n } catch {\n // Could not create regex (only in extremely rare cases, maybe even impossible), so return an empty array.\n return [];\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { TypeaheadMatch } from './si-typeahead.model';\n\nexport class SiTypeaheadSorting {\n sortMatches(matches: TypeaheadMatch[]): TypeaheadMatch[] {\n // Sort the matches,\n // first is the option and query an exact match.\n // then according to whether it is matching in the beginning,\n // then whether it matches the entire untokenized query.\n // then according to how many unique separate matches it contains.\n // then according to how many unique matches it contains.\n // then according to how many matches it contains.\n return matches.sort((matchA, matchB) => {\n if (matchA.stringMatch || matchB.stringMatch) {\n return matchA.stringMatch ? -1 : 1;\n }\n if (matchA.atBeginning) {\n return !matchB.atBeginning ? -1 : this.compareMatches(matchA, matchB);\n } else {\n return matchB.atBeginning ? 1 : this.compareMatches(matchA, matchB);\n }\n });\n }\n\n private compareMatchesNumbers(matchA: TypeaheadMatch, matchB: TypeaheadMatch): number {\n return (\n matchB.uniqueSeparateMatches - matchA.uniqueSeparateMatches ||\n matchB.uniqueMatches - matchA.uniqueMatches ||\n matchB.matches - matchA.matches\n );\n }\n\n private compareMatches(matchA: TypeaheadMatch, matchB: TypeaheadMatch): number {\n if (matchA.matchesEntireQuery) {\n return !matchB.matchesEntireQuery ? -1 : this.compareMatchesNumbers(matchA, matchB);\n } else {\n return matchB.matchesEntireQuery ? 1 : this.compareMatchesNumbers(matchA, matchB);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { ConnectionPositionPair, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n booleanAttribute,\n ComponentRef,\n computed,\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n output,\n signal,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { SiAutocompleteDirective } from '@siemens/element-ng/autocomplete';\nimport { t } from '@siemens/element-translate-ng/translate';\nimport { isObservable, ReplaySubject, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { SiTypeaheadComponent } from './si-typeahead.component';\nimport {\n Typeahead,\n TypeaheadArray,\n TypeaheadMatch,\n TypeaheadOption,\n TypeaheadOptionItemContext\n} from './si-typeahead.model';\nimport { typeaheadSearch } from './si-typeahead.search';\nimport { SiTypeaheadSorting } from './si-typeahead.sorting';\n\n@Directive({\n selector: '[siTypeahead]',\n host: {\n class: 'si-typeahead'\n },\n hostDirectives: [SiAutocompleteDirective],\n exportAs: 'si-typeahead'\n})\nexport class SiTypeaheadDirective implements OnChanges, OnDestroy {\n protected static readonly overlayPositions: ConnectionPositionPair[] = [\n {\n overlayX: 'start',\n overlayY: 'top',\n originX: 'start',\n originY: 'bottom',\n offsetY: 2\n },\n {\n overlayX: 'start',\n overlayY: 'bottom',\n originX: 'start',\n originY: 'top',\n offsetY: -4\n },\n {\n overlayX: 'end',\n overlayY: 'top',\n originX: 'end',\n originY: 'bottom',\n offsetY: 2\n },\n {\n overlayX: 'end',\n overlayY: 'bottom',\n originX: 'end',\n originY: 'top',\n offsetY: -4\n }\n ];\n\n /**\n * Set the options of the typeahead.\n * Has to be either an Array or an Observable of an Array\n * of options (string or object)\n */\n readonly siTypeahead = input.required<Typeahead>();\n\n /**\n * Turns on/off the processing (searching and sorting) of the typeahead options.\n * Is used when searching and sorting is done externally.\n *\n * @defaultValue true\n */\n readonly typeaheadProcess = input(true, {\n transform: booleanAttribute\n });\n /**\n * Makes the typeahead scrollable and sets its height.\n * Uses {@link typeaheadOptionsInScrollableView} and {@link typeaheadScrollableAdditionalHeight}.\n *\n * @defaultValue false\n */\n readonly typeaheadScrollable = input(false, { transform: booleanAttribute });\n\n /**\n * If {@link typeaheadScrollable} is `true`, defines the number of items visible at once.\n *\n * @defaultValue 10\n */\n readonly typeaheadOptionsInScrollableView = input(10);\n\n /**\n * Defines the maximum number of items added into the DOM. Default is 20 and 0 means unlimited.\n *\n * @defaultValue 20\n */\n readonly typeaheadOptionsLimit = input(20);\n\n /**\n * If {@link typeaheadScrollable} is `true`, defines the number of additional pixels\n * to be added the the bottom of the typeahead to show users that it is scrollable.\n *\n * @defaultValue 13\n */\n readonly typeaheadScrollableAdditionalHeight = input(13);\n\n /**\n * Defines the index of the item which should automatically be selected.\n *\n * @defaultValue 0\n */\n readonly typeaheadAutoSelectIndex = input(0, { transform: numberAttribute });\n /**\n * Defines whether the typeahead can be closed using escape.\n *\n * @defaultValue true\n */\n readonly typeaheadCloseOnEsc = input(true, { transform: booleanAttribute });\n /**\n * Defines whether the host value should be cleared when a value is selected.\n *\n * @defaultValue false\n */\n readonly typeaheadClearValueOnSelect = input(false, { transform: booleanAttribute });\n /**\n * Defines the number of milliseconds to wait before displaying a typeahead after the host was\n * focused or a value inputted.\n *\n * @defaultValue 0\n */\n readonly typeaheadWaitMs = input(0);\n\n /**\n * Defines the number of characters the value of the host needs to be before a typeahead is displayed.\n * Use `0` to have it display when focussing the host (clicking or tabbing into it).\n *\n * @defaultValue 1\n */\n readonly typeaheadMinLength = input(1);\n\n /**\n * Defines the name of the field/property the option string is in when the typeahead options are objects.\n *\n * @defaultValue 'name'\n */\n readonly typeaheadOptionField = input('name');\n /**\n * Defines whether multiselection of typeahead is possible with checkboxes.\n *\n * @defaultValue false\n */\n readonly typeaheadMultiSelect = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether to tokenize the search or match the whole search.\n *\n * @defaultValue true\n */\n readonly typeaheadTokenize = input(true, { transform: booleanAttribute });\n /**\n * Defines whether and how to require to match with all the tokens if {@link typeaheadTokenize} is enabled.\n * - `no` does not require all of the tokens to match.\n * - `once` requires all of the parts to be found in the search.\n * - `separately` requires all of the parts to be found in the search where there is not an overlapping different result.\n * - `independently` requires all of the parts to be found in the search where there is not an overlapping or adjacent different result.\n * ('independently' also slightly changes sorting behavior in the same way.)\n *\n * @defaultValue 'separately'\n */\n readonly typeaheadMatchAllTokens = input<'no' | 'once' | 'separately' | 'independently'>(\n 'separately'\n );\n /**\n * Defines an optional template to use as the typeahead match item instead of the one built in.\n * Gets the {@link TypeaheadOptionItemContext} passed to it.\n */\n readonly typeaheadItemTemplate = input<TemplateRef<TypeaheadOptionItemContext>>();\n /**\n * Skip the sorting of matches.\n * If the value is `true`, the matches are sorted according to {@link SiTypeaheadSorting}.\n *\n * @defaultValue false\n */\n readonly typeaheadSkipSortingMatches = input(false, { transform: booleanAttribute });\n\n /**\n * Screen reader only label for the autocomplete list.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL:Suggestions`)\n * ```\n */\n readonly typeaheadAutocompleteListLabel = input(\n t(() => $localize`:@@SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL:Suggestions`)\n );\n\n /**\n * If set, the typeahead will at minium have the width of the connected input field.\n *\n * @defaultValue false\n */\n readonly typeaheadFullWidth = input(false, { transform: booleanAttribute });\n /**\n * Emits an Event when the input field is changed.\n */\n readonly typeaheadOnInput = output<string>();\n /**\n * Emits an Event when a typeahead match is selected.\n * The event is a {@link TypeaheadMatch}\n */\n readonly typeaheadOnSelect = output<TypeaheadMatch>();\n\n /**\n * Emits an Event when a typeahead full match exists. A full match occurs when the entered text\n * is equal to one of the typeahead options.\n * The event is a {@link TypeaheadMatch}\n */\n readonly typeaheadOnFullMatch = output<TypeaheadMatch>();\n\n /** Emits whenever the typeahead overlay is opened or closed. */\n readonly typeaheadOpenChange = output<boolean>();\n\n /** @internal */\n readonly foundMatches = computed(() =>\n this.typeaheadProcess() ? this.processedSearch() : this.unprocessedSearch()\n );\n /** @internal */\n readonly query = signal('');\n\n /**\n * Indicates whether the typeahead is shown.\n */\n get typeaheadOpen(): boolean {\n return !!this.componentRef;\n }\n private overlay = inject(Overlay);\n private elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n private injector = inject(Injector);\n private autoComplete = inject<SiAutocompleteDirective<TypeaheadMatch>>(SiAutocompleteDirective);\n\n private $typeahead = new ReplaySubject<TypeaheadArray>(1);\n private componentRef?: ComponentRef<SiTypeaheadComponent>;\n private inputTimer: any;\n\n private sourceSubscription?: Subscription;\n private matchSorter = new SiTypeaheadSorting();\n\n private overlayRef?: OverlayRef;\n\n /**\n * Indicates that the typeahead can be potentially open.\n * This signal is typically `true` when the input is focussed.\n * It may be overridden and set to `false` when escape is pressed\n * or when an option was selected.\n */\n private readonly canBeOpen = signal(false);\n private readonly selectionCounter = signal(0);\n private readonly typeaheadOptions = toSignal(\n this.$typeahead.pipe(\n map(options =>\n options.map(option => ({\n text: this.getOptionValue(option),\n option\n }))\n )\n ),\n { initialValue: [] }\n );\n private readonly typeaheadSearch = typeaheadSearch(\n this.typeaheadOptions,\n this.query,\n computed(() => ({\n matchAllTokens: this.typeaheadMatchAllTokens(),\n disableTokenizing: !this.typeaheadTokenize(),\n skipProcessing: !this.typeaheadProcess()\n }))\n );\n private readonly processedSearch = computed(() => {\n this.selectionCounter(); // This is a workaround for the multi-select which needs to trigger a change detection in the typeahead component.\n const matches = this.typeaheadSearch().map(match => ({\n ...match,\n itemSelected: this.typeaheadMultiSelect()\n ? (match.option as Record<string, any>).selected\n : false,\n iconClass: this.getOptionField(match.option, 'iconClass')\n }));\n\n if (this.typeaheadSkipSortingMatches()) {\n return matches;\n } else {\n return this.matchSorter.sortMatches(matches);\n }\n });\n private readonly unprocessedSearch = computed(() => {\n this.selectionCounter(); // This is a workaround for the multi-select which needs to trigger a change detection in the typeahead component.\n return this.typeaheadOptions().map(option => {\n const itemSelected = this.typeaheadMultiSelect()\n ? (option as Record<string, any>).selected\n : false;\n return {\n option,\n text: option.text,\n result: option.text\n ? [{ text: option.text, isMatching: false, matches: 0, uniqueMatches: 0 }]\n : [],\n itemSelected,\n iconClass: this.getOptionField(option.option, 'iconClass'),\n stringMatch: false,\n atBeginning: false,\n matches: 0,\n uniqueMatches: 0,\n uniqueSeparateMatches: 0,\n matchesEntireQuery: false,\n matchesAllParts: false,\n matchesAllPartsSeparately: false,\n active: false\n };\n });\n });\n\n constructor() {\n effect(() => {\n // The value needs to fulfil the minimum length requirement set.\n if (this.canBeOpen() && this.query().length >= this.typeaheadMinLength()) {\n const matches = this.foundMatches();\n const escapedQuery = this.escapeRegex(this.query());\n const equalsExp = new RegExp(`^${escapedQuery}$`, 'i');\n const fullMatches = matches.filter(\n match => match.result.length === 1 && equalsExp.test(match.text)\n );\n if (fullMatches.length > 0) {\n this.typeaheadOnFullMatch.emit(fullMatches[0]);\n }\n if (matches.length) {\n this.loadComponent();\n } else {\n this.removeComponent();\n }\n } else {\n this.removeComponent();\n }\n });\n }\n\n // Every time the main input changes, detect whether it is async and if it is not make an observable out of the array.\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.siTypeahead) {\n this.sourceSubscription?.unsubscribe();\n const typeahead = this.siTypeahead();\n if (isObservable(typeahead)) {\n this.sourceSubscription = typeahead.subscribe(this.$typeahead);\n } else {\n this.$typeahead.next(typeahead);\n }\n }\n }\n\n // Clear the current input timeout (if set) and remove the component when the focus of the host is lost.\n @HostListener('focusout')\n protected onBlur(): void {\n this.clearTimer();\n this.canBeOpen.set(false);\n }\n\n // Start the input timeout to display the typeahead when the host is focussed or a value is inputted into it.\n @HostListener('focusin', ['$event'])\n @HostListener('input', ['$event'])\n protected onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n if (!target) {\n return;\n }\n\n // Get the value or otherwise textContent of the host element now, because later it could be reset.\n const firstValue = target.value || target.textContent;\n this.inputTimer ??= setTimeout(() => {\n this.inputTimer = undefined;\n const value = (target.value || target.textContent) ?? firstValue ?? '';\n this.query.set(value);\n this.typeaheadOnInput.emit(value ?? '');\n this.canBeOpen.set(true);\n }, this.typeaheadWaitMs());\n }\n\n @HostListener('keydown.escape')\n protected onKeydownEscape(): void {\n if (this.typeaheadCloseOnEsc()) {\n this.clearTimer();\n this.canBeOpen.set(false);\n }\n }\n\n @HostListener('keydown.space', ['$event'])\n protected onKeydownSpace(event: Event): void {\n if (this.typeaheadMultiSelect()) {\n // Avoid space character to be inserted into the input field\n event.preventDefault();\n const value = this.autoComplete.active?.value();\n if (value) {\n this.selectMatch(value);\n // this forces change detection in the typeahead component.\n this.selectionCounter.update(v => v + 1);\n }\n }\n }\n\n ngOnDestroy(): void {\n this.clearTimer();\n this.sourceSubscription?.unsubscribe();\n\n this.overlayRef?.dispose();\n }\n\n // Dynamically create the typeahead component and then set the matches and the query.\n private loadComponent(): void {\n if (!this.overlayRef?.hasAttached()) {\n this.overlayRef?.dispose();\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement)\n .withPositions(SiTypeaheadDirective.overlayPositions),\n minWidth: this.typeaheadFullWidth()\n ? this.elementRef.nativeElement.getBoundingClientRect().width + 2 // 2px border\n : 0\n });\n }\n\n if (this.overlayRef.hasAttached()) {\n return;\n }\n const typeaheadPortal = new ComponentPortal(SiTypeaheadComponent, null, this.injector);\n this.componentRef = this.overlayRef.attach(typeaheadPortal);\n this.typeaheadOpenChange.emit(true);\n }\n\n /**\n * Extracts the display value from a typeahead option.\n *\n * For string options, returns the string value directly.\n * For object options, returns the value of the field specified by {@link typeaheadOptionField}\n * (defaults to 'name'), or an empty string if the field doesn't exist.\n *\n * @param option - The typeahead option to extract the value from\n * @returns The string representation of the option for display purposes\n */\n private getOptionValue(option: TypeaheadOption): string {\n return typeof option !== 'object'\n ? option.toString()\n : (option[this.typeaheadOptionField()] ?? '');\n }\n\n /**\n * Extracts a specific field value from a typeahead option.\n *\n * This method is used to access additional properties of object-type options,\n * such as 'selected' for multi-select functionality or 'iconClass' for displaying icons.\n *\n * @param option - The typeahead option to extract the field from\n * @param field - The name of the field to extract\n * @returns The field value as a string if the option is an object and the field exists,\n * otherwise undefined\n */\n private getOptionField(option: TypeaheadOption, field: string): string | undefined {\n return typeof option !== 'object' ? undefined : option[field];\n }\n\n // Select a match, either gets called due to a enter keypress or from the component due to a click.\n /** @internal */\n selectMatch(match: TypeaheadMatch): void {\n match.itemSelected = !match.itemSelected;\n if (!this.typeaheadMultiSelect()) {\n const inputElement =\n this.elementRef.nativeElement.querySelector('input')! ?? this.elementRef.nativeElement;\n inputElement.value = this.typeaheadClearValueOnSelect() ? '' : match.text;\n inputElement.dispatchEvent(new Event('input'));\n }\n\n // Clear the current input timeout (if set) and remove the typeahead.\n this.clearTimer();\n this.typeaheadOnSelect.emit(match);\n if (!this.typeaheadMultiSelect()) {\n this.canBeOpen.set(false);\n }\n }\n\n // Remove the component by clearing the viewContainerRef\n private removeComponent(): void {\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef?.detach();\n this.typeaheadOpenChange.emit(false);\n }\n\n this.componentRef?.destroy();\n this.componentRef = undefined;\n }\n\n private clearTimer(): void {\n if (this.inputTimer) {\n clearTimeout(this.inputTimer);\n this.inputTimer = undefined;\n }\n }\n\n private escapeRegex(query: string): string {\n return query.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTypeaheadItemTemplateDirective } from './si-typeahead-item-template.directive';\nimport { SiTypeaheadDirective } from './si-typeahead.directive';\n\n@NgModule({\n imports: [SiTypeaheadDirective, SiTypeaheadItemTemplateDirective],\n exports: [SiTypeaheadDirective, SiTypeaheadItemTemplateDirective]\n})\nexport class SiTypeaheadModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-typeahead.directive';\nexport * from './si-typeahead.model';\nexport * from './si-typeahead.module';\nexport * from './si-typeahead-item-template.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;MAQU,gCAAgC,CAAA;AAC3C,IAAA,OAAO,sBAAsB,CAC3B,GAAqC,EACrC,GAAQ,EAAA;AA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AAA;sBADxB,YAAY;uBAAC,gBAAgB;gBASpB,cAAc,EAAA,CAAA;sBADvB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;AC/Z3C;;;AAGG;MAUU,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,oBAAoB,EAAE,gCAAgC,CAAA,EAAA,OAAA,EAAA,CACtD,oBAAoB,EAAE,gCAAgC,CAAA,EAAA,CAAA;wGAErD,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,gCAAgC,CAAC;AACjE,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,gCAAgC;AACjE,iBAAA;;;ACZD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-typeahead.mjs","sources":["../../../../projects/element-ng/typeahead/si-typeahead-item-template.directive.ts","../../../../projects/element-ng/typeahead/si-typeahead.component.ts","../../../../projects/element-ng/typeahead/si-typeahead.component.html","../../../../projects/element-ng/typeahead/si-typeahead.search.ts","../../../../projects/element-ng/typeahead/si-typeahead.sorting.ts","../../../../projects/element-ng/typeahead/si-typeahead.directive.ts","../../../../projects/element-ng/typeahead/si-typeahead.module.ts","../../../../projects/element-ng/typeahead/index.ts","../../../../projects/element-ng/typeahead/siemens-element-ng-typeahead.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { TypeaheadOptionItemContext } from './si-typeahead.model';\n\n@Directive({\n selector: '[siTypeaheadItemTemplate]'\n})\nexport class SiTypeaheadItemTemplateDirective {\n static ngTemplateContextGuard(\n dir: SiTypeaheadItemTemplateDirective,\n ctx: any\n ): ctx is TypeaheadOptionItemContext {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n HostListener,\n inject,\n viewChild\n} from '@angular/core';\nimport {\n SiAutocompleteDirective,\n SiAutocompleteListboxDirective,\n SiAutocompleteOptionDirective\n} from '@siemens/element-ng/autocomplete';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiTypeaheadItemTemplateDirective } from './si-typeahead-item-template.directive';\nimport { SiTypeaheadDirective } from './si-typeahead.directive';\nimport { TypeaheadMatch } from './si-typeahead.model';\n\n@Component({\n selector: 'si-typeahead',\n imports: [\n SiAutocompleteListboxDirective,\n SiAutocompleteOptionDirective,\n SiIconComponent,\n NgTemplateOutlet,\n SiTranslatePipe,\n SiTypeaheadItemTemplateDirective\n ],\n templateUrl: './si-typeahead.component.html',\n styleUrl: './si-typeahead.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'w-100' }\n})\nexport class SiTypeaheadComponent implements AfterViewInit {\n protected parent = inject(SiTypeaheadDirective);\n protected readonly matches = computed(() =>\n this.parent.typeaheadOptionsLimit()\n ? this.parent.foundMatches().slice(0, this.parent.typeaheadOptionsLimit())\n : this.parent.foundMatches()\n );\n\n protected readonly multiselect = computed(() => this.parent.typeaheadMultiSelect());\n\n private readonly typeaheadElement = viewChild.required('typeahead', {\n read: ElementRef\n });\n\n protected autocompleteDirective = inject(SiAutocompleteDirective);\n\n ngAfterViewInit(): void {\n this.setHeight(this.typeaheadElement());\n }\n\n @HostListener('mousedown', ['$event'])\n protected onMouseDown(event: Event): void {\n event.preventDefault();\n }\n\n /*\n * Set the height of the element passed to it (typeahead) if there are items displayed,\n * the number of displayed items changed and it is scrollable.\n */\n private setHeight(element: ElementRef): void {\n if (this.matches().length) {\n if (\n this.parent.typeaheadScrollable() &&\n this.parent.typeaheadOptionsInScrollableView() < this.matches().length\n ) {\n const computedStyle = getComputedStyle(element.nativeElement);\n const matchComputedStyle = getComputedStyle(element.nativeElement.firstElementChild);\n const matchHeight = parseFloat(matchComputedStyle.height || '0');\n const paddingTop = parseFloat(computedStyle.paddingTop || '0');\n const paddingBottom = parseFloat(computedStyle.paddingBottom || '');\n const height = this.parent.typeaheadOptionsInScrollableView() * matchHeight;\n element.nativeElement.style.maxBlockSize = `${\n height + paddingTop + paddingBottom + this.parent.typeaheadScrollableAdditionalHeight()\n }px`;\n } else {\n element.nativeElement.style.maxBlockSize = 'auto';\n }\n }\n }\n\n // Gets called when a match is selected by clicking on it.\n protected selectMatch(match: TypeaheadMatch | undefined): void {\n if (match) {\n this.parent.selectMatch(match);\n } else {\n this.parent.createOption();\n }\n }\n}\n","<!-- Template to be used for every match, can be replaced using an input. -->\n<ng-template #defaultItemTemplate let-match=\"match\" siTypeaheadItemTemplate>\n @if (multiselect()) {\n <div class=\"d-flex pe-4\" aria-hidden=\"true\">\n <span class=\"form-check-input si-form-checkbox\" [class.checked]=\"match.itemSelected\"></span>\n </div>\n }\n @if (match.iconClass) {\n <si-icon class=\"icon me-2\" [icon]=\"match.iconClass\" />\n }\n @for (segment of match.result; track $index) {\n <span [class.typeahead-match-segment-matching]=\"segment.isMatching\">{{ segment.text }}</span>\n }\n</ng-template>\n\n@let createOption = parent.typeaheadCreateOption();\n\n<!-- Only display the component if there are any matches and set the CSS transform to properly position the typeahead -->\n<ul\n #typeahead\n class=\"typeahead dropdown-menu\"\n [siAutocompleteListboxFor]=\"autocompleteDirective\"\n [siAutocompleteDefaultIndex]=\"parent.typeaheadAutoSelectIndex()\"\n [attr.aria-label]=\"parent.typeaheadAutocompleteListLabel() | translate\"\n (siAutocompleteOptionSubmitted)=\"selectMatch($event)\"\n>\n <!-- Loop through every match and bind events, the mousedown prevent default is to prevent the host from losing focus on click -->\n @for (match of matches(); track $index) {\n <li\n #typeaheadMatch\n class=\"dropdown-item\"\n [siAutocompleteOption]=\"match\"\n [attr.aria-label]=\"match.text\"\n [attr.aria-selected]=\"multiselect() ? match.itemSelected : null\"\n (click)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <!-- Display either a template set as the input or the template above -->\n <ng-template\n [ngTemplateOutlet]=\"parent.typeaheadItemTemplate() || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{\n item: match.option,\n index: $index,\n match: match,\n query: parent.query()\n }\"\n />\n </li>\n }\n @if (createOption && parent.query().length) {\n <li class=\"dropdown-item\" [siAutocompleteOption]=\"undefined\">\n {{ createOption | translate: { query: parent.query() } }}\n </li>\n }\n</ul>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { computed, Signal } from '@angular/core';\n\nexport interface SearchOptions<T> {\n /** The text that will be used for searching. */\n text: string;\n /** The raw option that will be also included in the Match results */\n option: T;\n}\n\nexport interface MatchSegment {\n text: string;\n isMatching: boolean;\n matches: number;\n uniqueMatches: number;\n}\n\nexport interface Match<T> {\n option: T;\n text: string;\n result: MatchSegment[];\n stringMatch: boolean;\n atBeginning: boolean;\n matches: number;\n uniqueMatches: number;\n uniqueSeparateMatches: number;\n matchesEntireQuery: boolean;\n matchesAllParts: boolean;\n matchesAllPartsSeparately: boolean;\n}\n\nexport interface SearchConfig {\n /** Defines whether to tokenize the search or match the whole search. */\n disableTokenizing?: boolean;\n /**\n * Defines whether and how to require to match with all the tokens if {@link typeaheadTokenize} is enabled.\n * - `no` does not require all of the tokens to match.\n * - `once` requires all of the parts to be found in the search.\n * - `separately` requires all of the parts to be found in the search where there is not an overlapping different result.\n * - `independently` requires all of the parts to be found in the search where there is not an overlapping or adjacent different result.\n * ('independently' also slightly changes sorting behavior in the same way.)\n */\n matchAllTokens: 'no' | 'once' | 'separately' | 'independently';\n}\n\n/**\n * Constructs a typeahead search and provides the matches as a signal.\n *\n * @param options - Factory function that should return the array of options to search in.\n * Is run in a reactive context.\n * @param query - Factory function that should return the current search query. Is run in a reactive context.\n * @param config - Configuration for the search. Is run in a reactive context.\n *\n * @example\n * In a real world, myOptions and mayQuery would be signals.\n * ```ts\n * const search = typeaheadSearch(\n * () => myOptions().map(...),\n * () => myQuery().toLowerCase(),\n * () => ({ matchAllTokens: 'separately' })\n * )\n * ```\n */\nexport const typeaheadSearch = <T>(\n options: () => SearchOptions<T>[],\n query: () => string,\n config: () => SearchConfig\n): Signal<Match<T>[]> => computed(() => new TypeaheadSearch<T>(options, query, config()).matches());\n\nclass TypeaheadSearch<T> {\n readonly matches = computed<Match<T>[]>(() => this.search(this.datasource(), this.query()));\n\n constructor(\n private readonly datasource: () => SearchOptions<T>[],\n private readonly query: () => string,\n private readonly options: SearchConfig\n ) {}\n\n private escapeRegex(query: string): string {\n return query.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n }\n\n private search(options: SearchOptions<T>[], query: string): Match<T>[] {\n try {\n const entireQueryRegex = new RegExp(this.escapeRegex(query), 'gi');\n\n const queryParts = !this.options.disableTokenizing\n ? query.split(/\\s+/g).filter(queryPart => queryPart)\n : query\n ? [query]\n : [];\n\n const queryRegexes = queryParts.map(\n queryPart => new RegExp(this.escapeRegex(queryPart), 'gi')\n );\n // Process the options.\n const matches: Match<T>[] = [];\n options.forEach(option => {\n const optionValue = option.text;\n const stringMatch =\n optionValue.toLocaleLowerCase().trim() === query.toLocaleLowerCase().trim();\n const candidate: Match<T> = {\n option: option.option,\n text: optionValue,\n result: [],\n stringMatch,\n atBeginning: false,\n matches: 0,\n uniqueMatches: 0,\n uniqueSeparateMatches: 0,\n matchesEntireQuery: false,\n matchesAllParts: false,\n matchesAllPartsSeparately: false\n };\n\n // Only search the options if a part of the query is at least one character long to prevent an endless loop.\n if (queryParts.length === 0) {\n if (optionValue) {\n candidate.result.push({\n text: optionValue,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n matches.push(candidate);\n } else {\n const allResults: { index: number; start: number; end: number; result: string }[] = [];\n const allIndexes: number[] = [];\n\n candidate.matchesEntireQuery = !!optionValue.match(entireQueryRegex);\n\n // Loop through the option value to find multiple matches, then store every segment (matching or non-matching) in the results.\n queryRegexes.forEach((queryRegex, index) => {\n let regexMatch = queryRegex.exec(optionValue);\n\n while (regexMatch) {\n allResults.push({\n index,\n start: regexMatch.index,\n end: regexMatch.index + regexMatch[0].length,\n result: regexMatch[0]\n });\n if (!regexMatch.index) {\n candidate.atBeginning = true;\n }\n if (!allIndexes.includes(index)) {\n allIndexes.push(index);\n }\n regexMatch = queryRegex.exec(optionValue);\n }\n });\n\n candidate.matchesAllParts = allIndexes.length === queryParts.length;\n\n // Check if all parts of the query match at least once (if required).\n if (this.options.matchAllTokens === 'no' || candidate.matchesAllParts) {\n const combinedResults: {\n indexes: number[];\n uniqueIndexes: number[];\n start: number;\n end: number;\n result: string;\n }[] = [];\n\n // First combine intersecting (or if set to independently adjacent) results to combined results.\n // We achieve this by first sorting them by the starting index, then by the ending index and then looking for overlaps.\n allResults\n .sort((a, b) => a.start - b.start || a.end - b.end)\n .forEach(result => {\n if (combinedResults.length) {\n const foundPreviousResult = combinedResults.find(previousResult =>\n this.options.matchAllTokens === 'independently'\n ? result.start <= previousResult.end\n : result.start < previousResult.end\n );\n if (foundPreviousResult) {\n foundPreviousResult.result += result.result.slice(\n foundPreviousResult.end - result.start,\n result.result.length\n );\n if (result.end > foundPreviousResult.end) {\n foundPreviousResult.end = result.end;\n }\n foundPreviousResult.indexes.push(result.index);\n if (!foundPreviousResult.uniqueIndexes.includes(result.index)) {\n foundPreviousResult.uniqueIndexes.push(result.index);\n }\n return;\n }\n }\n combinedResults.push({\n ...result,\n indexes: [result.index],\n uniqueIndexes: [result.index]\n });\n });\n\n // Recursively go through all unique combinations of the unique indexes to get the option which has the most indexes.\n const countUniqueSubindexes = (\n indexIndex = 0,\n previousIndexes: number[] = []\n ): number =>\n indexIndex === combinedResults.length\n ? previousIndexes.length\n : Math.max(\n previousIndexes.length,\n ...combinedResults[indexIndex].uniqueIndexes\n .filter(index => !previousIndexes.includes(index))\n .map(index =>\n countUniqueSubindexes(indexIndex + 1, [index, ...previousIndexes])\n )\n );\n\n candidate.uniqueSeparateMatches = countUniqueSubindexes();\n candidate.matchesAllPartsSeparately =\n candidate.uniqueSeparateMatches === queryParts.length;\n\n let currentPreviousEnd = 0;\n\n // Add the combined results to the candidate including the non-matching parts in between.\n combinedResults.forEach(result => {\n const textBefore = optionValue.slice(currentPreviousEnd, result.start);\n if (textBefore) {\n candidate.result.push({\n text: textBefore,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n candidate.result.push({\n text: result.result,\n isMatching: true,\n matches: result.indexes.length,\n uniqueMatches: result.uniqueIndexes.length\n });\n currentPreviousEnd = result.end;\n candidate.matches += result.indexes.length;\n candidate.uniqueMatches += result.uniqueIndexes.length;\n });\n\n // Check if there are result segments and all parts are matched independently (if required).\n if (\n candidate.result.length !== 0 &&\n ((this.options.matchAllTokens !== 'separately' &&\n this.options.matchAllTokens !== 'independently') ||\n candidate.matchesAllPartsSeparately)\n ) {\n const textAtEnd = optionValue.slice(currentPreviousEnd);\n if (textAtEnd) {\n candidate.result.push({\n text: textAtEnd,\n isMatching: false,\n matches: 0,\n uniqueMatches: 0\n });\n }\n matches.push(candidate);\n }\n }\n }\n });\n\n return matches;\n } catch {\n // Could not create regex (only in extremely rare cases, maybe even impossible), so return an empty array.\n return [];\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { TypeaheadMatch } from './si-typeahead.model';\n\nexport class SiTypeaheadSorting {\n sortMatches(matches: TypeaheadMatch[]): TypeaheadMatch[] {\n // Sort the matches,\n // first is the option and query an exact match.\n // then according to whether it is matching in the beginning,\n // then whether it matches the entire untokenized query.\n // then according to how many unique separate matches it contains.\n // then according to how many unique matches it contains.\n // then according to how many matches it contains.\n return matches.sort((matchA, matchB) => {\n if (matchA.stringMatch || matchB.stringMatch) {\n return matchA.stringMatch ? -1 : 1;\n }\n if (matchA.atBeginning) {\n return !matchB.atBeginning ? -1 : this.compareMatches(matchA, matchB);\n } else {\n return matchB.atBeginning ? 1 : this.compareMatches(matchA, matchB);\n }\n });\n }\n\n private compareMatchesNumbers(matchA: TypeaheadMatch, matchB: TypeaheadMatch): number {\n return (\n matchB.uniqueSeparateMatches - matchA.uniqueSeparateMatches ||\n matchB.uniqueMatches - matchA.uniqueMatches ||\n matchB.matches - matchA.matches\n );\n }\n\n private compareMatches(matchA: TypeaheadMatch, matchB: TypeaheadMatch): number {\n if (matchA.matchesEntireQuery) {\n return !matchB.matchesEntireQuery ? -1 : this.compareMatchesNumbers(matchA, matchB);\n } else {\n return matchB.matchesEntireQuery ? 1 : this.compareMatchesNumbers(matchA, matchB);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { ConnectionPositionPair, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n booleanAttribute,\n ComponentRef,\n computed,\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n output,\n signal,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { SiAutocompleteDirective } from '@siemens/element-ng/autocomplete';\nimport { t, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { isObservable, ReplaySubject, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { SiTypeaheadComponent } from './si-typeahead.component';\nimport {\n Typeahead,\n TypeaheadArray,\n TypeaheadMatch,\n TypeaheadOption,\n TypeaheadOptionItemContext\n} from './si-typeahead.model';\nimport { typeaheadSearch } from './si-typeahead.search';\nimport { SiTypeaheadSorting } from './si-typeahead.sorting';\n\n@Directive({\n selector: '[siTypeahead]',\n host: {\n class: 'si-typeahead'\n },\n hostDirectives: [SiAutocompleteDirective],\n exportAs: 'si-typeahead'\n})\nexport class SiTypeaheadDirective implements OnChanges, OnDestroy {\n protected static readonly overlayPositions: ConnectionPositionPair[] = [\n {\n overlayX: 'start',\n overlayY: 'top',\n originX: 'start',\n originY: 'bottom',\n offsetY: 2\n },\n {\n overlayX: 'start',\n overlayY: 'bottom',\n originX: 'start',\n originY: 'top',\n offsetY: -4\n },\n {\n overlayX: 'end',\n overlayY: 'top',\n originX: 'end',\n originY: 'bottom',\n offsetY: 2\n },\n {\n overlayX: 'end',\n overlayY: 'bottom',\n originX: 'end',\n originY: 'top',\n offsetY: -4\n }\n ];\n\n /**\n * Set the options of the typeahead.\n * Has to be either an Array or an Observable of an Array\n * of options (string or object)\n */\n readonly siTypeahead = input.required<Typeahead>();\n\n /**\n * Turns on/off the processing (searching and sorting) of the typeahead options.\n * Is used when searching and sorting is done externally.\n *\n * @defaultValue true\n */\n readonly typeaheadProcess = input(true, {\n transform: booleanAttribute\n });\n /**\n * Makes the typeahead scrollable and sets its height.\n * Uses {@link typeaheadOptionsInScrollableView} and {@link typeaheadScrollableAdditionalHeight}.\n *\n * @defaultValue false\n */\n readonly typeaheadScrollable = input(false, { transform: booleanAttribute });\n\n /**\n * If {@link typeaheadScrollable} is `true`, defines the number of items visible at once.\n *\n * @defaultValue 10\n */\n readonly typeaheadOptionsInScrollableView = input(10);\n\n /**\n * Defines the maximum number of items added into the DOM. Default is 20 and 0 means unlimited.\n *\n * @defaultValue 20\n */\n readonly typeaheadOptionsLimit = input(20);\n\n /**\n * If {@link typeaheadScrollable} is `true`, defines the number of additional pixels\n * to be added the the bottom of the typeahead to show users that it is scrollable.\n *\n * @defaultValue 13\n */\n readonly typeaheadScrollableAdditionalHeight = input(13);\n\n /**\n * Defines the index of the item which should automatically be selected.\n *\n * @defaultValue 0\n */\n readonly typeaheadAutoSelectIndex = input(0, { transform: numberAttribute });\n /**\n * Defines whether the typeahead can be closed using escape.\n *\n * @defaultValue true\n */\n readonly typeaheadCloseOnEsc = input(true, { transform: booleanAttribute });\n /**\n * Defines whether the host value should be cleared when a value is selected.\n *\n * @defaultValue false\n */\n readonly typeaheadClearValueOnSelect = input(false, { transform: booleanAttribute });\n /**\n * Defines the number of milliseconds to wait before displaying a typeahead after the host was\n * focused or a value inputted.\n *\n * @defaultValue 0\n */\n readonly typeaheadWaitMs = input(0);\n\n /**\n * Defines the number of characters the value of the host needs to be before a typeahead is displayed.\n * Use `0` to have it display when focussing the host (clicking or tabbing into it).\n *\n * @defaultValue 1\n */\n readonly typeaheadMinLength = input(1);\n\n /**\n * Defines the name of the field/property the option string is in when the typeahead options are objects.\n *\n * @defaultValue 'name'\n */\n readonly typeaheadOptionField = input('name');\n /**\n * Defines whether multiselection of typeahead is possible with checkboxes.\n *\n * @defaultValue false\n */\n readonly typeaheadMultiSelect = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether to tokenize the search or match the whole search.\n *\n * @defaultValue true\n */\n readonly typeaheadTokenize = input(true, { transform: booleanAttribute });\n /**\n * Defines whether and how to require to match with all the tokens if {@link typeaheadTokenize} is enabled.\n * - `no` does not require all of the tokens to match.\n * - `once` requires all of the parts to be found in the search.\n * - `separately` requires all of the parts to be found in the search where there is not an overlapping different result.\n * - `independently` requires all of the parts to be found in the search where there is not an overlapping or adjacent different result.\n * ('independently' also slightly changes sorting behavior in the same way.)\n *\n * @defaultValue 'separately'\n */\n readonly typeaheadMatchAllTokens = input<'no' | 'once' | 'separately' | 'independently'>(\n 'separately'\n );\n /**\n * Defines an optional template to use as the typeahead match item instead of the one built in.\n * Gets the {@link TypeaheadOptionItemContext} passed to it.\n */\n readonly typeaheadItemTemplate = input<TemplateRef<TypeaheadOptionItemContext>>();\n /**\n * Skip the sorting of matches.\n * If the value is `true`, the matches are sorted according to {@link SiTypeaheadSorting}.\n *\n * @defaultValue false\n */\n readonly typeaheadSkipSortingMatches = input(false, { transform: booleanAttribute });\n\n /**\n * Screen reader only label for the autocomplete list.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL:Suggestions`)\n * ```\n */\n readonly typeaheadAutocompleteListLabel = input(\n t(() => $localize`:@@SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL:Suggestions`)\n );\n\n /**\n * If set, the typeahead will at minium have the width of the connected input field.\n *\n * @defaultValue false\n */\n readonly typeaheadFullWidth = input(false, { transform: booleanAttribute });\n\n /**\n * This option will be shown at the end of the typeahead.\n * Use it to allow users to create new options on the fly.\n *\n * Use the `{{ query }}` parameter in translation values to include the current text from the input.\n *\n * @experimental\n */\n readonly typeaheadCreateOption = input<TranslatableString>();\n /**\n * Emits an Event when the input field is changed.\n */\n readonly typeaheadOnInput = output<string>();\n /**\n * Emits an Event when a typeahead match is selected.\n * The event is a {@link TypeaheadMatch}\n */\n readonly typeaheadOnSelect = output<TypeaheadMatch>();\n\n /**\n * Emits an Event when a typeahead full match exists. A full match occurs when the entered text\n * is equal to one of the typeahead options.\n * The event is a {@link TypeaheadMatch}\n */\n readonly typeaheadOnFullMatch = output<TypeaheadMatch>();\n\n /** Emits whenever the typeahead overlay is opened or closed. */\n readonly typeaheadOpenChange = output<boolean>();\n\n /**\n * Emits when the create option is selected.\n * It will emit the current search query.\n *\n * @experimental\n */\n readonly typeaheadOnCreateOption = output<string>();\n\n /** @internal */\n readonly foundMatches = computed(() =>\n this.typeaheadProcess() ? this.processedSearch() : this.unprocessedSearch()\n );\n /** @internal */\n readonly query = signal('');\n\n /**\n * Indicates whether the typeahead is shown.\n */\n get typeaheadOpen(): boolean {\n return !!this.componentRef;\n }\n private overlay = inject(Overlay);\n private elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n private injector = inject(Injector);\n private autoComplete = inject<SiAutocompleteDirective<TypeaheadMatch>>(SiAutocompleteDirective);\n\n private $typeahead = new ReplaySubject<TypeaheadArray>(1);\n private componentRef?: ComponentRef<SiTypeaheadComponent>;\n private inputTimer: any;\n\n private sourceSubscription?: Subscription;\n private matchSorter = new SiTypeaheadSorting();\n\n private overlayRef?: OverlayRef;\n\n /**\n * Indicates that the typeahead can be potentially open.\n * This signal is typically `true` when the input is focussed.\n * It may be overridden and set to `false` when escape is pressed\n * or when an option was selected.\n */\n private readonly canBeOpen = signal(false);\n private readonly selectionCounter = signal(0);\n private readonly typeaheadOptions = toSignal(\n this.$typeahead.pipe(\n map(options =>\n options.map(option => ({\n text: this.getOptionValue(option),\n option\n }))\n )\n ),\n { initialValue: [] }\n );\n private readonly typeaheadSearch = typeaheadSearch(\n this.typeaheadOptions,\n this.query,\n computed(() => ({\n matchAllTokens: this.typeaheadMatchAllTokens(),\n disableTokenizing: !this.typeaheadTokenize(),\n skipProcessing: !this.typeaheadProcess()\n }))\n );\n private readonly processedSearch = computed(() => {\n this.selectionCounter(); // This is a workaround for the multi-select which needs to trigger a change detection in the typeahead component.\n const matches = this.typeaheadSearch().map(match => ({\n ...match,\n itemSelected: this.typeaheadMultiSelect()\n ? (match.option as Record<string, any>).selected\n : false,\n iconClass: this.getOptionField(match.option, 'iconClass')\n }));\n\n if (this.typeaheadSkipSortingMatches()) {\n return matches;\n } else {\n return this.matchSorter.sortMatches(matches);\n }\n });\n private readonly unprocessedSearch = computed(() => {\n this.selectionCounter(); // This is a workaround for the multi-select which needs to trigger a change detection in the typeahead component.\n return this.typeaheadOptions().map(option => {\n const itemSelected = this.typeaheadMultiSelect()\n ? (option as Record<string, any>).selected\n : false;\n return {\n option,\n text: option.text,\n result: option.text\n ? [{ text: option.text, isMatching: false, matches: 0, uniqueMatches: 0 }]\n : [],\n itemSelected,\n iconClass: this.getOptionField(option.option, 'iconClass'),\n stringMatch: false,\n atBeginning: false,\n matches: 0,\n uniqueMatches: 0,\n uniqueSeparateMatches: 0,\n matchesEntireQuery: false,\n matchesAllParts: false,\n matchesAllPartsSeparately: false,\n active: false\n };\n });\n });\n\n constructor() {\n effect(() => {\n // The value needs to fulfil the minimum length requirement set.\n const matches = this.foundMatches();\n if (\n this.canBeOpen() &&\n this.query().length >= this.typeaheadMinLength() &&\n (matches.length || (this.typeaheadCreateOption() && this.query().length))\n ) {\n const escapedQuery = this.escapeRegex(this.query());\n const equalsExp = new RegExp(`^${escapedQuery}$`, 'i');\n const fullMatches = matches.filter(\n match => match.result.length === 1 && equalsExp.test(match.text)\n );\n if (fullMatches.length > 0) {\n this.typeaheadOnFullMatch.emit(fullMatches[0]);\n }\n if (matches.length || this.typeaheadCreateOption()) {\n this.loadComponent();\n } else {\n this.removeComponent();\n }\n } else {\n this.removeComponent();\n }\n });\n }\n\n // Every time the main input changes, detect whether it is async and if it is not make an observable out of the array.\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.siTypeahead) {\n this.sourceSubscription?.unsubscribe();\n const typeahead = this.siTypeahead();\n if (isObservable(typeahead)) {\n this.sourceSubscription = typeahead.subscribe(this.$typeahead);\n } else {\n this.$typeahead.next(typeahead);\n }\n }\n }\n\n // Clear the current input timeout (if set) and remove the component when the focus of the host is lost.\n @HostListener('focusout')\n protected onBlur(): void {\n this.clearTimer();\n this.canBeOpen.set(false);\n }\n\n // Start the input timeout to display the typeahead when the host is focussed or a value is inputted into it.\n @HostListener('focusin', ['$event'])\n @HostListener('input', ['$event'])\n protected onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n if (!target) {\n return;\n }\n\n // Get the value or otherwise textContent of the host element now, because later it could be reset.\n const firstValue = target.value || target.textContent;\n this.inputTimer ??= setTimeout(() => {\n this.inputTimer = undefined;\n const value = (target.value || target.textContent) ?? firstValue ?? '';\n this.query.set(value);\n this.typeaheadOnInput.emit(value ?? '');\n this.canBeOpen.set(true);\n }, this.typeaheadWaitMs());\n }\n\n @HostListener('keydown.escape')\n protected onKeydownEscape(): void {\n if (this.typeaheadCloseOnEsc()) {\n this.clearTimer();\n this.canBeOpen.set(false);\n }\n }\n\n @HostListener('keydown.space', ['$event'])\n protected onKeydownSpace(event: Event): void {\n if (this.typeaheadMultiSelect()) {\n // Avoid space character to be inserted into the input field\n event.preventDefault();\n const value = this.autoComplete.active?.value();\n if (value) {\n this.selectMatch(value);\n // this forces change detection in the typeahead component.\n this.selectionCounter.update(v => v + 1);\n }\n }\n }\n\n ngOnDestroy(): void {\n this.clearTimer();\n this.sourceSubscription?.unsubscribe();\n\n this.overlayRef?.dispose();\n }\n\n // Dynamically create the typeahead component and then set the matches and the query.\n private loadComponent(): void {\n if (!this.overlayRef?.hasAttached()) {\n this.overlayRef?.dispose();\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef.nativeElement)\n .withPositions(SiTypeaheadDirective.overlayPositions),\n minWidth: this.typeaheadFullWidth()\n ? this.elementRef.nativeElement.getBoundingClientRect().width + 2 // 2px border\n : 0\n });\n }\n\n if (this.overlayRef.hasAttached()) {\n return;\n }\n const typeaheadPortal = new ComponentPortal(SiTypeaheadComponent, null, this.injector);\n this.componentRef = this.overlayRef.attach(typeaheadPortal);\n this.typeaheadOpenChange.emit(true);\n }\n\n /**\n * Extracts the display value from a typeahead option.\n *\n * For string options, returns the string value directly.\n * For object options, returns the value of the field specified by {@link typeaheadOptionField}\n * (defaults to 'name'), or an empty string if the field doesn't exist.\n *\n * @param option - The typeahead option to extract the value from\n * @returns The string representation of the option for display purposes\n */\n private getOptionValue(option: TypeaheadOption): string {\n return typeof option !== 'object'\n ? option.toString()\n : (option[this.typeaheadOptionField()] ?? '');\n }\n\n /**\n * Extracts a specific field value from a typeahead option.\n *\n * This method is used to access additional properties of object-type options,\n * such as 'selected' for multi-select functionality or 'iconClass' for displaying icons.\n *\n * @param option - The typeahead option to extract the field from\n * @param field - The name of the field to extract\n * @returns The field value as a string if the option is an object and the field exists,\n * otherwise undefined\n */\n private getOptionField(option: TypeaheadOption, field: string): string | undefined {\n return typeof option !== 'object' ? undefined : option[field];\n }\n\n /** @internal */\n createOption(): void {\n this.typeaheadOnCreateOption.emit(this.query());\n this.clearTimer();\n if (!this.typeaheadMultiSelect() && this.typeaheadClearValueOnSelect()) {\n const inputElement =\n this.elementRef.nativeElement.querySelector('input')! ?? this.elementRef.nativeElement;\n inputElement.value = '';\n inputElement.dispatchEvent(new Event('input'));\n }\n this.canBeOpen.set(false);\n }\n\n // Select a match, either gets called due to a enter keypress or from the component due to a click.\n /** @internal */\n selectMatch(match: TypeaheadMatch): void {\n match.itemSelected = !match.itemSelected;\n if (!this.typeaheadMultiSelect()) {\n const inputElement =\n this.elementRef.nativeElement.querySelector('input')! ?? this.elementRef.nativeElement;\n inputElement.value = this.typeaheadClearValueOnSelect() ? '' : match.text;\n inputElement.dispatchEvent(new Event('input'));\n }\n\n // Clear the current input timeout (if set) and remove the typeahead.\n this.clearTimer();\n this.typeaheadOnSelect.emit(match);\n if (!this.typeaheadMultiSelect()) {\n this.canBeOpen.set(false);\n }\n }\n\n // Remove the component by clearing the viewContainerRef\n private removeComponent(): void {\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef?.detach();\n this.typeaheadOpenChange.emit(false);\n }\n\n this.componentRef?.destroy();\n this.componentRef = undefined;\n }\n\n private clearTimer(): void {\n if (this.inputTimer) {\n clearTimeout(this.inputTimer);\n this.inputTimer = undefined;\n }\n }\n\n private escapeRegex(query: string): string {\n return query.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTypeaheadItemTemplateDirective } from './si-typeahead-item-template.directive';\nimport { SiTypeaheadDirective } from './si-typeahead.directive';\n\n@NgModule({\n imports: [SiTypeaheadDirective, SiTypeaheadItemTemplateDirective],\n exports: [SiTypeaheadDirective, SiTypeaheadItemTemplateDirective]\n})\nexport class SiTypeaheadModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-typeahead.directive';\nexport * from './si-typeahead.model';\nexport * from './si-typeahead.module';\nexport * from './si-typeahead-item-template.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;MAQU,gCAAgC,CAAA;AAC3C,IAAA,OAAO,sBAAsB,CAC3B,GAAqC,EACrC,GAAQ,EAAA;AAER,QAAA,OAAO,IAAI;;uGALF,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhC,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhC,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAH5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE;AACX,iBAAA;;;ACVD;;;AAGG;MAuCU,oBAAoB,CAAA;AACrB,IAAA,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC5B,OAAO,GAAG,QAAQ,CAAC,MACpC,IAAI,CAAC,MAAM,CAAC,qBAAqB;AAC/B,UAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE;UACvE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAC/B;AAEkB,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;AAElE,IAAA,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;A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BADf,YAAY;uBAAC,UAAU;gBASd,OAAO,EAAA,CAAA;sBAFhB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;sBAClC,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAmBvB,eAAe,EAAA,CAAA;sBADxB,YAAY;uBAAC,gBAAgB;gBASpB,cAAc,EAAA,CAAA;sBADvB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;ACrb3C;;;AAGG;MAUU,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,oBAAoB,EAAE,gCAAgC,CAAA,EAAA,OAAA,EAAA,CACtD,oBAAoB,EAAE,gCAAgC,CAAA,EAAA,CAAA;wGAErD,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,gCAAgC,CAAC;AACjE,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,gCAAgC;AACjE,iBAAA;;;ACZD;;;AAGG;;ACHH;;AAEG;;;;"}
|
package/icon/index.d.ts
CHANGED
|
@@ -206,11 +206,11 @@ declare const elementSoundMute = "data:image/svg+xml;utf8,<svg xmlns='http://www
|
|
|
206
206
|
declare const elementSoundOn = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M238 394a12 12 0 0 1-7.5-2.63L143.8 322H76a12 12 0 0 1-12-12V202a12 12 0 0 1 12-12h67.8l86.72-69.37A12 12 0 0 1 250 130v252a12 12 0 0 1-12 12ZM88 298h60a11.93 11.93 0 0 1 7.49 2.63L226 357.05V155l-70.5 56.36A11.93 11.93 0 0 1 148 214H88ZM383.29 395.27a12 12 0 0 1-8.48-20.48c65.48-65.5 65.48-172.08 0-237.58a12 12 0 1 1 17-17c74.83 74.86 74.83 196.66 0 271.52a12 12 0 0 1-8.52 3.54Zm-63.54-63.72a12 12 0 0 1-8.49-20.49 78.1 78.1 0 0 0 0-110.3 12 12 0 1 1 17-17 102.12 102.12 0 0 1 0 144.24 12 12 0 0 1-8.51 3.55Z' /></svg>";
|
|
207
207
|
declare const elementSquare45Filled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><rect x='113.17' y='113.17' width='285.65' height='285.65' rx='24' transform='rotate(-45 256 256.002)'/></svg>";
|
|
208
208
|
declare const elementSquareFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><rect x='88' y='88' width='336' height='336' rx='48'/></svg>";
|
|
209
|
-
declare const elementStateExclamationMark = "data:image/svg+xml;utf8,<svg
|
|
210
|
-
declare const elementStateInfo = "data:image/svg+xml;utf8,<svg
|
|
211
|
-
declare const elementStatePause = "data:image/svg+xml;utf8,<svg
|
|
209
|
+
declare const elementStateExclamationMark = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><defs><style>.cls-1{stroke-width:0}</style></defs><path class='cls-1' d='M256 279.12c-11.05 0-20-8.95-20-20v-89.8c0-11.05 8.95-20 20-20s20 8.95 20 20v89.8c0 11.05-8.95 20-20 20ZM256.17 359.03h-.34c-13.16 0-23.83-10.75-23.83-24s10.67-24 23.83-24h.34c13.16 0 23.83 10.75 23.83 24s-10.67 24-23.83 24Z'/></svg>";
|
|
210
|
+
declare const elementStateInfo = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><defs><style>.cls-1{stroke-width:0}</style></defs><path class='cls-1' d='M256 356c-11.05 0-20-8.95-20-20v-80c0-11.05 8.95-20 20-20s20 8.95 20 20v80c0 11.05-8.95 20-20 20ZM256.17 156.32h-.34c-13.16 0-23.83 10.75-23.83 24s10.67 24 23.83 24h.34c13.16 0 23.83-10.75 23.83-24s-10.67-24-23.83-24Z'/></svg>";
|
|
211
|
+
declare const elementStatePause = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><defs><style>.cls-1{stroke-width:0}</style></defs><path class='cls-1' d='M222 349.5c-11.05 0-20-8.95-20-20v-147c0-11.05 8.95-20 20-20s20 8.95 20 20v147c0 11.05-8.95 20-20 20ZM290 349.5c-11.05 0-20-8.95-20-20v-147c0-11.05 8.95-20 20-20s20 8.95 20 20v147c0 11.05-8.95 20-20 20Z'/></svg>";
|
|
212
212
|
declare const elementStateProgress = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M270.43 253.68V114.43c69.75 0 127.15 62.86 127.15 139.26 0 38.04-14.23 74.47-39.36 100.74l-87.79-100.74Z'/></svg>";
|
|
213
|
-
declare const elementStateQuestionMark = "data:image/svg+xml;utf8,<svg
|
|
213
|
+
declare const elementStateQuestionMark = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><defs><style>.cls-1{stroke-width:0}</style></defs><path class='cls-1' d='M256 311c-11.05 0-20-8.95-20-20v-29.22a19.994 19.994 0 0 1 13.63-18.96c10.43-3.62 33.09-15.84 33.09-28.82.02-11.91-7.5-22.54-18.71-26.49-14.56-5.12-30.58 2.56-35.7 17.12-3.67 10.42-15.08 15.9-25.5 12.23s-15.9-15.08-12.23-25.5c12.44-35.37 51.34-54.02 86.71-41.58 27.22 9.58 45.48 35.4 45.44 64.25 0 13.92-5.57 34.34-32.11 52.4-5.12 3.49-10.2 6.31-14.61 8.5V291c0 11.05-8.95 20-20 20ZM256.16 375h-.32c-13.17 0-23.84-10.75-23.84-24s10.67-24 23.84-24h.32c13.17 0 23.84 10.75 23.84 24s-10.67 24-23.84 24Z'/></svg>";
|
|
214
214
|
declare const elementStateTick = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M222.25 345.88c-5.12 0-10.24-1.95-14.14-5.86l-56.25-56.25c-7.81-7.81-7.81-20.47 0-28.29s20.47-7.81 28.28 0l42.11 42.11 109.61-109.61c7.81-7.81 20.47-7.81 28.28 0s7.81 20.47 0 28.29L236.39 340.02a19.92 19.92 0 0 1-14.14 5.86Z' style='stroke-width:0'/></svg>";
|
|
215
215
|
declare const elementTriangleFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='m441.77 338.25-.1-.17L295.72 94.42a46.45 46.45 0 0 0-79.44 0 .21.21 0 0 0 0 .06L70.32 338.08l-.1.17a46.45 46.45 0 0 0 39.72 69.68h292.11a46.46 46.46 0 0 0 39.72-69.68Z'/></svg>";
|
|
216
216
|
declare const elementRight2 = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M203.21 159.21a12.45 12.45 0 0 1 15.86-1.44l1.72 1.44 88 88a12.45 12.45 0 0 1 1.44 15.86l-1.44 1.72-88 88a12.43 12.43 0 0 1-19-15.86l1.44-1.72L282.42 256l-79.21-79.21a12.45 12.45 0 0 1-1.44-15.86Z' data-name='Arrow/Right-3'/></svg>";
|
|
@@ -85,6 +85,7 @@ declare class SiLoadingSpinnerDirective implements OnInit, OnChanges, OnDestroy
|
|
|
85
85
|
readonly initialDelay: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
86
86
|
private el;
|
|
87
87
|
private readonly viewRef;
|
|
88
|
+
private cdRef;
|
|
88
89
|
private sub?;
|
|
89
90
|
private progressSubject;
|
|
90
91
|
private off$;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/element-ng",
|
|
3
3
|
"description": "Element Angular component library, implementing the Siemens Design Language",
|
|
4
|
-
"version": "48.
|
|
4
|
+
"version": "48.7.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"@angular/router": "20",
|
|
31
31
|
"@ngx-formly/bootstrap": "^6.2.2",
|
|
32
32
|
"@ngx-formly/core": "^6.2.2",
|
|
33
|
-
"@siemens/element-translate-ng": "48.
|
|
34
|
-
"@siemens/element-theme": "48.
|
|
35
|
-
"@siemens/ngx-datatable": "22 -
|
|
33
|
+
"@siemens/element-translate-ng": "48.7.0",
|
|
34
|
+
"@siemens/element-theme": "48.7.0",
|
|
35
|
+
"@siemens/ngx-datatable": "22 - 25",
|
|
36
36
|
"flag-icons": "^7.3.2",
|
|
37
37
|
"google-libphonenumber": "^3.2.40",
|
|
38
38
|
"ngx-image-cropper": "^9.0.0"
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
"types": "./accordion/index.d.ts",
|
|
72
72
|
"default": "./fesm2022/siemens-element-ng-accordion.mjs"
|
|
73
73
|
},
|
|
74
|
-
"./about": {
|
|
75
|
-
"types": "./about/index.d.ts",
|
|
76
|
-
"default": "./fesm2022/siemens-element-ng-about.mjs"
|
|
77
|
-
},
|
|
78
74
|
"./action-modal": {
|
|
79
75
|
"types": "./action-modal/index.d.ts",
|
|
80
76
|
"default": "./fesm2022/siemens-element-ng-action-modal.mjs"
|
|
81
77
|
},
|
|
78
|
+
"./about": {
|
|
79
|
+
"types": "./about/index.d.ts",
|
|
80
|
+
"default": "./fesm2022/siemens-element-ng-about.mjs"
|
|
81
|
+
},
|
|
82
82
|
"./application-header": {
|
|
83
83
|
"types": "./application-header/index.d.ts",
|
|
84
84
|
"default": "./fesm2022/siemens-element-ng-application-header.mjs"
|
|
@@ -171,6 +171,10 @@
|
|
|
171
171
|
"types": "./file-uploader/index.d.ts",
|
|
172
172
|
"default": "./fesm2022/siemens-element-ng-file-uploader.mjs"
|
|
173
173
|
},
|
|
174
|
+
"./filtered-search": {
|
|
175
|
+
"types": "./filtered-search/index.d.ts",
|
|
176
|
+
"default": "./fesm2022/siemens-element-ng-filtered-search.mjs"
|
|
177
|
+
},
|
|
174
178
|
"./filter-bar": {
|
|
175
179
|
"types": "./filter-bar/index.d.ts",
|
|
176
180
|
"default": "./fesm2022/siemens-element-ng-filter-bar.mjs"
|
|
@@ -179,10 +183,6 @@
|
|
|
179
183
|
"types": "./footer/index.d.ts",
|
|
180
184
|
"default": "./fesm2022/siemens-element-ng-footer.mjs"
|
|
181
185
|
},
|
|
182
|
-
"./filtered-search": {
|
|
183
|
-
"types": "./filtered-search/index.d.ts",
|
|
184
|
-
"default": "./fesm2022/siemens-element-ng-filtered-search.mjs"
|
|
185
|
-
},
|
|
186
186
|
"./form": {
|
|
187
187
|
"types": "./form/index.d.ts",
|
|
188
188
|
"default": "./fesm2022/siemens-element-ng-form.mjs"
|
|
@@ -411,14 +411,14 @@
|
|
|
411
411
|
"types": "./tree-view/index.d.ts",
|
|
412
412
|
"default": "./fesm2022/siemens-element-ng-tree-view.mjs"
|
|
413
413
|
},
|
|
414
|
-
"./typeahead": {
|
|
415
|
-
"types": "./typeahead/index.d.ts",
|
|
416
|
-
"default": "./fesm2022/siemens-element-ng-typeahead.mjs"
|
|
417
|
-
},
|
|
418
414
|
"./unauthorized-page": {
|
|
419
415
|
"types": "./unauthorized-page/index.d.ts",
|
|
420
416
|
"default": "./fesm2022/siemens-element-ng-unauthorized-page.mjs"
|
|
421
417
|
},
|
|
418
|
+
"./typeahead": {
|
|
419
|
+
"types": "./typeahead/index.d.ts",
|
|
420
|
+
"default": "./fesm2022/siemens-element-ng-typeahead.mjs"
|
|
421
|
+
},
|
|
422
422
|
"./wizard": {
|
|
423
423
|
"types": "./wizard/index.d.ts",
|
|
424
424
|
"default": "./fesm2022/siemens-element-ng-wizard.mjs"
|
|
@@ -53,9 +53,6 @@ export const scssMigrationRule = (_options) => {
|
|
|
53
53
|
}
|
|
54
54
|
const scssFiles = await discoverSourceFiles(tree, context, _options.path, '.scss');
|
|
55
55
|
for (const filePath of scssFiles) {
|
|
56
|
-
if (filePath.match(/node_modules/)) {
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
56
|
const content = tree.readText(filePath);
|
|
60
57
|
if (content.includes(STYLE_REPLACEMENTS[0].replace) ||
|
|
61
58
|
content.includes(STYLE_REPLACEMENTS[1].replace)) {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: MIT
|
|
4
4
|
*/
|
|
5
5
|
export const STYLE_REPLACEMENTS = [
|
|
6
|
+
// Single quotes
|
|
6
7
|
{
|
|
7
8
|
replace: `@import '@simpl/element-theme/`,
|
|
8
9
|
new: `@import '@siemens/element-theme/`
|
|
@@ -10,12 +11,24 @@ export const STYLE_REPLACEMENTS = [
|
|
|
10
11
|
{
|
|
11
12
|
replace: `@use '@simpl/element-theme/`,
|
|
12
13
|
new: `@use '@siemens/element-theme/`
|
|
14
|
+
},
|
|
15
|
+
// Double quotes
|
|
16
|
+
{
|
|
17
|
+
replace: `@import "@simpl/element-theme/`,
|
|
18
|
+
new: `@import "@siemens/element-theme/`
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
replace: `@use "@simpl/element-theme/`,
|
|
22
|
+
new: `@use "@siemens/element-theme/`
|
|
13
23
|
}
|
|
14
24
|
];
|
|
15
25
|
// Apply theme styles if not already present
|
|
16
26
|
export const THEME_STYLE_ENTRIES = [
|
|
27
|
+
{ insert: `// Load Siemens fonts` },
|
|
17
28
|
{ insert: `@use '@simpl/brand/assets/fonts/styles/siemens-sans';` },
|
|
29
|
+
{ insert: `// Load Element icons` },
|
|
18
30
|
{ insert: `@use '@simpl/element-icons/dist/style/simpl-element-icons';` },
|
|
31
|
+
{ insert: `// Use Element theme` },
|
|
19
32
|
{
|
|
20
33
|
insert: `@use '@siemens/element-theme/src/theme' with (
|
|
21
34
|
$element-theme-default: 'siemens-brand',
|
|
@@ -24,9 +37,11 @@ export const THEME_STYLE_ENTRIES = [
|
|
|
24
37
|
'element'
|
|
25
38
|
)
|
|
26
39
|
);`,
|
|
27
|
-
pattern: /@use '@siemens\/element-theme\/src\/theme' with \(([\s\S]*?)\);/g
|
|
40
|
+
pattern: /@use ['"]@siemens\/element-theme\/src\/theme['"] with \(([\s\S]*?)\);/g
|
|
28
41
|
},
|
|
42
|
+
{ insert: `// Use Element components` },
|
|
29
43
|
{ insert: `@use '@siemens/element-ng/element-ng';` },
|
|
44
|
+
{ insert: `// Actually build the siemens-brand theme` },
|
|
30
45
|
{ insert: `@use '@siemens/element-theme/src/styles/themes';` },
|
|
31
46
|
{ insert: `@use '@simpl/brand/dist/element-theme-siemens-brand-light' as brand-light;` },
|
|
32
47
|
{ insert: `@use '@simpl/brand/dist/element-theme-siemens-brand-dark' as brand-dark;` },
|
|
@@ -40,7 +55,8 @@ export const THEME_STYLE_ENTRIES = [
|
|
|
40
55
|
}
|
|
41
56
|
];
|
|
42
57
|
export const SCSS_USE_PATTERNS = [
|
|
43
|
-
/@use '@simpl\/element-theme\/src\/theme' with \(([\s\S]*?)\);/g,
|
|
44
|
-
/@use '@simpl\/element-ng\/simpl-element-ng' with \(([\s\S]*?)\);/g,
|
|
45
|
-
/@use '@simpl\/element-theme\/src\/theme';/g
|
|
58
|
+
/@use ['"]@simpl\/element-theme\/src\/theme['"] with \(([\s\S]*?)\);/g,
|
|
59
|
+
/@use ['"]@simpl\/element-ng\/simpl-element-ng['"] with \(([\s\S]*?)\);/g,
|
|
60
|
+
/@use ['"]@simpl\/element-theme\/src\/theme['"];/g,
|
|
61
|
+
/@use ['"]@simpl\/element-ng\/simpl-element-ng['"];/g
|
|
46
62
|
];
|
|
@@ -88,12 +88,16 @@ const visitDirectory = (fs, dirPath) => {
|
|
|
88
88
|
const entries = fs.getDir(dirPath);
|
|
89
89
|
const files = [];
|
|
90
90
|
entries.subfiles.forEach(filename => {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
if (!filename.startsWith('.')) {
|
|
92
|
+
const fullPath = normalize(`${dirPath}/${filename}`);
|
|
93
|
+
files.push(fullPath);
|
|
94
|
+
}
|
|
93
95
|
});
|
|
94
96
|
entries.subdirs.forEach(subdirname => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
if (!subdirname.startsWith('.') && subdirname !== 'node_modules') {
|
|
98
|
+
const newFiles = visitDirectory(fs, `${dirPath}/${subdirname}`);
|
|
99
|
+
files.push(...newFiles);
|
|
100
|
+
}
|
|
97
101
|
});
|
|
98
102
|
return files;
|
|
99
103
|
};
|
package/summary-chip/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare class SiSummaryChipComponent {
|
|
|
18
18
|
/** The label. */
|
|
19
19
|
readonly label: _angular_core.InputSignal<TranslatableString>;
|
|
20
20
|
/** Value to display. */
|
|
21
|
-
readonly value: _angular_core.InputSignal<TranslatableString>;
|
|
21
|
+
readonly value: _angular_core.InputSignal<TranslatableString | undefined>;
|
|
22
22
|
/**
|
|
23
23
|
* Selected state, will change when clicked.
|
|
24
24
|
* @defaultValue false
|
|
@@ -30,7 +30,7 @@ declare class SiSummaryChipComponent {
|
|
|
30
30
|
*/
|
|
31
31
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
32
32
|
/**
|
|
33
|
-
* Whether to hide the label. The label will still be used for screen-readers.
|
|
33
|
+
* Whether to hide the label. Only takes effect when both {@link icon} and {@link value} are provided. The label will still be used for screen-readers.
|
|
34
34
|
* @defaultValue false
|
|
35
35
|
*/
|
|
36
36
|
readonly hideLabel: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -42,7 +42,7 @@ declare class SiSummaryChipComponent {
|
|
|
42
42
|
}>;
|
|
43
43
|
protected toggleSelected(): void;
|
|
44
44
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiSummaryChipComponent, never>;
|
|
45
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiSummaryChipComponent, "si-summary-chip", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "stackedIcon": { "alias": "stackedIcon"; "required": false; "isSignal": true; }; "stackedColor": { "alias": "stackedColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required":
|
|
45
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiSummaryChipComponent, "si-summary-chip", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "stackedIcon": { "alias": "stackedIcon"; "required": false; "isSignal": true; }; "stackedColor": { "alias": "stackedColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "hideLabel": { "alias": "hideLabel"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, never, never, true, never>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export { SiSummaryChipComponent };
|