@siemens/element-ng 48.2.0-rc.1 → 48.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +5 -0
  2. package/accordion/index.d.ts +5 -1
  3. package/application-header/index.d.ts +15 -2
  4. package/chat-messages/index.d.ts +654 -0
  5. package/chat-messages/package.json +3 -0
  6. package/dashboard/index.d.ts +1 -0
  7. package/fesm2022/siemens-element-ng-accordion.mjs +5 -1
  8. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  9. package/fesm2022/siemens-element-ng-application-header.mjs +62 -1
  10. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  11. package/fesm2022/siemens-element-ng-card.mjs +4 -4
  12. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  13. package/fesm2022/siemens-element-ng-chat-messages.mjs +863 -0
  14. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -0
  15. package/fesm2022/siemens-element-ng-dashboard.mjs +8 -4
  16. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-file-uploader.mjs +277 -118
  18. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-filtered-search.mjs +3 -4
  20. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-header-dropdown.mjs +13 -1
  22. package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-icon.mjs +3 -1
  24. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  25. package/fesm2022/siemens-element-ng-ip-input.mjs +116 -117
  26. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-markdown-renderer.mjs +253 -0
  28. package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -0
  29. package/fesm2022/siemens-element-ng-phone-number.mjs +5 -4
  30. package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-popover.mjs +3 -4
  32. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-resize-observer.mjs +13 -0
  34. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
  35. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  36. package/fesm2022/siemens-element-ng-tree-view.mjs +41 -2
  37. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  38. package/file-uploader/index.d.ts +119 -15
  39. package/header-dropdown/index.d.ts +7 -0
  40. package/icon/index.d.ts +3 -1
  41. package/ip-input/index.d.ts +13 -1
  42. package/markdown-renderer/index.d.ts +36 -0
  43. package/markdown-renderer/package.json +3 -0
  44. package/package.json +11 -3
  45. package/resize-observer/index.d.ts +13 -0
  46. package/schematics/collection.json +6 -0
  47. package/schematics/migrations/action-modal-migration/action-modal-migration.js +121 -0
  48. package/schematics/migrations/action-modal-migration/action-modal.mappings.js +98 -0
  49. package/schematics/migrations/action-modal-migration/index.js +5 -0
  50. package/schematics/migrations/data/attribute-selectors.js +6 -0
  51. package/schematics/migrations/data/component-names.js +78 -0
  52. package/schematics/migrations/data/element-selectors.js +10 -0
  53. package/schematics/migrations/data/index.js +17 -0
  54. package/schematics/migrations/data/output-names.js +8 -0
  55. package/schematics/migrations/data/symbol-removals.js +58 -0
  56. package/schematics/migrations/element-migration/element-migration.js +101 -0
  57. package/schematics/migrations/element-migration/index.js +5 -0
  58. package/schematics/migrations/index.js +18 -0
  59. package/schematics/migrations/schema.json +16 -0
  60. package/schematics/migrations/wizard-migration/index.js +88 -0
  61. package/schematics/scss-import-to-siemens-migration/index.js +3 -3
  62. package/schematics/simpl-siemens-migration/index.js +2 -1
  63. package/schematics/ts-import-to-siemens-migration/index.js +2 -2
  64. package/schematics/utils/html-utils.js +72 -0
  65. package/schematics/utils/index.js +4 -2
  66. package/schematics/utils/project-utils.js +24 -35
  67. package/schematics/utils/template-utils.js +190 -0
  68. package/schematics/utils/ts-utils.js +96 -0
  69. package/template-i18n.json +9 -0
  70. package/translate/index.d.ts +9 -0
  71. package/tree-view/index.d.ts +40 -1
