solid_litequeen 0.19.3 → 0.20.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/README.md +1 -1
- data/app/assets/config/solid_litequeen_manifest.js +1 -0
- data/app/assets/stylesheets/solid_litequeen/tailwind.css +2 -0
- data/app/assets/tailwind/solid_litequeen/application.css +5 -0
- data/app/assets/tailwind/solid_litequeen/engine.css +267 -0
- data/app/javascript/solid_litequeen/controllers/command_palette_controller.js +5 -6
- data/app/javascript/solid_litequeen/controllers/table_relations_controller.js +17 -18
- data/app/javascript/solid_litequeen/vendor/dagre.min.js +3809 -0
- data/app/javascript/solid_litequeen/vendor/floating-ui-core.js +1 -0
- data/app/javascript/solid_litequeen/vendor/floating-ui-dom.js +1 -0
- data/app/javascript/solid_litequeen/vendor/joint.js +39629 -0
- data/app/views/layouts/solid_litequeen/application.html.erb +54 -67
- data/app/views/solid_litequeen/_command-palette.html.erb +46 -83
- data/app/views/solid_litequeen/_database-selector.html.erb +24 -26
- data/app/views/solid_litequeen/databases/_foreign-key-data.html.erb +31 -36
- data/app/views/solid_litequeen/databases/_table-data-context-dialog.html.erb +76 -22
- data/app/views/solid_litequeen/databases/_table-relationships-dialog.html.erb +43 -9
- data/app/views/solid_litequeen/databases/index.html.erb +67 -33
- data/app/views/solid_litequeen/databases/show.html.erb +49 -49
- data/app/views/solid_litequeen/databases/table_rows.html.erb +300 -232
- data/config/importmap.rb +0 -2
- data/lib/solid_litequeen/version.rb +1 -1
- metadata +22 -1
|
@@ -1,241 +1,309 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="space-y-6">
|
|
2
|
+
<div>
|
|
3
|
+
<div class="flex items-center gap-2 text-sm text-faint">
|
|
4
|
+
<%= link_to database_path(params[:database_id]), class: "inline-flex items-center gap-2 text-faint hover:text-[var(--accent)]" do %>
|
|
5
|
+
<%= image_tag "solid_litequeen/icons/database.svg", class: "size-4 icon-muted" %>
|
|
6
|
+
Database
|
|
7
|
+
<% end %>
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
<span class="text-faint">/</span>
|
|
10
|
+
<span class="font-medium text-[var(--text)]"><%= @table_name %></span>
|
|
11
|
+
</div>
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
<h1
|
|
14
|
+
class="
|
|
15
|
+
mt-3 text-2xl font-display font-semibold text-[var(--text)]
|
|
16
|
+
sm:text-3xl
|
|
17
|
+
"
|
|
18
|
+
>
|
|
19
|
+
<%= @table_name %> Rows
|
|
12
20
|
</h1>
|
|
13
21
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
</
|
|
22
|
+
<p class="mt-2 text-sm text-muted">
|
|
23
|
+
<%= pluralize(@row_count, "row") %> found
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="surface-card overflow-x-auto">
|
|
28
|
+
<div class="min-w-full inline-block align-middle">
|
|
29
|
+
<table
|
|
30
|
+
data-controller="table"
|
|
31
|
+
data-database_table_path="<%= database_table_rows_path %>"
|
|
32
|
+
data-set-table-order-path="<%= database_set_table_column_order_path(params[:database_id], @table_name) %>"
|
|
33
|
+
class="min-w-full text-sm"
|
|
34
|
+
>
|
|
35
|
+
<thead
|
|
36
|
+
class="
|
|
37
|
+
bg-[var(--surface-strong)] text-xs uppercase tracking-[0.2em]
|
|
38
|
+
text-faint
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<tr class="border-b border-[var(--border)]">
|
|
42
|
+
<% @data.columns.each_with_index do |column, index| %>
|
|
43
|
+
<th
|
|
44
|
+
draggable="true"
|
|
45
|
+
data-controller="orbit"
|
|
46
|
+
data-column-index="<%= index %>"
|
|
47
|
+
data-column-name="<%= column %>"
|
|
48
|
+
class="
|
|
49
|
+
px-6 py-3 text-left font-semibold hover:cursor-move
|
|
50
|
+
data-[is-dragging]:bg-[var(--drag-highlight)]
|
|
51
|
+
data-[column-order-about-to-be-swapped]:bg-[var(--swap-highlight)]
|
|
52
|
+
"
|
|
53
|
+
>
|
|
54
|
+
<% popover_id = "popover_#{column}_#{SecureRandom.hex(8)}"
|
|
55
|
+
anchor_name = "--anchor_#{popover_id}"
|
|
56
|
+
sort_arrow =
|
|
57
|
+
if @sort_column == column && @sort_direction == 'DESC'
|
|
58
|
+
'▼'
|
|
59
|
+
elsif @sort_column == column && @sort_direction == 'ASC'
|
|
60
|
+
'▲'
|
|
61
|
+
end %>
|
|
62
|
+
|
|
63
|
+
<div class="inline-flex items-center gap-2 whitespace-nowrap">
|
|
64
|
+
<button
|
|
65
|
+
type="button"
|
|
66
|
+
popovertarget="<%= popover_id %>"
|
|
67
|
+
data-orbit-target="planet"
|
|
68
|
+
class="
|
|
69
|
+
inline-flex size-6 items-center justify-center
|
|
70
|
+
rounded-full border border-[var(--border)]
|
|
71
|
+
bg-[var(--surface)] text-faint shadow-sm transition
|
|
72
|
+
hover:-translate-y-0.5 hover:text-[var(--accent)]
|
|
73
|
+
hover:shadow-md
|
|
74
|
+
"
|
|
75
|
+
style="anchor-name: <%= anchor_name %>;"
|
|
76
|
+
>
|
|
77
|
+
<%= image_tag "solid_litequeen/icons/info.svg", class: "size-3.5 icon-muted" %>
|
|
78
|
+
</button>
|
|
79
|
+
|
|
80
|
+
<%= link_to database_table_rows_path(
|
|
81
|
+
database_id: @database_id,
|
|
82
|
+
table: @table_name,
|
|
83
|
+
sort_column: column,
|
|
84
|
+
sort_direction: (@sort_column == column && @sort_direction == 'DESC') ? 'ASC' : 'DESC'
|
|
85
|
+
), class: "inline-flex items-center gap-1 text-[var(--text)] hover:text-[var(--accent)]" do %>
|
|
86
|
+
<span><%= column %></span>
|
|
17
87
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
88
|
+
<% if sort_arrow.present? %>
|
|
89
|
+
<span class="text-[10px] text-faint">
|
|
90
|
+
<%= sort_arrow %>
|
|
91
|
+
</span>
|
|
92
|
+
<% end %>
|
|
93
|
+
<% end %>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div
|
|
97
|
+
popover
|
|
98
|
+
id="<%= popover_id %>"
|
|
99
|
+
data-orbit-target="moon"
|
|
100
|
+
class="surface-card max-w-lg p-4"
|
|
101
|
+
style="position-anchor: <%= anchor_name %>;"
|
|
25
102
|
>
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<% if column_info&.dig(:indexes).present? %>
|
|
112
|
-
|
|
113
|
-
<tr class="border-b last:border-none border-base-content/10">
|
|
114
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content font-semibold"></td>
|
|
115
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content/80 "> </td>
|
|
116
|
-
</tr>
|
|
117
|
-
|
|
118
|
-
<% column_info&.dig(:indexes).each do |index| %>
|
|
119
|
-
<tr class="border-b last:border-none border-base-content/10">
|
|
120
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content font-semibold">Index Name</td>
|
|
121
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content/80">
|
|
122
|
-
<%= index[:name] %>
|
|
123
|
-
</td>
|
|
124
|
-
</tr>
|
|
125
|
-
<tr class="border-b last:border-none border-base-content/10">
|
|
126
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content font-semibold">Unique</td>
|
|
127
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-base-content/80">
|
|
128
|
-
<%= index[:unique] %>
|
|
129
|
-
</td>
|
|
130
|
-
</tr>
|
|
131
|
-
<% end %>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<% end %>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
</tbody>
|
|
139
|
-
</table>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<%# link to sort the columns %>
|
|
143
|
-
<%= link_to column,
|
|
144
|
-
database_table_rows_path(
|
|
145
|
-
database_id: @database_id,
|
|
146
|
-
table: @table_name,
|
|
147
|
-
sort_column: column,
|
|
148
|
-
sort_direction: (@sort_column == column && @sort_direction == 'DESC') ? 'ASC' : 'DESC'
|
|
149
|
-
), class: "" %>
|
|
150
|
-
<%= '▼' if @sort_column == column && @sort_direction == 'DESC' %>
|
|
151
|
-
<%= '▲' if @sort_column == column && @sort_direction == 'ASC' %>
|
|
152
|
-
</th>
|
|
153
|
-
<% end %>
|
|
154
|
-
</tr>
|
|
155
|
-
</thead>
|
|
156
|
-
|
|
157
|
-
<tbody class="main">
|
|
158
|
-
<% @data.rows.each do |row| %>
|
|
159
|
-
<tr class="border-b border-base-content/10 last:border-none hover:bg-base-100" >
|
|
160
|
-
<% row.each_with_index do |item, index| %>
|
|
161
|
-
<% truncated_item = item&.truncate(80) %>
|
|
162
|
-
<% column_name = @data.columns[index] %>
|
|
163
|
-
<% foreign_key = @columns_info[column_name]&.dig(:foreign_key) %>
|
|
164
|
-
<td
|
|
165
|
-
data-column="<%= column_name %>"
|
|
166
|
-
data-data_type="<%= @columns_info.dig(column_name).dig(:type) %>"
|
|
167
|
-
class="px-6 py-4 text-sm whitespace-nowrap"
|
|
168
|
-
>
|
|
169
|
-
|
|
170
|
-
<div class="flex justify-between gap-1">
|
|
171
|
-
|
|
172
|
-
<% enum_opts = @columns_info[column_name][:enum_options] %>
|
|
173
|
-
<% enum_label = enum_opts&.invert&.dig(item.to_i) if enum_opts.present? && item.present? %>
|
|
174
|
-
<span data-column_item title="<%= enum_label if enum_label %>"><%= truncated_item %></span>
|
|
175
|
-
|
|
176
|
-
<% if item.present? and foreign_key.present? %>
|
|
177
|
-
<button
|
|
178
|
-
data-action="click->table#load_foreign_key_data"
|
|
179
|
-
data-fk_target_table="<%= foreign_key[:to_table] %>"
|
|
180
|
-
data-fk_target_field="<%= foreign_key[:primary_key]%>"
|
|
181
|
-
data-fk_target_field_value="<%= truncated_item %>"
|
|
182
|
-
class="size-4 mt-0.5 hover:cursor-pointer flex-grow outline-none"
|
|
183
|
-
>
|
|
184
|
-
<%= image_tag "solid_litequeen/icons/spline.svg", class: "size-4 filter-cyan" %>
|
|
185
|
-
</button>
|
|
186
|
-
|
|
187
|
-
<% end %>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<%# TODO: we can use one dynamic modal instead and fetch the data. for now this works and is (s)crapy! %>
|
|
191
|
-
<% if truncated_item&.to_s&.ends_with?("...") %>
|
|
192
|
-
<% dialog_id = "#{column_name}_#{SecureRandom.hex(8)}_context_dialog" %>
|
|
193
|
-
|
|
194
|
-
<%= render "table-data-context-dialog", dialog_id: dialog_id, column_name: column_name, data: item %>
|
|
195
|
-
|
|
196
|
-
<button onclick="document.getElementById('<%= dialog_id %>').showModal()" class="cursor-pointer size-4 outline-none">
|
|
197
|
-
<%= image_tag "solid_litequeen/icons/circle-elipsis.svg", class: "opacity-60 size-4 dark:filter-white" %>
|
|
198
|
-
|
|
199
|
-
</button>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
<% end %>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
</div>
|
|
206
|
-
</td>
|
|
207
|
-
<% end %>
|
|
103
|
+
<table class="min-w-full text-xs">
|
|
104
|
+
<tbody class="divide-y divide-[var(--border)]">
|
|
105
|
+
<% column_info = @columns_info[column] %>
|
|
106
|
+
|
|
107
|
+
<tr>
|
|
108
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
109
|
+
Type
|
|
110
|
+
</td>
|
|
111
|
+
|
|
112
|
+
<td class="px-4 py-2 text-muted">
|
|
113
|
+
<%= column_info&.dig(:sql_type) %>
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
|
|
117
|
+
<tr>
|
|
118
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
119
|
+
Primary Key
|
|
120
|
+
</td>
|
|
121
|
+
|
|
122
|
+
<td class="px-4 py-2 text-muted">
|
|
123
|
+
<%= column_info&.dig(:is_primary_key) %>
|
|
124
|
+
</td>
|
|
125
|
+
</tr>
|
|
126
|
+
|
|
127
|
+
<tr>
|
|
128
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
129
|
+
Nullable
|
|
130
|
+
</td>
|
|
131
|
+
|
|
132
|
+
<td class="px-4 py-2 text-muted">
|
|
133
|
+
<%= column_info&.dig(:null) %>
|
|
134
|
+
</td>
|
|
135
|
+
</tr>
|
|
136
|
+
|
|
137
|
+
<tr>
|
|
138
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
139
|
+
Default
|
|
140
|
+
</td>
|
|
141
|
+
|
|
142
|
+
<td class="px-4 py-2 text-muted">
|
|
143
|
+
<%= column_info&.dig(:default) %>
|
|
144
|
+
</td>
|
|
145
|
+
</tr>
|
|
146
|
+
|
|
147
|
+
<% if column_info[:enum_options] %>
|
|
148
|
+
<tr>
|
|
149
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
150
|
+
Enum values
|
|
151
|
+
</td>
|
|
152
|
+
|
|
153
|
+
<td class="px-4 py-2 text-muted">
|
|
154
|
+
<%= column_info[:enum_options].map { |k, v| "#{k}: #{v}" }.join(', ') %>
|
|
155
|
+
</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<% end %>
|
|
158
|
+
|
|
159
|
+
<% if column_info&.dig(:foreign_key).present? %>
|
|
160
|
+
<tr>
|
|
161
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
162
|
+
Foreign Key
|
|
163
|
+
</td>
|
|
164
|
+
|
|
165
|
+
<td class="px-4 py-2 text-muted">
|
|
166
|
+
<%= column_info&.dig(:foreign_key).dig(:to_table) %>
|
|
167
|
+
>
|
|
168
|
+
<%= column_info&.dig(:foreign_key).dig(:primary_key) %>
|
|
169
|
+
</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
173
|
+
ON_UPDATE
|
|
174
|
+
</td>
|
|
175
|
+
|
|
176
|
+
<td class="px-4 py-2 text-muted">
|
|
177
|
+
<%= column_info&.dig(:foreign_key).dig(:on_update) %>
|
|
178
|
+
</td>
|
|
179
|
+
</tr>
|
|
180
|
+
<tr>
|
|
181
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
182
|
+
ON_DELETE
|
|
183
|
+
</td>
|
|
184
|
+
|
|
185
|
+
<td class="px-4 py-2 text-muted">
|
|
186
|
+
<%= column_info&.dig(:foreign_key).dig(:on_delete) %>
|
|
187
|
+
</td>
|
|
208
188
|
</tr>
|
|
189
|
+
<% end %>
|
|
190
|
+
|
|
191
|
+
<% if column_info&.dig(:indexes).present? %>
|
|
192
|
+
<% column_info&.dig(:indexes).each do |index| %>
|
|
193
|
+
<tr>
|
|
194
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
195
|
+
Index Name
|
|
196
|
+
</td>
|
|
197
|
+
|
|
198
|
+
<td class="px-4 py-2 text-muted">
|
|
199
|
+
<%= index[:name] %>
|
|
200
|
+
</td>
|
|
201
|
+
</tr>
|
|
202
|
+
|
|
203
|
+
<tr>
|
|
204
|
+
<td class="px-4 py-2 font-semibold text-[var(--text)]">
|
|
205
|
+
Unique
|
|
206
|
+
</td>
|
|
207
|
+
|
|
208
|
+
<td class="px-4 py-2 text-muted">
|
|
209
|
+
<%= index[:unique] %>
|
|
210
|
+
</td>
|
|
211
|
+
</tr>
|
|
212
|
+
<% end %>
|
|
213
|
+
<% end %>
|
|
214
|
+
</tbody>
|
|
215
|
+
</table>
|
|
216
|
+
</div>
|
|
217
|
+
</th>
|
|
218
|
+
<% end %>
|
|
219
|
+
</tr>
|
|
220
|
+
</thead>
|
|
221
|
+
|
|
222
|
+
<tbody class="divide-y divide-[var(--border)]">
|
|
223
|
+
<% @data.rows.each do |row| %>
|
|
224
|
+
<tr class="transition hover:bg-[var(--surface-muted)]">
|
|
225
|
+
<% row.each_with_index do |item, index| %>
|
|
226
|
+
<% truncated_item = item&.truncate(80) %>
|
|
227
|
+
<% column_name = @data.columns[index] %>
|
|
228
|
+
<% foreign_key = @columns_info[column_name]&.dig(:foreign_key) %>
|
|
229
|
+
|
|
230
|
+
<td
|
|
231
|
+
data-column="<%= column_name %>"
|
|
232
|
+
data-data_type="<%= @columns_info.dig(column_name).dig(:type) %>"
|
|
233
|
+
class="px-6 py-4 text-sm whitespace-nowrap"
|
|
234
|
+
>
|
|
235
|
+
<div class="flex justify-between gap-1">
|
|
236
|
+
<% enum_opts = @columns_info[column_name][:enum_options] %>
|
|
237
|
+
<% enum_label = enum_opts&.invert&.dig(item.to_i) if enum_opts.present? && item.present? %>
|
|
238
|
+
|
|
239
|
+
<span
|
|
240
|
+
data-column_item
|
|
241
|
+
title="<%= enum_label if enum_label %>"
|
|
242
|
+
>
|
|
243
|
+
<%= truncated_item %>
|
|
244
|
+
</span>
|
|
245
|
+
|
|
246
|
+
<% if item.present? && foreign_key.present? %>
|
|
247
|
+
<button
|
|
248
|
+
data-action="click->table#load_foreign_key_data"
|
|
249
|
+
data-fk_target_table="<%= foreign_key[:to_table] %>"
|
|
250
|
+
data-fk_target_field="<%= foreign_key[:primary_key] %>"
|
|
251
|
+
data-fk_target_field_value="<%= truncated_item %>"
|
|
252
|
+
class="size-4 mt-0.5 flex-grow outline-none"
|
|
253
|
+
>
|
|
254
|
+
<%= image_tag "solid_litequeen/icons/spline.svg", class: "size-4 filter-cyan" %>
|
|
255
|
+
</button>
|
|
209
256
|
<% end %>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
257
|
+
|
|
258
|
+
<% if truncated_item&.to_s&.ends_with?("...") %>
|
|
259
|
+
<% dialog_id = "#{column_name}_#{SecureRandom.hex(8)}_context_dialog" %>
|
|
260
|
+
<%= render "table-data-context-dialog", dialog_id: dialog_id, column_name: column_name, data: item %>
|
|
261
|
+
<button
|
|
262
|
+
onclick="document.getElementById('<%= dialog_id %>').showModal()"
|
|
263
|
+
class="cursor-pointer size-4 outline-none"
|
|
264
|
+
>
|
|
265
|
+
<%= image_tag "solid_litequeen/icons/circle-elipsis.svg", class: "size-4 icon-muted" %>
|
|
266
|
+
</button>
|
|
267
|
+
<% end %>
|
|
268
|
+
</div>
|
|
269
|
+
</td>
|
|
270
|
+
<% end %>
|
|
271
|
+
</tr>
|
|
272
|
+
<% end %>
|
|
273
|
+
</tbody>
|
|
274
|
+
|
|
275
|
+
<dialog
|
|
276
|
+
id="foreign-key-data"
|
|
277
|
+
data-controller="dialog"
|
|
278
|
+
class="slq-dialog w-[900px] m-auto overscroll-y-contain"
|
|
279
|
+
>
|
|
280
|
+
<div class="flex flex-row-reverse">
|
|
281
|
+
<button
|
|
282
|
+
data-action="click->dialog#close"
|
|
283
|
+
class="cursor-pointer mr-4 mt-3 outline-none"
|
|
284
|
+
>
|
|
285
|
+
<%= image_tag "solid_litequeen/icons/x.svg", class: "size-5 icon-muted" %>
|
|
286
|
+
</button>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<div class="overflow-x-auto relative">
|
|
290
|
+
<turbo-frame id="foreign-key-data-frame" class="peer">
|
|
291
|
+
<div class="flex h-52 w-full items-center justify-center">
|
|
292
|
+
<%= render "solid_litequeen/loading-animation" %>
|
|
293
|
+
</div>
|
|
294
|
+
</turbo-frame>
|
|
295
|
+
|
|
296
|
+
<div
|
|
297
|
+
class="
|
|
298
|
+
hidden peer-aria-busy:flex absolute inset-0 h-52 w-full
|
|
299
|
+
items-center justify-center
|
|
300
|
+
"
|
|
301
|
+
>
|
|
302
|
+
<%= render "solid_litequeen/loading-animation" %>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</dialog>
|
|
306
|
+
</table>
|
|
240
307
|
</div>
|
|
241
|
-
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
data/config/importmap.rb
CHANGED
|
@@ -5,7 +5,5 @@ pin "application", to: "solid_litequeen/application.js", preload: true
|
|
|
5
5
|
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
|
6
6
|
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
|
7
7
|
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
|
8
|
-
pin " @joint/core", to: "join.js", preload: false
|
|
9
|
-
pin " @dagrejs/dagre", to: "dagre.min.js", preload: false
|
|
10
8
|
pin_all_from SolidLitequeen::Engine.root.join("app/javascript/solid_litequeen/controllers"), under: "controllers", to: "solid_litequeen/controllers"
|
|
11
9
|
# pin_all_from SolidLitequeen::Engine.root.join("app/javascript/solid_litequeen/helpers"), under: "helpers", to: "solid_litequeen/helpers"
|
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.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vik Borges
|
|
@@ -79,6 +79,20 @@ dependencies:
|
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: '0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: tailwindcss-rails
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '4.0'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '4.0'
|
|
82
96
|
- !ruby/object:Gem::Dependency
|
|
83
97
|
name: debug
|
|
84
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -173,6 +187,9 @@ files:
|
|
|
173
187
|
- app/assets/images/solid_litequeen/icons/workflow.svg
|
|
174
188
|
- app/assets/images/solid_litequeen/icons/x.svg
|
|
175
189
|
- app/assets/stylesheets/solid_litequeen/application.css
|
|
190
|
+
- app/assets/stylesheets/solid_litequeen/tailwind.css
|
|
191
|
+
- app/assets/tailwind/solid_litequeen/application.css
|
|
192
|
+
- app/assets/tailwind/solid_litequeen/engine.css
|
|
176
193
|
- app/controllers/solid_litequeen/application_controller.rb
|
|
177
194
|
- app/controllers/solid_litequeen/databases_controller.rb
|
|
178
195
|
- app/helpers/solid_litequeen/application_helper.rb
|
|
@@ -186,6 +203,10 @@ files:
|
|
|
186
203
|
- app/javascript/solid_litequeen/controllers/orbit_controller.js
|
|
187
204
|
- app/javascript/solid_litequeen/controllers/table_controller.js
|
|
188
205
|
- app/javascript/solid_litequeen/controllers/table_relations_controller.js
|
|
206
|
+
- app/javascript/solid_litequeen/vendor/dagre.min.js
|
|
207
|
+
- app/javascript/solid_litequeen/vendor/floating-ui-core.js
|
|
208
|
+
- app/javascript/solid_litequeen/vendor/floating-ui-dom.js
|
|
209
|
+
- app/javascript/solid_litequeen/vendor/joint.js
|
|
189
210
|
- app/jobs/solid_litequeen/application_job.rb
|
|
190
211
|
- app/mailers/solid_litequeen/application_mailer.rb
|
|
191
212
|
- app/models/solid_litequeen/application_record.rb
|