super 0.0.5 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +4 -1
- data/CONTRIBUTING.md +56 -0
- data/README.md +68 -38
- data/STABILITY.md +50 -0
- data/app/assets/javascripts/super/application.js +1170 -359
- data/app/assets/stylesheets/super/application.css +78105 -50441
- data/app/controllers/super/application_controller.rb +44 -52
- data/app/helpers/super/form_builder_helper.rb +23 -0
- data/app/views/layouts/super/application.html.erb +26 -6
- data/app/views/super/application/{_resources_header.html.erb → _collection_header.html.erb} +5 -6
- data/app/views/super/application/_display_rich_text.html.erb +1 -0
- data/app/views/super/application/_filter.html.erb +14 -0
- data/app/views/super/application/_filter_type_select.html.erb +18 -0
- data/app/views/super/application/_filter_type_text.html.erb +16 -0
- data/app/views/super/application/_filter_type_timestamp.html.erb +23 -0
- data/app/views/super/application/_flash.html.erb +13 -13
- data/app/views/super/application/_form_field__destroy.html.erb +1 -9
- data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
- data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
- data/app/views/super/application/_form_field_select.html.erb +1 -23
- data/app/views/super/application/_form_field_text.html.erb +1 -13
- data/app/views/super/application/_form_has_many.html.erb +1 -1
- data/app/views/super/application/{_resource_header.html.erb → _member_header.html.erb} +6 -6
- data/app/views/super/application/_super_layout.html.erb +12 -17
- data/app/views/super/application/_super_pagination.html.erb +16 -0
- data/app/views/super/application/_super_panel.html.erb +3 -7
- data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
- data/app/views/super/application/_super_schema_display_index.html.erb +24 -0
- data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
- data/app/views/super/application/_super_schema_form.html.erb +15 -0
- data/app/views/super/application/edit.html.erb +2 -6
- data/app/views/super/application/index.html.erb +2 -6
- data/app/views/super/application/new.html.erb +2 -6
- data/app/views/super/application/show.html.erb +2 -6
- data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
- data/config/locales/en.yml +5 -0
- data/docs/README.md +4 -2
- data/docs/action_text.md +48 -0
- data/docs/cheat.md +41 -0
- data/docs/faq.md +3 -3
- data/docs/installation.md +21 -0
- data/docs/quick_start.md +1 -16
- data/docs/webpacker.md +13 -5
- data/frontend/super-frontend/dist/application.css +78105 -50441
- data/frontend/super-frontend/dist/application.js +1170 -359
- data/lib/generators/super/action_text/USAGE +23 -0
- data/lib/generators/super/action_text/action_text_generator.rb +30 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
- data/lib/generators/super/install/install_generator.rb +16 -0
- data/lib/generators/super/resource/templates/resources_controller.rb.tt +1 -31
- data/lib/generators/super/webpacker/USAGE +5 -4
- data/lib/generators/super/webpacker/webpacker_generator.rb +3 -2
- data/lib/super.rb +21 -3
- data/lib/super/action_inquirer.rb +2 -2
- data/lib/super/assets.rb +112 -38
- data/lib/super/client_error.rb +43 -0
- data/lib/super/compatibility.rb +13 -1
- data/lib/super/configuration.rb +21 -69
- data/lib/super/controls.rb +9 -116
- data/lib/super/controls/optional.rb +79 -0
- data/lib/super/controls/required.rb +13 -0
- data/lib/super/controls/steps.rb +114 -0
- data/lib/super/display.rb +66 -3
- data/lib/super/display/guesser.rb +34 -0
- data/lib/super/display/schema_types.rb +61 -25
- data/lib/super/engine.rb +9 -1
- data/lib/super/error.rb +17 -9
- data/lib/super/filter.rb +12 -0
- data/lib/super/filter/form_object.rb +97 -0
- data/lib/super/filter/guesser.rb +30 -0
- data/lib/super/filter/operator.rb +103 -0
- data/lib/super/filter/plugin.rb +47 -0
- data/lib/super/filter/schema_types.rb +112 -0
- data/lib/super/form.rb +35 -0
- data/lib/super/form/builder.rb +204 -0
- data/lib/super/form/guesser.rb +27 -0
- data/lib/super/form/inline_errors.rb +26 -0
- data/lib/super/form/schema_types.rb +29 -22
- data/lib/super/form/strong_params.rb +29 -0
- data/lib/super/layout.rb +28 -0
- data/lib/super/link.rb +55 -32
- data/lib/super/pagination.rb +55 -0
- data/lib/super/panel.rb +13 -0
- data/lib/super/partial.rb +12 -0
- data/lib/super/partial/resolving.rb +24 -0
- data/lib/super/plugin.rb +34 -63
- data/lib/super/schema.rb +12 -22
- data/lib/super/schema/common.rb +25 -0
- data/lib/super/schema/guesser.rb +77 -0
- data/lib/super/version.rb +1 -1
- data/lib/super/view_helper.rb +1 -20
- metadata +90 -33
- data/app/helpers/super/application_helper.rb +0 -32
- data/app/views/super/application/_form.html.erb +0 -17
- data/app/views/super/application/_form_inline_errors.html.erb +0 -10
- data/app/views/super/application/_index.html.erb +0 -45
- data/app/views/super/application/_show.html.erb +0 -10
- data/docs/controls.md +0 -39
- data/frontend/super-frontend/build.js +0 -36
- data/frontend/super-frontend/package.json +0 -21
- data/frontend/super-frontend/postcss.config.js +0 -6
- data/frontend/super-frontend/src/javascripts/super/application.ts +0 -18
- data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -21
- data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
- data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
- data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
- data/frontend/super-frontend/tailwind.config.js +0 -9
- data/frontend/super-frontend/tsconfig.json +0 -13
- data/frontend/super-frontend/yarn.lock +0 -5540
- data/lib/super/step.rb +0 -36
- data/lib/tasks/super_tasks.rake +0 -4
data/lib/super/step.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
module Super
|
2
|
-
module Step
|
3
|
-
module_function
|
4
|
-
|
5
|
-
def load_resources(controls, _params, action_inquirer)
|
6
|
-
controls.scope(action: action_inquirer)
|
7
|
-
end
|
8
|
-
|
9
|
-
def initialize_pagination(resources, query_params, limit: Super.configuration.index_resources_per_page)
|
10
|
-
Pagination.new(
|
11
|
-
total_count: resources.size,
|
12
|
-
limit: limit,
|
13
|
-
query_params: query_params,
|
14
|
-
page_query_param: :page
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
def paginate_resources(resources, pagination)
|
19
|
-
resources
|
20
|
-
.limit(pagination.limit)
|
21
|
-
.offset(pagination.offset)
|
22
|
-
end
|
23
|
-
|
24
|
-
def load_resource(controls, params, action_inquirer)
|
25
|
-
controls.scope(action: action_inquirer).find(params[:id])
|
26
|
-
end
|
27
|
-
|
28
|
-
def build_resource(controls, action_inquirer)
|
29
|
-
controls.scope(action: action_inquirer).build
|
30
|
-
end
|
31
|
-
|
32
|
-
def build_resource_with_params(controls, action_inquirer, create_permitted_params)
|
33
|
-
controls.scope(action: action_inquirer).build(create_permitted_params)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
data/lib/tasks/super_tasks.rake
DELETED