@taiga-ui/core 4.52.0-canary.6be767f → 4.52.0-canary.6ee9658
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/classes/accessors.d.ts +1 -1
- package/components/calendar/calendar-sheet.options.d.ts +1 -3
- package/components/data-list/data-list.component.d.ts +7 -9
- package/components/data-list/opt-group.directive.d.ts +2 -2
- package/components/data-list/option/option.directive.d.ts +5 -6
- package/components/dialog/dialog.component.d.ts +3 -4
- package/components/dialog/dialog.directive.d.ts +4 -3
- package/components/dialog/dialog.options.d.ts +2 -3
- package/components/dialog/dialog.providers.d.ts +1 -2
- package/components/dialog/dialog.service.d.ts +5 -2
- package/components/dialog/index.d.ts +0 -1
- package/components/error/error.component.d.ts +1 -1
- package/components/index.d.ts +1 -2
- package/components/link/link.directive.d.ts +2 -2
- package/components/link/link.options.d.ts +1 -3
- package/components/loader/loader.component.d.ts +7 -7
- package/components/loader/loader.options.d.ts +1 -3
- 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/index.d.ts +3 -0
- package/components/notification/notification.component.d.ts +14 -0
- package/components/notification/notification.d.ts +3 -0
- package/components/notification/notification.directive.d.ts +7 -12
- package/components/notification/notification.options.d.ts +10 -7
- package/components/notification/notification.service.d.ts +17 -0
- package/components/root/root.component.d.ts +2 -2
- 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/spin-button/spin-button.component.d.ts +8 -9
- package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +9 -13
- package/components/textfield/textfield.component.d.ts +20 -32
- package/components/textfield/textfield.directive.d.ts +13 -20
- package/components/textfield/textfield.options.d.ts +8 -11
- package/directives/alert/alert.directive.d.ts +11 -0
- package/directives/alert/alert.service.d.ts +12 -0
- package/directives/alert/index.d.ts +2 -0
- package/directives/appearance/appearance.directive.d.ts +1 -1
- package/directives/appearance/appearance.options.d.ts +1 -1
- package/directives/date-format/date-format.directive.d.ts +3 -7
- package/directives/dropdown/dropdown-hover.options.d.ts +1 -3
- package/directives/dropdown/dropdown-position.directive.d.ts +1 -1
- package/directives/dropdown/dropdown.directive.d.ts +1 -2
- package/directives/dropdown/index.d.ts +0 -2
- package/directives/group/group.options.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 +1 -1
- 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 +7 -6
- package/directives/hint/hint.directive.d.ts +9 -11
- package/directives/hint/index.d.ts +0 -2
- package/directives/index.d.ts +1 -0
- package/directives/number-format/number-format.directive.d.ts +3 -7
- package/fesm2022/taiga-ui-core-classes.mjs +2 -2
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +11 -16
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +41 -74
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +34 -91
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +4 -3
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +10 -16
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +14 -32
- 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 +98 -41
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +5 -17
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +36 -45
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +14 -27
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +120 -241
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +1 -2
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-alert.mjs +73 -0
- package/fesm2022/taiga-ui-core-directives-alert.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +6 -6
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +21 -78
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +4 -8
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +99 -189
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +3 -6
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +4 -4
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +1 -0
- package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -12
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +2 -2
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +20 -15
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +1 -0
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +17 -14
- package/pipes/format-number/format-number.pipe.d.ts +5 -3
- package/styles/components/link.less +1 -0
- package/styles/mixins/appearance.less +1 -1
- package/styles/mixins/mixins.less +0 -5
- package/styles/mixins/mixins.scss +0 -5
- package/styles/theme/variables.less +2 -4
- package/tokens/common-icons.d.ts +1 -3
- package/tokens/date-format.d.ts +2 -3
- package/tokens/i18n.d.ts +7 -7
- package/tokens/number-format.d.ts +2 -3
- package/types/index.d.ts +0 -1
- package/components/alert/alert.component.d.ts +0 -15
- package/components/alert/alert.directive.d.ts +0 -7
- package/components/alert/alert.interfaces.d.ts +0 -12
- package/components/alert/alert.service.d.ts +0 -7
- package/components/alert/alert.tokens.d.ts +0 -12
- package/components/alert/alerts.component.d.ts +0 -12
- package/components/alert/index.d.ts +0 -6
- package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
- package/components/dialog/dialogs.component.d.ts +0 -8
- package/components/header/header.directive.d.ts +0 -17
- package/components/header/index.d.ts +0 -1
- 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/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
- package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
- package/types/portal-item.d.ts +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, ChangeDetectorRef, INJECTOR, signal, TemplateRef, computed, ChangeDetectionStrategy, Component, PLATFORM_ID, ElementRef, ContentChild, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, ChangeDetectorRef, INJECTOR, signal, TemplateRef, computed, forwardRef, ChangeDetectionStrategy, Component, PLATFORM_ID, ElementRef, ContentChild, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { EMPTY_CLIENT_RECT, TUI_TRUE_HANDLER, CHAR_ZERO_WIDTH_SPACE, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
@@ -8,8 +8,8 @@ import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
|
8
8
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
9
9
|
import { tuiInjectElement, tuiGetActualTarget, tuiPointToClientRect, tuiIsElement, tuiIsHTMLElement, tuiIsElementEditable, tuiIsTextNode, tuiIsTextfield } from '@taiga-ui/cdk/utils/dom';
|
|
10
10
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
11
|
-
import {
|
|
12
|
-
import { TuiDriverDirective, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor,
|
|
11
|
+
import { tuiPure, tuiPx, tuiSetSignal, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
12
|
+
import { TuiDriverDirective, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor, tuiAsDriver, tuiAsRectAccessor, TuiDriver, tuiAsPositionAccessor } from '@taiga-ui/core/classes';
|
|
13
13
|
import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
14
14
|
import { TuiVisualViewportService, TuiPositionService } from '@taiga-ui/core/services';
|
|
15
15
|
import { TUI_VIEWPORT, TUI_DARK_MODE, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';
|
|
@@ -17,9 +17,10 @@ import { PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet } from
|
|
|
17
17
|
import { BehaviorSubject, Subject, throttleTime, takeWhile, map, merge, filter, fromEvent, switchMap, delay, startWith, takeUntil, distinctUntilChanged, of, tap, share, combineLatest } from 'rxjs';
|
|
18
18
|
import { coerceArray } from '@angular/cdk/coercion';
|
|
19
19
|
import { tuiZonefreeScheduler, tuiTypedFromEvent, tuiZonefree, tuiIfMap, tuiCloseWatcher, tuiZonefull, tuiWatch, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
|
20
|
+
import { TuiPopupService } from '@taiga-ui/core/directives/popup';
|
|
20
21
|
import { tuiOverrideOptions, tuiCheckFixedPosition, tuiGetWordRange } from '@taiga-ui/core/utils';
|
|
21
|
-
import { TuiPortalService, TuiPortals, tuiAsPortal } from '@taiga-ui/cdk/portals';
|
|
22
22
|
import { __decorate } from 'tslib';
|
|
23
|
+
import { tuiProvide, tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
|
|
23
24
|
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
24
25
|
import { TUI_IS_TOUCH, TUI_RANGE } from '@taiga-ui/cdk/tokens';
|
|
25
26
|
import { shouldCall } from '@taiga-ui/event-plugins';
|
|
@@ -48,10 +49,7 @@ class TuiDropdownDriverDirective extends TuiDriverDirective {
|
|
|
48
49
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownDriverDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
49
50
|
}
|
|
50
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownDriverDirective, decorators: [{
|
|
51
|
-
type: Directive
|
|
52
|
-
args: [{
|
|
53
|
-
standalone: true,
|
|
54
|
-
}]
|
|
52
|
+
type: Directive
|
|
55
53
|
}] });
|
|
56
54
|
|
|
57
55
|
/**
|
|
@@ -62,17 +60,6 @@ const TUI_DROPDOWN_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_COMP
|
|
|
62
60
|
});
|
|
63
61
|
const TUI_DROPDOWN_CONTEXT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_CONTEXT' : '');
|
|
64
62
|
|
|
65
|
-
class TuiDropdownService extends TuiPortalService {
|
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
67
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownService, providedIn: 'root' }); }
|
|
68
|
-
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownService, decorators: [{
|
|
70
|
-
type: Injectable,
|
|
71
|
-
args: [{
|
|
72
|
-
providedIn: 'root',
|
|
73
|
-
}]
|
|
74
|
-
}] });
|
|
75
|
-
|
|
76
63
|
/** Default values for dropdown options */
|
|
77
64
|
const TUI_DROPDOWN_DEFAULT_OPTIONS = {
|
|
78
65
|
align: 'left',
|
|
@@ -114,7 +101,6 @@ class TuiDropdownOptionsDirective {
|
|
|
114
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownOptionsDirective, decorators: [{
|
|
115
102
|
type: Directive,
|
|
116
103
|
args: [{
|
|
117
|
-
standalone: true,
|
|
118
104
|
selector: '[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
|
|
119
105
|
providers: [tuiProvide(TUI_DROPDOWN_OPTIONS, TuiDropdownOptionsDirective)],
|
|
120
106
|
}]
|
|
@@ -149,7 +135,9 @@ class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
149
135
|
this.viewport = inject(TUI_VIEWPORT);
|
|
150
136
|
this.directionChange = new EventEmitter();
|
|
151
137
|
this.type = 'dropdown';
|
|
152
|
-
this.accessor = tuiFallbackAccessor('dropdown')(inject(TuiRectAccessor
|
|
138
|
+
this.accessor = tuiFallbackAccessor('dropdown')(inject(TuiRectAccessor, { optional: true }), {
|
|
139
|
+
getClientRect: () => this.el.getBoundingClientRect(),
|
|
140
|
+
});
|
|
153
141
|
}
|
|
154
142
|
emitDirection(direction) {
|
|
155
143
|
this.directionChange.emit(direction);
|
|
@@ -158,7 +146,7 @@ class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
158
146
|
if (!width && !height) {
|
|
159
147
|
this.previous = undefined;
|
|
160
148
|
}
|
|
161
|
-
const hostRect = this.accessor
|
|
149
|
+
const hostRect = this.accessor.getClientRect();
|
|
162
150
|
const viewportRect = this.viewport.getClientRect();
|
|
163
151
|
const { minHeight, direction, offset, limitWidth } = this.options;
|
|
164
152
|
const align = this.getAlign(this.options.align);
|
|
@@ -209,10 +197,7 @@ __decorate([
|
|
|
209
197
|
tuiPure
|
|
210
198
|
], TuiDropdownPosition.prototype, "emitDirection", null);
|
|
211
199
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownPosition, decorators: [{
|
|
212
|
-
type: Directive
|
|
213
|
-
args: [{
|
|
214
|
-
standalone: true,
|
|
215
|
-
}]
|
|
200
|
+
type: Directive
|
|
216
201
|
}], propDecorators: { directionChange: [{
|
|
217
202
|
type: Output,
|
|
218
203
|
args: ['tuiDropdownDirectionChange']
|
|
@@ -221,7 +206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
221
206
|
class TuiDropdownDirective {
|
|
222
207
|
constructor() {
|
|
223
208
|
this.refresh$ = new Subject();
|
|
224
|
-
this.service = inject(
|
|
209
|
+
this.service = inject(TuiPopupService);
|
|
225
210
|
this.cdr = inject(ChangeDetectorRef);
|
|
226
211
|
// TODO: think of a better solution later
|
|
227
212
|
this.drivers = coerceArray(inject(TuiDropdownDriver, { self: true, optional: true }));
|
|
@@ -281,20 +266,13 @@ class TuiDropdownDirective {
|
|
|
281
266
|
this.cdr.markForCheck();
|
|
282
267
|
}
|
|
283
268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
284
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownDirective, isStandalone: true, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: { tuiDropdown: "tuiDropdown" }, host: { properties: { "class.tui-dropdown-open": "ref()" } }, providers: [
|
|
285
|
-
tuiAsRectAccessor(TuiDropdownDirective),
|
|
286
|
-
tuiAsVehicle(TuiDropdownDirective),
|
|
287
|
-
], exportAs: ["tuiDropdown"], hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownDirective, isStandalone: true, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: { tuiDropdown: "tuiDropdown" }, host: { properties: { "class.tui-dropdown-open": "ref()" } }, providers: [tuiAsVehicle(TuiDropdownDirective)], exportAs: ["tuiDropdown"], hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
288
270
|
}
|
|
289
271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownDirective, decorators: [{
|
|
290
272
|
type: Directive,
|
|
291
273
|
args: [{
|
|
292
|
-
standalone: true,
|
|
293
274
|
selector: '[tuiDropdown]:not(ng-container):not(ng-template)',
|
|
294
|
-
providers: [
|
|
295
|
-
tuiAsRectAccessor(TuiDropdownDirective),
|
|
296
|
-
tuiAsVehicle(TuiDropdownDirective),
|
|
297
|
-
],
|
|
275
|
+
providers: [tuiAsVehicle(TuiDropdownDirective)],
|
|
298
276
|
exportAs: 'tuiDropdown',
|
|
299
277
|
hostDirectives: [
|
|
300
278
|
TuiDropdownDriverDirective,
|
|
@@ -366,7 +344,7 @@ class TuiDropdownComponent {
|
|
|
366
344
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownComponent, isStandalone: true, selector: "tui-dropdown", host: { properties: { "attr.data-appearance": "options.appearance", "attr.tuiTheme": "theme()" } }, providers: [
|
|
367
345
|
TuiPositionService,
|
|
368
346
|
tuiPositionAccessorFor('dropdown', TuiDropdownPosition),
|
|
369
|
-
tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
347
|
+
tuiRectAccessorFor('dropdown', forwardRef(() => TuiDropdownDirective)),
|
|
370
348
|
], hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<tui-scrollbar class=\"t-scroll\">\n <div\n *polymorpheusOutlet=\"directive._content() as text; context: {$implicit: close}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n</tui-scrollbar>\n", styles: [":host{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;isolation:isolate;pointer-events:auto;--tui-from: translateY(-1rem)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:100%;inline-size:max-content;overscroll-behavior:none}.t-primitive{padding:1rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
371
349
|
}
|
|
372
350
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownComponent, decorators: [{
|
|
@@ -374,7 +352,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
374
352
|
args: [{ selector: 'tui-dropdown', imports: [PolymorpheusOutlet, TuiScrollbar], changeDetection: ChangeDetectionStrategy.Default, providers: [
|
|
375
353
|
TuiPositionService,
|
|
376
354
|
tuiPositionAccessorFor('dropdown', TuiDropdownPosition),
|
|
377
|
-
tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
355
|
+
tuiRectAccessorFor('dropdown', forwardRef(() => TuiDropdownDirective)),
|
|
378
356
|
], hostDirectives: [TuiActiveZone, TuiAnimated], host: {
|
|
379
357
|
'[attr.data-appearance]': 'options.appearance',
|
|
380
358
|
'[attr.tuiTheme]': 'theme()',
|
|
@@ -399,7 +377,6 @@ class TuiDropdownContent {
|
|
|
399
377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownContent, decorators: [{
|
|
400
378
|
type: Directive,
|
|
401
379
|
args: [{
|
|
402
|
-
standalone: true,
|
|
403
380
|
selector: 'ng-template[tuiDropdown]',
|
|
404
381
|
}]
|
|
405
382
|
}], ctorParameters: () => [] });
|
|
@@ -447,7 +424,6 @@ __decorate([
|
|
|
447
424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownContext, decorators: [{
|
|
448
425
|
type: Directive,
|
|
449
426
|
args: [{
|
|
450
|
-
standalone: true,
|
|
451
427
|
selector: '[tuiDropdownContext]',
|
|
452
428
|
providers: [
|
|
453
429
|
TuiActiveZone,
|
|
@@ -473,12 +449,7 @@ const TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
|
|
|
473
449
|
/**
|
|
474
450
|
* Default parameters for dropdown hover directive
|
|
475
451
|
*/
|
|
476
|
-
const TUI_DROPDOWN_HOVER_OPTIONS =
|
|
477
|
-
factory: () => TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS,
|
|
478
|
-
});
|
|
479
|
-
function tuiDropdownHoverOptionsProvider(options) {
|
|
480
|
-
return tuiProvideOptions(TUI_DROPDOWN_HOVER_OPTIONS, options, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
|
|
481
|
-
}
|
|
452
|
+
const [TUI_DROPDOWN_HOVER_OPTIONS, tuiDropdownHoverOptionsProvider] = tuiCreateOptions(TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS);
|
|
482
453
|
|
|
483
454
|
function shouldClose(event) {
|
|
484
455
|
return (
|
|
@@ -503,7 +474,7 @@ class TuiDropdownOpen {
|
|
|
503
474
|
// TODO: make it private when all legacy controls will be deleted from @taiga-ui/legacy (5.0)
|
|
504
475
|
this.driver = inject(TuiDropdownDriver);
|
|
505
476
|
this.sub = this.driver
|
|
506
|
-
.pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured
|
|
477
|
+
.pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured$.pipe(filter(Boolean)), this.activeZone.tuiActiveZoneChange.pipe(filter((a) => !a)), fromEvent(this.el, 'focusin').pipe(filter((event) => !this.host.contains(tuiGetActualTarget(event)) ||
|
|
507
478
|
!this.directive.ref())))), tuiZonefull(), tuiWatch(), takeUntilDestroyed())
|
|
508
479
|
.subscribe(() => this.toggle(false));
|
|
509
480
|
this.sync = this.driver.pipe(takeUntilDestroyed()).subscribe((open) => {
|
|
@@ -574,7 +545,7 @@ class TuiDropdownOpen {
|
|
|
574
545
|
this.drive();
|
|
575
546
|
}
|
|
576
547
|
drive(open = !!this.tuiDropdownOpen && this.tuiDropdownEnabled) {
|
|
577
|
-
this.obscured.tuiObscuredEnabled
|
|
548
|
+
tuiSetSignal(this.obscured.tuiObscuredEnabled, open);
|
|
578
549
|
this.driver.next(open);
|
|
579
550
|
}
|
|
580
551
|
focusDropdown(previous) {
|
|
@@ -599,7 +570,6 @@ __decorate([
|
|
|
599
570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownOpen, decorators: [{
|
|
600
571
|
type: Directive,
|
|
601
572
|
args: [{
|
|
602
|
-
standalone: true,
|
|
603
573
|
selector: '[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]',
|
|
604
574
|
providers: [TuiDropdownDriver, tuiAsDriver(TuiDropdownDriver)],
|
|
605
575
|
hostDirectives: [
|
|
@@ -670,7 +640,6 @@ class TuiDropdownHover extends TuiDriver {
|
|
|
670
640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownHover, decorators: [{
|
|
671
641
|
type: Directive,
|
|
672
642
|
args: [{
|
|
673
|
-
standalone: true,
|
|
674
643
|
selector: '[tuiDropdownHover]',
|
|
675
644
|
providers: [TuiActiveZone, tuiAsDriver(TuiDropdownHover)],
|
|
676
645
|
host: {
|
|
@@ -702,7 +671,6 @@ class TuiDropdownManual {
|
|
|
702
671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownManual, decorators: [{
|
|
703
672
|
type: Directive,
|
|
704
673
|
args: [{
|
|
705
|
-
standalone: true,
|
|
706
674
|
selector: '[tuiDropdownManual]',
|
|
707
675
|
providers: [TuiDropdownDriver, tuiAsDriver(TuiDropdownDriver)],
|
|
708
676
|
}]
|
|
@@ -730,7 +698,6 @@ class TuiDropdownOpenLegacy {
|
|
|
730
698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownOpenLegacy, decorators: [{
|
|
731
699
|
type: Directive,
|
|
732
700
|
args: [{
|
|
733
|
-
standalone: true,
|
|
734
701
|
selector: '[tuiDropdownOpen]:not([tuiDropdown]),[tuiDropdownOpenChange]:not([tuiDropdown])',
|
|
735
702
|
}]
|
|
736
703
|
}], propDecorators: { tuiDropdownOpenChange: [{
|
|
@@ -790,7 +757,6 @@ class TuiDropdownPositionSided extends TuiPositionAccessor {
|
|
|
790
757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownPositionSided, decorators: [{
|
|
791
758
|
type: Directive,
|
|
792
759
|
args: [{
|
|
793
|
-
standalone: true,
|
|
794
760
|
selector: '[tuiDropdownSided]',
|
|
795
761
|
providers: [TuiDropdownPosition, tuiAsPositionAccessor(TuiDropdownPositionSided)],
|
|
796
762
|
}]
|
|
@@ -931,7 +897,6 @@ class TuiDropdownSelection extends TuiDriver {
|
|
|
931
897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownSelection, decorators: [{
|
|
932
898
|
type: Directive,
|
|
933
899
|
args: [{
|
|
934
|
-
standalone: true,
|
|
935
900
|
selector: '[tuiDropdownSelection]',
|
|
936
901
|
providers: [
|
|
937
902
|
tuiAsDriver(TuiDropdownSelection),
|
|
@@ -986,7 +951,6 @@ class TuiDropdownFixed {
|
|
|
986
951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownFixed, decorators: [{
|
|
987
952
|
type: Directive,
|
|
988
953
|
args: [{
|
|
989
|
-
standalone: true,
|
|
990
954
|
providers: [tuiDropdownOptionsProvider({})],
|
|
991
955
|
}]
|
|
992
956
|
}], ctorParameters: () => [] });
|
|
@@ -1002,29 +966,9 @@ class TuiDropdownAuto {
|
|
|
1002
966
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownAuto, isStandalone: true, ngImport: i0 }); }
|
|
1003
967
|
}
|
|
1004
968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownAuto, decorators: [{
|
|
1005
|
-
type: Directive
|
|
1006
|
-
args: [{ standalone: true }]
|
|
969
|
+
type: Directive
|
|
1007
970
|
}], ctorParameters: () => [] });
|
|
1008
971
|
|
|
1009
|
-
/**
|
|
1010
|
-
* Host element for dynamically created portals, for example using {@link TuiDropdownDirective}.
|
|
1011
|
-
*/
|
|
1012
|
-
class TuiDropdowns extends TuiPortals {
|
|
1013
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdowns, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1014
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdowns, isStandalone: true, selector: "tui-dropdowns", host: { styleAttribute: "position: absolute; width: 100%; top: 0" }, providers: [tuiAsPortal(TuiDropdownService)], usesInheritance: true, ngImport: i0, template: '<ng-container #vcr />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1015
|
-
}
|
|
1016
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdowns, decorators: [{
|
|
1017
|
-
type: Component,
|
|
1018
|
-
args: [{
|
|
1019
|
-
standalone: true,
|
|
1020
|
-
selector: 'tui-dropdowns',
|
|
1021
|
-
template: '<ng-container #vcr />',
|
|
1022
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1023
|
-
providers: [tuiAsPortal(TuiDropdownService)],
|
|
1024
|
-
host: { style: 'position: absolute; width: 100%; top: 0' },
|
|
1025
|
-
}]
|
|
1026
|
-
}] });
|
|
1027
|
-
|
|
1028
972
|
class TuiWithDropdownOpen {
|
|
1029
973
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithDropdownOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1030
974
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiWithDropdownOpen, isStandalone: true, hostDirectives: [{ directive: TuiDropdownOpen, inputs: ["tuiDropdownOpen", "open", "tuiDropdownEnabled", "tuiDropdownEnabled"], outputs: ["tuiDropdownOpenChange", "openChange"] }], ngImport: i0 }); }
|
|
@@ -1032,7 +976,6 @@ class TuiWithDropdownOpen {
|
|
|
1032
976
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithDropdownOpen, decorators: [{
|
|
1033
977
|
type: Directive,
|
|
1034
978
|
args: [{
|
|
1035
|
-
standalone: true,
|
|
1036
979
|
hostDirectives: [
|
|
1037
980
|
{
|
|
1038
981
|
directive: TuiDropdownOpen,
|
|
@@ -1047,5 +990,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1047
990
|
* Generated bundle index. Do not edit.
|
|
1048
991
|
*/
|
|
1049
992
|
|
|
1050
|
-
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownAuto, TuiDropdownComponent, TuiDropdownContent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOpenLegacy, TuiDropdownOptionsDirective, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection,
|
|
993
|
+
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownAuto, TuiDropdownComponent, TuiDropdownContent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOpenLegacy, TuiDropdownOptionsDirective, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection, TuiWithDropdownOpen, tuiDropdown, tuiDropdownEnabled, tuiDropdownHoverOptionsProvider, tuiDropdownOpen, tuiDropdownOptionsProvider };
|
|
1051
994
|
//# sourceMappingURL=taiga-ui-core-directives-dropdown.mjs.map
|