@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
@@ -0,0 +1,49 @@
1
+ export const SYMBOL_REMOVALS_MIGRATION = [
2
+ {
3
+ module: /@(siemens|simpl)\/element-ng(\/accordion)?/,
4
+ elementSelector: 'si-accordion',
5
+ names: ['colorVariant']
6
+ },
7
+ {
8
+ module: /@(siemens|simpl)\/element-ng(\/datepicker)?/,
9
+ elementSelector: 'input',
10
+ attributeSelector: 'siDateInput',
11
+ names: ['dateInputDebounceTime']
12
+ },
13
+ {
14
+ module: /@(siemens|simpl)\/element-ng(\/datepicker)?/,
15
+ elementSelector: 'input',
16
+ attributeSelector: 'siDatepicker',
17
+ names: ['triggeringInput']
18
+ },
19
+ {
20
+ module: /@(siemens|simpl)\/element-ng(\/datepicker)?/,
21
+ elementSelector: 'si-date-range',
22
+ names: ['debounceTime']
23
+ },
24
+ {
25
+ module: /@(siemens|simpl)\/element-ng(\/filtered-search)?/,
26
+ elementSelector: 'si-filtered-search',
27
+ names: ['showIcon', 'noMatchingCriteriaText']
28
+ },
29
+ {
30
+ module: /@(siemens|simpl)\/element-ng(\/form)?/,
31
+ elementSelector: 'si-form-item',
32
+ names: ['inputId', 'readonly']
33
+ },
34
+ {
35
+ module: /@(siemens|simpl)\/element-ng(\/navbar-vertical)?/,
36
+ elementSelector: 'si-navbar-vertical',
37
+ names: ['autoCollapseDelay']
38
+ },
39
+ {
40
+ module: /@(siemens|simpl)\/element-ng(\/split)?/,
41
+ elementSelector: 'si-split-part',
42
+ names: ['headerStatusColor', 'headerStatusIconClass']
43
+ },
44
+ {
45
+ module: /@(siemens|simpl)\/element-ng(\/navbar-vertical)?/,
46
+ elementSelector: 'si-tree-view',
47
+ names: ['disableFilledIcons', 'trackByFunction']
48
+ }
49
+ ];
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import * as ts from 'typescript';
6
+ import { EmitHint } from 'typescript';
7
+ import { discoverSourceFiles, renameApi, renameAttribute, renameElementTag, renameIdentifier, removeSymbol } from '../../utils/index.js';
8
+ import { getElementMigrationData } from '../data/index.js';
9
+ export const elementMigrationRule = (options) => {
10
+ return async (tree, context) => {
11
+ const tsSourceFiles = await discoverSourceFiles(tree, context, options.path);
12
+ const migrationData = getElementMigrationData();
13
+ for (const filePath of tsSourceFiles) {
14
+ const content = tree.read(filePath);
15
+ if (!content) {
16
+ continue;
17
+ }
18
+ const sourceFile = ts.createSourceFile(filePath, content.toString(), ts.ScriptTarget.Latest, true);
19
+ let recorder = undefined;
20
+ let printer = undefined;
21
+ // Remove the ifs when it grows a bit more and split into multiple functions
22
+ if (migrationData.componentNameChanges) {
23
+ const changeInstructions = renameIdentifier({
24
+ sourceFile,
25
+ renamingInstructions: migrationData.componentNameChanges
26
+ });
27
+ for (const changeInstruction of changeInstructions) {
28
+ recorder ??= tree.beginUpdate(filePath);
29
+ printer ??= ts.createPrinter();
30
+ recorder.remove(changeInstruction.start, changeInstruction.width);
31
+ recorder.insertLeft(changeInstruction.start, printer.printNode(EmitHint.Unspecified, changeInstruction.newNode, sourceFile));
32
+ }
33
+ }
34
+ if (migrationData.attributeSelectorChanges) {
35
+ recorder ??= tree.beginUpdate(filePath);
36
+ for (const change of migrationData.attributeSelectorChanges) {
37
+ renameAttribute({
38
+ tree,
39
+ recorder,
40
+ sourceFile,
41
+ filePath,
42
+ fromName: change.replace,
43
+ toName: change.replaceWith
44
+ });
45
+ }
46
+ }
47
+ if (migrationData.elementSelectorChanges) {
48
+ recorder ??= tree.beginUpdate(filePath);
49
+ for (const change of migrationData.elementSelectorChanges) {
50
+ renameElementTag({
51
+ tree,
52
+ recorder,
53
+ sourceFile,
54
+ filePath,
55
+ fromName: change.replace,
56
+ toName: change.replaceWith
57
+ });
58
+ }
59
+ }
60
+ if (migrationData.outputNameChanges) {
61
+ recorder ??= tree.beginUpdate(filePath);
62
+ for (const change of migrationData.outputNameChanges) {
63
+ renameApi({
64
+ tree,
65
+ recorder,
66
+ sourceFile,
67
+ filePath,
68
+ elementName: change.elementSelector,
69
+ apis: change.apiMappings
70
+ });
71
+ }
72
+ }
73
+ if (migrationData.symbolRemovalChanges) {
74
+ recorder ??= tree.beginUpdate(filePath);
75
+ for (const change of migrationData.symbolRemovalChanges) {
76
+ removeSymbol({
77
+ tree,
78
+ recorder,
79
+ sourceFile,
80
+ filePath,
81
+ elementName: change.elementSelector,
82
+ attributeSelector: change.attributeSelector,
83
+ names: change.names
84
+ });
85
+ }
86
+ }
87
+ if (recorder) {
88
+ tree.commitUpdate(recorder);
89
+ }
90
+ }
91
+ return tree;
92
+ };
93
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './element-migration.js';
@@ -4,10 +4,15 @@
4
4
  */
5
5
  import { chain } from '@angular-devkit/schematics';
6
6
  import { actionModalMigrationRule } from './action-modal-migration/index.js';
7
- import { toLegacyMigrationRule } from './to-legacy-migration/to-legacy-migration';
7
+ import { elementMigrationRule } from './element-migration/index.js';
8
+ import { wizardMigrationRule } from './wizard-migration/index.js';
8
9
  export const v47to48Migration = (options) => {
9
10
  return (tree, context) => {
10
11
  context.logger.info('🚀 Starting migration from v47 to v48...');
11
- return chain([actionModalMigrationRule(options), toLegacyMigrationRule(options)])(tree, context);
12
+ return chain([
13
+ actionModalMigrationRule(options),
14
+ elementMigrationRule(options),
15
+ wizardMigrationRule(options)
16
+ ])(tree, context);
12
17
  };
13
18
  };
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { join, dirname } from 'path';
6
+ import * as ts from 'typescript';
7
+ import { discoverSourceFiles, findElement, getInlineTemplates, getTemplateUrl } from '../../utils/index.js';
8
+ export const wizardMigrationRule = (options) => {
9
+ return async (tree, context) => {
10
+ context.logger.info('🔄 Migrating wizard api...');
11
+ const tsSourceFiles = await discoverSourceFiles(tree, context, options.path);
12
+ for (const filePath of tsSourceFiles) {
13
+ const content = tree.read(filePath);
14
+ if (!content) {
15
+ continue;
16
+ }
17
+ const sourceFile = ts.createSourceFile(filePath, content.toString(), ts.ScriptTarget.Latest, true);
18
+ const recorder = tree.beginUpdate(filePath);
19
+ renameApi({
20
+ tree,
21
+ filePath,
22
+ sourceFile,
23
+ recorder,
24
+ elementName: 'si-wizard'
25
+ });
26
+ if (recorder) {
27
+ tree.commitUpdate(recorder);
28
+ }
29
+ }
30
+ };
31
+ };
32
+ const renameApi = ({ tree, filePath, sourceFile, recorder, elementName }) => {
33
+ getInlineTemplates(sourceFile).forEach(template => addOrRemoveInlineNavigationAttribute({
34
+ template: template.text,
35
+ offset: template.getStart() + 1,
36
+ elementName,
37
+ recorder
38
+ }));
39
+ getTemplateUrl(sourceFile).forEach(templateUrl => {
40
+ const templatePath = join(dirname(filePath), templateUrl);
41
+ const templateContent = tree.read(templatePath).toString('utf-8');
42
+ const templateRecorder = tree.beginUpdate(templatePath);
43
+ addOrRemoveInlineNavigationAttribute({
44
+ template: templateContent,
45
+ offset: 0,
46
+ elementName,
47
+ recorder: templateRecorder
48
+ });
49
+ tree.commitUpdate(templateRecorder);
50
+ });
51
+ };
52
+ /**
53
+ * Migrates the inlineNavigation attribute on wizard elements.
54
+ * - Adds `inlineNavigation` when not present (new default: true)
55
+ * - Removes `[inlineNavigation]="false"` (false is now the default)
56
+ * - Keeps `[inlineNavigation]="true"` and dynamic bindings unchanged
57
+ */
58
+ const addOrRemoveInlineNavigationAttribute = ({ template, offset, recorder, elementName }) => {
59
+ const elements = findElement(template, element => element.name === elementName);
60
+ for (const element of elements) {
61
+ const inlineNavigationAttr = element.attrs.find(attr => attr.name === '[inlineNavigation]' || attr.name === 'inlineNavigation');
62
+ if (!inlineNavigationAttr) {
63
+ // No attribute exists → Add default inlineNavigation
64
+ const insertPosition = element.startSourceSpan.end.offset + offset - 1;
65
+ recorder.insertLeft(insertPosition, ' inlineNavigation');
66
+ }
67
+ else if ((inlineNavigationAttr.name === '[inlineNavigation]' ||
68
+ inlineNavigationAttr.name === 'inlineNavigation') &&
69
+ inlineNavigationAttr.value === 'false') {
70
+ const { start, end } = inlineNavigationAttr.sourceSpan;
71
+ const length = end.offset - start.offset;
72
+ recorder.remove(start.offset + offset, length);
73
+ // Also remove extra whitespace if present
74
+ const nextChar = template.charAt(end.offset);
75
+ if (nextChar === ' ') {
76
+ recorder.remove(end.offset + offset, 1);
77
+ }
78
+ }
79
+ }
80
+ };
@@ -26,10 +26,10 @@ export const scssImportMigration = (_options) => {
26
26
  * ```
27
27
  */
28
28
  export const scssMigrationRule = (_options) => {
29
- return (tree, context) => {
29
+ return async (tree, context) => {
30
30
  const rules = [];
31
31
  context.logger.info('🎨 Migrating SCSS styles...');
32
- const globalStyles = getGlobalStyles(tree);
32
+ const globalStyles = await getGlobalStyles(tree);
33
33
  for (const style of globalStyles) {
34
34
  if (style.endsWith('.scss') || style.endsWith('.sass')) {
35
35
  const content = tree.readText(style);
@@ -51,7 +51,7 @@ export const scssMigrationRule = (_options) => {
51
51
  }
52
52
  }
53
53
  }
54
- const scssFiles = discoverSourceFiles(tree, context, _options.path, '.scss');
54
+ const scssFiles = await discoverSourceFiles(tree, context, _options.path, '.scss');
55
55
  for (const filePath of scssFiles) {
56
56
  const content = tree.readText(filePath);
57
57
  if (content.includes(STYLE_REPLACEMENTS[0].replace) ||
@@ -27,10 +27,10 @@ export const tsImportMigration = (_options) => {
27
27
  * ```
28
28
  */
29
29
  export const tsImportMigrationRule = (_options) => {
30
- return (tree, context) => {
30
+ return async (tree, context) => {
31
31
  const rules = [];
32
32
  context.logger.info('📦 Migrating TypeScript imports...');
33
- const sourceFiles = discoverSourceFiles(tree, context, _options.path);
33
+ const sourceFiles = await discoverSourceFiles(tree, context, _options.path);
34
34
  for (const filePath of sourceFiles) {
35
35
  const migrations = collectMigrationImports(filePath, tree, context);
36
36
  const { imports, toRemoveImports } = migrations;
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Siemens 2016 - 2025
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
+ export * from './html-utils.js';
5
6
  export * from './project-utils.js';
6
- export * from './ts-utils.js';
7
- export * from './testing.js';
8
7
  export * from './schematics-file-system.js';
9
- export * from './html-utils.js';
10
8
  export * from './template-utils.js';
9
+ export * from './testing.js';
10
+ export * from './ts-utils.js';
@@ -4,44 +4,46 @@
4
4
  */
5
5
  import { normalize } from '@angular-devkit/core';
6
6
  import { SchematicsException } from '@angular-devkit/schematics';
7
+ import { allTargetOptions, allWorkspaceTargets, getWorkspace } from '@schematics/angular/utility/workspace';
7
8
  import { dirname, isAbsolute, resolve } from 'path';
8
9
  import { parseTsconfigFile } from './ts-utils.js';
9
- export const getGlobalStyles = (tree) => {
10
+ export const getGlobalStyles = async (tree) => {
10
11
  const globalStyles = new Set();
11
- for (const target of getTargets(getWorkspace(tree))) {
12
- if (target.options?.styles && Array.isArray(target.options.styles)) {
13
- target.options.styles.forEach((style) => {
14
- if (typeof style === 'string') {
15
- globalStyles.add(normalize(style));
12
+ for (const [name, target] of allWorkspaceTargets(await getWorkspace(tree))) {
13
+ if (['build', 'test'].includes(name)) {
14
+ for (const [, opt] of allTargetOptions(target)) {
15
+ if (opt.styles && Array.isArray(opt.styles)) {
16
+ opt.styles.forEach((style) => {
17
+ if (typeof style === 'string') {
18
+ globalStyles.add(normalize(style));
19
+ }
20
+ });
16
21
  }
17
- });
22
+ }
18
23
  }
19
24
  }
20
25
  return [...globalStyles];
21
26
  };
22
- export const getWorkspace = (tree) => {
23
- const workspace = tree.read('/angular.json');
24
- if (!workspace) {
25
- throw new SchematicsException('Could not find angular.json');
26
- }
27
- return JSON.parse(workspace.toString());
28
- };
29
- export const getTsConfigPaths = (tree) => {
27
+ export const getTsConfigPaths = async (tree) => {
30
28
  const buildPaths = new Set();
31
- for (const target of getTargets(getWorkspace(tree))) {
32
- if (target.options?.tsConfig && typeof target.options.tsConfig === 'string') {
33
- const tsConfig = target.options.tsConfig;
34
- if (tree.exists(tsConfig)) {
35
- buildPaths.add(normalize(tsConfig));
29
+ for (const [name, target] of allWorkspaceTargets(await getWorkspace(tree))) {
30
+ if (['build', 'test'].includes(name)) {
31
+ for (const [, opt] of allTargetOptions(target)) {
32
+ if (typeof opt?.tsConfig === 'string') {
33
+ const tsConfig = opt.tsConfig;
34
+ if (tree.exists(tsConfig)) {
35
+ buildPaths.add(normalize(tsConfig));
36
+ }
37
+ }
36
38
  }
37
39
  }
38
40
  }
39
41
  return [...buildPaths];
40
42
  };
41
- export const discoverSourceFiles = (tree, context, projectPath, extension = '.ts') => {
43
+ export const discoverSourceFiles = async (tree, context, projectPath, extension = '.ts') => {
42
44
  const basePath = normalize(process.cwd());
43
45
  // Wrap the tree to force full paths since parsing the typescript config requires full paths.
44
- const tsConfigs = getTsConfigPaths(tree);
46
+ const tsConfigs = await getTsConfigPaths(tree);
45
47
  if (!tsConfigs.length) {
46
48
  throw new SchematicsException('Could not find any tsconfig file. Cannot run the migration.');
47
49
  }
@@ -60,16 +62,3 @@ export const discoverSourceFiles = (tree, context, projectPath, extension = '.ts
60
62
  }
61
63
  return Array.from(new Set(sourceFiles)).map(p => p.substring(basePath.length + 1));
62
64
  };
63
- function* getTargets(workspace, targetNames = ['build', 'test']) {
64
- for (const [, projectRaw] of Object.entries(workspace.projects)) {
65
- const project = projectRaw;
66
- if (!project.architect) {
67
- continue;
68
- }
69
- for (const [name, target] of Object.entries(project.architect)) {
70
- if (targetNames.includes(name) && target) {
71
- yield target;
72
- }
73
- }
74
- }
75
- }
@@ -1,7 +1,7 @@
1
1
  import { join, dirname } from 'path';
2
2
  import ts from 'typescript';
3
3
  import { findAttribute, findElement } from './html-utils.js';
4
- const getInlineTemplates = (source) => {
4
+ export const getInlineTemplates = (source) => {
5
5
  const templateNodes = [];
6
6
  const componentDecoratorVisitor = (node) => {
7
7
  if (ts.isDecorator(node) &&
@@ -27,7 +27,7 @@ const getInlineTemplates = (source) => {
27
27
  source.forEachChild(componentDecoratorVisitor);
28
28
  return templateNodes;
29
29
  };
30
- const getTemplateUrl = (source) => {
30
+ export const getTemplateUrl = (source) => {
31
31
  const templateUrls = [];
32
32
  const componentDecoratorVisitor = (node) => {
33
33
  if (ts.isDecorator(node) &&
@@ -68,6 +68,36 @@ const renameAttributeInTemplate = ({ template, offset, recorder, fromName, toNam
68
68
  recorder.insertLeft(el.sourceSpan.start.offset + offset, toName);
69
69
  });
70
70
  };
71
+ const renameApiInTemplate = ({ template, offset, recorder, elementName, apis }) => {
72
+ findElement(template, element => element.name === elementName).forEach(el => {
73
+ for (const api of apis) {
74
+ el.attrs
75
+ .filter(attr => attr.name === api.replace)
76
+ .forEach(attr => {
77
+ recorder.remove(attr.sourceSpan.start.offset + offset, api.replace.length);
78
+ recorder.insertLeft(attr.sourceSpan.start.offset + offset, api.replaceWith);
79
+ });
80
+ }
81
+ });
82
+ };
83
+ const removeSymbols = ({ template, offset, recorder, elementName, attributeSelector, names }) => {
84
+ findElement(template, element => element.name === elementName).forEach(el => {
85
+ if (attributeSelector) {
86
+ const hasAttributeSelector = el.attrs.some(attr => attr.name === attributeSelector);
87
+ if (!hasAttributeSelector) {
88
+ return;
89
+ }
90
+ }
91
+ for (const name of names) {
92
+ el.attrs
93
+ .filter(attr => attr.name === name || attr.name === `[${name}]` || attr.name === `(${name})`)
94
+ .forEach(attr => {
95
+ const apiLength = attr.sourceSpan.toString().length;
96
+ recorder.remove(attr.sourceSpan.start.offset + offset, apiLength);
97
+ });
98
+ }
99
+ });
100
+ };
71
101
  export const renameElementTag = ({ tree, filePath, sourceFile, recorder, fromName, toName }) => {
72
102
  getInlineTemplates(sourceFile).forEach(template => renameElementTagInTemplate({
73
103
  template: template.text,
@@ -112,3 +142,49 @@ export const renameAttribute = ({ tree, filePath, sourceFile, recorder, fromName
112
142
  tree.commitUpdate(templateRecorder);
113
143
  });
114
144
  };
145
+ export const renameApi = ({ tree, filePath, sourceFile, recorder, elementName, apis }) => {
146
+ getInlineTemplates(sourceFile).forEach(template => renameApiInTemplate({
147
+ template: template.text,
148
+ offset: template.getStart() + 1,
149
+ elementName,
150
+ recorder,
151
+ apis
152
+ }));
153
+ getTemplateUrl(sourceFile).forEach(templateUrl => {
154
+ const templatePath = join(dirname(filePath), templateUrl);
155
+ const templateContent = tree.read(templatePath).toString('utf-8');
156
+ const templateRecorder = tree.beginUpdate(templatePath);
157
+ renameApiInTemplate({
158
+ template: templateContent,
159
+ offset: 0,
160
+ elementName,
161
+ recorder: templateRecorder,
162
+ apis
163
+ });
164
+ tree.commitUpdate(templateRecorder);
165
+ });
166
+ };
167
+ export const removeSymbol = ({ tree, filePath, sourceFile, recorder, elementName, attributeSelector, names }) => {
168
+ getInlineTemplates(sourceFile).forEach(template => removeSymbols({
169
+ template: template.text,
170
+ offset: template.getStart() + 1,
171
+ elementName,
172
+ attributeSelector,
173
+ recorder,
174
+ names
175
+ }));
176
+ getTemplateUrl(sourceFile).forEach(templateUrl => {
177
+ const templatePath = join(dirname(filePath), templateUrl);
178
+ const templateContent = tree.read(templatePath).toString('utf-8');
179
+ const templateRecorder = tree.beginUpdate(templatePath);
180
+ removeSymbols({
181
+ template: templateContent,
182
+ offset: 0,
183
+ elementName,
184
+ attributeSelector,
185
+ recorder: templateRecorder,
186
+ names
187
+ });
188
+ tree.commitUpdate(templateRecorder);
189
+ });
190
+ };
@@ -150,15 +150,15 @@ export function* renameIdentifier({ sourceFile, renamingInstructions }) {
150
150
  if (!(node.importClause?.namedBindings && ts.isNamedImports(node.importClause.namedBindings))) {
151
151
  continue;
152
152
  }
153
- for (const [index, [fromName, toName]] of renamingInstruction.symbolRenamings.entries()) {
154
- const importSpecifiers = findImportSpecifier(node.importClause.namedBindings.elements, fromName);
153
+ for (const [index, { replace, replaceWith }] of renamingInstruction.symbolRenamings.entries()) {
154
+ const importSpecifiers = findImportSpecifier(node.importClause.namedBindings.elements, replace);
155
155
  if (!importSpecifiers) {
156
156
  continue;
157
157
  }
158
158
  yield {
159
159
  start: importSpecifiers.name.getStart(),
160
160
  width: importSpecifiers.name.getWidth(),
161
- newNode: ts.factory.createIdentifier(toName)
161
+ newNode: ts.factory.createIdentifier(replaceWith)
162
162
  };
163
163
  if (renamingInstruction.toModule &&
164
164
  !node.moduleSpecifier.text.endsWith('@simpl/element-ng') &&
@@ -171,11 +171,11 @@ export function* renameIdentifier({ sourceFile, renamingInstructions }) {
171
171
  };
172
172
  }
173
173
  const visitor = function* (visitedNode) {
174
- if (ts.isIdentifier(visitedNode) && visitedNode.text === fromName) {
174
+ if (ts.isIdentifier(visitedNode) && visitedNode.text === replace) {
175
175
  yield {
176
176
  start: visitedNode.getStart(),
177
177
  width: visitedNode.getWidth(),
178
- newNode: ts.factory.createIdentifier(toName)
178
+ newNode: ts.factory.createIdentifier(replaceWith)
179
179
  };
180
180
  }
181
181
  else {
package/select/index.d.ts CHANGED
@@ -561,6 +561,11 @@ declare class SiSelectActionDirective {
561
561
  }
562
562
 
563
563
  declare class SiSelectActionsDirective {
564
+ /** @internal */
565
+ static ngTemplateContextGuard(directive: SiSelectActionsDirective, context: unknown): context is {
566
+ searchText?: string;
567
+ visibleOptionsCount?: number;
568
+ };
564
569
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiSelectActionsDirective, never>;
565
570
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiSelectActionsDirective, "[siSelectActions]", ["si-select-actions"], {}, {}, never, never, true, never>;
566
571
  }
@@ -137,7 +137,6 @@ declare class SiStatusBarComponent implements DoCheck, OnDestroy, OnChanges {
137
137
  private readonly translateService;
138
138
  private readonly resizeObserver;
139
139
  private readonly measureService;
140
- private readonly destroyRef;
141
140
  constructor();
142
141
  ngOnChanges(changes: SimpleChanges): void;
143
142
  ngDoCheck(): void;
@@ -1,8 +1,10 @@
1
1
  {
2
+ "SI_AI_MESSAGE.SECONDARY_ACTIONS": "More actions",
2
3
  "SI_ALERT_DIALOG.OK": "OK",
3
4
  "SI_APPLICATION_HEADER.LAUNCHPAD": "Launchpad",
4
5
  "SI_APPLICATION_HEADER.TOGGLE_ACTIONS": "Toggle actions",
5
6
  "SI_APPLICATION_HEADER.TOGGLE_NAVIGATION": "Toggle navigation",
7
+ "SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT": "Remove attachment",
6
8
  "SI_BREADCRUMB": "Breadcrumbs",
7
9
  "SI_CHANGE_PASSWORD.BACK": "Back",
8
10
  "SI_CHANGE_PASSWORD.CHANGE": "Change",
@@ -11,6 +13,12 @@
11
13
  "SI_CHANGE_PASSWORD.CONFIRM_PASSWORD": "Confirm password",
12
14
  "SI_CHANGE_PASSWORD.NEW_PASSWORD": "New password",
13
15
  "SI_CHANGE_PASSWORD.PASSWORD_POLICY": "Password policy",
16
+ "SI_CHAT_INPUT.ATTACH_FILE": "Attach file",
17
+ "SI_CHAT_INPUT.INTERRUPT": "Interrupt",
18
+ "SI_CHAT_INPUT.LABEL": "Chat message input",
19
+ "SI_CHAT_INPUT.PLACEHOLDER": "Enter a message…",
20
+ "SI_CHAT_INPUT.SECONDARY_ACTIONS": "More actions",
21
+ "SI_CHAT_INPUT.SEND": "Send",
14
22
  "SI_COLUMN_SELECTION_DIALOG.CANCEL": "Cancel",
15
23
  "SI_COLUMN_SELECTION_DIALOG.HIDDEN": "Hidden",
16
24
  "SI_COLUMN_SELECTION_DIALOG.ITEM_MOVED": "Item is now at position {{targetPosition}}",
@@ -41,6 +49,7 @@
41
49
  "SI_DATEPICKER.SECONDS": "Seconds",
42
50
  "SI_DATEPICKER.START_DATE_PLACEHOLDER": "Start date",
43
51
  "SI_DATEPICKER.START_TIME_LABEL": "from",
52
+ "SI_DATEPICKER.TODAY": "Today",
44
53
  "SI_DATE_RANGE_FILTER.ADVANCED": "Advanced",
45
54
  "SI_DATE_RANGE_FILTER.AFTER": "After",
46
55
  "SI_DATE_RANGE_FILTER.APPLY": "Apply",
@@ -207,6 +216,7 @@
207
216
  "SI_TREE_VIEW.COLLAPSE_ALL": "Collapse all",
208
217
  "SI_TREE_VIEW.EXPAND_ALL": "Expand all",
209
218
  "SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL": "Suggestions",
219
+ "SI_USER_MESSAGE.SECONDARY_ACTIONS": "More actions",
210
220
  "SI_WIZARD.BACK": "Back",
211
221
  "SI_WIZARD.CANCEL": "Cancel",
212
222
  "SI_WIZARD.COMPLETED": "Wizard completed!",
package/tour/index.d.ts CHANGED
@@ -104,10 +104,12 @@ declare class SiTourService {
104
104
  private makeStep;
105
105
  private scrollIntoView;
106
106
  private handleBeforeNextPromise;
107
- private makeOverlay;
107
+ private centerOverlay;
108
+ private attachOverlay;
109
+ private createFlexiblePositionStrategy;
110
+ private createOrUpdateOverlays;
108
111
  private handleResizeSubscription;
109
112
  private isElementVisible;
110
- private handlePositionChangeSubscription;
111
113
  private getElement;
112
114
  private hide;
113
115
  static ɵfac: i0.ɵɵFactoryDeclaration<SiTourService, never>;
@@ -2,10 +2,12 @@ import { Provider } from '@angular/core';
2
2
  export * from '@siemens/element-translate-ng/translate';
3
3
 
4
4
  interface SiTranslatableKeys {
5
+ 'SI_AI_MESSAGE.SECONDARY_ACTIONS'?: string;
5
6
  'SI_ALERT_DIALOG.OK'?: string;
6
7
  'SI_APPLICATION_HEADER.LAUNCHPAD'?: string;
7
8
  'SI_APPLICATION_HEADER.TOGGLE_ACTIONS'?: string;
8
9
  'SI_APPLICATION_HEADER.TOGGLE_NAVIGATION'?: string;
10
+ 'SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT'?: string;
9
11
  'SI_BREADCRUMB'?: string;
10
12
  'SI_CHANGE_PASSWORD.BACK'?: string;
11
13
  'SI_CHANGE_PASSWORD.CHANGE'?: string;
@@ -14,6 +16,12 @@ interface SiTranslatableKeys {
14
16
  'SI_CHANGE_PASSWORD.CONFIRM_PASSWORD'?: string;
15
17
  'SI_CHANGE_PASSWORD.NEW_PASSWORD'?: string;
16
18
  'SI_CHANGE_PASSWORD.PASSWORD_POLICY'?: string;
19
+ 'SI_CHAT_INPUT.ATTACH_FILE'?: string;
20
+ 'SI_CHAT_INPUT.INTERRUPT'?: string;
21
+ 'SI_CHAT_INPUT.LABEL'?: string;
22
+ 'SI_CHAT_INPUT.PLACEHOLDER'?: string;
23
+ 'SI_CHAT_INPUT.SECONDARY_ACTIONS'?: string;
24
+ 'SI_CHAT_INPUT.SEND'?: string;
17
25
  'SI_COLUMN_SELECTION_DIALOG.CANCEL'?: string;
18
26
  'SI_COLUMN_SELECTION_DIALOG.HIDDEN'?: string;
19
27
  'SI_COLUMN_SELECTION_DIALOG.ITEM_MOVED'?: string;
@@ -44,6 +52,7 @@ interface SiTranslatableKeys {
44
52
  'SI_DATEPICKER.SECONDS'?: string;
45
53
  'SI_DATEPICKER.START_DATE_PLACEHOLDER'?: string;
46
54
  'SI_DATEPICKER.START_TIME_LABEL'?: string;
55
+ 'SI_DATEPICKER.TODAY'?: string;
47
56
  'SI_DATE_RANGE_FILTER.ADVANCED'?: string;
48
57
  'SI_DATE_RANGE_FILTER.AFTER'?: string;
49
58
  'SI_DATE_RANGE_FILTER.APPLY'?: string;
@@ -210,6 +219,7 @@ interface SiTranslatableKeys {
210
219
  'SI_TREE_VIEW.COLLAPSE_ALL'?: string;
211
220
  'SI_TREE_VIEW.EXPAND_ALL'?: string;
212
221
  'SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL'?: string;
222
+ 'SI_USER_MESSAGE.SECONDARY_ACTIONS'?: string;
213
223
  'SI_WIZARD.BACK'?: string;
214
224
  'SI_WIZARD.CANCEL'?: string;
215
225
  'SI_WIZARD.COMPLETED'?: string;