@taiga-ui/core 5.0.0-rc.4 → 5.0.0-rc.5
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/calendar/calendar-sheet.component.d.ts +1 -9
- package/components/calendar/calendar.component.d.ts +11 -21
- package/components/carousel/carousel.component.d.ts +20 -0
- package/components/carousel/carousel.d.ts +4 -0
- package/components/carousel/carousel.directive.d.ts +11 -0
- package/components/carousel/index.d.ts +3 -0
- package/components/error/error.directive.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/directives/appearance/appearance.options.d.ts +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-button.mjs +8 -8
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +51 -107
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-carousel.mjs +100 -0
- package/fesm2022/taiga-ui-core-components-carousel.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-cell.mjs +9 -7
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-checkbox.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +23 -20
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +10 -10
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +5 -5
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +8 -7
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-input.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +8 -8
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +18 -18
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-radio.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +22 -22
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-slider.mjs +17 -17
- package/fesm2022/taiga-ui-core-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +57 -29
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +1 -0
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-button-x.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-button-x.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-group.mjs +7 -7
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +9 -9
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- 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-pipes-filter-by-input.mjs +55 -0
- package/fesm2022/taiga-ui-core-pipes-filter-by-input.mjs.map +1 -0
- 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.mjs +1 -0
- package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-alert.mjs +12 -10
- package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +16 -15
- package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs +236 -223
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-hint.mjs +38 -38
- package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-modal.mjs +10 -8
- package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-popup.mjs +10 -10
- package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-services.mjs +6 -6
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +4 -2
- 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.map +1 -1
- package/package.json +33 -11
- package/pipes/filter-by-input/filter-by-input.options.d.ts +6 -0
- package/pipes/filter-by-input/filter-by-input.pipe.d.ts +19 -0
- package/pipes/filter-by-input/index.d.ts +2 -0
- package/pipes/index.d.ts +1 -0
- package/portals/dropdown/dropdown-a11y.directive.d.ts +2 -2
- package/portals/dropdown/dropdown-open.directive.d.ts +6 -6
- package/portals/dropdown/dropdown.directive.d.ts +3 -3
- package/portals/dropdown/dropdown.providers.d.ts +2 -1
- package/portals/dropdown/index.d.ts +1 -1
- package/tokens/index.d.ts +1 -0
- package/tokens/textfield.d.ts +2 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
|
+
import { tuiProvide, tuiDirectiveBinding, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
2
|
+
import { coerceArray } from '@angular/cdk/coercion';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject,
|
|
4
|
+
import { Injectable, Directive, InjectionToken, Optional, Self, SkipSelf, inject, computed, forwardRef, ChangeDetectionStrategy, Component, input, effect, ChangeDetectorRef, signal, INJECTOR, TemplateRef, ElementRef, contentChild, model, PLATFORM_ID, ViewContainerRef } from '@angular/core';
|
|
3
5
|
import { outputFromObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { tuiZonefreeScheduler, tuiIfMap, tuiCloseWatcher, tuiTypedFromEvent, tuiStopPropagation, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
|
7
|
+
import { tuiInjectElement, tuiGetActualTarget, tuiIsElement, tuiIsElementEditable, tuiIsHTMLElement, tuiPointToClientRect, tuiIsTextNode, tuiIsTextfield } from '@taiga-ui/cdk/utils/dom';
|
|
8
|
+
import { TuiDriverDirective, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, tuiAsVehicle, tuiAsDriver, tuiAsRectAccessor, TuiDriver, tuiAsPositionAccessor } from '@taiga-ui/core/classes';
|
|
9
|
+
import { TuiPopupService } from '@taiga-ui/core/portals/popup';
|
|
10
|
+
import { tuiCheckFixedPosition, tuiGetWordRange } from '@taiga-ui/core/utils/dom';
|
|
11
|
+
import { PolymorpheusOutlet, PolymorpheusComponent, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
|
|
12
|
+
import { BehaviorSubject, Subject, distinctUntilChanged, takeWhile, map, throttleTime, merge, filter, EMPTY, switchMap, delay, startWith, takeUntil, fromEvent, of, tap, share, combineLatest } from 'rxjs';
|
|
4
13
|
import { EMPTY_CLIENT_RECT, TUI_TRUE_HANDLER, CHAR_ZERO_WIDTH_SPACE, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
|
|
5
14
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
6
15
|
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
7
16
|
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
8
17
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
9
|
-
import { tuiInjectElement, tuiGetActualTarget, tuiIsElement, tuiIsElementEditable, tuiIsHTMLElement, tuiPointToClientRect, tuiIsTextNode, tuiIsTextfield } from '@taiga-ui/cdk/utils/dom';
|
|
10
18
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
11
|
-
import {
|
|
12
|
-
import { TuiDriverDirective, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor, tuiAsDriver, tuiAsRectAccessor, TuiDriver, tuiAsPositionAccessor } from '@taiga-ui/core/classes';
|
|
19
|
+
import { tuiPx, tuiGenerateId, tuiSetSignal, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
20
|
import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
14
21
|
import { TuiVisualViewportService, TuiPositionService } from '@taiga-ui/core/services';
|
|
15
22
|
import { TUI_VIEWPORT, TUI_DARK_MODE, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';
|
|
16
|
-
import { PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
17
|
-
import { BehaviorSubject, Subject, distinctUntilChanged, throttleTime, takeWhile, map, merge, filter, EMPTY, switchMap, delay, startWith, takeUntil, fromEvent, of, tap, share, combineLatest } from 'rxjs';
|
|
18
|
-
import { coerceArray } from '@angular/cdk/coercion';
|
|
19
|
-
import { tuiZonefreeScheduler, tuiIfMap, tuiCloseWatcher, tuiTypedFromEvent, tuiStopPropagation, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
|
20
|
-
import { TuiPopupService } from '@taiga-ui/core/portals/popup';
|
|
21
|
-
import { tuiCheckFixedPosition, tuiGetWordRange } from '@taiga-ui/core/utils/dom';
|
|
22
|
-
import { tuiProvide, tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
|
|
23
23
|
import { tuiOverrideOptions, tuiIsEditingKey } from '@taiga-ui/core/utils/miscellaneous';
|
|
24
24
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
25
25
|
import * as i1$1 from '@taiga-ui/cdk/directives/obscured';
|
|
@@ -32,10 +32,10 @@ class TuiDropdownDriver extends BehaviorSubject {
|
|
|
32
32
|
super(false);
|
|
33
33
|
this.type = 'dropdown';
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
36
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDriver }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDriver, decorators: [{
|
|
39
39
|
type: Injectable
|
|
40
40
|
}], ctorParameters: () => [] });
|
|
41
41
|
class TuiDropdownDriverDirective extends TuiDriverDirective {
|
|
@@ -43,19 +43,13 @@ class TuiDropdownDriverDirective extends TuiDriverDirective {
|
|
|
43
43
|
super(...arguments);
|
|
44
44
|
this.type = 'dropdown';
|
|
45
45
|
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
47
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDriverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
47
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownDriverDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDriverDirective, decorators: [{
|
|
50
50
|
type: Directive
|
|
51
51
|
}] });
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
* A component to display a dropdown
|
|
55
|
-
*/
|
|
56
|
-
const TUI_DROPDOWN_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_COMPONENT' : '', { factory: () => TuiDropdownComponent });
|
|
57
|
-
const TUI_DROPDOWN_CONTEXT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_CONTEXT' : '');
|
|
58
|
-
|
|
59
53
|
const TUI_DROPDOWN_DEFAULT_OPTIONS = {
|
|
60
54
|
align: 'start',
|
|
61
55
|
direction: null,
|
|
@@ -85,10 +79,10 @@ class TuiDropdownOptionsDirective {
|
|
|
85
79
|
this.maxHeight = this.options.maxHeight;
|
|
86
80
|
this.offset = this.options.offset;
|
|
87
81
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
89
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownOptionsDirective, isStandalone: true, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], appearance: ["tuiDropdownAppearance", "appearance"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [tuiProvide(TUI_DROPDOWN_OPTIONS, TuiDropdownOptionsDirective)], ngImport: i0 }); }
|
|
90
84
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownOptionsDirective, decorators: [{
|
|
92
86
|
type: Directive,
|
|
93
87
|
args: [{
|
|
94
88
|
selector: '[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
|
|
@@ -170,88 +164,13 @@ class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
170
164
|
}
|
|
171
165
|
return align === 'end' ? 'right' : 'left';
|
|
172
166
|
}
|
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
174
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
168
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownPosition, isStandalone: true, outputs: { tuiDropdownDirectionChange: "tuiDropdownDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
175
169
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownPosition, decorators: [{
|
|
177
171
|
type: Directive
|
|
178
172
|
}] });
|
|
179
173
|
|
|
180
|
-
class TuiDropdownDirective {
|
|
181
|
-
constructor() {
|
|
182
|
-
this.refresh$ = new Subject();
|
|
183
|
-
this.service = inject(TuiPopupService);
|
|
184
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
185
|
-
this.drivers = coerceArray(inject(TuiDropdownDriver, { self: true, optional: true }));
|
|
186
|
-
this.sub = this.refresh$
|
|
187
|
-
.pipe(throttleTime(0, tuiZonefreeScheduler()), takeUntilDestroyed())
|
|
188
|
-
.subscribe(() => {
|
|
189
|
-
this.ref()?.changeDetectorRef.detectChanges();
|
|
190
|
-
this.ref()?.changeDetectorRef.markForCheck();
|
|
191
|
-
});
|
|
192
|
-
this.autoClose = effect(() => {
|
|
193
|
-
if (!this.content()) {
|
|
194
|
-
this.toggle(false);
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
this.id = tuiGenerateId();
|
|
198
|
-
this.ref = signal(null);
|
|
199
|
-
this.el = tuiInjectElement();
|
|
200
|
-
this.type = 'dropdown';
|
|
201
|
-
this.component = new PolymorpheusComponent(inject(TUI_DROPDOWN_COMPONENT), inject(INJECTOR));
|
|
202
|
-
this.content = input(null, {
|
|
203
|
-
alias: 'tuiDropdown',
|
|
204
|
-
transform: (content) => content instanceof TemplateRef
|
|
205
|
-
? new PolymorpheusTemplate(content, this.cdr)
|
|
206
|
-
: content,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
get position() {
|
|
210
|
-
return tuiCheckFixedPosition(this.el) ? 'fixed' : 'absolute';
|
|
211
|
-
}
|
|
212
|
-
ngAfterViewChecked() {
|
|
213
|
-
if (this.ref()) {
|
|
214
|
-
this.refresh$.next();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
ngOnDestroy() {
|
|
218
|
-
this.toggle(false);
|
|
219
|
-
}
|
|
220
|
-
getClientRect() {
|
|
221
|
-
return this.el.getBoundingClientRect();
|
|
222
|
-
}
|
|
223
|
-
toggle(show) {
|
|
224
|
-
const ref = this.ref();
|
|
225
|
-
if (show && this.content() && !ref) {
|
|
226
|
-
this.ref.set(this.service.add(this.component));
|
|
227
|
-
}
|
|
228
|
-
else if (!show && ref) {
|
|
229
|
-
this.ref.set(null);
|
|
230
|
-
ref.destroy();
|
|
231
|
-
}
|
|
232
|
-
this.ref()?.location.nativeElement.setAttribute('id', this.id);
|
|
233
|
-
this.drivers.forEach((driver) => driver?.next(show));
|
|
234
|
-
}
|
|
235
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
236
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiDropdownDirective, isStandalone: true, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: { content: { classPropertyName: "content", publicName: "tuiDropdown", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.tui-dropdown-open": "ref()" } }, providers: [tuiAsVehicle(TuiDropdownDirective)], exportAs: ["tuiDropdown"], hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
237
|
-
}
|
|
238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownDirective, decorators: [{
|
|
239
|
-
type: Directive,
|
|
240
|
-
args: [{
|
|
241
|
-
selector: '[tuiDropdown]:not(ng-container):not(ng-template)',
|
|
242
|
-
providers: [tuiAsVehicle(TuiDropdownDirective)],
|
|
243
|
-
exportAs: 'tuiDropdown',
|
|
244
|
-
hostDirectives: [
|
|
245
|
-
TuiDropdownDriverDirective,
|
|
246
|
-
{
|
|
247
|
-
directive: TuiDropdownPosition,
|
|
248
|
-
outputs: ['tuiDropdownDirectionChange'],
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
host: { '[class.tui-dropdown-open]': 'ref()' },
|
|
252
|
-
}]
|
|
253
|
-
}] });
|
|
254
|
-
|
|
255
174
|
const MAX_WIDTH_GAP = 16; // 8px min gap from each side
|
|
256
175
|
/**
|
|
257
176
|
* @description:
|
|
@@ -305,14 +224,14 @@ class TuiDropdownComponent {
|
|
|
305
224
|
maxWidth: tuiPx(Math.round(viewport.width / zoom) - MAX_WIDTH_GAP),
|
|
306
225
|
};
|
|
307
226
|
}
|
|
308
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
309
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
228
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownComponent, isStandalone: true, selector: "tui-dropdown", host: { properties: { "attr.data-appearance": "options.appearance", "attr.tuiTheme": "theme()" } }, providers: [
|
|
310
229
|
TuiPositionService,
|
|
311
230
|
tuiPositionAccessorFor('dropdown', TuiDropdownPosition),
|
|
312
231
|
tuiRectAccessorFor('dropdown', forwardRef(() => TuiDropdownDirective)),
|
|
313
232
|
], 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:has(tui-data-list[data-size=l]){border-radius:var(--tui-radius-l)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:calc(100% + 2px);inline-size:max-content;overscroll-behavior:none;margin:-1px}.t-primitive{padding:1rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
314
233
|
}
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownComponent, decorators: [{
|
|
316
235
|
type: Component,
|
|
317
236
|
args: [{ selector: 'tui-dropdown', imports: [PolymorpheusOutlet, TuiScrollbar], changeDetection: ChangeDetectionStrategy.Default, providers: [
|
|
318
237
|
TuiPositionService,
|
|
@@ -324,6 +243,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
324
243
|
}, 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:has(tui-data-list[data-size=l]){border-radius:var(--tui-radius-l)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:not([style*=top]){visibility:hidden}.t-scroll{flex-grow:1;max-inline-size:calc(100% + 2px);inline-size:max-content;overscroll-behavior:none;margin:-1px}.t-primitive{padding:1rem}\n"] }]
|
|
325
244
|
}] });
|
|
326
245
|
|
|
246
|
+
/**
|
|
247
|
+
* A component to display a dropdown
|
|
248
|
+
*/
|
|
249
|
+
const TUI_DROPDOWN_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_COMPONENT' : '', { factory: () => TuiDropdownComponent });
|
|
250
|
+
const TUI_DROPDOWN_CONTEXT = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_CONTEXT' : '');
|
|
251
|
+
const TUI_DROPDOWN_HOST = new InjectionToken(ngDevMode ? 'TUI_DROPDOWN_HOST' : '');
|
|
252
|
+
|
|
253
|
+
class TuiDropdownA11y {
|
|
254
|
+
constructor() {
|
|
255
|
+
this.id = tuiGenerateId();
|
|
256
|
+
this.host = inject(TUI_DROPDOWN_HOST);
|
|
257
|
+
this.dropdown = inject(TuiDropdownDirective);
|
|
258
|
+
this.tuiDropdownRole = input('listbox');
|
|
259
|
+
this.sync = effect(() => {
|
|
260
|
+
const content = this.dropdown.content();
|
|
261
|
+
const dropdown = this.dropdown.ref();
|
|
262
|
+
const host = this.host.nativeElement;
|
|
263
|
+
host.setAttribute('aria-expanded', String(!!dropdown));
|
|
264
|
+
host.setAttribute('aria-controls', this.id);
|
|
265
|
+
host.setAttribute('aria-haspopup', this.tuiDropdownRole());
|
|
266
|
+
dropdown?.location.nativeElement.setAttribute('id', this.id);
|
|
267
|
+
dropdown?.location.nativeElement.setAttribute('role', this.tuiDropdownRole());
|
|
268
|
+
if (content) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
host.removeAttribute('aria-expanded');
|
|
272
|
+
host.removeAttribute('aria-controls');
|
|
273
|
+
host.removeAttribute('aria-haspopup');
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownA11y, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
277
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: TuiDropdownA11y, isStandalone: true, selector: "[tuiDropdownA11y]", inputs: { tuiDropdownRole: { classPropertyName: "tuiDropdownRole", publicName: "tuiDropdownRole", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownA11y, decorators: [{
|
|
280
|
+
type: Directive,
|
|
281
|
+
args: [{ selector: '[tuiDropdownA11y]' }]
|
|
282
|
+
}] });
|
|
283
|
+
|
|
284
|
+
class TuiDropdownDirective {
|
|
285
|
+
constructor() {
|
|
286
|
+
this.refresh$ = new Subject();
|
|
287
|
+
this.service = inject(TuiPopupService);
|
|
288
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
289
|
+
this.drivers = coerceArray(inject(TuiDropdownDriver, { self: true, optional: true }));
|
|
290
|
+
this.sub = this.refresh$
|
|
291
|
+
.pipe(throttleTime(0, tuiZonefreeScheduler()), takeUntilDestroyed())
|
|
292
|
+
.subscribe(() => {
|
|
293
|
+
this.ref()?.changeDetectorRef.detectChanges();
|
|
294
|
+
this.ref()?.changeDetectorRef.markForCheck();
|
|
295
|
+
});
|
|
296
|
+
this.autoClose = effect(() => {
|
|
297
|
+
if (!this.content()) {
|
|
298
|
+
this.toggle(false);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
this.ref = signal(null);
|
|
302
|
+
this.el = tuiInjectElement();
|
|
303
|
+
this.type = 'dropdown';
|
|
304
|
+
this.component = new PolymorpheusComponent(inject(TUI_DROPDOWN_COMPONENT), inject(INJECTOR));
|
|
305
|
+
this.content = input(null, {
|
|
306
|
+
alias: 'tuiDropdown',
|
|
307
|
+
transform: (content) => content instanceof TemplateRef
|
|
308
|
+
? new PolymorpheusTemplate(content, this.cdr)
|
|
309
|
+
: content,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
get position() {
|
|
313
|
+
return tuiCheckFixedPosition(this.el) ? 'fixed' : 'absolute';
|
|
314
|
+
}
|
|
315
|
+
ngAfterViewChecked() {
|
|
316
|
+
if (this.ref()) {
|
|
317
|
+
this.refresh$.next();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
ngOnDestroy() {
|
|
321
|
+
this.toggle(false);
|
|
322
|
+
}
|
|
323
|
+
getClientRect() {
|
|
324
|
+
return this.el.getBoundingClientRect();
|
|
325
|
+
}
|
|
326
|
+
toggle(show) {
|
|
327
|
+
const ref = this.ref();
|
|
328
|
+
if (show && this.content() && !ref) {
|
|
329
|
+
this.ref.set(this.service.add(this.component));
|
|
330
|
+
}
|
|
331
|
+
else if (!show && ref) {
|
|
332
|
+
this.ref.set(null);
|
|
333
|
+
ref.destroy();
|
|
334
|
+
}
|
|
335
|
+
this.drivers.forEach((driver) => driver?.next(show));
|
|
336
|
+
}
|
|
337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
338
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: TuiDropdownDirective, isStandalone: true, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: { content: { classPropertyName: "content", publicName: "tuiDropdown", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.tui-dropdown-open": "ref()" } }, providers: [
|
|
339
|
+
tuiAsVehicle(TuiDropdownDirective),
|
|
340
|
+
tuiProvide(TUI_DROPDOWN_HOST, ElementRef),
|
|
341
|
+
], exportAs: ["tuiDropdown"], hostDirectives: [{ directive: TuiDropdownDriverDirective }, { directive: TuiDropdownA11y, inputs: ["tuiDropdownRole", "tuiDropdownRole"] }, { directive: TuiDropdownPosition, outputs: ["tuiDropdownDirectionChange", "tuiDropdownDirectionChange"] }], ngImport: i0 }); }
|
|
342
|
+
}
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownDirective, decorators: [{
|
|
344
|
+
type: Directive,
|
|
345
|
+
args: [{
|
|
346
|
+
selector: '[tuiDropdown]:not(ng-container):not(ng-template)',
|
|
347
|
+
providers: [
|
|
348
|
+
tuiAsVehicle(TuiDropdownDirective),
|
|
349
|
+
tuiProvide(TUI_DROPDOWN_HOST, ElementRef),
|
|
350
|
+
],
|
|
351
|
+
exportAs: 'tuiDropdown',
|
|
352
|
+
hostDirectives: [
|
|
353
|
+
TuiDropdownDriverDirective,
|
|
354
|
+
{ directive: TuiDropdownA11y, inputs: ['tuiDropdownRole'] },
|
|
355
|
+
{
|
|
356
|
+
directive: TuiDropdownPosition,
|
|
357
|
+
outputs: ['tuiDropdownDirectionChange'],
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
host: { '[class.tui-dropdown-open]': 'ref()' },
|
|
361
|
+
}]
|
|
362
|
+
}] });
|
|
363
|
+
|
|
327
364
|
class TuiDropdownClose {
|
|
328
365
|
constructor() {
|
|
329
366
|
this.el = tuiInjectElement();
|
|
@@ -331,8 +368,7 @@ class TuiDropdownClose {
|
|
|
331
368
|
this.open = inject(TuiDropdownOpen);
|
|
332
369
|
this.obscured = inject(TuiObscured);
|
|
333
370
|
this.activeZone = inject(TuiActiveZone);
|
|
334
|
-
this.tuiDropdownClose = outputFromObservable(merge(inject(TuiDropdownDriver).pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured$.pipe(filter(Boolean)), this.activeZone.tuiActiveZoneChange.pipe(filter((a) => !a)), tuiTypedFromEvent(this.el, 'focusin').pipe(filter((event) => !this.open.
|
|
335
|
-
!this.ref()))))),
|
|
371
|
+
this.tuiDropdownClose = outputFromObservable(merge(inject(TuiDropdownDriver).pipe(tuiIfMap(() => merge(tuiCloseWatcher(), this.obscured.tuiObscured$.pipe(filter(Boolean)), this.activeZone.tuiActiveZoneChange.pipe(filter((a) => !a)), tuiTypedFromEvent(this.el, 'focusin').pipe(filter((event) => !this.open.nativeElement.contains(tuiGetActualTarget(event)) || !this.ref()))))),
|
|
336
372
|
// @ts-ignore
|
|
337
373
|
typeof CloseWatcher === 'undefined'
|
|
338
374
|
? tuiTypedFromEvent(inject(DOCUMENT), 'keydown', { capture: true }).pipe(filter(({ key }) => key === 'Escape' &&
|
|
@@ -340,10 +376,10 @@ class TuiDropdownClose {
|
|
|
340
376
|
!this.ref()?.location.nativeElement?.nextElementSibling), tuiStopPropagation())
|
|
341
377
|
: EMPTY));
|
|
342
378
|
}
|
|
343
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
344
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
380
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownClose, isStandalone: true, outputs: { tuiDropdownClose: "tuiDropdownClose" }, ngImport: i0 }); }
|
|
345
381
|
}
|
|
346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownClose, decorators: [{
|
|
347
383
|
type: Directive
|
|
348
384
|
}] });
|
|
349
385
|
|
|
@@ -368,7 +404,7 @@ class TuiDropdownOpen {
|
|
|
368
404
|
.pipe(takeUntilDestroyed())
|
|
369
405
|
.subscribe((event) => this.onKeydown(event));
|
|
370
406
|
}
|
|
371
|
-
get
|
|
407
|
+
get nativeElement() {
|
|
372
408
|
const initial = this.dropdownHost()?.nativeElement || this.el;
|
|
373
409
|
const focusable = tuiIsFocusable(initial)
|
|
374
410
|
? initial
|
|
@@ -377,18 +413,18 @@ class TuiDropdownOpen {
|
|
|
377
413
|
}
|
|
378
414
|
toggle(open) {
|
|
379
415
|
if (this.focused && !open) {
|
|
380
|
-
this.
|
|
416
|
+
this.nativeElement.focus({ preventScroll: true });
|
|
381
417
|
}
|
|
382
418
|
this.update(open);
|
|
383
419
|
}
|
|
384
420
|
onClick(target) {
|
|
385
|
-
if (!this.editable && this.
|
|
421
|
+
if (!this.editable && this.nativeElement.contains(target)) {
|
|
386
422
|
this.update(!this.open());
|
|
387
423
|
}
|
|
388
424
|
}
|
|
389
425
|
onArrow(event, up) {
|
|
390
426
|
if (!tuiIsElement(event.target) ||
|
|
391
|
-
!this.
|
|
427
|
+
!this.nativeElement.contains(event.target) ||
|
|
392
428
|
!this.enabled() ||
|
|
393
429
|
!this.directive.content()) {
|
|
394
430
|
return;
|
|
@@ -397,10 +433,10 @@ class TuiDropdownOpen {
|
|
|
397
433
|
this.focusDropdown(up);
|
|
398
434
|
}
|
|
399
435
|
get editable() {
|
|
400
|
-
return tuiIsElementEditable(this.
|
|
436
|
+
return tuiIsElementEditable(this.nativeElement);
|
|
401
437
|
}
|
|
402
438
|
get focused() {
|
|
403
|
-
return tuiIsFocusedIn(this.
|
|
439
|
+
return tuiIsFocusedIn(this.nativeElement) || tuiIsFocusedIn(this.dropdown());
|
|
404
440
|
}
|
|
405
441
|
onKeydown(event) {
|
|
406
442
|
const target = tuiGetActualTarget(event);
|
|
@@ -410,7 +446,7 @@ class TuiDropdownOpen {
|
|
|
410
446
|
this.focused &&
|
|
411
447
|
tuiIsHTMLElement(target) &&
|
|
412
448
|
!tuiIsElementEditable(target)) {
|
|
413
|
-
this.
|
|
449
|
+
this.nativeElement.focus({ preventScroll: true });
|
|
414
450
|
}
|
|
415
451
|
}
|
|
416
452
|
update(open) {
|
|
@@ -437,17 +473,24 @@ class TuiDropdownOpen {
|
|
|
437
473
|
child.remove();
|
|
438
474
|
focusable?.focus();
|
|
439
475
|
}
|
|
440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
441
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.
|
|
476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
477
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.19", type: TuiDropdownOpen, isStandalone: true, selector: "[tuiDropdown][tuiDropdownAuto],[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: { enabled: { classPropertyName: "enabled", publicName: "tuiDropdownEnabled", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "tuiDropdownOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "tuiDropdownOpenChange" }, host: { listeners: { "click": "onClick($event.target)", "keydown.arrowDown": "onArrow($event, false)", "keydown.arrowUp": "onArrow($event, true)", "tuiActiveZoneChange": "0", "tuiDropdownClose": "toggle(false)" } }, providers: [
|
|
478
|
+
TuiDropdownDriver,
|
|
479
|
+
tuiAsDriver(TuiDropdownDriver),
|
|
480
|
+
tuiProvide(TUI_DROPDOWN_HOST, TuiDropdownOpen),
|
|
481
|
+
], queries: [{ propertyName: "dropdownHost", first: true, predicate: ["tuiDropdownHost"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1$1.TuiObscured }, { directive: TuiDropdownClose, outputs: ["tuiDropdownClose", "tuiDropdownClose"] }, { directive: i1.TuiActiveZone, inputs: ["tuiActiveZoneParent", "tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange", "tuiActiveZoneChange"] }], ngImport: i0 }); }
|
|
442
482
|
}
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownOpen, decorators: [{
|
|
444
484
|
type: Directive,
|
|
445
485
|
args: [{
|
|
446
486
|
selector: '[tuiDropdown][tuiDropdownAuto],[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]',
|
|
447
|
-
providers: [
|
|
487
|
+
providers: [
|
|
488
|
+
TuiDropdownDriver,
|
|
489
|
+
tuiAsDriver(TuiDropdownDriver),
|
|
490
|
+
tuiProvide(TUI_DROPDOWN_HOST, TuiDropdownOpen),
|
|
491
|
+
],
|
|
448
492
|
hostDirectives: [
|
|
449
493
|
TuiObscured,
|
|
450
|
-
{ directive: forwardRef(() => TuiDropdownA11y), inputs: ['tuiDropdownRole'] },
|
|
451
494
|
{ directive: TuiDropdownClose, outputs: ['tuiDropdownClose'] },
|
|
452
495
|
{
|
|
453
496
|
directive: TuiActiveZone,
|
|
@@ -466,35 +509,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
466
509
|
}]
|
|
467
510
|
}] });
|
|
468
511
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
this.tuiDropdownRole = input('listbox');
|
|
475
|
-
this.sync = effect(() => {
|
|
476
|
-
const content = this.dropdown.content();
|
|
477
|
-
const dropdown = this.dropdown.ref();
|
|
478
|
-
const host = this.open?.host || this.el;
|
|
479
|
-
host.setAttribute('aria-expanded', String(!!dropdown));
|
|
480
|
-
host.setAttribute('aria-controls', this.dropdown.id);
|
|
481
|
-
host.setAttribute('aria-haspopup', this.tuiDropdownRole());
|
|
482
|
-
dropdown?.location.nativeElement.setAttribute('role', this.tuiDropdownRole());
|
|
483
|
-
if (content) {
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
host.removeAttribute('aria-expanded');
|
|
487
|
-
host.removeAttribute('aria-controls');
|
|
488
|
-
host.removeAttribute('aria-haspopup');
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownA11y, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
492
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiDropdownA11y, isStandalone: true, selector: "[tuiDropdownA11y]", inputs: { tuiDropdownRole: { classPropertyName: "tuiDropdownRole", publicName: "tuiDropdownRole", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
512
|
+
function tuiDropdown(value) {
|
|
513
|
+
return tuiDirectiveBinding(TuiDropdownDirective, 'content', value, {});
|
|
514
|
+
}
|
|
515
|
+
function tuiDropdownEnabled(value) {
|
|
516
|
+
return tuiDirectiveBinding(TuiDropdownOpen, 'enabled', value, {});
|
|
493
517
|
}
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownA11y, decorators: [{
|
|
495
|
-
type: Directive,
|
|
496
|
-
args: [{ selector: '[tuiDropdownA11y]' }]
|
|
497
|
-
}] });
|
|
498
518
|
|
|
499
519
|
class TuiDropdownContent {
|
|
500
520
|
constructor() {
|
|
@@ -508,10 +528,10 @@ class TuiDropdownContent {
|
|
|
508
528
|
ngOnDestroy() {
|
|
509
529
|
tuiSetSignal(this.directive.content, null);
|
|
510
530
|
}
|
|
511
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
512
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
532
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownContent, isStandalone: true, selector: "ng-template[tuiDropdown]", ngImport: i0 }); }
|
|
513
533
|
}
|
|
514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownContent, decorators: [{
|
|
515
535
|
type: Directive,
|
|
516
536
|
args: [{ selector: 'ng-template[tuiDropdown]' }]
|
|
517
537
|
}], ctorParameters: () => [] });
|
|
@@ -541,15 +561,15 @@ class TuiDropdownContext extends TuiRectAccessor {
|
|
|
541
561
|
this.currentRect = tuiPointToClientRect(x, y);
|
|
542
562
|
this.driver.next(true);
|
|
543
563
|
}
|
|
544
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
545
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
564
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownContext, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
565
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownContext, isStandalone: true, selector: "[tuiDropdownContext]", host: { listeners: { "longtap": "onContextMenu($event.detail.clientX, $event.detail.clientY)" }, properties: { "style.user-select": "userSelect()", "style.-webkit-user-select": "userSelect()", "style.-webkit-touch-callout": "userSelect()" } }, providers: [
|
|
546
566
|
TuiActiveZone,
|
|
547
567
|
TuiDropdownDriver,
|
|
548
568
|
tuiAsDriver(TuiDropdownDriver),
|
|
549
569
|
tuiAsRectAccessor(TuiDropdownContext),
|
|
550
570
|
], usesInheritance: true, ngImport: i0 }); }
|
|
551
571
|
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownContext, decorators: [{
|
|
553
573
|
type: Directive,
|
|
554
574
|
args: [{
|
|
555
575
|
selector: '[tuiDropdownContext]',
|
|
@@ -596,7 +616,7 @@ class TuiDropdownHover extends TuiDriver {
|
|
|
596
616
|
* Dropdown can be removed not only via click/touch –
|
|
597
617
|
* swipe on mobile devices removes dropdown sheet without triggering new mouseover / mouseout events.
|
|
598
618
|
*/
|
|
599
|
-
toObservable(inject(TuiDropdownDirective).ref).pipe(filter((x) => !x && this.hovered), switchMap(() => tuiTypedFromEvent(this.doc, 'pointerdown').pipe(map(tuiGetActualTarget), delay(this.tuiDropdownHideDelay()), startWith(null), takeUntil(fromEvent(this.doc, 'mouseover'))))), tuiTypedFromEvent(this.doc, 'mouseover').pipe(map(tuiGetActualTarget)), tuiTypedFromEvent(this.doc, 'mouseout').pipe(map((e) => e.relatedTarget))).pipe(map((element) => tuiIsElement(element) && this.isHovered(element)), distinctUntilChanged(), switchMap((v) => of(v).pipe(delay(v ? this.tuiDropdownShowDelay() : this.tuiDropdownHideDelay()))), tuiZoneOptimized(), tap((hovered) => {
|
|
619
|
+
toObservable(inject(TuiDropdownDirective).ref).pipe(filter((x) => !x && this.hovered), switchMap(() => tuiTypedFromEvent(this.doc, 'pointerdown').pipe(map(tuiGetActualTarget), delay(this.tuiDropdownHideDelay()), startWith(null), takeUntil(fromEvent(this.doc, 'mouseover'))))), tuiTypedFromEvent(this.doc, 'mouseover').pipe(map(tuiGetActualTarget)), tuiTypedFromEvent(this.doc, 'mouseout').pipe(map((e) => e.relatedTarget))).pipe(map((element) => tuiIsElement(element) && this.isHovered(element)), distinctUntilChanged(), switchMap((v) => of(v).pipe(delay(v ? this.tuiDropdownShowDelay() : this.tuiDropdownHideDelay()), takeUntil(this.open ? fromEvent(this.el, 'pointerdown') : EMPTY))), tuiZoneOptimized(), tap((hovered) => {
|
|
600
620
|
this.hovered = hovered;
|
|
601
621
|
this.open?.toggle(hovered);
|
|
602
622
|
}), share());
|
|
@@ -615,10 +635,10 @@ class TuiDropdownHover extends TuiDriver {
|
|
|
615
635
|
const child = !this.el.contains(element) && this.activeZone.contains(element);
|
|
616
636
|
return hovered || child;
|
|
617
637
|
}
|
|
618
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
619
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.
|
|
638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
639
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.19", type: TuiDropdownHover, isStandalone: true, selector: "[tuiDropdownHover]", inputs: { tuiDropdownShowDelay: { classPropertyName: "tuiDropdownShowDelay", publicName: "tuiDropdownShowDelay", isSignal: true, isRequired: false, transformFunction: null }, tuiDropdownHideDelay: { classPropertyName: "tuiDropdownHideDelay", publicName: "tuiDropdownHideDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click.capture": "onClick($event)" } }, providers: [TuiActiveZone, tuiAsDriver(TuiDropdownHover)], queries: [{ propertyName: "dropdownHost", first: true, predicate: ["tuiDropdownHost"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
620
640
|
}
|
|
621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownHover, decorators: [{
|
|
622
642
|
type: Directive,
|
|
623
643
|
args: [{
|
|
624
644
|
selector: '[tuiDropdownHover]',
|
|
@@ -627,6 +647,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
627
647
|
}]
|
|
628
648
|
}], ctorParameters: () => [] });
|
|
629
649
|
|
|
650
|
+
class TuiDropdownFixed {
|
|
651
|
+
constructor() {
|
|
652
|
+
const override = tuiOverrideOptions({ limitWidth: 'fixed' }, TUI_DROPDOWN_DEFAULT_OPTIONS);
|
|
653
|
+
override(inject(TUI_DROPDOWN_OPTIONS, { self: true, optional: true }), null);
|
|
654
|
+
}
|
|
655
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownFixed, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
656
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownFixed, isStandalone: true, providers: [tuiDropdownOptionsProvider({})], ngImport: i0 }); }
|
|
657
|
+
}
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownFixed, decorators: [{
|
|
659
|
+
type: Directive,
|
|
660
|
+
args: [{ providers: [tuiDropdownOptionsProvider({})] }]
|
|
661
|
+
}], ctorParameters: () => [] });
|
|
662
|
+
class TuiDropdownAuto {
|
|
663
|
+
constructor() {
|
|
664
|
+
/**
|
|
665
|
+
* Update directive props with new defaults before inputs are processed
|
|
666
|
+
* TODO: find better way to override TuiDropdownFixed host directive from parent component
|
|
667
|
+
*/
|
|
668
|
+
inject(TUI_DROPDOWN_OPTIONS).limitWidth = 'auto';
|
|
669
|
+
}
|
|
670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownAuto, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
671
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiDropdownAuto, isStandalone: true, ngImport: i0 }); }
|
|
672
|
+
}
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownAuto, decorators: [{
|
|
674
|
+
type: Directive
|
|
675
|
+
}], ctorParameters: () => [] });
|
|
676
|
+
|
|
630
677
|
class TuiDropdownManual {
|
|
631
678
|
constructor() {
|
|
632
679
|
this.driver = inject(TuiDropdownDriver);
|
|
@@ -635,10 +682,10 @@ class TuiDropdownManual {
|
|
|
635
682
|
ngOnChanges() {
|
|
636
683
|
this.driver.next(!!this.tuiDropdownManual());
|
|
637
684
|
}
|
|
638
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
639
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
686
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: TuiDropdownManual, isStandalone: true, selector: "[tuiDropdownManual]", inputs: { tuiDropdownManual: { classPropertyName: "tuiDropdownManual", publicName: "tuiDropdownManual", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TuiDropdownDriver, tuiAsDriver(TuiDropdownDriver)], usesOnChanges: true, ngImport: i0 }); }
|
|
640
687
|
}
|
|
641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownManual, decorators: [{
|
|
642
689
|
type: Directive,
|
|
643
690
|
args: [{
|
|
644
691
|
selector: '[tuiDropdownManual]',
|
|
@@ -691,10 +738,10 @@ class TuiDropdownPositionSided extends TuiPositionAccessor {
|
|
|
691
738
|
this.vertical.direction.next(better);
|
|
692
739
|
return [left, position[better]];
|
|
693
740
|
}
|
|
694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
695
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownPositionSided, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
742
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: TuiDropdownPositionSided, isStandalone: true, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: { classPropertyName: "tuiDropdownSided", publicName: "tuiDropdownSided", isSignal: true, isRequired: false, transformFunction: null }, tuiDropdownSidedOffset: { classPropertyName: "tuiDropdownSidedOffset", publicName: "tuiDropdownSidedOffset", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TuiDropdownPosition, tuiAsPositionAccessor(TuiDropdownPositionSided)], usesInheritance: true, ngImport: i0 }); }
|
|
696
743
|
}
|
|
697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownPositionSided, decorators: [{
|
|
698
745
|
type: Directive,
|
|
699
746
|
args: [{
|
|
700
747
|
selector: '[tuiDropdownSided]',
|
|
@@ -841,13 +888,13 @@ class TuiDropdownSelection extends TuiDriver {
|
|
|
841
888
|
const threshold = lineHeight * 0.5;
|
|
842
889
|
return visibleHeight >= threshold;
|
|
843
890
|
}
|
|
844
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
845
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
891
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
892
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.19", type: TuiDropdownSelection, isStandalone: true, selector: "[tuiDropdownSelection]", inputs: { tuiDropdownSelection: { classPropertyName: "tuiDropdownSelection", publicName: "tuiDropdownSelection", isSignal: true, isRequired: false, transformFunction: null }, tuiDropdownSelectionPosition: { classPropertyName: "tuiDropdownSelectionPosition", publicName: "tuiDropdownSelectionPosition", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
846
893
|
tuiAsDriver(TuiDropdownSelection),
|
|
847
894
|
tuiAsRectAccessor(TuiDropdownSelection),
|
|
848
895
|
], usesInheritance: true, ngImport: i0 }); }
|
|
849
896
|
}
|
|
850
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiDropdownSelection, decorators: [{
|
|
851
898
|
type: Directive,
|
|
852
899
|
args: [{
|
|
853
900
|
selector: '[tuiDropdownSelection]',
|
|
@@ -858,6 +905,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
858
905
|
}]
|
|
859
906
|
}], ctorParameters: () => [] });
|
|
860
907
|
|
|
908
|
+
class TuiWithDropdownOpen {
|
|
909
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiWithDropdownOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
910
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: TuiWithDropdownOpen, isStandalone: true, hostDirectives: [{ directive: TuiDropdownOpen, inputs: ["tuiDropdownOpen", "open", "tuiDropdownEnabled", "tuiDropdownEnabled"], outputs: ["tuiDropdownOpenChange", "openChange"] }], ngImport: i0 }); }
|
|
911
|
+
}
|
|
912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: TuiWithDropdownOpen, decorators: [{
|
|
913
|
+
type: Directive,
|
|
914
|
+
args: [{
|
|
915
|
+
hostDirectives: [
|
|
916
|
+
{
|
|
917
|
+
directive: TuiDropdownOpen,
|
|
918
|
+
inputs: ['tuiDropdownOpen: open', 'tuiDropdownEnabled'],
|
|
919
|
+
outputs: ['tuiDropdownOpenChange: openChange'],
|
|
920
|
+
},
|
|
921
|
+
],
|
|
922
|
+
}]
|
|
923
|
+
}] });
|
|
924
|
+
|
|
861
925
|
const TuiDropdown = [
|
|
862
926
|
TuiDropdownOptionsDirective,
|
|
863
927
|
TuiDropdownDriverDirective,
|
|
@@ -874,60 +938,9 @@ const TuiDropdown = [
|
|
|
874
938
|
TuiDropdownSelection,
|
|
875
939
|
];
|
|
876
940
|
|
|
877
|
-
function tuiDropdown(value) {
|
|
878
|
-
return tuiDirectiveBinding(TuiDropdownDirective, 'content', value, {});
|
|
879
|
-
}
|
|
880
|
-
function tuiDropdownEnabled(value) {
|
|
881
|
-
return tuiDirectiveBinding(TuiDropdownOpen, 'enabled', value, {});
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
class TuiDropdownFixed {
|
|
885
|
-
constructor() {
|
|
886
|
-
const override = tuiOverrideOptions({ limitWidth: 'fixed' }, TUI_DROPDOWN_DEFAULT_OPTIONS);
|
|
887
|
-
override(inject(TUI_DROPDOWN_OPTIONS, { self: true, optional: true }), null);
|
|
888
|
-
}
|
|
889
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownFixed, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
890
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TuiDropdownFixed, isStandalone: true, providers: [tuiDropdownOptionsProvider({})], ngImport: i0 }); }
|
|
891
|
-
}
|
|
892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownFixed, decorators: [{
|
|
893
|
-
type: Directive,
|
|
894
|
-
args: [{ providers: [tuiDropdownOptionsProvider({})] }]
|
|
895
|
-
}], ctorParameters: () => [] });
|
|
896
|
-
class TuiDropdownAuto {
|
|
897
|
-
constructor() {
|
|
898
|
-
/**
|
|
899
|
-
* Update directive props with new defaults before inputs are processed
|
|
900
|
-
* TODO: find better way to override TuiDropdownFixed host directive from parent component
|
|
901
|
-
*/
|
|
902
|
-
inject(TUI_DROPDOWN_OPTIONS).limitWidth = 'auto';
|
|
903
|
-
}
|
|
904
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownAuto, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
905
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TuiDropdownAuto, isStandalone: true, ngImport: i0 }); }
|
|
906
|
-
}
|
|
907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDropdownAuto, decorators: [{
|
|
908
|
-
type: Directive
|
|
909
|
-
}], ctorParameters: () => [] });
|
|
910
|
-
|
|
911
|
-
class TuiWithDropdownOpen {
|
|
912
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiWithDropdownOpen, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
913
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TuiWithDropdownOpen, isStandalone: true, hostDirectives: [{ directive: TuiDropdownOpen, inputs: ["tuiDropdownOpen", "open", "tuiDropdownEnabled", "tuiDropdownEnabled"], outputs: ["tuiDropdownOpenChange", "openChange"] }], ngImport: i0 }); }
|
|
914
|
-
}
|
|
915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiWithDropdownOpen, decorators: [{
|
|
916
|
-
type: Directive,
|
|
917
|
-
args: [{
|
|
918
|
-
hostDirectives: [
|
|
919
|
-
{
|
|
920
|
-
directive: TuiDropdownOpen,
|
|
921
|
-
inputs: ['tuiDropdownOpen: open', 'tuiDropdownEnabled'],
|
|
922
|
-
outputs: ['tuiDropdownOpenChange: openChange'],
|
|
923
|
-
},
|
|
924
|
-
],
|
|
925
|
-
}]
|
|
926
|
-
}] });
|
|
927
|
-
|
|
928
941
|
/**
|
|
929
942
|
* Generated bundle index. Do not edit.
|
|
930
943
|
*/
|
|
931
944
|
|
|
932
|
-
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownA11y, TuiDropdownAuto, TuiDropdownClose, TuiDropdownComponent, TuiDropdownContent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOptionsDirective, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection, TuiWithDropdownOpen, tuiDropdown, tuiDropdownEnabled, tuiDropdownHoverOptionsProvider, tuiDropdownOptionsProvider };
|
|
945
|
+
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_CONTEXT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOST, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdown, TuiDropdownA11y, TuiDropdownAuto, TuiDropdownClose, TuiDropdownComponent, TuiDropdownContent, TuiDropdownContext, TuiDropdownDirective, TuiDropdownDriver, TuiDropdownDriverDirective, TuiDropdownFixed, TuiDropdownHover, TuiDropdownManual, TuiDropdownOpen, TuiDropdownOptionsDirective, TuiDropdownPosition, TuiDropdownPositionSided, TuiDropdownSelection, TuiWithDropdownOpen, tuiDropdown, tuiDropdownEnabled, tuiDropdownHoverOptionsProvider, tuiDropdownOptionsProvider };
|
|
933
946
|
//# sourceMappingURL=taiga-ui-core-portals-dropdown.mjs.map
|