@siemens/element-ng 51.2.0 → 51.3.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.
Files changed (29) hide show
  1. package/README.md +2 -2
  2. package/fesm2022/siemens-element-ng-datepicker.mjs +13 -3
  3. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  4. package/fesm2022/siemens-element-ng-filtered-search.mjs +7 -3
  5. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  6. package/fesm2022/siemens-element-ng-form.mjs +4 -4
  7. package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
  8. package/fesm2022/siemens-element-ng-number-input.mjs +3 -2
  9. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
  10. package/fesm2022/siemens-element-ng-popover.mjs +16 -5
  11. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  12. package/fesm2022/siemens-element-ng-tree-view.mjs +15 -10
  13. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  14. package/fesm2022/siemens-element-ng-typeahead.mjs +9 -0
  15. package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
  16. package/package.json +5 -5
  17. package/schematics/migrations/data/attribute-selectors.js +8 -1
  18. package/schematics/migrations/data/element-selectors.js +7 -1
  19. package/schematics/migrations/data/symbol-renaming.js +10 -0
  20. package/schematics/migrations/utilities/attribute-selector.migration.js +26 -10
  21. package/schematics/migrations/utilities/element-selector.migration.js +25 -15
  22. package/schematics/migrations/utilities/symbol-renaming.migration.js +90 -3
  23. package/schematics/utils/template-edit-utils.js +9 -0
  24. package/types/siemens-element-ng-datepicker.d.ts +6 -1
  25. package/types/siemens-element-ng-form.d.ts +1 -1
  26. package/types/siemens-element-ng-number-input.d.ts +2 -2
  27. package/types/siemens-element-ng-popover.d.ts +1 -1
  28. package/types/siemens-element-ng-tree-view.d.ts +1 -0
  29. package/types/siemens-element-ng-typeahead.d.ts +7 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, model, output, viewChild, computed, Component, signal, Directive, inject, LOCALE_ID, DestroyRef, untracked, Injector, afterNextRender, booleanAttribute, ElementRef, viewChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
+ import { input, model, output, viewChild, inject, Injector, afterNextRender, computed, Component, signal, Directive, LOCALE_ID, DestroyRef, untracked, booleanAttribute, ElementRef, viewChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
4
4
  import { elementCancel, elementSearch } from '@siemens/element-icons';
5
5
  import { defaultConnectedOverlayScrollStrategyFactory, isRTL } from '@siemens/element-ng/common';
@@ -111,9 +111,13 @@ class SiFilteredSearchInputComponent {
111
111
  enterSubmit = output();
112
112
  inputElement = viewChild.required('freeTextInputElement', /* @ts-ignore */
113
113
  ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
114
+ typeahead = viewChild.required(SiTypeaheadDirective, /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "typeahead" }] : /* istanbul ignore next */ []));
116
+ injector = inject(Injector);
114
117
  /** Public method to focus the input element */
115
118
  focus() {
116
119
  this.inputElement().nativeElement.focus();
120
+ afterNextRender(() => this.typeahead().updateOverlayPosition(), { injector: this.injector });
117
121
  }
