sqlui 0.1.58 → 0.1.59
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/app/sqlui.rb +1 -1
- data/app/views/sqlui.erb +28 -22
- data/client/resources/sqlui.css +44 -31
- data/client/resources/sqlui.js +61 -30
- 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: 6b06af3454b65600eacd42b1008e186c473736411fedaed471162af97d98f39f
|
|
4
|
+
data.tar.gz: 38c46eb311a518ea328acd959ca34c8e5d850c83fa9c1b98c663daef2356c334
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 320e438a5101b83a59691168f2673f82ffb35559b547a9e75e6278b9735c4880a3906b298ae576d89346218f3ff3543e7cd57e034dbbfa2c525b4a069ad337ab
|
|
7
|
+
data.tar.gz: 03d5d65cad39f143c56f205c1f55280d2ab269390191b0ea026300e1c422b896876c2e5cf0c9f0764ca712a50c9702fb222f93a584960bfe11762fbc4663a78f
|
data/.release-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.59
|
data/app/sqlui.rb
CHANGED
data/app/views/sqlui.erb
CHANGED
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
</head>
|
|
26
26
|
|
|
27
27
|
<body>
|
|
28
|
-
<div id="loading-box"
|
|
28
|
+
<div id="loading-box">
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
<div id="main-box"
|
|
32
|
-
<div
|
|
33
|
-
<h1
|
|
34
|
-
<h1 id="server-name"
|
|
31
|
+
<div id="main-box" style="display:none">
|
|
32
|
+
<div id="tabs-box">
|
|
33
|
+
<h1 id="header"><a id="header-link">SQLUI</a></h1>
|
|
34
|
+
<h1 id="server-name"></h1>
|
|
35
35
|
<a id="query-tab-button" class="tab-button">Query</a>
|
|
36
36
|
<a id="graph-tab-button" class="tab-button">Graph</a>
|
|
37
37
|
<a id="saved-tab-button" class="tab-button">Saved</a>
|
|
38
38
|
<a id="structure-tab-button" class="tab-button">Structure</a>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div id="query-box" class="
|
|
41
|
+
<div id="query-box" class="tab-content-element graph-element query-element" style="display: none;">
|
|
42
42
|
<div id="query" class="query"></div>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
<div id="submit-box" class="
|
|
45
|
+
<div id="submit-box" class="tab-content-element graph-element query-element" style="display: none;">
|
|
46
46
|
<input id="cancel-button" class="cancel-button" type="button" value="cancel"></input>
|
|
47
47
|
<div class="submit-fill"></div>
|
|
48
48
|
<div style="position: relative;">
|
|
@@ -66,44 +66,50 @@
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
-
<div id="result-box" class="
|
|
69
|
+
<div id="result-box" class="tab-content-element query-element" style="display: none;">
|
|
70
70
|
</div>
|
|
71
71
|
|
|
72
|
-
<div id="graph-box" class="
|
|
72
|
+
<div id="graph-box" class="tab-content-element graph-element" style="display: none;">
|
|
73
73
|
</div>
|
|
74
74
|
|
|
75
|
-
<div id="fetch-sql-box" class="
|
|
75
|
+
<div id="fetch-sql-box" class="tab-content-element graph-element query-element" style="display: none;">
|
|
76
76
|
<div id="result-loader" class="loader"></div>
|
|
77
77
|
<p id="result-time" class="result-time"></p>
|
|
78
78
|
</div>
|
|
79
79
|
|
|
80
|
-
<div id="saved-box" class="
|
|
80
|
+
<div id="saved-box" class="tab-content-element saved-element" style="display: none;">
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
|
-
<div id="structure-box" class="
|
|
83
|
+
<div id="structure-box" class="tab-content-element structure-element" style="display: none;">
|
|
84
84
|
<div class="structure-wrapper">
|
|
85
|
-
<select id="schemas"
|
|
85
|
+
<select id="schemas" size="4">
|
|
86
86
|
</select>
|
|
87
|
-
<select id="tables"
|
|
87
|
+
<select id="tables" size="4">
|
|
88
88
|
</select>
|
|
89
|
-
<div id="table-info"
|
|
90
|
-
<div id="columns"
|
|
89
|
+
<div id="table-info">
|
|
90
|
+
<div id="columns">
|
|
91
91
|
</div>
|
|
92
|
-
<div id="indexes"
|
|
92
|
+
<div id="indexes">
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
97
97
|
|
|
98
|
-
<div id="status-box"
|
|
98
|
+
<div id="status-box">
|
|
99
99
|
<div id="status-message"></div>
|
|
100
100
|
<div style="flex: 1;"></div>
|
|
101
101
|
<div id="pagination-box" class="tab-content-element">
|
|
102
102
|
<div id="page-count-box"></div>
|
|
103
|
-
<input id="first-button" class="pagination-button" type="button" value="
|
|
104
|
-
<input id="
|
|
105
|
-
<input id="
|
|
106
|
-
<input id="
|
|
103
|
+
<input id="first-button" class="pagination-button" type="button" value="«" />
|
|
104
|
+
<input id="jb5-button" class="pagination-button jump-button" type="button" value="50" data-jump="-50" data-min="100" />
|
|
105
|
+
<input id="jb10-button" class="pagination-button jump-button" type="button" value="10" data-jump="-10" data-min="25"/>
|
|
106
|
+
<input id="jb50-button" class="pagination-button jump-button" type="button" value="5" data-jump="-5" data-min="10" data-max="24"/>
|
|
107
|
+
<input id="prev-button" class="pagination-button" type="button" value="‹" />
|
|
108
|
+
<input id="next-button" class="pagination-button" type="button" value="›" />
|
|
109
|
+
<input id="jf5-button" class="pagination-button jump-button" type="button" value="5" data-jump="5" data-min="10" data-max="24"/>
|
|
110
|
+
<input id="jf10-button" class="pagination-button jump-button" type="button" value="10" data-jump="10" data-min="25"/>
|
|
111
|
+
<input id="jf50-button" class="pagination-button jump-button" type="button" value="50" data-jump="50" data-min="100"/>
|
|
112
|
+
<input id="last-button" class="pagination-button" type="button" value="»" />
|
|
107
113
|
</div>
|
|
108
114
|
</div>
|
|
109
115
|
</div>
|
data/client/resources/sqlui.css
CHANGED
|
@@ -20,7 +20,7 @@ p {
|
|
|
20
20
|
font-size: 18px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
#loading-box {
|
|
24
24
|
font-family: monospace;
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
@@ -34,7 +34,7 @@ p {
|
|
|
34
34
|
color: #333;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
#main-box {
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
flex: 1;
|
|
@@ -43,24 +43,24 @@ p {
|
|
|
43
43
|
min-height: 100%;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
#header, #server-name {
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: start;
|
|
50
50
|
color: #333;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
#header {
|
|
54
54
|
font-weight: bold;
|
|
55
55
|
padding-left: 5px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
#header a {
|
|
59
59
|
text-decoration: none;
|
|
60
60
|
color: #333
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
#server-name {
|
|
64
64
|
flex: 1;
|
|
65
65
|
padding-left: 15px;
|
|
66
66
|
font-weight: normal;
|
|
@@ -69,12 +69,13 @@ p {
|
|
|
69
69
|
margin: 0;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
#tabs-box {
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: row;
|
|
75
75
|
border-bottom: 1px solid #ddd;
|
|
76
76
|
height: 36px;
|
|
77
77
|
font-family: Helvetica, sans-serif;
|
|
78
|
+
padding: 5px;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.tab-button, .selected-tab-button {
|
|
@@ -103,7 +104,7 @@ p {
|
|
|
103
104
|
font-weight: bold;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
#query-box {
|
|
107
108
|
display: flex;
|
|
108
109
|
flex-direction: column;
|
|
109
110
|
}
|
|
@@ -112,7 +113,7 @@ p {
|
|
|
112
113
|
font-size: 18px;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
#submit-box {
|
|
116
117
|
display: flex;
|
|
117
118
|
border-top: 1px solid #ddd;
|
|
118
119
|
border-bottom: 1px solid #ddd;
|
|
@@ -214,7 +215,10 @@ p {
|
|
|
214
215
|
background-color: #efefef;
|
|
215
216
|
}
|
|
216
217
|
|
|
217
|
-
.submit-dropdown-content-button:active,
|
|
218
|
+
.submit-dropdown-content-button:active,
|
|
219
|
+
.submit-button:active,
|
|
220
|
+
.cancel-button:active,
|
|
221
|
+
.submit-dropdown-button:active {
|
|
218
222
|
background-color: #e6e6e6;
|
|
219
223
|
outline: none
|
|
220
224
|
}
|
|
@@ -238,9 +242,10 @@ p {
|
|
|
238
242
|
overflow: hidden;
|
|
239
243
|
font-size: 16px;
|
|
240
244
|
color: #333;
|
|
245
|
+
margin-left: 5px;
|
|
241
246
|
}
|
|
242
247
|
|
|
243
|
-
|
|
248
|
+
#result-box, #fetch-sql-box, #saved-box, #graph-box, #structure-box {
|
|
244
249
|
flex: 1;
|
|
245
250
|
overflow: auto;
|
|
246
251
|
display: flex;
|
|
@@ -268,12 +273,12 @@ table tbody tr td {
|
|
|
268
273
|
bottom: 2px; /* To make the links look vertically centered. */
|
|
269
274
|
}
|
|
270
275
|
|
|
271
|
-
|
|
276
|
+
#fetch-sql-box {
|
|
272
277
|
justify-content: center;
|
|
273
278
|
align-items: center;
|
|
274
279
|
}
|
|
275
280
|
|
|
276
|
-
|
|
281
|
+
#graph-box {
|
|
277
282
|
padding: 20px;
|
|
278
283
|
}
|
|
279
284
|
|
|
@@ -352,8 +357,8 @@ thead {
|
|
|
352
357
|
background: #eee;
|
|
353
358
|
}
|
|
354
359
|
|
|
355
|
-
|
|
356
|
-
padding: 5px
|
|
360
|
+
#status-box {
|
|
361
|
+
padding: 5px;
|
|
357
362
|
display: flex;
|
|
358
363
|
flex-direction: row;
|
|
359
364
|
border-top: 1px solid #ddd;
|
|
@@ -366,17 +371,11 @@ thead {
|
|
|
366
371
|
color: #999;
|
|
367
372
|
}
|
|
368
373
|
|
|
369
|
-
|
|
370
|
-
display: flex;
|
|
371
|
-
padding: 5px;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.saved-box {
|
|
374
|
+
#saved-box {
|
|
375
375
|
font-family: Helvetica, sans-serif;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
|
|
379
|
-
margin: 0;
|
|
378
|
+
#saved-box h2 {
|
|
380
379
|
font-weight: bold;
|
|
381
380
|
}
|
|
382
381
|
|
|
@@ -384,7 +383,7 @@ thead {
|
|
|
384
383
|
border-top: none !important;
|
|
385
384
|
}
|
|
386
385
|
|
|
387
|
-
|
|
386
|
+
#saved-box p {
|
|
388
387
|
margin: 0;
|
|
389
388
|
}
|
|
390
389
|
|
|
@@ -427,27 +426,27 @@ thead {
|
|
|
427
426
|
height: 100%;
|
|
428
427
|
}
|
|
429
428
|
|
|
430
|
-
|
|
429
|
+
#schemas, #tables {
|
|
431
430
|
border: none;
|
|
432
431
|
display: flex;
|
|
433
432
|
min-width: 200px;
|
|
434
433
|
}
|
|
435
434
|
|
|
436
|
-
|
|
435
|
+
#table-info {
|
|
437
436
|
display: grid;
|
|
438
437
|
grid-template-rows: 0.5fr 0.5fr;
|
|
439
438
|
justify-items: stretch;
|
|
440
439
|
flex: 1;
|
|
441
440
|
}
|
|
442
441
|
|
|
443
|
-
|
|
442
|
+
#columns {
|
|
444
443
|
border-bottom: 1px solid #ddd;
|
|
445
444
|
overflow: auto;
|
|
446
445
|
grid-column: 1;
|
|
447
446
|
grid-row: 1;
|
|
448
447
|
}
|
|
449
448
|
|
|
450
|
-
|
|
449
|
+
#indexes {
|
|
451
450
|
overflow: auto;
|
|
452
451
|
grid-column: 1;
|
|
453
452
|
grid-row: 2;
|
|
@@ -494,16 +493,30 @@ select {
|
|
|
494
493
|
}
|
|
495
494
|
|
|
496
495
|
.pagination-button {
|
|
497
|
-
margin: 0 10px;
|
|
498
|
-
cursor: pointer;
|
|
496
|
+
margin: 0 0 0 10px;
|
|
499
497
|
background: none;
|
|
500
498
|
color: #333;
|
|
501
499
|
border: 1px solid #888;
|
|
502
500
|
font-size: 16px;
|
|
503
|
-
padding: 2px
|
|
501
|
+
padding: 2px 5px;
|
|
502
|
+
width: 30px;
|
|
503
|
+
justify-content: center;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.pagination-button:enabled {
|
|
507
|
+
cursor: pointer;
|
|
504
508
|
}
|
|
505
509
|
|
|
506
510
|
.pagination-button:disabled {
|
|
507
511
|
color: #888;
|
|
508
512
|
border: 1px solid #ddd;
|
|
509
513
|
}
|
|
514
|
+
|
|
515
|
+
.pagination-button:active:enabled {
|
|
516
|
+
background-color: #e6e6e6;
|
|
517
|
+
outline: none
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.jump-button {
|
|
521
|
+
font-size: 12px;
|
|
522
|
+
}
|
data/client/resources/sqlui.js
CHANGED
|
@@ -24456,8 +24456,6 @@
|
|
|
24456
24456
|
|
|
24457
24457
|
containerMutationObserver.resizeObserver = containerResizeObserver;
|
|
24458
24458
|
containerMutationObserver.containerElement = this.parentElement;
|
|
24459
|
-
console.log('observing');
|
|
24460
|
-
console.log(this.parentElement);
|
|
24461
24459
|
containerMutationObserver.observe(this.parentElement, { childList: true });
|
|
24462
24460
|
}.bind(this));
|
|
24463
24461
|
tableResizeObserver.observe(this);
|
|
@@ -24506,7 +24504,7 @@
|
|
|
24506
24504
|
|
|
24507
24505
|
/* global google */
|
|
24508
24506
|
|
|
24509
|
-
const PAGE_SIZE =
|
|
24507
|
+
const PAGE_SIZE = 100;
|
|
24510
24508
|
|
|
24511
24509
|
function getSqlFromUrl (url) {
|
|
24512
24510
|
const params = url.searchParams;
|
|
@@ -24526,15 +24524,18 @@
|
|
|
24526
24524
|
}
|
|
24527
24525
|
|
|
24528
24526
|
function init (parent, onSubmit, onShiftSubmit) {
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24532
|
-
|
|
24533
|
-
|
|
24534
|
-
|
|
24527
|
+
addEventListener('#query-tab-button', 'click', (event) => selectTab(event, 'query'));
|
|
24528
|
+
addEventListener('#saved-tab-button', 'click', (event) => selectTab(event, 'saved'));
|
|
24529
|
+
addEventListener('#structure-tab-button', 'click', (event) => selectTab(event, 'structure'));
|
|
24530
|
+
addEventListener('#graph-tab-button', 'click', (event) => selectTab(event, 'graph'));
|
|
24531
|
+
addEventListener('#cancel-button', 'click', () => clearResult());
|
|
24532
|
+
|
|
24533
|
+
addEventListener('#query-box', 'click', () => {
|
|
24534
|
+
focus();
|
|
24535
|
+
});
|
|
24535
24536
|
const dropdownContent = document.getElementById('submit-dropdown-content');
|
|
24536
24537
|
const dropdownButton = document.getElementById('submit-dropdown-button');
|
|
24537
|
-
|
|
24538
|
+
addEventListener(dropdownButton, 'click', () => dropdownContent.classList.toggle('submit-dropdown-content-show'));
|
|
24538
24539
|
|
|
24539
24540
|
const isMac = navigator.userAgent.includes('Mac');
|
|
24540
24541
|
const runCurrentLabel = `run selection (${isMac ? '⌘' : 'Ctrl'}-Enter)`;
|
|
@@ -24542,54 +24543,68 @@
|
|
|
24542
24543
|
|
|
24543
24544
|
const submitButtonCurrent = document.getElementById('submit-button-current');
|
|
24544
24545
|
submitButtonCurrent.value = runCurrentLabel;
|
|
24545
|
-
|
|
24546
|
+
addEventListener(submitButtonCurrent, 'click', (event) => submitCurrent(event.target, event));
|
|
24546
24547
|
|
|
24547
24548
|
const submitButtonAll = document.getElementById('submit-button-all');
|
|
24548
24549
|
submitButtonAll.value = runAllLabel;
|
|
24549
|
-
|
|
24550
|
+
addEventListener(submitButtonAll, 'click', (event) => submitAll(event.target, event));
|
|
24550
24551
|
|
|
24551
24552
|
const dropdownButtonCurrent = document.getElementById('submit-dropdown-button-current');
|
|
24552
24553
|
dropdownButtonCurrent.value = runCurrentLabel;
|
|
24553
|
-
|
|
24554
|
+
addEventListener(dropdownButtonCurrent, 'click', (event) => submitCurrent(event.target, event));
|
|
24554
24555
|
|
|
24555
24556
|
const dropdownAllButton = document.getElementById('submit-dropdown-button-all');
|
|
24556
24557
|
dropdownAllButton.value = runAllLabel;
|
|
24557
|
-
|
|
24558
|
+
addEventListener(dropdownAllButton, 'click', (event) => submitAll(event.target, event));
|
|
24558
24559
|
|
|
24559
24560
|
const dropdownToggleButton = document.getElementById('submit-dropdown-button-toggle');
|
|
24560
|
-
|
|
24561
|
+
addEventListener(dropdownToggleButton, 'click', () => {
|
|
24561
24562
|
submitButtonCurrent.classList.toggle('submit-button-show');
|
|
24562
24563
|
submitButtonAll.classList.toggle('submit-button-show');
|
|
24563
24564
|
focus(getSelection());
|
|
24564
24565
|
});
|
|
24565
24566
|
|
|
24566
|
-
|
|
24567
|
+
addEventListener('#submit-dropdown-button-copy-csv', 'click', () => {
|
|
24567
24568
|
if (window.sqlFetch?.result) {
|
|
24568
24569
|
copyTextToClipboard(toCsv(window.sqlFetch.result.columns, window.sqlFetch.result.rows));
|
|
24569
24570
|
}
|
|
24570
24571
|
});
|
|
24571
|
-
|
|
24572
|
+
addEventListener('#submit-dropdown-button-copy-tsv', 'click', () => {
|
|
24572
24573
|
if (window.sqlFetch?.result) {
|
|
24573
24574
|
copyTextToClipboard(toTsv(window.sqlFetch.result.columns, window.sqlFetch.result.rows));
|
|
24574
24575
|
}
|
|
24575
24576
|
});
|
|
24576
|
-
|
|
24577
|
+
addEventListener('#first-button', 'click', () => {
|
|
24577
24578
|
window.sqlFetch.page = 0;
|
|
24578
24579
|
displaySqlFetch(window.sqlFetch);
|
|
24579
24580
|
});
|
|
24580
|
-
|
|
24581
|
+
addEventListener('#prev-button', 'click', () => {
|
|
24581
24582
|
window.sqlFetch.page -= 1;
|
|
24582
24583
|
displaySqlFetch(window.sqlFetch);
|
|
24583
24584
|
});
|
|
24584
|
-
|
|
24585
|
+
document.querySelectorAll('.jump-button').forEach((button) => {
|
|
24586
|
+
addEventListener(button, 'click', (event) => {
|
|
24587
|
+
const jump = parseInt(event.target.dataset.jump);
|
|
24588
|
+
let page = 1 + window.sqlFetch.page;
|
|
24589
|
+
if (jump < 0) {
|
|
24590
|
+
page -= (page % jump) === 0 ? Math.abs(jump) : page % jump;
|
|
24591
|
+
} else {
|
|
24592
|
+
page += jump;
|
|
24593
|
+
page -= page % jump;
|
|
24594
|
+
}
|
|
24595
|
+
window.sqlFetch.page = Math.max(0, Math.min(window.sqlFetch.pageCount - 1, page - 1));
|
|
24596
|
+
displaySqlFetch(window.sqlFetch);
|
|
24597
|
+
});
|
|
24598
|
+
});
|
|
24599
|
+
addEventListener('#next-button', 'click', () => {
|
|
24585
24600
|
window.sqlFetch.page += 1;
|
|
24586
24601
|
displaySqlFetch(window.sqlFetch);
|
|
24587
24602
|
});
|
|
24588
|
-
|
|
24603
|
+
addEventListener('#last-button', 'click', () => {
|
|
24589
24604
|
window.sqlFetch.page = window.sqlFetch.pageCount - 1;
|
|
24590
24605
|
displaySqlFetch(window.sqlFetch);
|
|
24591
24606
|
});
|
|
24592
|
-
|
|
24607
|
+
addEventListener('#submit-dropdown-button-download-csv', 'click', () => {
|
|
24593
24608
|
if (!window.sqlFetch?.result) return
|
|
24594
24609
|
|
|
24595
24610
|
const url = new URL(window.location);
|
|
@@ -24605,12 +24620,12 @@
|
|
|
24605
24620
|
focus(getSelection());
|
|
24606
24621
|
});
|
|
24607
24622
|
|
|
24608
|
-
|
|
24623
|
+
addEventListener(document, 'click', (event) => {
|
|
24609
24624
|
if (event.target !== dropdownButton) {
|
|
24610
24625
|
dropdownContent.classList.remove('submit-dropdown-content-show');
|
|
24611
24626
|
}
|
|
24612
24627
|
});
|
|
24613
|
-
|
|
24628
|
+
addEventListener(dropdownContent, 'focusout', (event) => {
|
|
24614
24629
|
if (!dropdownContent.contains(event.relatedTarget)) {
|
|
24615
24630
|
dropdownContent.classList.remove('submit-dropdown-content-show');
|
|
24616
24631
|
}
|
|
@@ -24618,8 +24633,12 @@
|
|
|
24618
24633
|
window.editorView = createEditor(parent, window.metadata, onSubmit, onShiftSubmit);
|
|
24619
24634
|
}
|
|
24620
24635
|
|
|
24621
|
-
function
|
|
24622
|
-
|
|
24636
|
+
function addEventListener (elementOrSelector, type, func) {
|
|
24637
|
+
if (typeof elementOrSelector === 'string') {
|
|
24638
|
+
document.querySelector(elementOrSelector).addEventListener(type, func);
|
|
24639
|
+
} else {
|
|
24640
|
+
elementOrSelector.addEventListener(type, func);
|
|
24641
|
+
}
|
|
24623
24642
|
}
|
|
24624
24643
|
|
|
24625
24644
|
function getSelection () {
|
|
@@ -24651,9 +24670,9 @@
|
|
|
24651
24670
|
});
|
|
24652
24671
|
}
|
|
24653
24672
|
|
|
24654
|
-
function focus (selection) {
|
|
24673
|
+
function focus (selection = null) {
|
|
24655
24674
|
window.editorView.focus();
|
|
24656
|
-
setSelection(selection);
|
|
24675
|
+
if (selection) setSelection(selection);
|
|
24657
24676
|
}
|
|
24658
24677
|
|
|
24659
24678
|
function getValue () {
|
|
@@ -24921,7 +24940,7 @@
|
|
|
24921
24940
|
viewLinkElement.classList.add('view-link');
|
|
24922
24941
|
viewLinkElement.innerText = 'view';
|
|
24923
24942
|
viewLinkElement.href = viewUrl.pathname + viewUrl.search;
|
|
24924
|
-
|
|
24943
|
+
addEventListener(viewLinkElement, 'click', (event) => {
|
|
24925
24944
|
clearResult();
|
|
24926
24945
|
route(event.target, event, viewUrl, true);
|
|
24927
24946
|
});
|
|
@@ -24935,7 +24954,7 @@
|
|
|
24935
24954
|
runLinkElement.classList.add('run-link');
|
|
24936
24955
|
runLinkElement.innerText = 'run';
|
|
24937
24956
|
runLinkElement.href = runUrl.pathname + runUrl.search;
|
|
24938
|
-
|
|
24957
|
+
addEventListener(runLinkElement, 'click', (event) => {
|
|
24939
24958
|
clearResult();
|
|
24940
24959
|
route(event.target, event, viewUrl, true);
|
|
24941
24960
|
route(event.target, event, runUrl, true);
|
|
@@ -25515,6 +25534,18 @@
|
|
|
25515
25534
|
document.getElementById('last-button').style.display = 'none';
|
|
25516
25535
|
document.getElementById('first-button').style.display = 'none';
|
|
25517
25536
|
}
|
|
25537
|
+
|
|
25538
|
+
document.querySelectorAll('.jump-button').forEach((button) => {
|
|
25539
|
+
const jump = parseInt(button.dataset.jump);
|
|
25540
|
+
if (jump < 0) {
|
|
25541
|
+
button.disabled = sqlFetch.page === 0;
|
|
25542
|
+
} else {
|
|
25543
|
+
button.disabled = sqlFetch.page === sqlFetch.pageCount - 1;
|
|
25544
|
+
}
|
|
25545
|
+
const min = button.dataset.min ? parseInt(button.dataset.min) : 0;
|
|
25546
|
+
const max = button.dataset.max ? parseInt(button.dataset.max) : Infinity;
|
|
25547
|
+
button.style.display = sqlFetch.pageCount >= min && sqlFetch.pageCount <= max ? '' : 'none';
|
|
25548
|
+
});
|
|
25518
25549
|
}
|
|
25519
25550
|
|
|
25520
25551
|
window.addEventListener('popstate', function (event) {
|
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.59
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Dower
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: airbrake
|