
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@coveops/copy-to-clipboard
Advanced tools
Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.
The CopyToClipboard component allows the user to copy a value specified to their clipboard.
npm i @coveops/copy-to-clipboard
Typescript:
import { CopyToClipboard, ICopyToClipboardOptions } from '@coveops/copy-to-clipboard';
Javascript
const CopyToClipboard = require('@coveops/copy-to-clipboard').CopyToClipboard;
export * from '@coveops/copy-to-clipboard'
<script src="https://unpkg.com/@coveops/copy-to-clipboard@latest/dist/index.min.js"></script>
Disclaimer: Unpkg should be used for testing but not for production.
<div class="CoveoCopyToClipboard"></div>
The following options can be configured:
Option | Required | Type | Default | Notes |
---|---|---|---|---|
hasCaption | No | boolean | true | Do we show a caption on the component? |
caption | No | string | Copy | The caption shown on the component. |
copiedCaption | No | string | Copied! | The caption shown when you successfully copied the field. |
resetTimeout | No | string | 3000 | The amount of milliseconds before the caption reverts from copiedCaption to caption . |
field | No | IFieldOption | @clickUri | The field whose value will be copied to the clipboard. The field name must be prefixed with @ . |
altTitle | No | string | Copy | The alternate title displayed for accessibility purposes. |
hasIcon | No | string | false | Do we display an icon on the component? |
icon | No | string | clipboard | The icon displayed on the component. The component offers a couple of icons. If none of them fit your needs, you can inject an SVG element. |
iconWidth | No | number | 18 | The icon width. |
iconHeight | No | string | 18 | The icon height. |
These icons are available:
Icon | Preview |
---|---|
clipboard | |
copy |
If none of these icons serve your purpose, you may use your own SVG icon like so:
<span class="CoveoCopyToClipboard" data-field="@uri" data-caption="Copy" data-has-icon="true"
data-icon="<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M458.4 64.3C400.6 15.7 311.3 23 256 79.3 200.7 23 111.4 15.6 53.6 64.3-21.6 127.6-10.6 230.8 43 285.5l175.4 178.7c10 10.2 23.4 15.9 37.6 15.9 14.3 0 27.6-5.6 37.6-15.8L469 285.6c53.5-54.7 64.7-157.9-10.6-221.3zm-23.6 187.5L259.4 430.5c-2.4 2.4-4.4 2.4-6.8 0L77.2 251.8c-36.5-37.2-43.9-107.6 7.3-150.7 38.9-32.7 98.9-27.8 136.5 10.5l35 35.7 35-35.7c37.8-38.5 97.8-43.2 136.5-10.6 51.1 43.1 43.5 113.9 7.3 150.8z'></path></svg>"
data-icon-height="20" data-icon-width="20"></span>
Avoid self-closing tags for maximum compatibility.
If you wish to use this component in Salesforce, please use the equivalent CoveoSalesforceCopyToClipboard
component embedded in this package.
<div class="CoveoSalesforceCopyToClipboard"></div>
Extending the component can be done as follows:
import { CopyToClipboard, ICopyToClipboardOptions } from "@coveops/copy-to-clipboard";
export interface IExtendedCopyToClipboardOptions extends ICopyToClipboardOptions {}
export class ExtendedCopyToClipboard extends CopyToClipboard {}
.env.dist
to .env
and update the COVEO_ORG_ID and COVEO_TOKEN fields in the .env
file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.npm run build
npm run serve
FAQs
Allows the user to copy a value to their clipboard.
We found that @coveops/copy-to-clipboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.