@siemens/element-ng 48.2.0 → 48.4.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 (80) hide show
  1. package/accordion/index.d.ts +5 -2
  2. package/application-header/index.d.ts +15 -2
  3. package/chat-messages/index.d.ts +670 -0
  4. package/chat-messages/package.json +3 -0
  5. package/dashboard/index.d.ts +3 -3
  6. package/fesm2022/siemens-element-ng-accordion.mjs +7 -4
  7. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  8. package/fesm2022/siemens-element-ng-application-header.mjs +62 -1
  9. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  10. package/fesm2022/siemens-element-ng-card.mjs +4 -4
  11. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  12. package/fesm2022/siemens-element-ng-chat-messages.mjs +959 -0
  13. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -0
  14. package/fesm2022/siemens-element-ng-dashboard.mjs +15 -15
  15. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  16. package/fesm2022/siemens-element-ng-datepicker.mjs +5 -3
  17. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  18. package/fesm2022/siemens-element-ng-file-uploader.mjs +277 -118
  19. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  20. package/fesm2022/siemens-element-ng-filtered-search.mjs +7 -12
  21. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  22. package/fesm2022/siemens-element-ng-icon.mjs +3 -1
  23. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  24. package/fesm2022/siemens-element-ng-ip-input.mjs +92 -89
  25. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
  26. package/fesm2022/siemens-element-ng-markdown-renderer.mjs +253 -0
  27. package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -0
  28. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +2 -9
  29. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  30. package/fesm2022/siemens-element-ng-phone-number.mjs +5 -4
  31. package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
  32. package/fesm2022/siemens-element-ng-popover.mjs +3 -4
  33. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  34. package/fesm2022/siemens-element-ng-resize-observer.mjs +13 -0
  35. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
  36. package/fesm2022/siemens-element-ng-select.mjs +4 -0
  37. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  38. package/fesm2022/siemens-element-ng-side-panel.mjs +3 -5
  39. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  40. package/fesm2022/siemens-element-ng-status-bar.mjs +3 -4
  41. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  42. package/fesm2022/siemens-element-ng-tour.mjs +58 -21
  43. package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
  44. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-tree-view.mjs +43 -4
  46. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  47. package/file-uploader/index.d.ts +119 -15
  48. package/filtered-search/index.d.ts +6 -7
  49. package/icon/index.d.ts +3 -1
  50. package/ip-input/index.d.ts +13 -0
  51. package/markdown-renderer/index.d.ts +36 -0
  52. package/markdown-renderer/package.json +3 -0
  53. package/navbar-vertical/index.d.ts +2 -4
  54. package/package.json +15 -7
  55. package/resize-observer/index.d.ts +13 -0
  56. package/schematics/migrations/action-modal-migration/action-modal-migration.js +47 -6
  57. package/schematics/migrations/data/attribute-selectors.js +6 -0
  58. package/schematics/migrations/data/component-names.js +78 -0
  59. package/schematics/migrations/data/element-selectors.js +10 -0
  60. package/schematics/migrations/data/index.js +17 -0
  61. package/schematics/migrations/data/output-names.js +7 -0
  62. package/schematics/migrations/data/symbol-removals.js +49 -0
  63. package/schematics/migrations/element-migration/element-migration.js +93 -0
  64. package/schematics/migrations/element-migration/index.js +5 -0
  65. package/schematics/migrations/index.js +7 -2
  66. package/schematics/migrations/wizard-migration/index.js +80 -0
  67. package/schematics/scss-import-to-siemens-migration/index.js +3 -3
  68. package/schematics/ts-import-to-siemens-migration/index.js +2 -2
  69. package/schematics/utils/index.js +3 -3
  70. package/schematics/utils/project-utils.js +24 -35
  71. package/schematics/utils/template-utils.js +78 -2
  72. package/schematics/utils/ts-utils.js +5 -5
  73. package/select/index.d.ts +5 -0
  74. package/status-bar/index.d.ts +0 -1
  75. package/template-i18n.json +10 -0
  76. package/tour/index.d.ts +4 -2
  77. package/translate/index.d.ts +10 -0
  78. package/tree-view/index.d.ts +40 -1
  79. package/schematics/migrations/to-legacy-migration/to-legacy-migration.js +0 -55
  80. package/schematics/migrations/to-legacy-migration/to-legacy-replacement.js +0 -35
@@ -20,6 +20,112 @@ interface UploadFile {
20
20
  progress: number;
21
21
  }
22
22
 
