avo 1.4.0.pre.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +1 -0
- data/app/components/avo/fields/badge_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/badge_field/index_component.rb +4 -0
- data/app/components/avo/fields/badge_field/show_component.html.erb +3 -0
- data/app/components/avo/fields/badge_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/edit_component.html.erb} +0 -0
- data/app/components/avo/{edit/fields/belongs_to_field_component.rb → fields/belongs_to_field/edit_component.rb} +1 -1
- data/app/components/avo/{index/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/belongs_to_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/belongs_to_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/boolean_field_component.html.erb → fields/boolean_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/boolean_field/edit_component.rb +4 -0
- data/app/components/avo/fields/boolean_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/boolean_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/boolean_field_component.html.erb → fields/boolean_field/show_component.html.erb} +1 -1
- data/app/components/avo/fields/boolean_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/boolean_group_field_component.html.erb → fields/boolean_group_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/boolean_group_field/edit_component.rb +4 -0
- data/app/components/avo/fields/boolean_group_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/boolean_group_field/index_component.rb +4 -0
- data/app/components/avo/fields/boolean_group_field/show_component.html.erb +3 -0
- data/app/components/avo/fields/boolean_group_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/code_field_component.html.erb → fields/code_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/code_field/edit_component.rb +4 -0
- data/app/components/avo/{show/fields/code_field_component.html.erb → fields/code_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/code_field/show_component.rb +4 -0
- data/app/components/avo/{common → fields/common}/badge_viewer_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/badge_viewer_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/boolean_check_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/boolean_check_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/boolean_group_component.html.erb +1 -1
- data/app/components/avo/{common → fields/common}/boolean_group_component.rb +1 -1
- data/app/components/avo/fields/common/files_list_viewer_component.html.erb +5 -0
- data/app/components/avo/{common → fields/common}/files_list_viewer_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/gravatar_viewer_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/gravatar_viewer_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/heading_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/heading_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/key_value_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/key_value_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/multiple_file_viewer_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/multiple_file_viewer_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/single_file_viewer_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/single_file_viewer_component.rb +1 -1
- data/app/components/avo/{common → fields/common}/status_viewer_component.html.erb +0 -0
- data/app/components/avo/{common → fields/common}/status_viewer_component.rb +1 -1
- data/app/components/avo/{edit/fields/country_field_component.html.erb → fields/country_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/country_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/country_field_component.html.erb → fields/country_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/country_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/country_field_component.html.erb → fields/country_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/country_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/date_field_component.html.erb → fields/date_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/date_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/date_field_component.html.erb → fields/date_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/date_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/date_field_component.html.erb → fields/date_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/date_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/date_time_field_component.html.erb → fields/date_time_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/date_time_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/date_time_field_component.html.erb → fields/date_time_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/date_time_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/date_time_field_component.html.erb → fields/date_time_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/date_time_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/field_component.rb → fields/edit_component.rb} +1 -1
- data/app/components/avo/{edit/fields/external_image_field_component.html.erb → fields/external_image_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/external_image_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/external_image_field_component.html.erb → fields/external_image_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/external_image_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/external_image_field_component.html.erb → fields/external_image_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/external_image_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/file_field_component.html.erb → fields/file_field/edit_component.html.erb} +1 -1
- data/app/components/avo/fields/file_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/file_field_component.html.erb → fields/file_field/index_component.html.erb} +1 -1
- data/app/components/avo/fields/file_field/index_component.rb +4 -0
- data/app/components/avo/fields/file_field/show_component.html.erb +3 -0
- data/app/components/avo/fields/file_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/files_field_component.html.erb → fields/files_field/edit_component.html.erb} +1 -1
- data/app/components/avo/fields/files_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/files_field_component.html.erb → fields/files_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/files_field/index_component.rb +4 -0
- data/app/components/avo/fields/files_field/show_component.html.erb +3 -0
- data/app/components/avo/fields/files_field/show_component.rb +4 -0
- data/app/components/avo/{index/fields/gravatar_field_component.html.erb → fields/gravatar_field/index_component.html.erb} +2 -2
- data/app/components/avo/fields/gravatar_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/gravatar_field_component.html.erb → fields/gravatar_field/show_component.html.erb} +1 -1
- data/app/components/avo/fields/gravatar_field/show_component.rb +4 -0
- data/app/components/avo/{show/fields/has_many_field_component.html.erb → fields/has_many_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/has_many_field/show_component.rb +4 -0
- data/app/components/avo/{index/fields/has_one_field_component.html.erb → fields/has_one_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/has_one_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/has_one_field_component.html.erb → fields/has_one_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/has_one_field/show_component.rb +5 -0
- data/app/components/avo/{show/fields/heading_field_component.html.erb → fields/heading_field/edit_component.html.erb} +1 -1
- data/app/components/avo/fields/heading_field/edit_component.rb +4 -0
- data/app/components/avo/{edit/fields/heading_field_component.html.erb → fields/heading_field/show_component.html.erb} +1 -1
- data/app/components/avo/fields/heading_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/hidden_field_component.html.erb → fields/hidden_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/hidden_field/edit_component.rb +4 -0
- data/app/components/avo/{edit/fields/id_field_component.html.erb → fields/id_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/id_field/edit_component.rb +4 -0
- data/app/components/avo/fields/id_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/id_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/id_field_component.html.erb → fields/id_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/id_field/show_component.rb +4 -0
- data/app/components/avo/fields/index_component.rb +20 -0
- data/app/components/avo/{edit/fields/key_value_field_component.html.erb → fields/key_value_field/edit_component.html.erb} +1 -1
- data/app/components/avo/fields/key_value_field/edit_component.rb +4 -0
- data/app/components/avo/{show/fields/key_value_field_component.html.erb → fields/key_value_field/show_component.html.erb} +1 -1
- data/app/components/avo/fields/key_value_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/markdown_field_component.html.erb → fields/markdown_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/markdown_field/edit_component.rb +4 -0
- data/app/components/avo/{show/fields/markdown_field_component.html.erb → fields/markdown_field/show_component.html.erb} +1 -1
- data/app/components/avo/fields/markdown_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/number_field_component.html.erb → fields/number_field/edit_component.html.erb} +3 -3
- data/app/components/avo/fields/number_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/number_field_component.html.erb → fields/number_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/number_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/number_field_component.html.erb → fields/number_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/number_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/password_field_component.html.erb → fields/password_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/password_field/edit_component.rb +4 -0
- data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +26 -0
- data/app/components/avo/fields/progress_bar_field/edit_component.rb +4 -0
- data/app/components/avo/fields/progress_bar_field/index_component.html.erb +8 -0
- data/app/components/avo/fields/progress_bar_field/index_component.rb +4 -0
- data/app/components/avo/fields/progress_bar_field/show_component.html.erb +8 -0
- data/app/components/avo/fields/progress_bar_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/select_field_component.html.erb → fields/select_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/select_field/edit_component.rb +4 -0
- data/app/components/avo/{index/fields/select_field_component.html.erb → fields/select_field/index_component.html.erb} +0 -0
- data/app/components/avo/fields/select_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/select_field_component.html.erb → fields/select_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/select_field/show_component.rb +4 -0
- data/app/components/avo/{show/fields/field_component.rb → fields/show_component.rb} +1 -1
- data/app/components/avo/{edit/fields/status_field_component.html.erb → fields/status_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/status_field/edit_component.rb +4 -0
- data/app/components/avo/fields/status_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/status_field/index_component.rb +4 -0
- data/app/components/avo/fields/status_field/show_component.html.erb +3 -0
- data/app/components/avo/fields/status_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/text_field_component.html.erb → fields/text_field/edit_component.html.erb} +0 -0
- data/app/components/avo/fields/text_field/edit_component.rb +4 -0
- data/app/components/avo/fields/text_field/index_component.html.erb +3 -0
- data/app/components/avo/fields/text_field/index_component.rb +4 -0
- data/app/components/avo/{show/fields/text_field_component.html.erb → fields/text_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/text_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/textarea_field_component.html.erb → fields/textarea_field/edit_component.html.erb} +1 -1
- data/app/components/avo/fields/textarea_field/edit_component.rb +4 -0
- data/app/components/avo/{show/fields/textarea_field_component.html.erb → fields/textarea_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/textarea_field/show_component.rb +4 -0
- data/app/components/avo/{edit/fields/trix_field_component.html.erb → fields/trix_field/edit_component.html.erb} +1 -2
- data/app/components/avo/fields/trix_field/edit_component.rb +4 -0
- data/app/components/avo/{show/fields/trix_field_component.html.erb → fields/trix_field/show_component.html.erb} +0 -0
- data/app/components/avo/fields/trix_field/show_component.rb +4 -0
- data/app/components/avo/index/resource_controls_component.html.erb +2 -3
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/panel_component.html.erb +1 -1
- data/app/components/avo/panel_component.rb +4 -4
- data/app/components/avo/views/resource_edit_component.html.erb +2 -2
- data/app/components/avo/views/resource_index_component.html.erb +3 -3
- data/app/components/avo/views/resource_new_component.html.erb +2 -2
- data/app/components/avo/views/resource_show_component.html.erb +5 -5
- data/app/controllers/avo/base_controller.rb +26 -2
- data/app/controllers/avo/home_controller.rb +1 -1
- data/app/controllers/avo/search_controller.rb +1 -1
- data/app/helpers/avo/resources_helper.rb +0 -44
- data/app/packs/entrypoints/application.css +1 -0
- data/app/packs/js/controllers/fields/key_value_controller.js +0 -1
- data/app/packs/stylesheets/components/progress.css +13 -0
- data/app/views/avo/actions/show.html.erb +1 -1
- data/app/views/avo/partials/_profile_dropdown.html.erb +19 -0
- data/app/views/layouts/avo/application.html.erb +6 -3
- data/avo.gemspec +1 -1
- data/db/factories.rb +3 -0
- data/db/migrate/20210421064037_add_color_to_teams.rb +5 -0
- data/db/migrate/20210423075924_add_progress_to_projects.rb +5 -0
- data/lib/avo/app.rb +9 -20
- data/lib/avo/base_resource.rb +9 -1
- data/lib/avo/engine.rb +1 -0
- data/lib/avo/fields/badge_field.rb +4 -6
- data/lib/avo/fields/base_field.rb +62 -83
- data/lib/avo/fields/belongs_to_field.rb +11 -11
- data/lib/avo/fields/boolean_field.rb +2 -7
- data/lib/avo/fields/boolean_group_field.rb +2 -7
- data/lib/avo/fields/code_field.rb +3 -7
- data/lib/avo/fields/country_field.rb +3 -6
- data/lib/avo/fields/currency_field.rb +4 -13
- data/lib/avo/fields/date_field.rb +2 -8
- data/lib/avo/fields/date_time_field.rb +2 -3
- data/lib/avo/fields/external_image_field.rb +2 -7
- data/lib/avo/fields/file_field.rb +4 -8
- data/lib/avo/fields/files_field.rb +6 -8
- data/lib/avo/fields/gravatar_field.rb +6 -9
- data/lib/avo/fields/has_and_belongs_to_many_field.rb +6 -7
- data/lib/avo/fields/has_many_field.rb +3 -9
- data/lib/avo/fields/has_one_field.rb +3 -8
- data/lib/avo/fields/heading_field.rb +10 -8
- data/lib/avo/fields/hidden_field.rb +2 -6
- data/lib/avo/fields/id_field.rb +5 -17
- data/lib/avo/fields/key_value_field.rb +4 -6
- data/lib/avo/fields/markdown_field.rb +3 -5
- data/lib/avo/fields/number_field.rb +8 -11
- data/lib/avo/fields/password_field.rb +2 -6
- data/lib/avo/fields/progress_bar_field.rb +19 -0
- data/lib/avo/fields/select_field.rb +13 -12
- data/lib/avo/fields/status_field.rb +2 -6
- data/lib/avo/fields/text_field.rb +3 -6
- data/lib/avo/fields/textarea_field.rb +4 -7
- data/lib/avo/fields/trix_field.rb +5 -9
- data/lib/avo/fields_collector.rb +47 -11
- data/lib/avo/licensing/pro_license.rb +2 -1
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/eject_generator.rb +1 -0
- data/lib/generators/avo/field_generator.rb +17 -0
- data/lib/generators/avo/filter_generator.rb +1 -1
- data/lib/generators/avo/templates/field/%singular_name%_field.rb.tt +5 -0
- data/lib/generators/avo/templates/field/components/edit_component.html.erb.tt +6 -0
- data/lib/generators/avo/templates/field/components/edit_component.rb.tt +4 -0
- data/lib/generators/avo/templates/field/components/index_component.html.erb.tt +3 -0
- data/lib/generators/avo/templates/field/components/index_component.rb.tt +4 -0
- data/lib/generators/avo/templates/field/components/show_component.html.erb.tt +3 -0
- data/lib/generators/avo/templates/field/components/show_component.rb.tt +4 -0
- data/lib/generators/avo/templates/tool/view.tt +1 -1
- data/public/avo-packs/css/{application-5bdca030.css → application-cb627e0b.css} +97 -35
- data/public/avo-packs/css/application-cb627e0b.css.br +0 -0
- data/public/avo-packs/css/application-cb627e0b.css.gz +0 -0
- data/public/avo-packs/css/application-cb627e0b.css.map +1 -0
- data/public/avo-packs/css/application-cb627e0b.css.map.br +0 -0
- data/public/avo-packs/css/application-cb627e0b.css.map.gz +0 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js +26 -0
- data/public/avo-packs/js/{application-16a456a2b7cb56b01153.js.LICENSE.txt → application-6a0b9e58526ae6bef242.js.LICENSE.txt} +0 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.br +0 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.gz +0 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map +1 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map.br +0 -0
- data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map.gz +0 -0
- data/public/avo-packs/manifest.json +15 -15
- metadata +187 -175
- data/app/components/avo/common/files_list_viewer_component.html.erb +0 -5
- data/app/components/avo/edit/fields/boolean_field_component.rb +0 -4
- data/app/components/avo/edit/fields/boolean_group_field_component.rb +0 -4
- data/app/components/avo/edit/fields/code_field_component.rb +0 -4
- data/app/components/avo/edit/fields/country_field_component.rb +0 -4
- data/app/components/avo/edit/fields/date_field_component.rb +0 -4
- data/app/components/avo/edit/fields/date_time_field_component.rb +0 -4
- data/app/components/avo/edit/fields/external_image_field_component.rb +0 -4
- data/app/components/avo/edit/fields/file_field_component.rb +0 -4
- data/app/components/avo/edit/fields/files_field_component.rb +0 -4
- data/app/components/avo/edit/fields/heading_field_component.rb +0 -4
- data/app/components/avo/edit/fields/hidden_field_component.rb +0 -4
- data/app/components/avo/edit/fields/id_field_component.rb +0 -4
- data/app/components/avo/edit/fields/key_value_field_component.rb +0 -4
- data/app/components/avo/edit/fields/markdown_field_component.rb +0 -4
- data/app/components/avo/edit/fields/number_field_component.rb +0 -4
- data/app/components/avo/edit/fields/password_field_component.rb +0 -4
- data/app/components/avo/edit/fields/select_field_component.rb +0 -4
- data/app/components/avo/edit/fields/status_field_component.rb +0 -4
- data/app/components/avo/edit/fields/text_field_component.rb +0 -4
- data/app/components/avo/edit/fields/textarea_field_component.rb +0 -4
- data/app/components/avo/edit/fields/trix_field_component.rb +0 -4
- data/app/components/avo/index/fields/badge_field_component.html.erb +0 -3
- data/app/components/avo/index/fields/badge_field_component.rb +0 -4
- data/app/components/avo/index/fields/belongs_to_field_component.rb +0 -4
- data/app/components/avo/index/fields/boolean_field_component.html.erb +0 -3
- data/app/components/avo/index/fields/boolean_field_component.rb +0 -4
- data/app/components/avo/index/fields/boolean_group_field_component.html.erb +0 -3
- data/app/components/avo/index/fields/boolean_group_field_component.rb +0 -4
- data/app/components/avo/index/fields/country_field_component.rb +0 -4
- data/app/components/avo/index/fields/date_field_component.rb +0 -4
- data/app/components/avo/index/fields/date_time_field_component.rb +0 -4
- data/app/components/avo/index/fields/external_image_field_component.rb +0 -4
- data/app/components/avo/index/fields/field_component.html.erb +0 -1
- data/app/components/avo/index/fields/field_component.rb +0 -11
- data/app/components/avo/index/fields/file_field_component.rb +0 -4
- data/app/components/avo/index/fields/files_field_component.rb +0 -4
- data/app/components/avo/index/fields/gravatar_field_component.rb +0 -4
- data/app/components/avo/index/fields/has_one_field_component.rb +0 -4
- data/app/components/avo/index/fields/id_field_component.html.erb +0 -10
- data/app/components/avo/index/fields/id_field_component.rb +0 -4
- data/app/components/avo/index/fields/number_field_component.rb +0 -4
- data/app/components/avo/index/fields/select_field_component.rb +0 -4
- data/app/components/avo/index/fields/status_field_component.html.erb +0 -3
- data/app/components/avo/index/fields/status_field_component.rb +0 -4
- data/app/components/avo/index/fields/text_field_component.html.erb +0 -3
- data/app/components/avo/index/fields/text_field_component.rb +0 -4
- data/app/components/avo/show/fields/badge_field_component.html.erb +0 -3
- data/app/components/avo/show/fields/badge_field_component.rb +0 -4
- data/app/components/avo/show/fields/belongs_to_field_component.rb +0 -4
- data/app/components/avo/show/fields/boolean_field_component.rb +0 -4
- data/app/components/avo/show/fields/boolean_group_field_component.html.erb +0 -3
- data/app/components/avo/show/fields/boolean_group_field_component.rb +0 -4
- data/app/components/avo/show/fields/code_field_component.rb +0 -4
- data/app/components/avo/show/fields/country_field_component.rb +0 -4
- data/app/components/avo/show/fields/date_field_component.rb +0 -4
- data/app/components/avo/show/fields/date_time_field_component.rb +0 -4
- data/app/components/avo/show/fields/external_image_field_component.rb +0 -4
- data/app/components/avo/show/fields/file_field_component.html.erb +0 -3
- data/app/components/avo/show/fields/file_field_component.rb +0 -4
- data/app/components/avo/show/fields/files_field_component.html.erb +0 -3
- data/app/components/avo/show/fields/files_field_component.rb +0 -4
- data/app/components/avo/show/fields/gravatar_field_component.rb +0 -4
- data/app/components/avo/show/fields/has_many_field_component.rb +0 -4
- data/app/components/avo/show/fields/has_one_field_component.rb +0 -5
- data/app/components/avo/show/fields/heading_field_component.rb +0 -4
- data/app/components/avo/show/fields/id_field_component.rb +0 -4
- data/app/components/avo/show/fields/key_value_field_component.rb +0 -4
- data/app/components/avo/show/fields/markdown_field_component.rb +0 -4
- data/app/components/avo/show/fields/number_field_component.rb +0 -4
- data/app/components/avo/show/fields/select_field_component.rb +0 -4
- data/app/components/avo/show/fields/status_field_component.html.erb +0 -3
- data/app/components/avo/show/fields/status_field_component.rb +0 -4
- data/app/components/avo/show/fields/text_field_component.rb +0 -4
- data/app/components/avo/show/fields/textarea_field_component.rb +0 -4
- data/app/components/avo/show/fields/trix_field_component.rb +0 -4
- data/public/avo-packs/css/application-5bdca030.css.br +0 -0
- data/public/avo-packs/css/application-5bdca030.css.gz +0 -0
- data/public/avo-packs/css/application-5bdca030.css.map +0 -1
- data/public/avo-packs/css/application-5bdca030.css.map.br +0 -0
- data/public/avo-packs/css/application-5bdca030.css.map.gz +0 -0
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js +0 -26
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js.br +0 -0
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js.gz +0 -0
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js.map +0 -1
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js.map.br +0 -0
- data/public/avo-packs/js/application-16a456a2b7cb56b01153.js.map.gz +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= index_field_wrapper field: @field do %>
|
2
2
|
<% if @field.value.present? %>
|
3
3
|
<% if @field.value.attached? && @field.value.representable? && @field.is_image %>
|
4
|
-
<%= link_to_if @field.link_to_resource, image_tag(@field.variant, class: 'max-h-full'),
|
4
|
+
<%= link_to_if @field.link_to_resource, image_tag(@field.variant, class: 'max-h-full'), resource_path, class: 'block h-8' %>
|
5
5
|
<% else %>
|
6
6
|
<%= @field.value.filename %>
|
7
7
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal, full_width: true do %>
|
2
|
-
<%= render Avo::Common::FilesListViewerComponent.new(field: @field, resource: @resource) if @field.value.present? %>
|
2
|
+
<%= render Avo::Fields::Common::FilesListViewerComponent.new(field: @field, resource: @resource) if @field.value.present? %>
|
3
3
|
|
4
4
|
<%= @form.file_field @field.id, disabled: @field.readonly, multiple: true %>
|
5
5
|
<% end %>
|
File without changes
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= index_field_wrapper field: @field do %>
|
2
|
-
<%= render Avo::Common::GravatarViewerComponent.new(
|
2
|
+
<%= render Avo::Fields::Common::GravatarViewerComponent.new(
|
3
3
|
md5: @field.md5,
|
4
4
|
default: @field.default,
|
5
5
|
size: @field.size,
|
6
6
|
rounded: @field.rounded,
|
7
7
|
link_to_resource: @field.link_to_resource,
|
8
|
-
link:
|
8
|
+
link: resource_path,
|
9
9
|
title: t('avo.view_item', item: @resource.name).humanize
|
10
10
|
)
|
11
11
|
%>
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<div <% if @index == 0 %> class="overflow-hidden rounded-t-xl" <% end %> data-field-id="<%= @field.id %>">
|
2
|
-
<%= render Avo::Common::HeadingComponent.new value: @field.name, as_html: @field.
|
2
|
+
<%= render Avo::Fields::Common::HeadingComponent.new value: @field.name, as_html: @field.as_html %>
|
3
3
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<div <% if @index == 0 %> class="overflow-hidden rounded-t-xl" <% end %> data-field-id="<%= @field.id %>">
|
2
|
-
<%= render Avo::Common::HeadingComponent.new value: @field.name, as_html: @field.
|
2
|
+
<%= render Avo::Fields::Common::HeadingComponent.new value: @field.name, as_html: @field.as_html %>
|
3
3
|
</div>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Avo::Fields::IndexComponent < ViewComponent::Base
|
4
|
+
include Avo::ResourcesHelper
|
5
|
+
|
6
|
+
def initialize(field: nil, resource: nil, index: 0, parent_model: nil)
|
7
|
+
@field = field
|
8
|
+
@resource = resource
|
9
|
+
@index = index
|
10
|
+
@parent_model = parent_model
|
11
|
+
end
|
12
|
+
|
13
|
+
def resource_path
|
14
|
+
if @parent_model.present?
|
15
|
+
helpers.resource_path(@resource.model, via_resource_class: @parent_model.class, via_resource_id: @parent_model.id)
|
16
|
+
else
|
17
|
+
helpers.resource_path(@resource.model)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal, full_width: true do %>
|
2
|
-
<%= render Avo::Common::KeyValueComponent.new field: @field, form: @form, view: :edit %>
|
2
|
+
<%= render Avo::Fields::Common::KeyValueComponent.new field: @field, form: @form, view: :edit %>
|
3
3
|
<% end %>
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= show_field_wrapper field: @field, index: @index, full_width: true do %>
|
2
|
-
<div data-controller="simple-mde"
|
2
|
+
<div data-controller="simple-mde">
|
3
3
|
<%= text_area_tag @field.id, @field.value,
|
4
4
|
class: helpers.input_classes('w-full js-has-simple-mde-editor'),
|
5
5
|
placeholder: @field.placeholder,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class: helpers.input_classes('w-full', has_error: @field.model_errors.include?(@field.id)),
|
4
4
|
placeholder: @field.placeholder,
|
5
5
|
disabled: @field.readonly,
|
6
|
-
min: @field.
|
7
|
-
max: @field.
|
8
|
-
step: @field.
|
6
|
+
min: @field.min,
|
7
|
+
max: @field.max,
|
8
|
+
step: @field.step %>
|
9
9
|
<% end %>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
|
2
|
+
<% if @field.display_value %>
|
3
|
+
<div class="text-center text-sm font-semibold w-full leading-none mb-1">
|
4
|
+
<span class="js-progress-bar-value-<%= @field.id %>"><%= @field.value %></span><%= @field.value_suffix if @field.value_suffix.present? %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<%= @form.range_field @field.id,
|
8
|
+
min: 0,
|
9
|
+
max: @field.max,
|
10
|
+
step: @field.step,
|
11
|
+
class: 'w-full',
|
12
|
+
placeholder: @field.placeholder,
|
13
|
+
disabled: @field.readonly %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
|
17
|
+
<script>
|
18
|
+
var input = document.getElementById('project_progress');
|
19
|
+
var log = document.querySelector('.js-progress-bar-value-<%= @field.id %>');
|
20
|
+
|
21
|
+
input.addEventListener('input', updateValue);
|
22
|
+
|
23
|
+
function updateValue(e) {
|
24
|
+
log.textContent = e.target.value;
|
25
|
+
}
|
26
|
+
</script>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= index_field_wrapper field: @field do %>
|
2
|
+
<% if @field.display_value %>
|
3
|
+
<div class="text-center text-sm font-semibold w-full leading-none mb-1">
|
4
|
+
<%= @field.value %><%= @field.value_suffix if @field.value_suffix.present? %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<progress min="0" max="<%= @field.max %>" value="<%= @field.value %>" class="block w-24"></progress>
|
8
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= show_field_wrapper field: @field, index: @index do %>
|
2
|
+
<% if @field.display_value %>
|
3
|
+
<div class="text-center text-sm font-semibold w-full leading-none mb-1">
|
4
|
+
<%= @field.value %><%= @field.value_suffix if @field.value_suffix.present? %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<progress min="0" max="<%= @field.max %>" value="<%= @field.value %>" class="block w-full"></progress>
|
8
|
+
<% end %>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|