solid_litequeen 0.13.0 → 0.14.0
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/app/controllers/solid_litequeen/databases_controller.rb +3 -4
- data/app/javascript/solid_litequeen/controllers/table_controller.js +5 -0
- data/app/views/layouts/solid_litequeen/application.html.erb +1 -0
- data/app/views/solid_litequeen/_loading-animation.html.erb +33 -0
- data/app/views/solid_litequeen/databases/_foreign-key-data.html.erb +2 -2
- data/app/views/solid_litequeen/databases/table_rows.html.erb +19 -12
- data/lib/solid_litequeen/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e081836bb4b55c274958ff1651135113d31715b32268fd854a11e67e10a91b6f
|
4
|
+
data.tar.gz: 4327661dff6e51c54cd30c7241be0e4b503ec7da76ba4a665e3151e96950b7d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a65cf5852f66de955f339439cba5586524725e0700dd31cbd40da2e7841124d3b08ab74ac20e33bf76684080dda521fb8cb94d136b5fc1c468295579b87d6a
|
7
|
+
data.tar.gz: fd57b58304f15313874925359ddd5b2f6003aacb6f727a6e63a500c536cab1d367ebbb8b5386a73c7500e9deafc4e8e61fe07ad2715e8c01c4b6ec29a61f0539
|
@@ -185,7 +185,7 @@ module SolidLitequeen
|
|
185
185
|
|
186
186
|
head :ok
|
187
187
|
end
|
188
|
-
|
188
|
+
|
189
189
|
def get_foreign_key_data
|
190
190
|
@database_id = params.expect(:database_id)
|
191
191
|
@table_name = params.expect(:table)
|
@@ -203,11 +203,10 @@ module SolidLitequeen
|
|
203
203
|
|
204
204
|
# Query the target table for the record matching the foreign key value
|
205
205
|
query = "SELECT * FROM #{@target_table} WHERE #{@target_field} = ? LIMIT 1"
|
206
|
-
@result = DynamicDatabase.connection.exec_query(query, "SQL", [@target_field_value])
|
206
|
+
@result = DynamicDatabase.connection.exec_query(query, "SQL", [ @target_field_value ])
|
207
|
+
|
207
208
|
|
208
|
-
|
209
209
|
render partial: "foreign-key-data"
|
210
|
-
|
211
210
|
end
|
212
211
|
end
|
213
212
|
end
|
@@ -161,6 +161,11 @@ export default class extends Controller {
|
|
161
161
|
targetTh.removeAttribute("data-column-order-about-to-be-swapped");
|
162
162
|
}
|
163
163
|
|
164
|
+
/**
|
165
|
+
*
|
166
|
+
* @param {MouseEvent} e
|
167
|
+
* @returns
|
168
|
+
*/
|
164
169
|
load_foreign_key_data(e) {
|
165
170
|
const foreign_key_data_dialog = document.querySelector(
|
166
171
|
"dialog#foreign-key-data",
|
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
<meta name="turbo-refresh-method" content="morph">
|
9
9
|
<meta name="turbo-refresh-scroll" content="preserve">
|
10
|
+
<meta name="view-transition" content="same-origin">
|
10
11
|
|
11
12
|
<%= stylesheet_link_tag "solid_litequeen/application", media: "all", "data-turbo-track": "reload" %>
|
12
13
|
<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
2
|
+
<svg width="120" height="30" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="<%= local_assigns[:class] %>">
|
3
|
+
<circle cx="15" cy="15" r="15">
|
4
|
+
<animate attributeName="r" from="15" to="15"
|
5
|
+
begin="0s" dur="0.8s"
|
6
|
+
values="15;9;15" calcMode="linear"
|
7
|
+
repeatCount="indefinite" />
|
8
|
+
<animate attributeName="fill-opacity" from="1" to="1"
|
9
|
+
begin="0s" dur="0.8s"
|
10
|
+
values="1;.5;1" calcMode="linear"
|
11
|
+
repeatCount="indefinite" />
|
12
|
+
</circle>
|
13
|
+
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
|
14
|
+
<animate attributeName="r" from="9" to="9"
|
15
|
+
begin="0s" dur="0.8s"
|
16
|
+
values="9;15;9" calcMode="linear"
|
17
|
+
repeatCount="indefinite" />
|
18
|
+
<animate attributeName="fill-opacity" from="0.5" to="0.5"
|
19
|
+
begin="0s" dur="0.8s"
|
20
|
+
values=".5;1;.5" calcMode="linear"
|
21
|
+
repeatCount="indefinite" />
|
22
|
+
</circle>
|
23
|
+
<circle cx="105" cy="15" r="15">
|
24
|
+
<animate attributeName="r" from="15" to="15"
|
25
|
+
begin="0s" dur="0.8s"
|
26
|
+
values="15;9;15" calcMode="linear"
|
27
|
+
repeatCount="indefinite" />
|
28
|
+
<animate attributeName="fill-opacity" from="1" to="1"
|
29
|
+
begin="0s" dur="0.8s"
|
30
|
+
values="1;.5;1" calcMode="linear"
|
31
|
+
repeatCount="indefinite" />
|
32
|
+
</circle>
|
33
|
+
</svg>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<turbo-frame id="foreign-key-data-frame">
|
1
|
+
<turbo-frame id="foreign-key-data-frame" >
|
2
2
|
|
3
3
|
|
4
4
|
<h1 class="text-lg text-center">
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<% @result.columns.zip(row).each do |column, value| %>
|
26
26
|
<tr>
|
27
27
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold"><%= column %></td>
|
28
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800"><%= value&.truncate(80) %></td>
|
28
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 in-aria-busy:blur"><%= value&.truncate(80) %></td>
|
29
29
|
</tr>
|
30
30
|
<% end %>
|
31
31
|
<% end %>
|
@@ -102,23 +102,30 @@
|
|
102
102
|
<% end %>
|
103
103
|
</tbody>
|
104
104
|
|
105
|
-
<dialog id="foreign-key-data"
|
106
|
-
<form method="submit" class="">
|
105
|
+
<dialog id="foreign-key-data" data-controller="dialog" class="w-[900px] m-auto overscroll-y-contain">
|
107
106
|
<div class="flex flex-row-reverse">
|
108
|
-
<
|
109
|
-
|
110
|
-
|
111
|
-
|
107
|
+
<form method="submit">
|
108
|
+
<button formmethod="dialog" class="cursor-pointer mr-4 mt-2 outline-none">
|
109
|
+
<%= image_tag "solid_litequeen/icons/x.svg", class: "size-5" %>
|
110
|
+
</button>
|
111
|
+
</form>
|
112
112
|
</div>
|
113
|
-
</form>
|
114
113
|
|
115
|
-
<div class="overflow-x-auto">
|
116
|
-
<turbo-frame id="foreign-key-data-frame" >
|
117
|
-
|
114
|
+
<div class="overflow-x-auto relative">
|
115
|
+
<turbo-frame id="foreign-key-data-frame" class="peer">
|
116
|
+
<%# loading animation for the first render %>
|
117
|
+
<div class="flex w-full h-52 items-center justify-center">
|
118
|
+
<%= render "solid_litequeen/loading-animation" %>
|
119
|
+
</div>
|
120
|
+
|
118
121
|
</turbo-frame>
|
119
|
-
</div>
|
120
|
-
|
121
122
|
|
123
|
+
<%# loading animation everytime we load a new foreign key data %>
|
124
|
+
<div class="hidden peer-aria-busy:flex absolute inset-0 w-full h-52 items-center justify-center">
|
125
|
+
<%= render "solid_litequeen/loading-animation" %>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
</div>
|
122
129
|
</dialog>
|
123
130
|
</table>
|
124
131
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_litequeen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vik Borges
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- app/models/solid_litequeen/application_record.rb
|
187
187
|
- app/views/layouts/solid_litequeen/application.html.erb
|
188
188
|
- app/views/solid_litequeen/_database-selector.html.erb
|
189
|
+
- app/views/solid_litequeen/_loading-animation.html.erb
|
189
190
|
- app/views/solid_litequeen/databases/_foreign-key-data.html.erb
|
190
191
|
- app/views/solid_litequeen/databases/_table-data-context-dialog.html.erb
|
191
192
|
- app/views/solid_litequeen/databases/_table-relationships-dialog.html.erb
|