mensa 0.2.2 → 0.2.4
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/.devcontainer/compose.yaml +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.gitignore +2 -0
- data/Gemfile +10 -1
- data/Gemfile.lock +145 -81
- data/Procfile +2 -2
- data/README.md +60 -8
- data/app/assets/stylesheets/mensa/application.css +1 -1
- data/app/components/mensa/add_filter/component.html.slim +2 -2
- data/app/components/mensa/filter_list/component.html.slim +1 -1
- data/app/components/mensa/view/paging.css +1 -1
- data/app/components/mensa/views/component.css +10 -1
- data/app/components/mensa/views/component.html.slim +2 -2
- data/app/components/mensa/views/component.rb +1 -1
- data/app/components/mensa/views/component_controller.js +22 -0
- data/app/controllers/mensa/tables_controller.rb +9 -11
- data/app/javascript/mensa/controllers/index.js +3 -0
- data/app/tables/mensa/action.rb +1 -1
- data/app/tables/mensa/base.rb +10 -3
- data/app/tables/mensa/config/table_dsl.rb +9 -2
- data/app/tables/mensa/config/view_dsl.rb +9 -0
- data/app/tables/mensa/system_view.rb +25 -0
- data/app/views/mensa/tables/show.html.slim +0 -3
- data/bin/overmind +27 -0
- data/bin/setup +5 -2
- data/db/migrate/20251112143558_add_description_to_table_view.rb +6 -0
- data/docs/filters.png +0 -0
- data/docs/table.png +0 -0
- data/lib/mensa/version.rb +1 -1
- data/mensa.gemspec +21 -21
- data/package-lock.json +4967 -0
- data/package.json +2 -2
- data/rubocop.yml +94 -0
- metadata +25 -4
- data/app/views/mensa/tables/index.html.slim +0 -93
- data/yarn.lock +0 -837
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7b9a5dec3359255923794b7bdfd7b0cec906b52748b716da89607b808fac351
|
|
4
|
+
data.tar.gz: 5551eb56bb39d24c96d266d3e18b5869066ea0128ae53f40818f579480b8f747
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44287cc7a421ce54a9a7ec8185fa5f73de4e16a69ce930cde7eb2fa72f6f13dc9f86d541851362752f3f45daf5872455775493129e18eef3c38ec5239feed169
|
|
7
|
+
data.tar.gz: c7f03bdcdb3dbe0640e83097d7f6fca629fe69fa3ec65d6b8315f498fbe0e9fc5e633ef99a94d699fc223fc576c58fb8512dd6ac0684655a43b31b282e5353f9
|
data/.devcontainer/compose.yaml
CHANGED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
|
@@ -7,9 +7,18 @@ gemspec
|
|
|
7
7
|
|
|
8
8
|
gem "puma"
|
|
9
9
|
gem "sprockets-rails"
|
|
10
|
-
gem "satis", "~> 2"
|
|
10
|
+
gem "satis", "~> 2"
|
|
11
11
|
gem "pry"
|
|
12
12
|
gem "capybara", "~> 3.40"
|
|
13
13
|
gem "selenium-webdriver", "~> 4.17"
|
|
14
14
|
gem "slim", "~> 5.2"
|
|
15
15
|
gem "debug"
|
|
16
|
+
gem "overmind", require: false
|
|
17
|
+
gem "rack-mini-profiler"
|
|
18
|
+
|
|
19
|
+
group :development, :test do
|
|
20
|
+
gem "standard", require: false
|
|
21
|
+
gem "rubocop-rails", require: false
|
|
22
|
+
gem "ruby-lsp", require: false
|
|
23
|
+
gem "ruby-lsp-rails", require: false
|
|
24
|
+
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
GIT
|
|
2
|
-
remote: git@github.com:entdec/satis.git
|
|
3
|
-
revision: 1ef5f70700a755f01ed49168929200b2aaec792d
|
|
4
|
-
branch: main
|
|
5
|
-
specs:
|
|
6
|
-
satis (2.2.1)
|
|
7
|
-
browser
|
|
8
|
-
diffy
|
|
9
|
-
importmap-rails
|
|
10
|
-
jsonb_accessor (~> 1.4)
|
|
11
|
-
rails (>= 6)
|
|
12
|
-
stimulus-rails
|
|
13
|
-
tailwindcss-rails
|
|
14
|
-
turbo-rails
|
|
15
|
-
view_component
|
|
16
|
-
|
|
17
1
|
PATH
|
|
18
2
|
remote: .
|
|
19
3
|
specs:
|
|
20
|
-
mensa (0.2.
|
|
4
|
+
mensa (0.2.3)
|
|
21
5
|
caxlsx_rails (~> 0)
|
|
22
6
|
importmap-rails
|
|
23
7
|
pagy (>= 43)
|
|
@@ -27,35 +11,34 @@ PATH
|
|
|
27
11
|
tailwindcss-rails (~> 3.3)
|
|
28
12
|
textacular (>= 5)
|
|
29
13
|
turbo-rails
|
|
14
|
+
view_component (~> 3.11)
|
|
30
15
|
|
|
31
16
|
GEM
|
|
32
17
|
remote: https://rubygems.org/
|
|
33
18
|
specs:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
actionpack (= 8.1.1)
|
|
38
|
-
activesupport (= 8.1.1)
|
|
19
|
+
actioncable (8.0.4)
|
|
20
|
+
actionpack (= 8.0.4)
|
|
21
|
+
activesupport (= 8.0.4)
|
|
39
22
|
nio4r (~> 2.0)
|
|
40
23
|
websocket-driver (>= 0.6.1)
|
|
41
24
|
zeitwerk (~> 2.6)
|
|
42
|
-
actionmailbox (8.
|
|
43
|
-
actionpack (= 8.
|
|
44
|
-
activejob (= 8.
|
|
45
|
-
activerecord (= 8.
|
|
46
|
-
activestorage (= 8.
|
|
47
|
-
activesupport (= 8.
|
|
25
|
+
actionmailbox (8.0.4)
|
|
26
|
+
actionpack (= 8.0.4)
|
|
27
|
+
activejob (= 8.0.4)
|
|
28
|
+
activerecord (= 8.0.4)
|
|
29
|
+
activestorage (= 8.0.4)
|
|
30
|
+
activesupport (= 8.0.4)
|
|
48
31
|
mail (>= 2.8.0)
|
|
49
|
-
actionmailer (8.
|
|
50
|
-
actionpack (= 8.
|
|
51
|
-
actionview (= 8.
|
|
52
|
-
activejob (= 8.
|
|
53
|
-
activesupport (= 8.
|
|
32
|
+
actionmailer (8.0.4)
|
|
33
|
+
actionpack (= 8.0.4)
|
|
34
|
+
actionview (= 8.0.4)
|
|
35
|
+
activejob (= 8.0.4)
|
|
36
|
+
activesupport (= 8.0.4)
|
|
54
37
|
mail (>= 2.8.0)
|
|
55
38
|
rails-dom-testing (~> 2.2)
|
|
56
|
-
actionpack (8.
|
|
57
|
-
actionview (= 8.
|
|
58
|
-
activesupport (= 8.
|
|
39
|
+
actionpack (8.0.4)
|
|
40
|
+
actionview (= 8.0.4)
|
|
41
|
+
activesupport (= 8.0.4)
|
|
59
42
|
nokogiri (>= 1.8.5)
|
|
60
43
|
rack (>= 2.2.4)
|
|
61
44
|
rack-session (>= 1.0.1)
|
|
@@ -63,43 +46,42 @@ GEM
|
|
|
63
46
|
rails-dom-testing (~> 2.2)
|
|
64
47
|
rails-html-sanitizer (~> 1.6)
|
|
65
48
|
useragent (~> 0.16)
|
|
66
|
-
actiontext (8.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
activesupport (= 8.1.1)
|
|
49
|
+
actiontext (8.0.4)
|
|
50
|
+
actionpack (= 8.0.4)
|
|
51
|
+
activerecord (= 8.0.4)
|
|
52
|
+
activestorage (= 8.0.4)
|
|
53
|
+
activesupport (= 8.0.4)
|
|
72
54
|
globalid (>= 0.6.0)
|
|
73
55
|
nokogiri (>= 1.8.5)
|
|
74
|
-
actionview (8.
|
|
75
|
-
activesupport (= 8.
|
|
56
|
+
actionview (8.0.4)
|
|
57
|
+
activesupport (= 8.0.4)
|
|
76
58
|
builder (~> 3.1)
|
|
77
59
|
erubi (~> 1.11)
|
|
78
60
|
rails-dom-testing (~> 2.2)
|
|
79
61
|
rails-html-sanitizer (~> 1.6)
|
|
80
|
-
activejob (8.
|
|
81
|
-
activesupport (= 8.
|
|
62
|
+
activejob (8.0.4)
|
|
63
|
+
activesupport (= 8.0.4)
|
|
82
64
|
globalid (>= 0.3.6)
|
|
83
|
-
activemodel (8.
|
|
84
|
-
activesupport (= 8.
|
|
85
|
-
activerecord (8.
|
|
86
|
-
activemodel (= 8.
|
|
87
|
-
activesupport (= 8.
|
|
65
|
+
activemodel (8.0.4)
|
|
66
|
+
activesupport (= 8.0.4)
|
|
67
|
+
activerecord (8.0.4)
|
|
68
|
+
activemodel (= 8.0.4)
|
|
69
|
+
activesupport (= 8.0.4)
|
|
88
70
|
timeout (>= 0.4.0)
|
|
89
|
-
activestorage (8.
|
|
90
|
-
actionpack (= 8.
|
|
91
|
-
activejob (= 8.
|
|
92
|
-
activerecord (= 8.
|
|
93
|
-
activesupport (= 8.
|
|
71
|
+
activestorage (8.0.4)
|
|
72
|
+
actionpack (= 8.0.4)
|
|
73
|
+
activejob (= 8.0.4)
|
|
74
|
+
activerecord (= 8.0.4)
|
|
75
|
+
activesupport (= 8.0.4)
|
|
94
76
|
marcel (~> 1.0)
|
|
95
|
-
activesupport (8.
|
|
77
|
+
activesupport (8.0.4)
|
|
96
78
|
base64
|
|
79
|
+
benchmark (>= 0.3)
|
|
97
80
|
bigdecimal
|
|
98
81
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
99
82
|
connection_pool (>= 2.2.5)
|
|
100
83
|
drb
|
|
101
84
|
i18n (>= 1.6, < 2)
|
|
102
|
-
json
|
|
103
85
|
logger (>= 1.4.2)
|
|
104
86
|
minitest (>= 5.1)
|
|
105
87
|
securerandom (>= 0.3)
|
|
@@ -107,7 +89,9 @@ GEM
|
|
|
107
89
|
uri (>= 0.13.1)
|
|
108
90
|
addressable (2.8.7)
|
|
109
91
|
public_suffix (>= 2.0.2, < 7.0)
|
|
92
|
+
ast (2.4.3)
|
|
110
93
|
base64 (0.3.0)
|
|
94
|
+
benchmark (0.5.0)
|
|
111
95
|
bigdecimal (3.3.1)
|
|
112
96
|
browser (6.2.0)
|
|
113
97
|
builder (3.3.0)
|
|
@@ -154,11 +138,13 @@ GEM
|
|
|
154
138
|
pp (>= 0.6.0)
|
|
155
139
|
rdoc (>= 4.0.0)
|
|
156
140
|
reline (>= 0.4.2)
|
|
157
|
-
json (2.
|
|
141
|
+
json (2.16.0)
|
|
158
142
|
jsonb_accessor (1.4)
|
|
159
143
|
activerecord (>= 6.1)
|
|
160
144
|
activesupport (>= 6.1)
|
|
161
145
|
pg (>= 0.18.1)
|
|
146
|
+
language_server-protocol (3.17.0.5)
|
|
147
|
+
lint_roller (1.1.0)
|
|
162
148
|
logger (1.7.0)
|
|
163
149
|
loofah (2.24.1)
|
|
164
150
|
crass (~> 1.0.2)
|
|
@@ -173,7 +159,7 @@ GEM
|
|
|
173
159
|
matrix (0.4.3)
|
|
174
160
|
method_source (1.1.0)
|
|
175
161
|
mini_mime (1.1.5)
|
|
176
|
-
minitest (5.26.
|
|
162
|
+
minitest (5.26.1)
|
|
177
163
|
net-imap (0.5.12)
|
|
178
164
|
date
|
|
179
165
|
net-protocol
|
|
@@ -200,9 +186,18 @@ GEM
|
|
|
200
186
|
racc (~> 1.4)
|
|
201
187
|
nokogiri (1.18.10-x86_64-linux-musl)
|
|
202
188
|
racc (~> 1.4)
|
|
203
|
-
|
|
189
|
+
overmind (2.5.1)
|
|
190
|
+
overmind (2.5.1-aarch64-linux)
|
|
191
|
+
overmind (2.5.1-arm-linux)
|
|
192
|
+
overmind (2.5.1-arm64-darwin)
|
|
193
|
+
overmind (2.5.1-x86_64-darwin)
|
|
194
|
+
pagy (43.0.2)
|
|
204
195
|
json
|
|
205
196
|
yaml
|
|
197
|
+
parallel (1.27.0)
|
|
198
|
+
parser (3.3.10.0)
|
|
199
|
+
ast (~> 2.4.1)
|
|
200
|
+
racc
|
|
206
201
|
pg (1.6.2)
|
|
207
202
|
pg (1.6.2-aarch64-linux)
|
|
208
203
|
pg (1.6.2-aarch64-linux-musl)
|
|
@@ -213,6 +208,7 @@ GEM
|
|
|
213
208
|
pp (0.6.3)
|
|
214
209
|
prettyprint
|
|
215
210
|
prettyprint (0.2.0)
|
|
211
|
+
prism (1.6.0)
|
|
216
212
|
pry (0.15.2)
|
|
217
213
|
coderay (~> 1.1)
|
|
218
214
|
method_source (~> 1.0)
|
|
@@ -224,6 +220,8 @@ GEM
|
|
|
224
220
|
nio4r (~> 2.0)
|
|
225
221
|
racc (1.8.1)
|
|
226
222
|
rack (3.2.4)
|
|
223
|
+
rack-mini-profiler (4.0.1)
|
|
224
|
+
rack (>= 1.2.0)
|
|
227
225
|
rack-session (2.1.1)
|
|
228
226
|
base64 (>= 0.1.0)
|
|
229
227
|
rack (>= 3.0.0)
|
|
@@ -231,20 +229,20 @@ GEM
|
|
|
231
229
|
rack (>= 1.3)
|
|
232
230
|
rackup (2.2.1)
|
|
233
231
|
rack (>= 3)
|
|
234
|
-
rails (8.
|
|
235
|
-
actioncable (= 8.
|
|
236
|
-
actionmailbox (= 8.
|
|
237
|
-
actionmailer (= 8.
|
|
238
|
-
actionpack (= 8.
|
|
239
|
-
actiontext (= 8.
|
|
240
|
-
actionview (= 8.
|
|
241
|
-
activejob (= 8.
|
|
242
|
-
activemodel (= 8.
|
|
243
|
-
activerecord (= 8.
|
|
244
|
-
activestorage (= 8.
|
|
245
|
-
activesupport (= 8.
|
|
232
|
+
rails (8.0.4)
|
|
233
|
+
actioncable (= 8.0.4)
|
|
234
|
+
actionmailbox (= 8.0.4)
|
|
235
|
+
actionmailer (= 8.0.4)
|
|
236
|
+
actionpack (= 8.0.4)
|
|
237
|
+
actiontext (= 8.0.4)
|
|
238
|
+
actionview (= 8.0.4)
|
|
239
|
+
activejob (= 8.0.4)
|
|
240
|
+
activemodel (= 8.0.4)
|
|
241
|
+
activerecord (= 8.0.4)
|
|
242
|
+
activestorage (= 8.0.4)
|
|
243
|
+
activesupport (= 8.0.4)
|
|
246
244
|
bundler (>= 1.15.0)
|
|
247
|
-
railties (= 8.
|
|
245
|
+
railties (= 8.0.4)
|
|
248
246
|
rails-dom-testing (2.3.0)
|
|
249
247
|
activesupport (>= 5.0.0)
|
|
250
248
|
minitest
|
|
@@ -252,25 +250,69 @@ GEM
|
|
|
252
250
|
rails-html-sanitizer (1.6.2)
|
|
253
251
|
loofah (~> 2.21)
|
|
254
252
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
255
|
-
railties (8.
|
|
256
|
-
actionpack (= 8.
|
|
257
|
-
activesupport (= 8.
|
|
253
|
+
railties (8.0.4)
|
|
254
|
+
actionpack (= 8.0.4)
|
|
255
|
+
activesupport (= 8.0.4)
|
|
258
256
|
irb (~> 1.13)
|
|
259
257
|
rackup (>= 1.0.0)
|
|
260
258
|
rake (>= 12.2)
|
|
261
259
|
thor (~> 1.0, >= 1.2.2)
|
|
262
260
|
tsort (>= 0.2)
|
|
263
261
|
zeitwerk (~> 2.6)
|
|
262
|
+
rainbow (3.1.1)
|
|
264
263
|
rake (13.3.1)
|
|
264
|
+
rbs (3.9.5)
|
|
265
|
+
logger
|
|
265
266
|
rdoc (6.15.1)
|
|
266
267
|
erb
|
|
267
268
|
psych (>= 4.0.0)
|
|
268
269
|
tsort
|
|
269
270
|
regexp_parser (2.11.3)
|
|
270
|
-
reline (0.6.
|
|
271
|
+
reline (0.6.3)
|
|
271
272
|
io-console (~> 0.5)
|
|
272
273
|
rexml (3.4.4)
|
|
274
|
+
rubocop (1.80.2)
|
|
275
|
+
json (~> 2.3)
|
|
276
|
+
language_server-protocol (~> 3.17.0.2)
|
|
277
|
+
lint_roller (~> 1.1.0)
|
|
278
|
+
parallel (~> 1.10)
|
|
279
|
+
parser (>= 3.3.0.2)
|
|
280
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
281
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
282
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
283
|
+
ruby-progressbar (~> 1.7)
|
|
284
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
285
|
+
rubocop-ast (1.48.0)
|
|
286
|
+
parser (>= 3.3.7.2)
|
|
287
|
+
prism (~> 1.4)
|
|
288
|
+
rubocop-performance (1.25.0)
|
|
289
|
+
lint_roller (~> 1.1)
|
|
290
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
291
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
292
|
+
rubocop-rails (2.33.4)
|
|
293
|
+
activesupport (>= 4.2.0)
|
|
294
|
+
lint_roller (~> 1.1)
|
|
295
|
+
rack (>= 1.1)
|
|
296
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
297
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
298
|
+
ruby-lsp (0.26.2)
|
|
299
|
+
language_server-protocol (~> 3.17.0)
|
|
300
|
+
prism (>= 1.2, < 2.0)
|
|
301
|
+
rbs (>= 3, < 5)
|
|
302
|
+
ruby-lsp-rails (0.4.8)
|
|
303
|
+
ruby-lsp (>= 0.26.0, < 0.27.0)
|
|
304
|
+
ruby-progressbar (1.13.0)
|
|
273
305
|
rubyzip (3.2.2)
|
|
306
|
+
satis (2.3.0)
|
|
307
|
+
browser
|
|
308
|
+
diffy
|
|
309
|
+
importmap-rails
|
|
310
|
+
jsonb_accessor (~> 1.4)
|
|
311
|
+
rails (>= 6)
|
|
312
|
+
stimulus-rails
|
|
313
|
+
tailwindcss-rails
|
|
314
|
+
turbo-rails
|
|
315
|
+
view_component
|
|
274
316
|
securerandom (0.4.1)
|
|
275
317
|
selenium-webdriver (4.38.0)
|
|
276
318
|
base64 (~> 0.2)
|
|
@@ -297,6 +339,18 @@ GEM
|
|
|
297
339
|
sqlite3 (2.8.0-x86_64-darwin)
|
|
298
340
|
sqlite3 (2.8.0-x86_64-linux-gnu)
|
|
299
341
|
sqlite3 (2.8.0-x86_64-linux-musl)
|
|
342
|
+
standard (1.51.1)
|
|
343
|
+
language_server-protocol (~> 3.17.0.2)
|
|
344
|
+
lint_roller (~> 1.0)
|
|
345
|
+
rubocop (~> 1.80.2)
|
|
346
|
+
standard-custom (~> 1.0.0)
|
|
347
|
+
standard-performance (~> 1.8)
|
|
348
|
+
standard-custom (1.0.2)
|
|
349
|
+
lint_roller (~> 1.0)
|
|
350
|
+
rubocop (~> 1.50)
|
|
351
|
+
standard-performance (1.8.0)
|
|
352
|
+
lint_roller (~> 1.1)
|
|
353
|
+
rubocop-performance (~> 1.25.0)
|
|
300
354
|
stimulus-rails (1.3.4)
|
|
301
355
|
railties (>= 6.0.0)
|
|
302
356
|
stringio (3.1.7)
|
|
@@ -320,11 +374,15 @@ GEM
|
|
|
320
374
|
railties (>= 7.1.0)
|
|
321
375
|
tzinfo (2.0.6)
|
|
322
376
|
concurrent-ruby (~> 1.0)
|
|
377
|
+
unicode-display_width (3.2.0)
|
|
378
|
+
unicode-emoji (~> 4.1)
|
|
379
|
+
unicode-emoji (4.1.0)
|
|
323
380
|
uri (1.1.1)
|
|
324
381
|
useragent (0.16.11)
|
|
325
|
-
view_component (
|
|
326
|
-
activesupport (>=
|
|
382
|
+
view_component (3.23.2)
|
|
383
|
+
activesupport (>= 5.2.0, < 8.1)
|
|
327
384
|
concurrent-ruby (~> 1)
|
|
385
|
+
method_source (~> 1.0)
|
|
328
386
|
websocket (1.2.11)
|
|
329
387
|
websocket-driver (0.8.0)
|
|
330
388
|
base64
|
|
@@ -351,13 +409,19 @@ DEPENDENCIES
|
|
|
351
409
|
capybara (~> 3.40)
|
|
352
410
|
debug
|
|
353
411
|
mensa!
|
|
412
|
+
overmind
|
|
354
413
|
pry
|
|
355
414
|
puma
|
|
356
|
-
|
|
415
|
+
rack-mini-profiler
|
|
416
|
+
rubocop-rails
|
|
417
|
+
ruby-lsp
|
|
418
|
+
ruby-lsp-rails
|
|
419
|
+
satis (~> 2)
|
|
357
420
|
selenium-webdriver (~> 4.17)
|
|
358
421
|
slim (~> 5.2)
|
|
359
422
|
sprockets-rails
|
|
360
423
|
sqlite3 (~> 2.8)
|
|
424
|
+
standard
|
|
361
425
|
|
|
362
426
|
BUNDLED WITH
|
|
363
427
|
2.6.2
|
data/Procfile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
web: bin/rails server
|
|
2
|
-
css: bin/rails
|
|
1
|
+
web: bin/rails server -p 3000 -b 0.0.0.0
|
|
2
|
+
css: cd test/dummy && bin/rails tailwindcss:watch
|
data/README.md
CHANGED
|
@@ -2,27 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Fast and awesome tables, with pagination, sorting, filtering and custom views.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
Features:
|
|
6
9
|
|
|
7
10
|
- [x] very fast
|
|
8
11
|
- [x] row-links
|
|
9
12
|
- [x] sorting
|
|
10
13
|
- [x] tables without headers (and without most of the above)
|
|
11
|
-
- [ ] column sorting
|
|
12
14
|
- [x] filtering of multiple columns
|
|
15
|
+
- [X] Hide filter icon in case there are no filters
|
|
16
|
+
|
|
17
|
+
Still to do:
|
|
18
|
+
- [ ] column sorting
|
|
13
19
|
- [ ] editing of existing filters
|
|
14
20
|
- [ ] view selection and exports per view
|
|
21
|
+
- [ ] multiple selection of rows
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
Optionally:
|
|
17
24
|
|
|
18
25
|
- [ ] group by
|
|
19
26
|
- [ ] sum/max/min
|
|
20
27
|
- [ ] tables backed by arrays (of ActiveModel)
|
|
21
28
|
|
|
22
|
-
Todo:
|
|
29
|
+
Todo/Fixme:
|
|
23
30
|
|
|
24
|
-
- [
|
|
25
|
-
- [ ] Search only works on table columns
|
|
31
|
+
- [ ] Search only works on table text columns
|
|
26
32
|
|
|
27
33
|
## Usage
|
|
28
34
|
|
|
@@ -67,6 +73,15 @@ class UserTable < ApplicationTable
|
|
|
67
73
|
view_columns_sorting false # Disabled for now
|
|
68
74
|
view_condensed false # Default false
|
|
69
75
|
view_condensed_toggle true # Whether to show the toggle, default true
|
|
76
|
+
|
|
77
|
+
# Add system views
|
|
78
|
+
view :concept do
|
|
79
|
+
name "Concept"
|
|
80
|
+
filter :state do
|
|
81
|
+
operator :equals
|
|
82
|
+
value "concept"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
70
85
|
end
|
|
71
86
|
end
|
|
72
87
|
```
|
|
@@ -78,9 +93,12 @@ You can show your tables on the page using the following:
|
|
|
78
93
|
= sts.table :users
|
|
79
94
|
```
|
|
80
95
|
|
|
81
|
-
####
|
|
96
|
+
#### Custom views
|
|
97
|
+
|
|
98
|
+
Custom views are views not defined by the developer (SystemViews) but by the end-user by adding/removing filters.
|
|
99
|
+
|
|
100
|
+
Initial support for custom-views is there, but pretty rudimentary:
|
|
82
101
|
|
|
83
|
-
Initial support for views is there, but pretty rudimentary:
|
|
84
102
|
`Mensa::TableView.create(table: "users", name: "Guests", data: {filters: {role: {value: "guest"}}})`
|
|
85
103
|
|
|
86
104
|
### Fast
|
|
@@ -95,6 +113,40 @@ column :age do
|
|
|
95
113
|
end
|
|
96
114
|
```
|
|
97
115
|
|
|
116
|
+
## Development
|
|
117
|
+
|
|
118
|
+
### Coding
|
|
119
|
+
|
|
120
|
+
- Checkout this repo
|
|
121
|
+
- Setup your direnv, add the following to your `.envrc`:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
export BUNDLE_RUBYGEMS__PKG__GITHUB__COM=ghp_xxxxxxw
|
|
125
|
+
export RBENV_VERSION=$(cat .ruby-version)
|
|
126
|
+
```
|
|
127
|
+
- Run `direnv allow`
|
|
128
|
+
- Open with Visual Studio Code (or with any other editor) and reopen in container.
|
|
129
|
+
- Run `bin/overmind s`
|
|
130
|
+
|
|
131
|
+
### Docs
|
|
132
|
+
|
|
133
|
+
Using the following in your view will render Mensa::Table::Component
|
|
134
|
+
```slim
|
|
135
|
+
= sts.table :users
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The Mensa::Table::Component will render:
|
|
139
|
+
- Mensa::Search::Component
|
|
140
|
+
- Mensa::FilterList::Component
|
|
141
|
+
- Mensa::Views::Component
|
|
142
|
+
- renders a views list
|
|
143
|
+
- Mensa::ControlBar::Component
|
|
144
|
+
- search icon
|
|
145
|
+
- filter icon
|
|
146
|
+
- condensed toggle
|
|
147
|
+
- export icon
|
|
148
|
+
- turbo-frame with the actual table you see (which is rendered by Mensa::View::Component)
|
|
149
|
+
|
|
98
150
|
## Installation
|
|
99
151
|
|
|
100
152
|
Add this line to your application's Gemfile:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import '../../../components/mensa/add_filter/component.css';
|
|
2
2
|
@import '../../../components/mensa/cell/component.css';
|
|
3
3
|
@import '../../../components/mensa/control_bar/component.css';
|
|
4
|
-
@import '../../../components/mensa/
|
|
4
|
+
@import '../../../components/mensa/filter_list/component.css';
|
|
5
5
|
@import '../../../components/mensa/header/component.css';
|
|
6
6
|
@import '../../../components/mensa/row_action/component.css';
|
|
7
7
|
@import '../../../components/mensa/search/component.css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.sts-table__add_filter data-controller="mensa-add-filter" data-mensa-add-filter-mensa-table-outlet=".mensa-table#table-#{table.table_id}"
|
|
2
|
-
button.relative.w-full.cursor-default.rounded-md.bg-white.dark:bg-gray-800.py-1.5.pl-3.pr-6.text-left.text-gray-
|
|
3
|
-
span.block.truncate data-mensa-add-filter-target="description"
|
|
2
|
+
button.relative.w-full.cursor-default.rounded-md.bg-white.dark:bg-gray-800.py-1.5.pl-3.pr-6.text-left.text-gray-400.dark:text-gray-400.shadow-sm.border.border-dashed.focus:outline-none.focus:ring-2.focus:ring-primary-600.sm:text-sm.sm:leading-6 type="button" data-action="mensa-add-filter#toggle"
|
|
3
|
+
span.mr-2.block.truncate data-mensa-add-filter-target="description"
|
|
4
4
|
= t('.add_filter')
|
|
5
5
|
span.pointer-events-none.absolute.inset-y-0.right-0.flex.items-center.pr-2
|
|
6
6
|
div class=Mensa.config.icons[:filters_add_filter]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.mensa-table {
|
|
2
2
|
.paging {
|
|
3
|
-
@apply flex items-center justify-between border-t border-gray-100 dark:border-gray-600 bg-white dark:bg-gray-800 px-4 py-3 sm:px-6;
|
|
3
|
+
@apply flex items-center justify-between border-t border-gray-100 dark:border-gray-600 bg-white dark:bg-gray-800 px-4 py-3 sm:px-6 text-sm;
|
|
4
4
|
|
|
5
5
|
.pagy {
|
|
6
6
|
@apply isolate inline-flex -space-x-px text-gray-500 dark:text-gray-400;
|
|
@@ -10,4 +10,13 @@
|
|
|
10
10
|
@apply bg-gray-300 text-gray-800 dark:bg-gray-500 hover:bg-gray-400;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tippy-box[data-theme~='mensa'] {
|
|
16
|
+
@apply bg-gray-200 text-gray-800 dark:text-gray-400;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.tippy-box[data-theme~='mensa'] .tippy-arrow {
|
|
20
|
+
@apply text-gray-200;
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.mensa-table__views data-mensa-table-target="views"
|
|
1
|
+
.mensa-table__views data-mensa-table-target="views" data-controller="mensa-views"
|
|
2
2
|
.sm:hidden
|
|
3
3
|
label.sr-only[for="tabs"]
|
|
4
4
|
| Select a tab
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
nav.flex.justify-between[aria-label="Tabs"]
|
|
10
10
|
.flex.space-x-2.overflow-x-auto.whitespace-nowrap.scroll-p-0
|
|
11
11
|
- table.all_views.each.with_index do |view, index|
|
|
12
|
-
= link_to(table.path(table_view_id: view.id, turbo_frame_id: table.table_id), "data-turbo-frame": table.table_id, class: "view #{(view == table.table_view
|
|
12
|
+
= link_to(table.path(table_view_id: view.id, turbo_frame_id: table.table_id), "data-turbo-frame": table.table_id, class: "view #{(view.id == table.table_view&.id || view.id == :all && table.table_view.blank?) ? 'selected' : ''}", data: {"mensa-views-target": "view", action: "mensa-views#select", "tippy-content": view.description}) do
|
|
13
13
|
= view.name
|
|
14
14
|
|
|
15
15
|
- if table.supports_custom_views?
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ApplicationController from 'mensa/controllers/application_controller'
|
|
2
|
+
import tippy from 'tippy.js'
|
|
3
|
+
|
|
4
|
+
export default class ViewsComponentController extends ApplicationController {
|
|
5
|
+
static targets = [
|
|
6
|
+
'view',
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
connect() {
|
|
10
|
+
tippy('[data-controller="mensa-views"] [data-tippy-content]', {
|
|
11
|
+
placement: "top",
|
|
12
|
+
theme: 'mensa',
|
|
13
|
+
offset: [0, 8]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
select(event) {
|
|
18
|
+
this.viewTargets.forEach((element) => {
|
|
19
|
+
(element === event.target) ? element.classList.add('selected') : element.classList.remove('selected')
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
}
|