sqlui 0.1.62 → 0.1.64
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 +30 -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: c55b04fc771e7c186fba3ae43d8e937791d771a62ee719038cf3f43a59f51d7b
|
4
|
+
data.tar.gz: 42084949509beab792f29b1d2d283bda8ebc194d4d4fcd8e708e7974963e215f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e1acdf001a5f5a1df6812cf92ca9b1d3ff9b494155e54ecbbc53a8137431f41a58bb74656cdc923d5c2df4f7e540a29cb3172a0c461420c9509739a91c0ab64
|
7
|
+
data.tar.gz: 74a5a8f28719d12a653fb338871ba72202b9b56529611629a1e53bb71cc903917d54b7fa8110473a931c3cd21969b7c76126183fe3ffde038e86fdaaa49111e4
|
data/.release-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.64
|
data/client/resources/sqlui.js
CHANGED
@@ -24695,7 +24695,7 @@
|
|
24695
24695
|
}
|
24696
24696
|
}
|
24697
24697
|
|
24698
|
-
var css_248z$1 = ".popup_popup-wrapper__huCTg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 2;\n margin: 0;\n padding: 0;\n background: rgba(0, 0, 0, 0.3);\n}\n\n.popup_popup__co5G- {\n position: absolute;\n top: 60px;\n right: 60px;\n bottom: 60px;\n left: 60px;\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n background: #fff;\n border: 1px solid #888;\n}\n\n.popup_title__JT4Lb {\n margin: 0;\n padding: 10px;\n font-weight: bold;\n font-family: Helvetica, sans-serif;\n font-size: 18px;\n color: #333;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.popup_content__m7uSh {\n flex: 1;\n margin: 0;\n padding: 10px;\n overflow: auto;\n font-family: monospace;\n font-size: 18px;\n border-top: 1px solid #888;\n border-bottom: 1px solid #888;\n color: #333;\n}\n\n.popup_content__m7uSh:focus {\n outline: none;\n}\n\n.popup_button-bar__VCxAC {\n display: flex;\n flex-direction: row;\n
|
24698
|
+
var css_248z$1 = ".popup_popup-wrapper__huCTg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 2;\n margin: 0;\n padding: 0;\n background: rgba(0, 0, 0, 0.3);\n}\n\n.popup_popup__co5G- {\n position: absolute;\n top: 60px;\n right: 60px;\n bottom: 60px;\n left: 60px;\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n background: #fff;\n border: 1px solid #888;\n}\n\n.popup_title__JT4Lb {\n margin: 0;\n padding: 10px;\n font-weight: bold;\n font-family: Helvetica, sans-serif;\n font-size: 18px;\n color: #333;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.popup_content__m7uSh {\n flex: 1;\n margin: 0;\n padding: 10px;\n overflow: auto;\n font-family: monospace;\n font-size: 18px;\n border-top: 1px solid #888;\n border-bottom: 1px solid #888;\n color: #333;\n}\n\n.popup_content__m7uSh:focus {\n outline: none;\n}\n\n.popup_button-bar__VCxAC {\n display: flex;\n flex-direction: row;\n margin: 0;\n padding: 10px;\n}\n\n.popup_button__CkIzv {\n width: 150px;\n height: 30px;\n margin: 0 5px;\n cursor: pointer;\n font-family: Helvetica, sans-serif;\n display: flex;\n justify-content: center;\n font-size: 18px;\n color: #333;\n border: 1px solid #888;\n}\n\n.popup_button__CkIzv:active {\n background-color: #e6e6e6;\n}\n";
|
24699
24699
|
var styles$1 = {"popup-wrapper":"popup_popup-wrapper__huCTg","popup":"popup_popup__co5G-","title":"popup_title__JT4Lb","content":"popup_content__m7uSh","button-bar":"popup_button-bar__VCxAC","button":"popup_button__CkIzv"};
|
24700
24700
|
styleInject(css_248z$1);
|
24701
24701
|
|
@@ -24741,9 +24741,16 @@
|
|
24741
24741
|
|
24742
24742
|
const contentElement = document.createElement('pre');
|
24743
24743
|
contentElement.classList.add(styles$1.content);
|
24744
|
-
contentElement.innerText = text;
|
24745
24744
|
popupElement.appendChild(contentElement);
|
24746
24745
|
|
24746
|
+
let renderedText = text;
|
24747
|
+
if (text.match(/^\s*(?:\{.*\}|\[.*\])\s*$/)) {
|
24748
|
+
try {
|
24749
|
+
renderedText = JSON.stringify(JSON.parse(text), null, 2);
|
24750
|
+
} catch (_) { }
|
24751
|
+
}
|
24752
|
+
contentElement.innerText = renderedText;
|
24753
|
+
|
24747
24754
|
const buttonBarElement = document.createElement('div');
|
24748
24755
|
buttonBarElement.classList.add(styles$1['button-bar']);
|
24749
24756
|
popupElement.appendChild(buttonBarElement);
|
@@ -24755,10 +24762,27 @@
|
|
24755
24762
|
buttonBarElement.appendChild(copyElement);
|
24756
24763
|
|
24757
24764
|
copyElement.addEventListener('click', (event) => {
|
24758
|
-
copyTextToClipboard(
|
24765
|
+
copyTextToClipboard(renderedText);
|
24759
24766
|
toast('Text copied to clipboard.');
|
24760
24767
|
});
|
24761
24768
|
|
24769
|
+
if (renderedText !== text) {
|
24770
|
+
const copyOriginalElement = document.createElement('input');
|
24771
|
+
copyOriginalElement.classList.add(styles$1.button);
|
24772
|
+
copyOriginalElement.type = 'button';
|
24773
|
+
copyOriginalElement.value = 'Copy Original';
|
24774
|
+
buttonBarElement.appendChild(copyOriginalElement);
|
24775
|
+
|
24776
|
+
copyOriginalElement.addEventListener('click', (event) => {
|
24777
|
+
copyTextToClipboard(text);
|
24778
|
+
toast('Text copied to clipboard.');
|
24779
|
+
});
|
24780
|
+
}
|
24781
|
+
|
24782
|
+
const spacerElement = document.createElement('div');
|
24783
|
+
spacerElement.style.flex = 1;
|
24784
|
+
buttonBarElement.appendChild(spacerElement);
|
24785
|
+
|
24762
24786
|
const closeElement = document.createElement('input');
|
24763
24787
|
closeElement.id = 'popup-close';
|
24764
24788
|
closeElement.classList.add(styles$1.button);
|
@@ -25701,6 +25725,9 @@
|
|
25701
25725
|
const listener = (event) => {
|
25702
25726
|
if (event.which === 1 && (event.metaKey || event.altKey)) {
|
25703
25727
|
let node = event.target;
|
25728
|
+
// If the cell contains a link, let it handle the click.
|
25729
|
+
if (node.tagName.toLowerCase() === 'a') return
|
25730
|
+
|
25704
25731
|
while (!['td', 'th', 'table'].includes(node.tagName.toLowerCase()) && node.parentNode) {
|
25705
25732
|
node = node.parentNode;
|
25706
25733
|
}
|
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.64
|
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-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake
|