@taiga-ui/core 3.19.0 → 3.20.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/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-components-button.umd.js +4 -1
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +8 -2
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +4 -1
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +4 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +4 -1
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +167 -110
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +242 -181
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +15 -12
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +129 -37
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/components/button/button-options.d.ts +3 -0
- package/components/dialog/dialog.tokens.d.ts +6 -0
- package/components/loader/loader-options.d.ts +3 -0
- package/components/primitive-checkbox/checkbox-options.d.ts +3 -0
- package/components/svg/svg-options.d.ts +3 -0
- 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-options.directive.d.ts +3 -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-options.directive.d.ts +3 -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/dropdown/dropdown.providers.d.ts +3 -0
- 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-options.directive.d.ts +3 -0
- package/directives/hint/hint-position.directive.d.ts +6 -3
- package/directives/hint/hint.directive.d.ts +3 -2
- package/directives/hint/hint.providers.d.ts +3 -0
- package/directives/textfield-controller/textfield-options.d.ts +3 -0
- 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/components/button/button-options.js +5 -2
- package/esm2015/components/dialog/dialog.tokens.js +9 -3
- package/esm2015/components/loader/loader-options.js +5 -2
- package/esm2015/components/primitive-checkbox/checkbox-options.js +5 -2
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/components/svg/svg-options.js +5 -2
- 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-options.directive.js +5 -2
- 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-options.directive.js +5 -2
- 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/dropdown/dropdown.providers.js +5 -2
- 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-options.directive.js +5 -2
- 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 +6 -2
- package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-filler.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-icon.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-options.js +5 -2
- package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +2 -2
- package/esm2015/tokens/animation-options.js +5 -2
- package/esm2015/tokens/animations-duration.js +5 -2
- package/esm2015/tokens/assert-enabled.js +5 -2
- package/esm2015/tokens/data-list-accessor.js +5 -2
- package/esm2015/tokens/data-list-host.js +5 -2
- package/esm2015/tokens/day-type-handler.js +5 -2
- package/esm2015/tokens/document-or-shadow-root.js +2 -2
- package/esm2015/tokens/element-ref.js +5 -2
- package/esm2015/tokens/first-day-of-week.js +5 -2
- package/esm2015/tokens/i18n.js +25 -7
- package/esm2015/tokens/icon-place.js +3 -2
- package/esm2015/tokens/icons-path.js +5 -2
- package/esm2015/tokens/icons.js +5 -2
- package/esm2015/tokens/is-mobile-resolution.js +5 -2
- package/esm2015/tokens/media.js +5 -2
- package/esm2015/tokens/mode.js +5 -2
- package/esm2015/tokens/notification-options.js +5 -2
- package/esm2015/tokens/number-format.js +5 -2
- package/esm2015/tokens/option-content.js +5 -2
- package/esm2015/tokens/ordered-short-week-days.js +3 -2
- package/esm2015/tokens/sanitizer.js +5 -2
- package/esm2015/tokens/scroll-ref.js +5 -2
- package/esm2015/tokens/selection-stream.js +5 -2
- package/esm2015/tokens/svg-content-processor.js +3 -2
- package/esm2015/tokens/svg-src-processor.js +3 -2
- package/esm2015/tokens/textfield-appearance.js +7 -4
- package/esm2015/tokens/textfield-host.js +5 -2
- package/esm2015/tokens/theme.js +2 -2
- package/esm2015/tokens/value-accessor.js +5 -2
- package/esm2015/tokens/viewport.js +6 -2
- package/fesm2015/taiga-ui-core-abstract.js +39 -9
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +4 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +8 -2
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +4 -1
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +4 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +4 -1
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +104 -53
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +187 -132
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +15 -12
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +129 -37
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/package.json +4 -4
- package/tokens/animation-options.d.ts +3 -0
- package/tokens/animations-duration.d.ts +3 -0
- package/tokens/assert-enabled.d.ts +3 -0
- package/tokens/data-list-accessor.d.ts +3 -0
- package/tokens/data-list-host.d.ts +3 -0
- package/tokens/day-type-handler.d.ts +3 -0
- package/tokens/element-ref.d.ts +3 -0
- package/tokens/first-day-of-week.d.ts +3 -0
- package/tokens/i18n.d.ts +18 -0
- package/tokens/icon-place.d.ts +1 -0
- package/tokens/icons-path.d.ts +1 -0
- package/tokens/icons.d.ts +3 -0
- package/tokens/is-mobile-resolution.d.ts +3 -0
- package/tokens/media.d.ts +3 -0
- package/tokens/mode.d.ts +3 -0
- package/tokens/notification-options.d.ts +3 -0
- package/tokens/number-format.d.ts +3 -0
- package/tokens/option-content.d.ts +3 -0
- package/tokens/ordered-short-week-days.d.ts +1 -0
- package/tokens/sanitizer.d.ts +3 -0
- package/tokens/scroll-ref.d.ts +3 -0
- package/tokens/selection-stream.d.ts +3 -0
- package/tokens/svg-content-processor.d.ts +1 -0
- package/tokens/svg-src-processor.d.ts +1 -0
- package/tokens/textfield-appearance.d.ts +5 -1
- package/tokens/textfield-host.d.ts +3 -0
- package/tokens/value-accessor.d.ts +3 -0
- package/tokens/viewport.d.ts +3 -0
|
@@ -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,13 @@
|
|
|
348
348
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
/**
|
|
352
|
+
* A component to display a hint
|
|
353
|
+
*/
|
|
354
|
+
var TUI_HINT_COMPONENT = new i0.InjectionToken("[TUI_HINT_COMPONENT]", {
|
|
355
|
+
factory: function () { return TuiHintComponent; },
|
|
356
|
+
});
|
|
357
|
+
|
|
351
358
|
/** Default values for hint options */
|
|
352
359
|
var TUI_HINT_DEFAULT_OPTIONS = {
|
|
353
360
|
direction: 'bottom-left',
|
|
@@ -356,7 +363,10 @@
|
|
|
356
363
|
appearance: '',
|
|
357
364
|
icon: 'tuiIconHelpCircle',
|
|
358
365
|
};
|
|
359
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Default parameters for hint directive
|
|
368
|
+
*/
|
|
369
|
+
var TUI_HINT_OPTIONS = new i0.InjectionToken('[TUI_HINT_OPTIONS]', {
|
|
360
370
|
factory: function () { return TUI_HINT_DEFAULT_OPTIONS; },
|
|
361
371
|
});
|
|
362
372
|
var tuiHintOptionsProvider = function (override) { return ({
|
|
@@ -439,6 +449,105 @@
|
|
|
439
449
|
args: ['tuiHintHideDelay']
|
|
440
450
|
}] } });
|
|
441
451
|
|
|
452
|
+
var TuiHintDirective = /** @class */ (function () {
|
|
453
|
+
function TuiHintDirective(elementRef, component, hintService, options, activeZone) {
|
|
454
|
+
this.elementRef = elementRef;
|
|
455
|
+
this.component = component;
|
|
456
|
+
this.hintService = hintService;
|
|
457
|
+
this.options = options;
|
|
458
|
+
this.activeZone = activeZone;
|
|
459
|
+
this.content = '';
|
|
460
|
+
this.tuiHintAppearance = null;
|
|
461
|
+
this.type = 'hint';
|
|
462
|
+
}
|
|
463
|
+
Object.defineProperty(TuiHintDirective.prototype, "appearance", {
|
|
464
|
+
get: function () {
|
|
465
|
+
var _a;
|
|
466
|
+
return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;
|
|
467
|
+
},
|
|
468
|
+
enumerable: false,
|
|
469
|
+
configurable: true
|
|
470
|
+
});
|
|
471
|
+
TuiHintDirective.prototype.ngOnChanges = function () {
|
|
472
|
+
if (!this.content) {
|
|
473
|
+
this.toggle(false);
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
TuiHintDirective.prototype.ngOnDestroy = function () {
|
|
477
|
+
this.toggle(false);
|
|
478
|
+
};
|
|
479
|
+
TuiHintDirective.prototype.getClientRect = function () {
|
|
480
|
+
return this.elementRef.nativeElement.getBoundingClientRect();
|
|
481
|
+
};
|
|
482
|
+
TuiHintDirective.prototype.toggle = function (show) {
|
|
483
|
+
if (show && this.content) {
|
|
484
|
+
this.hintService.add(this);
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
this.hintService.remove(this);
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
return TuiHintDirective;
|
|
491
|
+
}());
|
|
492
|
+
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 });
|
|
493
|
+
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: [
|
|
494
|
+
i1$1.tuiAsRectAccessor(TuiHintDirective),
|
|
495
|
+
i1$1.tuiAsVehicle(TuiHintDirective),
|
|
496
|
+
{
|
|
497
|
+
provide: i1.PolymorpheusComponent,
|
|
498
|
+
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
499
|
+
useClass: i1.PolymorpheusComponent,
|
|
500
|
+
},
|
|
501
|
+
], usesOnChanges: true, ngImport: i0__namespace });
|
|
502
|
+
__decorate([
|
|
503
|
+
i3.tuiDefaultProp()
|
|
504
|
+
], TuiHintDirective.prototype, "content", void 0);
|
|
505
|
+
__decorate([
|
|
506
|
+
i3.tuiDefaultProp()
|
|
507
|
+
], TuiHintDirective.prototype, "tuiHintAppearance", void 0);
|
|
508
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDirective, decorators: [{
|
|
509
|
+
type: i0.Directive,
|
|
510
|
+
args: [{
|
|
511
|
+
selector: '[tuiHint]:not(ng-container)',
|
|
512
|
+
providers: [
|
|
513
|
+
i1$1.tuiAsRectAccessor(TuiHintDirective),
|
|
514
|
+
i1$1.tuiAsVehicle(TuiHintDirective),
|
|
515
|
+
{
|
|
516
|
+
provide: i1.PolymorpheusComponent,
|
|
517
|
+
deps: [TUI_HINT_COMPONENT, i0.INJECTOR],
|
|
518
|
+
useClass: i1.PolymorpheusComponent,
|
|
519
|
+
},
|
|
520
|
+
],
|
|
521
|
+
}]
|
|
522
|
+
}], ctorParameters: function () {
|
|
523
|
+
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
524
|
+
type: i0.Inject,
|
|
525
|
+
args: [i0.ElementRef]
|
|
526
|
+
}] }, { type: i1__namespace.PolymorpheusComponent, decorators: [{
|
|
527
|
+
type: i0.Inject,
|
|
528
|
+
args: [i1.PolymorpheusComponent]
|
|
529
|
+
}] }, { type: i2__namespace.TuiHintService, decorators: [{
|
|
530
|
+
type: i0.Inject,
|
|
531
|
+
args: [i2.TuiHintService]
|
|
532
|
+
}] }, { type: undefined, decorators: [{
|
|
533
|
+
type: i0.Inject,
|
|
534
|
+
args: [TUI_HINT_OPTIONS]
|
|
535
|
+
}] }, { type: i3__namespace.TuiActiveZoneDirective, decorators: [{
|
|
536
|
+
type: i0.Optional
|
|
537
|
+
}, {
|
|
538
|
+
type: i0.Inject,
|
|
539
|
+
args: [i3.TuiActiveZoneDirective]
|
|
540
|
+
}] }];
|
|
541
|
+
}, propDecorators: { content: [{
|
|
542
|
+
type: i0.Input,
|
|
543
|
+
args: ['tuiHint']
|
|
544
|
+
}], context: [{
|
|
545
|
+
type: i0.Input,
|
|
546
|
+
args: ['tuiHintContext']
|
|
547
|
+
}], tuiHintAppearance: [{
|
|
548
|
+
type: i0.Input
|
|
549
|
+
}] } });
|
|
550
|
+
|
|
442
551
|
var TuiHintHoverDirective = /** @class */ (function (_super) {
|
|
443
552
|
__extends(TuiHintHoverDirective, _super);
|
|
444
553
|
function TuiHintHoverDirective(hovered$, options, elementRef) {
|
|
@@ -446,19 +555,21 @@
|
|
|
446
555
|
_this.hovered$ = hovered$;
|
|
447
556
|
_this.options = options;
|
|
448
557
|
_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()));
|
|
558
|
+
_this.toggle$ = new i2$1.Subject();
|
|
559
|
+
_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
560
|
_this.showDelay = _this.options.showDelay;
|
|
452
561
|
_this.hideDelay = _this.options.hideDelay;
|
|
562
|
+
_this.type = 'hint';
|
|
563
|
+
_this.enabled = true;
|
|
453
564
|
return _this;
|
|
454
565
|
}
|
|
455
566
|
TuiHintHoverDirective.prototype.toggle = function (visible) {
|
|
456
567
|
this.toggle$.next(visible);
|
|
457
568
|
};
|
|
458
569
|
return TuiHintHoverDirective;
|
|
459
|
-
}(i1.TuiDriver));
|
|
570
|
+
}(i1$1.TuiDriver));
|
|
460
571
|
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 });
|
|
572
|
+
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
573
|
__decorate([
|
|
463
574
|
i3.tuiDefaultProp()
|
|
464
575
|
], TuiHintHoverDirective.prototype, "showDelay", void 0);
|
|
@@ -470,10 +581,10 @@
|
|
|
470
581
|
args: [{
|
|
471
582
|
selector: '[tuiHint]:not(ng-container)',
|
|
472
583
|
exportAs: 'tuiHintHover',
|
|
473
|
-
providers: [i1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService],
|
|
584
|
+
providers: [i1$1.tuiAsDriver(TuiHintHoverDirective), i3.TuiHoveredService],
|
|
474
585
|
}]
|
|
475
586
|
}], ctorParameters: function () {
|
|
476
|
-
return [{ type: i2__namespace.Observable, decorators: [{
|
|
587
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
477
588
|
type: i0.Inject,
|
|
478
589
|
args: [i3.TuiHoveredService]
|
|
479
590
|
}] }, { type: undefined, decorators: [{
|
|
@@ -509,16 +620,16 @@
|
|
|
509
620
|
}(TuiHintHoverDirective));
|
|
510
621
|
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
622
|
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),
|
|
623
|
+
i1$1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
624
|
+
i1$1.tuiAsDriver(TuiHintPointerDirective),
|
|
514
625
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
515
626
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPointerDirective, decorators: [{
|
|
516
627
|
type: i0.Directive,
|
|
517
628
|
args: [{
|
|
518
629
|
selector: '[tuiHint][tuiHintPointer]',
|
|
519
630
|
providers: [
|
|
520
|
-
i1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
521
|
-
i1.tuiAsDriver(TuiHintPointerDirective),
|
|
631
|
+
i1$1.tuiAsRectAccessor(TuiHintPointerDirective),
|
|
632
|
+
i1$1.tuiAsDriver(TuiHintPointerDirective),
|
|
522
633
|
],
|
|
523
634
|
}]
|
|
524
635
|
}], propDecorators: { onMove: [{
|
|
@@ -581,8 +692,14 @@
|
|
|
581
692
|
};
|
|
582
693
|
return TuiHintComponent;
|
|
583
694
|
}());
|
|
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: [
|
|
695
|
+
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 });
|
|
696
|
+
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: [
|
|
697
|
+
i3.TuiDestroyService,
|
|
698
|
+
i2.TuiPositionService,
|
|
699
|
+
i3.TuiHoveredService,
|
|
700
|
+
i1$1.tuiPositionAccessorFor('hint'),
|
|
701
|
+
i1$1.tuiRectAccessorFor('hint', TuiHintDirective),
|
|
702
|
+
], 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
703
|
__decorate([
|
|
587
704
|
i3.tuiPure
|
|
588
705
|
], TuiHintComponent.prototype, "update", null);
|
|
@@ -593,24 +710,30 @@
|
|
|
593
710
|
template: "\n <ng-container *polymorpheusOutlet=\"content as text; context: context\">\n {{ text }}\n </ng-container>\n ",
|
|
594
711
|
styleUrls: ['./hint.style.less'],
|
|
595
712
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
596
|
-
providers: [
|
|
713
|
+
providers: [
|
|
714
|
+
i3.TuiDestroyService,
|
|
715
|
+
i2.TuiPositionService,
|
|
716
|
+
i3.TuiHoveredService,
|
|
717
|
+
i1$1.tuiPositionAccessorFor('hint'),
|
|
718
|
+
i1$1.tuiRectAccessorFor('hint', TuiHintDirective),
|
|
719
|
+
],
|
|
597
720
|
animations: [animations.tuiFadeIn],
|
|
598
721
|
}]
|
|
599
722
|
}], ctorParameters: function () {
|
|
600
|
-
return [{ type: i2__namespace.Observable, decorators: [{
|
|
723
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
601
724
|
type: i0.Inject,
|
|
602
725
|
args: [i3.TuiHoveredService]
|
|
603
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
726
|
+
}] }, { type: i2__namespace$1.Observable, decorators: [{
|
|
604
727
|
type: i0.Inject,
|
|
605
|
-
args: [i2
|
|
606
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
728
|
+
args: [i2.TuiPositionService]
|
|
729
|
+
}] }, { type: i2__namespace$1.Observable, decorators: [{
|
|
607
730
|
type: i0.Self
|
|
608
731
|
}, {
|
|
609
732
|
type: i0.Inject,
|
|
610
733
|
args: [i3.TuiDestroyService]
|
|
611
734
|
}] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
|
|
612
735
|
type: i0.Inject,
|
|
613
|
-
args: [i1.TuiRectAccessor]
|
|
736
|
+
args: [i1$1.TuiRectAccessor]
|
|
614
737
|
}] }, { type: i0__namespace.ElementRef, decorators: [{
|
|
615
738
|
type: i0.Inject,
|
|
616
739
|
args: [i0.ElementRef]
|
|
@@ -619,7 +742,7 @@
|
|
|
619
742
|
args: [tokens.TUI_ANIMATION_OPTIONS]
|
|
620
743
|
}] }, { type: undefined, decorators: [{
|
|
621
744
|
type: i0.Inject,
|
|
622
|
-
args: [i1
|
|
745
|
+
args: [i1.POLYMORPHEUS_CONTEXT]
|
|
623
746
|
}] }, { type: TuiHintHoverDirective, decorators: [{
|
|
624
747
|
type: i0.Inject,
|
|
625
748
|
args: [TuiHintHoverDirective]
|
|
@@ -648,123 +771,20 @@
|
|
|
648
771
|
args: ['document:click', ['$event.target']]
|
|
649
772
|
}], update: [] } });
|
|
650
773
|
|
|
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
774
|
var TuiHintDescribeDirective = /** @class */ (function (_super) {
|
|
754
775
|
__extends(TuiHintDescribeDirective, _super);
|
|
755
|
-
function TuiHintDescribeDirective(ngZone,
|
|
776
|
+
function TuiHintDescribeDirective(ngZone, documentRef, elementRef) {
|
|
756
777
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
757
778
|
_this.ngZone = ngZone;
|
|
758
|
-
_this.hover$ = hover$;
|
|
759
779
|
_this.documentRef = documentRef;
|
|
760
780
|
_this.elementRef = elementRef;
|
|
761
|
-
_this.
|
|
781
|
+
_this.stream$ = i3.tuiTypedFromEvent(_this.documentRef, 'keydown', {
|
|
762
782
|
capture: true,
|
|
763
783
|
}).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$);
|
|
784
|
+
? i2$1.of(false)
|
|
785
|
+
: 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
786
|
_this.tuiHintDescribe = '';
|
|
787
|
+
_this.type = 'hint';
|
|
768
788
|
return _this;
|
|
769
789
|
}
|
|
770
790
|
Object.defineProperty(TuiHintDescribeDirective.prototype, "focused", {
|
|
@@ -783,9 +803,9 @@
|
|
|
783
803
|
configurable: true
|
|
784
804
|
});
|
|
785
805
|
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 });
|
|
806
|
+
}(i1$1.TuiDriver));
|
|
807
|
+
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 });
|
|
808
|
+
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
809
|
__decorate([
|
|
790
810
|
i3.tuiPure
|
|
791
811
|
], TuiHintDescribeDirective.prototype, "element", null);
|
|
@@ -793,15 +813,12 @@
|
|
|
793
813
|
type: i0.Directive,
|
|
794
814
|
args: [{
|
|
795
815
|
selector: '[tuiHintDescribe]',
|
|
796
|
-
providers: [i1.tuiAsDriver(TuiHintDescribeDirective)],
|
|
816
|
+
providers: [i1$1.tuiAsDriver(TuiHintDescribeDirective)],
|
|
797
817
|
}]
|
|
798
818
|
}], ctorParameters: function () {
|
|
799
819
|
return [{ type: i0__namespace.NgZone, decorators: [{
|
|
800
820
|
type: i0.Inject,
|
|
801
821
|
args: [i0.NgZone]
|
|
802
|
-
}] }, { type: i2__namespace.Observable, decorators: [{
|
|
803
|
-
type: i0.Inject,
|
|
804
|
-
args: [TuiHintHoverDirective]
|
|
805
822
|
}] }, { type: Document, decorators: [{
|
|
806
823
|
type: i0.Inject,
|
|
807
824
|
args: [common.DOCUMENT]
|
|
@@ -815,12 +832,15 @@
|
|
|
815
832
|
|
|
816
833
|
var TuiHintDriverDirective = /** @class */ (function (_super) {
|
|
817
834
|
__extends(TuiHintDriverDirective, _super);
|
|
818
|
-
|
|
819
|
-
|
|
835
|
+
// TODO: Figure out why this is necessary under nx test runner
|
|
836
|
+
function TuiHintDriverDirective(destroy$, drivers, vehicles) {
|
|
837
|
+
var _this = _super.call(this, destroy$, drivers, vehicles) || this;
|
|
838
|
+
_this.type = 'hint';
|
|
839
|
+
return _this;
|
|
820
840
|
}
|
|
821
841
|
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:
|
|
842
|
+
}(i1$1.AbstractTuiDriverDirective));
|
|
843
|
+
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
844
|
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
845
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintDriverDirective, decorators: [{
|
|
826
846
|
type: i0.Directive,
|
|
@@ -828,26 +848,41 @@
|
|
|
828
848
|
selector: '[tuiHint]',
|
|
829
849
|
providers: [i3.TuiDestroyService],
|
|
830
850
|
}]
|
|
831
|
-
}]
|
|
851
|
+
}], ctorParameters: function () {
|
|
852
|
+
return [{ type: i2__namespace$1.Observable, decorators: [{
|
|
853
|
+
type: i0.Self
|
|
854
|
+
}, {
|
|
855
|
+
type: i0.Inject,
|
|
856
|
+
args: [i3.TuiDestroyService]
|
|
857
|
+
}] }, { type: undefined, decorators: [{
|
|
858
|
+
type: i0.Inject,
|
|
859
|
+
args: [i1$1.TuiDriver]
|
|
860
|
+
}] }, { type: undefined, decorators: [{
|
|
861
|
+
type: i0.Inject,
|
|
862
|
+
args: [i1$1.TuiVehicle]
|
|
863
|
+
}] }];
|
|
864
|
+
} });
|
|
832
865
|
|
|
833
866
|
var TuiHintHostDirective = /** @class */ (function (_super) {
|
|
834
867
|
__extends(TuiHintHostDirective, _super);
|
|
835
868
|
function TuiHintHostDirective() {
|
|
836
|
-
|
|
869
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
870
|
+
_this.type = 'hint';
|
|
871
|
+
return _this;
|
|
837
872
|
}
|
|
838
873
|
TuiHintHostDirective.prototype.getClientRect = function () {
|
|
839
874
|
var _a;
|
|
840
875
|
return ((_a = this.tuiHintHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || i3.EMPTY_CLIENT_RECT;
|
|
841
876
|
};
|
|
842
877
|
return TuiHintHostDirective;
|
|
843
|
-
}(i1.TuiRectAccessor));
|
|
878
|
+
}(i1$1.TuiRectAccessor));
|
|
844
879
|
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 });
|
|
880
|
+
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
881
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintHostDirective, decorators: [{
|
|
847
882
|
type: i0.Directive,
|
|
848
883
|
args: [{
|
|
849
884
|
selector: '[tuiHint][tuiHintHost]',
|
|
850
|
-
providers: [i1.tuiAsRectAccessor(TuiHintHostDirective)],
|
|
885
|
+
providers: [i1$1.tuiAsRectAccessor(TuiHintHostDirective)],
|
|
851
886
|
}]
|
|
852
887
|
}], propDecorators: { tuiHintHost: [{
|
|
853
888
|
type: i0.Input
|
|
@@ -855,26 +890,33 @@
|
|
|
855
890
|
|
|
856
891
|
var TuiHintManualDirective = /** @class */ (function (_super) {
|
|
857
892
|
__extends(TuiHintManualDirective, _super);
|
|
858
|
-
function TuiHintManualDirective() {
|
|
893
|
+
function TuiHintManualDirective(hover) {
|
|
859
894
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
860
|
-
_this.stream$ = new i2.Subject();
|
|
895
|
+
_this.stream$ = new i2$1.Subject();
|
|
861
896
|
_this.tuiHintManual = false;
|
|
897
|
+
_this.type = 'hint';
|
|
898
|
+
hover.enabled = false;
|
|
862
899
|
return _this;
|
|
863
900
|
}
|
|
864
901
|
TuiHintManualDirective.prototype.ngOnChanges = function () {
|
|
865
902
|
this.stream$.next(this.tuiHintManual);
|
|
866
903
|
};
|
|
867
904
|
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 });
|
|
905
|
+
}(i1$1.TuiDriver));
|
|
906
|
+
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 });
|
|
907
|
+
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
908
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintManualDirective, decorators: [{
|
|
872
909
|
type: i0.Directive,
|
|
873
910
|
args: [{
|
|
874
911
|
selector: '[tuiHint][tuiHintManual]',
|
|
875
|
-
providers: [i1.tuiAsDriver(TuiHintManualDirective)],
|
|
912
|
+
providers: [i1$1.tuiAsDriver(TuiHintManualDirective)],
|
|
876
913
|
}]
|
|
877
|
-
}], ctorParameters: function () {
|
|
914
|
+
}], ctorParameters: function () {
|
|
915
|
+
return [{ type: TuiHintHoverDirective, decorators: [{
|
|
916
|
+
type: i0.Inject,
|
|
917
|
+
args: [TuiHintHoverDirective]
|
|
918
|
+
}] }];
|
|
919
|
+
}, propDecorators: { tuiHintManual: [{
|
|
878
920
|
type: i0.Input
|
|
879
921
|
}] } });
|
|
880
922
|
|
|
@@ -882,22 +924,28 @@
|
|
|
882
924
|
var ARROW_OFFSET = 22;
|
|
883
925
|
var TOP = 0;
|
|
884
926
|
var LEFT = 1;
|
|
885
|
-
var TuiHintPositionDirective = /** @class */ (function () {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
927
|
+
var TuiHintPositionDirective = /** @class */ (function (_super) {
|
|
928
|
+
__extends(TuiHintPositionDirective, _super);
|
|
929
|
+
function TuiHintPositionDirective(options, viewport, directive, accessors) {
|
|
930
|
+
var _this = _super.call(this) || this;
|
|
931
|
+
_this.options = options;
|
|
932
|
+
_this.viewport = viewport;
|
|
933
|
+
_this.directive = directive;
|
|
934
|
+
_this.accessors = accessors;
|
|
935
|
+
_this.points = constants.TUI_HINT_DIRECTIONS.reduce(function (acc, direction) {
|
|
936
|
+
var _c;
|
|
937
|
+
return (Object.assign(Object.assign({}, acc), (_c = {}, _c[direction] = [0, 0], _c)));
|
|
893
938
|
}, {});
|
|
894
|
-
|
|
939
|
+
_this.direction = _this.options.direction;
|
|
940
|
+
_this.type = 'hint';
|
|
941
|
+
return _this;
|
|
895
942
|
}
|
|
896
943
|
// eslint-disable-next-line max-statements
|
|
897
|
-
TuiHintPositionDirective.prototype.getPosition = function (
|
|
944
|
+
TuiHintPositionDirective.prototype.getPosition = function (_c) {
|
|
898
945
|
var _this = this;
|
|
899
|
-
var width =
|
|
900
|
-
var
|
|
946
|
+
var width = _c.width, height = _c.height;
|
|
947
|
+
var _a, _b;
|
|
948
|
+
var hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : i3.EMPTY_CLIENT_RECT;
|
|
901
949
|
var leftCenter = hostRect.left + hostRect.width / 2;
|
|
902
950
|
var topCenter = hostRect.top + hostRect.height / 2;
|
|
903
951
|
this.points['top-left'][TOP] = hostRect.top - height - OFFSET;
|
|
@@ -930,6 +978,13 @@
|
|
|
930
978
|
var direction = constants.TUI_HINT_DIRECTIONS.find(function (direction) { return _this.checkPosition(_this.points[direction], width, height); });
|
|
931
979
|
return this.points[direction || this.fallback];
|
|
932
980
|
};
|
|
981
|
+
Object.defineProperty(TuiHintPositionDirective.prototype, "accessor", {
|
|
982
|
+
get: function () {
|
|
983
|
+
return i1$1.tuiFallbackRectAccessor('hint')(this.accessors, this.directive);
|
|
984
|
+
},
|
|
985
|
+
enumerable: false,
|
|
986
|
+
configurable: true
|
|
987
|
+
});
|
|
933
988
|
Object.defineProperty(TuiHintPositionDirective.prototype, "fallback", {
|
|
934
989
|
get: function () {
|
|
935
990
|
return this.points.top[TOP] >
|
|
@@ -940,8 +995,8 @@
|
|
|
940
995
|
enumerable: false,
|
|
941
996
|
configurable: true
|
|
942
997
|
});
|
|
943
|
-
TuiHintPositionDirective.prototype.checkPosition = function (
|
|
944
|
-
var
|
|
998
|
+
TuiHintPositionDirective.prototype.checkPosition = function (_c, width, height) {
|
|
999
|
+
var _d = __read(_c, 2), top = _d[0], left = _d[1];
|
|
945
1000
|
var viewport = this.viewport.getClientRect();
|
|
946
1001
|
return (top > OFFSET &&
|
|
947
1002
|
left > OFFSET &&
|
|
@@ -949,17 +1004,20 @@
|
|
|
949
1004
|
left + width < viewport.right - OFFSET);
|
|
950
1005
|
};
|
|
951
1006
|
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 });
|
|
1007
|
+
}(i1$1.TuiPositionAccessor));
|
|
1008
|
+
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 });
|
|
1009
|
+
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
1010
|
__decorate([
|
|
956
1011
|
i3.tuiDefaultProp()
|
|
957
1012
|
], TuiHintPositionDirective.prototype, "direction", void 0);
|
|
1013
|
+
__decorate([
|
|
1014
|
+
i3.tuiPure
|
|
1015
|
+
], TuiHintPositionDirective.prototype, "accessor", null);
|
|
958
1016
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintPositionDirective, decorators: [{
|
|
959
1017
|
type: i0.Directive,
|
|
960
1018
|
args: [{
|
|
961
1019
|
selector: '[tuiHint]:not([tuiHintCustomPosition])',
|
|
962
|
-
providers: [i1.tuiAsPositionAccessor(TuiHintPositionDirective)],
|
|
1020
|
+
providers: [i1$1.tuiAsPositionAccessor(TuiHintPositionDirective)],
|
|
963
1021
|
}]
|
|
964
1022
|
}], ctorParameters: function () {
|
|
965
1023
|
return [{ type: undefined, decorators: [{
|
|
@@ -970,12 +1028,15 @@
|
|
|
970
1028
|
args: [tokens.TUI_VIEWPORT]
|
|
971
1029
|
}] }, { type: i1__namespace$1.TuiRectAccessor, decorators: [{
|
|
972
1030
|
type: i0.Inject,
|
|
973
|
-
args: [
|
|
1031
|
+
args: [TuiHintDirective]
|
|
1032
|
+
}] }, { type: undefined, decorators: [{
|
|
1033
|
+
type: i0.Inject,
|
|
1034
|
+
args: [i1$1.TuiRectAccessor]
|
|
974
1035
|
}] }];
|
|
975
1036
|
}, propDecorators: { direction: [{
|
|
976
1037
|
type: i0.Input,
|
|
977
1038
|
args: ['tuiHintDirection']
|
|
978
|
-
}] } });
|
|
1039
|
+
}], accessor: [] } });
|
|
979
1040
|
|
|
980
1041
|
var TuiHintModule = /** @class */ (function () {
|
|
981
1042
|
function TuiHintModule() {
|
|
@@ -992,7 +1053,7 @@
|
|
|
992
1053
|
TuiHintPointerDirective,
|
|
993
1054
|
TuiHintDescribeDirective,
|
|
994
1055
|
TuiHintPositionDirective,
|
|
995
|
-
TuiHintOptionsDirective], imports: [common.CommonModule, i1
|
|
1056
|
+
TuiHintOptionsDirective], imports: [common.CommonModule, i1.PolymorpheusModule], exports: [TuiHintComponent,
|
|
996
1057
|
TuiHintDirective,
|
|
997
1058
|
TuiHintDriverDirective,
|
|
998
1059
|
TuiHintHostDirective,
|
|
@@ -1002,11 +1063,11 @@
|
|
|
1002
1063
|
TuiHintDescribeDirective,
|
|
1003
1064
|
TuiHintPositionDirective,
|
|
1004
1065
|
TuiHintOptionsDirective] });
|
|
1005
|
-
TuiHintModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, imports: [[common.CommonModule, i1
|
|
1066
|
+
TuiHintModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, imports: [[common.CommonModule, i1.PolymorpheusModule]] });
|
|
1006
1067
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiHintModule, decorators: [{
|
|
1007
1068
|
type: i0.NgModule,
|
|
1008
1069
|
args: [{
|
|
1009
|
-
imports: [common.CommonModule, i1
|
|
1070
|
+
imports: [common.CommonModule, i1.PolymorpheusModule],
|
|
1010
1071
|
declarations: [
|
|
1011
1072
|
TuiHintComponent,
|
|
1012
1073
|
TuiHintDirective,
|