@taiga-ui/core 3.32.0-dev.main-8ee86e5 → 3.33.0
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/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +70 -57
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/constants/cache-basting-payload.d.ts +1 -1
- package/directives/dropdown/dropdown.directive.d.ts +4 -2
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/directives/dropdown/dropdown.directive.js +26 -11
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +21 -9
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/package.json +4 -4
- package/styles/theme/wrapper/icon.less +2 -1
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
return TuiRootComponent;
|
|
369
369
|
}());
|
|
370
370
|
TuiRootComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRootComponent, deps: [{ token: tokens.TUI_ANIMATIONS_DURATION }, { token: i3.TUI_DIALOGS }, { token: i3.TUI_IS_MOBILE }, { token: tokens.TUI_IS_MOBILE_RES }, { token: i3.TUI_IS_IOS }, { token: i3.TUI_IS_ANDROID }, { token: i5.DOCUMENT }, { token: tokens.TUI_THEME }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
371
|
-
TuiRootComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.
|
|
371
|
+
TuiRootComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.33.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration.ms": "duration", "class._ios": "isIOS", "class._android": "isAndroid" } }, providers: [providers.TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0__namespace, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-root-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-root-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@keyframes tuiPresent{to{content:\"1\"}}html,.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}html::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar,html::-webkit-scrollbar-thumb,.tui-zero-scrollbar::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}body{font:var(--tui-font-text-s);color:var(--tui-text-01);margin:0}tui-root{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-root-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1__namespace.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2__namespace.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3__namespace.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3__namespace.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3__namespace.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4__namespace.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
372
372
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRootComponent, decorators: [{
|
|
373
373
|
type: i0.Component,
|
|
374
374
|
args: [{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('rxjs/operators'), require('@taiga-ui/core/utils'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('@taiga-ui/core/components/scrollbar'), require('@taiga-ui/core/directives/mode'), require('@tinkoff/ng-event-plugins'), require('@angular/common')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/dropdown', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/services', '@taiga-ui/core/tokens', 'rxjs/operators', '@taiga-ui/core/utils', '@tinkoff/ng-polymorpheus', 'rxjs', '@taiga-ui/core/components/scrollbar', '@taiga-ui/core/directives/mode', '@tinkoff/ng-event-plugins', '@angular/common'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.directives = global["taiga-ui"].core.directives || {}, global["taiga-ui"].core.directives.dropdown = {}), global.ng.core, global.common, global.i2, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.rxjs.operators, global["taiga-ui"].core.utils, global.i4, global.rxjs, global["taiga-ui"].core.components.scrollbar, global["taiga-ui"].core.directives.mode, global.ngEventPlugins, global.ng.common));
|
|
5
|
-
})(this, (function (exports, i0, common, i2, i1, animations, i5, tokens, operators, utils, i4, i1
|
|
5
|
+
})(this, (function (exports, i0, common, i2, i1$1, animations, i5, tokens, operators, utils, i4, i1, i1$2, i3, ngEventPlugins, common$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
28
28
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
29
29
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
31
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
32
32
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
33
33
|
|
|
@@ -357,14 +357,22 @@
|
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
var TuiDropdownDirective = /** @class */ (function () {
|
|
360
|
-
function TuiDropdownDirective(el, dropdown, injector, dropdownService) {
|
|
360
|
+
function TuiDropdownDirective(destroy$, el, dropdown, injector, dropdownService) {
|
|
361
|
+
var _this = this;
|
|
361
362
|
this.el = el;
|
|
362
363
|
this.dropdown = dropdown;
|
|
363
364
|
this.injector = injector;
|
|
364
365
|
this.dropdownService = dropdownService;
|
|
366
|
+
this.refresh$ = new i1.Subject();
|
|
365
367
|
this.dropdownBoxRef = null;
|
|
366
368
|
this.type = 'dropdown';
|
|
367
369
|
this.component = new i4.PolymorpheusComponent(this.dropdown, this.injector);
|
|
370
|
+
// Ignore multiple change detection triggers at the same frame
|
|
371
|
+
this.refresh$.pipe(operators.throttleTime(0), operators.takeUntil(destroy$)).subscribe(function () {
|
|
372
|
+
var _a, _b;
|
|
373
|
+
(_a = _this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();
|
|
374
|
+
(_b = _this.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.changeDetectorRef.markForCheck();
|
|
375
|
+
});
|
|
368
376
|
}
|
|
369
377
|
Object.defineProperty(TuiDropdownDirective.prototype, "position", {
|
|
370
378
|
get: function () {
|
|
@@ -374,9 +382,7 @@
|
|
|
374
382
|
configurable: true
|
|
375
383
|
});
|
|
376
384
|
TuiDropdownDirective.prototype.ngAfterViewChecked = function () {
|
|
377
|
-
|
|
378
|
-
(_a = this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();
|
|
379
|
-
(_b = this.dropdownBoxRef) === null || _b === void 0 ? void 0 : _b.changeDetectorRef.markForCheck();
|
|
385
|
+
this.refresh$.next();
|
|
380
386
|
};
|
|
381
387
|
TuiDropdownDirective.prototype.ngOnChanges = function () {
|
|
382
388
|
if (!this.content) {
|
|
@@ -400,10 +406,11 @@
|
|
|
400
406
|
};
|
|
401
407
|
return TuiDropdownDirective;
|
|
402
408
|
}());
|
|
403
|
-
TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
409
|
+
TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
404
410
|
TuiDropdownDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
|
|
405
|
-
|
|
406
|
-
i1.
|
|
411
|
+
i2.TuiDestroyService,
|
|
412
|
+
i1$1.tuiAsRectAccessor(TuiDropdownDirective),
|
|
413
|
+
i1$1.tuiAsVehicle(TuiDropdownDirective),
|
|
407
414
|
], exportAs: ["tuiDropdown"], usesOnChanges: true, ngImport: i0__namespace });
|
|
408
415
|
__decorate([
|
|
409
416
|
i2.tuiPure
|
|
@@ -414,12 +421,18 @@
|
|
|
414
421
|
selector: '[tuiDropdown]:not(ng-container)',
|
|
415
422
|
exportAs: 'tuiDropdown',
|
|
416
423
|
providers: [
|
|
417
|
-
|
|
418
|
-
i1.
|
|
424
|
+
i2.TuiDestroyService,
|
|
425
|
+
i1$1.tuiAsRectAccessor(TuiDropdownDirective),
|
|
426
|
+
i1$1.tuiAsVehicle(TuiDropdownDirective),
|
|
419
427
|
],
|
|
420
428
|
}]
|
|
421
429
|
}], ctorParameters: function () {
|
|
422
|
-
return [{ type:
|
|
430
|
+
return [{ type: i1__namespace.Observable, decorators: [{
|
|
431
|
+
type: i0.Self
|
|
432
|
+
}, {
|
|
433
|
+
type: i0.Inject,
|
|
434
|
+
args: [i2.TuiDestroyService]
|
|
435
|
+
}] }, { type: i0__namespace.ElementRef, decorators: [{
|
|
423
436
|
type: i0.Inject,
|
|
424
437
|
args: [i0.ElementRef]
|
|
425
438
|
}] }, { type: i0__namespace.Type, decorators: [{
|
|
@@ -459,8 +472,8 @@
|
|
|
459
472
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
460
473
|
_this.hovered$ = hovered$;
|
|
461
474
|
_this.options = options;
|
|
462
|
-
_this.toggle$ = new i1
|
|
463
|
-
_this.stream$ = i1
|
|
475
|
+
_this.toggle$ = new i1.Subject();
|
|
476
|
+
_this.stream$ = i1.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i1.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
|
|
464
477
|
_this.hovered = visible;
|
|
465
478
|
}), operators.share());
|
|
466
479
|
_this.showDelay = _this.options.showDelay;
|
|
@@ -473,9 +486,9 @@
|
|
|
473
486
|
this.toggle$.next(visible);
|
|
474
487
|
};
|
|
475
488
|
return TuiDropdownHoverDirective;
|
|
476
|
-
}(i1.TuiDriver));
|
|
489
|
+
}(i1$1.TuiDriver));
|
|
477
490
|
TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
478
|
-
TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
|
|
491
|
+
TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
|
|
479
492
|
__decorate([
|
|
480
493
|
i2.tuiDefaultProp()
|
|
481
494
|
], TuiDropdownHoverDirective.prototype, "showDelay", void 0);
|
|
@@ -486,7 +499,7 @@
|
|
|
486
499
|
type: i0.Directive,
|
|
487
500
|
args: [{
|
|
488
501
|
selector: '[tuiDropdownHover]:not(ng-container)',
|
|
489
|
-
providers: [i1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
|
|
502
|
+
providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
|
|
490
503
|
}]
|
|
491
504
|
}], ctorParameters: function () {
|
|
492
505
|
return [{ type: i1__namespace.Observable, decorators: [{
|
|
@@ -691,12 +704,12 @@
|
|
|
691
704
|
};
|
|
692
705
|
return TuiDropdownComponent;
|
|
693
706
|
}());
|
|
694
|
-
TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i5.TuiVisualViewportService }, { token: i5.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i0.ElementRef }, { token: i2.AbstractTuiPortalHostComponent }, { token: i1.TuiRectAccessor }, { token: common.WINDOW }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
707
|
+
TuiDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, deps: [{ token: i5.TuiVisualViewportService }, { token: i5.TuiPositionService }, { token: i2.TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i0.ElementRef }, { token: i2.AbstractTuiPortalHostComponent }, { token: i1$1.TuiRectAccessor }, { token: common.WINDOW }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
695
708
|
TuiDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { properties: { "@tuiDropdownAnimation": "animation" } }, providers: [
|
|
696
709
|
i2.TuiDestroyService,
|
|
697
710
|
i5.TuiPositionService,
|
|
698
|
-
i1.tuiPositionAccessorFor('dropdown'),
|
|
699
|
-
i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
711
|
+
i1$1.tuiPositionAccessorFor('dropdown'),
|
|
712
|
+
i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
700
713
|
], ngImport: i0__namespace, template: "<div\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-wrapper\"\n [tuiMode]=\"null\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <tui-scrollbar class=\"t-scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n", styles: [":host{position:relative;z-index:0;box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;position:absolute;display:flex;background-color:var(--tui-elevation-01);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px)}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}.t-wrapper{flex-grow:1;max-width:100%;max-height:inherit;overflow:visible}.t-scroll{height:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1__namespace$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2__namespace.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i3__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiDropdownAnimation], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
|
|
701
714
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
|
|
702
715
|
type: i0.Component,
|
|
@@ -707,8 +720,8 @@
|
|
|
707
720
|
providers: [
|
|
708
721
|
i2.TuiDestroyService,
|
|
709
722
|
i5.TuiPositionService,
|
|
710
|
-
i1.tuiPositionAccessorFor('dropdown'),
|
|
711
|
-
i1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
723
|
+
i1$1.tuiPositionAccessorFor('dropdown'),
|
|
724
|
+
i1$1.tuiRectAccessorFor('dropdown', TuiDropdownDirective),
|
|
712
725
|
],
|
|
713
726
|
animations: [animations.tuiDropdownAnimation],
|
|
714
727
|
host: { '[@tuiDropdownAnimation]': 'animation' },
|
|
@@ -742,7 +755,7 @@
|
|
|
742
755
|
args: [i2.AbstractTuiPortalHostComponent]
|
|
743
756
|
}] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
|
|
744
757
|
type: i0.Inject,
|
|
745
|
-
args: [i1.TuiRectAccessor]
|
|
758
|
+
args: [i1$1.TuiRectAccessor]
|
|
746
759
|
}] }, { type: Window, decorators: [{
|
|
747
760
|
type: i0.Inject,
|
|
748
761
|
args: [common.WINDOW]
|
|
@@ -765,7 +778,7 @@
|
|
|
765
778
|
function TuiDropdownContextDirective(activeZone) {
|
|
766
779
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
767
780
|
_this.activeZone = activeZone;
|
|
768
|
-
_this.stream$ = new i1
|
|
781
|
+
_this.stream$ = new i1.Subject();
|
|
769
782
|
_this.currentRect = i2.EMPTY_CLIENT_RECT;
|
|
770
783
|
_this.type = 'dropdown';
|
|
771
784
|
return _this;
|
|
@@ -781,12 +794,12 @@
|
|
|
781
794
|
return this.currentRect;
|
|
782
795
|
};
|
|
783
796
|
return TuiDropdownContextDirective;
|
|
784
|
-
}(i1.TuiDriver));
|
|
797
|
+
}(i1$1.TuiDriver));
|
|
785
798
|
TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
786
799
|
TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)" } }, providers: [
|
|
787
800
|
i2.TuiActiveZoneDirective,
|
|
788
|
-
i1.tuiAsDriver(TuiDropdownContextDirective),
|
|
789
|
-
i1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
801
|
+
i1$1.tuiAsDriver(TuiDropdownContextDirective),
|
|
802
|
+
i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
790
803
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
791
804
|
__decorate([
|
|
792
805
|
ngEventPlugins.shouldCall(activeZoneFilter)
|
|
@@ -797,8 +810,8 @@
|
|
|
797
810
|
selector: '[tuiDropdown][tuiDropdownContext]',
|
|
798
811
|
providers: [
|
|
799
812
|
i2.TuiActiveZoneDirective,
|
|
800
|
-
i1.tuiAsDriver(TuiDropdownContextDirective),
|
|
801
|
-
i1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
813
|
+
i1$1.tuiAsDriver(TuiDropdownContextDirective),
|
|
814
|
+
i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
802
815
|
],
|
|
803
816
|
}]
|
|
804
817
|
}], ctorParameters: function () {
|
|
@@ -829,8 +842,8 @@
|
|
|
829
842
|
return _this;
|
|
830
843
|
}
|
|
831
844
|
return TuiDropdownDriverDirective;
|
|
832
|
-
}(i1.AbstractTuiDriverDirective));
|
|
833
|
-
TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i1.TuiDriver }, { token: i1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
845
|
+
}(i1$1.AbstractTuiDriverDirective));
|
|
846
|
+
TuiDropdownDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i1$1.TuiDriver }, { token: i1$1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
834
847
|
TuiDropdownDriverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDriverDirective, selector: "[tuiDropdown]", providers: [i2.TuiDestroyService], usesInheritance: true, ngImport: i0__namespace });
|
|
835
848
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
|
|
836
849
|
type: i0.Directive,
|
|
@@ -846,10 +859,10 @@
|
|
|
846
859
|
args: [i2.TuiDestroyService]
|
|
847
860
|
}] }, { type: undefined, decorators: [{
|
|
848
861
|
type: i0.Inject,
|
|
849
|
-
args: [i1.TuiDriver]
|
|
862
|
+
args: [i1$1.TuiDriver]
|
|
850
863
|
}] }, { type: undefined, decorators: [{
|
|
851
864
|
type: i0.Inject,
|
|
852
|
-
args: [i1.TuiVehicle]
|
|
865
|
+
args: [i1$1.TuiVehicle]
|
|
853
866
|
}] }];
|
|
854
867
|
} });
|
|
855
868
|
|
|
@@ -865,14 +878,14 @@
|
|
|
865
878
|
return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i2.EMPTY_CLIENT_RECT;
|
|
866
879
|
};
|
|
867
880
|
return TuiDropdownHostDirective;
|
|
868
|
-
}(i1.TuiRectAccessor));
|
|
881
|
+
}(i1$1.TuiRectAccessor));
|
|
869
882
|
TuiDropdownHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
870
|
-
TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
883
|
+
TuiDropdownHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
871
884
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
|
|
872
885
|
type: i0.Directive,
|
|
873
886
|
args: [{
|
|
874
887
|
selector: '[tuiDropdown][tuiDropdownHost]',
|
|
875
|
-
providers: [i1.tuiAsRectAccessor(TuiDropdownHostDirective)],
|
|
888
|
+
providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
|
|
876
889
|
}]
|
|
877
890
|
}], propDecorators: { tuiDropdownHost: [{
|
|
878
891
|
type: i0.Input
|
|
@@ -882,7 +895,7 @@
|
|
|
882
895
|
__extends(TuiDropdownManualDirective, _super);
|
|
883
896
|
function TuiDropdownManualDirective() {
|
|
884
897
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
885
|
-
_this.stream$ = new i1
|
|
898
|
+
_this.stream$ = new i1.BehaviorSubject(false);
|
|
886
899
|
_this.tuiDropdownManual = false;
|
|
887
900
|
_this.type = 'dropdown';
|
|
888
901
|
return _this;
|
|
@@ -891,14 +904,14 @@
|
|
|
891
904
|
this.stream$.next(this.tuiDropdownManual);
|
|
892
905
|
};
|
|
893
906
|
return TuiDropdownManualDirective;
|
|
894
|
-
}(i1.TuiDriver));
|
|
907
|
+
}(i1$1.TuiDriver));
|
|
895
908
|
TuiDropdownManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
896
|
-
TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
909
|
+
TuiDropdownManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
897
910
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
|
|
898
911
|
type: i0.Directive,
|
|
899
912
|
args: [{
|
|
900
913
|
selector: '[tuiDropdown][tuiDropdownManual]',
|
|
901
|
-
providers: [i1.tuiAsDriver(TuiDropdownManualDirective)],
|
|
914
|
+
providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
|
|
902
915
|
}]
|
|
903
916
|
}], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
|
|
904
917
|
type: i0.Input
|
|
@@ -946,15 +959,15 @@
|
|
|
946
959
|
};
|
|
947
960
|
Object.defineProperty(TuiDropdownPositionDirective.prototype, "accessor", {
|
|
948
961
|
get: function () {
|
|
949
|
-
return i1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
|
|
962
|
+
return i1$1.tuiFallbackRectAccessor('dropdown')(this.accessors, this.directive);
|
|
950
963
|
},
|
|
951
964
|
enumerable: false,
|
|
952
965
|
configurable: true
|
|
953
966
|
});
|
|
954
967
|
return TuiDropdownPositionDirective;
|
|
955
|
-
}(i1.TuiPositionAccessor));
|
|
956
|
-
TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1.TuiRectAccessor }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
957
|
-
TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
968
|
+
}(i1$1.TuiPositionAccessor));
|
|
969
|
+
TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
970
|
+
TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
958
971
|
__decorate([
|
|
959
972
|
i2.tuiPure
|
|
960
973
|
], TuiDropdownPositionDirective.prototype, "accessor", null);
|
|
@@ -962,7 +975,7 @@
|
|
|
962
975
|
type: i0.Directive,
|
|
963
976
|
args: [{
|
|
964
977
|
selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
|
|
965
|
-
providers: [i1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
|
|
978
|
+
providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
|
|
966
979
|
}]
|
|
967
980
|
}], ctorParameters: function () {
|
|
968
981
|
return [{ type: undefined, decorators: [{
|
|
@@ -973,7 +986,7 @@
|
|
|
973
986
|
args: [tokens.TUI_VIEWPORT]
|
|
974
987
|
}] }, { type: undefined, decorators: [{
|
|
975
988
|
type: i0.Inject,
|
|
976
|
-
args: [i1.TuiRectAccessor]
|
|
989
|
+
args: [i1$1.TuiRectAccessor]
|
|
977
990
|
}] }, { type: TuiDropdownDirective, decorators: [{
|
|
978
991
|
type: i0.Inject,
|
|
979
992
|
args: [TuiDropdownDirective]
|
|
@@ -1026,11 +1039,11 @@
|
|
|
1026
1039
|
return [position[better], left];
|
|
1027
1040
|
};
|
|
1028
1041
|
return TuiDropdownPositionSidedDirective;
|
|
1029
|
-
}(i1.TuiPositionAccessor));
|
|
1042
|
+
}(i1$1.TuiPositionAccessor));
|
|
1030
1043
|
TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1031
1044
|
TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
|
|
1032
1045
|
TuiDropdownPositionDirective,
|
|
1033
|
-
i1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
1046
|
+
i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
1034
1047
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
1035
1048
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
|
|
1036
1049
|
type: i0.Directive,
|
|
@@ -1038,7 +1051,7 @@
|
|
|
1038
1051
|
selector: '[tuiDropdownSided]',
|
|
1039
1052
|
providers: [
|
|
1040
1053
|
TuiDropdownPositionDirective,
|
|
1041
|
-
i1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
1054
|
+
i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
1042
1055
|
],
|
|
1043
1056
|
}]
|
|
1044
1057
|
}], ctorParameters: function () {
|
|
@@ -1068,8 +1081,8 @@
|
|
|
1068
1081
|
_this.el = el;
|
|
1069
1082
|
_this.vcr = vcr;
|
|
1070
1083
|
_this.dropdown = dropdown;
|
|
1071
|
-
_this.handler$ = new i1
|
|
1072
|
-
_this.stream$ = i1
|
|
1084
|
+
_this.handler$ = new i1.BehaviorSubject(i2.ALWAYS_TRUE_HANDLER);
|
|
1085
|
+
_this.stream$ = i1.combineLatest([
|
|
1073
1086
|
_this.handler$,
|
|
1074
1087
|
_this.selection$.pipe(operators.map(function () { return _this.getRange(); }), operators.distinctUntilChanged()),
|
|
1075
1088
|
]).pipe(operators.map(function (_b) {
|
|
@@ -1176,11 +1189,11 @@
|
|
|
1176
1189
|
return ghost;
|
|
1177
1190
|
};
|
|
1178
1191
|
return TuiDropdownSelectionDirective;
|
|
1179
|
-
}(i1.TuiDriver));
|
|
1192
|
+
}(i1$1.TuiDriver));
|
|
1180
1193
|
TuiDropdownSelectionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, deps: [{ token: i2.TUI_RANGE }, { token: common$1.DOCUMENT }, { token: tokens.TUI_SELECTION_STREAM }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1181
1194
|
TuiDropdownSelectionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownSelectionDirective, selector: "[tuiDropdown][tuiDropdownSelection]", inputs: { position: ["tuiDropdownSelectionPosition", "position"], tuiDropdownSelection: "tuiDropdownSelection" }, providers: [
|
|
1182
|
-
i1.tuiAsDriver(TuiDropdownSelectionDirective),
|
|
1183
|
-
i1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
1195
|
+
i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
|
|
1196
|
+
i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
1184
1197
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
1185
1198
|
__decorate([
|
|
1186
1199
|
i2.tuiDefaultProp()
|
|
@@ -1190,8 +1203,8 @@
|
|
|
1190
1203
|
args: [{
|
|
1191
1204
|
selector: '[tuiDropdown][tuiDropdownSelection]',
|
|
1192
1205
|
providers: [
|
|
1193
|
-
i1.tuiAsDriver(TuiDropdownSelectionDirective),
|
|
1194
|
-
i1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
1206
|
+
i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
|
|
1207
|
+
i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
1195
1208
|
],
|
|
1196
1209
|
}]
|
|
1197
1210
|
}], ctorParameters: function () {
|