sqlui 0.1.58 → 0.1.59

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0a7dab933454e7e153894eb7e0317680dd1f4aa88953480b31d94a825f95f10
4
- data.tar.gz: 6cf9998337f955912eb5a050dfd024bee292afef191a2ee639cda5552e86490c
3
+ metadata.gz: 6b06af3454b65600eacd42b1008e186c473736411fedaed471162af97d98f39f
4
+ data.tar.gz: 38c46eb311a518ea328acd959ca34c8e5d850c83fa9c1b98c663daef2356c334
5
5
  SHA512:
6
- metadata.gz: f0da91f85d1880eec8ef7d99e5858c49f61334dbabf7d8286b226f34ff9984d5faf30eb4c1be59ea810c4f45e7a148782eadd5d0fb4c488c96403d96d6257b84
7
- data.tar.gz: b1da77e8601b4a7c48bedadcb6e513ef7729893eaad9e30232d1dadb1d600d5ad6f127c28726eb009bbc6abc274369b1fe99d611dc69dae3d353db00c3ea4f59
6
+ metadata.gz: 320e438a5101b83a59691168f2673f82ffb35559b547a9e75e6278b9735c4880a3906b298ae576d89346218f3ff3543e7cd57e034dbbfa2c525b4a069ad337ab
7
+ data.tar.gz: 03d5d65cad39f143c56f205c1f55280d2ab269390191b0ea026300e1c422b896876c2e5cf0c9f0764ca712a50c9702fb222f93a584960bfe11762fbc4663a78f
data/.release-version CHANGED
@@ -1 +1 @@
1
- 0.1.58
1
+ 0.1.59
data/app/sqlui.rb CHANGED
@@ -6,7 +6,7 @@ require_relative 'version'
6
6
 
7
7
  # Main entry point.
8
8
  class Sqlui
9
- MAX_ROWS = 50_000
9
+ MAX_ROWS = 100_000
10
10
  MAX_BYTES = 10 * 1_024 * 1_024 # 10 MB
11
11
 
12
12
  def initialize(config_file)
data/app/views/sqlui.erb CHANGED
@@ -25,24 +25,24 @@
25
25
  </head>
26
26
 
27
27
  <body>
28
- <div id="loading-box" class="loading-box">
28
+ <div id="loading-box">
29
29
  </div>
30
30
 
31
- <div id="main-box" class="main-box" style="display:none">
32
- <div class="tabs-box">
33
- <h1 class="header"><a id="header-link">SQLUI</a></h1>
34
- <h1 id="server-name" class="server-name"></h1>
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="query-box tab-content-element graph-element query-element" style="display: none;">
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="submit-box tab-content-element graph-element query-element" style="display: none;">
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="result-box tab-content-element query-element" style="display: none;">
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="graph-box tab-content-element graph-element" style="display: none;">
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="fetch-sql-box tab-content-element graph-element query-element" style="display: none;">
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="saved-box tab-content-element saved-element" style="display: none;">
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="structure-box tab-content-element structure-element" style="display: none;">
83
+ <div id="structure-box" class="tab-content-element structure-element" style="display: none;">
84
84
  <div class="structure-wrapper">
85
- <select id="schemas" class="schemas" size="4">
85
+ <select id="schemas" size="4">
86
86
  </select>
87
- <select id="tables" class="tables" size="4">
87
+ <select id="tables" size="4">
88
88
  </select>
89
- <div id="table-info" class="table-info">
90
- <div id="columns" class="columns">
89
+ <div id="table-info">
90
+ <div id="columns">
91
91
  </div>
92
- <div id="indexes" class="indexes">
92
+ <div id="indexes">
93
93
  </div>
94
94
  </div>
95
95
  </div>
96
96
  </div>
97
97
 
98
- <div id="status-box" class="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="First" />
104
- <input id="prev-button" class="pagination-button" type="button" value="Prev" />
105
- <input id="next-button" class="pagination-button" type="button" value="Next" />
106
- <input id="last-button" class="pagination-button" type="button" value="Last" />
103
+ <input id="first-button" class="pagination-button" type="button" value="&laquo;" />
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="&lsaquo;" />
108
+ <input id="next-button" class="pagination-button" type="button" value="&rsaquo;" />
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="&raquo;" />
107
113
  </div>
108
114
  </div>
