solid_litequeen 0.13.0 → 0.13.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 133668d3a4340adb9111ea7e7e9aeea464173c2e87839e4dad82a2b5751e4058
4
- data.tar.gz: 2d84c8ffef4315afcc3ac17bfa06f086efc8923c358d5ebf358daeb3438b057a
3
+ metadata.gz: 52bfc6916fed8002c0b9151366f26b381ebf6a24209457fe6e77bf2035778cc4
4
+ data.tar.gz: 379b3b67db8b7f081c70567c2e86427a3307e99f673380ca61a51c47415f5202
5
5
  SHA512:
6
- metadata.gz: ae9e8e0f6b912011d11d857318d005dfe6f70850997ece81a48c529d277f9ac7c3832b7e1144f39fb51c964d0788a00fa8e9e7adf1e54c0b1912dc525b2e12a6
7
- data.tar.gz: 73d39ca407117d57fea0ab2c753342fada254c6eda13816ef5d3806b84ee60f861f4d2f13257d8e885d2c3f8b7f824dfe03c3ca5cd0d62cfff4fa9a0e44e32db
6
+ metadata.gz: 1c981a17c29cf6d884644a989e15f96f495f0cd93a2a050ebac3ecf7ff1092035f24069100f008454364a57359d19c219b58c9433549a5563ed50bfe024b6c5e
7
+ data.tar.gz: f7edab2c355f6870cd4a86aeec2800119bbffbf57a7172e8ba49ef0152a2f897f64d7927ad353a9a2498f845d54309c837fe4c3aa9244a746d547e6c815682fc
@@ -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",
@@ -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,7 +102,7 @@
102
102
  <% end %>
103
103
  </tbody>
104
104
 
105
- <dialog id="foreign-key-data" data-controller="dialog" class="w-[900px] m-auto overscroll-y-contain">
105
+ <dialog id="foreign-key-data" data-controller="dialog" class="w-[900px] m-auto overscroll-y-contain">
106
106
  <form method="submit" class="">
107
107
  <div class="flex flex-row-reverse">
108
108
  <button formmethod="dialog" class="cursor-pointer mr-4 mt-2 outline-none">
@@ -112,13 +112,21 @@
112
112
  </div>
113
113
  </form>
114
114
 
115
- <div class="overflow-x-auto">
116
- <turbo-frame id="foreign-key-data-frame" >
117
- <h1>loading...</h1>
115
+ <div class="overflow-x-auto relative">
116
+ <turbo-frame id="foreign-key-data-frame" class="peer">
117
+ <%# loading animation for the first render %>
118
+ <div class="flex w-full h-52 items-center justify-center">
119
+ <%= render "solid_litequeen/loading-animation" %>
120
+ </div>
121
+
118
122
  </turbo-frame>
119
- </div>
120
-
121
123
 
124
+ <%# loading animation everytime we load a new foreign key data %>
125
+ <div class="hidden peer-aria-busy:flex absolute inset-0 w-full h-52 items-center justify-center">
126
+ <%= render "solid_litequeen/loading-animation" %>
127
+ </div>
128
+
129
+ </div>
122
130
  </dialog>
123
131
  </table>
124
132
 
@@ -1,3 +1,3 @@
1
1
  module SolidLitequeen
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_litequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vik Borges
@@ -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