sqlui 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-version +1 -1
- data/client/resources/sqlui.js +15 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b3cb90804665afcc2bfbefe7729bc1c80e62db6848770ad4537cfac031aad1f
|
|
4
|
+
data.tar.gz: 6fed2c90062a097f9ece30edc28dfcf0e32b72322bf7a94ebe40cdeaa22ad9d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65bcb424d283e50825d1352889f61e02d2439281e01af02a63c980df5ca94f433569b13f6d7ea69b906f1647d452313ac96a2ae509af29009fa43d35a3864d6e
|
|
7
|
+
data.tar.gz: b3663fe92817d2cbb195f758bea14a744081dbd56c415cd83a449f9fca70d04b9ffe8900d7a28970a6262641b3daf56f33fd9730003f4e1adc845ab801de3242
|
data/.release-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.66
|
data/client/resources/sqlui.js
CHANGED
|
@@ -21908,6 +21908,7 @@
|
|
|
21908
21908
|
}
|
|
21909
21909
|
|
|
21910
21910
|
function copyTextToClipboard (text) {
|
|
21911
|
+
if (text === null) text = '';
|
|
21911
21912
|
const type = 'text/plain';
|
|
21912
21913
|
const blob = new Blob([text], { type });
|
|
21913
21914
|
navigator.clipboard.write([new window.ClipboardItem({ [type]: blob })]);
|
|
@@ -24744,9 +24745,17 @@
|
|
|
24744
24745
|
popupElement.appendChild(contentElement);
|
|
24745
24746
|
|
|
24746
24747
|
let renderedText = text;
|
|
24747
|
-
|
|
24748
|
+
let clipboardText = text;
|
|
24749
|
+
let formatted = false;
|
|
24750
|
+
if (text === null) {
|
|
24751
|
+
renderedText = 'null';
|
|
24752
|
+
contentElement.style.color = '#888';
|
|
24753
|
+
clipboardText = '';
|
|
24754
|
+
} else if (typeof text === 'string' && text.match(/^\s*(?:\{.*\}|\[.*\])\s*$/)) {
|
|
24748
24755
|
try {
|
|
24749
24756
|
renderedText = JSON.stringify(JSON.parse(text), null, 2);
|
|
24757
|
+
clipboardText = renderedText;
|
|
24758
|
+
formatted = renderedText !== text;
|
|
24750
24759
|
} catch (_) { }
|
|
24751
24760
|
}
|
|
24752
24761
|
contentElement.innerText = renderedText;
|
|
@@ -24762,11 +24771,11 @@
|
|
|
24762
24771
|
buttonBarElement.appendChild(copyElement);
|
|
24763
24772
|
|
|
24764
24773
|
copyElement.addEventListener('click', (event) => {
|
|
24765
|
-
copyTextToClipboard(
|
|
24774
|
+
copyTextToClipboard(clipboardText);
|
|
24766
24775
|
toast('Text copied to clipboard.');
|
|
24767
24776
|
});
|
|
24768
24777
|
|
|
24769
|
-
if (
|
|
24778
|
+
if (formatted) {
|
|
24770
24779
|
const copyOriginalElement = document.createElement('input');
|
|
24771
24780
|
copyOriginalElement.classList.add(styles$1.button);
|
|
24772
24781
|
copyOriginalElement.type = 'button';
|
|
@@ -25651,6 +25660,9 @@
|
|
|
25651
25660
|
return wrapperElement
|
|
25652
25661
|
} else {
|
|
25653
25662
|
cellElement.style.textAlign = columnType === 'string' ? 'left' : 'right';
|
|
25663
|
+
if (value === null) {
|
|
25664
|
+
cellElement.style.color = '#888';
|
|
25665
|
+
}
|
|
25654
25666
|
return document.createTextNode(value)
|
|
25655
25667
|
}
|
|
25656
25668
|
};
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sqlui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.66
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Dower
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-02-
|
|
11
|
+
date: 2023-02-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: airbrake
|