@nova-ui/bits
Version:
SolarWinds Nova Framework
39 lines (38 loc) • 1.36 kB
TypeScript
import { EventEmitter, OnInit } from "@angular/core";
import { LoggerService } from "../../../services/log-service";
import * as i0 from "@angular/core";
/**
* <example-url>./../examples/index.html#/common/clipboard</example-url>
*/
/**
* @ignore
* @dynamic
* Directive that provides copy to clipboard functionality.
*/
export declare class ClipboardDirective implements OnInit {
private logger;
private document;
/**
* Text to be copied to the clipboard
*/
textToCopy: string;
/**
* Event that is fired when text was copied to the clipboard successfully
*/
clipboardSuccess: EventEmitter<void>;
/**
* Event that is fired when copy text was failed
*/
clipboardError: EventEmitter<void>;
private hasCopySupport;
/**
* Replaces element click behavior with clipboard copy event
*/
onClick(e: Event): void;
constructor(logger: LoggerService, document: Document);
ngOnInit(): void;
private copyText;
private createNode;
static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ClipboardDirective, "[nuiClipboard]", never, { "textToCopy": { "alias": "nuiClipboard"; "required": false; }; }, { "clipboardSuccess": "clipboardSuccess"; "clipboardError": "clipboardError"; }, never, never, false, never>;
}