You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
2.4 KiB

{"version":3,"file":"copy-to-clipboard.d.ts","sources":["copy-to-clipboard.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { EventEmitter, NgZone, InjectionToken, OnDestroy } from '@angular/core';\nimport { Clipboard } from './clipboard';\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport declare const CDK_COPY_TO_CLIPBOARD_CONFIG: InjectionToken<CdkCopyToClipboardConfig>;\n/**\n * @deprecated Use `CDK_COPY_TO_CLIPBOARD_CONFIG` instead.\n * @breaking-change 13.0.0\n */\nexport declare const CKD_COPY_TO_CLIPBOARD_CONFIG: InjectionToken<CdkCopyToClipboardConfig>;\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\nexport declare class CdkCopyToClipboard implements OnDestroy {\n private _clipboard;\n private _ngZone;\n /** Content to be copied. */\n text: string;\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n attempts: number;\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n readonly copied: EventEmitter<boolean>;\n /** Copies that are currently being attempted. */\n private _pending;\n /** Whether the directive has been destroyed. */\n private _destroyed;\n /** Timeout for the current copy attempt. */\n private _currentTimeout;\n constructor(_clipboard: Clipboard, _ngZone: NgZone, config?: CdkCopyToClipboardConfig);\n /** Copies the current text to the clipboard. */\n copy(attempts?: number): void;\n ngOnDestroy(): void;\n}\n"]}