import * as _angular_core from '@angular/core'; import { OnDestroy } from '@angular/core'; import { Clipboard } from '@angular/cdk/clipboard'; import { TLocale } from '@talenra/ngx-base/shared'; import { TTooltipPosition } from '@talenra/ngx-base/tooltip'; /** * Values accepted by `Copy-Content`'s `copyContentPosition` property. Determines the position of the copy-content-button relative to * the hosting element. * * ```html * Hover me * ``` * * ### Import * * ```typescript * import { CopyContentTypes } from '@talenra/ngx-base/copy-content'; * ``` * * @see {@link CopyContentDirective} */ declare const CopyContentPosition: { readonly West: "west"; readonly East: "east"; }; /** * Type of values accepted by `Copy-Content`'s `copyContentPosition` property. * * ### Import * * ```typescript * import { TCopyContentPosition } from '@talenra/ngx-base/copy-content'; * ``` * * @see {@link CopyContentDirective} */ type TCopyContentPosition = (typeof CopyContentPosition)[keyof typeof CopyContentPosition]; /** * CopyContent provides a CopyContentButton which is displayed when the hosting element is hovered. By default the * CopyContentButton is displayed right of the hosting element (east). The preferred position can be changed * (s. {@link #position|copyContentPosition}). If space is limited, position is adjusted automatically. * * ```html * * ``` * * ### Import * * ```typescript * import { CopyContentDirective } from '@talenra/ngx-base/copy-content'; * ``` */ declare class CopyContentDirective implements OnDestroy { private elementRef; private overlay; /** * Text copied to clipboard when element is clicked. * * ```html * * ``` */ toCopy: _angular_core.InputSignal; /** * The position relative to the hosting element ('north', 'east', …). Defaults to 'east'. * * ```html * * ``` * * @see {@link CopyContentPosition} * @see {@link TCopyContentPosition} */ position: _angular_core.InputSignal; /** * Inverts the color of the icon (white with opacity 0.5). Useful for dark backgrounds. * * ```html * * ``` */ negativeColor: _angular_core.InputSignalWithTransform; /** * Text displayed in the tooltip. * * ```html * * ``` */ tooltip: _angular_core.InputSignal; /** The overlay reference where the CopyContentButton resides */ private overlayRef; /** Instance of CopyContentButton attached to overlay. */ private buttonInstance?; /** Timeout to detach after fade-out transition has completed */ private detachTimeoutId?; /** Timeout to show slightly delayed */ private showTimeoutId?; /** Timeout to hide slightly delayed */ private hideTimeoutId?; /** @internal */ ngOnDestroy(): void; /** Returns the position configuration for the overlay. */ private getPositionStrategy; /** Create and setup overlay with button if required and return reference to button component */ private setupButton; /** Shows the overlay. */ private show; /** Fade out and detach button with a slight delay */ private hide; /** Closes the overlay. */ private detach; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The copy content button component. * This component is used to copy the content of a text field. * * ```html * * ``` * * ### Import * * ```typescript * import { CopyContentButtonComponent } from '@talenra/ngx-base/copy-content'; * ``` */ declare class CopyContentButtonComponent { /** * Text displayed that is to copy. * * ```html * * ``` */ toCopy: _angular_core.InputSignal; /** * State if the color of the icon should be negative (white with opacity 0.5). * * ```html * * ``` */ negativeColor: _angular_core.InputSignalWithTransform; /** * The position relative to the hosting element ('west', 'east'). Defaults to 'east'. * * ```html * * ``` * * @see {@link CopyContentPosition} * @see {@link TCopyContentPosition} */ position: _angular_core.InputSignal; /** * The tooltip text. * * ```html * * ``` */ tooltip: _angular_core.InputSignal; /** * Locale to dynamically overwrite the app's locale. * Allowed values, see: Locale * * ```html * * ``` * * @see {@link Locale} * @see {@link TLocale} */ dynamicLocale: _angular_core.InputSignal; /** * The tooltip position. In relation to the button position. */ tooltipPosition: _angular_core.Signal; /** * The locale to use. */ private locale; /** * Text displayed in the tooltip. If no tooltip text is provided, the default text will be used. */ protected tooltipText: _angular_core.Signal; /** * The boolean to check if the item is copied. */ protected isCopied: boolean; /** * Used for visual transitions. When `active`, the component is visible or fading-in, while `inactive` the component * is invisible or fading-out. */ get state(): 'active' | 'inactive'; set state(value: 'active' | 'inactive'); /** State is set 'inactive' while fade-out transition is in progress. */ private _state; /** Helper: Add classes to host element (hooks for styling) */ private get hostClass(); /** * The injected dependencies. */ protected clipboard: Clipboard; private appLocale; private changeDetector; /** * After the icon is clicked, the data-item-attribute will be copied. * @param event The mouse event. */ protected copyText(event: MouseEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { CopyContentButtonComponent, CopyContentDirective, CopyContentPosition }; export type { TCopyContentPosition };