@taiga-ui/core 2.31.0 → 2.32.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-hint-options.d.ts +7 -0
- package/abstract/abstract-hint.d.ts +5 -4
- package/abstract/index.d.ts +1 -0
- package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-core-abstract.umd.js +13 -4
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +2 -2
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +30 -7
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +23 -13
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +17 -12
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +2 -2
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +20 -6
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +15 -4
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +17 -6
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
- package/components/primitive-textfield/index.d.ts +1 -0
- package/components/primitive-textfield/primitive-textfield-options.d.ts +11 -0
- package/components/primitive-textfield/primitive-textfield.component.d.ts +7 -4
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
- package/components/tooltip/taiga-ui-core-components-tooltip.metadata.json +1 -1
- package/components/tooltip/tooltip.component.d.ts +9 -6
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/hint/hint-options.d.ts +12 -0
- package/directives/hint/hint.directive.d.ts +5 -3
- package/directives/hint/index.d.ts +1 -0
- package/directives/hint/taiga-ui-core-directives-hint.metadata.json +1 -1
- package/directives/hint-controller/hint-controller.directive.d.ts +7 -5
- package/directives/hint-controller/taiga-ui-core-directives-hint-controller.metadata.json +1 -1
- package/directives/manual-hint/index.d.ts +1 -0
- package/directives/manual-hint/manual-hint-options.d.ts +6 -0
- package/directives/manual-hint/manual-hint.directive.d.ts +3 -1
- package/directives/manual-hint/taiga-ui-core-directives-manual-hint.metadata.json +1 -1
- package/directives/pointer-hint/index.d.ts +1 -0
- package/directives/pointer-hint/pointer-hint-options.d.ts +9 -0
- package/directives/pointer-hint/pointer-hint.directive.d.ts +5 -3
- package/directives/pointer-hint/taiga-ui-core-directives-pointer-hint.metadata.json +1 -1
- package/esm2015/abstract/abstract-hint-options.js +6 -0
- package/esm2015/abstract/abstract-hint.js +7 -5
- package/esm2015/abstract/index.js +2 -1
- package/esm2015/components/dialog/dialog.component.js +1 -1
- package/esm2015/components/link/link.component.js +3 -3
- package/esm2015/components/primitive-textfield/index.js +2 -1
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +12 -0
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +18 -8
- package/esm2015/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm2015/components/tooltip/tooltip.component.js +16 -9
- package/esm2015/components/tooltip/tooltip.module.js +3 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/hint/hint-options.js +10 -0
- package/esm2015/directives/hint/hint.directive.js +11 -7
- package/esm2015/directives/hint/index.js +2 -1
- package/esm2015/directives/hint-controller/hint-controller.directive.js +16 -10
- package/esm2015/directives/hint-controller/hint-controller.token.js +4 -3
- package/esm2015/directives/manual-hint/index.js +2 -1
- package/esm2015/directives/manual-hint/manual-hint-options.js +8 -0
- package/esm2015/directives/manual-hint/manual-hint.directive.js +9 -5
- package/esm2015/directives/pointer-hint/index.js +2 -1
- package/esm2015/directives/pointer-hint/pointer-hint-options.js +8 -0
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +11 -7
- package/esm2015/utils/mask/create-number-mask.js +2 -2
- package/esm5/abstract/abstract-hint-options.js +6 -0
- package/esm5/abstract/abstract-hint.js +7 -5
- package/esm5/abstract/index.js +2 -1
- package/esm5/components/dialog/dialog.component.js +1 -1
- package/esm5/components/link/link.component.js +3 -3
- package/esm5/components/primitive-textfield/index.js +2 -1
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +12 -0
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +18 -8
- package/esm5/components/scroll-controls/scroll-controls.component.js +1 -1
- package/esm5/components/tooltip/tooltip.component.js +20 -9
- package/esm5/components/tooltip/tooltip.module.js +3 -2
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/hint/hint-options.js +11 -0
- package/esm5/directives/hint/hint.directive.js +11 -7
- package/esm5/directives/hint/index.js +2 -1
- package/esm5/directives/hint-controller/hint-controller.directive.js +16 -10
- package/esm5/directives/hint-controller/hint-controller.token.js +4 -3
- package/esm5/directives/manual-hint/index.js +2 -1
- package/esm5/directives/manual-hint/manual-hint-options.js +9 -0
- package/esm5/directives/manual-hint/manual-hint.directive.js +9 -5
- package/esm5/directives/pointer-hint/index.js +2 -1
- package/esm5/directives/pointer-hint/pointer-hint-options.js +9 -0
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +11 -7
- package/esm5/utils/mask/create-number-mask.js +2 -2
- package/fesm2015/taiga-ui-core-abstract.js +13 -5
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +2 -2
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +29 -9
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +17 -9
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +16 -10
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +20 -9
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-manual-hint.js +16 -7
- package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +18 -9
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core-abstract.js +13 -5
- package/fesm5/taiga-ui-core-abstract.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-link.js +2 -2
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +29 -9
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm5/taiga-ui-core-components-tooltip.js +21 -9
- package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +1 -1
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +16 -10
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +21 -10
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-manual-hint.js +17 -8
- package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +19 -10
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/package.json +10 -10
- package/styles/mixins/textfield.less +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n setNativeFocused,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {\n TuiBrightness,\n TuiHorizontalDirection,\n TuiSizeL,\n TuiSizeS,\n} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n private autofilled = false;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent | null = null;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor = this.controller.exampleText || this.prefix || this.postfix;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n get borderLeft(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n get borderRight(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n if (\n !this.focusableElement ||\n event.target === this.focusableElement.nativeElement\n ) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.focusableElement.nativeElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n return this.focused\n ? this.exampleText || this.textfield.filler.slice(this.value.length)\n : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get exampleText(): string {\n return !this.value && this.focused ? this.controller.exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiBorderModule} from '@taiga-ui/core/directives/border';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n TuiBorderModule,\n MutationObserverModule,\n ],\n declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],\n exports: [TuiPrimitiveTextfieldComponent],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController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,CAAC,CAAA;OAhBpC,2BAA2B,CA4DvC;IAAD,kCAAC;CA5DD;;;ICmBA;KAA2C;IAA9B,2BAA2B;QAtBvC,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,qBAAqB;gBACrB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,gBAAgB;gBAChB,mBAAmB;gBACnB,oBAAoB;gBACpB,uBAAuB;gBACvB,eAAe;gBACf,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;YAC3E,OAAO,EAAE,CAAC,8BAA8B,CAAC;SAC5C,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;AC7CA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-primitive-textfield.js","sources":["ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.providers.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield-options.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.component.ts","ng://@taiga-ui/core/components/primitive-textfield/value-decoration/value-decoration.component.ts","ng://@taiga-ui/core/components/primitive-textfield/primitive-textfield.module.ts","ng://@taiga-ui/core/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.ts"],"sourcesContent":["import {forwardRef} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {HINT_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/hint-controller';\nimport {TEXTFIELD_CONTROLLER_PROVIDER} from '@taiga-ui/core/directives/textfield-controller';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\n\nexport const TUI_PRIMITIVE_TEXTFIELD_PROVIDERS = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiPrimitiveTextfieldComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {InjectionToken} from '@angular/core';\nimport {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiPrimitiveTextfieldOptions {\n readonly iconAlign: TuiHorizontalDirection;\n readonly iconCleaner: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER = 'tuiIconCloseLarge';\n\n/** Default values for primitive textfield options */\nexport const TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS: TuiPrimitiveTextfieldOptions = {\n iconAlign: 'right',\n iconCleaner: TUI_PRIMITIVE_TEXTFIELD_ICON_CLEANER,\n};\n\nexport const TUI_PRIMITIVE_TEXTFIELD_OPTIONS =\n new InjectionToken<TuiPrimitiveTextfieldOptions>(\n 'Default parameters for primitive textfield component',\n {\n factory: () => TUI_PRIMITIVE_TEXTFIELD_DEFAULT_OPTIONS,\n },\n );\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n setNativeFocused,\n TuiCreditCardAutofillName,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TuiHintControllerDirective,\n} from '@taiga-ui/core/directives/hint-controller';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives/textfield-controller';\nimport {TUI_MODE, TUI_TEXTFIELD_APPEARANCE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {getBorder} from '@taiga-ui/core/utils/miscellaneous';\nimport {PolymorpheusContent, PolymorpheusOutletComponent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_PRIMITIVE_TEXTFIELD_PROVIDERS} from './primitive-textfield.providers';\nimport {\n TUI_PRIMITIVE_TEXTFIELD_OPTIONS,\n TuiPrimitiveTextfieldOptions,\n} from './primitive-textfield-options';\n\nconst ICON_PADDING = 1.75;\nconst ICON_PADDING_S = 1.5;\n\n@Component({\n selector: 'tui-primitive-textfield',\n templateUrl: './primitive-textfield.template.html',\n styleUrls: ['./primitive-textfield.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PRIMITIVE_TEXTFIELD_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._autofilled]': 'autofilled',\n },\n})\nexport class TuiPrimitiveTextfieldComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor\n{\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n filler = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiPrimitiveTextfieldOptions['iconAlign'] = this.options.iconAlign;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiDefaultProp()\n iconContent: PolymorpheusContent | null = null;\n\n @Input()\n @tuiDefaultProp()\n iconCleaner: TuiPrimitiveTextfieldOptions['iconCleaner'] = this.options.iconCleaner;\n\n @Input()\n @HostBinding('class._readonly')\n @tuiDefaultProp()\n readOnly = false;\n\n @Input()\n @tuiDefaultProp()\n invalid = false;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n prefix = '';\n\n @Input()\n @tuiDefaultProp()\n postfix = '';\n\n @Input()\n @tuiDefaultProp()\n value = '';\n\n @Output()\n readonly valueChange = new EventEmitter<string>();\n\n @Output()\n readonly autofilledChange = new EventEmitter<boolean>();\n\n @ContentChildren(PolymorpheusOutletComponent)\n readonly content?: QueryList<unknown>;\n\n autofilled = false;\n\n constructor(\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_PRIMITIVE_TEXTFIELD_OPTIONS)\n readonly options: TuiPrimitiveTextfieldOptions,\n ) {\n super();\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeS | TuiSizeL {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n @HostBinding('class._invalid')\n get computedInvalid(): boolean {\n return !this.readOnly && !this.disabled && this.invalid;\n }\n\n get inputHidden(): boolean {\n return !!this.content?.length;\n }\n\n get hasValue(): boolean {\n return !!this.value;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController?.content && !this.disabled;\n }\n\n get hasCustomContent(): boolean {\n return !!this.controller.customContent;\n }\n\n get hasPlaceholder(): boolean {\n const hasDecor = this.controller.exampleText || this.prefix || this.postfix;\n const showDecor = hasDecor && !this.readOnly && this.computedFocused;\n const placeholderVisible = !this.hasValue && !showDecor;\n\n return this.placeholderRaisable || placeholderVisible;\n }\n\n get placeholderRaised(): boolean {\n return (\n this.placeholderRaisable &&\n ((this.computedFocused && !this.readOnly) || this.hasValue || this.autofilled)\n );\n }\n\n get borderLeft(): number {\n return this.iconAlignLeft ? this.iconPaddingLeft : 0;\n }\n\n get borderRight(): number {\n return getBorder(\n this.iconAlignRight,\n this.hasCleaner,\n this.hasTooltip,\n this.hasCustomContent,\n );\n }\n\n get iconAlignLeft(): boolean {\n return this.hasIcon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return this.hasIcon && this.iconAlign === 'right';\n }\n\n // Safari expiration date autofill workaround\n get name(): 'ccexpiryyear' | null {\n return this.controller.autocomplete === TuiCreditCardAutofillName.CcExp\n ? 'ccexpiryyear'\n : null;\n }\n\n @tuiPure\n getIndent$(element: HTMLElement): Observable<number> {\n return fromEvent(element, 'scroll').pipe(map(() => -1 * element.scrollLeft));\n }\n\n clear() {\n if (this.nativeFocusableElement) {\n this.nativeFocusableElement.value = '';\n }\n\n this.updateValue('');\n }\n\n onMouseDown(event: MouseEvent) {\n if (\n !this.focusableElement ||\n event.target === this.focusableElement.nativeElement\n ) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.focusableElement.nativeElement);\n }\n\n onModelChange(value: string) {\n this.updateValue(value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onAutofilled(autofilled: boolean) {\n this.updateAutofilled(autofilled);\n }\n\n private get iconPaddingLeft(): number {\n return this.size === 's' ? ICON_PADDING_S : ICON_PADDING;\n }\n\n private get placeholderRaisable(): boolean {\n return this.size !== 's' && !this.labelOutside;\n }\n\n private get hasIcon(): boolean {\n return !!this.iconContent;\n }\n\n private updateAutofilled(autofilled: boolean) {\n if (this.autofilled === autofilled) {\n return;\n }\n\n this.autofilled = autofilled;\n this.autofilledChange.emit(autofilled);\n }\n\n private updateValue(value: string) {\n this.value = value;\n this.valueChange.emit(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n ViewChild,\n} from '@angular/core';\nimport {MutationObserverDirective} from '@ng-web-apis/mutation-observer';\nimport {\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiTextfieldController,\n} from '@taiga-ui/core/directives';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {defer, EMPTY} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TuiPrimitiveTextfieldComponent} from '../primitive-textfield.component';\n\n@Component({\n selector: 'tui-value-decoration',\n templateUrl: 'value-decoration.template.html',\n styleUrls: ['value-decoration.style.less'],\n // It follows Change Detection of PrimitiveTextfield\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiValueDecorationComponent {\n @ViewChild('pre', {read: ElementRef, static: true})\n private readonly pre?: ElementRef<HTMLElement>;\n\n @ViewChild(MutationObserverDirective, {static: true})\n private readonly directive?: MutationObserverDirective;\n\n readonly pre$ = defer(() => this.directive?.waMutationObserver ?? EMPTY).pipe(\n map(() => this.pre?.nativeElement.offsetWidth ?? 0),\n startWith(0),\n distinctUntilChanged(),\n );\n\n constructor(\n @Inject(TuiPrimitiveTextfieldComponent)\n private readonly textfield: TuiPrimitiveTextfieldComponent,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n private readonly controller: TuiTextfieldController,\n ) {}\n\n @HostBinding('class._table')\n get isContextTable(): boolean {\n return this.textfield.appearance === TuiAppearance.Table;\n }\n\n get value(): string {\n return this.textfield.value;\n }\n\n get filler(): string {\n return this.focused\n ? this.exampleText || this.textfield.filler.slice(this.value.length)\n : '';\n }\n\n get prefix(): string {\n return this.decorationsVisible ? this.textfield.prefix : '';\n }\n\n get postfix(): string {\n return this.decorationsVisible ? this.computedPostfix : '';\n }\n\n private get exampleText(): string {\n return !this.value && this.focused ? this.controller.exampleText : '';\n }\n\n private get decorationsVisible(): boolean {\n return !!this.value || this.focused;\n }\n\n private get focused(): boolean {\n return this.textfield.computedFocused && !this.textfield.readOnly;\n }\n\n private get computedPostfix(): string {\n return this.textfield.postfix && (this.filler || this.value)\n ? ` ${this.textfield.postfix}`\n : this.textfield.postfix;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {MutationObserverModule} from '@ng-web-apis/mutation-observer';\nimport {\n TuiAutofilledModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiPreventDefaultModule,\n} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiTooltipModule} from '@taiga-ui/core/components/tooltip';\nimport {TuiWrapperModule} from '@taiga-ui/core/components/wrapper';\nimport {TuiBorderModule} from '@taiga-ui/core/directives/border';\nimport {TuiDescribedByModule} from '@taiga-ui/core/directives/described-by';\nimport {TuiMaskAccessorModule} from '@taiga-ui/core/directives/mask-accessor';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPrimitiveTextfieldComponent} from './primitive-textfield.component';\nimport {TuiValueDecorationComponent} from './value-decoration/value-decoration.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiMaskAccessorModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiAutofilledModule,\n TuiDescribedByModule,\n TuiPreventDefaultModule,\n TuiBorderModule,\n MutationObserverModule,\n ],\n declarations: [TuiPrimitiveTextfieldComponent, TuiValueDecorationComponent],\n exports: [TuiPrimitiveTextfieldComponent],\n})\nexport class TuiPrimitiveTextfieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQa,iCAAiC,GAAG;IAC7C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,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I,EAAC,CAAC;4DACJ;IAG/C;QADC,SAAS,CAAC,yBAAyB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;kEACE;IAgBvD;QADC,WAAW,CAAC,cAAc,CAAC;qEAG3B;IAvBQ,2BAA2B;QAPvC,SAAS,CAAC;YACP,QAAQ,EAAE,sBAAsB;YAChC,8LAA6C;;YAG7C,eAAe,EAAE,uBAAuB,CAAC,OAAO;;SACnD,CAAC;QAeO,WAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;QAEtC,WAAA,MAAM,CAACA,kCAAgC,CAAC,CAAA;OAhBpC,2BAA2B,CA4DvC;IAAD,kCAAC;CA5DD;;;ICmBA;KAA2C;IAA9B,2BAA2B;QAtBvC,QAAQ,CAAC;YACN,OAAO,EAAE;gBACL,YAAY;gBACZ,WAAW;gBACX,qBAAqB;gBACrB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,kBAAkB;gBAClB,kBAAkB;gBAClB,gBAAgB;gBAChB,YAAY;gBACZ,gBAAgB;gBAChB,mBAAmB;gBACnB,oBAAoB;gBACpB,uBAAuB;gBACvB,eAAe;gBACf,sBAAsB;aACzB;YACD,YAAY,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;YAC3E,OAAO,EAAE,CAAC,8BAA8B,CAAC;SAC5C,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;AC7CA;;;;;;"}
|
|
@@ -53,7 +53,7 @@ var TuiScrollControlsComponent = /** @class */ (function () {
|
|
|
53
53
|
host: {
|
|
54
54
|
'($.data-mode.attr)': 'mode$',
|
|
55
55
|
},
|
|
56
|
-
styles: [":host{position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
|
|
56
|
+
styles: [":host{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);float:left;margin-right:calc(-100% + 1px);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.bar{position:absolute;right:0;bottom:0;pointer-events:auto}.bar_vertical{top:0;width:.875rem}.bar_horizontal{left:0;height:.875rem}.bar_has-horizontal{bottom:.5rem}.bar_has-vertical{right:.5rem}.thumb{transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;background:var(--tui-text-01);background-clip:content-box;box-sizing:border-box;transition-property:width,height;opacity:.2}.thumb:hover{opacity:.24}.thumb:active{opacity:.48}:host[data-mode=onDark] .thumb{background-color:var(--tui-text-01-night)}.bar_vertical .thumb{right:0;width:.75rem;min-height:1.25rem}.bar_vertical .thumb:active,.bar_vertical:hover .thumb{width:.875rem}.bar_horizontal .thumb{bottom:0;height:.75rem;min-width:1.25rem}.bar_horizontal .thumb:active,.bar_horizontal:hover .thumb{height:.875rem}"]
|
|
57
57
|
}),
|
|
58
58
|
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
59
59
|
__param(1, Inject(NgZone)),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { Inject, Input, HostBinding, HostListener, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import { TuiDestroyService, TUI_IS_MOBILE, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
4
|
+
import { TUI_HINT_OPTIONS } from '@taiga-ui/core/directives';
|
|
4
5
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
5
6
|
import { TUI_MODE } from '@taiga-ui/core/tokens';
|
|
6
7
|
import { Observable } from 'rxjs';
|
|
@@ -8,17 +9,19 @@ import { takeUntil } from 'rxjs/operators';
|
|
|
8
9
|
import { CommonModule } from '@angular/common';
|
|
9
10
|
import { TuiSvgModule } from '@taiga-ui/core/components/svg';
|
|
10
11
|
import { TuiHintModule } from '@taiga-ui/core/directives/hint';
|
|
12
|
+
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
11
13
|
|
|
12
14
|
var TuiTooltipComponent = /** @class */ (function () {
|
|
13
|
-
function TuiTooltipComponent(destroy$, mode$, isMobile) {
|
|
15
|
+
function TuiTooltipComponent(destroy$, mode$, isMobile, options) {
|
|
14
16
|
var _this = this;
|
|
15
17
|
this.isMobile = isMobile;
|
|
18
|
+
this.options = options;
|
|
16
19
|
this.globalMode = null;
|
|
17
20
|
this.content = '';
|
|
18
|
-
this.mode =
|
|
19
|
-
this.direction =
|
|
20
|
-
this.showDelay =
|
|
21
|
-
this.hideDelay =
|
|
21
|
+
this.mode = this.options.mode;
|
|
22
|
+
this.direction = this.options.direction;
|
|
23
|
+
this.showDelay = this.options.tuiHintShowDelay;
|
|
24
|
+
this.hideDelay = this.options.tuiHintHideDelay;
|
|
22
25
|
this.describeId = '';
|
|
23
26
|
mode$.pipe(takeUntil(destroy$)).subscribe(function (mode) {
|
|
24
27
|
_this.globalMode = mode;
|
|
@@ -38,10 +41,18 @@ var TuiTooltipComponent = /** @class */ (function () {
|
|
|
38
41
|
event.stopPropagation();
|
|
39
42
|
}
|
|
40
43
|
};
|
|
44
|
+
Object.defineProperty(TuiTooltipComponent.prototype, "icon", {
|
|
45
|
+
get: function () {
|
|
46
|
+
return this.options.tooltipIcon;
|
|
47
|
+
},
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
41
51
|
TuiTooltipComponent.ctorParameters = function () { return [
|
|
42
52
|
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
43
53
|
{ type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
|
|
44
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] }
|
|
54
|
+
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
|
|
55
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
|
|
45
56
|
]; };
|
|
46
57
|
__decorate([
|
|
47
58
|
Input(),
|
|
@@ -77,14 +88,15 @@ var TuiTooltipComponent = /** @class */ (function () {
|
|
|
77
88
|
TuiTooltipComponent = __decorate([
|
|
78
89
|
Component({
|
|
79
90
|
selector: 'tui-tooltip',
|
|
80
|
-
template: "<
|
|
91
|
+
template: "<span\n polymorpheus-outlet\n automation-id=\"tui-tooltip__icon\"\n class=\"icon\"\n [content]=\"icon\"\n [tuiHintId]=\"describeId\"\n [tuiHint]=\"content\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintMode]=\"computedMode\"\n>\n <ng-template let-icon>\n <tui-svg [src]=\"icon\"></tui-svg>\n </ng-template>\n</span>\n",
|
|
81
92
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
82
93
|
providers: [TuiDestroyService, MODE_PROVIDER],
|
|
83
94
|
styles: [":host{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-03)}:host:hover{color:var(--tui-text-02)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-mode=onLight]{color:var(--tui-text-01)}:host[data-mode=error]{color:var(--tui-error-fill)}.icon{transition-property:opacity,color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:100%;height:100%}:host:not([data-mode]) .icon._hint_hovered{color:var(--tui-text-02)}:host[data-mode=onDark] .icon,:host[data-mode=onLight] .icon{opacity:var(--tui-disabled-opacity)}:host[data-mode=onDark] .icon._hint_hovered,:host[data-mode=onDark] .icon:hover,:host[data-mode=onLight] .icon._hint_hovered,:host[data-mode=onLight] .icon:hover{opacity:1}"]
|
|
84
95
|
}),
|
|
85
96
|
__param(0, Inject(TuiDestroyService)),
|
|
86
97
|
__param(1, Inject(TUI_MODE)),
|
|
87
|
-
__param(2, Inject(TUI_IS_MOBILE))
|
|
98
|
+
__param(2, Inject(TUI_IS_MOBILE)),
|
|
99
|
+
__param(3, Inject(TUI_HINT_OPTIONS))
|
|
88
100
|
], TuiTooltipComponent);
|
|
89
101
|
return TuiTooltipComponent;
|
|
90
102
|
}());
|
|
@@ -94,7 +106,7 @@ var TuiTooltipModule = /** @class */ (function () {
|
|
|
94
106
|
}
|
|
95
107
|
TuiTooltipModule = __decorate([
|
|
96
108
|
NgModule({
|
|
97
|
-
imports: [CommonModule, TuiSvgModule, TuiHintModule],
|
|
109
|
+
imports: [CommonModule, TuiSvgModule, TuiHintModule, PolymorpheusModule],
|
|
98
110
|
declarations: [TuiTooltipComponent],
|
|
99
111
|
exports: [TuiTooltipComponent],
|
|
100
112
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness,
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["ng://@taiga-ui/core/components/tooltip/tooltip.component.ts","ng://@taiga-ui/core/components/tooltip/tooltip.module.ts","ng://@taiga-ui/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from '@taiga-ui/core/directives';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness, TuiHintModeT} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n})\nexport class TuiTooltipComponent {\n private globalMode: TuiBrightness | null = null;\n\n @Input()\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n mode: TuiHintOptions['mode'] = this.options.mode;\n\n @Input()\n @tuiDefaultProp()\n direction: TuiHintOptions['direction'] = this.options.direction;\n\n @Input()\n @tuiDefaultProp()\n showDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input()\n @tuiDefaultProp()\n hideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n constructor(\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(TUI_HINT_OPTIONS) private readonly options: TuiHintOptions,\n ) {\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.globalMode = mode;\n });\n }\n\n // TODO: Simplify\n @HostBinding('attr.data-mode')\n get computedMode(): TuiHintModeT | TuiBrightness | null {\n return this.mode || this.globalMode;\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('click', ['$event'])\n stopOnMobile(event: MouseEvent) {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n get icon(): PolymorpheusContent {\n return this.options.tooltipIcon;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiHintModule} from '@taiga-ui/core/directives/hint';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiHintModule, PolymorpheusModule],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAmDI,6BAC+B,QAA6B,EACtC,KAAuC,EACjB,QAAiB,EACd,OAAuB;QAJtE,iBASC;QAN2C,aAAQ,GAAR,QAAQ,CAAS;QACd,YAAO,GAAP,OAAO,CAAgB;Q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
|
-
{"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: ReadonlyArray<string> = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.32.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAA0B,CAAC,GAAG,EAAE,GAAG;;ICEtD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICN/B,OAAO,GAAG;;ACAvB;;;;;;"}
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { __extends, __decorate } from 'tslib';
|
|
2
|
-
import { InjectionToken, Input, Directive, forwardRef, NgModule, ChangeDetectorRef } from '@angular/core';
|
|
1
|
+
import { __extends, __decorate, __param } from 'tslib';
|
|
2
|
+
import { InjectionToken, inject, Inject, Input, Directive, forwardRef, NgModule, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import { tuiDefaultProp, TuiController, TuiDestroyService } from '@taiga-ui/cdk';
|
|
4
|
+
import { TUI_HINT_OPTIONS } from '@taiga-ui/core/directives/hint';
|
|
4
5
|
import { watchedControllerFactory } from '@taiga-ui/core/providers';
|
|
5
6
|
|
|
6
7
|
var TUI_HINT_CONTROLLER = new InjectionToken('Controls configuration of hints', {
|
|
7
|
-
factory: function () { return new TuiHintControllerDirective(); },
|
|
8
|
+
factory: function () { return new TuiHintControllerDirective(inject(TUI_HINT_OPTIONS)); },
|
|
8
9
|
});
|
|
9
10
|
|
|
10
11
|
// TODO: v2.0 use in Charts
|
|
11
12
|
var TuiHintControllerDirective = /** @class */ (function (_super) {
|
|
12
13
|
__extends(TuiHintControllerDirective, _super);
|
|
13
|
-
function TuiHintControllerDirective() {
|
|
14
|
-
var _this = _super
|
|
14
|
+
function TuiHintControllerDirective(options) {
|
|
15
|
+
var _this = _super.call(this) || this;
|
|
16
|
+
_this.options = options;
|
|
15
17
|
// TODO: Remove null in 3.0
|
|
16
18
|
_this.content = null;
|
|
17
|
-
_this.direction =
|
|
18
|
-
_this.mode =
|
|
19
|
-
_this.showDelay =
|
|
20
|
-
_this.hideDelay =
|
|
19
|
+
_this.direction = _this.options.direction;
|
|
20
|
+
_this.mode = _this.options.mode;
|
|
21
|
+
_this.showDelay = _this.options.tuiHintShowDelay;
|
|
22
|
+
_this.hideDelay = _this.options.tuiHintHideDelay;
|
|
21
23
|
return _this;
|
|
22
24
|
}
|
|
23
25
|
TuiHintControllerDirective_1 = TuiHintControllerDirective;
|
|
24
26
|
var TuiHintControllerDirective_1;
|
|
27
|
+
TuiHintControllerDirective.ctorParameters = function () { return [
|
|
28
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
|
|
29
|
+
]; };
|
|
25
30
|
__decorate([
|
|
26
31
|
Input('tuiHintContent'),
|
|
27
32
|
tuiDefaultProp()
|
|
@@ -51,7 +56,8 @@ var TuiHintControllerDirective = /** @class */ (function (_super) {
|
|
|
51
56
|
useExisting: forwardRef(function () { return TuiHintControllerDirective_1; }),
|
|
52
57
|
},
|
|
53
58
|
],
|
|
54
|
-
})
|
|
59
|
+
}),
|
|
60
|
+
__param(0, Inject(TUI_HINT_OPTIONS))
|
|
55
61
|
], TuiHintControllerDirective);
|
|
56
62
|
return TuiHintControllerDirective;
|
|
57
63
|
}(TuiController));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-hint-controller.js","sources":["ng://@taiga-ui/core/directives/hint-controller/hint-controller.token.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.directive.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.module.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.provider.ts","ng://@taiga-ui/core/directives/hint-controller/taiga-ui-core-directives-hint-controller.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\nexport const TUI_HINT_CONTROLLER = new InjectionToken<TuiHintControllerDirective>(\n 'Controls configuration of hints',\n {\n factory: () => new TuiHintControllerDirective(),\n },\n);\n","import {Directive, forwardRef, Input} from '@angular/core';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-hint-controller.js","sources":["ng://@taiga-ui/core/directives/hint-controller/hint-controller.token.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.directive.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.module.ts","ng://@taiga-ui/core/directives/hint-controller/hint-controller.provider.ts","ng://@taiga-ui/core/directives/hint-controller/taiga-ui-core-directives-hint-controller.ts"],"sourcesContent":["import {inject, InjectionToken} from '@angular/core';\nimport {TUI_HINT_OPTIONS} from '@taiga-ui/core/directives/hint';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\nexport const TUI_HINT_CONTROLLER = new InjectionToken<TuiHintControllerDirective>(\n 'Controls configuration of hints',\n {\n factory: () => new TuiHintControllerDirective(inject(TUI_HINT_OPTIONS)),\n },\n);\n","import {Directive, forwardRef, Inject, Input} from '@angular/core';\nimport {TuiController, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from '@taiga-ui/core/directives/hint';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\n// TODO: v2.0 use in Charts\n@Directive({\n selector: '[tuiHintContent]',\n providers: [\n {\n provide: TUI_HINT_CONTROLLER,\n useExisting: forwardRef(() => TuiHintControllerDirective),\n },\n ],\n})\nexport class TuiHintControllerDirective extends TuiController {\n // TODO: Remove null in 3.0\n @Input('tuiHintContent')\n @tuiDefaultProp()\n content: PolymorpheusContent | null = null;\n\n @Input('tuiHintDirection')\n @tuiDefaultProp()\n direction: TuiHintOptions['direction'] = this.options.direction;\n\n @Input('tuiHintMode')\n @tuiDefaultProp()\n mode: TuiHintOptions['mode'] = this.options.mode;\n\n @Input('tuiHintShowDelay')\n @tuiDefaultProp()\n showDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input('tuiHintHideDelay')\n @tuiDefaultProp()\n hideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n constructor(@Inject(TUI_HINT_OPTIONS) private readonly options: TuiHintOptions) {\n super();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintControllerDirective} from './hint-controller.directive';\n\n@NgModule({\n declarations: [TuiHintControllerDirective],\n exports: [TuiHintControllerDirective],\n})\nexport class TuiHintControllerModule {}\n","import {ChangeDetectorRef, InjectionToken, Provider} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {watchedControllerFactory} from '@taiga-ui/core/providers';\n\nimport {TUI_HINT_CONTROLLER} from './hint-controller.token';\n\nexport const TUI_HINT_WATCHED_CONTROLLER = new InjectionToken('watched hint controller');\n// TODO: remove in ivy compilation\nexport const HINT_CONTROLLER_FACTORY = watchedControllerFactory;\nexport const HINT_CONTROLLER_PROVIDER: Provider = [\n TuiDestroyService,\n {\n provide: TUI_HINT_WATCHED_CONTROLLER,\n deps: [TUI_HINT_CONTROLLER, ChangeDetectorRef, TuiDestroyService],\n useFactory: HINT_CONTROLLER_FACTORY,\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;IAKa,mBAAmB,GAAG,IAAI,cAAc,CACjD,iCAAiC,EACjC;IACI,OAAO,EAAE,cAAM,OAAA,IAAI,0BAA0B,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,GAAA;CAC1E;;ACFL;;IAUgD,8CAAa;IAsBzD,oCAAuD,OAAuB;QAA9E,YACI,iBAAO,SACV;QAFsD,aAAO,GAAP,OAAO,CAAgB;;QAlB9E,aAAO,GAA+B,IAAI,CAAC;QAI3C,eAAS,GAAgC,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAIhE,UAAI,GAA2B,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAIjD,eAAS,GAAuC,KAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAI9E,eAAS,GAAuC,KAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;;KAI7E;mCAxBQ,0BAA0B;;;gDAsBtB,MAAM,SAAC,gBAAgB;;IAlBpC;QAFC,KAAK,CAAC,gBAAgB,CAAC;QACvB,cAAc,EAAE;+DAC0B;IAI3C;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEAC+C;IAIhE;QAFC,KAAK,CAAC,aAAa,CAAC;QACpB,cAAc,EAAE;4DACgC;IAIjD;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEAC6D;IAI9E;QAFC,KAAK,CAAC,kBAAkB,CAAC;QACzB,cAAc,EAAE;iEAC6D;IApBrE,0BAA0B;QATtC,SAAS,CAAC;YACP,QAAQ,EAAE,kBAAkB;YAC5B,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,mBAAmB;oBAC5B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,4BAA0B,GAAA,CAAC;iBAC5D;aACJ;SACJ,CAAC;QAuBe,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OAtB5B,0BAA0B,CAyBtC;IAAD,iCAAC;CAAA,CAzB+C,aAAa;;;ICT7D;KAAuC;IAA1B,uBAAuB;QAJnC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,0BAA0B,CAAC;YAC1C,OAAO,EAAE,CAAC,0BAA0B,CAAC;SACxC,CAAC;OACW,uBAAuB,CAAG;IAAD,8BAAC;CAAvC;;ICFa,2BAA2B,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;AACzF;IACa,uBAAuB,GAAG,yBAAyB;IACnD,wBAAwB,GAAa;IAC9C,iBAAiB;IACjB;QACI,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;QACjE,UAAU,EAAE,uBAAuB;KACtC;;;ACfL;;;;;;"}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
import { __extends, __read, __decorate, __param } from 'tslib';
|
|
2
|
-
import { Renderer2, Inject, ElementRef, Self, Optional, Input, Directive, NgModule } from '@angular/core';
|
|
1
|
+
import { __assign, __extends, __read, __decorate, __param } from 'tslib';
|
|
2
|
+
import { InjectionToken, Renderer2, Inject, ElementRef, Self, Optional, Input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { TuiDestroyService, TuiObscuredService, TuiHoveredService, TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter, TuiParentsScrollService } from '@taiga-ui/cdk';
|
|
4
|
-
import { AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
4
|
+
import { TUI_ABSTRACT_HINT_DEFAULT_OPTIONS, AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
5
5
|
import { DESCRIBED_BY } from '@taiga-ui/core/directives/described-by';
|
|
6
6
|
import { TuiHintService } from '@taiga-ui/core/services';
|
|
7
7
|
import { Subject, combineLatest, of } from 'rxjs';
|
|
8
8
|
import { startWith, map, switchMap, delay, take, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
9
9
|
|
|
10
|
+
// TODO: remove in ivy compilation
|
|
11
|
+
var TUI_TOOLTIP_ICON = 'tuiIconTooltipLarge';
|
|
12
|
+
/** Default values for hint options */
|
|
13
|
+
var TUI_HINT_DEFAULT_OPTIONS = __assign(__assign({}, TUI_ABSTRACT_HINT_DEFAULT_OPTIONS), { tuiHintShowDelay: 500, tuiHintHideDelay: 200, tooltipIcon: TUI_TOOLTIP_ICON });
|
|
14
|
+
var TUI_HINT_OPTIONS = new InjectionToken('Default parameters for hint directive', {
|
|
15
|
+
factory: function () { return TUI_HINT_DEFAULT_OPTIONS; },
|
|
16
|
+
});
|
|
17
|
+
|
|
10
18
|
var HINT_HOVERED_CLASS = '_hint_hovered';
|
|
11
19
|
var TuiHintDirective = /** @class */ (function (_super) {
|
|
12
20
|
__extends(TuiHintDirective, _super);
|
|
13
|
-
function TuiHintDirective(renderer, elementRef, hintService, destroy$, obscured$, hoveredService, activeZone) {
|
|
14
|
-
var _this = _super.call(this, elementRef, hintService, activeZone) || this;
|
|
21
|
+
function TuiHintDirective(renderer, elementRef, hintService, destroy$, obscured$, hoveredService, activeZone, options) {
|
|
22
|
+
var _this = _super.call(this, elementRef, hintService, activeZone, options) || this;
|
|
15
23
|
_this.renderer = renderer;
|
|
16
|
-
_this.
|
|
17
|
-
_this.
|
|
24
|
+
_this.options = options;
|
|
25
|
+
_this.tuiHintShowDelay = _this.options.tuiHintShowDelay;
|
|
26
|
+
_this.tuiHintHideDelay = _this.options.tuiHintHideDelay;
|
|
18
27
|
_this.tuiHintHost = null;
|
|
19
28
|
_this.componentHovered$ = new Subject();
|
|
20
29
|
// @bad TODO: Use private provider
|
|
@@ -100,7 +109,8 @@ var TuiHintDirective = /** @class */ (function (_super) {
|
|
|
100
109
|
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
101
110
|
{ type: TuiObscuredService, decorators: [{ type: Inject, args: [TuiObscuredService,] }, { type: Self }] },
|
|
102
111
|
{ type: TuiHoveredService, decorators: [{ type: Inject, args: [TuiHoveredService,] }] },
|
|
103
|
-
{ type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] }
|
|
112
|
+
{ type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] },
|
|
113
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_HINT_OPTIONS,] }] }
|
|
104
114
|
]; };
|
|
105
115
|
__decorate([
|
|
106
116
|
Input()
|
|
@@ -134,7 +144,8 @@ var TuiHintDirective = /** @class */ (function (_super) {
|
|
|
134
144
|
__param(4, Self()),
|
|
135
145
|
__param(5, Inject(TuiHoveredService)),
|
|
136
146
|
__param(6, Optional()),
|
|
137
|
-
__param(6, Inject(TuiActiveZoneDirective))
|
|
147
|
+
__param(6, Inject(TuiActiveZoneDirective)),
|
|
148
|
+
__param(7, Inject(TUI_HINT_OPTIONS))
|
|
138
149
|
], TuiHintDirective);
|
|
139
150
|
return TuiHintDirective;
|
|
140
151
|
}(AbstractTuiHint));
|
|
@@ -155,5 +166,5 @@ var TuiHintModule = /** @class */ (function () {
|
|
|
155
166
|
* Generated bundle index. Do not edit.
|
|
156
167
|
*/
|
|
157
168
|
|
|
158
|
-
export { HINT_HOVERED_CLASS, TuiHintDirective, TuiHintModule };
|
|
169
|
+
export { HINT_HOVERED_CLASS, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_OPTIONS, TUI_TOOLTIP_ICON, TuiHintDirective, TuiHintModule };
|
|
159
170
|
//# sourceMappingURL=taiga-ui-core-directives-hint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-hint.js","sources":["ng://@taiga-ui/core/directives/hint/hint.directive.ts","ng://@taiga-ui/core/directives/hint/hint.module.ts","ng://@taiga-ui/core/directives/hint/taiga-ui-core-directives-hint.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiHoveredService,\n TuiObscuredService,\n TuiParentsScrollService,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {DESCRIBED_BY} from '@taiga-ui/core/directives/described-by';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, of, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\nexport const HINT_HOVERED_CLASS = '_hint_hovered';\n\n@Directive({\n selector: '[tuiHint]:not(ng-container)',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiHintDirective extends AbstractTuiHint implements OnDestroy {\n @Input()\n tuiHintId?: string;\n\n @Input()\n @tuiDefaultProp()\n tuiHintShowDelay = 500;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHideDelay = 200;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHost: HTMLElement | null = null;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiRequiredSetter()\n set tuiHint(value: PolymorpheusContent | null) {\n if (!value) {\n this.hideTooltip();\n this.content = '';\n\n return;\n }\n\n this.content = value;\n }\n\n readonly componentHovered$ = new Subject<boolean>();\n\n constructor(\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiObscuredService)\n @Self()\n obscured$: TuiObscuredService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n ) {\n super(elementRef, hintService, activeZone);\n\n // @bad TODO: Use private provider\n combineLatest(\n hoveredService.createHovered$(elementRef.nativeElement),\n this.componentHovered$.pipe(startWith(false)),\n )\n .pipe(\n map(\n ([directiveHovered, componentHovered]) =>\n directiveHovered || componentHovered,\n ),\n switchMap(visible => {\n this.toggleClass(visible);\n\n return of(visible).pipe(\n delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay),\n );\n }),\n switchMap(visible =>\n visible && this.mode !== 'overflow'\n ? obscured$.pipe(\n map(obscured => !obscured),\n take(2),\n )\n : of(visible),\n ),\n distinctUntilChanged(),\n takeUntil(destroy$),\n )\n .subscribe(visible => {\n if (visible) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n });\n\n this.hintService.register(this);\n }\n\n get id(): string | null {\n return this.tuiHintId ? this.tuiHintId + DESCRIBED_BY : null;\n }\n\n get host(): HTMLElement {\n return this.tuiHintHost ? this.tuiHintHost : this.elementRef.nativeElement;\n }\n\n getElementClientRect(): ClientRect {\n return this.host.getBoundingClientRect();\n }\n\n ngOnDestroy() {\n this.hintService.unregister(this);\n }\n\n protected showTooltip() {\n if (this.content === '') {\n return;\n }\n\n this.toggleClass(true);\n this.hintService.add(this);\n }\n\n protected hideTooltip() {\n this.toggleClass(false);\n this.hintService.remove(this);\n }\n\n private toggleClass(add: boolean) {\n if (add) {\n this.renderer.addClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n } else {\n this.renderer.removeClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintDirective} from './hint.directive';\n\n@NgModule({\n declarations: [TuiHintDirective],\n exports: [TuiHintDirective],\n})\nexport class TuiHintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"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AAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;OA3C1B,gBAAgB,CA4H5B;IAAD,uBAAC;CAAA,CA5HqC,eAAe;;;IChCrD;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-hint.js","sources":["ng://@taiga-ui/core/directives/hint/hint-options.ts","ng://@taiga-ui/core/directives/hint/hint.directive.ts","ng://@taiga-ui/core/directives/hint/hint.module.ts","ng://@taiga-ui/core/directives/hint/taiga-ui-core-directives-hint.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {\n TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n TuiAbstractHintOptions,\n} from '@taiga-ui/core/abstract';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiHintOptions extends TuiAbstractHintOptions {\n readonly tuiHintShowDelay: number;\n readonly tuiHintHideDelay: number;\n readonly tooltipIcon: PolymorpheusContent;\n}\n\n// TODO: remove in ivy compilation\nexport const TUI_TOOLTIP_ICON = 'tuiIconTooltipLarge';\n\n/** Default values for hint options */\nexport const TUI_HINT_DEFAULT_OPTIONS: TuiHintOptions = {\n ...TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n tuiHintShowDelay: 500,\n tuiHintHideDelay: 200,\n tooltipIcon: TUI_TOOLTIP_ICON,\n};\n\nexport const TUI_HINT_OPTIONS = new InjectionToken<TuiHintOptions>(\n 'Default parameters for hint directive',\n {\n factory: () => TUI_HINT_DEFAULT_OPTIONS,\n },\n);\n","import {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiHoveredService,\n TuiObscuredService,\n TuiParentsScrollService,\n tuiRequiredSetter,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {DESCRIBED_BY} from '@taiga-ui/core/directives/described-by';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, of, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {TUI_HINT_OPTIONS, TuiHintOptions} from './hint-options';\n\nexport const HINT_HOVERED_CLASS = '_hint_hovered';\n\n@Directive({\n selector: '[tuiHint]:not(ng-container)',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiHintDirective extends AbstractTuiHint implements OnDestroy {\n @Input()\n tuiHintId?: string;\n\n @Input()\n @tuiDefaultProp()\n tuiHintShowDelay: TuiHintOptions['tuiHintShowDelay'] = this.options.tuiHintShowDelay;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHideDelay: TuiHintOptions['tuiHintHideDelay'] = this.options.tuiHintHideDelay;\n\n @Input()\n @tuiDefaultProp()\n tuiHintHost: HTMLElement | null = null;\n\n // TODO: Remove null in 3.0\n @Input()\n @tuiRequiredSetter()\n set tuiHint(value: PolymorpheusContent | null) {\n if (!value) {\n this.hideTooltip();\n this.content = '';\n\n return;\n }\n\n this.content = value;\n }\n\n readonly componentHovered$ = new Subject<boolean>();\n\n constructor(\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiObscuredService)\n @Self()\n obscured$: TuiObscuredService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_HINT_OPTIONS) protected readonly options: TuiHintOptions,\n ) {\n super(elementRef, hintService, activeZone, options);\n\n // @bad TODO: Use private provider\n combineLatest(\n hoveredService.createHovered$(elementRef.nativeElement),\n this.componentHovered$.pipe(startWith(false)),\n )\n .pipe(\n map(\n ([directiveHovered, componentHovered]) =>\n directiveHovered || componentHovered,\n ),\n switchMap(visible => {\n this.toggleClass(visible);\n\n return of(visible).pipe(\n delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay),\n );\n }),\n switchMap(visible =>\n visible && this.mode !== 'overflow'\n ? obscured$.pipe(\n map(obscured => !obscured),\n take(2),\n )\n : of(visible),\n ),\n distinctUntilChanged(),\n takeUntil(destroy$),\n )\n .subscribe(visible => {\n if (visible) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n });\n\n this.hintService.register(this);\n }\n\n get id(): string | null {\n return this.tuiHintId ? this.tuiHintId + DESCRIBED_BY : null;\n }\n\n get host(): HTMLElement {\n return this.tuiHintHost ? this.tuiHintHost : this.elementRef.nativeElement;\n }\n\n getElementClientRect(): ClientRect {\n return this.host.getBoundingClientRect();\n }\n\n ngOnDestroy() {\n this.hintService.unregister(this);\n }\n\n protected showTooltip() {\n if (this.content === '') {\n return;\n }\n\n this.toggleClass(true);\n this.hintService.add(this);\n }\n\n protected hideTooltip() {\n this.toggleClass(false);\n this.hintService.remove(this);\n }\n\n private toggleClass(add: boolean) {\n if (add) {\n this.renderer.addClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n } else {\n this.renderer.removeClass(this.elementRef.nativeElement, HINT_HOVERED_CLASS);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHintDirective} from './hint.directive';\n\n@NgModule({\n declarations: [TuiHintDirective],\n exports: [TuiHintDirective],\n})\nexport class TuiHintModule {}\n","/**\n * Generated bundle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AE;QACP,iBAAiB,EAAE;mDAUnB;IA5BQ,gBAAgB;QAJ5B,SAAS,CAAC;YACP,QAAQ,EAAE,6BAA6B;YACvC,SAAS,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,iBAAiB,CAAC;SAC9E,CAAC;QAkCO,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;QACtB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAC1B,WAAA,IAAI,EAAE,CAAA;QAEN,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,WAAA,QAAQ,EAAE,CAAA;QACV,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;QAE9B,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OA7CpB,gBAAgB,CA6H5B;IAAD,uBAAC;CAAA,CA7HqC,eAAe;;;IClCrD;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { __extends, __decorate, __param } from 'tslib';
|
|
2
|
-
import { ElementRef, Inject, Optional, Input, Directive, NgModule } from '@angular/core';
|
|
1
|
+
import { __assign, __extends, __decorate, __param } from 'tslib';
|
|
2
|
+
import { InjectionToken, ElementRef, Inject, Optional, Input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk';
|
|
4
|
-
import { AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
4
|
+
import { TUI_ABSTRACT_HINT_DEFAULT_OPTIONS, AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
5
5
|
import { TuiHintService } from '@taiga-ui/core/services';
|
|
6
6
|
|
|
7
|
+
/** Default values for manual hint options */
|
|
8
|
+
var TUI_MANUAL_HINT_DEFAULT_OPTIONS = __assign({}, TUI_ABSTRACT_HINT_DEFAULT_OPTIONS);
|
|
9
|
+
var TUI_MANUAL_HINT_OPTIONS = new InjectionToken('Default parameters for manual hint directive', {
|
|
10
|
+
factory: function () { return TUI_MANUAL_HINT_DEFAULT_OPTIONS; },
|
|
11
|
+
});
|
|
12
|
+
|
|
7
13
|
var TuiManualHintDirective = /** @class */ (function (_super) {
|
|
8
14
|
__extends(TuiManualHintDirective, _super);
|
|
9
|
-
function TuiManualHintDirective(elementRef, hintService, activeZone) {
|
|
10
|
-
var _this = _super.call(this, elementRef, hintService, activeZone) || this;
|
|
15
|
+
function TuiManualHintDirective(elementRef, hintService, activeZone, options) {
|
|
16
|
+
var _this = _super.call(this, elementRef, hintService, activeZone, options) || this;
|
|
17
|
+
_this.options = options;
|
|
11
18
|
_this.content = '';
|
|
12
19
|
return _this;
|
|
13
20
|
}
|
|
@@ -29,7 +36,8 @@ var TuiManualHintDirective = /** @class */ (function (_super) {
|
|
|
29
36
|
TuiManualHintDirective.ctorParameters = function () { return [
|
|
30
37
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
31
38
|
{ type: TuiHintService, decorators: [{ type: Inject, args: [TuiHintService,] }] },
|
|
32
|
-
{ type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] }
|
|
39
|
+
{ type: TuiActiveZoneDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiActiveZoneDirective,] }] },
|
|
40
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_MANUAL_HINT_OPTIONS,] }] }
|
|
33
41
|
]; };
|
|
34
42
|
__decorate([
|
|
35
43
|
Input('tuiManualHint'),
|
|
@@ -46,7 +54,8 @@ var TuiManualHintDirective = /** @class */ (function (_super) {
|
|
|
46
54
|
__param(0, Inject(ElementRef)),
|
|
47
55
|
__param(1, Inject(TuiHintService)),
|
|
48
56
|
__param(2, Optional()),
|
|
49
|
-
__param(2, Inject(TuiActiveZoneDirective))
|
|
57
|
+
__param(2, Inject(TuiActiveZoneDirective)),
|
|
58
|
+
__param(3, Inject(TUI_MANUAL_HINT_OPTIONS))
|
|
50
59
|
], TuiManualHintDirective);
|
|
51
60
|
return TuiManualHintDirective;
|
|
52
61
|
}(AbstractTuiHint));
|
|
@@ -67,5 +76,5 @@ var TuiManualHintModule = /** @class */ (function () {
|
|
|
67
76
|
* Generated bundle index. Do not edit.
|
|
68
77
|
*/
|
|
69
78
|
|
|
70
|
-
export { TuiManualHintDirective, TuiManualHintModule };
|
|
79
|
+
export { TUI_MANUAL_HINT_DEFAULT_OPTIONS, TUI_MANUAL_HINT_OPTIONS, TuiManualHintDirective, TuiManualHintModule };
|
|
71
80
|
//# sourceMappingURL=taiga-ui-core-directives-manual-hint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-manual-hint.js","sources":["ng://@taiga-ui/core/directives/manual-hint/manual-hint.directive.ts","ng://@taiga-ui/core/directives/manual-hint/manual-hint.module.ts","ng://@taiga-ui/core/directives/manual-hint/taiga-ui-core-directives-manual-hint.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Input, Optional} from '@angular/core';\nimport {TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\n@Directive({\n selector: '[tuiManualHint]:not(ng-container)',\n})\nexport class TuiManualHintDirective extends AbstractTuiHint {\n @Input('tuiManualHint')\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiRequiredSetter()\n set tuiManualHintShow(show: boolean) {\n if (show) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n }\n\n constructor(\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n ) {\n super(elementRef, hintService, activeZone);\n }\n\n getElementClientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiManualHintDirective} from './manual-hint.directive';\n\n@NgModule({\n declarations: [TuiManualHintDirective],\n exports: [TuiManualHintDirective],\n})\nexport class TuiManualHintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-manual-hint.js","sources":["ng://@taiga-ui/core/directives/manual-hint/manual-hint-options.ts","ng://@taiga-ui/core/directives/manual-hint/manual-hint.directive.ts","ng://@taiga-ui/core/directives/manual-hint/manual-hint.module.ts","ng://@taiga-ui/core/directives/manual-hint/taiga-ui-core-directives-manual-hint.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {\n TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n TuiAbstractHintOptions,\n} from '@taiga-ui/core/abstract';\n\nexport type TuiManualHintOptions = TuiAbstractHintOptions;\n\n/** Default values for manual hint options */\nexport const TUI_MANUAL_HINT_DEFAULT_OPTIONS: TuiManualHintOptions = {\n ...TUI_ABSTRACT_HINT_DEFAULT_OPTIONS,\n};\n\nexport const TUI_MANUAL_HINT_OPTIONS = new InjectionToken<TuiManualHintOptions>(\n 'Default parameters for manual hint directive',\n {\n factory: () => TUI_MANUAL_HINT_DEFAULT_OPTIONS,\n },\n);\n","import {Directive, ElementRef, Inject, Input, Optional} from '@angular/core';\nimport {TuiActiveZoneDirective, tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk';\nimport {AbstractTuiHint} from '@taiga-ui/core/abstract';\nimport {TuiHintService} from '@taiga-ui/core/services';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TUI_MANUAL_HINT_OPTIONS, TuiManualHintOptions} from './manual-hint-options';\n\n@Directive({\n selector: '[tuiManualHint]:not(ng-container)',\n})\nexport class TuiManualHintDirective extends AbstractTuiHint {\n @Input('tuiManualHint')\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n @Input()\n @tuiRequiredSetter()\n set tuiManualHintShow(show: boolean) {\n if (show) {\n this.showTooltip();\n } else {\n this.hideTooltip();\n }\n }\n\n constructor(\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiHintService) hintService: TuiHintService,\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_MANUAL_HINT_OPTIONS) protected readonly options: TuiManualHintOptions,\n ) {\n super(elementRef, hintService, activeZone, options);\n }\n\n getElementClientRect(): ClientRect {\n return this.elementRef.nativeElement.getBoundingClientRect();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiManualHintDirective} from './manual-hint.directive';\n\n@NgModule({\n declarations: [TuiManualHintDirective],\n exports: [TuiManualHintDirective],\n})\nexport class TuiManualHintModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;IACa,+BAA+B,gBACrC,iCAAiC,EACtC;IAEW,uBAAuB,GAAG,IAAI,cAAc,CACrD,8CAA8C,EAC9C;IACI,OAAO,EAAE,cAAM,OAAA,+BAA+B,GAAA;CACjD;;;ICNuC,0CAAe;IAevD,gCACwB,UAAmC,EAC/B,WAA2B,EAGnD,UAAyC,EACW,OAA6B;QANrF,YAQI,kBAAM,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,SACtD;QAHuD,aAAO,GAAP,OAAO,CAAsB;QAlBrF,aAA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core';
|
|
1
|
+
import { __assign, __extends, __decorate, __param } from 'tslib';
|
|
2
|
+
import { InjectionToken, ElementRef, Inject, Input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { typedFromEvent, TuiDestroyService, TuiHoveredService, tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk';
|
|
4
|
-
import { AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
4
|
+
import { TUI_ABSTRACT_HINT_DEFAULT_OPTIONS, AbstractTuiHint } from '@taiga-ui/core/abstract';
|
|
5
5
|
import { TuiHintService } from '@taiga-ui/core/services';
|
|
6
6
|
import { of } from 'rxjs';
|
|
7
7
|
import { filter, startWith, distinctUntilChanged, switchMap, delay, takeUntil } from 'rxjs/operators';
|
|
8
8
|
|
|
9
|
+
/** Default values for pointer hint options */
|
|
10
|
+
var TUI_POINTER_HINT_DEFAULT_OPTIONS = __assign(__assign({}, TUI_ABSTRACT_HINT_DEFAULT_OPTIONS), { tuiHintShowDelay: 0, tuiHintHideDelay: 0 });
|
|
11
|
+
var TUI_POINTER_HINT_OPTIONS = new InjectionToken('Default parameters for pointer hint directive', {
|
|
12
|
+
factory: function () { return TUI_POINTER_HINT_DEFAULT_OPTIONS; },
|
|
13
|
+
});
|
|
14
|
+
|
|
9
15
|
var TuiPointerHintDirective = /** @class */ (function (_super) {
|
|
10
16
|
__extends(TuiPointerHintDirective, _super);
|
|
11
|
-
function TuiPointerHintDirective(elementRef, hintService, destroy$, hoveredService) {
|
|
12
|
-
var _this = _super.call(this, elementRef, hintService, null) || this;
|
|
17
|
+
function TuiPointerHintDirective(elementRef, hintService, destroy$, hoveredService, options) {
|
|
18
|
+
var _this = _super.call(this, elementRef, hintService, null, options) || this;
|
|
13
19
|
_this.destroy$ = destroy$;
|
|
20
|
+
_this.options = options;
|
|
14
21
|
_this.currentMouseRect = _this.mousePositionToClientRect();
|
|
15
|
-
_this.tuiHintShowDelay =
|
|
16
|
-
_this.tuiHintHideDelay =
|
|
22
|
+
_this.tuiHintShowDelay = _this.options.tuiHintShowDelay;
|
|
23
|
+
_this.tuiHintHideDelay = _this.options.tuiHintHideDelay;
|
|
17
24
|
_this.content = '';
|
|
18
25
|
var hint$ = hoveredService.createHovered$(_this.elementRef.nativeElement).pipe(filter(function () { return !!_this.content; }), startWith(false), distinctUntilChanged());
|
|
19
26
|
hint$
|
|
@@ -76,7 +83,8 @@ var TuiPointerHintDirective = /** @class */ (function (_super) {
|
|
|
76
83
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
77
84
|
{ type: TuiHintService, decorators: [{ type: Inject, args: [TuiHintService,] }] },
|
|
78
85
|
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
79
|
-
{ type: TuiHoveredService, decorators: [{ type: Inject, args: [TuiHoveredService,] }] }
|
|
86
|
+
{ type: TuiHoveredService, decorators: [{ type: Inject, args: [TuiHoveredService,] }] },
|
|
87
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_POINTER_HINT_OPTIONS,] }] }
|
|
80
88
|
]; };
|
|
81
89
|
__decorate([
|
|
82
90
|
Input(),
|
|
@@ -98,7 +106,8 @@ var TuiPointerHintDirective = /** @class */ (function (_super) {
|
|
|
98
106
|
__param(0, Inject(ElementRef)),
|
|
99
107
|
__param(1, Inject(TuiHintService)),
|
|
100
108
|
__param(2, Inject(TuiDestroyService)),
|
|
101
|
-
__param(3, Inject(TuiHoveredService))
|
|
109
|
+
__param(3, Inject(TuiHoveredService)),
|
|
110
|
+
__param(4, Inject(TUI_POINTER_HINT_OPTIONS))
|
|
102
111
|
], TuiPointerHintDirective);
|
|
103
112
|
return TuiPointerHintDirective;
|
|
104
113
|
}(AbstractTuiHint));
|
|
@@ -119,5 +128,5 @@ var TuiPointerHintModule = /** @class */ (function () {
|
|
|
119
128
|
* Generated bundle index. Do not edit.
|
|
120
129
|
*/
|
|
121
130
|
|
|
122
|
-
export { TuiPointerHintDirective, TuiPointerHintModule };
|
|
131
|
+
export { TUI_POINTER_HINT_DEFAULT_OPTIONS, TUI_POINTER_HINT_OPTIONS, TuiPointerHintDirective, TuiPointerHintModule };
|
|
123
132
|
//# sourceMappingURL=taiga-ui-core-directives-pointer-hint.js.map
|