@taiga-ui/core 4.52.0-canary.f729878 → 4.52.0-canary.facf139
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/components/alert/alert.component.d.ts +5 -6
- package/components/alert/alert.directive.d.ts +4 -3
- package/components/alert/alert.interfaces.d.ts +3 -2
- package/components/alert/alert.service.d.ts +6 -2
- package/components/alert/alert.tokens.d.ts +1 -7
- package/components/alert/index.d.ts +0 -1
- package/components/button/button.directive.d.ts +2 -2
- package/components/button/button.options.d.ts +1 -1
- package/components/cell/cell.directive.d.ts +9 -0
- package/components/cell/cell.options.d.ts +6 -0
- package/components/cell/index.d.ts +2 -0
- package/components/data-list/data-list.component.d.ts +1 -1
- package/components/dialog/active-zone-adapter.directive.d.ts +11 -0
- package/components/dialog/dialog.component.d.ts +6 -11
- package/components/dialog/dialog.directive.d.ts +5 -4
- package/components/dialog/dialog.factory.d.ts +1 -1
- package/components/dialog/dialog.options.d.ts +26 -0
- package/components/dialog/{dialog-close.service.d.ts → dialog.providers.d.ts} +4 -1
- package/components/dialog/dialog.service.d.ts +6 -3
- package/components/dialog/index.d.ts +2 -3
- package/components/error/error.component.d.ts +6 -8
- package/components/error/error.d.ts +4 -0
- package/components/error/error.directive.d.ts +19 -0
- package/components/error/error.pipe.d.ts +10 -0
- package/components/error/index.d.ts +3 -0
- package/components/expand/expand.component.d.ts +9 -28
- package/components/expand/index.d.ts +0 -2
- package/components/header/header.directive.d.ts +17 -0
- package/components/header/index.d.ts +1 -0
- package/components/icon/icon.component.d.ts +6 -11
- package/components/index.d.ts +3 -1
- package/components/link/link.directive.d.ts +2 -2
- package/components/loader/loader.component.d.ts +7 -7
- package/components/modal/index.d.ts +2 -0
- package/components/modal/modal.component.d.ts +17 -0
- package/components/modal/modal.service.d.ts +13 -0
- package/components/notification/notification.directive.d.ts +7 -11
- package/components/notification/notification.options.d.ts +1 -1
- package/components/root/root.component.d.ts +4 -6
- package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/components/scrollbar/scrollbar.directive.d.ts +2 -2
- package/components/scrollbar/scrollbar.options.d.ts +1 -1
- package/components/spin-button/spin-button.component.d.ts +8 -9
- package/components/textfield/index.d.ts +1 -3
- package/components/textfield/textfield-content.directive.d.ts +3 -2
- package/components/textfield/textfield-icon.d.ts +3 -3
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +5 -6
- package/components/textfield/textfield.component.d.ts +9 -10
- package/components/textfield/textfield.d.ts +2 -3
- package/components/textfield/textfield.directive.d.ts +11 -14
- package/components/textfield/textfield.options.d.ts +8 -11
- package/directives/appearance/appearance.directive.d.ts +5 -13
- package/directives/appearance/appearance.options.d.ts +1 -1
- package/directives/dropdown/dropdown-content.directive.d.ts +9 -0
- package/directives/dropdown/dropdown.d.ts +2 -2
- package/directives/dropdown/dropdown.directive.d.ts +1 -2
- package/directives/dropdown/index.d.ts +1 -3
- package/directives/hint/hint-describe.directive.d.ts +4 -6
- package/directives/hint/hint-host.directive.d.ts +2 -2
- package/directives/hint/hint-hover.directive.d.ts +3 -4
- package/directives/hint/hint-manual.directive.d.ts +2 -2
- package/directives/hint/hint-options.directive.d.ts +3 -3
- package/directives/hint/hint-overflow.directive.d.ts +2 -2
- package/directives/hint/hint-position.directive.d.ts +4 -5
- package/directives/hint/hint-unstyled.component.d.ts +2 -7
- package/directives/hint/hint.component.d.ts +10 -11
- package/directives/hint/hint.directive.d.ts +9 -11
- package/directives/hint/index.d.ts +0 -2
- package/directives/icons/icons.bindings.d.ts +5 -0
- package/directives/icons/icons.directive.d.ts +8 -16
- package/directives/icons/index.d.ts +1 -0
- package/directives/index.d.ts +1 -1
- package/directives/notification/index.d.ts +2 -0
- package/directives/notification/notification.directive.d.ts +11 -0
- package/directives/notification/notification.service.d.ts +12 -0
- package/directives/popup/popup.directive.d.ts +6 -5
- package/directives/popup/popup.service.d.ts +1 -1
- package/directives/popup/popups.component.d.ts +2 -2
- package/directives/title/title.directive.d.ts +2 -3
- package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-classes.mjs +3 -3
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-alert.mjs +60 -99
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +13 -20
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +22 -26
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-data-list.mjs +29 -31
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +124 -93
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +109 -26
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +34 -132
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-header.mjs +42 -0
- package/fesm2022/taiga-ui-core-components-header.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-icon.mjs +22 -39
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +9 -12
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +13 -18
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +15 -29
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
- package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-notification.mjs +24 -53
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +20 -50
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +56 -61
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +16 -29
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +162 -296
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +3 -1
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +26 -63
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +83 -120
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +9 -12
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +144 -243
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +35 -45
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +11 -11
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-notification.mjs +73 -0
- package/fesm2022/taiga-ui-core-directives-notification.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +20 -27
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs +13 -19
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +1 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +5 -4
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-services.mjs +15 -15
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +24 -32
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +50 -4
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +18 -14
- package/pipes/index.d.ts +0 -1
- package/styles/components/appearance.less +6 -0
- package/styles/components/button.less +0 -2
- package/styles/components/icon.less +32 -26
- package/styles/components/icons.less +14 -12
- package/styles/components/link.less +0 -3
- package/styles/mixins/mixins.less +1 -2
- package/styles/mixins/mixins.scss +1 -2
- package/styles/mixins/slider.less +21 -16
- package/styles/theme/appearance/outline.less +1 -2
- package/styles/theme/appearance/textfield.less +1 -2
- package/tokens/i18n.d.ts +7 -7
- package/tokens/icon-resolver.d.ts +1 -5
- package/tokens/index.d.ts +1 -0
- package/tokens/validation-errors.d.ts +4 -0
- package/types/index.d.ts +0 -1
- package/utils/miscellaneous/index.d.ts +1 -0
- package/utils/miscellaneous/provide-taiga.d.ts +13 -0
- package/components/alert/alerts.component.d.ts +0 -12
- package/components/dialog/dialog.interfaces.d.ts +0 -34
- package/components/dialog/dialog.tokens.d.ts +0 -15
- package/components/expand/expand-content.directive.d.ts +0 -8
- package/components/expand/expand.d.ts +0 -6
- package/components/fullscreen/fullscreen.component.d.ts +0 -14
- package/components/fullscreen/index.d.ts +0 -1
- package/components/textfield/select.directive.d.ts +0 -19
- package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
- package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
- package/directives/dropdown/dropdown.service.d.ts +0 -6
- package/directives/dropdown/dropdowns.component.d.ts +0 -9
- package/directives/hint/hint.service.d.ts +0 -13
- package/directives/hint/hints.component.d.ts +0 -12
- package/directives/surface/index.d.ts +0 -1
- package/directives/surface/surface.directive.d.ts +0 -8
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -66
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
- package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
- package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
- package/pipes/fallback-src/index.d.ts +0 -1
- package/types/portal-item.d.ts +0 -9
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken,
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
+
import { InjectionToken, Directive, Optional, Self, SkipSelf, inject, Input, input, output, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, signal, computed } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { EMPTY_CLIENT_RECT } from '@taiga-ui/cdk/constants';
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
6
|
+
import * as i3 from '@taiga-ui/cdk/directives/active-zone';
|
|
7
|
+
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
8
|
+
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
9
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
8
10
|
import { TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
|
|
9
11
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
10
12
|
import { tuiInjectElement, tuiPointToClientRect } from '@taiga-ui/cdk/utils/dom';
|
|
11
13
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
12
|
-
import { tuiProvide, tuiPure, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
14
|
+
import { tuiProvide, tuiPure, tuiSetSignal, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
15
|
import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor } from '@taiga-ui/core/classes';
|
|
16
|
+
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
17
|
+
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
18
|
+
import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
14
19
|
import { TuiPositionService, TuiVisualViewportService } from '@taiga-ui/core/services';
|
|
15
20
|
import { TUI_VIEWPORT } from '@taiga-ui/core/tokens';
|
|
16
21
|
import { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils';
|
|
17
|
-
import { PolymorpheusComponent,
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { DOCUMENT
|
|
21
|
-
import { tuiIfMap, tuiTypedFromEvent,
|
|
22
|
-
import {
|
|
22
|
+
import { PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
23
|
+
import { Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip, BehaviorSubject } from 'rxjs';
|
|
24
|
+
import { TuiPopupService } from '@taiga-ui/core/directives/popup';
|
|
25
|
+
import { DOCUMENT } from '@angular/common';
|
|
26
|
+
import { tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
|
27
|
+
import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
30
|
* A component to display a hint
|
|
@@ -28,44 +33,16 @@ const TUI_HINT_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_HINT_COMPONENT' :
|
|
|
28
33
|
factory: () => TuiHintComponent,
|
|
29
34
|
});
|
|
30
35
|
|
|
31
|
-
/**
|
|
32
|
-
* Service for displaying hints/tooltips
|
|
33
|
-
*/
|
|
34
|
-
class TuiHintService extends BehaviorSubject {
|
|
35
|
-
constructor() {
|
|
36
|
-
super([]);
|
|
37
|
-
}
|
|
38
|
-
add(directive) {
|
|
39
|
-
this.next(this.value.concat(directive));
|
|
40
|
-
}
|
|
41
|
-
remove(directive) {
|
|
42
|
-
if (this.value.includes(directive)) {
|
|
43
|
-
this.next(this.value.filter((hint) => hint !== directive));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
47
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintService, providedIn: 'root' }); }
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintService, decorators: [{
|
|
50
|
-
type: Injectable,
|
|
51
|
-
args: [{
|
|
52
|
-
providedIn: 'root',
|
|
53
|
-
}]
|
|
54
|
-
}], ctorParameters: () => [] });
|
|
55
|
-
|
|
56
36
|
class TuiHintDriver extends TuiDriverDirective {
|
|
57
37
|
constructor() {
|
|
58
38
|
super(...arguments);
|
|
59
39
|
this.type = 'hint';
|
|
60
40
|
}
|
|
61
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
62
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
63
43
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
65
|
-
type: Directive
|
|
66
|
-
args: [{
|
|
67
|
-
standalone: true,
|
|
68
|
-
}]
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, decorators: [{
|
|
45
|
+
type: Directive
|
|
69
46
|
}] });
|
|
70
47
|
|
|
71
48
|
const TUI_HINT_DIRECTIONS = [
|
|
@@ -121,10 +98,10 @@ class TuiHintOptionsDirective {
|
|
|
121
98
|
ngOnChanges() {
|
|
122
99
|
this.change$.next();
|
|
123
100
|
}
|
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
125
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
102
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintOptionsDirective, isStandalone: true, selector: "[tuiHintContent]", inputs: { content: ["tuiHintContent", "content"], direction: ["tuiHintDirection", "direction"], appearance: ["tuiHintAppearance", "appearance"], showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [tuiProvide(TUI_HINT_OPTIONS, TuiHintOptionsDirective)], usesOnChanges: true, ngImport: i0 }); }
|
|
126
103
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOptionsDirective, decorators: [{
|
|
128
105
|
type: Directive,
|
|
129
106
|
args: [{
|
|
130
107
|
standalone: true,
|
|
@@ -157,11 +134,11 @@ class TuiHintHover extends TuiDriver {
|
|
|
157
134
|
this.options = inject(TUI_HINT_OPTIONS);
|
|
158
135
|
this.visible = false;
|
|
159
136
|
this.toggle$ = new Subject();
|
|
160
|
-
this.stream$ = merge(this.toggle$.pipe(switchMap((
|
|
161
|
-
? of(
|
|
162
|
-
: of(
|
|
163
|
-
? of(
|
|
164
|
-
: of(
|
|
137
|
+
this.stream$ = merge(this.toggle$.pipe(switchMap((show) => this.isMobile
|
|
138
|
+
? of(show)
|
|
139
|
+
: of(show).pipe(delay(show ? 0 : this.hideDelay()))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((show) => this.isMobile
|
|
140
|
+
? of(show)
|
|
141
|
+
: of(show).pipe(delay(show ? this.showDelay() : this.hideDelay()))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
|
|
165
142
|
(this.el.hasAttribute('tuiHintPointer') || !tuiIsObscured(this.el))), tap((visible) => {
|
|
166
143
|
this.visible = visible;
|
|
167
144
|
}));
|
|
@@ -169,8 +146,12 @@ class TuiHintHover extends TuiDriver {
|
|
|
169
146
|
optional: true,
|
|
170
147
|
skipSelf: true,
|
|
171
148
|
});
|
|
172
|
-
this.
|
|
173
|
-
|
|
149
|
+
this.showDelay = input(this.options.showDelay, {
|
|
150
|
+
alias: 'tuiHintShowDelay',
|
|
151
|
+
});
|
|
152
|
+
this.hideDelay = input(this.options.hideDelay, {
|
|
153
|
+
alias: 'tuiHintHideDelay',
|
|
154
|
+
});
|
|
174
155
|
this.type = 'hint';
|
|
175
156
|
this.enabled = true;
|
|
176
157
|
}
|
|
@@ -181,21 +162,16 @@ class TuiHintHover extends TuiDriver {
|
|
|
181
162
|
close() {
|
|
182
163
|
this.toggle$.next(false);
|
|
183
164
|
}
|
|
184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
185
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
166
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintHover, isStandalone: true, inputs: { showDelay: { classPropertyName: "showDelay", publicName: "tuiHintShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "tuiHintHideDelay", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintHover), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 }); }
|
|
186
167
|
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, decorators: [{
|
|
188
169
|
type: Directive,
|
|
189
170
|
args: [{
|
|
190
|
-
standalone: true,
|
|
191
171
|
providers: [tuiAsDriver(TuiHintHover), TuiHoveredService],
|
|
192
172
|
exportAs: 'tuiHintHover',
|
|
193
173
|
}]
|
|
194
|
-
}], ctorParameters: () => []
|
|
195
|
-
type: Input
|
|
196
|
-
}], tuiHintHideDelay: [{
|
|
197
|
-
type: Input
|
|
198
|
-
}] } });
|
|
174
|
+
}], ctorParameters: () => [] });
|
|
199
175
|
|
|
200
176
|
const GAP$1 = 8;
|
|
201
177
|
const ARROW_OFFSET = 24;
|
|
@@ -209,14 +185,19 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
209
185
|
this.viewport = inject(TUI_VIEWPORT);
|
|
210
186
|
this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor), inject(TuiHintDirective));
|
|
211
187
|
this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
|
|
212
|
-
this.direction = inject(TUI_HINT_OPTIONS).direction
|
|
213
|
-
|
|
188
|
+
this.direction = input(inject(TUI_HINT_OPTIONS).direction, {
|
|
189
|
+
alias: 'tuiHintDirection',
|
|
190
|
+
});
|
|
191
|
+
this.directionChange = output({
|
|
192
|
+
alias: 'tuiHintDirectionChange',
|
|
193
|
+
});
|
|
214
194
|
this.type = 'hint';
|
|
215
195
|
}
|
|
216
196
|
emitDirection(direction) {
|
|
217
197
|
this.directionChange.emit(direction);
|
|
218
198
|
}
|
|
219
199
|
getPosition(rect, el) {
|
|
200
|
+
const direction = this.direction();
|
|
220
201
|
const width = el?.clientWidth ?? rect.width;
|
|
221
202
|
const height = el?.clientHeight ?? rect.height;
|
|
222
203
|
const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
|
|
@@ -247,14 +228,14 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
247
228
|
this.points.right[LEFT] = this.points['right-top'][LEFT];
|
|
248
229
|
this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
|
|
249
230
|
this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
|
|
250
|
-
const array = Array.isArray(
|
|
231
|
+
const array = Array.isArray(direction) ? direction : [direction];
|
|
251
232
|
const priority = array.map((direction) => adjust(direction, rtl));
|
|
252
|
-
const
|
|
233
|
+
const updated = priority
|
|
253
234
|
.concat(TUI_HINT_DIRECTIONS)
|
|
254
235
|
.find((dir) => this.checkPosition(this.points[dir], width, height)) ||
|
|
255
236
|
this.fallback;
|
|
256
|
-
this.emitDirection(adjust(
|
|
257
|
-
return this.points[
|
|
237
|
+
this.emitDirection(adjust(updated, rtl));
|
|
238
|
+
return this.points[updated];
|
|
258
239
|
}
|
|
259
240
|
get fallback() {
|
|
260
241
|
return this.points.top[TOP] >
|
|
@@ -269,24 +250,15 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
269
250
|
top + height < viewport.bottom - GAP$1 &&
|
|
270
251
|
left + width < viewport.right - GAP$1);
|
|
271
252
|
}
|
|
272
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
273
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
254
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintPosition, isStandalone: true, inputs: { direction: { classPropertyName: "direction", publicName: "tuiHintDirection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { directionChange: "tuiHintDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
274
255
|
}
|
|
275
256
|
__decorate([
|
|
276
257
|
tuiPure
|
|
277
258
|
], TuiHintPosition.prototype, "emitDirection", null);
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
279
|
-
type: Directive
|
|
280
|
-
|
|
281
|
-
standalone: true,
|
|
282
|
-
}]
|
|
283
|
-
}], propDecorators: { direction: [{
|
|
284
|
-
type: Input,
|
|
285
|
-
args: ['tuiHintDirection']
|
|
286
|
-
}], directionChange: [{
|
|
287
|
-
type: Output,
|
|
288
|
-
args: ['tuiHintDirectionChange']
|
|
289
|
-
}], emitDirection: [] } });
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, decorators: [{
|
|
260
|
+
type: Directive
|
|
261
|
+
}], propDecorators: { emitDirection: [] } });
|
|
290
262
|
function adjust(direction, rtl) {
|
|
291
263
|
if (rtl && direction.includes('left')) {
|
|
292
264
|
return direction.replace('left', 'right');
|
|
@@ -299,18 +271,19 @@ function adjust(direction, rtl) {
|
|
|
299
271
|
|
|
300
272
|
class TuiHintDirective {
|
|
301
273
|
constructor() {
|
|
302
|
-
this.service = inject(
|
|
303
|
-
this.
|
|
304
|
-
this.
|
|
305
|
-
this.
|
|
274
|
+
this.service = inject(TuiPopupService);
|
|
275
|
+
this.content = input(null, { alias: 'tuiHint' });
|
|
276
|
+
this.context = input(undefined, { alias: 'tuiHintContext' });
|
|
277
|
+
this.appearance = input(inject(TUI_HINT_OPTIONS).appearance, {
|
|
278
|
+
alias: 'tuiHintAppearance',
|
|
279
|
+
});
|
|
280
|
+
this.visible = output({ alias: 'tuiHintVisible' });
|
|
306
281
|
this.component = inject((PolymorpheusComponent));
|
|
307
282
|
this.el = tuiInjectElement();
|
|
308
|
-
this.activeZone = inject(TuiActiveZone, { optional: true });
|
|
309
283
|
this.type = 'hint';
|
|
310
284
|
}
|
|
311
|
-
|
|
312
|
-
this.content
|
|
313
|
-
if (!content) {
|
|
285
|
+
ngOnChanges() {
|
|
286
|
+
if (!this.content()) {
|
|
314
287
|
this.toggle(false);
|
|
315
288
|
}
|
|
316
289
|
}
|
|
@@ -321,16 +294,18 @@ class TuiHintDirective {
|
|
|
321
294
|
return this.el.getBoundingClientRect();
|
|
322
295
|
}
|
|
323
296
|
toggle(show) {
|
|
324
|
-
if (show && this.content()) {
|
|
325
|
-
this.service.add(this);
|
|
297
|
+
if (show && this.content() && !this.ref) {
|
|
298
|
+
this.ref = this.service.add(this.component);
|
|
299
|
+
this.visible.emit(true);
|
|
326
300
|
}
|
|
327
|
-
else {
|
|
328
|
-
this.
|
|
301
|
+
else if (this.ref) {
|
|
302
|
+
this.ref.destroy();
|
|
303
|
+
this.ref = undefined;
|
|
304
|
+
this.visible.emit(false);
|
|
329
305
|
}
|
|
330
|
-
this.visible.emit(show);
|
|
331
306
|
}
|
|
332
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
333
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
307
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
308
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintDirective, isStandalone: true, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: { content: { classPropertyName: "content", publicName: "tuiHint", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "tuiHintContext", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "tuiHintAppearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "tuiHintVisible" }, providers: [
|
|
334
309
|
tuiAsRectAccessor(TuiHintDirective),
|
|
335
310
|
tuiAsVehicle(TuiHintDirective),
|
|
336
311
|
{
|
|
@@ -338,12 +313,11 @@ class TuiHintDirective {
|
|
|
338
313
|
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
339
314
|
useClass: PolymorpheusComponent,
|
|
340
315
|
},
|
|
341
|
-
], hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
|
|
316
|
+
], usesOnChanges: true, hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
|
|
342
317
|
}
|
|
343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, decorators: [{
|
|
344
319
|
type: Directive,
|
|
345
320
|
args: [{
|
|
346
|
-
standalone: true,
|
|
347
321
|
selector: '[tuiHint]:not(ng-container):not(ng-template)',
|
|
348
322
|
providers: [
|
|
349
323
|
tuiAsRectAccessor(TuiHintDirective),
|
|
@@ -367,18 +341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
367
341
|
},
|
|
368
342
|
],
|
|
369
343
|
}]
|
|
370
|
-
}]
|
|
371
|
-
type: Input,
|
|
372
|
-
args: ['tuiHintContext']
|
|
373
|
-
}], appearance: [{
|
|
374
|
-
type: Input,
|
|
375
|
-
args: ['tuiHintAppearance']
|
|
376
|
-
}], visible: [{
|
|
377
|
-
type: Output,
|
|
378
|
-
args: ['tuiHintVisible']
|
|
379
|
-
}], tuiHint: [{
|
|
380
|
-
type: Input
|
|
381
|
-
}] } });
|
|
344
|
+
}] });
|
|
382
345
|
|
|
383
346
|
class TuiHintPointer extends TuiHintHover {
|
|
384
347
|
constructor() {
|
|
@@ -391,13 +354,12 @@ class TuiHintPointer extends TuiHintHover {
|
|
|
391
354
|
onMove({ clientX, clientY }) {
|
|
392
355
|
this.currentRect = tuiPointToClientRect(clientX, clientY);
|
|
393
356
|
}
|
|
394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
395
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
358
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintPointer, isStandalone: true, selector: "[tuiHint][tuiHintPointer]", host: { listeners: { "mousemove.zoneless": "onMove($event)" } }, providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)], usesInheritance: true, ngImport: i0 }); }
|
|
396
359
|
}
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, decorators: [{
|
|
398
361
|
type: Directive,
|
|
399
362
|
args: [{
|
|
400
|
-
standalone: true,
|
|
401
363
|
selector: '[tuiHint][tuiHintPointer]',
|
|
402
364
|
providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)],
|
|
403
365
|
host: {
|
|
@@ -408,33 +370,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
408
370
|
|
|
409
371
|
class TuiHintUnstyledComponent {
|
|
410
372
|
constructor() {
|
|
411
|
-
this.
|
|
373
|
+
this.hint = inject(TuiHintDirective);
|
|
412
374
|
}
|
|
413
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
414
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyledComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<ng-container *polymorpheusOutlet="hint.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
415
377
|
}
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
|
|
417
379
|
type: Component,
|
|
418
380
|
args: [{
|
|
419
|
-
standalone: true,
|
|
420
381
|
imports: [PolymorpheusOutlet],
|
|
421
|
-
template: '<ng-container *polymorpheusOutlet="
|
|
382
|
+
template: '<ng-container *polymorpheusOutlet="hint.content()" />',
|
|
422
383
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
423
384
|
}]
|
|
424
385
|
}] });
|
|
425
386
|
class TuiHintUnstyled {
|
|
426
387
|
constructor() {
|
|
427
388
|
const hint = inject((TuiHintDirective));
|
|
428
|
-
hint.
|
|
429
|
-
hint.
|
|
389
|
+
tuiSetSignal(hint.content, inject((TemplateRef)));
|
|
390
|
+
hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent, inject(INJECTOR));
|
|
430
391
|
}
|
|
431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
432
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
393
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyled, isStandalone: true, selector: "ng-template[tuiHint]", ngImport: i0 }); }
|
|
433
394
|
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, decorators: [{
|
|
435
396
|
type: Directive,
|
|
436
397
|
args: [{
|
|
437
|
-
standalone: true,
|
|
438
398
|
selector: 'ng-template[tuiHint]',
|
|
439
399
|
}]
|
|
440
400
|
}], ctorParameters: () => [] });
|
|
@@ -446,8 +406,7 @@ const TUI_HINT_PROVIDERS = [
|
|
|
446
406
|
tuiRectAccessorFor('hint', TuiHintDirective),
|
|
447
407
|
];
|
|
448
408
|
const GAP = 8;
|
|
449
|
-
|
|
450
|
-
class TuiHintBaseComponent {
|
|
409
|
+
class TuiHintComponent {
|
|
451
410
|
constructor() {
|
|
452
411
|
this.el = tuiInjectElement();
|
|
453
412
|
this.hover = inject(TuiHintHover);
|
|
@@ -455,13 +414,15 @@ class TuiHintBaseComponent {
|
|
|
455
414
|
this.viewport = inject(TUI_VIEWPORT);
|
|
456
415
|
this.pointer = inject(TuiHintPointer, { optional: true });
|
|
457
416
|
this.accessor = inject(TuiRectAccessor);
|
|
458
|
-
this.hint =
|
|
417
|
+
this.hint = inject(TuiHintDirective);
|
|
459
418
|
this.isMobile = inject(TUI_IS_MOBILE);
|
|
460
419
|
this.content = this.hint.component.component === TuiHintUnstyledComponent
|
|
461
420
|
? signal('')
|
|
462
421
|
: this.hint.content;
|
|
463
|
-
this.
|
|
464
|
-
|
|
422
|
+
this.theme = this.hint.el
|
|
423
|
+
.closest('[tuiTheme]')
|
|
424
|
+
?.getAttribute('tuiTheme');
|
|
425
|
+
this.appearance = tuiAppearance(this.hint.appearance);
|
|
465
426
|
inject(TuiPositionService)
|
|
466
427
|
.pipe(takeWhile(() => this.hint.el.isConnected), map((point) => this.vvs.correct(point)), takeUntilDestroyed())
|
|
467
428
|
.subscribe({
|
|
@@ -499,154 +460,121 @@ class TuiHintBaseComponent {
|
|
|
499
460
|
]);
|
|
500
461
|
this.apply(tuiPx(Math.round(top)), tuiPx(Math.round(safeLeft)), Math.round((tuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100), Math.round((tuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100));
|
|
501
462
|
}
|
|
502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
503
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
504
|
-
}
|
|
505
|
-
__decorate([
|
|
506
|
-
tuiPure
|
|
507
|
-
], TuiHintBaseComponent.prototype, "apply", null);
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintBaseComponent, decorators: [{
|
|
509
|
-
type: Component,
|
|
510
|
-
args: [{
|
|
511
|
-
standalone: true,
|
|
512
|
-
template: '',
|
|
513
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
514
|
-
host: {
|
|
515
|
-
'[class._untouchable]': 'pointer',
|
|
516
|
-
'[class._mobile]': 'isMobile',
|
|
517
|
-
'[attr.data-appearance]': 'appearance',
|
|
518
|
-
'[attr.tuiTheme]': 'appearance === "dark" ? "light" : null',
|
|
519
|
-
'(document:click)': 'onClick($event.target)',
|
|
520
|
-
},
|
|
521
|
-
}]
|
|
522
|
-
}], ctorParameters: () => [], propDecorators: { apply: [] } });
|
|
523
|
-
class TuiHintComponent extends TuiHintBaseComponent {
|
|
524
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
525
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", providers: TUI_HINT_PROVIDERS, usesInheritance: true, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: `
|
|
463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
464
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { attributes: { "role": "tooltip" }, listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }, { directive: i3.TuiActiveZone }], ngImport: i0, template: `
|
|
526
465
|
<ng-content />
|
|
527
466
|
<span
|
|
528
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
467
|
+
*polymorpheusOutlet="content() as text; context: hint.context()"
|
|
529
468
|
[innerHTML]="text"
|
|
530
469
|
></span>
|
|
531
|
-
`, isInline: true, styles: [":host{position:absolute;max-inline-size:min(
|
|
470
|
+
`, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
532
471
|
}
|
|
533
|
-
|
|
472
|
+
__decorate([
|
|
473
|
+
tuiPure
|
|
474
|
+
], TuiHintComponent.prototype, "apply", null);
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, decorators: [{
|
|
534
476
|
type: Component,
|
|
535
|
-
args: [{
|
|
477
|
+
args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
|
|
536
478
|
<ng-content />
|
|
537
479
|
<span
|
|
538
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
480
|
+
*polymorpheusOutlet="content() as text; context: hint.context()"
|
|
539
481
|
[innerHTML]="text"
|
|
540
482
|
></span>
|
|
541
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: TUI_HINT_PROVIDERS,
|
|
542
|
-
|
|
483
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated, TuiActiveZone], host: {
|
|
484
|
+
role: 'tooltip',
|
|
485
|
+
'[class._untouchable]': 'pointer',
|
|
486
|
+
'[class._mobile]': 'isMobile',
|
|
487
|
+
'[attr.tuiTheme]': 'theme',
|
|
488
|
+
'(document:click)': 'onClick($event.target)',
|
|
489
|
+
}, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
|
|
490
|
+
}], ctorParameters: () => [], propDecorators: { apply: [] } });
|
|
543
491
|
|
|
544
492
|
class TuiHintDescribe extends TuiDriver {
|
|
545
493
|
constructor() {
|
|
546
494
|
super((subscriber) => this.stream$.subscribe(subscriber));
|
|
547
495
|
this.doc = inject(DOCUMENT);
|
|
548
496
|
this.el = tuiInjectElement();
|
|
549
|
-
this.
|
|
550
|
-
this.id
|
|
551
|
-
this.stream$ = this.id$.pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
|
|
552
|
-
? of(false)
|
|
553
|
-
: merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce((visible) => visible ? timer(1000, tuiZonefreeScheduler(this.zone)) : of(null)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
|
|
497
|
+
this.element = computed((id = this.id()) => id ? this.doc.querySelector(`#${id}`) || this.el : this.el);
|
|
498
|
+
this.id = input('', { alias: 'tuiHintDescribe' });
|
|
554
499
|
this.type = 'hint';
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
get element() {
|
|
560
|
-
const id = this.id$.value;
|
|
561
|
-
return id ? this.doc.querySelector(`#${id}`) || this.el : this.el;
|
|
500
|
+
this.stream$ = toObservable(this.id).pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
|
|
501
|
+
? of(false)
|
|
502
|
+
: merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element(), 'blur')).pipe(map(() => this.focused))), debounce((visible) => (visible ? timer(1000) : of(null))), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
|
|
562
503
|
}
|
|
563
504
|
get focused() {
|
|
564
|
-
return
|
|
505
|
+
return tuiIsFocused(this.element());
|
|
565
506
|
}
|
|
566
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
567
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
508
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintDescribe, isStandalone: true, selector: "[tuiHintDescribe]", inputs: { id: { classPropertyName: "id", publicName: "tuiHintDescribe", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintDescribe)], usesInheritance: true, ngImport: i0 }); }
|
|
568
509
|
}
|
|
569
|
-
|
|
570
|
-
tuiPure
|
|
571
|
-
], TuiHintDescribe.prototype, "element", null);
|
|
572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHintDescribe, decorators: [{
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, decorators: [{
|
|
573
511
|
type: Directive,
|
|
574
512
|
args: [{
|
|
575
|
-
standalone: true,
|
|
576
513
|
selector: '[tuiHintDescribe]',
|
|
577
514
|
providers: [tuiAsDriver(TuiHintDescribe)],
|
|
578
515
|
}]
|
|
579
|
-
}], ctorParameters: () => []
|
|
580
|
-
type: Input
|
|
581
|
-
}], element: [] } });
|
|
516
|
+
}], ctorParameters: () => [] });
|
|
582
517
|
|
|
583
518
|
class TuiHintHost extends TuiRectAccessor {
|
|
584
519
|
constructor() {
|
|
585
520
|
super(...arguments);
|
|
521
|
+
this.tuiHintHost = input();
|
|
586
522
|
this.type = 'hint';
|
|
587
523
|
}
|
|
588
524
|
getClientRect() {
|
|
589
|
-
return this.tuiHintHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
|
|
525
|
+
return this.tuiHintHost()?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
|
|
590
526
|
}
|
|
591
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
592
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
528
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintHost, isStandalone: true, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: { classPropertyName: "tuiHintHost", publicName: "tuiHintHost", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsRectAccessor(TuiHintHost)], usesInheritance: true, ngImport: i0 }); }
|
|
593
529
|
}
|
|
594
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, decorators: [{
|
|
595
531
|
type: Directive,
|
|
596
532
|
args: [{
|
|
597
|
-
standalone: true,
|
|
598
533
|
selector: '[tuiHint][tuiHintHost]',
|
|
599
534
|
providers: [tuiAsRectAccessor(TuiHintHost)],
|
|
600
535
|
}]
|
|
601
|
-
}]
|
|
602
|
-
type: Input
|
|
603
|
-
}] } });
|
|
536
|
+
}] });
|
|
604
537
|
|
|
605
538
|
class TuiHintManual extends TuiDriver {
|
|
606
539
|
constructor() {
|
|
607
540
|
super((subscriber) => this.stream$.subscribe(subscriber));
|
|
608
541
|
this.hover = inject(TuiHintHover);
|
|
609
542
|
this.stream$ = new BehaviorSubject(false);
|
|
610
|
-
this.
|
|
543
|
+
this.visible = input(false, { alias: 'tuiHintManual' });
|
|
611
544
|
this.type = 'hint';
|
|
612
545
|
this.hover.enabled = false;
|
|
613
546
|
}
|
|
614
547
|
ngOnChanges() {
|
|
615
|
-
this.stream$.next(!!this.
|
|
616
|
-
this.hover.enabled = this.
|
|
548
|
+
this.stream$.next(!!this.visible());
|
|
549
|
+
this.hover.enabled = this.visible() === null;
|
|
617
550
|
}
|
|
618
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
619
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
551
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
552
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintManual, isStandalone: true, selector: "[tuiHint][tuiHintManual]", inputs: { visible: { classPropertyName: "visible", publicName: "tuiHintManual", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
620
553
|
}
|
|
621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, decorators: [{
|
|
622
555
|
type: Directive,
|
|
623
556
|
args: [{
|
|
624
|
-
standalone: true,
|
|
625
557
|
selector: '[tuiHint][tuiHintManual]',
|
|
626
558
|
providers: [tuiAsDriver(TuiHintManual)],
|
|
627
559
|
}]
|
|
628
|
-
}], ctorParameters: () => []
|
|
629
|
-
type: Input
|
|
630
|
-
}] } });
|
|
560
|
+
}], ctorParameters: () => [] });
|
|
631
561
|
|
|
632
562
|
class TuiHintOverflow {
|
|
633
563
|
constructor() {
|
|
634
564
|
this.hint = inject(TuiHintDirective);
|
|
635
|
-
this.
|
|
565
|
+
this.content = input('', { alias: 'tuiHintOverflow' });
|
|
636
566
|
}
|
|
637
567
|
onMouseEnter({ scrollWidth, clientWidth, textContent }) {
|
|
638
|
-
this.hint.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
: '';
|
|
568
|
+
tuiSetSignal(this.hint.content, scrollWidth > clientWidth && this.content() !== null
|
|
569
|
+
? this.content() || textContent
|
|
570
|
+
: '');
|
|
642
571
|
}
|
|
643
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
644
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
572
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
573
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintOverflow, isStandalone: true, selector: "[tuiHintOverflow]", inputs: { content: { classPropertyName: "content", publicName: "tuiHintOverflow", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance"] }], ngImport: i0 }); }
|
|
645
574
|
}
|
|
646
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, decorators: [{
|
|
647
576
|
type: Directive,
|
|
648
577
|
args: [{
|
|
649
|
-
standalone: true,
|
|
650
578
|
selector: '[tuiHintOverflow]',
|
|
651
579
|
hostDirectives: [
|
|
652
580
|
{
|
|
@@ -658,9 +586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
658
586
|
'(mouseenter)': 'onMouseEnter($event.currentTarget)',
|
|
659
587
|
},
|
|
660
588
|
}]
|
|
661
|
-
}]
|
|
662
|
-
type: Input
|
|
663
|
-
}] } });
|
|
589
|
+
}] });
|
|
664
590
|
|
|
665
591
|
const TuiHint = [
|
|
666
592
|
TuiHintComponent,
|
|
@@ -677,34 +603,9 @@ const TuiHint = [
|
|
|
677
603
|
TuiHintPointer,
|
|
678
604
|
];
|
|
679
605
|
|
|
680
|
-
class TuiHints {
|
|
681
|
-
constructor() {
|
|
682
|
-
this.hints$ = inject(TuiHintService);
|
|
683
|
-
this.destroyRef = inject(DestroyRef);
|
|
684
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
685
|
-
this.hints = [];
|
|
686
|
-
}
|
|
687
|
-
ngOnInit() {
|
|
688
|
-
// Due to this view being parallel to app content, `markForCheck` from `async` pipe
|
|
689
|
-
// can happen after view was checked, so calling `detectChanges` instead
|
|
690
|
-
this.hints$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hints) => {
|
|
691
|
-
this.hints = hints;
|
|
692
|
-
this.cdr.detectChanges();
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHints, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
696
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiHints, isStandalone: true, selector: "tui-hints", host: { attributes: { "aria-live": "polite" } }, ngImport: i0, template: "<div\n *ngFor=\"let hint of hints\"\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n>\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
697
|
-
}
|
|
698
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiHints, decorators: [{
|
|
699
|
-
type: Component,
|
|
700
|
-
args: [{ standalone: true, selector: 'tui-hints', imports: [NgForOf, PolymorpheusOutlet, TuiActiveZone, TuiAnimatedParent], changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
701
|
-
'aria-live': 'polite',
|
|
702
|
-
}, template: "<div\n *ngFor=\"let hint of hints\"\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n>\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"] }]
|
|
703
|
-
}] });
|
|
704
|
-
|
|
705
606
|
/**
|
|
706
607
|
* Generated bundle index. Do not edit.
|
|
707
608
|
*/
|
|
708
609
|
|
|
709
|
-
export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint,
|
|
610
|
+
export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition, TuiHintUnstyled, TuiHintUnstyledComponent, tuiHintOptionsProvider };
|
|
710
611
|
//# sourceMappingURL=taiga-ui-core-directives-hint.mjs.map
|