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

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 (132) hide show
  1. package/README.md +9 -0
  2. package/accordion/index.d.ts +2 -1
  3. package/avatar/index.d.ts +3 -4
  4. package/card/index.d.ts +68 -29
  5. package/circle-status/index.d.ts +2 -1
  6. package/common/index.d.ts +11 -0
  7. package/dashboard/index.d.ts +6 -1
  8. package/datepicker/index.d.ts +32 -32
  9. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  10. package/fesm2022/siemens-element-ng-avatar.mjs +32 -36
  11. package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
  12. package/fesm2022/siemens-element-ng-breadcrumb.mjs +2 -2
  13. package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
  14. package/fesm2022/siemens-element-ng-card.mjs +103 -37
  15. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  16. package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +2 -2
  18. package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-common.mjs +6 -0
  20. package/fesm2022/siemens-element-ng-common.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-connection-strength.mjs +2 -2
  22. package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
  24. package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
  25. package/fesm2022/siemens-element-ng-dashboard.mjs +34 -35
  26. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-datatable.mjs +5 -0
  28. package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
  29. package/fesm2022/siemens-element-ng-date-range-filter.mjs +1 -1
  30. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-datepicker.mjs +176 -142
  32. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-file-uploader.mjs +9 -2
  34. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  35. package/fesm2022/siemens-element-ng-filter-bar.mjs +5 -5
  36. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
  37. package/fesm2022/siemens-element-ng-filtered-search.mjs +34 -13
  38. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  39. package/fesm2022/siemens-element-ng-form.mjs +7 -1
  40. package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
  41. package/fesm2022/siemens-element-ng-formly.mjs +18 -18
  42. package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
  43. package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
  44. package/fesm2022/siemens-element-ng-ip-input.mjs +38 -0
  45. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
  46. package/fesm2022/siemens-element-ng-language-switcher.mjs +1 -1
  47. package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
  48. package/fesm2022/siemens-element-ng-list-details.mjs +9 -4
  49. package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
  50. package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
  51. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +16 -3
  52. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  53. package/fesm2022/siemens-element-ng-notification-item.mjs +71 -0
  54. package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -0
  55. package/fesm2022/siemens-element-ng-pagination.mjs +2 -2
  56. package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
  57. package/fesm2022/siemens-element-ng-photo-upload.mjs +1 -1
  58. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
  59. package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
  60. package/fesm2022/siemens-element-ng-resize-observer.mjs +0 -1
  61. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
  62. package/fesm2022/siemens-element-ng-result-details-list.mjs +5 -0
  63. package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
  64. package/fesm2022/siemens-element-ng-search-bar.mjs +14 -4
  65. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
  66. package/fesm2022/siemens-element-ng-side-panel.mjs +2 -2
  67. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  68. package/fesm2022/siemens-element-ng-sort-bar.mjs.map +1 -1
  69. package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
  70. package/fesm2022/siemens-element-ng-status-bar.mjs +2 -2
  71. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  72. package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -2
  73. package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
  74. package/fesm2022/siemens-element-ng-tabs.mjs +45 -12
  75. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
  76. package/fesm2022/siemens-element-ng-tooltip.mjs +5 -6
  77. package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
  78. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  79. package/fesm2022/siemens-element-ng-tree-view.mjs +4 -4
  80. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  81. package/fesm2022/siemens-element-ng-typeahead.mjs +329 -257
  82. package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
  83. package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
  84. package/file-uploader/index.d.ts +3 -1
  85. package/filter-bar/index.d.ts +13 -5
  86. package/form/index.d.ts +28 -29
  87. package/inline-notification/index.d.ts +3 -2
  88. package/ip-input/index.d.ts +42 -4
  89. package/landing-page/index.d.ts +3 -2
  90. package/language-switcher/index.d.ts +3 -1
  91. package/list-details/index.d.ts +2 -0
  92. package/main-detail-container/index.d.ts +4 -4
  93. package/navbar/index.d.ts +1 -1
  94. package/notification-item/index.d.ts +141 -0
  95. package/notification-item/package.json +3 -0
  96. package/package.json +19 -11
  97. package/progressbar/index.d.ts +3 -3
  98. package/result-details-list/index.d.ts +4 -2
  99. package/schematics/collection.json +28 -0
  100. package/schematics/ng-add/index.js +16 -0
  101. package/schematics/ng-add/schema.json +16 -0
  102. package/schematics/scss-import-to-siemens-migration/index.js +101 -0
  103. package/schematics/scss-import-to-siemens-migration/schema.json +16 -0
  104. package/schematics/scss-import-to-siemens-migration/style-mappings.js +46 -0
  105. package/schematics/simpl-siemens-migration/index.js +17 -0
  106. package/schematics/simpl-siemens-migration/schema.json +16 -0
  107. package/schematics/ts-import-to-siemens-migration/index.js +118 -0
  108. package/schematics/ts-import-to-siemens-migration/mappings/charts-ng-mappings.js +70 -0
  109. package/schematics/ts-import-to-siemens-migration/mappings/dashboards-ng-mappings.js +52 -0
  110. package/schematics/ts-import-to-siemens-migration/mappings/element-ng-mappings.js +651 -0
  111. package/schematics/ts-import-to-siemens-migration/mappings/element-translate-ng-mappings.js +21 -0
  112. package/schematics/ts-import-to-siemens-migration/mappings/index.js +9 -0
  113. package/schematics/ts-import-to-siemens-migration/mappings/maps-ng-mappings.js +46 -0
  114. package/schematics/ts-import-to-siemens-migration/model.js +4 -0
  115. package/schematics/ts-import-to-siemens-migration/schema.json +16 -0
  116. package/schematics/utils/index.js +8 -0
  117. package/schematics/utils/project-utils.js +75 -0
  118. package/schematics/utils/schematics-file-system.js +22 -0
  119. package/schematics/utils/testing.js +41 -0
  120. package/schematics/utils/ts-utils.js +99 -0
  121. package/search-bar/index.d.ts +11 -1
  122. package/select/index.d.ts +7 -5
  123. package/sort-bar/index.d.ts +3 -3
  124. package/split/index.d.ts +3 -2
  125. package/status-bar/index.d.ts +3 -2
  126. package/tabs/index.d.ts +15 -1
  127. package/template-i18n.json +8 -0
  128. package/tooltip/index.d.ts +1 -1
  129. package/translate/index.d.ts +8 -0
  130. package/tree-view/index.d.ts +4 -4
  131. package/typeahead/index.d.ts +85 -4
  132. package/wizard/index.d.ts +2 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, signal, Directive, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, numberAttribute, booleanAttribute, signal, Directive, inject, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { NgClass } from '@angular/common';
4
4
  import { STATUS_ICON_CONFIG, SiIconComponent } from '@siemens/element-ng/icon';
5
5
 
@@ -117,46 +117,42 @@ class SiAvatarComponent {
117
117
  const status = this.status();
118
118
  return status ? this.statusIcons[status] : undefined;
119
119
  });
120
- displayInitials;
121
- autoBackgroundColorDirective = inject(SiAvatarBackgroundColorDirective);
122
- ngOnChanges(changes) {
123
- if (changes.initials || changes.altText) {
124
- this.setInitials();
125
- this.autoBackgroundColorDirective.calculateColorFromInitials(this.displayInitials);
126
- }
127
- }
128
- setInitials() {
120
+ displayInitials = computed(() => {
129
121
  const initials = this.initials();
130
122
  if (initials) {
131
- this.displayInitials = initials;
123
+ return initials;
124
+ }
125
+ const name = this.altText()
126
+ .replaceAll(/\([^)]*\)/g, '')
127
+ .trim();
128
+ const byComma = name.split(/,\s*/);
129
+ let first;
130
+ let last;
131
+ if (byComma.length > 1) {
132
+ last = byComma[0];
133
+ first = byComma[1];
132
134
  }
133
135
  else {
134
- const name = this.altText()
135
- .replaceAll(/\([^)]*\)/g, '')
136
- .trim();
137
- const byComma = name.split(/,\s*/);
138
- let first;
139
- let last;
140
- if (byComma.length > 1) {
141
- last = byComma[0];
142
- first = byComma[1];
143
- }
144
- else {
145
- const parts = name.split(' ');
146
- first = parts.shift() ?? '';
147
- last = parts.pop() ?? '';
148
- }
149
- if (first) {
150
- first = first[0].toLocaleUpperCase();
151
- }
152
- if (last) {
153
- last = last[0].toLocaleUpperCase();
154
- }
155
- this.displayInitials = first + last;
136
+ const parts = name.split(' ');
137
+ first = parts.shift() ?? '';
138
+ last = parts.pop() ?? '';
156
139
  }
140
+ if (first) {
141
+ first = first[0].toLocaleUpperCase();
142
+ }
143
+ if (last) {
144
+ last = last[0].toLocaleUpperCase();
145
+ }
146
+ return first + last;
147
+ });
148
+ autoBackgroundColorDirective = inject(SiAvatarBackgroundColorDirective);
149
+ constructor() {
150
+ effect(() => {
151
+ this.autoBackgroundColorDirective.calculateColorFromInitials(this.displayInitials());
152
+ });
157
153
  }
158
154
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiAvatarComponent, isStandalone: true, selector: "si-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, altText: { classPropertyName: "altText", publicName: "altText", isSignal: true, isRequired: true, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusAriaLabel: { classPropertyName: "statusAriaLabel", publicName: "statusAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "size()" } }, usesOnChanges: true, hostDirectives: [{ directive: SiAvatarBackgroundColorDirective, inputs: ["color", "color", "autoColor", "autoColor"] }], ngImport: i0, template: "@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n", styles: [":host{--avatar-size: 40px;--indicator-size: 24px;--background: var(--element-base-0);--indicator-offset-x: -12px;--indicator-offset-y: -8px;flex:0 0 auto;display:inline-flex;vertical-align:middle;color:var(--element-text-inverse);position:relative;align-items:center;justify-content:center;inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%;background:var(--background)}:host.tiny,:host.xsmall,:host.small{--initials-size: .875rem;--indicator-size: 16px;--indicator-offset-x: -8px;--indicator-offset-y: -4px}:host.tiny{--avatar-size: 24px}:host.xsmall{--avatar-size: 28px}:host.small{--avatar-size: 32px}:host.large{--avatar-size: 56px}:host.xlarge{--avatar-size: 80px}.initials{font-weight:600;font-size:var(--initials-size, 1.125rem);line-height:1}img{inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%}.indicator{position:absolute;inset-block-start:var(--indicator-offset-y);inset-inline-end:var(--indicator-offset-x);font-size:var(--indicator-size)}.indicator .drop-shadow ::ng-deep svg{filter:drop-shadow(1px 0 0 var(--element-base-1)) drop-shadow(-1px 0 0 var(--element-base-1)) drop-shadow(0 1px 0 var(--element-base-1)) drop-shadow(0 -1px 0 var(--element-base-1))}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
155
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiAvatarComponent, isStandalone: true, selector: "si-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, altText: { classPropertyName: "altText", publicName: "altText", isSignal: true, isRequired: true, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusAriaLabel: { classPropertyName: "statusAriaLabel", publicName: "statusAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "size()" } }, hostDirectives: [{ directive: SiAvatarBackgroundColorDirective, inputs: ["color", "color", "autoColor", "autoColor"] }], ngImport: i0, template: "@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials() }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n", styles: [":host{--avatar-size: 40px;--indicator-size: 24px;--background: var(--element-base-0);--indicator-offset-x: -12px;--indicator-offset-y: -8px;flex:0 0 auto;display:inline-flex;vertical-align:middle;color:var(--element-text-inverse);position:relative;align-items:center;justify-content:center;inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%;background:var(--background)}:host.tiny,:host.xsmall,:host.small{--initials-size: .875rem;--indicator-size: 16px;--indicator-offset-x: -8px;--indicator-offset-y: -4px}:host.tiny{--avatar-size: 24px}:host.xsmall{--avatar-size: 28px}:host.small{--avatar-size: 32px}:host.large{--avatar-size: 56px}:host.xlarge{--avatar-size: 80px}.initials{font-weight:600;font-size:var(--initials-size, 1.125rem);line-height:1}img{inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%}.indicator{position:absolute;inset-block-start:var(--indicator-offset-y);inset-inline-end:var(--indicator-offset-x);font-size:var(--indicator-size)}.indicator .drop-shadow ::ng-deep svg{filter:drop-shadow(1px 0 0 var(--element-base-1)) drop-shadow(-1px 0 0 var(--element-base-1)) drop-shadow(0 1px 0 var(--element-base-1)) drop-shadow(0 -1px 0 var(--element-base-1))}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
160
156
  }
161
157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiAvatarComponent, decorators: [{
162
158
  type: Component,
@@ -167,8 +163,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
167
163
  directive: SiAvatarBackgroundColorDirective,
168
164
  inputs: ['color', 'autoColor']
169
165
  }
170
- ], template: "@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n", styles: [":host{--avatar-size: 40px;--indicator-size: 24px;--background: var(--element-base-0);--indicator-offset-x: -12px;--indicator-offset-y: -8px;flex:0 0 auto;display:inline-flex;vertical-align:middle;color:var(--element-text-inverse);position:relative;align-items:center;justify-content:center;inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%;background:var(--background)}:host.tiny,:host.xsmall,:host.small{--initials-size: .875rem;--indicator-size: 16px;--indicator-offset-x: -8px;--indicator-offset-y: -4px}:host.tiny{--avatar-size: 24px}:host.xsmall{--avatar-size: 28px}:host.small{--avatar-size: 32px}:host.large{--avatar-size: 56px}:host.xlarge{--avatar-size: 80px}.initials{font-weight:600;font-size:var(--initials-size, 1.125rem);line-height:1}img{inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%}.indicator{position:absolute;inset-block-start:var(--indicator-offset-y);inset-inline-end:var(--indicator-offset-x);font-size:var(--indicator-size)}.indicator .drop-shadow ::ng-deep svg{filter:drop-shadow(1px 0 0 var(--element-base-1)) drop-shadow(-1px 0 0 var(--element-base-1)) drop-shadow(0 1px 0 var(--element-base-1)) drop-shadow(0 -1px 0 var(--element-base-1))}\n"] }]
171
- }] });
166
+ ], template: "@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials() }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n", styles: [":host{--avatar-size: 40px;--indicator-size: 24px;--background: var(--element-base-0);--indicator-offset-x: -12px;--indicator-offset-y: -8px;flex:0 0 auto;display:inline-flex;vertical-align:middle;color:var(--element-text-inverse);position:relative;align-items:center;justify-content:center;inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%;background:var(--background)}:host.tiny,:host.xsmall,:host.small{--initials-size: .875rem;--indicator-size: 16px;--indicator-offset-x: -8px;--indicator-offset-y: -4px}:host.tiny{--avatar-size: 24px}:host.xsmall{--avatar-size: 28px}:host.small{--avatar-size: 32px}:host.large{--avatar-size: 56px}:host.xlarge{--avatar-size: 80px}.initials{font-weight:600;font-size:var(--initials-size, 1.125rem);line-height:1}img{inline-size:var(--avatar-size);block-size:var(--avatar-size);border-radius:50%}.indicator{position:absolute;inset-block-start:var(--indicator-offset-y);inset-inline-end:var(--indicator-offset-x);font-size:var(--indicator-size)}.indicator .drop-shadow ::ng-deep svg{filter:drop-shadow(1px 0 0 var(--element-base-1)) drop-shadow(-1px 0 0 var(--element-base-1)) drop-shadow(0 1px 0 var(--element-base-1)) drop-shadow(0 -1px 0 var(--element-base-1))}\n"] }]
167
+ }], ctorParameters: () => [] });
172
168
 
173
169
  /**
174
170
  * Copyright (c) Siemens 2016 - 2025
@@ -1 +1 @@
1
- {"version":3,"file":"siemens-element-ng-avatar.mjs","sources":["../../../../projects/element-ng/avatar/si-avatar-background-color.directive.ts","../../../../projects/element-ng/avatar/si-avatar.component.ts","../../../../projects/element-ng/avatar/si-avatar.component.html","../../../../projects/element-ng/avatar/index.ts","../../../../projects/element-ng/avatar/siemens-element-ng-avatar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnChanges,\n signal,\n SimpleChanges\n} from '@angular/core';\n\nconst DATA_COLORS_MAX = 17;\nconst DATA_COLOR_NEUTRAL = 17;\nconst ASCII_CODE_INDEX_A = 64;\n\n/**\n * The directive provide a CSS variable --background with a color based on the initials or alt text.\n */\n@Directive({\n selector: '[siAvatarBackgroundColor]',\n host: {\n '[style.--background]': 'backgroundStyle()'\n }\n})\nexport class SiAvatarBackgroundColorDirective implements OnChanges {\n /**\n * The desired color index from $element-data-* color tokens. This can be set to any kind of\n * positive integer that is then mapped to a color index.\n * A better way to set a pseudo-random color is to set {@link autoColor} to `true`.\n *\n * @defaultValue undefined\n */\n readonly color = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * Automatically calculates the background color.\n * If set, {@link color} will be ignored.\n *\n * @defaultValue false\n */\n readonly autoColor = input(false, { transform: booleanAttribute });\n\n protected readonly backgroundStyle = signal<string | undefined>('var(--element-data-17)');\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.color) {\n this.setColor(this.color());\n }\n }\n\n /**\n * Update background color variable based on the initials or placeholder text.\n */\n public calculateColorFromInitials(displayInitials?: string): void {\n if (!this.autoColor() || !displayInitials) {\n return;\n }\n\n let color = 0;\n for (let i = 0; i < displayInitials.length; i++) {\n color *= 17; // this prevents 'JD' to have the same color as 'DJ'\n color += displayInitials.charCodeAt(i) - ASCII_CODE_INDEX_A;\n }\n this.setColor(color);\n }\n\n private setColor(color?: number): void {\n if (this.color() === 0) {\n this.backgroundStyle.set(undefined);\n } else {\n const actualColor = color ?? DATA_COLOR_NEUTRAL;\n const colorIndex = ((actualColor - 1) % DATA_COLORS_MAX) + 1;\n this.backgroundStyle.set(`var(--element-data-${colorIndex})`);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n numberAttribute,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { EntityStatusType } from '@siemens/element-ng/common';\nimport { SiIconComponent, STATUS_ICON_CONFIG } from '@siemens/element-ng/icon';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\nimport { SiAvatarBackgroundColorDirective } from './si-avatar-background-color.directive';\n\nexport type AvatarSize = 'tiny' | 'xsmall' | 'small' | 'regular' | 'large' | 'xlarge';\n\n@Component({\n selector: 'si-avatar',\n imports: [NgClass, SiIconComponent],\n templateUrl: './si-avatar.component.html',\n styleUrl: './si-avatar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'size()'\n },\n hostDirectives: [\n {\n directive: SiAvatarBackgroundColorDirective,\n inputs: ['color', 'autoColor']\n }\n ]\n})\nexport class SiAvatarComponent implements OnChanges {\n private readonly statusIcons = inject(STATUS_ICON_CONFIG);\n /**\n * Size of the component.\n *\n * @defaultValue 'regular'\n */\n readonly size = input<AvatarSize>('regular');\n /** Image src URL when using an image. */\n readonly imageUrl = input<string>();\n /** Icon name when using an icon. */\n readonly icon = input<string>();\n /**\n * Initials to be displayed as default avatar if no `icon` or `imageUrl` are provided.\n * If also no initials are provided, they will be automatically calculated from the `altText`.\n * The value will be used to calculate the background color when `autoColor` is true.\n */\n readonly initials = input<string>();\n /**\n * The desired color index from $element-data-* color tokens. This can be set to any kind of\n * positive integer that is then mapped to a color index.\n * A better way to set a pseudo-random color is to set * {@link autoColor} to `true`.\n *\n * @defaultValue undefined\n */\n readonly color = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n /** The `alt` text for image, `title` for other modes. */\n readonly altText = input.required<string>();\n /**\n * The status (success, info, warning, caution, danger, critical, pending, progress) to be\n * visualized.\n */\n readonly status = input<EntityStatusType>();\n /**\n * aria-label for status\n */\n readonly statusAriaLabel = input<TranslatableString>();\n\n protected readonly statusIcon = computed(() => {\n const status = this.status();\n return status ? this.statusIcons[status] : undefined;\n });\n protected displayInitials?: string;\n private readonly autoBackgroundColorDirective = inject(SiAvatarBackgroundColorDirective);\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.initials || changes.altText) {\n this.setInitials();\n this.autoBackgroundColorDirective.calculateColorFromInitials(this.displayInitials);\n }\n }\n\n private setInitials(): void {\n const initials = this.initials();\n if (initials) {\n this.displayInitials = initials;\n } else {\n const name = this.altText()\n .replaceAll(/\\([^)]*\\)/g, '')\n .trim();\n const byComma = name.split(/,\\s*/);\n let first: string;\n let last: string;\n if (byComma.length > 1) {\n last = byComma[0];\n first = byComma[1];\n } else {\n const parts = name.split(' ');\n first = parts.shift() ?? '';\n last = parts.pop() ?? '';\n }\n if (first) {\n first = first[0].toLocaleUpperCase();\n }\n if (last) {\n last = last[0].toLocaleUpperCase();\n }\n this.displayInitials = first + last;\n }\n }\n}\n","@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-avatar-background-color.directive';\nexport * from './si-avatar.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SiAvatarBackgroundColorDirective"],"mappings":";;;;;AAAA;;;AAGG;AAWH,MAAM,eAAe,GAAG,EAAE;AAC1B,MAAM,kBAAkB,GAAG,EAAE;AAC7B,MAAM,kBAAkB,GAAG,EAAE;AAE7B;;AAEG;MAOU,gCAAgC,CAAA;AAC3C;;;;;;AAMG;IACM,KAAK,GAAG,KAAK,CAA8B,SAAS,EAAE,EAAE,SAAS,EAAE,eA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AAC3C,4BAAA,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW;AAC9B;AACF,qBAAA,EAAA,QAAA,EAAA,opBAAA,EAAA,MAAA,EAAA,CAAA,gtCAAA,CAAA,EAAA;;;AErCH;;;AAGG;;ACHH;;AAEG;;;;"}
1
+ {"version":3,"file":"siemens-element-ng-avatar.mjs","sources":["../../../../projects/element-ng/avatar/si-avatar-background-color.directive.ts","../../../../projects/element-ng/avatar/si-avatar.component.ts","../../../../projects/element-ng/avatar/si-avatar.component.html","../../../../projects/element-ng/avatar/index.ts","../../../../projects/element-ng/avatar/siemens-element-ng-avatar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnChanges,\n signal,\n SimpleChanges\n} from '@angular/core';\n\nconst DATA_COLORS_MAX = 17;\nconst DATA_COLOR_NEUTRAL = 17;\nconst ASCII_CODE_INDEX_A = 64;\n\n/**\n * The directive provide a CSS variable --background with a color based on the initials or alt text.\n */\n@Directive({\n selector: '[siAvatarBackgroundColor]',\n host: {\n '[style.--background]': 'backgroundStyle()'\n }\n})\nexport class SiAvatarBackgroundColorDirective implements OnChanges {\n /**\n * The desired color index from $element-data-* color tokens. This can be set to any kind of\n * positive integer that is then mapped to a color index.\n * A better way to set a pseudo-random color is to set {@link autoColor} to `true`.\n *\n * @defaultValue undefined\n */\n readonly color = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * Automatically calculates the background color.\n * If set, {@link color} will be ignored.\n *\n * @defaultValue false\n */\n readonly autoColor = input(false, { transform: booleanAttribute });\n\n protected readonly backgroundStyle = signal<string | undefined>('var(--element-data-17)');\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.color) {\n this.setColor(this.color());\n }\n }\n\n /**\n * Update background color variable based on the initials or placeholder text.\n */\n public calculateColorFromInitials(displayInitials?: string): void {\n if (!this.autoColor() || !displayInitials) {\n return;\n }\n\n let color = 0;\n for (let i = 0; i < displayInitials.length; i++) {\n color *= 17; // this prevents 'JD' to have the same color as 'DJ'\n color += displayInitials.charCodeAt(i) - ASCII_CODE_INDEX_A;\n }\n this.setColor(color);\n }\n\n private setColor(color?: number): void {\n if (this.color() === 0) {\n this.backgroundStyle.set(undefined);\n } else {\n const actualColor = color ?? DATA_COLOR_NEUTRAL;\n const colorIndex = ((actualColor - 1) % DATA_COLORS_MAX) + 1;\n this.backgroundStyle.set(`var(--element-data-${colorIndex})`);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n numberAttribute\n} from '@angular/core';\nimport { EntityStatusType } from '@siemens/element-ng/common';\nimport { SiIconComponent, STATUS_ICON_CONFIG } from '@siemens/element-ng/icon';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\nimport { SiAvatarBackgroundColorDirective } from './si-avatar-background-color.directive';\n\nexport type AvatarSize = 'tiny' | 'xsmall' | 'small' | 'regular' | 'large' | 'xlarge';\n\n@Component({\n selector: 'si-avatar',\n imports: [NgClass, SiIconComponent],\n templateUrl: './si-avatar.component.html',\n styleUrl: './si-avatar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'size()'\n },\n hostDirectives: [\n {\n directive: SiAvatarBackgroundColorDirective,\n inputs: ['color', 'autoColor']\n }\n ]\n})\nexport class SiAvatarComponent {\n private readonly statusIcons = inject(STATUS_ICON_CONFIG);\n /**\n * Size of the component.\n *\n * @defaultValue 'regular'\n */\n readonly size = input<AvatarSize>('regular');\n /** Image src URL when using an image. */\n readonly imageUrl = input<string>();\n /** Icon name when using an icon. */\n readonly icon = input<string>();\n /**\n * Initials to be displayed as default avatar if no `icon` or `imageUrl` are provided.\n * If also no initials are provided, they will be automatically calculated from the `altText`.\n * The value will be used to calculate the background color when `autoColor` is true.\n */\n readonly initials = input<string>();\n /**\n * The desired color index from $element-data-* color tokens. This can be set to any kind of\n * positive integer that is then mapped to a color index.\n * A better way to set a pseudo-random color is to set * {@link autoColor} to `true`.\n *\n * @defaultValue undefined\n */\n readonly color = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n /** The `alt` text for image, `title` for other modes. */\n readonly altText = input.required<string>();\n /**\n * The status (success, info, warning, caution, danger, critical, pending, progress) to be\n * visualized.\n */\n readonly status = input<EntityStatusType>();\n /**\n * aria-label for status\n */\n readonly statusAriaLabel = input<TranslatableString>();\n\n protected readonly statusIcon = computed(() => {\n const status = this.status();\n return status ? this.statusIcons[status] : undefined;\n });\n\n protected readonly displayInitials = computed(() => {\n const initials = this.initials();\n if (initials) {\n return initials;\n }\n\n const name = this.altText()\n .replaceAll(/\\([^)]*\\)/g, '')\n .trim();\n const byComma = name.split(/,\\s*/);\n let first: string;\n let last: string;\n if (byComma.length > 1) {\n last = byComma[0];\n first = byComma[1];\n } else {\n const parts = name.split(' ');\n first = parts.shift() ?? '';\n last = parts.pop() ?? '';\n }\n if (first) {\n first = first[0].toLocaleUpperCase();\n }\n if (last) {\n last = last[0].toLocaleUpperCase();\n }\n return first + last;\n });\n\n private readonly autoBackgroundColorDirective = inject(SiAvatarBackgroundColorDirective);\n\n constructor() {\n effect(() => {\n this.autoBackgroundColorDirective.calculateColorFromInitials(this.displayInitials());\n });\n }\n}\n","@if (imageUrl()) {\n <img [src]=\"imageUrl()\" [alt]=\"altText()\" />\n} @else if (icon()) {\n <i class=\"icon\" [title]=\"altText()\" [ngClass]=\"icon()\"></i>\n} @else {\n <div\n class=\"initials\"\n [class.text-body]=\"color() === 0\"\n [title]=\"altText()\"\n [attr.aria-label]=\"altText()\"\n >{{ displayInitials() }}</div\n >\n}\n@let iconConfig = statusIcon();\n@if (iconConfig) {\n <span class=\"indicator-size indicator icon-stack\">\n <si-icon class=\"drop-shadow\" [ngClass]=\"iconConfig.color\" [icon]=\"iconConfig.icon\" />\n <si-icon [ngClass]=\"iconConfig.stackedColor\" [icon]=\"iconConfig.stacked\" />\n </span>\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-avatar-background-color.directive';\nexport * from './si-avatar.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.SiAvatarBackgroundColorDirective"],"mappings":";;;;;AAAA;;;AAGG;AAWH,MAAM,eAAe,GAAG,EAAE;AAC1B,MAAM,kBAAkB,GAAG,EAAE;AAC7B,MAAM,kBAAkB,GAAG,EAAE;AAE7B;;AAEG;MAOU,gCAAgC,CAAA;AAC3C;;;;;;AAMG;IACM,KAAK,GAAG,KAAK,CAA8B,SAAS,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAE9F;;;;;AAKG;IACM,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAE/C,IAAA,eAAe,GAAG,MAAM,CAAqB,wBAAwB,CAAC;AAEzF,IAAA,WAAW,CAAC,OAAsB,EAAA;AAChC,QAAA,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;;;AAI/B;;AAEG;AACI,IAAA,0BAA0B,CAAC,eAAwB,EAAA;QACxD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE;YACzC;;QAGF,IAAI,KAAK,GAAG,CAAC;AACb,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,YAAA,KAAK,IAAI,EAAE,CAAC;YACZ,KAAK,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,kBAAkB;;AAE7D,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;;AAGd,IAAA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,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAcvB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,OAAO,EAAE,eAAe,CAAC,EAAA,eAAA,EAGlB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,SAAS,EAAE;qBACZ,EAAA,cAAA,EACe;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,gCAAgC;AAC3C,4BAAA,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW;AAC9B;AACF,qBAAA,EAAA,QAAA,EAAA,spBAAA,EAAA,MAAA,EAAA,CAAA,gtCAAA,CAAA,EAAA;;;AEpCH;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -254,7 +254,7 @@ class SiBreadcrumbComponent {
254
254
  this.changeDetector.detectChanges();
255
255
  }
256
256
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
257
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiBreadcrumbComponent, isStandalone: true, selector: "si-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, showRootAsText: { classPropertyName: "showRootAsText", publicName: "showRootAsText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "documentClick($event.target)" } }, viewQueries: [{ propertyName: "breadcrumbElement", first: true, predicate: ["breadcrumb"], descendants: true, isSignal: true }, { propertyName: "breadcrumbElements", predicate: ["breadcrumbItem"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n }\n @if (!item.shortened) {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n }\n @if (item.level !== 0) {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n", styles: [".breadcrumb{flex-wrap:nowrap}.dropdown-menu.show>.dropdown-item{background-color:var(--element-base-1)}.item{display:flex;align-items:center}.separator{font-size:1.5rem;color:var(--element-ui-2);margin-block:-.25rem;margin-inline:0}.breadcrumb-dropdown-toggle{cursor:pointer}.dropdown-item.active,.dropdown-item:active{background-color:var(--element-base-1)}.dropdown-item:hover,.dropdown-item:focus{background-color:var(--element-base-0)!important;text-decoration:underline}.disable-router-link,.disable-router-link:hover{pointer-events:none;color:var(--element-text-disabled)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "directive", type: SiResizeObserverDirective, selector: "[siResizeObserver]", inputs: ["resizeThrottle", "emitInitial"], outputs: ["siResizeObserver"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }, { kind: "directive", type: SiBreadcrumbItemTemplateDirective, selector: "[siBreadcrumbItemTemplate]" }] });
257
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SiBreadcrumbComponent, isStandalone: true, selector: "si-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, showRootAsText: { classPropertyName: "showRootAsText", publicName: "showRootAsText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "documentClick($event.target)" } }, viewQueries: [{ propertyName: "breadcrumbElement", first: true, predicate: ["breadcrumb"], descendants: true, isSignal: true }, { propertyName: "breadcrumbElements", predicate: ["breadcrumbItem"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n } @else {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n } @else {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n", styles: [".breadcrumb{flex-wrap:nowrap}.dropdown-menu.show>.dropdown-item{background-color:var(--element-base-1)}.item{display:flex;align-items:center}.separator{font-size:1.5rem;color:var(--element-ui-2);margin-block:-.25rem;margin-inline:0}.breadcrumb-dropdown-toggle{cursor:pointer}.dropdown-item.active,.dropdown-item:active{background-color:var(--element-base-1)}.dropdown-item:hover,.dropdown-item:focus{background-color:var(--element-base-0)!important;text-decoration:underline}.disable-router-link,.disable-router-link:hover{pointer-events:none;color:var(--element-text-disabled)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: SiLinkDirective, selector: "[siLink]", inputs: ["siLink", "siLinkDefaultTarget", "actionParam", "activeClass", "exactMatch", "ariaCurrent"], outputs: ["activeChange"], exportAs: ["siLink"] }, { kind: "directive", type: SiResizeObserverDirective, selector: "[siResizeObserver]", inputs: ["resizeThrottle", "emitInitial"], outputs: ["siResizeObserver"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }, { kind: "directive", type: SiBreadcrumbItemTemplateDirective, selector: "[siBreadcrumbItemTemplate]" }] });
258
258
  }