109
115
  </div>
@@ -20,7 +20,7 @@ p {
20
20
  font-size: 18px;
21
21
  }
22
22
 
23
- .loading-box {
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
- .main-box {
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
- .header, .server-name {
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
- .header {
53
+ #header {
54
54
  font-weight: bold;
55
55
  padding-left: 5px;
56
56
  }
57
57
 
58
- .header a {
58
+ #header a {
59
59
  text-decoration: none;
60
60
  color: #333
61
61
  }
62
62
 
63
- .server-name {
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
- .tabs-box {
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
- .query-box {
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
- .submit-box {
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, .submit-button:active, .cancel-button:active, .submit-dropdown-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
- .result-box, .fetch-sql-box, .saved-box, .graph-box, .structure-box {
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
- .fetch-sql-box {
276
+ #fetch-sql-box {
272
277
  justify-content: center;
273
278
  align-items: center;
274
279
  }
275
280
 
276
- .graph-box {
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
- .status-box {
356
- padding: 5px 15px;
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
- .tabs-box {
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
- .saved-box h2 {
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
- .saved-box p {
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
- .schemas, .tables {
429
+ #schemas, #tables {
431
430
  border: none;
432
431
  display: flex;
433
432
  min-width: 200px;
434
433
  }
435
434
 
436
- .table-info {
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
- .columns {
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
- .indexes {
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 10px;
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
+ }
@@ -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 = 500;
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
- addClickListener(document.getElementById('query-tab-button'), (event) => selectTab(event, 'query'));
24530
- addClickListener(document.getElementById('saved-tab-button'), (event) => selectTab(event, 'saved'));
24531
- addClickListener(document.getElementById('structure-tab-button'), (event) => selectTab(event, 'structure'));
24532
- addClickListener(document.getElementById('graph-tab-button'), (event) => selectTab(event, 'graph'));
24533
- addClickListener(document.getElementById('cancel-button'), (event) => clearResult());
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
- addClickListener(dropdownButton, () => dropdownContent.classList.toggle('submit-dropdown-content-show'));
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
- addClickListener(submitButtonCurrent, (event) => submitCurrent(event.target, event));
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
- addClickListener(submitButtonAll, (event) => submitAll(event.target, event));
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
- addClickListener(dropdownButtonCurrent, (event) => submitCurrent(event.target, event));
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
- addClickListener(dropdownAllButton, (event) => submitAll(event.target, event));
24558
+ addEventListener(dropdownAllButton, 'click', (event) => submitAll(event.target, event));
24558
24559
 
24559
24560
  const dropdownToggleButton = document.getElementById('submit-dropdown-button-toggle');
24560
- addClickListener(dropdownToggleButton, () => {
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
- addClickListener(document.getElementById('submit-dropdown-button-copy-csv'), (event) => {
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
- addClickListener(document.getElementById('submit-dropdown-button-copy-tsv'), (event) => {
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
- addClickListener(document.getElementById('first-button'), (event) => {
24577
+ addEventListener('#first-button', 'click', () => {
24577
24578
  window.sqlFetch.page = 0;
24578
24579
  displaySqlFetch(window.sqlFetch);
24579
24580
  });
24580
- addClickListener(document.getElementById('prev-button'), (event) => {
24581
+ addEventListener('#prev-button', 'click', () => {
24581
24582
  window.sqlFetch.page -= 1;
24582
24583
  displaySqlFetch(window.sqlFetch);
24583
24584
  });
24584
- addClickListener(document.getElementById('next-button'), (event) => {
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
- addClickListener(document.getElementById('last-button'), (event) => {
24603
+ addEventListener('#last-button', 'click', () => {
24589
24604
  window.sqlFetch.page = window.sqlFetch.pageCount - 1;
24590
24605
  displaySqlFetch(window.sqlFetch);
24591
24606
  });
24592
- addClickListener(document.getElementById('submit-dropdown-button-download-csv'), () => {
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
- document.addEventListener('click', function (event) {
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
- dropdownContent.addEventListener('focusout', function (event) {
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 addClickListener (element, func) {
24622
- element.addEventListener('click', (event) => func(event));
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
- addClickListener(viewLinkElement, (event) => {
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
- addClickListener(runLinkElement, (event) => {
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.58
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-10 00:00:00.000000000 Z
11
+ date: 2022-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake