super 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -48
- data/app/assets/javascripts/super/application.js +1201 -2092
- data/app/assets/stylesheets/super/application.css +54 -6569
- data/app/controllers/super/application_controller.rb +52 -47
- data/app/controllers/super/foundation_controller.rb +30 -0
- data/app/controllers/super/sitewide_controller.rb +36 -0
- data/app/controllers/super/substructure_controller.rb +40 -92
- data/app/controllers/super/view_controller.rb +59 -0
- data/app/views/layouts/super/application.html.erb +3 -3
- data/app/views/super/application/_batch_checkbox.csv.erb +1 -1
- data/app/views/super/application/_batch_checkbox.html.erb +1 -1
- data/app/views/super/application/_collection_header.html.erb +1 -1
- data/app/views/super/application/_csv_button.html.erb +1 -1
- data/app/views/super/application/_display_actions.html.erb +1 -1
- data/app/views/super/application/_display_index.html.erb +8 -2
- data/app/views/super/application/_display_rich_text.html.erb +1 -1
- data/app/views/super/application/_display_show.html.erb +10 -2
- data/app/views/super/application/_filter.html.erb +63 -59
- data/app/views/super/application/_form.html.erb +1 -1
- data/app/views/super/application/_form_fieldset.html.erb +1 -1
- data/app/views/super/application/_form_has_many.html.erb +2 -2
- data/app/views/super/application/_form_has_one.html.erb +1 -1
- data/app/views/super/application/_layout.html.erb +6 -8
- data/app/views/super/application/_link.html.erb +1 -6
- data/app/views/super/application/_member_header.html.erb +1 -1
- data/app/views/super/application/_panel.html.erb +1 -1
- data/app/views/super/application/_query.html.erb +13 -12
- data/app/views/super/application/_site_header.html.erb +2 -2
- data/app/views/super/application/_sort.html.erb +18 -14
- data/app/views/super/application/_sort_expression.html.erb +1 -1
- data/app/views/super/application/_view_chain.html.erb +1 -5
- data/app/views/super/application/edit.html.erb +1 -1
- data/app/views/super/application/index.html.erb +1 -1
- data/app/views/super/application/new.html.erb +1 -1
- data/app/views/super/application/show.html.erb +1 -1
- data/config/locales/en.yml +3 -0
- data/frontend/super-frontend/dist/application.css +54 -6569
- data/frontend/super-frontend/dist/application.js +1201 -2092
- data/lib/super/action_inquirer.rb +28 -8
- data/lib/super/assets.rb +2 -2
- data/lib/super/badge.rb +8 -23
- data/lib/super/cheat.rb +11 -5
- data/lib/super/client_error.rb +4 -0
- data/lib/super/compatibility.rb +4 -0
- data/lib/super/configuration.rb +3 -0
- data/lib/super/display/schema_types.rb +50 -71
- data/lib/super/display.rb +16 -15
- data/lib/super/error.rb +16 -2
- data/lib/super/filter/form_object.rb +2 -2
- data/lib/super/filter/operator.rb +1 -1
- data/lib/super/filter/schema_types.rb +1 -1
- data/lib/super/form/field_transcript.rb +4 -0
- data/lib/super/form/schema_types.rb +2 -2
- data/lib/super/form/strong_params.rb +1 -1
- data/lib/super/form_builder/base_methods.rb +3 -9
- data/lib/super/form_builder/flatpickr_methods.rb +3 -3
- data/lib/super/form_builder.rb +19 -21
- data/{app/helpers → lib}/super/form_builder_helper.rb +13 -2
- data/lib/super/link.rb +15 -6
- data/lib/super/link_builder.rb +4 -4
- data/lib/super/navigation.rb +49 -45
- data/lib/super/partial.rb +0 -12
- data/lib/super/plugin.rb +2 -2
- data/lib/super/query.rb +61 -0
- data/lib/super/{engine.rb → railtie.rb} +8 -1
- data/lib/super/render_helper.rb +31 -0
- data/lib/super/reset.rb +7 -5
- data/lib/super/schema/guesser.rb +5 -5
- data/lib/super/schema.rb +10 -4
- data/lib/super/sort.rb +2 -4
- data/lib/super/useful/deprecations.rb +16 -0
- data/lib/super/useful/enum.rb +1 -1
- data/lib/super/useful/i19.rb +1 -1
- data/lib/super/version.rb +1 -1
- data/lib/super/view_chain.rb +33 -4
- data/lib/super.rb +9 -2
- metadata +11 -49
- data/config/routes.rb +0 -4
- data/lib/super/query/form_object.rb +0 -48
data/lib/super.rb
CHANGED
@@ -2,10 +2,15 @@
|
|
2
2
|
|
3
3
|
require "tsort"
|
4
4
|
|
5
|
+
if !ENV["SUPER_SKIP_REQUIRE_CSV"]
|
6
|
+
require "csv"
|
7
|
+
end
|
8
|
+
|
5
9
|
require "rails/engine"
|
6
10
|
|
7
11
|
require "super/schema/common"
|
8
12
|
require "super/useful/builder"
|
13
|
+
require "super/useful/deprecations"
|
9
14
|
require "super/useful/enum"
|
10
15
|
require "super/useful/i19"
|
11
16
|
|
@@ -35,6 +40,7 @@ require "super/form_builder/action_text_methods"
|
|
35
40
|
require "super/form_builder/base_methods"
|
36
41
|
require "super/form_builder/flatpickr_methods"
|
37
42
|
require "super/form_builder/option_methods"
|
43
|
+
require "super/form_builder_helper"
|
38
44
|
require "super/layout"
|
39
45
|
require "super/link"
|
40
46
|
require "super/link_builder"
|
@@ -44,7 +50,8 @@ require "super/pagination"
|
|
44
50
|
require "super/panel"
|
45
51
|
require "super/partial"
|
46
52
|
require "super/plugin"
|
47
|
-
require "super/query
|
53
|
+
require "super/query"
|
54
|
+
require "super/render_helper"
|
48
55
|
require "super/reorderable_hash"
|
49
56
|
require "super/reset"
|
50
57
|
require "super/schema"
|
@@ -54,4 +61,4 @@ require "super/version"
|
|
54
61
|
require "super/view_chain"
|
55
62
|
require "super/view_helper"
|
56
63
|
|
57
|
-
require "super/
|
64
|
+
require "super/railtie"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Ahn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -128,48 +128,6 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: minitest-ci
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: appraisal
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ">="
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: yard
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
173
131
|
- !ruby/object:Gem::Dependency
|
174
132
|
name: mocha
|
175
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,8 +212,10 @@ files:
|
|
254
212
|
- app/assets/javascripts/super/application.js
|
255
213
|
- app/assets/stylesheets/super/application.css
|
256
214
|
- app/controllers/super/application_controller.rb
|
215
|
+
- app/controllers/super/foundation_controller.rb
|
216
|
+
- app/controllers/super/sitewide_controller.rb
|
257
217
|
- app/controllers/super/substructure_controller.rb
|
258
|
-
- app/
|
218
|
+
- app/controllers/super/view_controller.rb
|
259
219
|
- app/views/layouts/super/application.html.erb
|
260
220
|
- app/views/super/application/_batch_button.html.erb
|
261
221
|
- app/views/super/application/_batch_checkbox.csv.erb
|
@@ -295,7 +255,6 @@ files:
|
|
295
255
|
- app/views/super/feather/README.md
|
296
256
|
- app/views/super/feather/_x.html
|
297
257
|
- config/locales/en.yml
|
298
|
-
- config/routes.rb
|
299
258
|
- frontend/super-frontend/dist/application.css
|
300
259
|
- frontend/super-frontend/dist/application.js
|
301
260
|
- frontend/super-frontend/dist/package.json
|
@@ -324,7 +283,6 @@ files:
|
|
324
283
|
- lib/super/display.rb
|
325
284
|
- lib/super/display/guesser.rb
|
326
285
|
- lib/super/display/schema_types.rb
|
327
|
-
- lib/super/engine.rb
|
328
286
|
- lib/super/error.rb
|
329
287
|
- lib/super/filter.rb
|
330
288
|
- lib/super/filter/form_object.rb
|
@@ -342,6 +300,7 @@ files:
|
|
342
300
|
- lib/super/form_builder/base_methods.rb
|
343
301
|
- lib/super/form_builder/flatpickr_methods.rb
|
344
302
|
- lib/super/form_builder/option_methods.rb
|
303
|
+
- lib/super/form_builder_helper.rb
|
345
304
|
- lib/super/layout.rb
|
346
305
|
- lib/super/link.rb
|
347
306
|
- lib/super/link_builder.rb
|
@@ -352,7 +311,9 @@ files:
|
|
352
311
|
- lib/super/partial.rb
|
353
312
|
- lib/super/partial/resolving.rb
|
354
313
|
- lib/super/plugin.rb
|
355
|
-
- lib/super/query
|
314
|
+
- lib/super/query.rb
|
315
|
+
- lib/super/railtie.rb
|
316
|
+
- lib/super/render_helper.rb
|
356
317
|
- lib/super/reorderable_hash.rb
|
357
318
|
- lib/super/reset.rb
|
358
319
|
- lib/super/schema.rb
|
@@ -360,6 +321,7 @@ files:
|
|
360
321
|
- lib/super/schema/guesser.rb
|
361
322
|
- lib/super/sort.rb
|
362
323
|
- lib/super/useful/builder.rb
|
324
|
+
- lib/super/useful/deprecations.rb
|
363
325
|
- lib/super/useful/enum.rb
|
364
326
|
- lib/super/useful/i19.rb
|
365
327
|
- lib/super/version.rb
|
@@ -390,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
352
|
- !ruby/object:Gem::Version
|
391
353
|
version: '0'
|
392
354
|
requirements: []
|
393
|
-
rubygems_version: 3.
|
355
|
+
rubygems_version: 3.2.33
|
394
356
|
signing_key:
|
395
357
|
specification_version: 4
|
396
358
|
summary: A simple, powerful, zero dependency Rails admin framework
|
data/config/routes.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Super
|
4
|
-
class Query
|
5
|
-
class FormObject
|
6
|
-
def initialize(model:, params:, namespace:, current_path:)
|
7
|
-
@model = model
|
8
|
-
@all_params = params.dup
|
9
|
-
@namespace = namespace
|
10
|
-
@params = params[namespace] || ActionController::Parameters.new
|
11
|
-
@path = current_path
|
12
|
-
@addons = {}
|
13
|
-
end
|
14
|
-
|
15
|
-
attr_reader :namespace
|
16
|
-
attr_reader :path
|
17
|
-
attr_reader :addons
|
18
|
-
|
19
|
-
def add(klass, namespace:, **additional_initialization_arguments)
|
20
|
-
instance = klass.new(
|
21
|
-
model: @model,
|
22
|
-
params: params_dig(namespace),
|
23
|
-
**additional_initialization_arguments
|
24
|
-
)
|
25
|
-
|
26
|
-
addons[namespace] = instance
|
27
|
-
end
|
28
|
-
|
29
|
-
def apply_changes(records)
|
30
|
-
addons.each_value do |addon|
|
31
|
-
records = addon.apply_changes(records)
|
32
|
-
end
|
33
|
-
|
34
|
-
records
|
35
|
-
end
|
36
|
-
|
37
|
-
def to_partial_path
|
38
|
-
"query"
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
def params_dig(*keys)
|
44
|
-
@params.dig(*keys) || ActionController::Parameters.new
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|