@taiga-ui/core 2.63.0 → 2.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-core-components-hints-host.umd.js +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +2 -2
- package/esm5/components/hints-host/hint-box/hint-box.component.js +2 -2
- package/fesm2015/taiga-ui-core-components-hints-host.js +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk';\nimport {TuiHint} from '@taiga-ui/core/interfaces';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiHintBoxComponent} from './hint-box/hint-box.component';\n\n@Component({\n selector: `tui-hints-host`,\n templateUrl: `./hints-host.template.html`,\n styleUrls: [`./hints-host.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [TUI_PARENT_ANIMATION],\n host: {\n 'aria-live': `polite`,\n },\n})\nexport class TuiHintsHostComponent {\n readonly component = new PolymorpheusComponent(TuiHintBoxComponent);\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: Observable<readonly TuiHint[]>,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n px,\n TuiContextWithImplicit,\n TuiDestroyService,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `bottom-left`,\n 'top-right': `bottom-right`,\n 'bottom-left': `top-left`,\n 'bottom-right': `top-right`,\n left: `right`,\n right: `left`,\n 'top-middle': `bottom-middle`,\n 'bottom-middle': `top-middle`,\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `top-right`,\n 'top-right': `top-left`,\n 'bottom-left': `bottom-right`,\n 'bottom-right': `bottom-left`,\n left: `right`,\n right: `left`,\n 'top-middle': `top-middle`,\n 'bottom-middle': `bottom-middle`,\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: `tui-hint-box[hint]`,\n templateUrl: `./hint-box.template.html`,\n styleUrls: [`./hint-box.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn],\n})\nexport class TuiHintBoxComponent {\n @ViewChild(`arrow`)\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @HostBinding(`@tuiFadeIn`)\n readonly animation = {value: ``, ...this.options} as const;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(forwardRef(() => TuiHintsHostComponent))\n private readonly hintsHost: TuiHintsHostComponent,\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<AbstractTuiHint>,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n get hint(): AbstractTuiHint {\n return this.context.$implicit;\n }\n\n @tuiPure\n @HostBinding(`class._untouchable`)\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding(`attr.data-mode`)\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return tuiIsMobile(this.windowRef, this.media);\n }\n\n onHovered(hovered: boolean): void {\n if (this.hint instanceof TuiHintDirective) {\n this.hint.componentHovered$.next(hovered);\n }\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== `overflow`) {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n `left`,\n `right`,\n `bottom-left`,\n `bottom-right`,\n `bottom-middle`,\n `top-left`,\n `top-right`,\n `top-middle`,\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case `left`:\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case `right`:\n top = horizontalTop;\n left = horizontalRight;\n break;\n case `top-right`:\n top = verticalTop;\n left = verticalRight;\n break;\n case `top-left`:\n top = verticalTop;\n left = verticalLeft;\n break;\n case `bottom-right`:\n top = verticalBottom;\n left = verticalRight;\n break;\n case `bottom-left`:\n top = verticalBottom;\n left = verticalLeft;\n break;\n case `bottom-middle`:\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case `top-middle`:\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes(`top`) && verticalTopFit) || !verticalBottomFit\n ? `top`\n : `bottom`;\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === `top` ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHoveredModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n entryComponents: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHintBoxModule, TuiActiveZoneModule],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;IAsBI,+BACyC,UAAmC,EACvC,MAAsC;QADlC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgC;QAJlE,cAAS,GAAG,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;KAKhE;IAEJ,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;SAChE;;;OAAA;;gBANoD,UAAU,uBAA1D,MAAM,SAAC,UAAU;gBACuB,UAAU,uBAAlD,MAAM,SAAC,cAAc;;IALjB,qBAAqB;QAVjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,4SAAyC;YAEzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,UAAU,EAAE,CAAC,oBAAoB,CAAC;YAClC,IAAI,EAAE;gBACF,WAAW,EAAE,QAAQ;aACxB;;SACJ,CAAC;QAKO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;OALlB,qBAAqB,CAWjC;IAAD,4BAAC;CAXD;;ACcA,IAAM,KAAK,GAAG,CAAC,CAAC;AAChB,IAAM,YAAY,GAAG,CAAC,CAAC;AACvB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,gBAAgB,GAAG,YAAY,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACxE,IAAM,yBAAyB,GAA0C;IACrE,UAAU,EAAE,aAAa;IACzB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A;QAC7B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,UAAU,CAAC,cAAM,OAAA,qBAAqB,GAAA,CAAC,CAAC,CAAA;QAE/C,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;OAjBxB,mBAAmB,CA+N/B;IAAD,0BAAC;CA/ND;;;IC3DA;KAAgC;IAAnB,gBAAgB;QAN5B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;YAC7D,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;YAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;SACzC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;;ICAA;KAAkC;IAArB,kBAAkB;QAL9B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;YAClF,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACbA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-hints-host.js","sources":["ng://@taiga-ui/core/components/hints-host/hints-host.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.component.ts","ng://@taiga-ui/core/components/hints-host/hint-box/hint-box.module.ts","ng://@taiga-ui/core/components/hints-host/hints-host.module.ts","ng://@taiga-ui/core/components/hints-host/taiga-ui-core-components-hints-host.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, Inject} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk';\nimport {TuiHint} from '@taiga-ui/core/interfaces';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiHintBoxComponent} from './hint-box/hint-box.component';\n\n@Component({\n selector: `tui-hints-host`,\n templateUrl: `./hints-host.template.html`,\n styleUrls: [`./hints-host.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [TUI_PARENT_ANIMATION],\n host: {\n 'aria-live': `polite`,\n },\n})\nexport class TuiHintsHostComponent {\n readonly component = new PolymorpheusComponent(TuiHintBoxComponent);\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) readonly hints$: Observable<readonly TuiHint[]>,\n ) {}\n\n get clientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n px,\n TuiContextWithImplicit,\n TuiDestroyService,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {tuiFadeIn} from '@taiga-ui/core/animations';\nimport {TuiHintDirective} from '@taiga-ui/core/directives';\nimport {TuiPointerHintDirective} from '@taiga-ui/core/directives/pointer-hint';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_MEDIA} from '@taiga-ui/core/tokens';\nimport {TuiDirection, TuiHintModeT} from '@taiga-ui/core/types';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiHintsHostComponent} from '../hints-host.component';\n\nconst SPACE = 8;\nconst BORDER_WIDTH = 1;\nconst LEFT_PADDING = 16;\nconst TOP_PADDING = 12;\nconst ARROW_SIZE = 8;\nconst ARROW_OFFSET = 16;\nconst ARROWHEAD_OFFSET = ARROW_OFFSET + (ARROW_SIZE * Math.sqrt(2)) / 2;\nconst reverseDirectionsVertical: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `bottom-left`,\n 'top-right': `bottom-right`,\n 'bottom-left': `top-left`,\n 'bottom-right': `top-right`,\n left: `right`,\n right: `left`,\n 'top-middle': `bottom-middle`,\n 'bottom-middle': `top-middle`,\n};\nconst reverseDirectionsHorizontal: {[key in TuiDirection]: TuiDirection} = {\n 'top-left': `top-right`,\n 'top-right': `top-left`,\n 'bottom-left': `bottom-right`,\n 'bottom-right': `bottom-left`,\n left: `right`,\n right: `left`,\n 'top-middle': `top-middle`,\n 'bottom-middle': `bottom-middle`,\n};\n\n// TODO: consider abstracting UI and move to CDK, split hint and overflow\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: `tui-hint-box[hint]`,\n templateUrl: `./hint-box.template.html`,\n styleUrls: [`./hint-box.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn],\n})\nexport class TuiHintBoxComponent {\n @ViewChild(`arrow`)\n private readonly arrow?: ElementRef<HTMLElement>;\n\n @HostBinding(`@tuiFadeIn`)\n readonly animation = {value: ``, ...this.options} as const;\n\n constructor(\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(TUI_MEDIA) private readonly media: TuiMedia,\n @Inject(forwardRef(() => TuiHintsHostComponent))\n private readonly hintsHost: TuiHintsHostComponent,\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<AbstractTuiHint>,\n ) {\n animationFrame$\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => this.calculatePosition());\n }\n\n get hint(): AbstractTuiHint {\n return this.context.$implicit;\n }\n\n @tuiPure\n @HostBinding(`class._untouchable`)\n get isUntouchable(): boolean {\n return this.hint instanceof TuiPointerHintDirective;\n }\n\n @HostBinding(`attr.data-mode`)\n get mode(): TuiHintModeT | null {\n return this.hint.mode;\n }\n\n get isMobile(): boolean {\n return tuiIsMobile(this.windowRef, this.media);\n }\n\n onHovered(hovered: boolean): void {\n if (this.hint instanceof TuiHintDirective) {\n this.hint.componentHovered$.next(hovered);\n }\n }\n\n /**\n * Calculates wrapper position.\n * Styles are set directly to avoid visual shake of element\n */\n private calculatePosition(): void {\n if (this.mode !== `overflow`) {\n this.calculateCoordinates();\n } else {\n this.setOverflowStyles();\n }\n }\n\n private calculateCoordinates(): void {\n if (this.isMobile) {\n this.calculateMobileCoordinates();\n\n return;\n }\n\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const isHostLong = hostRect.width > ARROWHEAD_OFFSET * 2;\n const directions: TuiDirection[] = [\n `left`,\n `right`,\n `bottom-left`,\n `bottom-right`,\n `bottom-middle`,\n `top-left`,\n `top-right`,\n `top-middle`,\n ];\n\n let top = 0;\n let left = 0;\n let {direction} = this.hint;\n\n const horizontalTop =\n hostRect.top + hostRect.height / 2 - tooltipRect.height / 2 - portalRect.top;\n const horizontalLeft =\n hostRect.left - tooltipRect.width - SPACE - portalRect.left;\n const horizontalRight = hostRect.left + hostRect.width + SPACE - portalRect.left;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalRight = isHostLong\n ? hostRect.left - portalRect.left\n : hostRect.left + hostRect.width / 2 - ARROWHEAD_OFFSET - portalRect.left;\n const verticalLeft = isHostLong\n ? hostRect.left - tooltipRect.width + hostRect.width - portalRect.left\n : hostRect.left -\n tooltipRect.width +\n hostRect.width / 2 +\n ARROWHEAD_OFFSET -\n portalRect.left;\n const verticalMiddle =\n hostRect.left - tooltipRect.width / 2 + hostRect.width / 2 - portalRect.left;\n\n directions.splice(directions.indexOf(direction), 1);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (direction) {\n case `left`:\n top = horizontalTop;\n left = horizontalLeft;\n break;\n case `right`:\n top = horizontalTop;\n left = horizontalRight;\n break;\n case `top-right`:\n top = verticalTop;\n left = verticalRight;\n break;\n case `top-left`:\n top = verticalTop;\n left = verticalLeft;\n break;\n case `bottom-right`:\n top = verticalBottom;\n left = verticalRight;\n break;\n case `bottom-left`:\n top = verticalBottom;\n left = verticalLeft;\n break;\n case `bottom-middle`:\n top = verticalBottom;\n left = verticalMiddle;\n break;\n case `top-middle`:\n top = verticalTop;\n left = verticalMiddle;\n break;\n }\n\n const verticalFit =\n top + portalRect.top > SPACE &&\n top + tooltipRect.height + SPACE + portalRect.top <\n this.windowRef.innerHeight;\n const horizontalFit =\n left > SPACE &&\n left + tooltipRect.width + SPACE + portalRect.left < portalRect.width;\n\n if (directions.length === 0 || (verticalFit && horizontalFit)) {\n break;\n }\n\n direction = verticalFit\n ? reverseDirectionsHorizontal[direction]\n : reverseDirectionsVertical[direction];\n direction =\n directions.splice(directions.indexOf(direction), 1)[0] || direction;\n }\n\n style.top = px(top);\n style.left = px(left);\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private calculateMobileCoordinates(): void {\n const hostRect = this.hint.getElementClientRect();\n const portalRect = this.hintsHost.clientRect;\n const tooltip = this.elementRef.nativeElement;\n const {style} = tooltip;\n const tooltipRect = tooltip.getBoundingClientRect();\n const verticalTop = hostRect.top - tooltipRect.height - SPACE - portalRect.top;\n const verticalBottom = hostRect.bottom + SPACE - portalRect.top;\n const verticalTopFit =\n verticalTop + portalRect.top > SPACE &&\n hostRect.top < this.windowRef.innerHeight;\n const verticalBottomFit =\n hostRect.bottom > 0 &&\n hostRect.bottom + 2 * SPACE + tooltipRect.height < this.windowRef.innerHeight;\n const direction =\n (this.hint.direction.includes(`top`) && verticalTopFit) || !verticalBottomFit\n ? `top`\n : `bottom`;\n const attemptedLeft =\n portalRect.left + hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;\n const left = Math.max(\n attemptedLeft + tooltipRect.width + SPACE > portalRect.right\n ? portalRect.right - SPACE - tooltipRect.width\n : attemptedLeft,\n SPACE * 2,\n );\n\n style.left = px(left);\n style.top = direction === `top` ? px(verticalTop) : px(verticalBottom);\n\n if (this.arrow) {\n this.arrow.nativeElement.style.left = px(\n hostRect.left <= SPACE * 2 && hostRect.width > ARROW_OFFSET * 2\n ? ARROW_OFFSET\n : hostRect.left + hostRect.width / 2 - left - ARROW_SIZE / 2,\n );\n }\n\n tooltip.setAttribute(`data-tui-host-direction`, direction);\n }\n\n private setOverflowStyles(): void {\n const hostRect = this.hint.getElementClientRect();\n const {style} = this.elementRef.nativeElement;\n\n style.top = px(hostRect.top - window.innerHeight - TOP_PADDING - BORDER_WIDTH);\n style.left = px(hostRect.left - LEFT_PADDING - BORDER_WIDTH);\n style.width = px(hostRect.width + LEFT_PADDING * 2 + BORDER_WIDTH * 2);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiHoveredModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxComponent} from './hint-box.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHoveredModule],\n declarations: [TuiHintBoxComponent],\n exports: [TuiHintBoxComponent],\n entryComponents: [TuiHintBoxComponent],\n})\nexport class TuiHintBoxModule {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiHintBoxModule} from './hint-box/hint-box.module';\nimport {TuiHintsHostComponent} from './hints-host.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiHintBoxModule, TuiActiveZoneModule],\n declarations: [TuiHintsHostComponent],\n exports: [TuiHintsHostComponent],\n})\nexport class TuiHintsHostModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;IAsBI,+BACyC,UAAmC,EACvC,MAAsC;QADlC,eAAU,GAAV,UAAU,CAAyB;QACvC,WAAM,GAAN,MAAM,CAAgC;QAJlE,cAAS,GAAG,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;KAKhE;IAEJ,sBAAI,6CAAU;aAAd;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;SAChE;;;OAAA;;gBANoD,UAAU,uBAA1D,MAAM,SAAC,UAAU;gBACuB,UAAU,uBAAlD,MAAM,SAAC,cAAc;;IALjB,qBAAqB;QAVjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;YAC1B,4SAAyC;YAEzC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,UAAU,EAAE,CAAC,oBAAoB,CAAC;YAClC,IAAI,EAAE;gBACF,WAAW,EAAE,QAAQ;aACxB;;SACJ,CAAC;QAKO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;OALlB,qBAAqB,CAWjC;IAAD,4BAAC;CAXD;;ACcA,IAAM,KAAK,GAAG,CAAC,CAAC;AAChB,IAAM,YAAY,GAAG,CAAC,CAAC;AACvB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,WAAW,GAAG,EAAE,C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.0",
|
|
4
4
|
"description": "Core library for creating Angular components and applications using Taiga UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"repository": "https://github.com/tinkoff/taiga-ui",
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@taiga-ui/i18n": "^2.
|
|
18
|
+
"@taiga-ui/i18n": "^2.64.0",
|
|
19
19
|
"tslib": "^1.10.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@angular/router": ">=9.0.0",
|
|
28
28
|
"@ng-web-apis/common": ">=1.12.1 < 2",
|
|
29
29
|
"@ng-web-apis/mutation-observer": ">=1.1.0 < 2",
|
|
30
|
-
"@taiga-ui/cdk": ">=2.
|
|
31
|
-
"@taiga-ui/i18n": ">=2.
|
|
30
|
+
"@taiga-ui/cdk": ">=2.64.0",
|
|
31
|
+
"@taiga-ui/i18n": ">=2.64.0",
|
|
32
32
|
"@tinkoff/ng-event-plugins": ">=2.3.2",
|
|
33
33
|
"@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
|
|
34
34
|
"rxjs": ">=6.0.0"
|