@siemens/element-ng 49.7.0 → 49.8.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 (96) hide show
  1. package/fesm2022/siemens-element-ng-accordion.mjs +1 -1
  2. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  3. package/fesm2022/siemens-element-ng-action-modal.mjs +8 -8
  4. package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
  5. package/fesm2022/siemens-element-ng-ag-grid.mjs +3 -3
  6. package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
  7. package/fesm2022/siemens-element-ng-application-header.mjs +2 -2
  8. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  9. package/fesm2022/siemens-element-ng-card.mjs +43 -8
  10. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  11. package/fesm2022/siemens-element-ng-chat-messages.mjs +8 -8
  12. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
  13. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +2 -2
  14. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
  15. package/fesm2022/siemens-element-ng-common.mjs +4 -4
  16. package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
  18. package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-dashboard.mjs +7 -8
  20. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-date-range-filter.mjs +1 -1
  22. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-datepicker.mjs +49 -39
  24. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  25. package/fesm2022/siemens-element-ng-file-uploader.mjs +9 -8
  26. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-filter-bar.mjs +4 -4
  28. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
  29. package/fesm2022/siemens-element-ng-filtered-search.mjs +12 -12
  30. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-formly.mjs +1 -1
  32. package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +8 -16
  34. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
  35. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +2 -2
  36. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  37. package/fesm2022/siemens-element-ng-navbar.mjs +4 -4
  38. package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
  39. package/fesm2022/siemens-element-ng-notification-item.mjs +2 -2
  40. package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
  41. package/fesm2022/siemens-element-ng-number-input.mjs +2 -2
  42. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
  43. package/fesm2022/siemens-element-ng-password-toggle.mjs +2 -2
  44. package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-photo-upload.mjs +2 -2
  46. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
  47. package/fesm2022/siemens-element-ng-pills-input.mjs +4 -4
  48. package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
  49. package/fesm2022/siemens-element-ng-popover.mjs +10 -3
  50. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  51. package/fesm2022/siemens-element-ng-search-bar.mjs +10 -4
  52. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
  53. package/fesm2022/siemens-element-ng-select.mjs +4 -4
  54. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  55. package/fesm2022/siemens-element-ng-side-panel.mjs +2 -2
  56. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  57. package/fesm2022/siemens-element-ng-status-bar.mjs +47 -22
  58. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  59. package/fesm2022/siemens-element-ng-summary-chip.mjs +2 -2
  60. package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
  61. package/fesm2022/siemens-element-ng-summary-widget.mjs +2 -2
  62. package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
  63. package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -2
  64. package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
  65. package/fesm2022/siemens-element-ng-tabs.mjs +4 -4
  66. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
  67. package/fesm2022/siemens-element-ng-threshold.mjs +2 -2
  68. package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
  69. package/fesm2022/siemens-element-ng-toast-notification.mjs +2 -2
  70. package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
  71. package/fesm2022/siemens-element-ng-tooltip.mjs +10 -8
  72. package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
  73. package/fesm2022/siemens-element-ng-tour.mjs +2 -2
  74. package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
  75. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  76. package/package.json +3 -3
  77. package/schematics/migrations/data/element-migration-data.js +20 -0
  78. package/schematics/migrations/data/index.js +1 -16
  79. package/schematics/migrations/ngx-translate/index.js +1 -137
  80. package/schematics/migrations/ngx-translate/missing-translate-migration.js +141 -0
  81. package/schematics/ng-add/index.js +1 -12
  82. package/schematics/ng-add/ng-add-rule.js +16 -0
  83. package/schematics/ng-update/index.js +1 -17
  84. package/schematics/ng-update/migrate-to-v49.js +21 -0
  85. package/template-i18n.json +2 -1
  86. package/types/siemens-element-ng-card.d.ts +26 -1
  87. package/types/siemens-element-ng-common.d.ts +3 -3
  88. package/types/siemens-element-ng-file-uploader.d.ts +4 -3
  89. package/types/siemens-element-ng-filtered-search.d.ts +1 -1
  90. package/types/siemens-element-ng-navbar-vertical-next.d.ts +5 -13
  91. package/types/siemens-element-ng-navbar.d.ts +2 -2
  92. package/types/siemens-element-ng-popover.d.ts +9 -2
  93. package/types/siemens-element-ng-search-bar.d.ts +7 -1
  94. package/types/siemens-element-ng-status-bar.d.ts +11 -5
  95. package/types/siemens-element-ng-tooltip.d.ts +9 -3
  96. package/types/siemens-element-ng-translate.d.ts +1 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2026
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { ATTRIBUTE_SELECTORS_MIGRATION } from './attribute-selectors.js';
6
+ import { CLASS_MEMBER_REPLACEMENTS_MIGRATION } from './class-member-replacement.js';
7
+ import { COMPONENT_PROPERTY_NAMES_MIGRATION } from './component-property-names.js';
8
+ import { ELEMENT_CLASS_CHANGES_MIGRATION } from './element-class-changes.js';
9
+ import { ELEMENT_SELECTORS_MIGRATION } from './element-selectors.js';
10
+ import { SYMBOL_REMOVALS_MIGRATION } from './symbol-removals.js';
11
+ import { SYMBOL_RENAMING_MIGRATION } from './symbol-renaming.js';
12
+ export const getElementMigrationData = () => ({
13
+ attributeSelectorChanges: ATTRIBUTE_SELECTORS_MIGRATION,
14
+ classMemberReplacementChanges: CLASS_MEMBER_REPLACEMENTS_MIGRATION,
15
+ componentPropertyNameChanges: COMPONENT_PROPERTY_NAMES_MIGRATION,
16
+ elementClassChanges: ELEMENT_CLASS_CHANGES_MIGRATION,
17
+ elementSelectorChanges: ELEMENT_SELECTORS_MIGRATION,
18
+ symbolRemovalChanges: SYMBOL_REMOVALS_MIGRATION,
19
+ symbolRenamingChanges: SYMBOL_RENAMING_MIGRATION
20
+ });
@@ -2,19 +2,4 @@
2
2
  * Copyright (c) Siemens 2016 - 2026
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { ATTRIBUTE_SELECTORS_MIGRATION } from './attribute-selectors.js';
6
- import { CLASS_MEMBER_REPLACEMENTS_MIGRATION } from './class-member-replacement.js';
7
- import { COMPONENT_PROPERTY_NAMES_MIGRATION } from './component-property-names.js';
8
- import { ELEMENT_CLASS_CHANGES_MIGRATION } from './element-class-changes.js';
9
- import { ELEMENT_SELECTORS_MIGRATION } from './element-selectors.js';
10
- import { SYMBOL_REMOVALS_MIGRATION } from './symbol-removals.js';
11
- import { SYMBOL_RENAMING_MIGRATION } from './symbol-renaming.js';
12
- export const getElementMigrationData = () => ({
13
- attributeSelectorChanges: ATTRIBUTE_SELECTORS_MIGRATION,
14
- classMemberReplacementChanges: CLASS_MEMBER_REPLACEMENTS_MIGRATION,
15
- componentPropertyNameChanges: COMPONENT_PROPERTY_NAMES_MIGRATION,
16
- elementClassChanges: ELEMENT_CLASS_CHANGES_MIGRATION,
17
- elementSelectorChanges: ELEMENT_SELECTORS_MIGRATION,
18
- symbolRemovalChanges: SYMBOL_REMOVALS_MIGRATION,
19
- symbolRenamingChanges: SYMBOL_RENAMING_MIGRATION
20
- });
5
+ export { getElementMigrationData } from './element-migration-data.js';
@@ -2,140 +2,4 @@
2
2
  * Copyright (c) Siemens 2016 - 2026
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import * as ts from 'typescript';
6
- import { EmitHint } from 'typescript';
7
- import { applyImport, discoverSourceFiles, getImportSpecifiers } from '../../utils/index.js';
8
- export const missingTranslateMigrationRule = (options) => {
9
- return async (tree, context) => {
10
- context.logger.info('🔄 Migrating missing translate provider...');
11
- for await (const { path: filePath, sourceFile } of discoverSourceFiles(tree, context, options.path)) {
12
- let content = tree.readText(filePath);
13
- if (!content) {
14
- continue;
15
- }
16
- const pendingTransformations = [];
17
- [
18
- { className: 'TranslateModule', functionName: 'forRoot' },
19
- { functionName: 'provideTranslateService' }
20
- ].forEach(({ className, functionName }) => visitStaticFunctionCalls({
21
- sourceFile,
22
- moduleSpecifier: /@ngx-translate\/core/,
23
- className,
24
- functionName,
25
- visitor: node => {
26
- const methodTransformation = createTranslateMethodCallTransformation(context, node);
27
- if (methodTransformation) {
28
- pendingTransformations.push(methodTransformation);
29
- }
30
- }
31
- }));
32
- if (pendingTransformations.length > 0) {
33
- // Ensure import for provideMissingTranslationHandlerForElement exists
34
- const importTransformation = applyImport(sourceFile, 'provideMissingTranslationHandlerForElement', '@siemens/element-translate-ng/ngx-translate');
35
- if (importTransformation) {
36
- pendingTransformations.push(importTransformation);
37
- }
38
- // Sort transformations by start position descending to preserve offsets
39
- // This become important when multiple transformations are applied to the same file
40
- pendingTransformations.sort((a, b) => b.start - a.start);
41
- for (const transformation of pendingTransformations) {
42
- content =
43
- content.slice(0, transformation.start) +
44
- transformation.replacement +
45
- content.slice(transformation.end);
46
- }
47
- tree.overwrite(filePath, content);
48
- }
49
- }
50
- };
51
- };
52
- /** Update the TranslateModule.forRoot() call to include `missingTranslationHandler: provideMissingTranslationHandlerForElement()` */
53
- const createTranslateMethodCallTransformation = (context, node) => {
54
- // Check if there are arguments
55
- const firstArg = node.arguments.at(0);
56
- if (firstArg && !ts.isObjectLiteralExpression(firstArg)) {
57
- return null;
58
- }
59
- // Find existing missingTranslationHandler property if it exists
60
- const existingHandlerProp = firstArg?.properties.find(prop => ts.isPropertyAssignment(prop) &&
61
- ts.isIdentifier(prop.name) &&
62
- prop.name.text === 'missingTranslationHandler');
63
- // Check if provideMissingTranslationHandlerForElement is already used
64
- if (existingHandlerProp && ts.isCallExpression(existingHandlerProp.initializer)) {
65
- const expression = existingHandlerProp.initializer.expression;
66
- if (ts.isIdentifier(expression) &&
67
- expression.text === 'provideMissingTranslationHandlerForElement') {
68
- // Already migrated, skip
69
- return null;
70
- }
71
- }
72
- // Filter out the existing missingTranslationHandler property if present
73
- const otherProperties = firstArg?.properties.filter(prop => !ts.isPropertyAssignment(prop) ||
74
- !ts.isIdentifier(prop.name) ||
75
- prop.name.text !== 'missingTranslationHandler') ?? [];
76
- // Create the new missingTranslationHandler property
77
- const missingTranslationHandlerProperty = ts.factory.createPropertyAssignment(ts.factory.createIdentifier('missingTranslationHandler'), ts.factory.createCallExpression(ts.factory.createIdentifier('provideMissingTranslationHandlerForElement'), undefined, existingHandlerProp ? [existingHandlerProp.initializer] : undefined));
78
- const updatedCall = ts.factory.createCallExpression(node.expression, undefined, ts.factory.createNodeArray([
79
- ts.factory.createObjectLiteralExpression([
80
- ...otherProperties,
81
- missingTranslationHandlerProperty
82
- ])
83
- ], node.arguments.hasTrailingComma));
84
- return {
85
- start: node.getStart(),
86
- end: node.getEnd(),
87
- replacement: ts
88
- .createPrinter()
89
- .printNode(EmitHint.Expression, updatedCall, node.getSourceFile())
90
- };
91
- };
92
- /**
93
- * Visits all function static call nodes that match the given module, class, and function names.
94
- * This function handles nested calls, so it will find `ClassName.method()`.
95
- * If className is not provided, it will search for standalone function calls (e.g., `functionName()`).
96
- */
97
- export const visitStaticFunctionCalls = ({ sourceFile, moduleSpecifier, className, functionName, visitor }) => {
98
- // Get all import specifiers from the module
99
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
100
- const importSpecifierName = className || functionName;
101
- const allImportSpecifiers = getImportSpecifiers(sourceFile, moduleSpecifier, importSpecifierName);
102
- if (allImportSpecifiers.length === 0) {
103
- return;
104
- }
105
- // Get the local names (including aliases) for the imported class or function
106
- const localNames = allImportSpecifiers.map(spec => spec.name.text);
107
- // Recursive visitor function that traverses all nodes including nested function call arguments
108
- const visit = (node) => {
109
- if (ts.isCallExpression(node)) {
110
- const expression = node.expression;
111
- if (className) {
112
- // Handle PropertyAccessExpression (e.g. Class.method())
113
- if (ts.isPropertyAccessExpression(expression)) {
114
- const propertyName = expression.name.text;
115
- // Check if the method name matches
116
- if (propertyName === functionName) {
117
- const objectExpression = expression.expression;
118
- // Case 1: Static call - ClassName.method()
119
- if (ts.isIdentifier(objectExpression)) {
120
- if (localNames.includes(objectExpression.text)) {
121
- visitor(node);
122
- }
123
- }
124
- }
125
- }
126
- }
127
- else {
128
- // Handle standalone function calls (e.g., functionName())
129
- if (ts.isIdentifier(expression)) {
130
- if (localNames.includes(expression.text)) {
131
- visitor(node);
132
- }
133
- }
134
- }
135
- }
136
- // Recursively visit all children
137
- ts.forEachChild(node, visit);
138
- };
139
- // Start visiting from the source file
140
- ts.forEachChild(sourceFile, visit);
141
- };
5
+ export { missingTranslateMigrationRule, visitStaticFunctionCalls } from './missing-translate-migration.js';
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2026
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import * as ts from 'typescript';
6
+ import { EmitHint } from 'typescript';
7
+ import { applyImport, discoverSourceFiles, getImportSpecifiers } from '../../utils/index.js';
8
+ export const missingTranslateMigrationRule = (options) => {
9
+ return async (tree, context) => {
10
+ context.logger.info('🔄 Migrating missing translate provider...');
11
+ for await (const { path: filePath, sourceFile } of discoverSourceFiles(tree, context, options.path)) {
12
+ let content = tree.readText(filePath);
13
+ if (!content) {
14
+ continue;
15
+ }
16
+ const pendingTransformations = [];
17
+ [
18
+ { className: 'TranslateModule', functionName: 'forRoot' },
19
+ { functionName: 'provideTranslateService' }
20
+ ].forEach(({ className, functionName }) => visitStaticFunctionCalls({
21
+ sourceFile,
22
+ moduleSpecifier: /@ngx-translate\/core/,
23
+ className,
24
+ functionName,
25
+ visitor: node => {
26
+ const methodTransformation = createTranslateMethodCallTransformation(context, node);
27
+ if (methodTransformation) {
28
+ pendingTransformations.push(methodTransformation);
29
+ }
30
+ }
31
+ }));
32
+ if (pendingTransformations.length > 0) {
33
+ // Ensure import for provideMissingTranslationHandlerForElement exists
34
+ const importTransformation = applyImport(sourceFile, 'provideMissingTranslationHandlerForElement', '@siemens/element-translate-ng/ngx-translate');
35
+ if (importTransformation) {
36
+ pendingTransformations.push(importTransformation);
37
+ }
38
+ // Sort transformations by start position descending to preserve offsets
39
+ // This become important when multiple transformations are applied to the same file
40
+ pendingTransformations.sort((a, b) => b.start - a.start);
41
+ for (const transformation of pendingTransformations) {
42
+ content =
43
+ content.slice(0, transformation.start) +
44
+ transformation.replacement +
45
+ content.slice(transformation.end);
46
+ }
47
+ tree.overwrite(filePath, content);
48
+ }
49
+ }
50
+ };
51
+ };
52
+ /** Update the TranslateModule.forRoot() call to include `missingTranslationHandler: provideMissingTranslationHandlerForElement()` */
53
+ const createTranslateMethodCallTransformation = (context, node) => {
54
+ // Check if there are arguments
55
+ const firstArg = node.arguments.at(0);
56
+ if (firstArg && !ts.isObjectLiteralExpression(firstArg)) {
57
+ return null;
58
+ }
59
+ // Find existing missingTranslationHandler property if it exists
60
+ const existingHandlerProp = firstArg?.properties.find(prop => ts.isPropertyAssignment(prop) &&
61
+ ts.isIdentifier(prop.name) &&
62
+ prop.name.text === 'missingTranslationHandler');
63
+ // Check if provideMissingTranslationHandlerForElement is already used
64
+ if (existingHandlerProp && ts.isCallExpression(existingHandlerProp.initializer)) {
65
+ const expression = existingHandlerProp.initializer.expression;
66
+ if (ts.isIdentifier(expression) &&
67
+ expression.text === 'provideMissingTranslationHandlerForElement') {
68
+ // Already migrated, skip
69
+ return null;
70
+ }
71
+ }
72
+ // Filter out the existing missingTranslationHandler property if present
73
+ const otherProperties = firstArg?.properties.filter(prop => !ts.isPropertyAssignment(prop) ||
74
+ !ts.isIdentifier(prop.name) ||
75
+ prop.name.text !== 'missingTranslationHandler') ?? [];
76
+ // Create the new missingTranslationHandler property
77
+ const missingTranslationHandlerProperty = ts.factory.createPropertyAssignment(ts.factory.createIdentifier('missingTranslationHandler'), ts.factory.createCallExpression(ts.factory.createIdentifier('provideMissingTranslationHandlerForElement'), undefined, existingHandlerProp ? [existingHandlerProp.initializer] : undefined));
78
+ const updatedCall = ts.factory.createCallExpression(node.expression, undefined, ts.factory.createNodeArray([
79
+ ts.factory.createObjectLiteralExpression([
80
+ ...otherProperties,
81
+ missingTranslationHandlerProperty
82
+ ])
83
+ ], node.arguments.hasTrailingComma));
84
+ return {
85
+ start: node.getStart(),
86
+ end: node.getEnd(),
87
+ replacement: ts
88
+ .createPrinter()
89
+ .printNode(EmitHint.Expression, updatedCall, node.getSourceFile())
90
+ };
91
+ };
92
+ /**
93
+ * Visits all function static call nodes that match the given module, class, and function names.
94
+ * This function handles nested calls, so it will find `ClassName.method()`.
95
+ * If className is not provided, it will search for standalone function calls (e.g., `functionName()`).
96
+ */
97
+ export const visitStaticFunctionCalls = ({ sourceFile, moduleSpecifier, className, functionName, visitor }) => {
98
+ // Get all import specifiers from the module
99
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
100
+ const importSpecifierName = className || functionName;
101
+ const allImportSpecifiers = getImportSpecifiers(sourceFile, moduleSpecifier, importSpecifierName);
102
+ if (allImportSpecifiers.length === 0) {
103
+ return;
104
+ }
105
+ // Get the local names (including aliases) for the imported class or function
106
+ const localNames = allImportSpecifiers.map(spec => spec.name.text);
107
+ // Recursive visitor function that traverses all nodes including nested function call arguments
108
+ const visit = (node) => {
109
+ if (ts.isCallExpression(node)) {
110
+ const expression = node.expression;
111
+ if (className) {
112
+ // Handle PropertyAccessExpression (e.g. Class.method())
113
+ if (ts.isPropertyAccessExpression(expression)) {
114
+ const propertyName = expression.name.text;
115
+ // Check if the method name matches
116
+ if (propertyName === functionName) {
117
+ const objectExpression = expression.expression;
118
+ // Case 1: Static call - ClassName.method()
119
+ if (ts.isIdentifier(objectExpression)) {
120
+ if (localNames.includes(objectExpression.text)) {
121
+ visitor(node);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ else {
128
+ // Handle standalone function calls (e.g., functionName())
129
+ if (ts.isIdentifier(expression)) {
130
+ if (localNames.includes(expression.text)) {
131
+ visitor(node);
132
+ }
133
+ }
134
+ }
135
+ }
136
+ // Recursively visit all children
137
+ ts.forEachChild(node, visit);
138
+ };
139
+ // Start visiting from the source file
140
+ ts.forEachChild(sourceFile, visit);
141
+ };
@@ -2,15 +2,4 @@
2
2
  * Copyright (c) Siemens 2016 - 2026
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { chain, schematic } from '@angular-devkit/schematics';
6
- import { getPackageJsonDependency } from '@schematics/angular/utility/dependencies';
7
- export const ngAdd = (options) => {
8
- return (tree, context) => {
9
- context.logger.info('🔧 Adding @siemens/element-ng to your project...');
10
- const hasSimplElementNgDependency = getPackageJsonDependency(tree, '@simpl/element-ng');
11
- if (hasSimplElementNgDependency) {
12
- const chainedRules = chain([schematic('simpl-siemens-migration', options)]);
13
- return chainedRules(tree, context);
14
- }
15
- };
16
- };
5
+ export { ngAdd } from './ng-add-rule.js';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2026
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { chain, schematic } from '@angular-devkit/schematics';
6
+ import { getPackageJsonDependency } from '@schematics/angular/utility/dependencies';
7
+ export const ngAdd = (options) => {
8
+ return (tree, context) => {
9
+ context.logger.info('🔧 Adding @siemens/element-ng to your project...');
10
+ const hasSimplElementNgDependency = getPackageJsonDependency(tree, '@simpl/element-ng');
11
+ if (hasSimplElementNgDependency) {
12
+ const chainedRules = chain([schematic('simpl-siemens-migration', options)]);
13
+ return chainedRules(tree, context);
14
+ }
15
+ };
16
+ };
@@ -2,20 +2,4 @@
2
2
  * Copyright (c) Siemens 2016 - 2026
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { chain } from '@angular-devkit/schematics';
6
- import { getElementMigrationData } from '../migrations/data/index.js';
7
- import { elementMigrationRule } from '../migrations/element-migration/element-migration.js';
8
- import { iconPathMigrationRule } from '../migrations/icon-path-migration/index.js';
9
- import { missingTranslateMigrationRule } from '../migrations/ngx-translate/index.js';
10
- export const migrateToV49 = () => {
11
- return (tree, context) => {
12
- context.logger.info('🚀 Starting update from version 48 to 49...');
13
- const migrationData = getElementMigrationData();
14
- const options = { path: '/' };
15
- return chain([
16
- elementMigrationRule(options, migrationData),
17
- missingTranslateMigrationRule(options),
18
- iconPathMigrationRule(options)
19
- ])(tree, context);
20
- };
21
- };
5
+ export { migrateToV49 } from './migrate-to-v49.js';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2026
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { chain } from '@angular-devkit/schematics';
6
+ import { getElementMigrationData } from '../migrations/data/index.js';
7
+ import { elementMigrationRule } from '../migrations/element-migration/element-migration.js';
8
+ import { iconPathMigrationRule } from '../migrations/icon-path-migration/index.js';
9
+ import { missingTranslateMigrationRule } from '../migrations/ngx-translate/index.js';
10
+ export const migrateToV49 = () => {
11
+ return (tree, context) => {
12
+ context.logger.info('🚀 Starting update from version 48 to 49...');
13
+ const migrationData = getElementMigrationData();
14
+ const options = { path: '/' };
15
+ return chain([
16
+ elementMigrationRule(options, migrationData),
17
+ missingTranslateMigrationRule(options),
18
+ iconPathMigrationRule(options)
19
+ ])(tree, context);
20
+ };
21
+ };
@@ -93,7 +93,7 @@
93
93
  "SI_FILE_UPLOADER.CANCEL": "Cancel",
94
94
  "SI_FILE_UPLOADER.CLEAR": "Clear",
95
95
  "SI_FILE_UPLOADER.DROP": "Drop files here or",
96
- "SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED": "File exceeds allowed maximum size",
96
+ "SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED": "File exceeds allowed maximum size of {{maxFileSize}}",
97
97
  "SI_FILE_UPLOADER.ERROR_FILE_TYPE": "Incorrect file type selected",
98
98
  "SI_FILE_UPLOADER.FILE_SELECT": "click to upload",
99
99
  "SI_FILE_UPLOADER.MAX_FILE_REACHED": "Max. {{maxFiles}} files",
@@ -177,6 +177,7 @@
177
177
  "SI_NAVBAR_VERTICAL.SEARCH_PLACEHOLDER": "Search ...",
178
178
  "SI_NAVBAR_VERTICAL.SKIP_LINK.MAIN_LABEL": "Main content",
179
179
  "SI_NAVBAR_VERTICAL.SKIP_LINK.NAVIGATION_LABEL": "Navigation",
180
+ "SI_NAVBAR_VERTICAL.TOGGLE": "Toggle",
180
181
  "SI_PAGINATION.BACK": "Back",
181
182
  "SI_PAGINATION.FORWARD": "Forward",
182
183
  "SI_PAGINATION.NAV_LABEL": "Pagination",
@@ -87,6 +87,31 @@ declare class SiCardComponent extends SiCardBaseDirective {
87
87
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiCardComponent, "si-card", never, { "primaryActions": { "alias": "primaryActions"; "required": false; "isSignal": true; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "actionBarViewType": { "alias": "actionBarViewType"; "required": false; "isSignal": true; }; "actionBarTitle": { "alias": "actionBarTitle"; "required": false; "isSignal": true; }; }, {}, never, ["[headerIcon]", "[body]", "[footer]"], true, never>;
88
88
  }
89
89
 
90
+ /**
91
+ * Shared card header used internally by `SiCardComponent`, `SiActionCardComponent`,
92
+ * and `SiDashboardCardComponent`. Not intended for direct use by consuming applications.
93
+ *
94
+ * @internal
95
+ */
96
+ declare class SiCardHeaderComponent {
97
+ readonly heading: _angular_core.InputSignal<TranslatableString | undefined>;
98
+ readonly subHeading: _angular_core.InputSignal<TranslatableString | undefined>;
99
+ readonly headingId: _angular_core.InputSignal<string | undefined>;
100
+ readonly subHeadingId: _angular_core.InputSignal<string | undefined>;
101
+ /** @defaultValue [] */
102
+ readonly primaryActions: _angular_core.InputSignal<(MenuItem | ContentActionBarMainItem)[]>;
103
+ /** @defaultValue [] */
104
+ readonly secondaryActions: _angular_core.InputSignal<(MenuItem | MenuItem$1)[]>;
105
+ readonly actionParam: _angular_core.InputSignal<unknown>;
106
+ /** @defaultValue 'collapsible' */
107
+ readonly actionBarViewType: _angular_core.InputSignal<ViewType>;
108
+ /** @defaultValue '' */
109
+ readonly actionBarTitle: _angular_core.InputSignal<TranslatableString>;
110
+ readonly displayContentActionBar: _angular_core.Signal<boolean>;
111
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiCardHeaderComponent, never>;
112
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiCardHeaderComponent, "si-card-header", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subHeading": { "alias": "subHeading"; "required": false; "isSignal": true; }; "headingId": { "alias": "headingId"; "required": false; "isSignal": true; }; "subHeadingId": { "alias": "subHeadingId"; "required": false; "isSignal": true; }; "primaryActions": { "alias": "primaryActions"; "required": false; "isSignal": true; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "actionBarViewType": { "alias": "actionBarViewType"; "required": false; "isSignal": true; }; "actionBarTitle": { "alias": "actionBarTitle"; "required": false; "isSignal": true; }; }, {}, never, ["[headerIcon]"], true, never>;
113
+ }
114
+
90
115
  /**
91
116
  * An action card component that extends the base card component with option to
92
117
  * either select the whole card or trigger an action.
@@ -127,4 +152,4 @@ declare class SiCardModule {
127
152
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<SiCardModule>;
128
153
  }
129
154
 
130
- export { SiActionCardComponent, SiCardComponent, SiCardModule };
155
+ export { SiActionCardComponent, SiCardComponent, SiCardHeaderComponent, SiCardModule };
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Type, Provider, ElementRef } from '@angular/core';
4
4
  import { Link } from '@siemens/element-ng/link';
5
5
  import { TranslatableString } from '@siemens/element-translate-ng/translate';
6
- import { ConnectionPositionPair, ConnectedOverlayPositionChange, Overlay, OverlayRef, FlexibleConnectedPositionStrategy, PositionStrategy } from '@angular/cdk/overlay';
6
+ import { ConnectionPositionPair, ConnectedOverlayPositionChange, Overlay, ScrollStrategy, OverlayRef, FlexibleConnectedPositionStrategy, PositionStrategy } from '@angular/cdk/overlay';
7
7
 
8
8
  /**
9
9
  * A global blink pulse generator for synchronized blinking patterns across an entire application.
@@ -381,8 +381,8 @@ declare const listenGlobal: (eventName: string, handler: (e: any) => void, activ
381
381
  */
382
382
 
383
383
  declare function makePositionStrategy(elementRef: ElementRef<any> | undefined, overlay: Overlay, placement: keyof typeof positions | ConnectionPositionPair[], constrain?: boolean, center?: boolean): PositionStrategy;
384
- declare function makeOverlay(positionStrategy: PositionStrategy, overlay: Overlay, hasBackdrop: boolean): OverlayRef;
385
- declare function getOverlay(elementRef: ElementRef<any>, overlay: Overlay, hasBackdrop: boolean, placement: keyof typeof positions | ConnectionPositionPair[], constrain?: boolean, center?: boolean): OverlayRef;
384
+ declare function makeOverlay(positionStrategy: PositionStrategy, overlay: Overlay, hasBackdrop: boolean, scrollStrategy?: ScrollStrategy): OverlayRef;
385
+ declare function getOverlay(elementRef: ElementRef<any>, overlay: Overlay, hasBackdrop: boolean, placement: keyof typeof positions | ConnectionPositionPair[], constrain?: boolean, center?: boolean, scrollStrategy?: ScrollStrategy): OverlayRef;
386
386
  declare function getPositionStrategy(overlayref: OverlayRef): FlexibleConnectedPositionStrategy | undefined;
387
387
  declare function getOverlayPositions(elementRef: ElementRef<any>, placement: keyof typeof positions | ConnectionPositionPair[], center?: boolean): ConnectionPositionPair[];
388
388
  declare function hasTrigger(trigger: string, triggers?: string): boolean;
@@ -17,6 +17,7 @@ interface UploadFile {
17
17
  fileName: string;
18
18
  size: string;
19
19
  errorText?: TranslatableString;
20
+ errorParams?: Record<string, unknown>;
20
21
  progress: number;
21
22
  }
22
23
 
@@ -57,7 +58,7 @@ declare class SiFileUploadDirective {
57
58
  *
58
59
  * @defaultValue
59
60
  * ```
60
- * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
61
+ * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
61
62
  * ```
62
63
  */
63
64
  readonly errorTextFileMaxSize: _angular_core.InputSignal<TranslatableString>;
@@ -177,7 +178,7 @@ declare class SiFileDropzoneComponent {
177
178
  *
178
179
  * @defaultValue
179
180
  * ```
180
- * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
181
+ * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
181
182
  * ```
182
183
  */
183
184
  readonly errorTextFileMaxSize: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
@@ -399,7 +400,7 @@ declare class SiFileUploaderComponent implements OnChanges {
399
400
  *
400
401
  * @defaultValue
401
402
  * ```
402
- * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size`)
403
+ * t(() => $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:File exceeds allowed maximum size of {{maxFileSize}}`)
403
404
  * ```
404
405
  */
405
406
  readonly errorTextFileMaxSize: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
@@ -432,7 +432,7 @@ declare class SiFilteredSearchComponent implements OnInit, OnChanges {
432
432
  criterionName: string;
433
433
  value?: string;
434
434
  }): void;
435
- protected onSearchValueChange(value: string): void;
435
+ protected onSearchValueChange(): void;
436
436
  protected valueChange(value: CriterionValue, criterion: {
437
437
  config: InternalCriterionDefinition;
438
438
  value: CriterionValue;
@@ -38,23 +38,15 @@ declare class SiNavbarVerticalNextComponent implements OnChanges, OnInit {
38
38
  */
39
39
  readonly visible: _angular_core.InputSignalWithTransform<boolean, unknown>;
40
40
  /**
41
- * Text for the navbar expand button. Required for a11y
41
+ * Text for the navbar toggle button used as `aria-label`.
42
+ * The expanded state is communicated via `aria-expanded`.
42
43
  *
43
44
  * @defaultValue
44
45
  * ```
45
- * t(() => $localize`:@@SI_NAVBAR_VERTICAL.EXPAND:Expand`)
46
+ * t(() => $localize`:@@SI_NAVBAR_VERTICAL.TOGGLE:Toggle`)
46
47
  * ```
47
48
  */
48
- readonly navbarExpandButtonText: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
49
- /**
50
- * Text for the navbar collapse button. Required for a11y
51
- *
52
- * @defaultValue
53
- * ```
54
- * t(() => $localize`:@@SI_NAVBAR_VERTICAL.COLLAPSE:Collapse`)
55
- * ```
56
- */
57
- readonly navbarCollapseButtonText: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
49
+ readonly toggleButtonText: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
58
50
  /**
59
51
  * An optional stateId to uniquely identify a component instance.
60
52
  * Required for persistence of ui state.
@@ -103,7 +95,7 @@ declare class SiNavbarVerticalNextComponent implements OnChanges, OnInit {
103
95
  /** @internal */
104
96
  itemTriggered(): void;
105
97
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiNavbarVerticalNextComponent, never>;
106
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiNavbarVerticalNextComponent, "si-navbar-vertical-next", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "textOnly": { "alias": "textOnly"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "navbarExpandButtonText": { "alias": "navbarExpandButtonText"; "required": false; "isSignal": true; }; "navbarCollapseButtonText": { "alias": "navbarCollapseButtonText"; "required": false; "isSignal": true; }; "stateId": { "alias": "stateId"; "required": false; "isSignal": true; }; "skipLinkNavigationLabel": { "alias": "skipLinkNavigationLabel"; "required": false; "isSignal": true; }; "skipLinkMainContentLabel": { "alias": "skipLinkMainContentLabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["si-navbar-vertical-next-search", "si-navbar-vertical-next-items", "si-navbar-vertical-next-footer-items", "*"], true, never>;
98
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiNavbarVerticalNextComponent, "si-navbar-vertical-next", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "textOnly": { "alias": "textOnly"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "toggleButtonText": { "alias": "toggleButtonText"; "required": false; "isSignal": true; }; "stateId": { "alias": "stateId"; "required": false; "isSignal": true; }; "skipLinkNavigationLabel": { "alias": "skipLinkNavigationLabel"; "required": false; "isSignal": true; }; "skipLinkMainContentLabel": { "alias": "skipLinkMainContentLabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["si-navbar-vertical-next-search", "si-navbar-vertical-next-items", "si-navbar-vertical-next-footer-items", "*"], true, never>;
107
99
  }
108
100
 
109
101
  /**
@@ -129,7 +129,7 @@ declare class SiNavbarPrimaryComponent implements OnChanges, HeaderWithDropdowns
129
129
  *
130
130
  * @defaultValue
131
131
  * ```
132
- * t(() => $localize`:@@SI_LAUNCHPAD.TITLE:Launchpad`)
132
+ * t(() => $localize`:@@SI_LAUNCHPAD.TITLE:Switch applications`)
133
133
  * ```
134
134
  */
135
135
  readonly appSwitcherTitle: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
@@ -147,7 +147,7 @@ declare class SiNavbarPrimaryComponent implements OnChanges, HeaderWithDropdowns
147
147
  *
148
148
  * @defaultValue
149
149
  * ```
150
- * t(() => $localize`:@@SI_LAUNCHPAD.FAVORITE_APPS:Favorite apps`)
150
+ * t(() => $localize`:@@SI_LAUNCHPAD.FAVORITE_APPS:Favorites`)
151
151
  * ```
152
152
  */
153
153
  readonly favoriteAppsTitle: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>;
@@ -1,8 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy, TemplateRef, OnInit, ElementRef, Injector } from '@angular/core';
3
+ import { ScrollStrategy, ConnectedOverlayPositionChange } from '@angular/cdk/overlay';
3
4
  import { TranslatableString } from '@siemens/element-translate-ng/translate-types';
4
5
  import * as _siemens_element_translate_ng_translate from '@siemens/element-translate-ng/translate';
5
- import { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';
6
6
  import { OverlayArrowPosition } from '@siemens/element-ng/common';
7
7
 
8
8
  declare class SiPopoverDirective implements OnDestroy {
@@ -42,6 +42,13 @@ declare class SiPopoverDirective implements OnDestroy {
42
42
  * @defaultValue undefined
43
43
  */
44
44
  readonly context: _angular_core.InputSignal<unknown>;
45
+ /**
46
+ * Optional CDK scroll strategy used for the popover overlay.
47
+ * If not provided, the default reposition strategy is used.
48
+ *
49
+ * @defaultValue undefined
50
+ */
51
+ readonly scrollStrategy: _angular_core.InputSignal<ScrollStrategy | undefined>;
45
52
  /**
46
53
  * Emits an event when the popover is shown/hidden
47
54
  */
@@ -71,7 +78,7 @@ declare class SiPopoverDirective implements OnDestroy {
71
78
  updatePosition(): void;
72
79
  protected onClick(): void;
73
80
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiPopoverDirective, never>;
74
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiPopoverDirective, "[siPopover]", ["si-popover"], { "siPopover": { "alias": "siPopover"; "required": false; "isSignal": true; }; "placement": { "alias": "siPopoverPlacement"; "required": false; "isSignal": true; }; "title": { "alias": "siPopoverTitle"; "required": false; "isSignal": true; }; "containerClass": { "alias": "siPopoverContainerClass"; "required": false; "isSignal": true; }; "icon": { "alias": "siPopoverIcon"; "required": false; "isSignal": true; }; "context": { "alias": "siPopoverContext"; "required": false; "isSignal": true; }; }, { "visibilityChange": "siPopoverVisibilityChange"; }, never, never, true, never>;
81
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiPopoverDirective, "[siPopover]", ["si-popover"], { "siPopover": { "alias": "siPopover"; "required": false; "isSignal": true; }; "placement": { "alias": "siPopoverPlacement"; "required": false; "isSignal": true; }; "title": { "alias": "siPopoverTitle"; "required": false; "isSignal": true; }; "containerClass": { "alias": "siPopoverContainerClass"; "required": false; "isSignal": true; }; "icon": { "alias": "siPopoverIcon"; "required": false; "isSignal": true; }; "context": { "alias": "siPopoverContext"; "required": false; "isSignal": true; }; "scrollStrategy": { "alias": "siPopoverScrollStrategy"; "required": false; "isSignal": true; }; }, { "visibilityChange": "siPopoverVisibilityChange"; }, never, never, true, never>;
75
82
  }
76
83
 
77
84
  declare class PopoverComponent implements OnInit, OnDestroy {