@taiga-ui/core 3.19.0-dev.main-8e6cab0 → 3.19.0-dev.main-9e6bc23
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/abstract/abstract-driver.directive.d.ts +9 -2
- package/abstract/driver.d.ts +1 -0
- package/abstract/position-accessor.d.ts +3 -1
- package/abstract/rect-accessor.d.ts +4 -1
- package/abstract/vehicle.d.ts +1 -0
- package/bundles/taiga-ui-core-abstract.umd.js +49 -10
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +155 -107
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +235 -180
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +1 -0
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/directives/dropdown/dropdown-context.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-driver.directive.d.ts +5 -2
- package/directives/dropdown/dropdown-host.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-hover.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-manual.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +4 -3
- package/directives/dropdown/dropdown-position.directive.d.ts +7 -3
- package/directives/dropdown/dropdown-selection.directive.d.ts +1 -0
- package/directives/dropdown/dropdown.directive.d.ts +7 -4
- package/directives/hint/hint-describe.directive.d.ts +3 -5
- package/directives/hint/hint-driver.directive.d.ts +5 -2
- package/directives/hint/hint-host.directive.d.ts +1 -0
- package/directives/hint/hint-hover.directive.d.ts +2 -0
- package/directives/hint/hint-manual.directive.d.ts +3 -1
- package/directives/hint/hint-position.directive.d.ts +6 -3
- package/directives/hint/hint.directive.d.ts +3 -2
- package/esm2015/abstract/abstract-driver.directive.js +15 -7
- package/esm2015/abstract/driver.js +2 -1
- package/esm2015/abstract/position-accessor.js +10 -1
- package/esm2015/abstract/rect-accessor.js +14 -1
- package/esm2015/abstract/vehicle.js +2 -1
- package/esm2015/directives/dropdown/dropdown-context.directive.js +2 -1
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +22 -5
- package/esm2015/directives/dropdown/dropdown-host.directive.js +5 -1
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +2 -1
- package/esm2015/directives/dropdown/dropdown-manual.directive.js +4 -3
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +13 -12
- package/esm2015/directives/dropdown/dropdown-position.directive.js +27 -10
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +2 -1
- package/esm2015/directives/dropdown/dropdown.component.js +19 -9
- package/esm2015/directives/dropdown/dropdown.directive.js +14 -19
- package/esm2015/directives/hint/hint-describe.directive.js +5 -11
- package/esm2015/directives/hint/hint-driver.directive.js +22 -5
- package/esm2015/directives/hint/hint-host.directive.js +5 -1
- package/esm2015/directives/hint/hint-hover.directive.js +5 -3
- package/esm2015/directives/hint/hint-manual.directive.js +12 -5
- package/esm2015/directives/hint/hint-position.directive.js +24 -10
- package/esm2015/directives/hint/hint.component.js +18 -4
- package/esm2015/directives/hint/hint.directive.js +3 -1
- package/esm2015/directives/hint/hint.providers.js +2 -1
- package/esm2015/tokens/viewport.js +2 -1
- package/fesm2015/taiga-ui-core-abstract.js +39 -9
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +92 -50
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +180 -131
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +1 -0
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/directives/mode'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('@tinkoff/ng-polymorpheus'), require('rxjs/operators'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/hint', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/directives/mode', '@taiga-ui/core/services', '@taiga-ui/core/tokens', '@tinkoff/ng-polymorpheus', 'rxjs/operators', '
|
|
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.hint = {}), global.ng.core, global.i3, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.directives.mode, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.i1
|
|
5
|
-
})(this, (function (exports, i0, i3, i1, animations, i5, i2
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/abstract'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/directives/mode'), require('@taiga-ui/core/services'), require('@taiga-ui/core/tokens'), require('@tinkoff/ng-polymorpheus'), require('rxjs/operators'), require('@taiga-ui/core/utils'), require('rxjs'), require('@angular/common'), require('@taiga-ui/core/constants')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/core/directives/hint', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/abstract', '@taiga-ui/core/animations', '@taiga-ui/core/directives/mode', '@taiga-ui/core/services', '@taiga-ui/core/tokens', '@tinkoff/ng-polymorpheus', 'rxjs/operators', '@taiga-ui/core/utils', 'rxjs', '@angular/common', '@taiga-ui/core/constants'], factory) :
|
|
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.hint = {}), global.ng.core, global.i3, global["taiga-ui"].core.abstract, global["taiga-ui"].core.animations, global["taiga-ui"].core.directives.mode, global["taiga-ui"].core.services, global["taiga-ui"].core.tokens, global.i1, global.rxjs.operators, global["taiga-ui"].core.utils, global.rxjs, global.ng.common, global["taiga-ui"].core.constants));
|
|
5
|
+
})(this, (function (exports, i0, i3, i1$1, animations, i5, i2, tokens, i1, operators, utils, i2$1, common, constants) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
27
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
28
28
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
29
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
30
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
|
|
31
29
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
32
32
|
|
|
33
33
|
/*! *****************************************************************************
|
|
34
34
|
Copyright (c) Microsoft Corporation.
|
|
@@ -348,6 +348,10 @@
|
|
|
348
348
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
var TUI_HINT_COMPONENT = new i0.InjectionToken("[TUI_HINT_COMPONENT] A component to display a hint", {
|
|
352
|
+
factory: function () { return TuiHintComponent; },
|
|
353
|
+
});
|
|
354
|
+
|
|
351
355
|
/** Default values for hint options */
|
|
352
356
|
var TUI_HINT_DEFAULT_OPTIONS = {
|
|
353
357
|
direction: 'bottom-left',
|
|
@@ -439,6 +443,105 @@
|
|
|
439
443
|
args: ['tuiHintHideDelay']
|
|
440
444
|
}] } });
|
|
441
445
|
|
|
446
|
+
var TuiHintDirective = /** @class */ (function () {
|
|
447
|
+
function TuiHintDirective(elementRef, component, hintService, options, activeZone) {
|
|
448
|
+
this.elementRef = elementRef;
|
|
449
|
+
this.component = component;
|
|
450
|
+
this.hintService = hintService;
|
|
451
|
+
this.options = options;
|
|
452
|
+
this.activeZone = activeZone;
|
|
453
|
+
this.content = '';
|
|
454
|
+
this.tuiHintAppearance = null;
|
|
455
|
+
this.type = 'hint';
|
|
456
|
+
}
|
|
457
|
+
Object.defineProperty(TuiHintDirective.prototype, "appearance", {
|
|
458
|
+
get: function () {
|
|
459
|
+
var _a;
|
|
460
|
+
return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;
|
|
461
|
+
},
|
|
462
|
+
enumerable: false,
|
|
463
|
+
configurable: true
|
|
464
|
+
});
|
|
465
|
+
TuiHintDirective.prototype.ngOnChanges = function () {
|
|
466
|
+
if (!this.content) {
|
|
467
|
+
this.toggle(false);
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
TuiHintDirective.prototype.ngOnDestroy = function () {
|
|
471
|
+
this.toggle(false);
|
|
472
|
+
};
|
|
473
|
+
TuiHintDirective.prototype.getClientRect = function () {
|
|
474
|
+
return this.elementRef.nativeElement.getBoundingClientRect();
|
|
475
|
+
};
|
|
476
|
+
TuiHintDirective.prototype.toggle = function (show) {
|
|
477
|
+
if (show && this.content) {
|
|
478
|
+
this.hintService.add(this);
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
this.hintService.remove(this);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
return TuiHintDirective;
|
|
485
|
+
}());
|
|
486
|
+
TuiHintDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDirective, deps: [{ token: i0.ElementRef }, { token: i1.PolymorpheusComponent }, { token: i2.TuiHintService }, { token: TUI_HINT_OPTIONS }, { token: i3.TuiActiveZoneDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
487
|
+
TuiHintDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: { content: ["tuiHint", "content"], context: ["tuiHintContext", "context"], tuiHintAppearance: "tuiHintAppearance" }, providers: [
|
|
488
|
+
i1$1.tuiAsRectAccessor(TuiHintDirective),
|
|
489
|
+
i1$1.tuiAsVehicle(TuiHintDirective),
|
|
490
|
+
{
|
|
491
|
+
provide: i1.PolymorpheusComponent,
|
|
492
|
+
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
493
|
+
useClass: i1.PolymorpheusComponent,
|
|
494
|
+
},
|
|
495
|
+
], usesOnChanges: true, ngImport: i0__namespace });
|
|
496
|
+
__decorate([
|
|
497
|
+
i3.tuiDefaultProp()
|
|
498
|
+
], TuiHintDirective.prototype, "content", void 0);
|
|
499
|
+
__decorate([
|
|
500
|
+
i3.tuiDefaultProp()
|
|
501
|
+
], TuiHintDirective.prototype, "tuiHintAppearance", void 0);
|
|
502
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDirective, decorators: [{
|
|
503
|
+
type: i0.Directive,
|
|
504
|
+
args: [{
|
|
505
|
+
selector: '[tuiHint]:not(ng-container)',
|
|
506
|
+
providers: [
|
|
507
|
+
i1$1.tuiAsRectAccessor(TuiHintDirective),
|
|
508
|
+
i1$1.tuiAsVehicle(TuiHintDirective),
|
|
509
|
+
{
|
|
510
|
+
provide: i1.PolymorpheusComponent,
|
|
511
|
+
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
512
|
+
useClass: i1.PolymorpheusComponent,
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
}]
|
|
516
|
+
}], ctorParameters: function () {
|
|
517
|
+
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
518
|
+
type: i0.Inject,
|
|
519
|
+
args: [i0.ElementRef]
|
|
520
|
+
}] }, { type: i1__namespace.PolymorpheusComponent, decorators: [{
|
|
521
|
+
type: i0.Inject,
|
|
522
|
+
args: [i1.PolymorpheusComponent]
|
|
523
|
+
}] }, { type: i2__namespace.TuiHintService, decorators: [{
|
|
524
|
+
type: i0.Inject,
|
|
525
|
+
args: [i2.TuiHintService]
|
|
526
|
+
}] }, { type: undefined, decorators: [{
|
|
527
|
+
type: i0.Inject,
|
|
528
|
+
args: [TUI_HINT_OPTIONS]
|
|
529
|
+
}] }, { type: i3__namespace.TuiActiveZoneDirective, decorators: [{
|
|
530
|
+
type: i0.Optional
|
|
531
|
+
}, {
|
|
532
|
+
type: i0.Inject,
|
|
533
|
+
args: [i3.TuiActiveZoneDirective]
|
|
534
|
+
}] }];
|
|
535
|
+
}, propDecorators: { content: [{
|
|
536
|
+
type: i0.Input,
|
|
537
|
+
args: ['tuiHint']
|
|
538
|
+
}], context: [{
|
|
539
|
+
type: i0.Input,
|
|
540
|
+
args: ['tuiHintContext']
|
|
541
|
+
}], tuiHintAppearance: [{
|
|
542
|
+
type: i0.Input
|
|
543
|
+
}] } });
|
|
544
|
+
|
|
442
545
|
var TuiHintHoverDirective = /** @class */ (function (_super) {
|
|
443
546
|
__extends(TuiHintHoverDirective, _super);
|
|
444
547
|
function TuiHintHoverDirective(hovered$, options, elementRef) {
|
|
@@ -446,19 +549,21 @@
|
|
|
446
549
|
_this.hovered$ = hovered$;
|
|
447
550
|
_this.options = options;
|
|
448
551
|
_this.elementRef = elementRef;
|
|
449
|
-
_this.toggle$ = new i2.Subject();
|
|
450
|
-
_this.stream$ = i2.merge(_this.toggle$.pipe(operators.switchMap(function (visible) { return i2.of(visible).pipe(operators.delay(visible ? 0 : _this.hideDelay)); }), operators.takeUntil(_this.hovered$), operators.repeat()), _this.hovered$.pipe(operators.switchMap(function (visible) { return i2.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.takeUntil(_this.toggle$), operators.repeat()));
|
|
552
|
+
_this.toggle$ = new i2$1.Subject();
|
|
553
|
+
_this.stream$ = i2$1.merge(_this.toggle$.pipe(operators.switchMap(function (visible) { return i2$1.of(visible).pipe(operators.delay(visible ? 0 : _this.hideDelay)); }), operators.takeUntil(_this.hovered$), operators.repeat()), _this.hovered$.pipe(operators.switchMap(function (visible) { return i2$1.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.takeUntil(_this.toggle$), operators.repeat())).pipe(operators.filter(function () { return _this.enabled; }));
|
|
451
554
|
_this.showDelay = _this.options.showDelay;
|
|
452
555
|
_this.hideDelay = _this.options.hideDelay;
|
|
556
|
+
_this.type = 'hint';
|
|
557
|
+
_this.enabled = true;
|
|
453
558
|
return _this;
|
|
454
559
|
}
|
|
455
560
|
TuiHintHoverDirective.prototype.toggle = function (visible) {
|
|
456
561
|
this.toggle$.next(visible);
|
|
457
562
|
};
|
|
458
563
|
return TuiHintHoverDirective;
|
|
459
|
-
}(i1.TuiDriver));
|
|
564
|
+
}(i1$1.TuiDriver));
|
|
460
565
|
TuiHintHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintHoverDirective, deps: [{ token: i3.TuiHoveredService }, { token: TUI_HINT_OPTIONS }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
461
|
-
TuiHintHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: { showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [i1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0__namespace });
|
|
566
|
+
TuiHintHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: { showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0__namespace });
|
|
462
567
|
__decorate([
|
|
463
568
|
i3.tuiDefaultProp()
|
|
464
569
|
], TuiHintHoverDirective.prototype, "showDelay", void 0);
|
|
@@ -470,10 +575,10 @@
|
|
|
470
575
|
args: [{
|
|
471
576
|
selector: '[tuiHint]:not(ng-container)',
|
|
472
577
|
exportAs: 'tuiHintHover',
|
|
473
|
-
providers: [i1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService],
|
|
578
|
+
providers: [i1$1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService],
|
|
474
579
|
}]
|
|
475
580
|
}], ctorParameters: function () {
|
|
476
|
-
return [{ type: i2__namespace.Observable, decorators: [{
|
|
581
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
477
582
|
type: i0.Inject,
|
|
478
583
|
args: [i3.TuiHoveredService]
|
|
479
584
|
}] }, { type: undefined, decorators: [{
|
|
@@ -509,16 +614,16 @@
|
|
|
509
614
|
}(TuiHintHoverDirective));
|
|
510
615
|
TuiHintPointerDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPointerDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
511
616
|
TuiHintPointerDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintPointerDirective, selector: "[tuiHint][tuiHintPointer]", host: { listeners: { "mousemove.silent": "onMove($event)" } }, providers: [
|
|
512
|
-
i1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
513
|
-
i1.tuiAsDriver(TuiHintPointerDirective),
|
|
617
|
+
i1$1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
618
|
+
i1$1.tuiAsDriver(TuiHintPointerDirective),
|
|
514
619
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
515
620
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPointerDirective, decorators: [{
|
|
516
621
|
type: i0.Directive,
|
|
517
622
|
args: [{
|
|
518
623
|
selector: '[tuiHint][tuiHintPointer]',
|
|
519
624
|
providers: [
|
|
520
|
-
i1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
521
|
-
i1.tuiAsDriver(TuiHintPointerDirective),
|
|
625
|
+
i1$1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
626
|
+
i1$1.tuiAsDriver(TuiHintPointerDirective),
|
|
522
627
|
],
|
|
523
628
|
}]
|
|
524
629
|
}], propDecorators: { onMove: [{
|
|
@@ -581,8 +686,14 @@
|
|
|
581
686
|
};
|
|
582
687
|
return TuiHintComponent;
|
|
583
688
|
}());
|
|
584
|
-
TuiHintComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintComponent, deps: [{ token: i3.TuiHoveredService }, { token: i2
|
|
585
|
-
TuiHintComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintComponent, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "@tuiFadeIn": "this.animation", "attr.data-appearance": "this.appearance", "class._untouchable": "this.untouchable" } }, providers: [
|
|
689
|
+
TuiHintComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintComponent, deps: [{ token: i3.TuiHoveredService }, { token: i2.TuiPositionService }, { token: i3.TuiDestroyService, self: true }, { token: i1$1.TuiRectAccessor }, { token: i0.ElementRef }, { token: tokens.TUI_ANIMATION_OPTIONS }, { token: i1.POLYMORPHEUS_CONTEXT }, { token: TuiHintHoverDirective }, { token: TuiHintPointerDirective, optional: true }, { token: i5.TuiModeDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
690
|
+
TuiHintComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintComponent, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "@tuiFadeIn": "this.animation", "attr.data-appearance": "this.appearance", "class._untouchable": "this.untouchable" } }, providers: [
|
|
691
|
+
i3.TuiDestroyService,
|
|
692
|
+
i2.TuiPositionService,
|
|
693
|
+
i3.TuiHoveredService,
|
|
694
|
+
i1$1.tuiPositionAccessorFor('hint'),
|
|
695
|
+
i1$1.tuiRectAccessorFor('hint', TuiHintDirective),
|
|
696
|
+
], ngImport: i0__namespace, template: "\n <ng-container *polymorpheusOutlet=\"content as text; context: context\">\n {{ text }}\n </ng-container>\n ", isInline: true, styles: [":host{position:absolute;max-width:18rem;min-height:var(--tui-height-m);padding:.75rem 1rem;background:var(--tui-primary);border-radius:var(--tui-radius-l);color:var(--tui-primary-text);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;word-wrap:break-word}:host:before{content:\"\";position:absolute;top:var(--top);left:var(--left);width:.5rem;height:.5rem;border-radius:.125rem;box-sizing:border-box;background:inherit;transform:translate(-50%,-50%) rotate(45deg)}:host[data-appearance=error]{background:var(--tui-error-fill)}:host[data-appearance=onDark]{background:var(--tui-elevation-01);color:var(--tui-text-01);filter:drop-shadow(0 0 .125rem rgba(0,0,0,.16)) drop-shadow(0 1.5rem 1rem rgba(0,0,0,.03)) drop-shadow(0 .75rem .75rem rgba(0,0,0,.04)) drop-shadow(0 .25rem .375rem rgba(0,0,0,.05))}:host:not([style*=\"top\"]){visibility:hidden}:host._untouchable{pointer-events:none}\n"], directives: [{ type: i1__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [animations.tuiFadeIn], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
586
697
|
__decorate([
|
|
587
698
|
i3.tuiPure
|
|
588
699
|
], TuiHintComponent.prototype, "update", null);
|
|
@@ -593,24 +704,30 @@
|
|
|
593
704
|
template: "\n <ng-container *polymorpheusOutlet=\"content as text; context: context\">\n {{ text }}\n </ng-container>\n ",
|
|
594
705
|
styleUrls: ['./hint.style.less'],
|
|
595
706
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
596
|
-
providers: [
|
|
707
|
+
providers: [
|
|
708
|
+
i3.TuiDestroyService,
|
|
709
|
+
i2.TuiPositionService,
|
|
710
|
+
i3.TuiHoveredService,
|
|
711
|
+
i1$1.tuiPositionAccessorFor('hint'),
|
|
712
|
+
i1$1.tuiRectAccessorFor('hint', TuiHintDirective),
|
|
713
|
+
],
|
|
597
714
|
animations: [animations.tuiFadeIn],
|
|
598
715
|
}]
|
|
599
716
|
}], ctorParameters: function () {
|
|
600
|
-
return [{ type: i2__namespace.Observable, decorators: [{
|
|
717
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
601
718
|
type: i0.Inject,
|
|
602
719
|
args: [i3.TuiHoveredService]
|
|
603
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
720
|
+
}] }, { type: i2__namespace$1.Observable, decorators: [{
|
|
604
721
|
type: i0.Inject,
|
|
605
|
-
args: [i2
|
|
606
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
722
|
+
args: [i2.TuiPositionService]
|
|
723
|
+
}] }, { type: i2__namespace$1.Observable, decorators: [{
|
|
607
724
|
type: i0.Self
|
|
608
725
|
}, {
|
|
609
726
|
type: i0.Inject,
|
|
610
727
|
args: [i3.TuiDestroyService]
|
|
611
728
|
}] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
|
|
612
729
|
type: i0.Inject,
|
|
613
|
-
args: [i1.TuiRectAccessor]
|
|
730
|
+
args: [i1$1.TuiRectAccessor]
|
|
614
731
|
}] }, { type: i0__namespace.ElementRef, decorators: [{
|
|
615
732
|
type: i0.Inject,
|
|
616
733
|
args: [i0.ElementRef]
|
|
@@ -619,7 +736,7 @@
|
|
|
619
736
|
args: [tokens.TUI_ANIMATION_OPTIONS]
|
|
620
737
|
}] }, { type: undefined, decorators: [{
|
|
621
738
|
type: i0.Inject,
|
|
622
|
-
args: [i1
|
|
739
|
+
args: [i1.POLYMORPHEUS_CONTEXT]
|
|
623
740
|
}] }, { type: TuiHintHoverDirective, decorators: [{
|
|
624
741
|
type: i0.Inject,
|
|
625
742
|
args: [TuiHintHoverDirective]
|
|
@@ -648,123 +765,20 @@
|
|
|
648
765
|
args: ['document:click', ['$event.target']]
|
|
649
766
|
}], update: [] } });
|
|
650
767
|
|
|
651
|
-
var TUI_HINT_COMPONENT = new i0.InjectionToken("[TUI_HINT_COMPONENT] A component to display a hint", {
|
|
652
|
-
factory: function () { return TuiHintComponent; },
|
|
653
|
-
});
|
|
654
|
-
|
|
655
|
-
var TuiHintDirective = /** @class */ (function () {
|
|
656
|
-
function TuiHintDirective(elementRef, component, hintService, options, activeZone) {
|
|
657
|
-
this.elementRef = elementRef;
|
|
658
|
-
this.component = component;
|
|
659
|
-
this.hintService = hintService;
|
|
660
|
-
this.options = options;
|
|
661
|
-
this.activeZone = activeZone;
|
|
662
|
-
this.content = '';
|
|
663
|
-
this.tuiHintAppearance = null;
|
|
664
|
-
}
|
|
665
|
-
Object.defineProperty(TuiHintDirective.prototype, "appearance", {
|
|
666
|
-
get: function () {
|
|
667
|
-
var _a;
|
|
668
|
-
return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;
|
|
669
|
-
},
|
|
670
|
-
enumerable: false,
|
|
671
|
-
configurable: true
|
|
672
|
-
});
|
|
673
|
-
TuiHintDirective.prototype.ngOnChanges = function () {
|
|
674
|
-
if (!this.content) {
|
|
675
|
-
this.toggle(false);
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
TuiHintDirective.prototype.ngOnDestroy = function () {
|
|
679
|
-
this.toggle(false);
|
|
680
|
-
};
|
|
681
|
-
TuiHintDirective.prototype.getClientRect = function () {
|
|
682
|
-
return this.elementRef.nativeElement.getBoundingClientRect();
|
|
683
|
-
};
|
|
684
|
-
TuiHintDirective.prototype.toggle = function (show) {
|
|
685
|
-
if (show && this.content) {
|
|
686
|
-
this.hintService.add(this);
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
689
|
-
this.hintService.remove(this);
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
return TuiHintDirective;
|
|
693
|
-
}());
|
|
694
|
-
TuiHintDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.PolymorpheusComponent }, { token: i2$1.TuiHintService }, { token: TUI_HINT_OPTIONS }, { token: i3.TuiActiveZoneDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
695
|
-
TuiHintDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: { content: ["tuiHint", "content"], context: ["tuiHintContext", "context"], tuiHintAppearance: "tuiHintAppearance" }, providers: [
|
|
696
|
-
i1.tuiAsRectAccessor(TuiHintDirective),
|
|
697
|
-
i1.tuiAsVehicle(TuiHintDirective),
|
|
698
|
-
{
|
|
699
|
-
provide: i1$1.PolymorpheusComponent,
|
|
700
|
-
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
701
|
-
useClass: i1$1.PolymorpheusComponent,
|
|
702
|
-
},
|
|
703
|
-
], usesOnChanges: true, ngImport: i0__namespace });
|
|
704
|
-
__decorate([
|
|
705
|
-
i3.tuiDefaultProp()
|
|
706
|
-
], TuiHintDirective.prototype, "content", void 0);
|
|
707
|
-
__decorate([
|
|
708
|
-
i3.tuiDefaultProp()
|
|
709
|
-
], TuiHintDirective.prototype, "tuiHintAppearance", void 0);
|
|
710
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDirective, decorators: [{
|
|
711
|
-
type: i0.Directive,
|
|
712
|
-
args: [{
|
|
713
|
-
selector: '[tuiHint]:not(ng-container)',
|
|
714
|
-
providers: [
|
|
715
|
-
i1.tuiAsRectAccessor(TuiHintDirective),
|
|
716
|
-
i1.tuiAsVehicle(TuiHintDirective),
|
|
717
|
-
{
|
|
718
|
-
provide: i1$1.PolymorpheusComponent,
|
|
719
|
-
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
720
|
-
useClass: i1$1.PolymorpheusComponent,
|
|
721
|
-
},
|
|
722
|
-
],
|
|
723
|
-
}]
|
|
724
|
-
}], ctorParameters: function () {
|
|
725
|
-
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
726
|
-
type: i0.Inject,
|
|
727
|
-
args: [i0.ElementRef]
|
|
728
|
-
}] }, { type: i1__namespace.PolymorpheusComponent, decorators: [{
|
|
729
|
-
type: i0.Inject,
|
|
730
|
-
args: [i1$1.PolymorpheusComponent]
|
|
731
|
-
}] }, { type: i2__namespace$1.TuiHintService, decorators: [{
|
|
732
|
-
type: i0.Inject,
|
|
733
|
-
args: [i2$1.TuiHintService]
|
|
734
|
-
}] }, { type: undefined, decorators: [{
|
|
735
|
-
type: i0.Inject,
|
|
736
|
-
args: [TUI_HINT_OPTIONS]
|
|
737
|
-
}] }, { type: i3__namespace.TuiActiveZoneDirective, decorators: [{
|
|
738
|
-
type: i0.Optional
|
|
739
|
-
}, {
|
|
740
|
-
type: i0.Inject,
|
|
741
|
-
args: [i3.TuiActiveZoneDirective]
|
|
742
|
-
}] }];
|
|
743
|
-
}, propDecorators: { content: [{
|
|
744
|
-
type: i0.Input,
|
|
745
|
-
args: ['tuiHint']
|
|
746
|
-
}], context: [{
|
|
747
|
-
type: i0.Input,
|
|
748
|
-
args: ['tuiHintContext']
|
|
749
|
-
}], tuiHintAppearance: [{
|
|
750
|
-
type: i0.Input
|
|
751
|
-
}] } });
|
|
752
|
-
|
|
753
768
|
var TuiHintDescribeDirective = /** @class */ (function (_super) {
|
|
754
769
|
__extends(TuiHintDescribeDirective, _super);
|
|
755
|
-
function TuiHintDescribeDirective(ngZone,
|
|
770
|
+
function TuiHintDescribeDirective(ngZone, documentRef, elementRef) {
|
|
756
771
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
757
772
|
_this.ngZone = ngZone;
|
|
758
|
-
_this.hover$ = hover$;
|
|
759
773
|
_this.documentRef = documentRef;
|
|
760
774
|
_this.elementRef = elementRef;
|
|
761
|
-
_this.
|
|
775
|
+
_this.stream$ = i3.tuiTypedFromEvent(_this.documentRef, 'keydown', {
|
|
762
776
|
capture: true,
|
|
763
777
|
}).pipe(operators.switchMap(function () { return _this.focused
|
|
764
|
-
? i2.of(false)
|
|
765
|
-
: i2.merge(i3.tuiTypedFromEvent(_this.documentRef, 'keyup'), i3.tuiTypedFromEvent(_this.element, 'blur')).pipe(operators.map(function () { return _this.focused; })); }), operators.debounce(function (visible) { return (visible ? i2.timer(1000) : i2.of(null)); }), operators.startWith(false), operators.distinctUntilChanged(), operators.skip(1), i3.tuiZoneOptimized(_this.ngZone));
|
|
766
|
-
_this.stream$ = i2.merge(_this.hover$, _this.focus$);
|
|
778
|
+
? i2$1.of(false)
|
|
779
|
+
: i2$1.merge(i3.tuiTypedFromEvent(_this.documentRef, 'keyup'), i3.tuiTypedFromEvent(_this.element, 'blur')).pipe(operators.map(function () { return _this.focused; })); }), operators.debounce(function (visible) { return (visible ? i2$1.timer(1000) : i2$1.of(null)); }), operators.startWith(false), operators.distinctUntilChanged(), operators.skip(1), i3.tuiZoneOptimized(_this.ngZone));
|
|
767
780
|
_this.tuiHintDescribe = '';
|
|
781
|
+
_this.type = 'hint';
|
|
768
782
|
return _this;
|
|
769
783
|
}
|
|
770
784
|
Object.defineProperty(TuiHintDescribeDirective.prototype, "focused", {
|
|
@@ -783,9 +797,9 @@
|
|
|
783
797
|
configurable: true
|
|
784
798
|
});
|
|
785
799
|
return TuiHintDescribeDirective;
|
|
786
|
-
}(i1.TuiDriver));
|
|
787
|
-
TuiHintDescribeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDescribeDirective, deps: [{ token: i0.NgZone }, { token:
|
|
788
|
-
TuiHintDescribeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: { tuiHintDescribe: "tuiHintDescribe" }, providers: [i1.tuiAsDriver(TuiHintDescribeDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
800
|
+
}(i1$1.TuiDriver));
|
|
801
|
+
TuiHintDescribeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDescribeDirective, deps: [{ token: i0.NgZone }, { token: common.DOCUMENT }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
802
|
+
TuiHintDescribeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: { tuiHintDescribe: "tuiHintDescribe" }, providers: [i1$1.tuiAsDriver(TuiHintDescribeDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
789
803
|
__decorate([
|
|
790
804
|
i3.tuiPure
|
|
791
805
|
], TuiHintDescribeDirective.prototype, "element", null);
|
|
@@ -793,15 +807,12 @@
|
|
|
793
807
|
type: i0.Directive,
|
|
794
808
|
args: [{
|
|
795
809
|
selector: '[tuiHintDescribe]',
|
|
796
|
-
providers: [i1.tuiAsDriver(TuiHintDescribeDirective)],
|
|
810
|
+
providers: [i1$1.tuiAsDriver(TuiHintDescribeDirective)],
|
|
797
811
|
}]
|
|
798
812
|
}], ctorParameters: function () {
|
|
799
813
|
return [{ type: i0__namespace.NgZone, decorators: [{
|
|
800
814
|
type: i0.Inject,
|
|
801
815
|
args: [i0.NgZone]
|
|
802
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
803
|
-
type: i0.Inject,
|
|
804
|
-
args: [TuiHintHoverDirective]
|
|
805
816
|
}] }, { type: Document, decorators: [{
|
|
806
817
|
type: i0.Inject,
|
|
807
818
|
args: [common.DOCUMENT]
|
|
@@ -815,12 +826,15 @@
|
|
|
815
826
|
|
|
816
827
|
var TuiHintDriverDirective = /** @class */ (function (_super) {
|
|
817
828
|
__extends(TuiHintDriverDirective, _super);
|
|
818
|
-
|
|
819
|
-
|
|
829
|
+
// TODO: Figure out why this is necessary under nx test runner
|
|
830
|
+
function TuiHintDriverDirective(destroy$, drivers, vehicles) {
|
|
831
|
+
var _this = _super.call(this, destroy$, drivers, vehicles) || this;
|
|
832
|
+
_this.type = 'hint';
|
|
833
|
+
return _this;
|
|
820
834
|
}
|
|
821
835
|
return TuiHintDriverDirective;
|
|
822
|
-
}(i1.AbstractTuiDriverDirective));
|
|
823
|
-
TuiHintDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDriverDirective, deps:
|
|
836
|
+
}(i1$1.AbstractTuiDriverDirective));
|
|
837
|
+
TuiHintDriverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDriverDirective, deps: [{ token: i3.TuiDestroyService, self: true }, { token: i1$1.TuiDriver }, { token: i1$1.TuiVehicle }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
824
838
|
TuiHintDriverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDriverDirective, selector: "[tuiHint]", providers: [i3.TuiDestroyService], usesInheritance: true, ngImport: i0__namespace });
|
|
825
839
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDriverDirective, decorators: [{
|
|
826
840
|
type: i0.Directive,
|
|
@@ -828,26 +842,41 @@
|
|
|
828
842
|
selector: '[tuiHint]',
|
|
829
843
|
providers: [i3.TuiDestroyService],
|
|
830
844
|
}]
|
|
831
|
-
}]
|
|
845
|
+
}], ctorParameters: function () {
|
|
846
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
847
|
+
type: i0.Self
|
|
848
|
+
}, {
|
|
849
|
+
type: i0.Inject,
|
|
850
|
+
args: [i3.TuiDestroyService]
|
|
851
|
+
}] }, { type: undefined, decorators: [{
|
|
852
|
+
type: i0.Inject,
|
|
853
|
+
args: [i1$1.TuiDriver]
|
|
854
|
+
}] }, { type: undefined, decorators: [{
|
|
855
|
+
type: i0.Inject,
|
|
856
|
+
args: [i1$1.TuiVehicle]
|
|
857
|
+
}] }];
|
|
858
|
+
} });
|
|
832
859
|
|
|
833
860
|
var TuiHintHostDirective = /** @class */ (function (_super) {
|
|
834
861
|
__extends(TuiHintHostDirective, _super);
|
|
835
862
|
function TuiHintHostDirective() {
|
|
836
|
-
|
|
863
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
864
|
+
_this.type = 'hint';
|
|
865
|
+
return _this;
|
|
837
866
|
}
|
|
838
867
|
TuiHintHostDirective.prototype.getClientRect = function () {
|
|
839
868
|
var _a;
|
|
840
869
|
return ((_a = this.tuiHintHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i3.EMPTY_CLIENT_RECT;
|
|
841
870
|
};
|
|
842
871
|
return TuiHintHostDirective;
|
|
843
|
-
}(i1.TuiRectAccessor));
|
|
872
|
+
}(i1$1.TuiRectAccessor));
|
|
844
873
|
TuiHintHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintHostDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
845
|
-
TuiHintHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHostDirective, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: "tuiHintHost" }, providers: [i1.tuiAsRectAccessor(TuiHintHostDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
874
|
+
TuiHintHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHostDirective, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: "tuiHintHost" }, providers: [i1$1.tuiAsRectAccessor(TuiHintHostDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
846
875
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintHostDirective, decorators: [{
|
|
847
876
|
type: i0.Directive,
|
|
848
877
|
args: [{
|
|
849
878
|
selector: '[tuiHint][tuiHintHost]',
|
|
850
|
-
providers: [i1.tuiAsRectAccessor(TuiHintHostDirective)],
|
|
879
|
+
providers: [i1$1.tuiAsRectAccessor(TuiHintHostDirective)],
|
|
851
880
|
}]
|
|
852
881
|
}], propDecorators: { tuiHintHost: [{
|
|
853
882
|
type: i0.Input
|
|
@@ -855,26 +884,33 @@
|
|
|
855
884
|
|
|
856
885
|
var TuiHintManualDirective = /** @class */ (function (_super) {
|
|
857
886
|
__extends(TuiHintManualDirective, _super);
|
|
858
|
-
function TuiHintManualDirective() {
|
|
887
|
+
function TuiHintManualDirective(hover) {
|
|
859
888
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
860
|
-
_this.stream$ = new i2.Subject();
|
|
889
|
+
_this.stream$ = new i2$1.Subject();
|
|
861
890
|
_this.tuiHintManual = false;
|
|
891
|
+
_this.type = 'hint';
|
|
892
|
+
hover.enabled = false;
|
|
862
893
|
return _this;
|
|
863
894
|
}
|
|
864
895
|
TuiHintManualDirective.prototype.ngOnChanges = function () {
|
|
865
896
|
this.stream$.next(this.tuiHintManual);
|
|
866
897
|
};
|
|
867
898
|
return TuiHintManualDirective;
|
|
868
|
-
}(i1.TuiDriver));
|
|
869
|
-
TuiHintManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintManualDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
870
|
-
TuiHintManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintManualDirective, selector: "[tuiHint][tuiHintManual]", inputs: { tuiHintManual: "tuiHintManual" }, providers: [i1.tuiAsDriver(TuiHintManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
899
|
+
}(i1$1.TuiDriver));
|
|
900
|
+
TuiHintManualDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintManualDirective, deps: [{ token: TuiHintHoverDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
901
|
+
TuiHintManualDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintManualDirective, selector: "[tuiHint][tuiHintManual]", inputs: { tuiHintManual: "tuiHintManual" }, providers: [i1$1.tuiAsDriver(TuiHintManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
871
902
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintManualDirective, decorators: [{
|
|
872
903
|
type: i0.Directive,
|
|
873
904
|
args: [{
|
|
874
905
|
selector: '[tuiHint][tuiHintManual]',
|
|
875
|
-
providers: [i1.tuiAsDriver(TuiHintManualDirective)],
|
|
906
|
+
providers: [i1$1.tuiAsDriver(TuiHintManualDirective)],
|
|
876
907
|
}]
|
|
877
|
-
}], ctorParameters: function () {
|
|
908
|
+
}], ctorParameters: function () {
|
|
909
|
+
return [{ type: TuiHintHoverDirective, decorators: [{
|
|
910
|
+
type: i0.Inject,
|
|
911
|
+
args: [TuiHintHoverDirective]
|
|
912
|
+
}] }];
|
|
913
|
+
}, propDecorators: { tuiHintManual: [{
|
|
878
914
|
type: i0.Input
|
|
879
915
|
}] } });
|
|
880
916
|
|
|
@@ -882,22 +918,28 @@
|
|
|
882
918
|
var ARROW_OFFSET = 22;
|
|
883
919
|
var TOP = 0;
|
|
884
920
|
var LEFT = 1;
|
|
885
|
-
var TuiHintPositionDirective = /** @class */ (function () {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
921
|
+
var TuiHintPositionDirective = /** @class */ (function (_super) {
|
|
922
|
+
__extends(TuiHintPositionDirective, _super);
|
|
923
|
+
function TuiHintPositionDirective(options, viewport, directive, accessors) {
|
|
924
|
+
var _this = _super.call(this) || this;
|
|
925
|
+
_this.options = options;
|
|
926
|
+
_this.viewport = viewport;
|
|
927
|
+
_this.directive = directive;
|
|
928
|
+
_this.accessors = accessors;
|
|
929
|
+
_this.points = constants.TUI_HINT_DIRECTIONS.reduce(function (acc, direction) {
|
|
930
|
+
var _c;
|
|
931
|
+
return (Object.assign(Object.assign({}, acc), (_c = {}, _c[direction] = [0, 0], _c)));
|
|
893
932
|
}, {});
|
|
894
|
-
|
|
933
|
+
_this.direction = _this.options.direction;
|
|
934
|
+
_this.type = 'hint';
|
|
935
|
+
return _this;
|
|
895
936
|
}
|
|
896
937
|
// eslint-disable-next-line max-statements
|
|
897
|
-
TuiHintPositionDirective.prototype.getPosition = function (
|
|
938
|
+
TuiHintPositionDirective.prototype.getPosition = function (_c) {
|
|
898
939
|
var _this = this;
|
|
899
|
-
var width =
|
|
900
|
-
var
|
|
940
|
+
var width = _c.width, height = _c.height;
|
|
941
|
+
var _a, _b;
|
|
942
|
+
var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i3.EMPTY_CLIENT_RECT;
|
|
901
943
|
var leftCenter = hostRect.left + hostRect.width / 2;
|
|
902
944
|
var topCenter = hostRect.top + hostRect.height / 2;
|
|
903
945
|
this.points['top-left'][TOP] = hostRect.top - height - OFFSET;
|
|
@@ -930,6 +972,13 @@
|
|
|
930
972
|
var direction = constants.TUI_HINT_DIRECTIONS.find(function (direction) { return _this.checkPosition(_this.points[direction], width, height); });
|
|
931
973
|
return this.points[direction || this.fallback];
|
|
932
974
|
};
|
|
975
|
+
Object.defineProperty(TuiHintPositionDirective.prototype, "accessor", {
|
|
976
|
+
get: function () {
|
|
977
|
+
return i1$1.tuiFallbackRectAccessor('hint')(this.accessors, this.directive);
|
|
978
|
+
},
|
|
979
|
+
enumerable: false,
|
|
980
|
+
configurable: true
|
|
981
|
+
});
|
|
933
982
|
Object.defineProperty(TuiHintPositionDirective.prototype, "fallback", {
|
|
934
983
|
get: function () {
|
|
935
984
|
return this.points.top[TOP] >
|
|
@@ -940,8 +989,8 @@
|
|
|
940
989
|
enumerable: false,
|
|
941
990
|
configurable: true
|
|
942
991
|
});
|
|
943
|
-
TuiHintPositionDirective.prototype.checkPosition = function (
|
|
944
|
-
var
|
|
992
|
+
TuiHintPositionDirective.prototype.checkPosition = function (_c, width, height) {
|
|
993
|
+
var _d = __read(_c, 2), top = _d[0], left = _d[1];
|
|
945
994
|
var viewport = this.viewport.getClientRect();
|
|
946
995
|
return (top > OFFSET &&
|
|
947
996
|
left > OFFSET &&
|
|
@@ -949,17 +998,20 @@
|
|
|
949
998
|
left + width < viewport.right - OFFSET);
|
|
950
999
|
};
|
|
951
1000
|
return TuiHintPositionDirective;
|
|
952
|
-
}());
|
|
953
|
-
TuiHintPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPositionDirective, deps: [{ token: TUI_HINT_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1.TuiRectAccessor }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
954
|
-
TuiHintPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: { direction: ["tuiHintDirection", "direction"] }, providers: [i1.tuiAsPositionAccessor(TuiHintPositionDirective)], ngImport: i0__namespace });
|
|
1001
|
+
}(i1$1.TuiPositionAccessor));
|
|
1002
|
+
TuiHintPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPositionDirective, deps: [{ token: TUI_HINT_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: TuiHintDirective }, { token: i1$1.TuiRectAccessor }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1003
|
+
TuiHintPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: { direction: ["tuiHintDirection", "direction"] }, providers: [i1$1.tuiAsPositionAccessor(TuiHintPositionDirective)], usesInheritance: true, ngImport: i0__namespace });
|
|
955
1004
|
__decorate([
|
|
956
1005
|
i3.tuiDefaultProp()
|
|
957
1006
|
], TuiHintPositionDirective.prototype, "direction", void 0);
|
|
1007
|
+
__decorate([
|
|
1008
|
+
i3.tuiPure
|
|
1009
|
+
], TuiHintPositionDirective.prototype, "accessor", null);
|
|
958
1010
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPositionDirective, decorators: [{
|
|
959
1011
|
type: i0.Directive,
|
|
960
1012
|
args: [{
|
|
961
1013
|
selector: '[tuiHint]:not([tuiHintCustomPosition])',
|
|
962
|
-
providers: [i1.tuiAsPositionAccessor(TuiHintPositionDirective)],
|
|
1014
|
+
providers: [i1$1.tuiAsPositionAccessor(TuiHintPositionDirective)],
|
|
963
1015
|
}]
|
|
964
1016
|
}], ctorParameters: function () {
|
|
965
1017
|
return [{ type: undefined, decorators: [{
|
|
@@ -970,12 +1022,15 @@
|
|
|
970
1022
|
args: [tokens.TUI_VIEWPORT]
|
|
971
1023
|
}] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
|
|
972
1024
|
type: i0.Inject,
|
|
973
|
-
args: [
|
|
1025
|
+
args: [TuiHintDirective]
|
|
1026
|
+
}] }, { type: undefined, decorators: [{
|
|
1027
|
+
type: i0.Inject,
|
|
1028
|
+
args: [i1$1.TuiRectAccessor]
|
|
974
1029
|
}] }];
|
|
975
1030
|
}, propDecorators: { direction: [{
|
|
976
1031
|
type: i0.Input,
|
|
977
1032
|
args: ['tuiHintDirection']
|
|
978
|
-
}] } });
|
|
1033
|
+
}], accessor: [] } });
|
|
979
1034
|
|
|
980
1035
|
var TuiHintModule = /** @class */ (function () {
|
|
981
1036
|
function TuiHintModule() {
|
|
@@ -992,7 +1047,7 @@
|
|
|
992
1047
|
TuiHintPointerDirective,
|
|
993
1048
|
TuiHintDescribeDirective,
|
|
994
1049
|
TuiHintPositionDirective,
|
|
995
|
-
TuiHintOptionsDirective], imports: [common.CommonModule, i1
|
|
1050
|
+
TuiHintOptionsDirective], imports: [common.CommonModule, i1.PolymorpheusModule], exports: [TuiHintComponent,
|
|
996
1051
|
TuiHintDirective,
|
|
997
1052
|
TuiHintDriverDirective,
|
|
998
1053
|
TuiHintHostDirective,
|
|
@@ -1002,11 +1057,11 @@
|
|
|
1002
1057
|
TuiHintDescribeDirective,
|
|
1003
1058
|
TuiHintPositionDirective,
|
|
1004
1059
|
TuiHintOptionsDirective] });
|
|
1005
|
-
TuiHintModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, imports: [[common.CommonModule, i1
|
|
1060
|
+
TuiHintModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, imports: [[common.CommonModule, i1.PolymorpheusModule]] });
|
|
1006
1061
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, decorators: [{
|
|
1007
1062
|
type: i0.NgModule,
|
|
1008
1063
|
args: [{
|
|
1009
|
-
imports: [common.CommonModule, i1
|
|
1064
|
+
imports: [common.CommonModule, i1.PolymorpheusModule],
|
|
1010
1065
|
declarations: [
|
|
1011
1066
|
TuiHintComponent,
|
|
1012
1067
|
TuiHintDirective,
|