259
259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SiBreadcrumbComponent, decorators: [{
260
260
  type: Component,
@@ -265,7 +265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
265
265
  SiResizeObserverDirective,
266
266
  SiTranslatePipe,
267
267
  SiBreadcrumbItemTemplateDirective
268
- ], template: "<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n }\n @if (!item.shortened) {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n }\n @if (item.level !== 0) {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n", styles: [".breadcrumb{flex-wrap:nowrap}.dropdown-menu.show>.dropdown-item{background-color:var(--element-base-1)}.item{display:flex;align-items:center}.separator{font-size:1.5rem;color:var(--element-ui-2);margin-block:-.25rem;margin-inline:0}.breadcrumb-dropdown-toggle{cursor:pointer}.dropdown-item.active,.dropdown-item:active{background-color:var(--element-base-1)}.dropdown-item:hover,.dropdown-item:focus{background-color:var(--element-base-0)!important;text-decoration:underline}.disable-router-link,.disable-router-link:hover{pointer-events:none;color:var(--element-text-disabled)}\n"] }]
268
+ ], template: "<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n } @else {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n } @else {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n", styles: [".breadcrumb{flex-wrap:nowrap}.dropdown-menu.show>.dropdown-item{background-color:var(--element-base-1)}.item{display:flex;align-items:center}.separator{font-size:1.5rem;color:var(--element-ui-2);margin-block:-.25rem;margin-inline:0}.breadcrumb-dropdown-toggle{cursor:pointer}.dropdown-item.active,.dropdown-item:active{background-color:var(--element-base-1)}.dropdown-item:hover,.dropdown-item:focus{background-color:var(--element-base-0)!important;text-decoration:underline}.disable-router-link,.disable-router-link:hover{pointer-events:none;color:var(--element-text-disabled)}\n"] }]
269
269
  }], propDecorators: { documentClick: [{
270
270
  type: HostListener,
271
271
  args: ['document:click', ['$event.target']]
@@ -1 +1 @@
1
- {"version":3,"file":"siemens-element-ng-breadcrumb.mjs","sources":["../../../../projects/element-ng/breadcrumb/si-breadcrumb-item-template.directive.ts","../../../../projects/element-ng/breadcrumb/si-breadcrumb.component.ts","../../../../projects/element-ng/breadcrumb/si-breadcrumb.component.html","../../../../projects/element-ng/breadcrumb/si-breadcrumb.module.ts","../../../../projects/element-ng/breadcrumb/index.ts","../../../../projects/element-ng/breadcrumb/siemens-element-ng-breadcrumb.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { EnumeratedBreadcrumbItem } from './breadcrumb-item.model';\n\n@Directive({ selector: '[siBreadcrumbItemTemplate]' })\nexport class SiBreadcrumbItemTemplateDirective {\n static ngTemplateContextGuard(\n directive: SiBreadcrumbItemTemplateDirective,\n context: unknown\n ): context is { item: EnumeratedBreadcrumbItem; title?: string } {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostListener,\n inject,\n input,\n OnChanges,\n OnDestroy,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport {\n addIcons,\n elementBreadcrumbRoot,\n elementRight2,\n SiIconComponent\n} from '@siemens/element-ng/icon';\nimport { SiLinkDirective } from '@siemens/element-ng/link';\nimport { SiResizeObserverDirective } from '@siemens/element-ng/resize-observer';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@siemens/element-translate-ng/translate';\nimport { merge, of, Subscription } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { BreadcrumbItem, EnumeratedBreadcrumbItem } from './breadcrumb-item.model';\nimport { SiBreadcrumbItemTemplateDirective } from './si-breadcrumb-item-template.directive';\n\n/**\n * Defines how many items should be displayed at the end of the breadcrumb if possible.\n */\nconst NUMBER_OF_SHOWN_ITEMS_AT_END = 2;\n\n/**\n * Defines how long a display item can be without it being shortened.\n * Cannot be lower than 4.\n * If this is 0, titles will not be shortened\n */\nconst ITEM_MAX_LENGTH = 30;\n\n/**\n * Defines how many characters of an item are always displayed in the beginning.\n * Must be at least 2 less than ITEM_MAX_LENGTH\n */\nconst ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING = 10;\n\n/**\n * Defines the width of the root icon in pixels.\n */\nconst ROOT_ICON_WIDTH = 24;\n\nlet controlIdCounter = 1;\n\n@Component({\n selector: 'si-breadcrumb',\n imports: [\n NgTemplateOutlet,\n SiIconComponent,\n SiLinkDirective,\n SiResizeObserverDirective,\n SiTranslatePipe,\n SiBreadcrumbItemTemplateDirective\n ],\n templateUrl: './si-breadcrumb.component.html',\n styleUrl: './si-breadcrumb.component.scss'\n})\nexport class SiBreadcrumbComponent implements OnChanges, OnDestroy {\n /** Array of breadcrumb items. */\n readonly items = input.required<BreadcrumbItem[]>();\n /**\n * Shows the \"root\" route as the provided title string instead of an icon.\n *\n * @defaultValue false\n */\n readonly showRootAsText = input(false, { transform: booleanAttribute });\n /**\n * Aria label for the main breadcrumb navigation. Needed for a11y.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_BREADCRUMB:Breadcrumbs`)\n * ```\n */\n readonly ariaLabel = input(t(() => $localize`:@@SI_BREADCRUMB:Breadcrumbs`));\n\n private translationSubscription?: Subscription;\n private itemsProcessed = false;\n private numberOfItems = 0;\n\n protected itemsShown: EnumeratedBreadcrumbItem[] = [];\n protected itemsHidden: EnumeratedBreadcrumbItem[] = [];\n protected breadcrumbShortened = false;\n protected ellipsesLevel = 0;\n // Record to allow for -1 (root).\n protected breadcrumbDropdownOpen: number | undefined = undefined;\n protected addExpandDropdown = false;\n protected controlId = `__si-breadcrumb-${controlIdCounter++}-`;\n protected readonly icons = addIcons({ elementBreadcrumbRoot, elementRight2 });\n\n private readonly breadcrumbElement = viewChild.required<ElementRef>('breadcrumb');\n private readonly breadcrumbElements = viewChildren<ElementRef>('breadcrumbItem');\n\n private changeDetector = inject(ChangeDetectorRef);\n private translate = injectSiTranslateService();\n\n ngOnChanges(): void {\n // Reprocess items on every change and on init\n this.processItems();\n }\n\n ngOnDestroy(): void {\n this.translationSubscription?.unsubscribe();\n }\n\n private processItems(): void {\n this.numberOfItems = this.items().length;\n\n this.translationSubscription?.unsubscribe();\n if (this.numberOfItems) {\n this.translationSubscription = merge(this.translate.translationChange, of(undefined))\n .pipe(switchMap(() => this.translate.translateAsync(this.items().map(item => item.title))))\n .subscribe(translatedTitles => {\n // Add the level to the items and check if they need to be shortened.\n // If they need to be shortened, shorten them at a convenient place.\n // Set the lastItem tag to true for the last item\n let counter = -1;\n const enumeratedItems = this.items().map(item => {\n counter++;\n const title = translatedTitles[item.title];\n let shortened = false;\n let shortenedTitle = title;\n // If this is not the last item and the title too long, shorten the title\n if (counter !== this.numberOfItems - 1 && title && title.length > ITEM_MAX_LENGTH) {\n shortened = true;\n // This regex gets the last space, dash or underscore.\n const regexMatch = title\n .slice(ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING, ITEM_MAX_LENGTH - 2)\n .match(/^.*[- _](?=.*?$)/);\n if (regexMatch) {\n shortenedTitle = title.slice(\n 0,\n ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING + regexMatch[0].length - 1\n );\n } else {\n shortenedTitle = title.slice(0, ITEM_MAX_LENGTH - 3);\n }\n }\n\n // If the root element should be displayed as text, set level not to 0.\n // This is used to distinguish in the template between icon and text.\n const level = counter === 0 && this.showRootAsText() ? -1 : counter;\n\n return {\n ...item,\n title,\n level,\n hide: false,\n shortened,\n shortenedTitle,\n lastItem: counter === this.numberOfItems - 1\n };\n });\n this.itemsShown = enumeratedItems;\n this.itemsHidden = [];\n this.breadcrumbShortened = false;\n this.breadcrumbDropdownOpen = undefined;\n this.itemsProcessed = true;\n this.resetBreadcrumb();\n });\n } else {\n this.itemsShown = [];\n this.itemsHidden = [];\n this.breadcrumbShortened = false;\n this.breadcrumbDropdownOpen = undefined;\n this.itemsProcessed = true;\n this.resetBreadcrumb();\n }\n }\n\n /*\n * Toggle dropdown (on click of ellipses), either for\n * the general dropdown list if itemLevel is at ellipsesLevel\n * or otherwise the name expansion at the specified item level.\n * Close any open dropdown before opening a new one.\n */\n protected toggleBreadcrumbDropdown(itemLevel: number): void {\n this.breadcrumbDropdownOpen = this.breadcrumbDropdownOpen === itemLevel ? undefined : itemLevel;\n }\n\n // Close dropdown on click anywhere else\n @HostListener('document:click', ['$event.target'])\n protected documentClick(targetElement: any): void {\n if (this.breadcrumbDropdownOpen) {\n if (!this.breadcrumbElement().nativeElement.contains(targetElement)) {\n // Close all dropdowns.\n this.breadcrumbDropdownOpen = undefined;\n }\n }\n }\n\n protected resetBreadcrumb(): void {\n if (this.itemsProcessed) {\n this.numberOfItems = this.items().length;\n // Add an additional the ellipses item to the end of the shownItems (breadcrumb items).\n // Disable addExpandDropdown for now, to make every item a proper SiBreadcrumbItemComponent.\n const ellipsesItem = { title: '...', level: this.numberOfItems, shortenedTitle: '' };\n this.itemsShown.push(ellipsesItem);\n if (this.breadcrumbShortened) {\n // If the breadcrumb was shortened before, remove the ellipses and add back itemsHidden (breadcrumb dropdown items).\n this.breadcrumbShortened = false;\n this.itemsShown.splice(this.ellipsesLevel, 1, ...this.itemsHidden);\n this.itemsHidden = [];\n }\n this.addExpandDropdown = false;\n // Wait for the next change detection cycle to measure the updated item length.\n this.changeDetector.detectChanges();\n this.calculateBreadcrumb();\n }\n }\n\n private calculateBreadcrumb(): void {\n this.addExpandDropdown = true;\n const maxWidth = this.breadcrumbElement().nativeElement.clientWidth;\n const breadcrumbElementsList = this.breadcrumbElements().map(item => item);\n // Measure the length of the last additional ellipses item, then remove it from itemsShown (breadcrumb items).\n const ellipsesWidth = breadcrumbElementsList[this.numberOfItems].nativeElement.offsetWidth;\n this.itemsShown.splice(this.numberOfItems, 1);\n let currentWidth = this.showRootAsText() ? 0 : ROOT_ICON_WIDTH;\n const numberOfItemsKeptAtEnd = Math.min(NUMBER_OF_SHOWN_ITEMS_AT_END, this.numberOfItems - 1);\n let reverseCounter = this.numberOfItems;\n // Test for numberOfItemsKeptAtEnd items from the end if they still fit, if not, set breadcrumbShortened to true.\n breadcrumbElementsList\n .slice(this.numberOfItems - numberOfItemsKeptAtEnd, this.numberOfItems)\n .reverse()\n .map(item => {\n if (!this.breadcrumbShortened) {\n const currentItemWidth = item.nativeElement.offsetWidth;\n if (currentWidth + currentItemWidth > maxWidth) {\n this.breadcrumbShortened = true;\n // Test if the ellipses item still fits, if not remove last (actually next in original order) item as well.\n if (currentWidth + ellipsesWidth > maxWidth) {\n reverseCounter++;\n }\n } else {\n currentWidth += currentItemWidth;\n reverseCounter--;\n }\n }\n });\n\n const start = this.showRootAsText() ? 0 : 1;\n let counter = start;\n // If breadcrumbShortened is not true yet, test for the rest of the items from the start\n // Whether they still fit, if not, set breadcrumbShortened to true.\n breadcrumbElementsList.slice(start, this.numberOfItems - numberOfItemsKeptAtEnd).map(item => {\n if (!this.breadcrumbShortened) {\n const currentItemWidth = item.nativeElement.offsetWidth;\n if (currentWidth + currentItemWidth > maxWidth) {\n this.breadcrumbShortened = true;\n // Test if the ellipses item still fits, if not remove last item as well.\n // If the counter is still on 1, instead remove last (actually next in original order) from\n // the previous reverse calculation\n if (currentWidth + ellipsesWidth > maxWidth) {\n if (counter > 1) {\n counter--;\n } else {\n reverseCounter++;\n }\n }\n } else {\n currentWidth += currentItemWidth;\n counter++;\n }\n }\n });\n // If breadcrumbShortened is true, move the items that do not fit to itemsHidden (breadcrumb dropdown items) and add ellipses item.\n if (this.breadcrumbShortened) {\n this.ellipsesLevel = counter;\n this.itemsHidden = this.itemsShown.slice(this.ellipsesLevel, reverseCounter);\n const ellipsesItem = { title: '...', level: this.ellipsesLevel, shortenedTitle: '' };\n this.itemsShown.splice(this.ellipsesLevel, reverseCounter - this.ellipsesLevel, ellipsesItem);\n }\n // Manually detect changes to prevent them from not being detected on language change\n this.changeDetector.detectChanges();\n }\n}\n","<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n }\n @if (!item.shortened) {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n }\n @if (item.level !== 0) {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiBreadcrumbComponent } from './si-breadcrumb.component';\n\n@NgModule({\n imports: [SiBreadcrumbComponent],\n exports: [SiBreadcrumbComponent]\n})\nexport class SiBreadcrumbModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './breadcrumb-item.model';\nexport * from './si-breadcrumb.component';\nexport * from './si-breadcrumb.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;MAMU,iCAAiC,CAAA;AAC5C,IAAA,OAAO,sBAAsB,CAC3B,SAA4C,EAC5C,OAAgB,EAAA;AAEhB,QAAA,OAAO,IAAI;;uGALF,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjC,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjC,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C,SAAS;mBAAC,EAAE,QAAQ,EAAE,4BAA4B,EAAE;;;ACRrD;;;AAGG;AAkCH;;AAEG;AACH,MAAM,4BAA4B,GAAG,CAAC;AAEtC;;;;AAIG;AACH,MAAM,eAAe,GAAG,EAAE;AAE1B;;;AAGG;AAC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,MAAA,EAAA,IAAA,EACzB,eAAe,kDACf,iCAAiC,EAAA,QAAA,EAAA,4BAAA,EAAA,CAAA,EAAA,CAAA;;2FAKxB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,OAAA,EAChB;wBACP,gBAAgB;wBAChB,eAAe;wBACf,eAAe;wBACf,yBAAyB;wBACzB,eAAe;wBACf;AACD,qBAAA,EAAA,QAAA,EAAA,2iIAAA,EAAA,MAAA,EAAA,CAAA,skBAAA,CAAA,EAAA;8BAiIS,aAAa,EAAA,CAAA;sBADtB,YAAY;uBAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC;;;AEvMnD;;;AAGG;MASU,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAlB,kBAAkB,EAAA,OAAA,EAAA,CAHnB,qBAAqB,CAAA,EAAA,OAAA,EAAA,CACrB,qBAAqB,CAAA,EAAA,CAAA;AAEpB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHnB,qBAAqB,CAAA,EAAA,CAAA;;2FAGpB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,OAAO,EAAE,CAAC,qBAAqB;AAChC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
1
+ {"version":3,"file":"siemens-element-ng-breadcrumb.mjs","sources":["../../../../projects/element-ng/breadcrumb/si-breadcrumb-item-template.directive.ts","../../../../projects/element-ng/breadcrumb/si-breadcrumb.component.ts","../../../../projects/element-ng/breadcrumb/si-breadcrumb.component.html","../../../../projects/element-ng/breadcrumb/si-breadcrumb.module.ts","../../../../projects/element-ng/breadcrumb/index.ts","../../../../projects/element-ng/breadcrumb/siemens-element-ng-breadcrumb.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { EnumeratedBreadcrumbItem } from './breadcrumb-item.model';\n\n@Directive({ selector: '[siBreadcrumbItemTemplate]' })\nexport class SiBreadcrumbItemTemplateDirective {\n static ngTemplateContextGuard(\n directive: SiBreadcrumbItemTemplateDirective,\n context: unknown\n ): context is { item: EnumeratedBreadcrumbItem; title?: string } {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostListener,\n inject,\n input,\n OnChanges,\n OnDestroy,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport {\n addIcons,\n elementBreadcrumbRoot,\n elementRight2,\n SiIconComponent\n} from '@siemens/element-ng/icon';\nimport { SiLinkDirective } from '@siemens/element-ng/link';\nimport { SiResizeObserverDirective } from '@siemens/element-ng/resize-observer';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@siemens/element-translate-ng/translate';\nimport { merge, of, Subscription } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { BreadcrumbItem, EnumeratedBreadcrumbItem } from './breadcrumb-item.model';\nimport { SiBreadcrumbItemTemplateDirective } from './si-breadcrumb-item-template.directive';\n\n/**\n * Defines how many items should be displayed at the end of the breadcrumb if possible.\n */\nconst NUMBER_OF_SHOWN_ITEMS_AT_END = 2;\n\n/**\n * Defines how long a display item can be without it being shortened.\n * Cannot be lower than 4.\n * If this is 0, titles will not be shortened\n */\nconst ITEM_MAX_LENGTH = 30;\n\n/**\n * Defines how many characters of an item are always displayed in the beginning.\n * Must be at least 2 less than ITEM_MAX_LENGTH\n */\nconst ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING = 10;\n\n/**\n * Defines the width of the root icon in pixels.\n */\nconst ROOT_ICON_WIDTH = 24;\n\nlet controlIdCounter = 1;\n\n@Component({\n selector: 'si-breadcrumb',\n imports: [\n NgTemplateOutlet,\n SiIconComponent,\n SiLinkDirective,\n SiResizeObserverDirective,\n SiTranslatePipe,\n SiBreadcrumbItemTemplateDirective\n ],\n templateUrl: './si-breadcrumb.component.html',\n styleUrl: './si-breadcrumb.component.scss'\n})\nexport class SiBreadcrumbComponent implements OnChanges, OnDestroy {\n /** Array of breadcrumb items. */\n readonly items = input.required<BreadcrumbItem[]>();\n /**\n * Shows the \"root\" route as the provided title string instead of an icon.\n *\n * @defaultValue false\n */\n readonly showRootAsText = input(false, { transform: booleanAttribute });\n /**\n * Aria label for the main breadcrumb navigation. Needed for a11y.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_BREADCRUMB:Breadcrumbs`)\n * ```\n */\n readonly ariaLabel = input(t(() => $localize`:@@SI_BREADCRUMB:Breadcrumbs`));\n\n private translationSubscription?: Subscription;\n private itemsProcessed = false;\n private numberOfItems = 0;\n\n protected itemsShown: EnumeratedBreadcrumbItem[] = [];\n protected itemsHidden: EnumeratedBreadcrumbItem[] = [];\n protected breadcrumbShortened = false;\n protected ellipsesLevel = 0;\n // Record to allow for -1 (root).\n protected breadcrumbDropdownOpen: number | undefined = undefined;\n protected addExpandDropdown = false;\n protected controlId = `__si-breadcrumb-${controlIdCounter++}-`;\n protected readonly icons = addIcons({ elementBreadcrumbRoot, elementRight2 });\n\n private readonly breadcrumbElement = viewChild.required<ElementRef>('breadcrumb');\n private readonly breadcrumbElements = viewChildren<ElementRef>('breadcrumbItem');\n\n private changeDetector = inject(ChangeDetectorRef);\n private translate = injectSiTranslateService();\n\n ngOnChanges(): void {\n // Reprocess items on every change and on init\n this.processItems();\n }\n\n ngOnDestroy(): void {\n this.translationSubscription?.unsubscribe();\n }\n\n private processItems(): void {\n this.numberOfItems = this.items().length;\n\n this.translationSubscription?.unsubscribe();\n if (this.numberOfItems) {\n this.translationSubscription = merge(this.translate.translationChange, of(undefined))\n .pipe(switchMap(() => this.translate.translateAsync(this.items().map(item => item.title))))\n .subscribe(translatedTitles => {\n // Add the level to the items and check if they need to be shortened.\n // If they need to be shortened, shorten them at a convenient place.\n // Set the lastItem tag to true for the last item\n let counter = -1;\n const enumeratedItems = this.items().map(item => {\n counter++;\n const title = translatedTitles[item.title];\n let shortened = false;\n let shortenedTitle = title;\n // If this is not the last item and the title too long, shorten the title\n if (counter !== this.numberOfItems - 1 && title && title.length > ITEM_MAX_LENGTH) {\n shortened = true;\n // This regex gets the last space, dash or underscore.\n const regexMatch = title\n .slice(ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING, ITEM_MAX_LENGTH - 2)\n .match(/^.*[- _](?=.*?$)/);\n if (regexMatch) {\n shortenedTitle = title.slice(\n 0,\n ITEM_CHARACTERS_ALWAYS_DISPLAYED_IN_BEGINNING + regexMatch[0].length - 1\n );\n } else {\n shortenedTitle = title.slice(0, ITEM_MAX_LENGTH - 3);\n }\n }\n\n // If the root element should be displayed as text, set level not to 0.\n // This is used to distinguish in the template between icon and text.\n const level = counter === 0 && this.showRootAsText() ? -1 : counter;\n\n return {\n ...item,\n title,\n level,\n hide: false,\n shortened,\n shortenedTitle,\n lastItem: counter === this.numberOfItems - 1\n };\n });\n this.itemsShown = enumeratedItems;\n this.itemsHidden = [];\n this.breadcrumbShortened = false;\n this.breadcrumbDropdownOpen = undefined;\n this.itemsProcessed = true;\n this.resetBreadcrumb();\n });\n } else {\n this.itemsShown = [];\n this.itemsHidden = [];\n this.breadcrumbShortened = false;\n this.breadcrumbDropdownOpen = undefined;\n this.itemsProcessed = true;\n this.resetBreadcrumb();\n }\n }\n\n /*\n * Toggle dropdown (on click of ellipses), either for\n * the general dropdown list if itemLevel is at ellipsesLevel\n * or otherwise the name expansion at the specified item level.\n * Close any open dropdown before opening a new one.\n */\n protected toggleBreadcrumbDropdown(itemLevel: number): void {\n this.breadcrumbDropdownOpen = this.breadcrumbDropdownOpen === itemLevel ? undefined : itemLevel;\n }\n\n // Close dropdown on click anywhere else\n @HostListener('document:click', ['$event.target'])\n protected documentClick(targetElement: any): void {\n if (this.breadcrumbDropdownOpen) {\n if (!this.breadcrumbElement().nativeElement.contains(targetElement)) {\n // Close all dropdowns.\n this.breadcrumbDropdownOpen = undefined;\n }\n }\n }\n\n protected resetBreadcrumb(): void {\n if (this.itemsProcessed) {\n this.numberOfItems = this.items().length;\n // Add an additional the ellipses item to the end of the shownItems (breadcrumb items).\n // Disable addExpandDropdown for now, to make every item a proper SiBreadcrumbItemComponent.\n const ellipsesItem = { title: '...', level: this.numberOfItems, shortenedTitle: '' };\n this.itemsShown.push(ellipsesItem);\n if (this.breadcrumbShortened) {\n // If the breadcrumb was shortened before, remove the ellipses and add back itemsHidden (breadcrumb dropdown items).\n this.breadcrumbShortened = false;\n this.itemsShown.splice(this.ellipsesLevel, 1, ...this.itemsHidden);\n this.itemsHidden = [];\n }\n this.addExpandDropdown = false;\n // Wait for the next change detection cycle to measure the updated item length.\n this.changeDetector.detectChanges();\n this.calculateBreadcrumb();\n }\n }\n\n private calculateBreadcrumb(): void {\n this.addExpandDropdown = true;\n const maxWidth = this.breadcrumbElement().nativeElement.clientWidth;\n const breadcrumbElementsList = this.breadcrumbElements().map(item => item);\n // Measure the length of the last additional ellipses item, then remove it from itemsShown (breadcrumb items).\n const ellipsesWidth = breadcrumbElementsList[this.numberOfItems].nativeElement.offsetWidth;\n this.itemsShown.splice(this.numberOfItems, 1);\n let currentWidth = this.showRootAsText() ? 0 : ROOT_ICON_WIDTH;\n const numberOfItemsKeptAtEnd = Math.min(NUMBER_OF_SHOWN_ITEMS_AT_END, this.numberOfItems - 1);\n let reverseCounter = this.numberOfItems;\n // Test for numberOfItemsKeptAtEnd items from the end if they still fit, if not, set breadcrumbShortened to true.\n breadcrumbElementsList\n .slice(this.numberOfItems - numberOfItemsKeptAtEnd, this.numberOfItems)\n .reverse()\n .map(item => {\n if (!this.breadcrumbShortened) {\n const currentItemWidth = item.nativeElement.offsetWidth;\n if (currentWidth + currentItemWidth > maxWidth) {\n this.breadcrumbShortened = true;\n // Test if the ellipses item still fits, if not remove last (actually next in original order) item as well.\n if (currentWidth + ellipsesWidth > maxWidth) {\n reverseCounter++;\n }\n } else {\n currentWidth += currentItemWidth;\n reverseCounter--;\n }\n }\n });\n\n const start = this.showRootAsText() ? 0 : 1;\n let counter = start;\n // If breadcrumbShortened is not true yet, test for the rest of the items from the start\n // Whether they still fit, if not, set breadcrumbShortened to true.\n breadcrumbElementsList.slice(start, this.numberOfItems - numberOfItemsKeptAtEnd).map(item => {\n if (!this.breadcrumbShortened) {\n const currentItemWidth = item.nativeElement.offsetWidth;\n if (currentWidth + currentItemWidth > maxWidth) {\n this.breadcrumbShortened = true;\n // Test if the ellipses item still fits, if not remove last item as well.\n // If the counter is still on 1, instead remove last (actually next in original order) from\n // the previous reverse calculation\n if (currentWidth + ellipsesWidth > maxWidth) {\n if (counter > 1) {\n counter--;\n } else {\n reverseCounter++;\n }\n }\n } else {\n currentWidth += currentItemWidth;\n counter++;\n }\n }\n });\n // If breadcrumbShortened is true, move the items that do not fit to itemsHidden (breadcrumb dropdown items) and add ellipses item.\n if (this.breadcrumbShortened) {\n this.ellipsesLevel = counter;\n this.itemsHidden = this.itemsShown.slice(this.ellipsesLevel, reverseCounter);\n const ellipsesItem = { title: '...', level: this.ellipsesLevel, shortenedTitle: '' };\n this.itemsShown.splice(this.ellipsesLevel, reverseCounter - this.ellipsesLevel, ellipsesItem);\n }\n // Manually detect changes to prevent them from not being detected on language change\n this.changeDetector.detectChanges();\n }\n}\n","<nav role=\"navigation\" [attr.aria-label]=\"ariaLabel() | translate\">\n <ol #breadcrumb class=\"breadcrumb\" (siResizeObserver)=\"resetBreadcrumb()\">\n @for (item of itemsShown; track $index; let isFirst = $first) {\n @if (!breadcrumbShortened || item.level !== ellipsesLevel) {\n @if (item.shortened) {\n <li #breadcrumbItem class=\"item text-nowrap shortened\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n toggleTemplate;\n context: { item: item, title: item.shortenedTitle }\n \"\n />\n @if (addExpandDropdown) {\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n </div>\n }\n </div>\n </li>\n } @else {\n <li #breadcrumbItem class=\"item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { item: item }\" />\n </li>\n }\n }\n @if (breadcrumbShortened && item.level === ellipsesLevel) {\n <li class=\"item breadcrumb-ellipses-item\">\n @if (!isFirst) {\n <si-icon class=\"separator flip-rtl\" [icon]=\"icons.elementRight2\" />\n }\n <div class=\"breadcrumb-dropdown-wrapper\">\n <ng-container *ngTemplateOutlet=\"toggleTemplate; context: { item: item, title: '' }\" />\n <div\n class=\"dropdown-menu\"\n role=\"menu\"\n [id]=\"controlId + item.level\"\n [class.show]=\"breadcrumbDropdownOpen === item.level\"\n >\n @for (item of itemsHidden; track $index) {\n <ng-container *ngTemplateOutlet=\"dropdownTemplate; context: { item: item }\" />\n }\n </div>\n </div>\n </li>\n }\n }\n </ol>\n</nav>\n\n<ng-template #itemTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"breadcrumb-link text-nowrap\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [class.text-secondary]=\"item.lastItem\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-disabled]=\"!item.link && !item.href && !item.action\"\n >\n @if (item.level === 0) {\n <si-icon class=\"icon flip-rtl\" [icon]=\"icons.elementBreadcrumbRoot\" />\n } @else {\n <span>{{ item.title }}</span>\n }\n </a>\n</ng-template>\n\n<ng-template #toggleTemplate let-item=\"item\" let-title=\"title\" siBreadcrumbItemTemplate>\n <div\n class=\"breadcrumb-dropdown-toggle link\"\n role=\"button\"\n aria-haspopup=\"true\"\n tabindex=\"0\"\n [attr.aria-controls]=\"controlId + item.level\"\n [attr.aria-expanded]=\"breadcrumbDropdownOpen === item.level\"\n (keydown.enter)=\"toggleBreadcrumbDropdown(item.level)\"\n (click)=\"toggleBreadcrumbDropdown(item.level)\"\n >{{ title }}...</div\n >\n</ng-template>\n\n<ng-template #dropdownTemplate let-item=\"item\" siBreadcrumbItemTemplate>\n <a\n class=\"dropdown-item breadcrumb-link focus-inside\"\n activeClass=\"active\"\n ariaCurrent=\"page\"\n role=\"menuitem\"\n [class.disable-router-link]=\"!item.link && !item.action && !item.href\"\n [siLink]=\"item\"\n [exactMatch]=\"true\"\n [attr.aria-disabled]=\"!item.link && !item.action && !item.href\"\n >{{ item.title }}</a\n >\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiBreadcrumbComponent } from './si-breadcrumb.component';\n\n@NgModule({\n imports: [SiBreadcrumbComponent],\n exports: [SiBreadcrumbComponent]\n})\nexport class SiBreadcrumbModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './breadcrumb-item.model';\nexport * from './si-breadcrumb.component';\nexport * from './si-breadcrumb.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;MAMU,iCAA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