23
+ interface FileUploadError extends UploadFile {
24
+ status: 'invalid';
25
+ errorText: TranslatableString;
26
+ }
27
+ /**
28
+ * Directive for handling file uploads with validation for file type and size.
29
+ *
30
+ * @example
31
+ * ```html
32
+ * <input
33
+ * #fileInput
34
+ * type="file"
35
+ * class="d-none"
36
+ * siFileUpload
37
+ * [accept]="accept()"
38
+ * [maxFileSize]="maxFileSize()"
39
+ * [multiple]="true"
40
+ * (validFiles)="onFilesAdded($event)"
41
+ * (fileError)="onFileError($event)"
42
+ * />
43
+ * ```
44
+ */
45
+ declare class SiFileUploadDirective {
46
+ /**
47
+ * Text or translation key of message title if incorrect file type is dragged / dropped.
48
+ *
49
+ * @defaultValue
50
+ * ```
51
+ * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_TYPE:Incorrect file type selected`)
52
+ * ```
53
+ */
54
+ readonly errorTextFileType: _angular_core.InputSignal<TranslatableString>;
55
+ /**
56
+ * Message or translation key if file exceeds the maximum file size limit.
57
+ *
58
+ * @defaultValue
59
+ * ```
60
+ * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
61
+ * ```
62
+ */
63
+ readonly errorTextFileMaxSize: _angular_core.InputSignal<TranslatableString>;
64
+ /**
65
+ * Define which file types are suggested in file browser.
66
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept
67
+ */
68
+ readonly accept: _angular_core.InputSignal<string | undefined>;
69
+ /**
70
+ * Define maximal allowed file size in bytes.
71
+ */
72
+ readonly maxFileSize: _angular_core.InputSignal<number | undefined>;
73
+ /**
74
+ * Defines whether the file input allows selecting multiple files.
75
+ * When {@link directoryUpload} is enabled, this will have no effect.
76
+ *
77
+ * @defaultValue false
78
+ */
79
+ readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
80
+ /**
81
+ * Enable directory upload.
82
+ *
83
+ * @defaultValue false
84
+ */
85
+ readonly directoryUpload: _angular_core.InputSignalWithTransform<boolean, unknown>;
86
+ /**
87
+ * Event emitted when valid files are added.
88
+ * Invalid files (due to size or type) will be ignored and instead the {@link fileError} event will be emitted.
89
+ */
90
+ readonly validFiles: _angular_core.OutputEmitterRef<UploadFile[]>;
91
+ /**
92
+ * Event emitted when valid files are added.
93
+ * Also includes invalid files, but with status 'invalid' and an errorText describing why they were ignored.
94
+ */
95
+ readonly filesAdded: _angular_core.OutputEmitterRef<UploadFile[]>;
96
+ /**
97
+ * Event emitted when file validation errors occur, including files that were ignored due to size or type.
98
+ */
99
+ readonly fileError: _angular_core.OutputEmitterRef<FileUploadError>;
100
+ private readonly elementRef;
101
+ private locale;
102
+ private numberFormat;
103
+ protected onInputChange(event: Event): void;
104
+ /**
105
+ * Handle files from input or drag and drop
106
+ */
107
+ handleFiles(files: FileList | null): void;
108
+ /**
109
+ * Handle directory entries for drag and drop
110
+ */
111
+ handleItems(items: DataTransferItemList): void;
112
+ /**
113
+ * Reset the file input value
114
+ */
115
+ reset(): void;
116
+ /**
117
+ * Trigger the file input click
118
+ */
119
+ triggerClick(): void;
120
+ private makeUploadFile;
121
+ private verifyFileSize;
122
+ private verifyFileType;
123
+ fileSizeToString(num: number): string;
124
+ static formatFileSize(num: number, formatter?: Intl.NumberFormat): string;
125
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiFileUploadDirective, never>;
126
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiFileUploadDirective, "input[type=\"file\"][siFileUpload]", never, { "errorTextFileType": { "alias": "errorTextFileType"; "required": false; "isSignal": true; }; "errorTextFileMaxSize": { "alias": "errorTextFileMaxSize"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "directoryUpload": { "alias": "directoryUpload"; "required": false; "isSignal": true; }; }, { "validFiles": "validFiles"; "filesAdded": "filesAdded"; "fileError": "fileError"; }, never, never, true, never>;
127
+ }
128
+
23
129
  declare class SiFileDropzoneComponent {
24
130
  /**
25
131
  * Text or translation key of the input file selector (is combined with the `uploadTextRest`).
@@ -92,9 +198,14 @@ declare class SiFileDropzoneComponent {
92
198
  */
93
199
  readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
94
200
  /**
95
- * Event emitted when files are added.
201
+ * Event emitted when valid files are added.
202
+ * Invalid files are also included here, but with status 'invalid' and an errorText describing why they were ignored.
96
203
  */
97
204
  readonly filesAdded: _angular_core.OutputEmitterRef<UploadFile[]>;
205
+ /**
206
+ * Event emitted when file validation errors occur, including files that were ignored due to size or type.
207
+ */
208
+ readonly fileError: _angular_core.OutputEmitterRef<FileUploadError>;
98
209
  /**
99
210
  * Enable directory upload.
100
211
  *
@@ -104,25 +215,18 @@ declare class SiFileDropzoneComponent {
104
215
  protected readonly maxFileSizeString: _angular_core.Signal<string>;
105
216
  protected readonly icons: Record<"elementUpload", string>;
106
217
  protected dragOver: boolean;
107
- private readonly fileInput;
108
- private locale;
109
- private numberFormat;
218
+ private readonly fileUploadDirective;
110
219
  protected dropHandler(event: DragEvent): void;
111
220
  protected dragOverHandler(event: DragEvent): void;
112
221
  protected inputEnterHandler(): void;
113
- protected inputHandler(event: Event): void;
114
- protected handleFiles(files: FileList | null): void;
222
+ protected onFilesAdded(files: UploadFile[]): void;
223
+ protected onFileError(error: FileUploadError): void;
115
224
  /**
116
225
  * Reset all the files inside the native file input (and therefore the dropzone).
117
226
  */
118
227
  reset(): void;
119
- private makeUploadFile;
120
- private verifyFileSize;
121
- private verifyFileType;
122
- private fileSizeToString;
123
- private handleItems;
124
228
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiFileDropzoneComponent, never>;
125
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiFileDropzoneComponent, "si-file-dropzone", never, { "uploadTextFileSelect": { "alias": "uploadTextFileSelect"; "required": false; "isSignal": true; }; "uploadDropText": { "alias": "uploadDropText"; "required": false; "isSignal": true; }; "maxFileSizeText": { "alias": "maxFileSizeText"; "required": false; "isSignal": true; }; "acceptText": { "alias": "acceptText"; "required": false; "isSignal": true; }; "errorTextFileType": { "alias": "errorTextFileType"; "required": false; "isSignal": true; }; "errorTextFileMaxSize": { "alias": "errorTextFileMaxSize"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "directoryUpload": { "alias": "directoryUpload"; "required": false; "isSignal": true; }; }, { "filesAdded": "filesAdded"; }, never, never, true, never>;
229
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiFileDropzoneComponent, "si-file-dropzone", never, { "uploadTextFileSelect": { "alias": "uploadTextFileSelect"; "required": false; "isSignal": true; }; "uploadDropText": { "alias": "uploadDropText"; "required": false; "isSignal": true; }; "maxFileSizeText": { "alias": "maxFileSizeText"; "required": false; "isSignal": true; }; "acceptText": { "alias": "acceptText"; "required": false; "isSignal": true; }; "errorTextFileType": { "alias": "errorTextFileType"; "required": false; "isSignal": true; }; "errorTextFileMaxSize": { "alias": "errorTextFileMaxSize"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "directoryUpload": { "alias": "directoryUpload"; "required": false; "isSignal": true; }; }, { "filesAdded": "filesAdded"; "fileError": "fileError"; }, never, never, true, never>;
126
230
  }
127
231
 
128
232
  /**
@@ -418,9 +522,9 @@ declare class SiFileUploaderComponent implements OnChanges {
418
522
 
419
523
  declare class SiFileUploaderModule {
420
524
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiFileUploaderModule, never>;
421
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SiFileUploaderModule, never, [typeof SiFileDropzoneComponent, typeof SiFileUploaderComponent], [typeof SiFileDropzoneComponent, typeof SiFileUploaderComponent]>;
525
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SiFileUploaderModule, never, [typeof SiFileDropzoneComponent, typeof SiFileUploaderComponent, typeof SiFileUploadDirective], [typeof SiFileDropzoneComponent, typeof SiFileUploaderComponent, typeof SiFileUploadDirective]>;
422
526
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<SiFileUploaderModule>;
423
527
  }
424
528
 
425
- export { SiFileDropzoneComponent, SiFileUploaderComponent, SiFileUploaderModule };
426
- export type { FileUploadConfig, FileUploadResult, UploadFile };
529
+ export { SiFileDropzoneComponent, SiFileUploadDirective, SiFileUploaderComponent, SiFileUploaderModule };
530
+ export type { FileUploadConfig, FileUploadError, FileUploadResult, UploadFile };
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
3
3
  import { BackgroundColorVariant } from '@siemens/element-ng/common';
4
4
  import { TypeaheadOption } from '@siemens/element-ng/typeahead';
5
5
  import { TranslatableString } from '@siemens/element-translate-ng/translate';
@@ -150,7 +150,7 @@ interface InternalCriterionDefinition extends CriterionDefinition {
150
150
  translatedLabel: string;
151
151
  }
152
152
 
153
- declare class SiFilteredSearchComponent implements OnInit, OnChanges, OnDestroy {
153
+ declare class SiFilteredSearchComponent implements OnInit, OnChanges {
154
154
  private static readonly criterionRegex;
155
155
  /**
156
156
  * Output callback event that provides an object describing the
@@ -370,10 +370,10 @@ declare class SiFilteredSearchComponent implements OnInit, OnChanges, OnDestroy
370
370
  private typeaheadInputChange;
371
371
  /** Used to debounce the Search emissions */
372
372
  private searchEmitQueue;
373
- private destroySubscriptions;
374
- private cdRef;
375
- private translateService;
376
- private locale;
373
+ private readonly destroyRef;
374
+ private readonly cdRef;
375
+ private readonly translateService;
376
+ private readonly locale;
377
377
  /**
378
378
  * The cache is used to control when the interceptDisplayedCriteria event needs to be called.
379
379
  * Every time a criteria gain the focus we have to reset the cache to call the interceptor.
@@ -388,7 +388,6 @@ declare class SiFilteredSearchComponent implements OnInit, OnChanges, OnDestroy
388
388
  constructor();
389
389
  ngOnChanges(changes: SimpleChanges): void;
390
390
  ngOnInit(): void;
391
- ngOnDestroy(): void;
392
391
  private initCriteria;
393
392
  private initValue;
394
393
  /**
package/icon/index.d.ts CHANGED
@@ -246,6 +246,8 @@ declare const elementAlarmFilled = "data:image/svg+xml;utf8,<svg xmlns='http://w
246
246
  declare const elementAlarmTick = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M427.72 116.64 279.19 277.47l-73.9-73.9a12 12 0 0 0-17 17l82.73 82.73a12 12 0 0 0 8.48 3.51h.24a12 12 0 0 0 8.58-3.86l157-170a12 12 0 0 0-17.63-16.28Z'/></svg>";
247
247
  declare const elementUser = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 252a76 76 0 1 0-76-76 76.08 76.08 0 0 0 76 76Zm0-128a52 52 0 1 1-52 52 52.06 52.06 0 0 1 52-52ZM124 360.14a12 12 0 0 0 6.71-2.06c.61-.41 61.54-41.08 126.14-41.08 75.3 0 122.86 39.84 123.3 40.23a12 12 0 0 0 15.68-18.18c-2.19-1.88-54.39-46.05-139-46.05C185 293 120 336.35 117.28 338.19a12 12 0 0 0 6.72 21.95Z'/></svg>";
248
248
  declare const elementHelp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 64C150.13 64 64 150.13 64 256s86.13 192 192 192 192-86.13 192-192S361.87 64 256 64Zm0 360c-92.64 0-168-75.36-168-168S163.36 88 256 88s168 75.36 168 168-75.36 168-168 168Z'/><path d='M256 305a12 12 0 0 1-12-12v-29.22a12 12 0 0 1 6.51-10.67 11.63 11.63 0 0 1 1.67-.71c1.14-.4 38.54-14.05 38.54-36.4a36 36 0 0 0-70-12 12 12 0 1 1-22.64-8 60 60 0 0 1 116.6 20c0 31-31.39 48.92-46.72 55.84V293A12 12 0 0 1 256 305ZM256.11 360h-.22a16 16 0 0 1 0-32h.22a16 16 0 0 1 0 32Z'/></svg>";
249
+ declare const elementPinch = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M248.46 275.15c0-.19-.05-.37-.07-.55s-.06-.41-.1-.61a6 6 0 0 0-.15-.61c0-.18-.08-.36-.13-.53s-.14-.39-.2-.58-.13-.36-.2-.53-.16-.35-.24-.53-.17-.36-.26-.53-.19-.33-.29-.49-.2-.35-.32-.52-.25-.35-.38-.52-.2-.29-.32-.43c-.24-.29-.5-.58-.77-.85-.28-.27-.56-.52-.86-.77-.14-.12-.29-.22-.44-.33l-.5-.37-.53-.32-.48-.28c-.18-.1-.37-.18-.55-.27l-.51-.23c-.18-.08-.37-.14-.55-.21l-.56-.19-.56-.15-.58-.14-.66-.1-.5-.07a11.85 11.85 0 0 0-1.19-.06h-120a12 12 0 0 0 0 24h91L108 387.84a12 12 0 1 0 17 17l99.51-99.51v91a12 12 0 0 0 24 0v-120a10.88 10.88 0 0 0-.05-1.18ZM405.1 106.75a12 12 0 0 0-17 0l-99.51 99.51v-91a12 12 0 0 0-24 0v120a10.88 10.88 0 0 0 .06 1.14c0 .18.05.36.08.54s.05.41.09.62.1.4.15.6.08.36.14.54.13.38.2.58.12.35.19.52.17.36.25.53.16.36.26.54.19.33.29.49.2.35.31.52l.38.51.32.43c.25.3.5.58.77.86.27.27.56.53.85.77l.44.33a6 6 0 0 0 .51.37 5.74 5.74 0 0 0 .53.32l.47.29.55.26c.17.08.34.17.52.24l.54.2c.19.07.37.14.57.2l.54.14.6.14.63.1c.17 0 .35.06.53.07a11.66 11.66 0 0 0 1.18.06h120a12 12 0 0 0 0-24h-91l99.51-99.51a12 12 0 0 0 .05-16.91Z'/></svg>";
250
+ declare const elementZoom = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M423.94 98.82c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58 4.58 0 0 0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85s-.56-.53-.85-.77l-.44-.33c-.17-.12-.33-.25-.51-.37l-.53-.32-.47-.28c-.18-.1-.37-.18-.56-.27l-.51-.24-.55-.2-.55-.19c-.19-.06-.38-.1-.57-.15l-.57-.14-.67-.1-.49-.07q-.6-.06-1.2-.06H308a12 12 0 0 0 0 24h75l-100.82 100.8a12 12 0 0 0 17 17L400 129v75a12 12 0 0 0 24 0V100a10.88 10.88 0 0 0-.06-1.18ZM212.85 282.18 112 383v-75a12 12 0 0 0-24 0v104a10.88 10.88 0 0 0 .06 1.14c0 .19 0 .37.08.55s0 .41.09.61.1.41.15.61a4.58 4.58 0 0 0 .14.53c.06.2.13.39.2.58s.12.36.19.53.17.35.25.53.16.36.26.54.19.32.29.48.2.35.31.52.25.35.38.52l.32.43c.24.29.5.58.77.85s.56.53.85.77l.44.33c.17.12.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36 5.36 0 0 0 .54.14c.2.05.39.11.6.15s.42.06.63.09l.53.08a11.51 11.51 0 0 0 1.23.15h104a12 12 0 0 0 0-24h-75l100.82-100.85a12 12 0 1 0-17-17Z'/></svg>";
249
251
 
250
- export { STATUS_ICON_CONFIG, SiIconComponent, SiIconLegacyComponent, SiIconModule, SiStatusIconComponent, addIcons, element2dEditor, elementAlarmFilled, elementAlarmTick, elementBreadcrumbRoot, elementCalendar, elementCancel, elementChecked, elementCheckedFilled, elementCircleFilled, elementDelete, elementDocument, elementDoubleLeft, elementDoubleRight, elementDown2, elementExport, elementFavorites, elementFavoritesFilled, elementHelp, elementHide, elementLeft2, elementLeft3, elementLeft4, elementLock, elementMenu, elementMinus, elementNotChecked, elementOctagonFilled, elementOk, elementOptionsVertical, elementOutOfService, elementPlus, elementRadioChecked, elementRecordFilled, elementRedo, elementRight2, elementRight3, elementRight4, elementSearch, elementShow, elementSortDown, elementSortUp, elementSoundMute, elementSoundOn, elementSquare45Filled, elementSquareFilled, elementStateExclamationMark, elementStateInfo, elementStatePause, elementStateProgress, elementStateQuestionMark, elementStateTick, elementThumbnails, elementTriangleFilled, elementUpload, elementUser, elementWarningFilled, provideIconConfig };
252
+ export { STATUS_ICON_CONFIG, SiIconComponent, SiIconLegacyComponent, SiIconModule, SiStatusIconComponent, addIcons, element2dEditor, elementAlarmFilled, elementAlarmTick, elementBreadcrumbRoot, elementCalendar, elementCancel, elementChecked, elementCheckedFilled, elementCircleFilled, elementDelete, elementDocument, elementDoubleLeft, elementDoubleRight, elementDown2, elementExport, elementFavorites, elementFavoritesFilled, elementHelp, elementHide, elementLeft2, elementLeft3, elementLeft4, elementLock, elementMenu, elementMinus, elementNotChecked, elementOctagonFilled, elementOk, elementOptionsVertical, elementOutOfService, elementPinch, elementPlus, elementRadioChecked, elementRecordFilled, elementRedo, elementRight2, elementRight3, elementRight4, elementSearch, elementShow, elementSortDown, elementSortUp, elementSoundMute, elementSoundOn, elementSquare45Filled, elementSquareFilled, elementStateExclamationMark, elementStateInfo, elementStatePause, elementStateProgress, elementStateQuestionMark, elementStateTick, elementThumbnails, elementTriangleFilled, elementUpload, elementUser, elementWarningFilled, elementZoom, provideIconConfig };
251
253
  export type { IconConfig };
@@ -45,7 +45,15 @@ declare abstract class SiIpInputDirective {
45
45
  setDisabledState(isDisabled: boolean): void;
46
46
  writeValue(value?: string | null): void;
47
47
  protected onInput(e: Event): void;
48
+ /** @internal */
48
49
  protected blur(): void;
50
+ /**
51
+ * Allow to adjust the input value when leaving the input field.
52
+ */
53
+ protected leaveInput(): void;
54
+ /**
55
+ * Enforce a format on user input.
56
+ */
49
57
  protected abstract maskInput(e: AddrInputEvent): void;
50
58
  static ɵfac: i0.ɵɵFactoryDeclaration<SiIpInputDirective, never>;
51
59
  static ɵdir: i0.ɵɵDirectiveDeclaration<SiIpInputDirective, "input[siIpInput]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "cidr": { "alias": "cidr"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -72,6 +80,11 @@ declare abstract class SiIpInputDirective {
72
80
  */
73
81
  declare class SiIp4InputDirective extends SiIpInputDirective implements ControlValueAccessor, Validator {
74
82
  validate(control: AbstractControl): ValidationErrors | null;
83
+ /**
84
+ * Trim leading zeros from each part of the IPv4 address
85
+ */
86
+ protected leaveInput(): void;
87
+ /** @internal */
75
88
  protected maskInput(e: AddrInputEvent): void;
76
89
  static ɵfac: i0.ɵɵFactoryDeclaration<SiIp4InputDirective, never>;
77
90
  static ɵdir: i0.ɵɵDirectiveDeclaration<SiIp4InputDirective, "input[siIpV4]", ["siIpV4"], {}, {}, never, never, true, never>;
@@ -0,0 +1,36 @@
1
+ import * as i0 from '@angular/core';
2
+ import { DomSanitizer } from '@angular/platform-browser';
3
+
4
+ /**
5
+ * Component to display markdown text, uses the {@link getMarkdownRenderer} function internally, relies on `markdown-content` theme class.
6
+ * @experimental
7
+ */
8
+ declare class SiMarkdownRendererComponent {
9
+ private sanitizer;
10
+ private hostElement;
11
+ private markdownRenderer;
12
+ /**
13
+ * The markdown text to transform and display
14
+ * @defaultValue ''
15
+ */
16
+ readonly text: i0.InputSignal<string>;
17
+ constructor();
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiMarkdownRendererComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiMarkdownRendererComponent, "si-markdown-renderer", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
+ }
21
+
22
+ /**
23
+ * Returns a markdown renderer function which_
24
+ * - Transforms markdown text into formatted HTML.
25
+ * - Returns a DOM node containing the formatted content.
26
+ *
27
+ * **Warning:** The returned Node is inserted without additional sanitization.
28
+ * Input content is sanitized before processing.
29
+ *
30
+ * @experimental
31
+ * @param sanitizer - Angular DomSanitizer instance
32
+ * @returns A function taking the markdown text to transform and returning a DOM div element containing the formatted HTML
33
+ */
34
+ declare const getMarkdownRenderer: (sanitizer: DomSanitizer) => ((text: string) => Node);
35
+
36
+ export { SiMarkdownRendererComponent, getMarkdownRenderer };
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-element-ng-markdown-renderer.mjs"
3
+ }
@@ -1,6 +1,6 @@
1
1
  import * as _siemens_element_translate_ng_translate_types from '@siemens/element-translate-ng/translate-types';
2
2
  import * as _angular_core from '@angular/core';
3
- import { OnChanges, OnInit, OnDestroy, SimpleChanges } from '@angular/core';
3
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
4
4
  import { NavigationExtras, IsActiveMatchOptions, ActivatedRoute } from '@angular/router';
5
5
  import { MenuItem } from '@siemens/element-ng/common';
6
6
  import { TranslatableString } from '@siemens/element-translate-ng/translate';
@@ -91,7 +91,7 @@ declare class SiNavbarVerticalItemGuardDirective {
91
91
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiNavbarVerticalItemGuardDirective, never>;
92
92
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiNavbarVerticalItemGuardDirective, "[siNavbarVerticalItemGuard]", never, {}, {}, never, never, true, never>;
93
93
  }
94
- declare class SiNavbarVerticalComponent implements OnChanges, OnInit, OnDestroy {
94
+ declare class SiNavbarVerticalComponent implements OnChanges, OnInit {
95
95
  /**
96
96
  * Whether the navbar-vertical is collapsed.
97
97
  *
@@ -197,12 +197,10 @@ declare class SiNavbarVerticalComponent implements OnChanges, OnInit, OnDestroy
197
197
  private readonly itemsToComponents;
198
198
  protected readonly smallScreen: _angular_core.WritableSignal<boolean>;
199
199
  protected readonly uiStateExpandedItems: _angular_core.WritableSignal<Record<string, boolean>>;
200
- private destroyer;
201
200
  private preferCollapse;
202
201
  constructor();
203
202
  ngOnChanges(changes: SimpleChanges): void;
204
203
  ngOnInit(): void;
205
- ngOnDestroy(): void;
206
204
  protected toggleCollapse(): void;
207
205
  /** Expands the vertical navbar. */
208
206
  expand(): void;
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.2.0",
4
+ "version": "48.4.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -30,8 +30,8 @@
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.2.0",
34
- "@siemens/element-theme": "48.2.0",
33
+ "@siemens/element-translate-ng": "48.4.0",
34
+ "@siemens/element-theme": "48.4.0",
35
35
  "@siemens/ngx-datatable": "22 - 24",
36
36
  "flag-icons": "^7.3.2",
37
37
  "google-libphonenumber": "^3.2.40",
@@ -67,10 +67,6 @@
67
67
  "types": "./index.d.ts",
68
68
  "default": "./fesm2022/siemens-element-ng.mjs"
69
69
  },
70
- "./accordion": {
71
- "types": "./accordion/index.d.ts",
72
- "default": "./fesm2022/siemens-element-ng-accordion.mjs"
73
- },
74
70
  "./about": {
75
71
  "types": "./about/index.d.ts",
76
72
  "default": "./fesm2022/siemens-element-ng-about.mjs"
@@ -87,6 +83,10 @@
87
83
  "types": "./auto-collapsable-list/index.d.ts",
88
84
  "default": "./fesm2022/siemens-element-ng-auto-collapsable-list.mjs"
89
85
  },
86
+ "./accordion": {
87
+ "types": "./accordion/index.d.ts",
88
+ "default": "./fesm2022/siemens-element-ng-accordion.mjs"
89
+ },
90
90
  "./autocomplete": {
91
91
  "types": "./autocomplete/index.d.ts",
92
92
  "default": "./fesm2022/siemens-element-ng-autocomplete.mjs"
@@ -111,6 +111,10 @@
111
111
  "types": "./card/index.d.ts",
112
112
  "default": "./fesm2022/siemens-element-ng-card.mjs"
113
113
  },
114
+ "./chat-messages": {
115
+ "types": "./chat-messages/index.d.ts",
116
+ "default": "./fesm2022/siemens-element-ng-chat-messages.mjs"
117
+ },
114
118
  "./circle-status": {
115
119
  "types": "./circle-status/index.d.ts",
116
120
  "default": "./fesm2022/siemens-element-ng-circle-status.mjs"
@@ -243,6 +247,10 @@
243
247
  "types": "./main-detail-container/index.d.ts",
244
248
  "default": "./fesm2022/siemens-element-ng-main-detail-container.mjs"
245
249
  },
250
+ "./markdown-renderer": {
251
+ "types": "./markdown-renderer/index.d.ts",
252
+ "default": "./fesm2022/siemens-element-ng-markdown-renderer.mjs"
253
+ },
246
254
  "./menu": {
247
255
  "types": "./menu/index.d.ts",
248
256
  "default": "./fesm2022/siemens-element-ng-menu.mjs"
@@ -36,6 +36,19 @@ declare class ResizeObserverService {
36
36
  private processQueue;
37
37
  /**
38
38
  * check size on all observed elements. Only use in testing!
39
+ * @deprecated Will be removed in major version 50! For testing purposes use the resize observer mock:
40
+ *
41
+ * ```ts
42
+ * beforeEach(() => mockResizeObserver());
43
+ * afterEach(() => restoreResizeObserver());
44
+ * it('should trigger resize', () => {
45
+ * // For all observed elements
46
+ * MockResizeObserver.triggerResize({});
47
+ * // For specific HTML element
48
+ * MockResizeObserver.triggerResize({ target: myElement });
49
+ * });
50
+ * ```
51
+
39
52
  */
40
53
  _checkAll(): void;
41
54
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResizeObserverService, never>;
@@ -12,9 +12,9 @@ import { ACTION_DIALOG_TYPES_REPLACEMENTS, ACTION_MODAL_SYMBOLS, DIALOG_METHOD_C
12
12
  * @returns A schematic rule for migrating action modal methods.
13
13
  */
14
14
  export const actionModalMigrationRule = (options) => {
15
- return (tree, context) => {
15
+ return async (tree, context) => {
16
16
  context.logger.info('🔄 Migrating action modal methods to v48...');
17
- const tsSourceFiles = discoverSourceFiles(tree, context, options.path);
17
+ const tsSourceFiles = await discoverSourceFiles(tree, context, options.path);
18
18
  for (const filePath of tsSourceFiles) {
19
19
  const content = tree.read(filePath);
20
20
  if (!content) {
@@ -29,7 +29,11 @@ export const actionModalMigrationRule = (options) => {
29
29
  continue;
30
30
  }
31
31
  const pendingTransformations = [];
32
+ const usedIdentifier = new Set();
32
33
  const visitNodeAndCollectTransformations = (node) => {
34
+ if (ts.isImportDeclaration(node)) {
35
+ return;
36
+ }
33
37
  // Collect method call transformations
34
38
  if (ts.isCallExpression(node)) {
35
39
  const methodTransformation = createActionDialogMethodCallTransformation(node);
@@ -42,11 +46,17 @@ export const actionModalMigrationRule = (options) => {
42
46
  const typeTransformation = createActionDialogTypeTransformation(node);
43
47
  if (typeTransformation) {
44
48
  pendingTransformations.push(typeTransformation);
49
+ // We remove the usage here. In order to avoid counting it as used identifier, we skip further processing.
50
+ return;
45
51
  }
46
52
  }
53
+ if (ts.isIdentifier(node)) {
54
+ usedIdentifier.add(node.text);
55
+ }
47
56
  node.forEachChild(visitNodeAndCollectTransformations);
48
57
  };
49
58
  sourceFile.forEachChild(visitNodeAndCollectTransformations);
59
+ pendingTransformations.push(...removeUnusedImports(sourceFile, usedIdentifier));
50
60
  if (pendingTransformations.length > 0) {
51
61
  applyCodeTransformations(tree, filePath, pendingTransformations);
52
62
  }
@@ -69,8 +79,7 @@ const createActionDialogMethodCallTransformation = (node) => {
69
79
  const newCode = printer.printNode(ts.EmitHint.Expression, newNode, node.getSourceFile());
70
80
  return {
71
81
  node,
72
- newCode,
73
- type: 'method-call'
82
+ newCode
74
83
  };
75
84
  };
76
85
  const createActionDialogTypeTransformation = (node) => {
@@ -81,8 +90,7 @@ const createActionDialogTypeTransformation = (node) => {
81
90
  }
82
91
  return {
83
92
  node,
84
- newCode: `'${matchingReplacement.new}'`,
85
- type: 'type-reference'
93
+ newCode: `'${matchingReplacement.new}'`
86
94
  };
87
95
  };
88
96
  /**
@@ -119,3 +127,36 @@ const applyCodeTransformations = (tree, filePath, codeTransformations) => {
119
127
  });
120
128
  tree.commitUpdate(recorder);
121
129
  };
130
+ const removeUnusedImports = (sourceFile, usedIdentifier) => {
131
+ const printer = ts.createPrinter();
132
+ const importFinder = (node) => {
133
+ if (ts.isImportDeclaration(node) &&
134
+ ts.isStringLiteral(node.moduleSpecifier) &&
135
+ /@(siemens|simpl)\/element-ng(\/action-modal)?/.test(node.moduleSpecifier.text) &&
136
+ node.importClause?.namedBindings &&
137
+ ts.isNamedImports(node.importClause.namedBindings)) {
138
+ const usedBindings = node.importClause.namedBindings.elements.filter(element =>
139
+ // This script anyway is not capable of handling aliasing imports, so we can ignore them here.
140
+ usedIdentifier.has(element.name.text) || !ACTION_MODAL_SYMBOLS.includes(element.name.text));
141
+ if (usedBindings.length === node.importClause.namedBindings.elements.length) {
142
+ // All bindings are used, no changes needed
143
+ return undefined;
144
+ }
145
+ if (usedBindings.length === 0) {
146
+ // No bindings are used, remove the entire import statement
147
+ return {
148
+ node,
149
+ newCode: ''
150
+ };
151
+ }
152
+ // Recreate import statement with only used bindings
153
+ const newImport = ts.factory.createImportDeclaration(node.modifiers, ts.factory.createImportClause(node.importClause.isTypeOnly, node.importClause.name, ts.factory.createNamedImports(usedBindings)), node.moduleSpecifier, node.attributes);
154
+ return {
155
+ node,
156
+ newCode: printer.printNode(ts.EmitHint.Unspecified, newImport, sourceFile)
157
+ };
158
+ }
159
+ return undefined;
160
+ };
161
+ return sourceFile.statements.map(importFinder).filter(transform => transform !== undefined);
162
+ };
@@ -0,0 +1,6 @@
1
+ export const ATTRIBUTE_SELECTORS_MIGRATION = [
2
+ // current to legacy
3
+ { replace: 'siPopover', replaceWith: 'siPopoverLegacy' },
4
+ // next to current
5
+ { replace: 'siPopoverNext', replaceWith: 'siPopover' }
6
+ ];
@@ -0,0 +1,78 @@
1
+ export const COMPONENT_NAMES_MIGRATION = [
2
+ // Icon current to legacy
3
+ {
4
+ module: /@(siemens|simpl)\/element-ng(\/icon)?/,
5
+ symbolRenamings: [
6
+ {
7
+ replace: 'SiIconComponent',
8
+ replaceWith: 'SiIconLegacyComponent'
9
+ }
10
+ ]
11
+ },
12
+ // Icon next to current
13
+ {
14
+ module: /@(siemens|simpl)\/element-ng(\/icon-next)?/,
15
+ symbolRenamings: [
16
+ {
17
+ replace: 'SiIconNextComponent',
18
+ replaceWith: 'SiIconComponent'
19
+ }
20
+ ]
21
+ },
22
+ // Tabs current to legacy
23
+ {
24
+ module: /@(siemens|simpl)\/element-ng(\/tabs)?/,
25
+ symbolRenamings: [
26
+ {
27
+ replace: 'SiTabComponent',
28
+ replaceWith: 'SiTabLegacyComponent'
29
+ },
30
+ {
31
+ replace: 'SiTabsetComponent',
32
+ replaceWith: 'SiTabsetLegacyComponent'
33
+ },
34
+ {
35
+ replace: 'SiTabsModule',
36
+ replaceWith: 'SiTabsLegacyModule'
37
+ }
38
+ ],
39
+ toModule: '@siemens/element-ng/tabs-legacy'
40
+ },
41
+ // Tabs next to current
42
+ {
43
+ module: /@(siemens|simpl)\/element-ng(\/tabs-next)?/,
44
+ symbolRenamings: [
45
+ {
46
+ replace: 'SiTabNextComponent',
47
+ replaceWith: 'SiTabComponent'
48
+ },
49
+ {
50
+ replace: 'SiTabsetNextComponent',
51
+ replaceWith: 'SiTabsetComponent'
52
+ },
53
+ {
54
+ replace: 'SiTabsNextModule',
55
+ replaceWith: 'SiTabsModule'
56
+ }
57
+ ],
58
+ toModule: '@siemens/element-ng/tabs'
59
+ },
60
+ // Popover current to legacy
61
+ {
62
+ module: /@(siemens|simpl)\/element-ng(\/popover)?/,
63
+ symbolRenamings: [
64
+ { replace: 'SiPopoverDirective', replaceWith: 'SiPopoverLegacyDirective' },
65
+ { replace: 'SiPopoverModule', replaceWith: 'SiPopoverLegacyModule' }
66
+ ],
67
+ toModule: '@siemens/element-ng/popover-legacy'
68
+ },
69
+ // Popover next to current
70
+ {
71
+ module: /@(siemens|simpl)\/element-ng(\/popover-next)?/,
72
+ symbolRenamings: [
73
+ { replace: 'SiPopoverNextDirective', replaceWith: 'SiPopoverDirective' },
74
+ { replace: 'SiPopoverNextModule', replaceWith: 'SiPopoverModule' }
75
+ ],
76
+ toModule: '@siemens/element-ng/popover'
77
+ }
78
+ ];
@@ -0,0 +1,10 @@
1
+ export const ELEMENT_SELECTORS_MIGRATION = [
2
+ // current to legacy
3
+ { replace: 'si-icon', replaceWith: 'si-icon-legacy' },
4
+ { replace: 'si-tabset', replaceWith: 'si-tabset-legacy' },
5
+ { replace: 'si-tab', replaceWith: 'si-tab-legacy' },
6
+ // next to current
7
+ { replace: 'si-icon-next', replaceWith: 'si-icon' },
8
+ { replace: 'si-tabset-next', replaceWith: 'si-tabset' },
9
+ { replace: 'si-tab-next', replaceWith: 'si-tab' }
10
+ ];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { ATTRIBUTE_SELECTORS_MIGRATION } from './attribute-selectors.js';
6
+ import { COMPONENT_NAMES_MIGRATION } from './component-names.js';
7
+ import { ELEMENT_SELECTORS_MIGRATION } from './element-selectors.js';
8
+ import { OUTPUT_NAMES_MIGRATION } from './output-names.js';
9
+ import { SYMBOL_REMOVALS_MIGRATION } from './symbol-removals.js';
10
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
11
+ export const getElementMigrationData = () => ({
12
+ attributeSelectorChanges: ATTRIBUTE_SELECTORS_MIGRATION,
13
+ componentNameChanges: COMPONENT_NAMES_MIGRATION,
14
+ elementSelectorChanges: ELEMENT_SELECTORS_MIGRATION,
15
+ symbolRemovalChanges: SYMBOL_REMOVALS_MIGRATION,
16
+ outputNameChanges: OUTPUT_NAMES_MIGRATION
17
+ });
@@ -0,0 +1,7 @@
1
+ export const OUTPUT_NAMES_MIGRATION = [
2
+ {
3
+ module: /@(siemens|simpl)\/element-ng(\/accordion)?/,
4
+ elementSelector: 'si-collapsible-panel',
5
+ apiMappings: [{ replace: '(toggle)', replaceWith: '(panelToggle)' }]
6
+ }
7
+ ];