@@ -0,0 +1,190 @@
1
+ import { join, dirname } from 'path';
2
+ import ts from 'typescript';
3
+ import { findAttribute, findElement } from './html-utils.js';
4
+ export const getInlineTemplates = (source) => {
5
+ const templateNodes = [];
6
+ const componentDecoratorVisitor = (node) => {
7
+ if (ts.isDecorator(node) &&
8
+ ts.isCallExpression(node.expression) &&
9
+ ts.isIdentifier(node.expression.expression) &&
10
+ node.expression.expression.text === 'Component') {
11
+ const arg = node.expression.arguments[0];
12
+ if (ts.isObjectLiteralExpression(arg)) {
13
+ const template = arg.properties.find(property => ts.isPropertyAssignment(property) &&
14
+ ts.isIdentifier(property.name) &&
15
+ property.name.text === 'template');
16
+ const initializer = template?.initializer;
17
+ if (initializer &&
18
+ (ts.isNoSubstitutionTemplateLiteral(initializer) || ts.isStringLiteral(initializer))) {
19
+ templateNodes.push(initializer);
20
+ }
21
+ }
22
+ }
23
+ else {
24
+ node.forEachChild(componentDecoratorVisitor);
25
+ }
26
+ };
27
+ source.forEachChild(componentDecoratorVisitor);
28
+ return templateNodes;
29
+ };
30
+ export const getTemplateUrl = (source) => {
31
+ const templateUrls = [];
32
+ const componentDecoratorVisitor = (node) => {
33
+ if (ts.isDecorator(node) &&
34
+ ts.isCallExpression(node.expression) &&
35
+ ts.isIdentifier(node.expression.expression) &&
36
+ node.expression.expression.text === 'Component') {
37
+ const arg = node.expression.arguments[0];
38
+ if (ts.isObjectLiteralExpression(arg)) {
39
+ const template = arg.properties.find(property => ts.isPropertyAssignment(property) &&
40
+ ts.isIdentifier(property.name) &&
41
+ property.name.text === 'templateUrl');
42
+ const initializer = template?.initializer;
43
+ if (initializer && ts.isStringLiteral(initializer)) {
44
+ templateUrls.push(initializer.text);
45
+ }
46
+ }
47
+ }
48
+ else {
49
+ node.forEachChild(componentDecoratorVisitor);
50
+ }
51
+ };
52
+ source.forEachChild(componentDecoratorVisitor);
53
+ return templateUrls;
54
+ };
55
+ const renameElementTagInTemplate = ({ template, offset, recorder, fromName, toName }) => {
56
+ findElement(template, element => element.name === fromName).forEach(el => {
57
+ recorder.remove(el.startSourceSpan.start.offset + 1 + offset, fromName.length);
58
+ recorder.insertLeft(el.startSourceSpan.start.offset + 1 + offset, toName);
59
+ if (el.endSourceSpan && el.startSourceSpan.start !== el.endSourceSpan.start) {
60
+ recorder.remove(el.endSourceSpan?.start.offset + 2 + offset, fromName.length);
61
+ recorder.insertLeft(el.endSourceSpan?.start.offset + 2 + offset, toName);
62
+ }
63
+ });
64
+ };
65
+ const renameAttributeInTemplate = ({ template, offset, recorder, fromName, toName }) => {
66
+ findAttribute(template, element => element.name === fromName).forEach(el => {
67
+ recorder.remove(el.sourceSpan.start.offset + offset, fromName.length);
68
+ recorder.insertLeft(el.sourceSpan.start.offset + offset, toName);
69
+ });
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
+ };
101
+ export const renameElementTag = ({ tree, filePath, sourceFile, recorder, fromName, toName }) => {
102
+ getInlineTemplates(sourceFile).forEach(template => renameElementTagInTemplate({
103
+ template: template.text,
104
+ offset: template.getStart() + 1,
105
+ toName,
106
+ fromName,
107
+ recorder
108
+ }));
109
+ getTemplateUrl(sourceFile).forEach(templateUrl => {
110
+ const templatePath = join(dirname(filePath), templateUrl);
111
+ const templateContent = tree.read(templatePath).toString('utf-8');
112
+ const templateRecorder = tree.beginUpdate(templatePath);
113
+ renameElementTagInTemplate({
114
+ template: templateContent,
115
+ offset: 0,
116
+ toName,
117
+ fromName,
118
+ recorder: templateRecorder
119
+ });
120
+ tree.commitUpdate(templateRecorder);
121
+ });
122
+ };
123
+ export const renameAttribute = ({ tree, filePath, sourceFile, recorder, fromName, toName }) => {
124
+ getInlineTemplates(sourceFile).forEach(template => renameAttributeInTemplate({
125
+ template: template.text,
126
+ offset: template.getStart() + 1,
127
+ toName,
128
+ fromName,
129
+ recorder
130
+ }));
131
+ getTemplateUrl(sourceFile).forEach(templateUrl => {
132
+ const templatePath = join(dirname(filePath), templateUrl);
133
+ const templateContent = tree.read(templatePath).toString('utf-8');
134
+ const templateRecorder = tree.beginUpdate(templatePath);
135
+ renameAttributeInTemplate({
136
+ template: templateContent,
137
+ offset: 0,
138
+ toName,
139
+ fromName,
140
+ recorder: templateRecorder
141
+ });
142
+ tree.commitUpdate(templateRecorder);
143
+ });
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
+ };
@@ -97,3 +97,99 @@ const visitDirectory = (fs, dirPath) => {
97
97
  });