118
122
  typeaheadCreateOption = computed(() => this.freeTextCriterion() && !this.maxCriteriaReached() && this.allowFreeText()
119
123
  ? this.searchForFreeTextLabel()
@@ -158,14 +162,14 @@ class SiFilteredSearchInputComponent {
158
162
  this.searchValue.set('');
159
163
  }
160
164
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
161
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiFilteredSearchInputComponent, isStandalone: true, selector: "si-filtered-search-input", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, typeaheadOptionsLimit: { classPropertyName: "typeaheadOptionsLimit", publicName: "typeaheadOptionsLimit", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategyFactory: { classPropertyName: "scrollStrategyFactory", publicName: "scrollStrategyFactory", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: true, transformFunction: null }, freeTextCriterion: { classPropertyName: "freeTextCriterion", publicName: "freeTextCriterion", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaReached: { classPropertyName: "maxCriteriaReached", publicName: "maxCriteriaReached", isSignal: true, isRequired: true, transformFunction: null }, allowFreeText: { classPropertyName: "allowFreeText", publicName: "allowFreeText", isSignal: true, isRequired: true, transformFunction: null }, searchForFreeTextLabel: { classPropertyName: "searchForFreeTextLabel", publicName: "searchForFreeTextLabel", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { searchValue: "searchValueChange", createCriterion: "createCriterion", createCriterionByName: "createCriterionByName", backspaceOverflow: "backspaceOverflow", createFreeTextPill: "createFreeTextPill", inputFocus: "inputFocus", enterSubmit: "enterSubmit" }, host: { classAttribute: "w-100" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["freeTextInputElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #freeTextInputElement\n type=\"text\"\n class=\"value-input ps-2 me-2 w-100\"\n typeaheadOptionField=\"translatedLabel\"\n typeaheadClearValueOnSelect\n [siTypeahead]=\"dataSource()\"\n [typeaheadScrollStrategy]=\"typeaheadScrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [typeaheadAutoSelectIndex]=\"searchValue() ? 0 : -1\"\n [typeaheadCreateOption]=\"typeaheadCreateOption()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [value]=\"searchValue()\"\n (focus)=\"inputFocus.emit()\"\n (input)=\"freeTextInputHandler($event)\"\n (blur)=\"freeTextBlurHandler()\"\n (keydown.backspace)=\"freeTextBackspaceHandler($event)\"\n (keydown.enter)=\"enterSubmit.emit()\"\n (typeaheadOnSelect)=\"typeaheadOnSelectCriterionHandler($event.option)\"\n (typeaheadOnCreateOption)=\"createFreeTextPillHandler($event)\"\n/>\n", styles: ["input{background:transparent;border:0;padding-block:0}input:focus{min-inline-size:20ch}input:hover::placeholder{opacity:1}:host-context(si-filtered-search-value + :host) input::placeholder{color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
165
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiFilteredSearchInputComponent, isStandalone: true, selector: "si-filtered-search-input", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, typeaheadOptionsLimit: { classPropertyName: "typeaheadOptionsLimit", publicName: "typeaheadOptionsLimit", isSignal: true, isRequired: true, transformFunction: null }, optionsInScrollableView: { classPropertyName: "optionsInScrollableView", publicName: "optionsInScrollableView", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: true, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: true, transformFunction: null }, scrollStrategyFactory: { classPropertyName: "scrollStrategyFactory", publicName: "scrollStrategyFactory", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: true, transformFunction: null }, freeTextCriterion: { classPropertyName: "freeTextCriterion", publicName: "freeTextCriterion", isSignal: true, isRequired: true, transformFunction: null }, maxCriteriaReached: { classPropertyName: "maxCriteriaReached", publicName: "maxCriteriaReached", isSignal: true, isRequired: true, transformFunction: null }, allowFreeText: { classPropertyName: "allowFreeText", publicName: "allowFreeText", isSignal: true, isRequired: true, transformFunction: null }, searchForFreeTextLabel: { classPropertyName: "searchForFreeTextLabel", publicName: "searchForFreeTextLabel", isSignal: true, isRequired: true, transformFunction: null }, disableSelectionByColonAndSemicolon: { classPropertyName: "disableSelectionByColonAndSemicolon", publicName: "disableSelectionByColonAndSemicolon", isSignal: true, isRequired: true, transformFunction: null }, onlySelectValue: { classPropertyName: "onlySelectValue", publicName: "onlySelectValue", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { searchValue: "searchValueChange", createCriterion: "createCriterion", createCriterionByName: "createCriterionByName", backspaceOverflow: "backspaceOverflow", createFreeTextPill: "createFreeTextPill", inputFocus: "inputFocus", enterSubmit: "enterSubmit" }, host: { classAttribute: "w-100" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["freeTextInputElement"], descendants: true, isSignal: true }, { propertyName: "typeahead", first: true, predicate: SiTypeaheadDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<input\n #freeTextInputElement\n type=\"text\"\n class=\"value-input ps-2 me-2 w-100\"\n typeaheadOptionField=\"translatedLabel\"\n typeaheadClearValueOnSelect\n [siTypeahead]=\"dataSource()\"\n [typeaheadScrollStrategy]=\"typeaheadScrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [typeaheadAutoSelectIndex]=\"searchValue() ? 0 : -1\"\n [typeaheadCreateOption]=\"typeaheadCreateOption()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [value]=\"searchValue()\"\n (focus)=\"inputFocus.emit()\"\n (input)=\"freeTextInputHandler($event)\"\n (blur)=\"freeTextBlurHandler()\"\n (keydown.backspace)=\"freeTextBackspaceHandler($event)\"\n (keydown.enter)=\"enterSubmit.emit()\"\n (typeaheadOnSelect)=\"typeaheadOnSelectCriterionHandler($event.option)\"\n (typeaheadOnCreateOption)=\"createFreeTextPillHandler($event)\"\n/>\n", styles: ["input{background:transparent;border:0;padding-block:0}input:focus{min-inline-size:20ch}input:hover::placeholder{opacity:1}:host-context(si-filtered-search-value + :host) input::placeholder{color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: SiTypeaheadDirective, selector: "[siTypeahead]", inputs: ["siTypeahead", "typeaheadProcess", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadOptionsLimit", "typeaheadScrollableAdditionalHeight", "typeaheadAutoSelectIndex", "typeaheadCloseOnEsc", "typeaheadClearValueOnSelect", "typeaheadWaitMs", "typeaheadMinLength", "typeaheadOptionField", "typeaheadMultiSelect", "typeaheadTokenize", "typeaheadMatchAllTokens", "typeaheadItemTemplate", "typeaheadSkipSortingMatches", "typeaheadAutocompleteListLabel", "typeaheadFullWidth", "typeaheadScrollStrategy", "typeaheadCreateOption"], outputs: ["typeaheadOnInput", "typeaheadOnSelect", "typeaheadOnFullMatch", "typeaheadOpenChange", "typeaheadOnCreateOption"], exportAs: ["si-typeahead"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
162
166
  }
163
167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiFilteredSearchInputComponent, decorators: [{
164
168
  type: Component,
165
169
  args: [{ selector: 'si-filtered-search-input', imports: [FormsModule, SiTypeaheadDirective, SiTranslatePipe], host: {
166
170
  class: 'w-100'
167
171
  }, template: "<input\n #freeTextInputElement\n type=\"text\"\n class=\"value-input ps-2 me-2 w-100\"\n typeaheadOptionField=\"translatedLabel\"\n typeaheadClearValueOnSelect\n [siTypeahead]=\"dataSource()\"\n [typeaheadScrollStrategy]=\"typeaheadScrollStrategy()\"\n [typeaheadMinLength]=\"0\"\n [typeaheadOptionsLimit]=\"typeaheadOptionsLimit()\"\n [typeaheadScrollable]=\"true\"\n [typeaheadOptionsInScrollableView]=\"optionsInScrollableView()\"\n [typeaheadAutoSelectIndex]=\"searchValue() ? 0 : -1\"\n [typeaheadCreateOption]=\"typeaheadCreateOption()\"\n [disabled]=\"disabled()\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"searchLabel() | translate\"\n [value]=\"searchValue()\"\n (focus)=\"inputFocus.emit()\"\n (input)=\"freeTextInputHandler($event)\"\n (blur)=\"freeTextBlurHandler()\"\n (keydown.backspace)=\"freeTextBackspaceHandler($event)\"\n (keydown.enter)=\"enterSubmit.emit()\"\n (typeaheadOnSelect)=\"typeaheadOnSelectCriterionHandler($event.option)\"\n (typeaheadOnCreateOption)=\"createFreeTextPillHandler($event)\"\n/>\n", styles: ["input{background:transparent;border:0;padding-block:0}input:focus{min-inline-size:20ch}input:hover::placeholder{opacity:1}:host-context(si-filtered-search-value + :host) input::placeholder{color:transparent}\n"] }]
168
- }], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], typeaheadOptionsLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeaheadOptionsLimit", required: true }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: true }] }], scrollStrategyFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategyFactory", required: true }] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: true }] }, { type: i0.Output, args: ["searchValueChange"] }], freeTextCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextCriterion", required: true }] }], maxCriteriaReached: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaReached", required: true }] }], allowFreeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowFreeText", required: true }] }], searchForFreeTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchForFreeTextLabel", required: true }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: true }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: true }] }], createCriterion: [{ type: i0.Output, args: ["createCriterion"] }], createCriterionByName: [{ type: i0.Output, args: ["createCriterionByName"] }], backspaceOverflow: [{ type: i0.Output, args: ["backspaceOverflow"] }], createFreeTextPill: [{ type: i0.Output, args: ["createFreeTextPill"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], enterSubmit: [{ type: i0.Output, args: ["enterSubmit"] }], inputElement: [{ type: i0.ViewChild, args: ['freeTextInputElement', { isSignal: true }] }] } });
172
+ }], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], typeaheadOptionsLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeaheadOptionsLimit", required: true }] }], optionsInScrollableView: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsInScrollableView", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: true }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: true }] }], scrollStrategyFactory: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategyFactory", required: true }] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: true }] }, { type: i0.Output, args: ["searchValueChange"] }], freeTextCriterion: [{ type: i0.Input, args: [{ isSignal: true, alias: "freeTextCriterion", required: true }] }], maxCriteriaReached: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCriteriaReached", required: true }] }], allowFreeText: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowFreeText", required: true }] }], searchForFreeTextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchForFreeTextLabel", required: true }] }], disableSelectionByColonAndSemicolon: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelectionByColonAndSemicolon", required: true }] }], onlySelectValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelectValue", required: true }] }], createCriterion: [{ type: i0.Output, args: ["createCriterion"] }], createCriterionByName: [{ type: i0.Output, args: ["createCriterionByName"] }], backspaceOverflow: [{ type: i0.Output, args: ["backspaceOverflow"] }], createFreeTextPill: [{ type: i0.Output, args: ["createFreeTextPill"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], enterSubmit: [{ type: i0.Output, args: ["enterSubmit"] }], inputElement: [{ type: i0.ViewChild, args: ['freeTextInputElement', { isSignal: true }] }], typeahead: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiTypeaheadDirective), { isSignal: true }] }] } });
169
173
 
170
174
  /**
171
175
  * Copyright (c) Siemens 2016 - 2026