solid_litequeen 0.16.0 → 0.16.2
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/javascript/solid_litequeen/controllers/table_controller.js +4 -1
- data/app/javascript/solid_litequeen/controllers/table_relations_controller.js +4 -4
- data/app/views/layouts/solid_litequeen/application.html.erb +10 -2
- data/app/views/solid_litequeen/databases/_table-relationships-dialog.html.erb +2 -2
- data/app/views/solid_litequeen/databases/index.html.erb +1 -1
- data/app/views/solid_litequeen/databases/table_rows.html.erb +17 -17
- data/lib/solid_litequeen/version.rb +1 -1
- 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: f40814d5e16a26ed2f83b9b4b52f34afe9fdd87078137fe84423435fd3c20fdb
|
4
|
+
data.tar.gz: 86412938606fb7d1acf1e8ed750db2176a78be31ffbeefd1207df4ef91392825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea113b266f213cb732137edca2e7537c67be37613fd71699636d322c0dd0e4ee4c7350e5f850bc157032573866606aabaae5133f25f5139adc5ddb0b7902f620
|
7
|
+
data.tar.gz: b430c074cc26aa75c79e226caec463bb88fa9bc82591cf7cf8f8c044bd90ce6e86c9daf431725485dbe5ebd22bbe802d4d1e949f86ec0df824f46d52a8a7ce7b
|
@@ -181,7 +181,10 @@ export default class extends Controller {
|
|
181
181
|
const fk_target_field_value =
|
182
182
|
fk_data_dialog_button.dataset.fk_target_field_value;
|
183
183
|
|
184
|
-
|
184
|
+
// Extract just the path without any query parameters
|
185
|
+
const clean_database_table_path = new URL(this.element.dataset.database_table_path, window.location.origin).pathname;
|
186
|
+
|
187
|
+
const new_frame_src = `${clean_database_table_path}/foreign-key-data/${fk_target_table}/${fk_target_field}/${fk_target_field_value}`;
|
185
188
|
|
186
189
|
// if the src didn't change let's just show what we have
|
187
190
|
if (foreign_key_data_frame.src) {
|
@@ -21,7 +21,7 @@ export default class extends Controller {
|
|
21
21
|
gridSize: 10,
|
22
22
|
drawGrid: true,
|
23
23
|
background: {
|
24
|
-
color: "
|
24
|
+
color: "var(--color-paper-background)",
|
25
25
|
},
|
26
26
|
interactive: (cellView) => {
|
27
27
|
// If this cell is embedded (a field node),
|
@@ -68,7 +68,7 @@ export default class extends Controller {
|
|
68
68
|
target: { id: targetId },
|
69
69
|
attrs: {
|
70
70
|
line: {
|
71
|
-
stroke: "
|
71
|
+
stroke: "var(--color-paper-links)",
|
72
72
|
strokeWidth: 2,
|
73
73
|
targetMarker: {
|
74
74
|
type: "path",
|
@@ -128,13 +128,13 @@ export default class extends Controller {
|
|
128
128
|
size: { width: width, height: fieldHeight },
|
129
129
|
attrs: {
|
130
130
|
body: {
|
131
|
-
fill: "
|
131
|
+
fill: "var(--color-paper-background)",
|
132
132
|
strokeWidth: 1,
|
133
133
|
stroke: "#ddd",
|
134
134
|
},
|
135
135
|
label: {
|
136
136
|
text: field,
|
137
|
-
fill: "
|
137
|
+
fill: "var(--color-text)",
|
138
138
|
fontSize: 14,
|
139
139
|
},
|
140
140
|
},
|
@@ -21,17 +21,25 @@
|
|
21
21
|
|
22
22
|
--color-background: var(--color-slate-50);
|
23
23
|
--color-background-light: var(--color-white);
|
24
|
-
--color-border-muted: ()
|
24
|
+
--color-border-muted: var(--color-slate-200);
|
25
25
|
--color-text: var(--color-gray-900);
|
26
26
|
--color-text-muted: var(--color-gray-500);
|
27
|
+
--color-background-secondary: var(--color-slate-50);
|
28
|
+
/* paper is the graph generated by joint.js. */
|
29
|
+
--color-paper-background: var(--color-slate-50);
|
30
|
+
--color-paper-links: var(--color-slate-600);
|
27
31
|
}
|
28
32
|
|
29
33
|
@media (prefers-color-scheme: dark) {
|
30
34
|
:root {
|
31
35
|
--color-background: var(--color-slate-900);
|
32
36
|
--color-background-light: var(--color-slate-800);
|
33
|
-
--color-text: var(--color-slate-
|
37
|
+
--color-text: var(--color-slate-300);
|
34
38
|
--color-text-muted: var(--color-gray-400);
|
39
|
+
--color-background-secondary: var(--color-slate-300);
|
40
|
+
/* paper is the graph generated by joint.js. */
|
41
|
+
--color-paper-background: var(--color-slate-600);
|
42
|
+
--color-paper-links: var(--color-slate-300);
|
35
43
|
}
|
36
44
|
}
|
37
45
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<dialog id="table_relationships" data-controller="dialog table-relations"
|
1
|
+
<dialog id="table_relationships" data-controller="dialog table-relations" data-relations="<%= @table_relations.to_json %>" class="dark:bg-[var(--color-background-light)] dark:border dark:border-gray-50/20 rounded w-[1000px] h-full m-auto overscroll-y-contain">
|
2
2
|
<div class="flex flex-row-reverse">
|
3
3
|
<button data-action="click->dialog#close" class="cursor-pointer mr-4 mt-2 outline-none">
|
4
4
|
<%= image_tag "solid_litequeen/icons/x.svg", class: "size-5 dark:filter-white" %>
|
@@ -7,6 +7,6 @@
|
|
7
7
|
<h1 class=" text-center mt-4">Table Relationships</h1>
|
8
8
|
|
9
9
|
<div class="w-full p-4 mx-auto overflow-x-auto">
|
10
|
-
<div id="paper" class="m-auto my-10 w-full h-[600px] border rounded"></div>
|
10
|
+
<div id="paper" class="m-auto my-10 w-full h-[600px] border border-gray-200 dark:border-gray-50/20 rounded"></div>
|
11
11
|
</div>
|
12
12
|
</dialog>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% if available_databases.any? %>
|
10
10
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
11
11
|
<% available_databases.each do |db| %>
|
12
|
-
<a href="<%= database_path(Base64.urlsafe_encode64(db.database)) %>" class="block bg-white rounded-lg shadow-sm border border-gray-200 hover:shadow-md transition duration-150 overflow-hidden">
|
12
|
+
<a href="<%= database_path(Base64.urlsafe_encode64(db.database)) %>" class="block bg-white dark:bg-[var(--color-background-secondary)] rounded-lg shadow-sm border border-gray-200 hover:shadow-md transition duration-150 overflow-hidden">
|
13
13
|
<div class="p-5">
|
14
14
|
<div class="flex items-center justify-between mb-2">
|
15
15
|
<h2 class="text-lg font-semibold text-gray-900 truncate"><%= db.name %></h2>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
class="min-w-full relative"
|
25
25
|
>
|
26
26
|
<thead class="">
|
27
|
-
<tr class="bg-gray-100 dark:bg-[var(--color-background-light)] border-b border-gray-200">
|
27
|
+
<tr class="bg-gray-100 dark:bg-[var(--color-background-light)] border-b border-gray-200 dark:border-gray-50/20">
|
28
28
|
<% @data.columns.each_with_index do |column, index| %>
|
29
29
|
<th
|
30
30
|
draggable="true"
|
@@ -40,8 +40,8 @@
|
|
40
40
|
<%= image_tag "solid_litequeen/icons/info.svg", class: "size-3.5 dark:filter-white" %>
|
41
41
|
</button>
|
42
42
|
|
43
|
-
<div popover id="<%= popover_id %>" class="max-w-lg min-h-10 bg-gray-100 dark:bg-[var(--color-background)] border-gray-400
|
44
|
-
<table class="min-w-full divide-y divide-gray-200 border border-gray-200">
|
43
|
+
<div popover id="<%= popover_id %>" class="max-w-lg min-h-10 bg-gray-100 dark:bg-[var(--color-background)] border-gray-400 dark:border-gray-200/50 border p-4 rounded-md" style="position-anchor: --anchor_<%= popover_id%>; top: anchor(--anchor_<%= popover_id%> bottom); left: anchor(--anchor_<%= popover_id%> right);">
|
44
|
+
<table class="min-w-full divide-y divide-gray-200 black:divide-gray-50/20 border border-gray-200 dark:border-gray-50/20">
|
45
45
|
|
46
46
|
<tbody class="bg-white dark:dark:bg-[var(--color-background-light)] divide-y divide-gray-200 dark:divide-gray-200/50 ">
|
47
47
|
<% column_info = @columns_info[column] %>
|
@@ -69,13 +69,13 @@
|
|
69
69
|
<% if column_info&.dig(:foreign_key).present? %>
|
70
70
|
|
71
71
|
<tr>
|
72
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
73
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
72
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold"></td>
|
73
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "> </td>
|
74
74
|
</tr>
|
75
75
|
|
76
76
|
<tr>
|
77
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
78
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
77
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Foreign Key</td>
|
78
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80">
|
79
79
|
<%= column_info&.dig(:foreign_key).dig(:to_table) %>
|
80
80
|
>
|
81
81
|
<%= column_info&.dig(:foreign_key).dig(:primary_key) %>
|
@@ -83,13 +83,13 @@
|
|
83
83
|
</tr>
|
84
84
|
|
85
85
|
<tr>
|
86
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
87
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
86
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">ON_UPDATE</td>
|
87
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80"><%= column_info&.dig(:foreign_key).dig(:on_update) %></td>
|
88
88
|
</tr>
|
89
89
|
|
90
90
|
<tr>
|
91
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
92
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
91
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">ON_DELETE</td>
|
92
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80"><%= column_info&.dig(:foreign_key).dig(:on_delete) %></td>
|
93
93
|
</tr>
|
94
94
|
|
95
95
|
<% end %>
|
@@ -97,20 +97,20 @@
|
|
97
97
|
<% if column_info&.dig(:indexes).present? %>
|
98
98
|
|
99
99
|
<tr>
|
100
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
101
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
100
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold"></td>
|
101
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "> </td>
|
102
102
|
</tr>
|
103
103
|
|
104
104
|
<% column_info&.dig(:indexes).each do |index| %>
|
105
105
|
<tr>
|
106
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
107
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
106
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Index Name</td>
|
107
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80">
|
108
108
|
<%= index[:name] %>
|
109
109
|
</td>
|
110
110
|
</tr>
|
111
111
|
<tr>
|
112
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
113
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
112
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Unique</td>
|
113
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80">
|
114
114
|
<%= index[:unique] %>
|
115
115
|
</td>
|
116
116
|
</tr>
|
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.16.
|
4
|
+
version: 0.16.2
|
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-
|
11
|
+
date: 2025-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|