@siemens/element-ng 49.12.0 → 51.0.0-rc.3
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.
- package/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +170 -143
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +34 -33
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +289 -128
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +46 -30
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +20 -16
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +138 -134
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +33 -26
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +88 -47
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +218 -117
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +93 -74
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/package.json +20 -22
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +13 -25
- package/types/siemens-element-ng-autocomplete.d.ts +19 -19
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +135 -40
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-header-dropdown.d.ts +5 -0
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +6 -9
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-tabs.d.ts +4 -0
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-tooltip.d.ts +10 -26
- package/types/siemens-element-ng-translate.d.ts +1 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,36 +1,79 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
+
import { input, signal, inject, ElementRef, afterRenderEffect, computed, TemplateRef, ChangeDetectionStrategy, Component, Injector, inputBinding, PLATFORM_ID, Injectable, booleanAttribute, effect, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { OverlayRef, Overlay } from '@angular/cdk/overlay';
|
|
5
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
6
|
-
import {
|
|
5
|
+
import { NgTemplateOutlet, NgComponentOutlet, isPlatformBrowser } from '@angular/common';
|
|
6
|
+
import { calculateOverlayArrowPosition, getOverlay, getPositionStrategy } from '@siemens/element-ng/common';
|
|
7
|
+
import { Subject, fromEvent, timer } from 'rxjs';
|
|
8
|
+
import { filter, takeUntil, delayWhen } from 'rxjs/operators';
|
|
7
9
|
import { SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Copyright (c) Siemens 2016 - 2026
|
|
11
13
|
* SPDX-License-Identifier: MIT
|
|
12
14
|
*/
|
|
13
|
-
const SI_TOOLTIP_CONFIG = new InjectionToken('SiTooltipConfig');
|
|
14
|
-
|
|
15
15
|
class TooltipComponent {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
id = input(/* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
18
|
+
tooltip = input(/* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [undefined, { debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
20
|
+
tooltipContext = input(/* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [undefined, { debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
|
|
22
|
+
tooltipPositionClass = signal('', /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "tooltipPositionClass" }] : /* istanbul ignore next */ []));
|
|
24
|
+
arrowPos = signal(undefined, /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "arrowPos" }] : /* istanbul ignore next */ []));
|
|
19
26
|
elementRef = inject(ElementRef);
|
|
27
|
+
overlayRef = inject(OverlayRef);
|
|
28
|
+
lastPositionChange;
|
|
29
|
+
lastAnchor;
|
|
30
|
+
constructor() {
|
|
31
|
+
let isFirstRun = true;
|
|
32
|
+
afterRenderEffect(() => {
|
|
33
|
+
this.tooltip();
|
|
34
|
+
this.tooltipContext();
|
|
35
|
+
if (isFirstRun) {
|
|
36
|
+
isFirstRun = false;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.overlayRef.updatePosition();
|
|
40
|
+
if (this.lastPositionChange) {
|
|
41
|
+
this.updateTooltipPosition(this.lastPositionChange, this.lastAnchor);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
20
45
|
tooltipText = computed(() => {
|
|
21
|
-
const tooltip = this.
|
|
22
|
-
|
|
23
|
-
|
|
46
|
+
const tooltip = this.tooltip();
|
|
47
|
+
if (typeof tooltip === 'string') {
|
|
48
|
+
return tooltip;
|
|
49
|
+
}
|
|
50
|
+
// When an ElementRef is provided, read its current text content whenever the
|
|
51
|
+
// tooltip is shown, so dynamic content is always reflected.
|
|
52
|
+
// The tooltip content is not updated while being displayed.
|
|
53
|
+
if (tooltip instanceof ElementRef) {
|
|
54
|
+
return tooltip.nativeElement.textContent.trim();
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
}, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "tooltipText" }] : /* istanbul ignore next */ []));
|
|
24
59
|
tooltipTemplate = computed(() => {
|
|
25
|
-
const tooltip = this.
|
|
60
|
+
const tooltip = this.tooltip();
|
|
26
61
|
return tooltip instanceof TemplateRef ? tooltip : null;
|
|
27
|
-
},
|
|
62
|
+
}, /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
|
|
28
64
|
tooltipComponent = computed(() => {
|
|
29
|
-
const tooltip = this.
|
|
30
|
-
return !(tooltip instanceof TemplateRef) &&
|
|
31
|
-
|
|
65
|
+
const tooltip = this.tooltip();
|
|
66
|
+
return !(tooltip instanceof TemplateRef) &&
|
|
67
|
+
!(tooltip instanceof ElementRef) &&
|
|
68
|
+
typeof tooltip !== 'string'
|
|
69
|
+
? tooltip
|
|
70
|
+
: null;
|
|
71
|
+
}, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "tooltipComponent" }] : /* istanbul ignore next */ []));
|
|
32
73
|
/** @internal */
|
|
33
74
|
updateTooltipPosition(change, anchor) {
|
|
75
|
+
this.lastPositionChange = change;
|
|
76
|
+
this.lastAnchor = anchor;
|
|
34
77
|
const arrowClassTooltip = `tooltip-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;
|
|
35
78
|
// need two updates as class changes affect the position
|
|
36
79
|
if (arrowClassTooltip !== this.tooltipPositionClass()) {
|
|
@@ -39,53 +82,138 @@ class TooltipComponent {
|
|
|
39
82
|
const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);
|
|
40
83
|
this.arrowPos.set(arrowPos);
|
|
41
84
|
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TooltipComponent, isStandalone: true, selector: "si-tooltip", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipContext: { classPropertyName: "tooltipContext", publicName: "tooltipContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "animate.leave": "tooltip-leave" } }, ngImport: i0, template: "<div\n class=\"tooltip show position-relative\"\n role=\"tooltip\"\n [id]=\"id()\"\n [class]=\"tooltipPositionClass()\"\n>\n <div\n class=\"tooltip-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n <div class=\"tooltip-inner\">\n @if (tooltipText()) {\n <div class=\"si-body\">{{ tooltipText() | translate }}</div>\n } @else if (tooltipTemplate()) {\n <ng-template\n [ngTemplateOutlet]=\"tooltipTemplate()\"\n [ngTemplateOutletContext]=\"tooltipContext()\"\n />\n } @else if (tooltipComponent()) {\n <ng-container [ngComponentOutlet]=\"tooltipComponent()!\" />\n }\n </div>\n</div>\n", styles: [":host .tooltip,:host{transition:opacity calc(.15s * var(--element-animations-enabled, 1)) ease-out,transform calc(.15s * var(--element-animations-enabled, 1)) ease-out}:host{opacity:1;transform:scale(1)}:host.tooltip-leave{opacity:0;transform:scale(.8)}@starting-style{:host .tooltip{opacity:0;transform:scale(.8)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
44
87
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
46
89
|
type: Component,
|
|
47
|
-
args: [{ selector: 'si-tooltip', imports: [NgTemplateOutlet, SiTranslatePipe, NgComponentOutlet], changeDetection: ChangeDetectionStrategy.
|
|
90
|
+
args: [{ selector: 'si-tooltip', imports: [NgTemplateOutlet, SiTranslatePipe, NgComponentOutlet], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
48
91
|
'animate.leave': 'tooltip-leave'
|
|
49
|
-
}, template: "<div\n class=\"tooltip show position-relative\"\n role=\"tooltip\"\n [id]=\"
|
|
50
|
-
}] });
|
|
92
|
+
}, template: "<div\n class=\"tooltip show position-relative\"\n role=\"tooltip\"\n [id]=\"id()\"\n [class]=\"tooltipPositionClass()\"\n>\n <div\n class=\"tooltip-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n <div class=\"tooltip-inner\">\n @if (tooltipText()) {\n <div class=\"si-body\">{{ tooltipText() | translate }}</div>\n } @else if (tooltipTemplate()) {\n <ng-template\n [ngTemplateOutlet]=\"tooltipTemplate()\"\n [ngTemplateOutletContext]=\"tooltipContext()\"\n />\n } @else if (tooltipComponent()) {\n <ng-container [ngComponentOutlet]=\"tooltipComponent()!\" />\n }\n </div>\n</div>\n", styles: [":host .tooltip,:host{transition:opacity calc(.15s * var(--element-animations-enabled, 1)) ease-out,transform calc(.15s * var(--element-animations-enabled, 1)) ease-out}:host{opacity:1;transform:scale(1)}:host.tooltip-leave{opacity:0;transform:scale(.8)}@starting-style{:host .tooltip{opacity:0;transform:scale(.8)}}\n"] }]
|
|
93
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipContext", required: false }] }] } });
|
|
51
94
|
|
|
52
95
|
/**
|
|
53
96
|
* Copyright (c) Siemens 2016 - 2026
|
|
54
97
|
* SPDX-License-Identifier: MIT
|
|
55
98
|
*/
|
|
56
99
|
/**
|
|
57
|
-
* TooltipRef
|
|
100
|
+
* A no-op TooltipRef used on platform server where DOM APIs are unavailable.
|
|
101
|
+
*
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
class NoopTooltipRef {
|
|
105
|
+
destroy() { }
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* BrowserTooltipRef is attached to a specific element.
|
|
58
109
|
* Use it to show or hide a tooltip for that element.
|
|
59
110
|
*
|
|
60
111
|
* @internal
|
|
61
112
|
*/
|
|
62
|
-
class
|
|
113
|
+
class BrowserTooltipRef {
|
|
114
|
+
config;
|
|
115
|
+
destroy$ = new Subject();
|
|
116
|
+
isFocused = false;
|
|
117
|
+
isHovered = false;
|
|
63
118
|
overlayRef;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
119
|
+
positionSubscription;
|
|
120
|
+
constructor(config) {
|
|
121
|
+
this.config = config;
|
|
122
|
+
const nativeElement = this.config.element.nativeElement;
|
|
123
|
+
fromEvent(nativeElement, 'focus')
|
|
124
|
+
.pipe(filter(event => event instanceof FocusEvent), takeUntil(this.destroy$))
|
|
125
|
+
.subscribe(event => this.onFocus(event));
|
|
126
|
+
fromEvent(nativeElement, 'mouseenter')
|
|
127
|
+
.pipe(delayWhen(() =>
|
|
128
|
+
// UX Guideline: tooltips on hover should be delayed by 500ms
|
|
129
|
+
timer(500).pipe(takeUntil(fromEvent(nativeElement, 'mouseleave')), takeUntil(fromEvent(nativeElement, 'focusout')) // user started using keyboard
|
|
130
|
+
)), takeUntil(this.destroy$))
|
|
131
|
+
.subscribe(() => this.onMouseEnter());
|
|
132
|
+
fromEvent(nativeElement, 'focusout')
|
|
133
|
+
.pipe(takeUntil(this.destroy$))
|
|
134
|
+
.subscribe(() => this.onFocusOut());
|
|
135
|
+
fromEvent(nativeElement, 'mouseleave')
|
|
136
|
+
.pipe(takeUntil(this.destroy$))
|
|
137
|
+
.subscribe(() => this.onMouseLeave());
|
|
138
|
+
fromEvent(nativeElement, 'touchstart')
|
|
139
|
+
.pipe(takeUntil(this.destroy$))
|
|
140
|
+
.subscribe(() => this.onTouchStart());
|
|
141
|
+
// The tooltip may be created lazily, after the element is already focused or
|
|
142
|
+
// hovered (e.g. when validation errors appear on blur while the pointer still
|
|
143
|
+
// hovers the element). In that case the initial `focus`/`mouseenter` was
|
|
144
|
+
// missed, so show the tooltip immediately based on the live `:focus-visible`
|
|
145
|
+
// and `:hover` state.
|
|
146
|
+
if (nativeElement === document.activeElement && nativeElement.matches(':focus-visible')) {
|
|
147
|
+
this.isFocused = true;
|
|
148
|
+
this.show();
|
|
149
|
+
}
|
|
150
|
+
else if (nativeElement.matches(':hover')) {
|
|
151
|
+
this.onMouseEnter();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
onFocus(event) {
|
|
155
|
+
if (event.target instanceof Element) {
|
|
156
|
+
if (event.target.matches(':focus-visible')) {
|
|
157
|
+
this.isFocused = true;
|
|
158
|
+
this.show();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
onFocusOut() {
|
|
163
|
+
this.isFocused = false;
|
|
164
|
+
this.isHovered = false;
|
|
165
|
+
this.hide();
|
|
166
|
+
}
|
|
167
|
+
onMouseEnter() {
|
|
168
|
+
this.isHovered = true;
|
|
169
|
+
this.show();
|
|
170
|
+
}
|
|
171
|
+
onMouseLeave() {
|
|
172
|
+
this.isHovered = false;
|
|
173
|
+
this.hide();
|
|
174
|
+
}
|
|
175
|
+
onTouchStart() {
|
|
176
|
+
// On touch devices a tooltip is not useful and would obscure the content the
|
|
177
|
+
// user just tapped. Reset the hover/focus state so it is hidden immediately.
|
|
178
|
+
this.isFocused = false;
|
|
179
|
+
this.isHovered = false;
|
|
180
|
+
this.hide();
|
|
181
|
+
}
|
|
182
|
+
getOrCreateOverlay() {
|
|
183
|
+
this.overlayRef ??= getOverlay(this.config.element, this.config.overlay, false, this.config.placement, false, true, this.config.scrollStrategy?.());
|
|
184
|
+
return this.overlayRef;
|
|
70
185
|
}
|
|
71
|
-
subscription;
|
|
72
186
|
show() {
|
|
73
|
-
|
|
187
|
+
const overlayRef = this.getOrCreateOverlay();
|
|
188
|
+
if (overlayRef.hasAttached()) {
|
|
74
189
|
return;
|
|
75
190
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
191
|
+
const injector = Injector.create({
|
|
192
|
+
parent: this.config.injector,
|
|
193
|
+
providers: [{ provide: OverlayRef, useValue: overlayRef }]
|
|
194
|
+
});
|
|
195
|
+
const toolTipPortal = new ComponentPortal(TooltipComponent, undefined, injector, undefined, [
|
|
196
|
+
inputBinding('id', () => this.config.describedBy),
|
|
197
|
+
inputBinding('tooltip', this.config.tooltip),
|
|
198
|
+
inputBinding('tooltipContext', this.config.tooltipContext)
|
|
199
|
+
]);
|
|
200
|
+
const tooltipRef = overlayRef.attach(toolTipPortal);
|
|
201
|
+
const positionStrategy = getPositionStrategy(overlayRef);
|
|
202
|
+
this.positionSubscription?.unsubscribe();
|
|
203
|
+
this.positionSubscription = positionStrategy?.positionChanges.subscribe(change => tooltipRef.instance.updateTooltipPosition(change, this.config.element));
|
|
81
204
|
}
|
|
82
205
|
hide() {
|
|
83
|
-
this.
|
|
84
|
-
|
|
206
|
+
if (this.isFocused || this.isHovered) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.overlayRef?.detach();
|
|
210
|
+
this.positionSubscription?.unsubscribe();
|
|
85
211
|
}
|
|
86
212
|
destroy() {
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
213
|
+
this.destroy$.next();
|
|
214
|
+
this.destroy$.complete();
|
|
215
|
+
this.overlayRef?.dispose();
|
|
216
|
+
this.positionSubscription?.unsubscribe();
|
|
89
217
|
}
|
|
90
218
|
}
|
|
91
219
|
/**
|
|
@@ -98,26 +226,20 @@ class TooltipRef {
|
|
|
98
226
|
// We cannot provide this in root, as people may override the cdk overlay creation.
|
|
99
227
|
class SiTooltipService {
|
|
100
228
|
overlay = inject(Overlay);
|
|
229
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
101
230
|
createTooltip(config) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
id: config.describedBy,
|
|
109
|
-
tooltip: config.tooltip,
|
|
110
|
-
tooltipContext: config.tooltipContext
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
]
|
|
231
|
+
if (!this.isBrowser) {
|
|
232
|
+
return new NoopTooltipRef();
|
|
233
|
+
}
|
|
234
|
+
return new BrowserTooltipRef({
|
|
235
|
+
...config,
|
|
236
|
+
overlay: this.overlay
|
|
114
237
|
});
|
|
115
|
-
return new TooltipRef(getOverlay(config.element, this.overlay, false, config.placement, false, true, config.scrollStrategy), config.element, injector);
|
|
116
238
|
}
|
|
117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
118
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipService });
|
|
119
241
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipService, decorators: [{
|
|
121
243
|
type: Injectable
|
|
122
244
|
}] });
|
|
123
245
|
|
|
@@ -128,104 +250,83 @@ class SiTooltipDirective {
|
|
|
128
250
|
*
|
|
129
251
|
* @defaultValue ''
|
|
130
252
|
*/
|
|
131
|
-
siTooltip = input('',
|
|
253
|
+
siTooltip = input('', /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "siTooltip" }] : /* istanbul ignore next */ []));
|
|
132
255
|
/**
|
|
133
256
|
* The placement of the tooltip. One of 'top', 'start', end', 'bottom'
|
|
134
257
|
*
|
|
135
258
|
* @defaultValue 'auto'
|
|
136
259
|
*/
|
|
137
|
-
placement = input('auto',
|
|
260
|
+
placement = input('auto', /* @ts-ignore */
|
|
261
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
138
262
|
/**
|
|
139
263
|
* Allows the tooltip to be disabled
|
|
140
264
|
*
|
|
141
265
|
* @defaultValue false
|
|
142
266
|
*/
|
|
143
|
-
isDisabled = input(false, { ...(ngDevMode ? { debugName: "isDisabled" } : {}), transform: booleanAttribute });
|
|
267
|
+
isDisabled = input(false, { ...(ngDevMode ? { debugName: "isDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
144
268
|
/**
|
|
145
269
|
* Optional CDK scroll strategy used for the tooltip overlay.
|
|
146
270
|
* If not provided, the default reposition strategy is used.
|
|
147
271
|
*/
|
|
148
|
-
tooltipScrollStrategy = input(
|
|
272
|
+
tooltipScrollStrategy = input(/* @ts-ignore */
|
|
273
|
+
...(ngDevMode ? [undefined, { debugName: "tooltipScrollStrategy" }] : /* istanbul ignore next */ []));
|
|
149
274
|
/**
|
|
150
275
|
* The context for the attached template
|
|
151
276
|
*/
|
|
152
|
-
tooltipContext = input(
|
|
277
|
+
tooltipContext = input(/* @ts-ignore */
|
|
278
|
+
...(ngDevMode ? [undefined, { debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
|
|
153
279
|
describedBy = `__tooltip_${SiTooltipDirective.idCounter++}`;
|
|
154
280
|
tooltipRef;
|
|
155
|
-
showTimeout;
|
|
156
281
|
tooltipService = inject(SiTooltipService);
|
|
157
282
|
elementRef = inject(ElementRef);
|
|
158
|
-
|
|
283
|
+
constructor() {
|
|
284
|
+
effect(() => {
|
|
285
|
+
const tooltip = this.siTooltip();
|
|
286
|
+
const disabled = this.isDisabled();
|
|
287
|
+
if (tooltip && !disabled) {
|
|
288
|
+
this.tooltipRef ??= this.tooltipService.createTooltip({
|
|
289
|
+
describedBy: this.describedBy,
|
|
290
|
+
element: this.elementRef,
|
|
291
|
+
placement: this.placement(),
|
|
292
|
+
tooltip: this.siTooltip,
|
|
293
|
+
tooltipContext: this.tooltipContext,
|
|
294
|
+
scrollStrategy: this.tooltipScrollStrategy
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
else if (this.tooltipRef) {
|
|
298
|
+
this.tooltipRef.destroy();
|
|
299
|
+
this.tooltipRef = undefined;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
159
303
|
ngOnDestroy() {
|
|
160
|
-
this.clearShowTimeout();
|
|
161
304
|
this.tooltipRef?.destroy();
|
|
162
305
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
clearTimeout(this.showTimeout);
|
|
166
|
-
this.showTimeout = undefined;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
showTooltip(immediate = false) {
|
|
170
|
-
const siTooltip = this.siTooltip();
|
|
171
|
-
if (this.isDisabled() || !siTooltip) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
this.clearShowTimeout();
|
|
175
|
-
const delay = immediate ? 0 : 500;
|
|
176
|
-
this.showTimeout = setTimeout(() => {
|
|
177
|
-
this.tooltipRef ??= this.tooltipService.createTooltip({
|
|
178
|
-
describedBy: this.describedBy,
|
|
179
|
-
element: this.elementRef,
|
|
180
|
-
placement: this.placement(),
|
|
181
|
-
tooltip: this.siTooltip,
|
|
182
|
-
tooltipContext: this.tooltipContext,
|
|
183
|
-
scrollStrategy: this.tooltipScrollStrategy()
|
|
184
|
-
});
|
|
185
|
-
this.tooltipRef.show();
|
|
186
|
-
}, delay);
|
|
187
|
-
}
|
|
188
|
-
focusIn(event) {
|
|
189
|
-
if (this.isBrowser && event.target.matches(':focus-visible')) {
|
|
190
|
-
this.showTooltip(true);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
show() {
|
|
194
|
-
this.showTooltip(false);
|
|
195
|
-
}
|
|
196
|
-
hide() {
|
|
197
|
-
this.clearShowTimeout();
|
|
198
|
-
this.tooltipRef?.hide();
|
|
199
|
-
}
|
|
200
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
201
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.8", type: SiTooltipDirective, isStandalone: true, selector: "[siTooltip]", inputs: { siTooltip: { classPropertyName: "siTooltip", publicName: "siTooltip", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipScrollStrategy: { classPropertyName: "tooltipScrollStrategy", publicName: "tooltipScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, tooltipContext: { classPropertyName: "tooltipContext", publicName: "tooltipContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "focusIn($event)", "mouseenter": "show()", "touchstart": "hide()", "focusout": "hide()", "mouseleave": "hide()" }, properties: { "attr.aria-describedby": "isDisabled() ? null : describedBy" } }, providers: [SiTooltipService], ngImport: i0 });
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
307
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiTooltipDirective, isStandalone: true, selector: "[siTooltip]", inputs: { siTooltip: { classPropertyName: "siTooltip", publicName: "siTooltip", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipScrollStrategy: { classPropertyName: "tooltipScrollStrategy", publicName: "tooltipScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, tooltipContext: { classPropertyName: "tooltipContext", publicName: "tooltipContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-describedby": "isDisabled() ? null : describedBy" } }, providers: [SiTooltipService], ngImport: i0 });
|
|
202
308
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipDirective, decorators: [{
|
|
204
310
|
type: Directive,
|
|
205
311
|
args: [{
|
|
206
312
|
selector: '[siTooltip]',
|
|
207
313
|
providers: [SiTooltipService],
|
|
208
314
|
host: {
|
|
209
|
-
'[attr.aria-describedby]': 'isDisabled() ? null : describedBy'
|
|
210
|
-
'(focus)': 'focusIn($event)',
|
|
211
|
-
'(mouseenter)': 'show()',
|
|
212
|
-
'(touchstart)': 'hide()',
|
|
213
|
-
'(focusout)': 'hide()',
|
|
214
|
-
'(mouseleave)': 'hide()'
|
|
315
|
+
'[attr.aria-describedby]': 'isDisabled() ? null : describedBy'
|
|
215
316
|
}
|
|
216
317
|
}]
|
|
217
|
-
}], propDecorators: { siTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "siTooltip", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], tooltipScrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipScrollStrategy", required: false }] }], tooltipContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipContext", required: false }] }] } });
|
|
318
|
+
}], ctorParameters: () => [], propDecorators: { siTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "siTooltip", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], tooltipScrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipScrollStrategy", required: false }] }], tooltipContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipContext", required: false }] }] } });
|
|
218
319
|
|
|
219
320
|
/**
|
|
220
321
|
* Copyright (c) Siemens 2016 - 2026
|
|
221
322
|
* SPDX-License-Identifier: MIT
|
|
222
323
|
*/
|
|
223
324
|
class SiTooltipModule {
|
|
224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
225
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
226
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
326
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipModule, imports: [SiTooltipDirective], exports: [SiTooltipDirective] });
|
|
327
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipModule });
|
|
227
328
|
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTooltipModule, decorators: [{
|
|
229
330
|
type: NgModule,
|
|
230
331
|
args: [{
|
|
231
332
|
imports: [SiTooltipDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-tooltip.mjs","sources":["../../../../projects/element-ng/tooltip/si-tooltip.model.ts","../../../../projects/element-ng/tooltip/si-tooltip.component.ts","../../../../projects/element-ng/tooltip/si-tooltip.component.html","../../../../projects/element-ng/tooltip/si-tooltip.service.ts","../../../../projects/element-ng/tooltip/si-tooltip.directive.ts","../../../../projects/element-ng/tooltip/si-tooltip.module.ts","../../../../projects/element-ng/tooltip/index.ts","../../../../projects/element-ng/tooltip/siemens-element-ng-tooltip.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken, TemplateRef, Type } from '@angular/core';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\nexport type SiTooltipContent = TranslatableString | TemplateRef<any> | Type<any> | null | undefined;\n\nexport interface SiTooltipConfig {\n id: string;\n tooltip: () => SiTooltipContent;\n tooltipContext: () => unknown;\n}\n\nexport const SI_TOOLTIP_CONFIG = new InjectionToken<SiTooltipConfig>('SiTooltipConfig');\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n signal,\n TemplateRef\n} from '@angular/core';\nimport { calculateOverlayArrowPosition, OverlayArrowPosition } from '@siemens/element-ng/common';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SI_TOOLTIP_CONFIG } from './si-tooltip.model';\n\n@Component({\n selector: 'si-tooltip',\n imports: [NgTemplateOutlet, SiTranslatePipe, NgComponentOutlet],\n templateUrl: './si-tooltip.component.html',\n styleUrl: './si-tooltip.component.scss',\n changeDetection: ChangeDetectionStrategy.Default,\n host: {\n 'animate.leave': 'tooltip-leave'\n }\n})\nexport class TooltipComponent {\n protected readonly tooltipPositionClass = signal('');\n protected readonly arrowPos = signal<OverlayArrowPosition | undefined>(undefined);\n\n protected readonly config = inject(SI_TOOLTIP_CONFIG);\n private readonly elementRef = inject(ElementRef);\n\n protected readonly tooltipText = computed<string | null>(() => {\n const tooltip = this.config.tooltip();\n return typeof tooltip === 'string' ? tooltip : null;\n });\n\n protected readonly tooltipTemplate = computed<TemplateRef<any> | null>(() => {\n const tooltip = this.config.tooltip();\n return tooltip instanceof TemplateRef ? tooltip : null;\n });\n\n protected readonly tooltipComponent = computed(() => {\n const tooltip = this.config.tooltip();\n return !(tooltip instanceof TemplateRef) && typeof tooltip !== 'string' ? tooltip : null;\n });\n\n /** @internal */\n updateTooltipPosition(change: ConnectedOverlayPositionChange, anchor?: ElementRef): void {\n const arrowClassTooltip = `tooltip-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;\n // need two updates as class changes affect the position\n if (arrowClassTooltip !== this.tooltipPositionClass()) {\n this.tooltipPositionClass.set(arrowClassTooltip);\n }\n const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);\n this.arrowPos.set(arrowPos);\n }\n}\n","<div\n class=\"tooltip show position-relative\"\n role=\"tooltip\"\n [id]=\"config.id\"\n [class]=\"tooltipPositionClass()\"\n>\n <div\n class=\"tooltip-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n <div class=\"tooltip-inner\">\n @if (tooltipText()) {\n <div class=\"si-body\">{{ tooltipText() | translate }}</div>\n } @else if (tooltipTemplate()) {\n <ng-template\n [ngTemplateOutlet]=\"tooltipTemplate()\"\n [ngTemplateOutletContext]=\"config.tooltipContext()\"\n />\n } @else if (tooltipComponent()) {\n <ng-container [ngComponentOutlet]=\"tooltipComponent()!\" />\n }\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ComponentRef, ElementRef, inject, Injectable, Injector } from '@angular/core';\nimport { getOverlay, getPositionStrategy, positions } from '@siemens/element-ng/common';\nimport { Subscription } from 'rxjs';\n\nimport { TooltipComponent } from './si-tooltip.component';\nimport { SI_TOOLTIP_CONFIG, SiTooltipContent } from './si-tooltip.model';\n\n/**\n * TooltipRef is attached to a specific element.\n * Use it to show or hide a tooltip for that element.\n *\n * @internal\n */\nclass TooltipRef {\n constructor(\n private overlayRef: OverlayRef,\n private element: ElementRef,\n private injector?: Injector\n ) {}\n\n private subscription?: Subscription;\n\n show(): void {\n if (this.overlayRef.hasAttached()) {\n return;\n }\n\n const toolTipPortal = new ComponentPortal(TooltipComponent, undefined, this.injector);\n const tooltipRef: ComponentRef<TooltipComponent> = this.overlayRef.attach(toolTipPortal);\n\n const positionStrategy = getPositionStrategy(this.overlayRef);\n this.subscription?.unsubscribe();\n this.subscription = positionStrategy?.positionChanges.subscribe(change =>\n tooltipRef.instance.updateTooltipPosition(change, this.element)\n );\n }\n\n hide(): void {\n this.overlayRef.detach();\n this.subscription?.unsubscribe();\n }\n\n destroy(): void {\n this.overlayRef.dispose();\n this.subscription?.unsubscribe();\n }\n}\n\n/**\n * A service to create tooltips for specific elements.\n * Use this if the tooltip directive is not suitable.\n * Must not be used outside element-ng.\n *\n * @internal\n */\n// We cannot provide this in root, as people may override the cdk overlay creation.\n@Injectable()\nexport class SiTooltipService {\n private overlay = inject(Overlay);\n\n createTooltip(config: {\n describedBy: string;\n element: ElementRef;\n placement: keyof typeof positions;\n injector?: Injector;\n tooltip: () => SiTooltipContent;\n tooltipContext: () => unknown;\n scrollStrategy?: ScrollStrategy;\n }): TooltipRef {\n const injector = Injector.create({\n parent: config.injector,\n providers: [\n {\n provide: SI_TOOLTIP_CONFIG,\n useValue: {\n id: config.describedBy,\n tooltip: config.tooltip,\n tooltipContext: config.tooltipContext\n }\n }\n ]\n });\n\n return new TooltipRef(\n getOverlay(\n config.element,\n this.overlay,\n false,\n config.placement,\n false,\n true,\n config.scrollStrategy\n ),\n config.element,\n injector\n );\n }\n}\n\nexport type { TooltipRef };\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n PLATFORM_ID,\n TemplateRef\n} from '@angular/core';\nimport { positions } from '@siemens/element-ng/common';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\nimport { SiTooltipService, TooltipRef } from './si-tooltip.service';\n\n@Directive({\n selector: '[siTooltip]',\n providers: [SiTooltipService],\n host: {\n '[attr.aria-describedby]': 'isDisabled() ? null : describedBy',\n '(focus)': 'focusIn($event)',\n '(mouseenter)': 'show()',\n '(touchstart)': 'hide()',\n '(focusout)': 'hide()',\n '(mouseleave)': 'hide()'\n }\n})\nexport class SiTooltipDirective implements OnDestroy {\n private static idCounter = 0;\n\n /**\n * The tooltip text to be displayed\n *\n * @defaultValue ''\n */\n readonly siTooltip = input<TranslatableString | TemplateRef<any>>('');\n\n /**\n * The placement of the tooltip. One of 'top', 'start', end', 'bottom'\n *\n * @defaultValue 'auto'\n */\n readonly placement = input<keyof typeof positions>('auto');\n\n /**\n * Allows the tooltip to be disabled\n *\n * @defaultValue false\n */\n readonly isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n * Optional CDK scroll strategy used for the tooltip overlay.\n * If not provided, the default reposition strategy is used.\n */\n readonly tooltipScrollStrategy = input<ScrollStrategy>();\n\n /**\n * The context for the attached template\n */\n readonly tooltipContext = input();\n\n protected describedBy = `__tooltip_${SiTooltipDirective.idCounter++}`;\n\n private tooltipRef?: TooltipRef;\n private showTimeout?: ReturnType<typeof setTimeout>;\n private tooltipService = inject(SiTooltipService);\n private elementRef = inject(ElementRef);\n private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n ngOnDestroy(): void {\n this.clearShowTimeout();\n this.tooltipRef?.destroy();\n }\n\n private clearShowTimeout(): void {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n }\n\n private showTooltip(immediate = false): void {\n const siTooltip = this.siTooltip();\n if (this.isDisabled() || !siTooltip) {\n return;\n }\n\n this.clearShowTimeout();\n\n const delay = immediate ? 0 : 500;\n\n this.showTimeout = setTimeout(() => {\n this.tooltipRef ??= this.tooltipService.createTooltip({\n describedBy: this.describedBy,\n element: this.elementRef,\n placement: this.placement(),\n tooltip: this.siTooltip,\n tooltipContext: this.tooltipContext,\n scrollStrategy: this.tooltipScrollStrategy()\n });\n this.tooltipRef.show();\n }, delay);\n }\n\n protected focusIn(event: FocusEvent): void {\n if (this.isBrowser && (event.target as Element).matches(':focus-visible')) {\n this.showTooltip(true);\n }\n }\n\n protected show(): void {\n this.showTooltip(false);\n }\n\n protected hide(): void {\n this.clearShowTimeout();\n this.tooltipRef?.hide();\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTooltipDirective } from './si-tooltip.directive';\n\n@NgModule({\n imports: [SiTooltipDirective],\n exports: [SiTooltipDirective]\n})\nexport class SiTooltipModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-tooltip.module';\nexport * from './si-tooltip.directive';\nexport * from './si-tooltip.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;AAGG;AAYI,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAkB,iBAAiB,CAAC;;MCe1E,gBAAgB,CAAA;AACR,IAAA,oBAAoB,GAAG,MAAM,CAAC,EAAE,gEAAC;AACjC,IAAA,QAAQ,GAAG,MAAM,CAAmC,SAAS,oDAAC;AAE9D,IAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACpC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE7B,IAAA,WAAW,GAAG,QAAQ,CAAgB,MAAK;QAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AACrC,QAAA,OAAO,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,IAAI;AACrD,IAAA,CAAC,uDAAC;AAEiB,IAAA,eAAe,GAAG,QAAQ,CAA0B,MAAK;QAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;QACrC,OAAO,OAAO,YAAY,WAAW,GAAG,OAAO,GAAG,IAAI;AACxD,IAAA,CAAC,2DAAC;AAEiB,IAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAK;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;AACrC,QAAA,OAAO,EAAE,OAAO,YAAY,WAAW,CAAC,IAAI,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,IAAI;AAC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AA;wGAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAClB,kBAAkB,CAAA,EAAA,CAAA;wGAEjB,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB;AAC7B,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-tooltip.mjs","sources":["../../../../projects/element-ng/tooltip/si-tooltip.component.ts","../../../../projects/element-ng/tooltip/si-tooltip.component.html","../../../../projects/element-ng/tooltip/si-tooltip.service.ts","../../../../projects/element-ng/tooltip/si-tooltip.directive.ts","../../../../projects/element-ng/tooltip/si-tooltip.module.ts","../../../../projects/element-ng/tooltip/index.ts","../../../../projects/element-ng/tooltip/siemens-element-ng-tooltip.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ConnectedOverlayPositionChange, OverlayRef } from '@angular/cdk/overlay';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n TemplateRef\n} from '@angular/core';\nimport { calculateOverlayArrowPosition, OverlayArrowPosition } from '@siemens/element-ng/common';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiTooltipContent } from './si-tooltip.model';\n\n@Component({\n selector: 'si-tooltip',\n imports: [NgTemplateOutlet, SiTranslatePipe, NgComponentOutlet],\n templateUrl: './si-tooltip.component.html',\n styleUrl: './si-tooltip.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'animate.leave': 'tooltip-leave'\n }\n})\nexport class TooltipComponent {\n readonly id = input<string>();\n\n readonly tooltip = input<SiTooltipContent>();\n\n readonly tooltipContext = input<unknown>();\n\n protected readonly tooltipPositionClass = signal('');\n protected readonly arrowPos = signal<OverlayArrowPosition | undefined>(undefined);\n\n private readonly elementRef = inject(ElementRef);\n private readonly overlayRef = inject(OverlayRef);\n\n private lastPositionChange?: ConnectedOverlayPositionChange;\n private lastAnchor?: ElementRef;\n\n constructor() {\n let isFirstRun = true;\n afterRenderEffect(() => {\n this.tooltip();\n this.tooltipContext();\n if (isFirstRun) {\n isFirstRun = false;\n return;\n }\n this.overlayRef.updatePosition();\n if (this.lastPositionChange) {\n this.updateTooltipPosition(this.lastPositionChange, this.lastAnchor);\n }\n });\n }\n\n protected readonly tooltipText = computed<string | null>(() => {\n const tooltip = this.tooltip();\n if (typeof tooltip === 'string') {\n return tooltip;\n }\n // When an ElementRef is provided, read its current text content whenever the\n // tooltip is shown, so dynamic content is always reflected.\n // The tooltip content is not updated while being displayed.\n if (tooltip instanceof ElementRef) {\n return tooltip.nativeElement.textContent.trim();\n }\n return null;\n });\n\n protected readonly tooltipTemplate = computed<TemplateRef<any> | null>(() => {\n const tooltip = this.tooltip();\n return tooltip instanceof TemplateRef ? tooltip : null;\n });\n\n protected readonly tooltipComponent = computed(() => {\n const tooltip = this.tooltip();\n return !(tooltip instanceof TemplateRef) &&\n !(tooltip instanceof ElementRef) &&\n typeof tooltip !== 'string'\n ? tooltip\n : null;\n });\n\n /** @internal */\n updateTooltipPosition(change: ConnectedOverlayPositionChange, anchor?: ElementRef): void {\n this.lastPositionChange = change;\n this.lastAnchor = anchor;\n const arrowClassTooltip = `tooltip-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;\n // need two updates as class changes affect the position\n if (arrowClassTooltip !== this.tooltipPositionClass()) {\n this.tooltipPositionClass.set(arrowClassTooltip);\n }\n const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);\n this.arrowPos.set(arrowPos);\n }\n}\n","<div\n class=\"tooltip show position-relative\"\n role=\"tooltip\"\n [id]=\"id()\"\n [class]=\"tooltipPositionClass()\"\n>\n <div\n class=\"tooltip-arrow\"\n [style.left.px]=\"arrowPos()?.left\"\n [style.right.px]=\"arrowPos()?.right\"\n ></div>\n <div class=\"tooltip-inner\">\n @if (tooltipText()) {\n <div class=\"si-body\">{{ tooltipText() | translate }}</div>\n } @else if (tooltipTemplate()) {\n <ng-template\n [ngTemplateOutlet]=\"tooltipTemplate()\"\n [ngTemplateOutletContext]=\"tooltipContext()\"\n />\n } @else if (tooltipComponent()) {\n <ng-container [ngComponentOutlet]=\"tooltipComponent()!\" />\n }\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ComponentRef,\n ElementRef,\n inject,\n Injectable,\n Injector,\n inputBinding,\n PLATFORM_ID\n} from '@angular/core';\nimport { getOverlay, getPositionStrategy, positions } from '@siemens/element-ng/common';\nimport { fromEvent, Subject, Subscription, timer } from 'rxjs';\nimport { delayWhen, filter, takeUntil } from 'rxjs/operators';\n\nimport { TooltipComponent } from './si-tooltip.component';\nimport { SiTooltipContent } from './si-tooltip.model';\n\n/** @internal */\ninterface TooltipRef {\n destroy(): void;\n}\n\n/**\n * A no-op TooltipRef used on platform server where DOM APIs are unavailable.\n *\n * @internal\n */\nclass NoopTooltipRef {\n destroy(): void {}\n}\n\n/**\n * BrowserTooltipRef is attached to a specific element.\n * Use it to show or hide a tooltip for that element.\n *\n * @internal\n */\nclass BrowserTooltipRef {\n private readonly destroy$ = new Subject<void>();\n private isFocused = false;\n private isHovered = false;\n private overlayRef?: OverlayRef;\n private positionSubscription?: Subscription;\n\n constructor(\n private config: {\n describedBy?: string;\n element: ElementRef;\n injector?: Injector;\n overlay: Overlay;\n placement: keyof typeof positions;\n scrollStrategy?: () => ScrollStrategy | undefined;\n tooltip: () => SiTooltipContent;\n tooltipContext: () => unknown;\n }\n ) {\n const nativeElement = this.config.element.nativeElement;\n\n fromEvent(nativeElement, 'focus')\n .pipe(\n filter(event => event instanceof FocusEvent),\n takeUntil(this.destroy$)\n )\n .subscribe(event => this.onFocus(event));\n\n fromEvent(nativeElement, 'mouseenter')\n .pipe(\n delayWhen(() =>\n // UX Guideline: tooltips on hover should be delayed by 500ms\n timer(500).pipe(\n takeUntil(fromEvent(nativeElement, 'mouseleave')),\n takeUntil(fromEvent(nativeElement, 'focusout')) // user started using keyboard\n )\n ),\n takeUntil(this.destroy$)\n )\n .subscribe(() => this.onMouseEnter());\n\n fromEvent(nativeElement, 'focusout')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.onFocusOut());\n\n fromEvent(nativeElement, 'mouseleave')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.onMouseLeave());\n\n fromEvent(nativeElement, 'touchstart')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.onTouchStart());\n\n // The tooltip may be created lazily, after the element is already focused or\n // hovered (e.g. when validation errors appear on blur while the pointer still\n // hovers the element). In that case the initial `focus`/`mouseenter` was\n // missed, so show the tooltip immediately based on the live `:focus-visible`\n // and `:hover` state.\n if (nativeElement === document.activeElement && nativeElement.matches(':focus-visible')) {\n this.isFocused = true;\n this.show();\n } else if (nativeElement.matches(':hover')) {\n this.onMouseEnter();\n }\n }\n\n private onFocus(event: FocusEvent): void {\n if (event.target instanceof Element) {\n if (event.target.matches(':focus-visible')) {\n this.isFocused = true;\n this.show();\n }\n }\n }\n\n private onFocusOut(): void {\n this.isFocused = false;\n this.isHovered = false;\n this.hide();\n }\n\n private onMouseEnter(): void {\n this.isHovered = true;\n this.show();\n }\n\n private onMouseLeave(): void {\n this.isHovered = false;\n this.hide();\n }\n\n private onTouchStart(): void {\n // On touch devices a tooltip is not useful and would obscure the content the\n // user just tapped. Reset the hover/focus state so it is hidden immediately.\n this.isFocused = false;\n this.isHovered = false;\n this.hide();\n }\n\n private getOrCreateOverlay(): OverlayRef {\n this.overlayRef ??= getOverlay(\n this.config.element,\n this.config.overlay,\n false,\n this.config.placement,\n false,\n true,\n this.config.scrollStrategy?.()\n );\n return this.overlayRef;\n }\n\n private show(): void {\n const overlayRef = this.getOrCreateOverlay();\n if (overlayRef.hasAttached()) {\n return;\n }\n\n const injector = Injector.create({\n parent: this.config.injector,\n providers: [{ provide: OverlayRef, useValue: overlayRef }]\n });\n\n const toolTipPortal = new ComponentPortal(TooltipComponent, undefined, injector, undefined, [\n inputBinding('id', () => this.config.describedBy),\n inputBinding('tooltip', this.config.tooltip),\n inputBinding('tooltipContext', this.config.tooltipContext)\n ]);\n const tooltipRef: ComponentRef<TooltipComponent> = overlayRef.attach(toolTipPortal);\n\n const positionStrategy = getPositionStrategy(overlayRef);\n this.positionSubscription?.unsubscribe();\n this.positionSubscription = positionStrategy?.positionChanges.subscribe(change =>\n tooltipRef.instance.updateTooltipPosition(change, this.config.element)\n );\n }\n\n private hide(): void {\n if (this.isFocused || this.isHovered) {\n return;\n }\n this.overlayRef?.detach();\n this.positionSubscription?.unsubscribe();\n }\n\n destroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.overlayRef?.dispose();\n this.positionSubscription?.unsubscribe();\n }\n}\n\n/**\n * A service to create tooltips for specific elements.\n * Use this if the tooltip directive is not suitable.\n * Must not be used outside element-ng.\n *\n * @internal\n */\n// We cannot provide this in root, as people may override the cdk overlay creation.\n@Injectable()\nexport class SiTooltipService {\n private overlay = inject(Overlay);\n private isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n createTooltip(config: {\n describedBy?: string;\n element: ElementRef;\n placement: keyof typeof positions;\n injector?: Injector;\n tooltip: () => SiTooltipContent;\n tooltipContext: () => unknown;\n scrollStrategy?: () => ScrollStrategy | undefined;\n }): TooltipRef {\n if (!this.isBrowser) {\n return new NoopTooltipRef();\n }\n\n return new BrowserTooltipRef({\n ...config,\n overlay: this.overlay\n });\n }\n}\n\nexport type { TooltipRef };\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n TemplateRef\n} from '@angular/core';\nimport { positions } from '@siemens/element-ng/common';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\n\nimport { SiTooltipService, TooltipRef } from './si-tooltip.service';\n\n@Directive({\n selector: '[siTooltip]',\n providers: [SiTooltipService],\n host: {\n '[attr.aria-describedby]': 'isDisabled() ? null : describedBy'\n }\n})\nexport class SiTooltipDirective implements OnDestroy {\n private static idCounter = 0;\n\n /**\n * The tooltip text to be displayed\n *\n * @defaultValue ''\n */\n readonly siTooltip = input<TranslatableString | TemplateRef<any>>('');\n\n /**\n * The placement of the tooltip. One of 'top', 'start', end', 'bottom'\n *\n * @defaultValue 'auto'\n */\n readonly placement = input<keyof typeof positions>('auto');\n\n /**\n * Allows the tooltip to be disabled\n *\n * @defaultValue false\n */\n readonly isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n * Optional CDK scroll strategy used for the tooltip overlay.\n * If not provided, the default reposition strategy is used.\n */\n readonly tooltipScrollStrategy = input<ScrollStrategy>();\n\n /**\n * The context for the attached template\n */\n readonly tooltipContext = input();\n\n protected describedBy = `__tooltip_${SiTooltipDirective.idCounter++}`;\n\n private tooltipRef?: TooltipRef;\n private tooltipService = inject(SiTooltipService);\n private elementRef = inject(ElementRef);\n\n constructor() {\n effect(() => {\n const tooltip = this.siTooltip();\n const disabled = this.isDisabled();\n\n if (tooltip && !disabled) {\n this.tooltipRef ??= this.tooltipService.createTooltip({\n describedBy: this.describedBy,\n element: this.elementRef,\n placement: this.placement(),\n tooltip: this.siTooltip,\n tooltipContext: this.tooltipContext,\n scrollStrategy: this.tooltipScrollStrategy\n });\n } else if (this.tooltipRef) {\n this.tooltipRef.destroy();\n this.tooltipRef = undefined;\n }\n });\n }\n\n ngOnDestroy(): void {\n this.tooltipRef?.destroy();\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTooltipDirective } from './si-tooltip.directive';\n\n@NgModule({\n imports: [SiTooltipDirective],\n exports: [SiTooltipDirective]\n})\nexport class SiTooltipModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-tooltip.module';\nexport * from './si-tooltip.directive';\nexport * from './si-tooltip.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;AAGG;MA6BU,gBAAgB,CAAA;AAClB,IAAA,EAAE,GAAG,KAAK;sFAAU;AAEpB,IAAA,OAAO,GAAG,KAAK;2FAAoB;AAEnC,IAAA,cAAc,GAAG,KAAK;kGAAW;IAEvB,oBAAoB,GAAG,MAAM,CAAC,EAAE;6FAAC;IACjC,QAAQ,GAAG,MAAM,CAAmC,SAAS;iFAAC;AAEhE,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAExC,IAAA,kBAAkB;AAClB,IAAA,UAAU;AAElB,IAAA,WAAA,GAAA;QACE,IAAI,UAAU,GAAG,IAAI;QACrB,iBAAiB,CAAC,MAAK;YACrB,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,UAAU,EAAE;gBACd,UAAU,GAAG,KAAK;gBAClB;YACF;AACA,YAAA,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE;AAChC,YAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,UAAU,CAAC;YACtE;AACF,QAAA,CAAC,CAAC;IACJ;AAEm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