1 | import { EventEmitter } from '@angular/core';
|
2 | import * as i0 from '@angular/core';
|
3 | import { InjectionToken } from '@angular/core';
|
4 | import { NgZone } from '@angular/core';
|
5 | import { OnDestroy } from '@angular/core';
|
6 |
|
7 |
|
8 | export declare const CDK_COPY_TO_CLIPBOARD_CONFIG: InjectionToken<CdkCopyToClipboardConfig>;
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare class CdkCopyToClipboard implements OnDestroy {
|
15 | private _clipboard;
|
16 | private _ngZone;
|
17 |
|
18 | text: string;
|
19 | |
20 |
|
21 |
|
22 |
|
23 | attempts: number;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | readonly copied: EventEmitter<boolean>;
|
29 |
|
30 | private _pending;
|
31 |
|
32 | private _destroyed;
|
33 |
|
34 | private _currentTimeout;
|
35 | constructor(_clipboard: Clipboard_2, _ngZone: NgZone, config?: CdkCopyToClipboardConfig);
|
36 | /** Copies the current text to the clipboard. */
|
37 | copy(attempts?: number): void;
|
38 | ngOnDestroy(): void;
|
39 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkCopyToClipboard, [null, null, { optional: true; }]>;
|
40 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkCopyToClipboard, "[cdkCopyToClipboard]", never, { "text": { "alias": "cdkCopyToClipboard"; "required": false; }; "attempts": { "alias": "cdkCopyToClipboardAttempts"; "required": false; }; }, { "copied": "cdkCopyToClipboardCopied"; }, never, never, false, never>;
|
41 | }
|
42 |
|
43 |
|
44 | export declare interface CdkCopyToClipboardConfig {
|
45 |
|
46 | attempts?: number;
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | declare class Clipboard_2 {
|
53 | private readonly _document;
|
54 | constructor(document: any);
|
55 | /**
|
56 | * Copies the provided text into the user's clipboard.
|
57 | *
|
58 | * @param text The string to copy.
|
59 | * @returns Whether the operation was successful.
|
60 | */
|
61 | copy(text: string): boolean;
|
62 | /**
|
63 | * Prepares a string to be copied later. This is useful for large strings
|
64 | * which take too long to successfully render and be copied in the same tick.
|
65 | *
|
66 | * The caller must call `destroy` on the returned `PendingCopy`.
|
67 | *
|
68 | * @param text The string to copy.
|
69 | * @returns the pending copy operation.
|
70 | */
|
71 | beginCopy(text: string): PendingCopy;
|
72 | static ɵfac: i0.ɵɵFactoryDeclaration<Clipboard_2, never>;
|
73 | static ɵprov: i0.ɵɵInjectableDeclaration<Clipboard_2>;
|
74 | }
|
75 | export { Clipboard_2 as Clipboard }
|
76 |
|
77 | export declare class ClipboardModule {
|
78 | static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardModule, never>;
|
79 | static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, [typeof i1.CdkCopyToClipboard], never, [typeof i1.CdkCopyToClipboard]>;
|
80 | static ɵinj: i0.ɵɵInjectorDeclaration<ClipboardModule>;
|
81 | }
|
82 |
|
83 | declare namespace i1 {
|
84 | export {
|
85 | CdkCopyToClipboardConfig,
|
86 | CDK_COPY_TO_CLIPBOARD_CONFIG,
|
87 | CdkCopyToClipboard
|
88 | }
|
89 | }
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 | export declare class PendingCopy {
|
106 | private readonly _document;
|
107 | private _textarea;
|
108 | constructor(text: string, _document: Document);
|
109 | /** Finishes copying the text. */
|
110 | copy(): boolean;
|
111 | /** Cleans up DOM changes used to perform the copy operation. */
|
112 | destroy(): void;
|
113 | }
|
114 |
|
115 | export { }
|