@uiw/react-json-view
Advanced tools
Comparing version 2.0.0-alpha.25 to 2.0.0-alpha.26
@@ -57,3 +57,22 @@ "use strict"; | ||
setCopied(true); | ||
navigator.clipboard.writeText(copyText).then(function () { | ||
var _clipboard = navigator.clipboard || { | ||
writeText: function writeText(text) { | ||
return new Promise(function (reslove, reject) { | ||
var textarea = document.createElement('textarea'); | ||
textarea.style.position = 'absolute'; | ||
textarea.style.opacity = '0'; | ||
textarea.style.left = '-99999999px'; | ||
textarea.value = text; | ||
document.body.appendChild(textarea); | ||
textarea.select(); | ||
if (!document.execCommand('copy')) { | ||
reject(); | ||
} else { | ||
reslove(); | ||
} | ||
textarea.remove(); | ||
}); | ||
} | ||
}; | ||
_clipboard.writeText(copyText).then(function () { | ||
var timer = setTimeout(function () { | ||
@@ -60,0 +79,0 @@ setCopied(false); |
@@ -47,3 +47,22 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
setCopied(true); | ||
navigator.clipboard.writeText(copyText).then(() => { | ||
var _clipboard = navigator.clipboard || { | ||
writeText(text) { | ||
return new Promise((reslove, reject) => { | ||
var textarea = document.createElement('textarea'); | ||
textarea.style.position = 'absolute'; | ||
textarea.style.opacity = '0'; | ||
textarea.style.left = '-99999999px'; | ||
textarea.value = text; | ||
document.body.appendChild(textarea); | ||
textarea.select(); | ||
if (!document.execCommand('copy')) { | ||
reject(); | ||
} else { | ||
reslove(); | ||
} | ||
textarea.remove(); | ||
}); | ||
} | ||
}; | ||
_clipboard.writeText(copyText).then(() => { | ||
var timer = setTimeout(() => { | ||
@@ -50,0 +69,0 @@ setCopied(false); |
{ | ||
"name": "@uiw/react-json-view", | ||
"version": "2.0.0-alpha.25", | ||
"version": "2.0.0-alpha.26", | ||
"description": "JSON viewer for react.", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
@@ -913,3 +913,3 @@ react-json-view | ||
| [@textea/json-viewer](https://github.com/TexteaInc/json-viewer) | [![](https://img.shields.io/bundlephobia/min/@textea/json-viewer?color=red&label=)](https://bundlephobia.com/result?p=@textea/json-viewer) [![](https://img.shields.io/bundlephobia/minzip/@textea/json-viewer?color=red&label=gzip)](https://bundlephobia.com/result?p=@textea/json-viewer) | [![](https://badgen.net/bundlephobia/dependency-count/%40textea%2Fjson-viewer?color=red&label=&t=vvv12213)](https://bundlephobia.com/result?p=@textea/json-viewer) | [![GitHub last commit](https://img.shields.io/github/last-commit/TexteaInc/json-viewer?style=flat&label=)](https://github.com/TexteaInc/json-viewer/commits) | [![NPM Downloads](https://img.shields.io/npm/dm/@textea/json-viewer.svg?style=flat&color=747474&label=)](https://www.npmjs.com/package/@textea/json-viewer) | ✅ | [demo](https://stackblitz.com/edit/textea-json-viewer-v3-b4wgxq) | | ||
| [react-editable-json-tree](https://github.com/oxyno-zeta/react-editable-json-tree) | [![](https://img.shields.io/bundlephobia/min/react-editable-json-tree?color=red&label=)](https://bundlephobia.com/result?p=react-editable-json-tree) [![](https://img.shields.io/bundlephobia/minzip/react-editable-json-tree?color=red&label=gzip)](https://bundlephobia.com/result?p=react-editable-json-tree) | [![](https://badgen.net/bundlephobia/dependency-count/%40textea%2Fjson-viewer?color=red&label=&t=vvv12213)](https://bundlephobia.com/result?p=react-editable-json-tree) | [![GitHub last commit](https://img.shields.io/github/last-commit/TexteaInc/json-viewer?style=flat&label=)](https://github.com/TexteaInc/json-viewer/commits) | [![NPM Downloads](https://img.shields.io/npm/dm/react-editable-json-tree.svg?style=flat&color=747474&label=)](https://www.npmjs.com/package/react-editable-json-tree) | ✅ | [demo](https://oxyno-zeta.github.io/react-editable-json-tree/) | | ||
| [react-editable-json-tree](https://github.com/oxyno-zeta/react-editable-json-tree) | [![](https://img.shields.io/bundlephobia/min/react-editable-json-tree?color=red&label=)](https://bundlephobia.com/result?p=react-editable-json-tree) [![](https://img.shields.io/bundlephobia/minzip/react-editable-json-tree?color=red&label=gzip)](https://bundlephobia.com/result?p=react-editable-json-tree) | [![](https://badgen.net/bundlephobia/dependency-count/%40textea%2Fjson-viewer?color=red&label=&t=vvv12213)](https://bundlephobia.com/result?p=react-editable-json-tree) | [![GitHub last commit](https://img.shields.io/github/last-commit/oxyno-zeta/react-editable-json-tree?style=flat&label=)](https://github.com/oxyno-zeta/react-editable-json-tree/commits) | [![NPM Downloads](https://img.shields.io/npm/dm/react-editable-json-tree.svg?style=flat&color=747474&label=)](https://www.npmjs.com/package/react-editable-json-tree) | ✅ | [demo](https://oxyno-zeta.github.io/react-editable-json-tree/) | | ||
| [react-json-view](https://github.com/HuolalaTech/react-json-view) | [![](https://img.shields.io/bundlephobia/min/@huolala-tech/react-json-view?color=red&label=)](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) [![](https://img.shields.io/bundlephobia/minzip/@huolala-tech/react-json-view?color=red&label=gzip)](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [![](https://badgen.net/bundlephobia/dependency-count/%40textea%2Fjson-viewer?color=red&label=&t=vvv12213)](https://bundlephobia.com/result?p=@huolala-tech/react-json-view) | [![GitHub last commit](https://img.shields.io/github/last-commit/TexteaInc/json-viewer?style=flat&label=)](https://github.com/HuolalaTech/react-json-view/commits) | [![NPM Downloads](https://img.shields.io/npm/dm/@huolala-tech/react-json-view.svg?style=flat&color=747474&label=)](https://www.npmjs.com/package/@huolala-tech/react-json-view) | ❌ | [demo](https://huolalatech.github.io/react-json-view/) | | ||
@@ -916,0 +916,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
316088
7375