98
98
  return files;
99
99
  };
100
+ /** Finds an import specifier with a particular name. */
101
+ export const findImportSpecifier = (nodes, specifierName) => {
102
+ return nodes.find(element => {
103
+ const { name, propertyName } = element;
104
+ return propertyName ? propertyName.text === specifierName : name.text === specifierName;
105
+ });
106
+ };
107
+ /**
108
+ * Note: returns only matching imports specifiers,
109
+ * Unmatched imports will be ignored (you won't get undefined), but a shorter array.
110
+ */
111
+ export const getImportSpecifiers = (sourceFile, moduleName, specifierOrSpecifiers) => {
112
+ const matches = [];
113
+ for (const node of sourceFile.statements) {
114
+ if (!ts.isImportDeclaration(node) || !ts.isStringLiteral(node.moduleSpecifier)) {
115
+ continue;
116
+ }
117
+ const namedBindings = node.importClause?.namedBindings;
118
+ const isMatch = typeof moduleName === 'string'
119
+ ? node.moduleSpecifier.text === moduleName
120
+ : moduleName.test(node.moduleSpecifier.text);
121
+ if (!isMatch || !namedBindings || !ts.isNamedImports(namedBindings)) {
122
+ continue;
123
+ }
124
+ if (typeof specifierOrSpecifiers === 'string') {
125
+ const match = findImportSpecifier(namedBindings.elements, specifierOrSpecifiers);
126
+ if (match) {
127
+ matches.push(match);
128
+ }
129
+ }
130
+ else {
131
+ for (const specifierName of specifierOrSpecifiers) {
132
+ const match = findImportSpecifier(namedBindings.elements, specifierName);
133
+ if (match) {
134
+ matches.push(match);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ return matches;
140
+ };
141
+ export function* renameIdentifier({ sourceFile, renamingInstructions }) {
142
+ for (const node of sourceFile.statements) {
143
+ if (!ts.isImportDeclaration(node) || !ts.isStringLiteral(node.moduleSpecifier)) {
144
+ continue;
145
+ }
146
+ for (const renamingInstruction of renamingInstructions) {
147
+ if (!renamingInstruction.module.test(node.moduleSpecifier.text)) {
148
+ continue;
149
+ }
150
+ if (!(node.importClause?.namedBindings && ts.isNamedImports(node.importClause.namedBindings))) {
151
+ continue;
152
+ }
153
+ for (const [index, { replace, replaceWith }] of renamingInstruction.symbolRenamings.entries()) {
154
+ const importSpecifiers = findImportSpecifier(node.importClause.namedBindings.elements, replace);
155
+ if (!importSpecifiers) {
156
+ continue;
157
+ }
158
+ yield {
159
+ start: importSpecifiers.name.getStart(),
160
+ width: importSpecifiers.name.getWidth(),
161
+ newNode: ts.factory.createIdentifier(replaceWith)
162
+ };
163
+ if (renamingInstruction.toModule &&
164
+ !node.moduleSpecifier.text.endsWith('@simpl/element-ng') &&
165
+ index === 0) {
166
+ const newPath = node.moduleSpecifier.text.replace(renamingInstruction.module, renamingInstruction.toModule);
167
+ yield {
168
+ start: node.moduleSpecifier.getStart(),
169
+ width: node.moduleSpecifier.getWidth(),
170
+ newNode: ts.factory.createStringLiteral(newPath, true)
171
+ };
172
+ }
173
+ const visitor = function* (visitedNode) {
174
+ if (ts.isIdentifier(visitedNode) && visitedNode.text === replace) {
175
+ yield {
176
+ start: visitedNode.getStart(),
177
+ width: visitedNode.getWidth(),
178
+ newNode: ts.factory.createIdentifier(replaceWith)
179
+ };
180
+ }
181
+ else {
182
+ for (const child of visitedNode.getChildren()) {
183
+ yield* visitor(child);
184
+ }
185
+ }
186
+ };
187
+ for (const statement of sourceFile.statements) {
188
+ if (!ts.isImportDeclaration(statement)) {
189
+ yield* visitor(statement);
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ }
@@ -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}}",
@@ -207,6 +215,7 @@
207
215
  "SI_TREE_VIEW.COLLAPSE_ALL": "Collapse all",
208
216
  "SI_TREE_VIEW.EXPAND_ALL": "Expand all",
209
217
  "SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL": "Suggestions",
218
+ "SI_USER_MESSAGE.SECONDARY_ACTIONS": "More actions",
210
219
  "SI_WIZARD.BACK": "Back",
211
220
  "SI_WIZARD.CANCEL": "Cancel",
212
221
  "SI_WIZARD.COMPLETED": "Wizard completed!",
@@ -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;
@@ -210,6 +218,7 @@ interface SiTranslatableKeys {
210
218
  'SI_TREE_VIEW.COLLAPSE_ALL'?: string;
211
219
  'SI_TREE_VIEW.EXPAND_ALL'?: string;
212
220
  'SI_TYPEAHEAD.AUTOCOMPLETE_LIST_LABEL'?: string;
221
+ 'SI_USER_MESSAGE.SECONDARY_ACTIONS'?: string;
213
222
  'SI_WIZARD.BACK'?: string;
214
223
  'SI_WIZARD.CANCEL'?: string;
215
224
  'SI_WIZARD.COMPLETED'?: string;
@@ -98,7 +98,7 @@ declare class SiTreeViewItemComponent implements OnInit, OnDestroy, AfterViewIni
98
98
  private onScrollIntoViewByConsumer;
99
99
  private expandOnClick;
100
100
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiTreeViewItemComponent, never>;
101
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiTreeViewItemComponent, "si-tree-view-item", never, {}, {}, never, never, true, never>;
101
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiTreeViewItemComponent, "si-tree-view-item", never, {}, {}, never, [":not(si-tree-view-item):not([dragPreview])"], true, never>;
102
102
  }
103
103
 
104
104
  /**
@@ -687,6 +687,45 @@ type TreeItemContext = {
687
687
  parent: SiTreeViewComponent;
688
688
  };
689
689
 
690
+ /**
691
+ * Tree view item template directive for defining custom item templates.
692
+ *
693
+ * @deprecated Use `siTreeViewItem` instead.
694
+ *
695
+ * This directive is deprecated and will be removed in a future version.
696
+ *
697
+ * @example
698
+ * Migration Guide:
699
+ *
700
+ * Before (deprecated):
701
+ * ```html
702
+ * <si-tree-view>
703
+ * <ng-template siTreeViewItemTemplate="root" let-item>
704
+ * <div class="custom-item">Root {{ item.level }}</div>
705
+ * </ng-template>
706
+ * <ng-template siTreeViewItemTemplate="child" let-item>
707
+ * <div class="custom-item">Child {{ item.level }}</div>
708
+ * </ng-template>
709
+ * </si-tree-view>
710
+ * ```
711
+ *
712
+ * After (recommended):
713
+ * ```html
714
+ * <si-tree-view>
715
+ * <ng-template siTreeViewItem let-item="treeItem">
716
+ * <si-tree-view-item>
717
+ * <div class="custom-item">
718
+ * @if (item.level === 0) {
719
+ * Root {{ item.level }}
720
+ * } @else {
721
+ * Child {{ item.level }}
722
+ * }
723
+ * </div>
724
+ * </si-tree-view-item>
725
+ * </ng-template>
726
+ * </si-tree-view>
727
+ * ```
728
+ */
690
729
  declare class SiTreeViewItemTemplateDirective {
691
730
  /** @defaultValue undefined */
692
731
  readonly name: _angular_core.InputSignal<string | undefined>;