avo 0.5.0.beta4 → 0.5.0.beta9
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 +8 -6
- data/Gemfile.lock +28 -22
- data/app/components/avo/common/badge_viewer_component.html.erb +1 -1
- data/app/components/avo/common/gravatar_viewer_component.html.erb +2 -2
- data/app/components/avo/common/gravatar_viewer_component.rb +2 -1
- data/app/components/avo/edit/fields/trix_field_component.html.erb +1 -1
- data/app/components/avo/index/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/index/fields/belongs_to_field_component.html.erb +1 -5
- data/app/components/avo/index/fields/boolean_group_field_component.html.erb +1 -1
- data/app/components/avo/index/fields/gravatar_field_component.html.erb +2 -1
- data/app/components/avo/index/fields/has_one_field_component.html.erb +1 -5
- data/app/components/avo/index/fields/id_field_component.html.erb +1 -1
- data/app/components/avo/index/grid_item_component.html.erb +8 -8
- data/app/components/avo/index/grid_item_component.rb +6 -12
- data/app/components/avo/index/resource_controls_component.html.erb +12 -4
- data/app/components/avo/index/resource_table_component.html.erb +1 -1
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/show/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/show/fields/boolean_group_field_component.html.erb +1 -1
- data/app/components/avo/show/fields/external_image_field_component.html.erb +1 -1
- data/app/components/avo/views/resource_show_component.html.erb +14 -2
- data/app/controllers/avo/actions_controller.rb +6 -8
- data/app/controllers/avo/application_controller.rb +30 -6
- data/app/controllers/avo/base_controller.rb +5 -16
- data/app/controllers/avo/relations_controller.rb +2 -2
- data/app/controllers/avo/search_controller.rb +1 -1
- data/app/helpers/avo/application_helper.rb +1 -1
- data/app/{frontend/css → packs/entrypoints}/application.css +12 -11
- data/app/{frontend/packs → packs/entrypoints}/application.js +7 -3
- data/app/{frontend → packs}/fonts/nunito-v16-latin-700.eot +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-700.svg +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-700.ttf +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-700.woff +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-700.woff2 +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.eot +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.svg +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.ttf +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.woff +0 -0
- data/app/{frontend → packs}/fonts/nunito-v16-latin-regular.woff2 +0 -0
- data/app/{frontend → packs}/images/logo.png +0 -0
- data/app/{frontend → packs}/importmap.json.erb +0 -0
- data/app/{frontend → packs}/js/controllers/action_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/actions_picker_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/alerts_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/attachments_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/boolean_filter_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/fields/code_field_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/fields/date_field_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/fields/simple_mde_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/filter_controller.js +19 -3
- data/app/{frontend → packs}/js/controllers/hidden_input_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/item_selector_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/modal_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/per_page_controller.js +5 -1
- data/app/{frontend → packs}/js/controllers/select_filter_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/tippy_controller.js +0 -0
- data/app/{frontend → packs}/js/controllers/toggle_panel_controller.js +0 -0
- data/app/{frontend → packs}/js/helpers/cast_boolean.js +0 -0
- data/app/{frontend → packs}/js/toastr.js +0 -0
- data/app/{frontend/css → packs/stylesheets}/alerts.css +0 -0
- data/app/packs/stylesheets/components/code.css +11 -0
- data/app/{frontend/css → packs/stylesheets}/components/status.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/fonts.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/loader.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/pagination.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/tailwindcss/base.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/tailwindcss/components.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/tailwindcss/utilities.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/tooltips.css +0 -0
- data/app/{frontend/css → packs/stylesheets}/typography.css +0 -0
- data/app/{frontend → packs}/svgs/arrow-circle-right.svg +0 -0
- data/app/{frontend → packs}/svgs/arrow-left.svg +0 -0
- data/app/{frontend → packs}/svgs/avocado.svg +0 -0
- data/app/{frontend → packs}/svgs/badge-check-sm.svg +0 -0
- data/app/{frontend → packs}/svgs/check-circle.svg +0 -0
- data/app/{frontend → packs}/svgs/chevron-down.svg +0 -0
- data/app/{frontend → packs}/svgs/chevron-up.svg +0 -0
- data/app/{frontend → packs}/svgs/code.svg +0 -0
- data/app/{frontend → packs}/svgs/color-swatch.svg +0 -0
- data/app/{frontend → packs}/svgs/document-text.svg +0 -0
- data/app/{frontend → packs}/svgs/download.svg +0 -0
- data/app/{frontend → packs}/svgs/edit.svg +0 -0
- data/app/{frontend → packs}/svgs/exclamation-circle-sm.svg +0 -0
- data/app/{frontend → packs}/svgs/exclamation-sm.svg +0 -0
- data/app/{frontend → packs}/svgs/exclamation.svg +0 -0
- data/app/{frontend → packs}/svgs/eye.svg +0 -0
- data/app/{frontend → packs}/svgs/filter.svg +0 -0
- data/app/{frontend → packs}/svgs/fire.svg +0 -0
- data/app/{frontend → packs}/svgs/game-board.svg +0 -0
- data/app/{frontend → packs}/svgs/globe.svg +0 -0
- data/app/{frontend → packs}/svgs/information-circle-sm.svg +0 -0
- data/app/{frontend → packs}/svgs/information-circle.svg +0 -0
- data/app/{frontend → packs}/svgs/library.svg +0 -0
- data/app/{frontend → packs}/svgs/photograph.svg +0 -0
- data/app/{frontend → packs}/svgs/play.svg +0 -0
- data/app/{frontend → packs}/svgs/plus-circle.svg +0 -0
- data/app/{frontend → packs}/svgs/plus.svg +0 -0
- data/app/{frontend → packs}/svgs/question-mark-circle.svg +0 -0
- data/app/{frontend → packs}/svgs/save.svg +0 -0
- data/app/{frontend → packs}/svgs/selector.svg +0 -0
- data/app/{frontend → packs}/svgs/sort-ascending.svg +0 -0
- data/app/{frontend → packs}/svgs/sort-descending.svg +0 -0
- data/app/{frontend → packs}/svgs/switch-horizontal.svg +0 -0
- data/app/{frontend → packs}/svgs/thumbs-down.svg +0 -0
- data/app/{frontend → packs}/svgs/thumbs-up.svg +0 -0
- data/app/{frontend → packs}/svgs/times.svg +0 -0
- data/app/{frontend → packs}/svgs/trash-sm.svg +0 -0
- data/app/{frontend → packs}/svgs/trash.svg +0 -0
- data/app/{frontend → packs}/svgs/view-grid-add.svg +0 -0
- data/app/{frontend → packs}/svgs/view-grid.svg +0 -0
- data/app/{frontend → packs}/svgs/view-list.svg +0 -0
- data/app/{frontend → packs}/svgs/x-circle.svg +0 -0
- data/app/views/avo/actions/show.html.erb +3 -39
- data/app/views/avo/attachments/show.html.erb +8 -1
- data/app/views/avo/base/_actions.html.erb +0 -6
- data/app/views/avo/base/_boolean_filter.html.erb +2 -1
- data/app/views/avo/base/_filters.html.erb +4 -11
- data/app/views/avo/base/_select_filter.html.erb +2 -1
- data/app/views/avo/home/_resources.html.erb +0 -1
- data/app/views/avo/partials/_paginator.html.erb +24 -5
- data/app/views/avo/relations/new.html.erb +5 -1
- data/app/views/layouts/avo/_filter_wrapper.html.erb +1 -1
- data/avo.gemspec +1 -1
- data/bin/helpers.rb +0 -0
- data/bin/rspec +1 -0
- data/bin/webpack +3 -1
- data/config/webpack/aliases.js +1 -1
- data/config/webpack/base.js +14 -0
- data/config/webpack/development.js +2 -2
- data/config/webpack/production.js +2 -2
- data/config/webpack/test.js +2 -2
- data/config/webpacker.yml +10 -62
- data/db/factories.rb +1 -0
- data/lib/avo.rb +5 -16
- data/lib/avo/action_model.rb +20 -0
- data/lib/avo/app.rb +162 -0
- data/lib/avo/base_action.rb +126 -0
- data/lib/avo/base_resource.rb +301 -0
- data/lib/avo/configuration.rb +6 -4
- data/lib/avo/engine.rb +17 -20
- data/lib/avo/{app/fields → fields}/badge_field.rb +1 -1
- data/lib/avo/{app/fields/field.rb → fields/base_field.rb} +22 -16
- data/lib/avo/{app/fields/belongs_to.rb → fields/belongs_to_field.rb} +3 -3
- data/lib/avo/{app/fields → fields}/boolean_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/boolean_group_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/code_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/country_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/currency_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/date_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/date_time_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/external_image_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/field_extensions/has_field_name.rb +2 -9
- data/lib/avo/{app/fields → fields}/field_extensions/visible_in_different_views.rb +1 -1
- data/lib/avo/{app/fields → fields}/file_field.rb +1 -2
- data/lib/avo/{app/fields → fields}/files_field.rb +1 -2
- data/lib/avo/{app/fields → fields}/gravatar_field.rb +2 -2
- data/lib/avo/{app/fields/has_and_belongs_to_many.rb → fields/has_and_belongs_to_many_field.rb} +1 -1
- data/lib/avo/{app/fields/has_many.rb → fields/has_many_field.rb} +1 -1
- data/lib/avo/{app/fields/has_one.rb → fields/has_one_field.rb} +1 -1
- data/lib/avo/{app/fields → fields}/heading_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/hidden_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/id_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/key_value_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/markdown_field.rb +1 -3
- data/lib/avo/{app/fields → fields}/number_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/password_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/select_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/status_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/text_field.rb +1 -1
- data/lib/avo/{app/fields → fields}/textarea_field.rb +0 -2
- data/lib/avo/{app/fields → fields}/trix_field.rb +1 -3
- data/lib/avo/fields_collector.rb +31 -0
- data/lib/avo/filters/base_filter.rb +20 -0
- data/lib/avo/filters/boolean_filter.rb +7 -0
- data/lib/avo/filters/select_filter.rb +7 -0
- data/lib/avo/grid_collector.rb +39 -0
- data/lib/avo/{app/grid_fields → grid_fields}/body_field.rb +0 -2
- data/lib/avo/{app/grid_fields → grid_fields}/grid_field.rb +0 -0
- data/lib/avo/{app/grid_fields → grid_fields}/preview_field.rb +0 -2
- data/lib/avo/{app/grid_fields → grid_fields}/title_field.rb +0 -2
- data/lib/avo/has_context.rb +7 -0
- data/lib/avo/licensing/community_license.rb +6 -0
- data/lib/avo/licensing/h_q.rb +88 -0
- data/lib/avo/licensing/license.rb +50 -0
- data/lib/avo/licensing/license_manager.rb +22 -0
- data/lib/avo/licensing/null_license.rb +14 -0
- data/lib/avo/licensing/pro_license.rb +11 -0
- data/lib/avo/loaders/actions_loader.rb +6 -0
- data/lib/avo/loaders/fields_loader.rb +27 -0
- data/lib/avo/loaders/filters_loader.rb +6 -0
- data/lib/avo/loaders/loader.rb +15 -0
- data/lib/avo/services/authorization_service.rb +93 -0
- data/lib/avo/services/panel_service.rb +27 -0
- data/lib/avo/{app/tools_manager.rb → tools_manager.rb} +0 -0
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/action_generator.rb +11 -5
- data/lib/generators/avo/controller_generator.rb +14 -8
- data/lib/generators/avo/filter_generator.rb +14 -8
- data/lib/generators/avo/install_generator.rb +14 -10
- data/lib/generators/avo/locales_generator.rb +11 -7
- data/lib/generators/avo/partials_generator.rb +11 -5
- data/lib/generators/avo/resource_generator.rb +33 -15
- data/lib/generators/avo/templates/{action.rb → action.tt} +4 -6
- data/lib/generators/avo/templates/filters/boolean_filter.tt +11 -0
- data/lib/generators/avo/templates/filters/select_filter.tt +11 -0
- data/lib/generators/avo/templates/initializer/{avo.rb → avo.tt} +6 -0
- data/lib/generators/avo/templates/resource/controller.tt +2 -0
- data/lib/generators/avo/templates/resource/resource.tt +17 -0
- data/public/avo-packs/css/application-38e7e91b.css +5975 -0
- data/public/avo-packs/css/application-38e7e91b.css.br +0 -0
- data/public/avo-packs/css/application-38e7e91b.css.gz +0 -0
- data/public/avo-packs/css/application-38e7e91b.css.map +1 -0
- data/public/avo-packs/css/application-38e7e91b.css.map.br +0 -0
- data/public/avo-packs/css/application-38e7e91b.css.map.gz +0 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js +2 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.br +0 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.gz +0 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map +1 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map.br +0 -0
- data/public/avo-packs/js/219-9aa2b689f44613118203.chunk.js.map.gz +0 -0
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js +26 -0
- data/public/avo-packs/js/{application-6ba2bd1bca05d69b96e0.js.LICENSE.txt → application-2b90fe889f7d6df1ad92.js.LICENSE.txt} +17 -17
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js.br +0 -0
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js.gz +0 -0
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js.map +1 -0
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js.map.br +0 -0
- data/public/avo-packs/js/application-2b90fe889f7d6df1ad92.js.map.gz +0 -0
- data/public/avo-packs/manifest.json +46 -23
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg → images/13ae283c0d7cc04efe7e.svg} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.br → images/13ae283c0d7cc04efe7e.svg.br} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-00fbd8a72a3708b8314cce5f0515640e.svg.gz → images/13ae283c0d7cc04efe7e.svg.gz} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg → images/195026a50008c53526ef.svg} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.br → images/195026a50008c53526ef.svg.br} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-35bd1c96bc2e402cf22ea812ae067995.svg.gz → images/195026a50008c53526ef.svg.gz} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-cb632c9fe211ba2c2bf1564c9a9295cc.woff → images/1f30e08faa7c60d1f7ac.woff} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf → images/1fd17dabf6b7d2b15348.ttf} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.br → images/1fd17dabf6b7d2b15348.ttf.br} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-2cc22f9c0cf217cbfc371f3b74992305.ttf.gz → images/1fd17dabf6b7d2b15348.ttf.gz} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-bcf84d6cb8a0ac214c8c14ba9af834f3.woff2 → images/39a18f443d434999b89b.woff2} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-412073df419ad5f6f8f2ea76eb4aced9.woff2 → images/4ad349571e28bb59c5a5.woff2} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-2fae1e2418251b68fe5d0505ab93dd5c.eot → images/57a5470848663767abbf.eot} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf → images/b2e4cf0fab6c8ca66b7f.ttf} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.br → images/b2e4cf0fab6c8ca66b7f.ttf.br} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-regular-df8c4bee41b6ca0ed2b7b71456ed7fbb.ttf.gz → images/b2e4cf0fab6c8ca66b7f.ttf.gz} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-df7e79af617f98cd3b95d320e8b2a1af.eot → images/b78d61ab7e046de8c156.eot} +0 -0
- data/public/avo-packs/media/{fonts/nunito-v16-latin-700-7c472b19cb573f537bad8ef62ca917ac.woff → images/c9ab29becb76ddab01d0.woff} +0 -0
- data/public/avo-packs/media/images/{logo-edf8d8d0d263e0c1f73bb32a222d9991.png → f1b4befac91a3336db9a.png} +0 -0
- metadata +195 -193
- data/app/frontend/css/components/code.css +0 -27
- data/app/views/layouts/avo/application_vue.html.erb +0 -61
- data/config/webpack/environment.js +0 -18
- data/config/webpacker_packed.yml +0 -86
- data/db/migrate/20210305082639_add_url_to_teams.rb +0 -5
- data/lib/avo/app/action.rb +0 -145
- data/lib/avo/app/actions_loader.rb +0 -11
- data/lib/avo/app/app.rb +0 -183
- data/lib/avo/app/fields_loader.rb +0 -29
- data/lib/avo/app/filter.rb +0 -23
- data/lib/avo/app/filters/boolean_filter.rb +0 -13
- data/lib/avo/app/filters/select_filter.rb +0 -13
- data/lib/avo/app/licensing/community_license.rb +0 -4
- data/lib/avo/app/licensing/hq.rb +0 -86
- data/lib/avo/app/licensing/license.rb +0 -48
- data/lib/avo/app/licensing/license_manager.rb +0 -25
- data/lib/avo/app/licensing/null_license.rb +0 -12
- data/lib/avo/app/licensing/pro_license.rb +0 -9
- data/lib/avo/app/resource.rb +0 -299
- data/lib/avo/app/resource_grid_fields.rb +0 -30
- data/lib/avo/app/services/authorization_service.rb +0 -110
- data/lib/avo/app/services/panel_service.rb +0 -25
- data/lib/avo/app/tool.rb +0 -5
- data/lib/generators/avo/templates/filters/boolean_filter.rb +0 -17
- data/lib/generators/avo/templates/filters/select_filter.rb +0 -17
- data/lib/generators/avo/templates/resource/%plural_name%_controller.tt +0 -2
- data/lib/generators/avo/templates/resource/%singular_name%.tt +0 -20
- data/public/avo-packs/css/application-3598cfbb.css +0 -6
- data/public/avo-packs/css/application-3598cfbb.css.br +0 -0
- data/public/avo-packs/css/application-3598cfbb.css.gz +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js +0 -2
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.br +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.gz +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map +0 -1
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.br +0 -0
- data/public/avo-packs/js/1-0565987ca0c3045602ad.chunk.js.map.gz +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js +0 -26
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.br +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.gz +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map +0 -1
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map.br +0 -0
- data/public/avo-packs/js/application-6ba2bd1bca05d69b96e0.js.map.gz +0 -0
- data/public/avo-packs/manifest.json.br +0 -0
- data/public/avo-packs/manifest.json.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd4edf66c902806aea55c609cf7265acc8d3242704c3f81f688c804357034343
|
4
|
+
data.tar.gz: f8ccf103ffbb145d5b5263105ba24329290e6d005c28ff7c9c3371a96fedf0d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4ac9daac031f9e81cf5e4bd19797e3e811cbe6b629aff1cefd069b906b7952561798fc4301cd929a2a973678ad889393c058983bc494e6d3e40d37a9d5b3651
|
7
|
+
data.tar.gz: bb58f96475ccf2d3c719fa1b6292a9f76f71c95186fa357e7703963b160d0d9d2e3cf80da8f4355af6a9f48a9930d0c437e8e62d4a580695ba6933a7198bcb7c
|
data/Gemfile
CHANGED
@@ -15,7 +15,7 @@ gemspec
|
|
15
15
|
# gem 'byebug', group: [:development, :test]
|
16
16
|
|
17
17
|
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
|
18
|
-
gem 'webpacker', '
|
18
|
+
gem 'webpacker', '6.0.0.beta.6'
|
19
19
|
|
20
20
|
# SVGs
|
21
21
|
gem 'inline_svg'
|
@@ -73,12 +73,11 @@ gem 'debase'
|
|
73
73
|
#
|
74
74
|
|
75
75
|
group :development do
|
76
|
-
gem '
|
76
|
+
gem 'standard'
|
77
77
|
|
78
78
|
# Release helper
|
79
79
|
gem 'bump', require: false
|
80
80
|
gem 'gem-release', require: false
|
81
|
-
gem 'faker', require: false
|
82
81
|
|
83
82
|
# gem 'rack-mini-profiler'
|
84
83
|
# gem 'memory_profiler'
|
@@ -89,6 +88,10 @@ group :development do
|
|
89
88
|
# gem 'pry-rails'
|
90
89
|
end
|
91
90
|
|
91
|
+
group :development, :test do
|
92
|
+
gem 'faker', require: false
|
93
|
+
end
|
94
|
+
|
92
95
|
group :test do
|
93
96
|
gem 'rspec-rails', '~> 4.0.0'
|
94
97
|
gem 'rails-controller-testing'
|
@@ -97,7 +100,6 @@ group :test do
|
|
97
100
|
gem 'selenium-webdriver'
|
98
101
|
# Easy installation and use of web drivers to run system tests with browsers
|
99
102
|
gem 'webdrivers'
|
100
|
-
# gem 'faker'
|
101
103
|
gem 'fuubar'
|
102
104
|
gem 'simplecov', require: false
|
103
105
|
gem 'simplecov-cobertura'
|
@@ -116,10 +118,10 @@ gem 'httparty'
|
|
116
118
|
|
117
119
|
gem 'iso'
|
118
120
|
|
119
|
-
gem 'i18n-js'
|
120
|
-
|
121
121
|
gem 'hotwire-rails'
|
122
122
|
|
123
123
|
gem 'active_link_to'
|
124
124
|
|
125
125
|
gem 'view_component', require: 'view_component/engine'
|
126
|
+
|
127
|
+
gem 'addressable'
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (0.5.0.
|
4
|
+
avo (0.5.0.beta9)
|
5
5
|
active_link_to
|
6
|
+
addressable
|
6
7
|
countries
|
7
8
|
hotwire-rails
|
8
9
|
httparty
|
9
|
-
i18n-js
|
10
10
|
image_processing
|
11
11
|
inline_svg
|
12
12
|
pagy
|
@@ -79,7 +79,7 @@ GEM
|
|
79
79
|
zeitwerk (~> 2.2, >= 2.2.2)
|
80
80
|
addressable (2.7.0)
|
81
81
|
public_suffix (>= 2.0.2, < 5.0)
|
82
|
-
ast (2.4.
|
82
|
+
ast (2.4.2)
|
83
83
|
bcrypt (3.1.16)
|
84
84
|
bindex (0.8.1)
|
85
85
|
bootsnap (1.4.8)
|
@@ -144,8 +144,6 @@ GEM
|
|
144
144
|
multi_xml (>= 0.5.2)
|
145
145
|
i18n (1.8.9)
|
146
146
|
concurrent-ruby (~> 1.0)
|
147
|
-
i18n-js (3.8.0)
|
148
|
-
i18n (>= 0.6.6)
|
149
147
|
i18n_data (0.10.0)
|
150
148
|
image_processing (1.12.1)
|
151
149
|
mini_magick (>= 4.9.5, < 5)
|
@@ -172,7 +170,9 @@ GEM
|
|
172
170
|
mime-types (3.3.1)
|
173
171
|
mime-types-data (~> 3.2015)
|
174
172
|
mime-types-data (3.2020.0512)
|
175
|
-
mimemagic (0.3.
|
173
|
+
mimemagic (0.3.10)
|
174
|
+
nokogiri (~> 1)
|
175
|
+
rake
|
176
176
|
mini_magick (4.11.0)
|
177
177
|
mini_mime (1.0.2)
|
178
178
|
mini_portile2 (2.5.0)
|
@@ -180,13 +180,13 @@ GEM
|
|
180
180
|
msgpack (1.3.3)
|
181
181
|
multi_xml (0.6.0)
|
182
182
|
nio4r (2.5.5)
|
183
|
-
nokogiri (1.11.
|
183
|
+
nokogiri (1.11.2)
|
184
184
|
mini_portile2 (~> 2.5.0)
|
185
185
|
racc (~> 1.4)
|
186
186
|
orm_adapter (0.5.0)
|
187
187
|
pagy (3.10.0)
|
188
|
-
parallel (1.
|
189
|
-
parser (
|
188
|
+
parallel (1.20.1)
|
189
|
+
parser (3.0.0.0)
|
190
190
|
ast (~> 2.4.1)
|
191
191
|
pg (1.2.3)
|
192
192
|
public_suffix (4.0.6)
|
@@ -257,17 +257,20 @@ GEM
|
|
257
257
|
rspec-mocks (~> 3.9)
|
258
258
|
rspec-support (~> 3.9)
|
259
259
|
rspec-support (3.9.3)
|
260
|
-
rubocop (
|
260
|
+
rubocop (1.11.0)
|
261
261
|
parallel (~> 1.10)
|
262
|
-
parser (>=
|
262
|
+
parser (>= 3.0.0.0)
|
263
263
|
rainbow (>= 2.2.2, < 4.0)
|
264
|
-
regexp_parser (>= 1.
|
264
|
+
regexp_parser (>= 1.8, < 3.0)
|
265
265
|
rexml
|
266
|
-
rubocop-ast (>=
|
266
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
267
267
|
ruby-progressbar (~> 1.7)
|
268
|
-
unicode-display_width (>= 1.4.0, <
|
269
|
-
rubocop-ast (
|
268
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
269
|
+
rubocop-ast (1.4.1)
|
270
270
|
parser (>= 2.7.1.5)
|
271
|
+
rubocop-performance (1.10.1)
|
272
|
+
rubocop (>= 0.90.0, < 2.0)
|
273
|
+
rubocop-ast (>= 0.4.0)
|
271
274
|
ruby-debug-ide (0.7.2)
|
272
275
|
rake (>= 0.8.1)
|
273
276
|
ruby-progressbar (1.10.1)
|
@@ -288,7 +291,7 @@ GEM
|
|
288
291
|
selenium-webdriver (3.142.7)
|
289
292
|
childprocess (>= 0.5, < 4.0)
|
290
293
|
rubyzip (>= 1.2.2)
|
291
|
-
semantic_range (
|
294
|
+
semantic_range (3.0.0)
|
292
295
|
simplecov (0.19.0)
|
293
296
|
docile (~> 1.1)
|
294
297
|
simplecov-html (~> 0.11)
|
@@ -306,6 +309,9 @@ GEM
|
|
306
309
|
actionpack (>= 4.0)
|
307
310
|
activesupport (>= 4.0)
|
308
311
|
sprockets (>= 3.0.0)
|
312
|
+
standard (1.0.4)
|
313
|
+
rubocop (= 1.11.0)
|
314
|
+
rubocop-performance (= 1.10.1)
|
309
315
|
stimulus-rails (0.2.3)
|
310
316
|
rails (>= 6.0.0)
|
311
317
|
test-prof (0.12.2)
|
@@ -316,9 +322,9 @@ GEM
|
|
316
322
|
rails (>= 6.0.0)
|
317
323
|
tzinfo (1.2.9)
|
318
324
|
thread_safe (~> 0.1)
|
319
|
-
unicode-display_width (
|
325
|
+
unicode-display_width (2.0.0)
|
320
326
|
unicode_utils (1.4.0)
|
321
|
-
view_component (2.
|
327
|
+
view_component (2.28.0)
|
322
328
|
activesupport (>= 5.0.0, < 7.0)
|
323
329
|
warden (1.2.9)
|
324
330
|
rack (>= 2.0.9)
|
@@ -335,7 +341,7 @@ GEM
|
|
335
341
|
addressable (>= 2.3.6)
|
336
342
|
crack (>= 0.3.2)
|
337
343
|
hashdiff (>= 0.4.0, < 2.0.0)
|
338
|
-
webpacker (
|
344
|
+
webpacker (6.0.0.beta.6)
|
339
345
|
activesupport (>= 5.2)
|
340
346
|
rack-proxy (>= 0.6.1)
|
341
347
|
railties (>= 5.2)
|
@@ -352,6 +358,7 @@ PLATFORMS
|
|
352
358
|
|
353
359
|
DEPENDENCIES
|
354
360
|
active_link_to
|
361
|
+
addressable
|
355
362
|
avo!
|
356
363
|
bootsnap (>= 1.4.2)
|
357
364
|
bump
|
@@ -368,7 +375,6 @@ DEPENDENCIES
|
|
368
375
|
gem-release
|
369
376
|
hotwire-rails
|
370
377
|
httparty
|
371
|
-
i18n-js
|
372
378
|
image_processing (~> 1.2)
|
373
379
|
inline_svg
|
374
380
|
iso
|
@@ -381,7 +387,6 @@ DEPENDENCIES
|
|
381
387
|
rails (~> 6.0.2, >= 6.0.2.2)
|
382
388
|
rails-controller-testing
|
383
389
|
rspec-rails (~> 4.0.0)
|
384
|
-
rubocop
|
385
390
|
ruby-debug-ide
|
386
391
|
sass-rails (>= 6)
|
387
392
|
selenium-webdriver
|
@@ -389,13 +394,14 @@ DEPENDENCIES
|
|
389
394
|
simplecov-cobertura
|
390
395
|
spring
|
391
396
|
spring-commands-rspec
|
397
|
+
standard
|
392
398
|
test-prof
|
393
399
|
tzinfo-data
|
394
400
|
view_component
|
395
401
|
web-console (>= 3.3.0)
|
396
402
|
webdrivers
|
397
403
|
webmock
|
398
|
-
webpacker (
|
404
|
+
webpacker (= 6.0.0.beta.6)
|
399
405
|
zeitwerk (~> 2.3)
|
400
406
|
|
401
407
|
BUNDLED WITH
|
@@ -17,7 +17,7 @@
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
classes = 'whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold
|
20
|
+
classes = 'whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold block text-center truncate '
|
21
21
|
|
22
22
|
classes += "#{backgrounds[background]} text-white" if backgrounds[background].present?
|
23
23
|
%>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
options[:default] = @default if @default.present?
|
7
7
|
options[:size] = @size if @size.present?
|
8
8
|
query = options.map { |key, value| "#{key}=#{value}" }.join('&')
|
9
|
-
url = URI::
|
9
|
+
url = URI::HTTPS.build(host: "www.gravatar.com", path: "/avatar/#{@md5}", query: query)
|
10
10
|
classes = @rounded ? 'min-w-10 rounded-full' : 'min-w-10'
|
11
11
|
%>
|
12
|
-
<%= link_to_if @link_to_resource.present?, image_tag(url.to_s, class: classes), @link %>
|
12
|
+
<%= link_to_if @link_to_resource.present?, image_tag(url.to_s, class: classes), @link, title: @title %>
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class Avo::Common::GravatarViewerComponent < ViewComponent::Base
|
4
|
-
def initialize(md5: nil, link: nil, default: nil, size: nil, rounded: false, link_to_resource: false)
|
4
|
+
def initialize(md5: nil, link: nil, default: nil, size: nil, rounded: false, link_to_resource: false, title: nil)
|
5
5
|
@md5 = md5
|
6
6
|
@link = link
|
7
7
|
@default = default
|
8
8
|
@size = size
|
9
9
|
@rounded = rounded
|
10
10
|
@link_to_resource = link_to_resource
|
11
|
+
@title = title
|
11
12
|
end
|
12
13
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
|
2
2
|
<% trix_id = "trix_#{@resource.name.underscore}_#{@field.id}" %>
|
3
|
-
<trix-editor input="<%= trix_id %>"
|
3
|
+
<trix-editor input="<%= trix_id %>" value="<%= @field.value %>" placeholder="<%= @field.placeholder %>"><%== @field.value %></trix-editor>
|
4
4
|
<%= @form.text_area @field.id,
|
5
5
|
id: trix_id,
|
6
6
|
class: helpers.input_classes('w-full hidden', has_error: (@resource.model.present? and @resource.model.errors.include?(@field.id))),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<td class="px-4 py-2 leading-tight whitespace-nowrap h-12 text-blue-gray-800 <%= @classes %>" data-field-id="<%= @field.id %>">
|
1
|
+
<td class="px-4 py-2 leading-tight whitespace-nowrap h-12 text-blue-gray-800 <%= @classes %>" data-field-id="<%= @field.id %>" data-field-type="<%= @field.type %>">
|
2
2
|
<% if @field.value.blank? && @dash_if_blank %>
|
3
3
|
—
|
4
4
|
<% else %>
|
@@ -5,7 +5,8 @@
|
|
5
5
|
size: @field.size,
|
6
6
|
rounded: @field.rounded,
|
7
7
|
link_to_resource: @field.link_to_resource,
|
8
|
-
link: helpers.resource_path(@resource.model)
|
8
|
+
link: helpers.resource_path(@resource.model),
|
9
|
+
title: t('avo.view_item', { item: @resource.name}).humanize
|
9
10
|
)
|
10
11
|
%>
|
11
12
|
<% end %>
|
@@ -6,5 +6,5 @@
|
|
6
6
|
path = helpers.resource_path(@resource.model)
|
7
7
|
end
|
8
8
|
%>
|
9
|
-
<% link_to_if (@field.link_to_resource or Avo.configuration.id_links_to_resource), @field.value, path %>
|
9
|
+
<% link_to_if (@field.link_to_resource or Avo.configuration.id_links_to_resource), @field.value, path, title: t('avo.view_item', { item: @resource.name}).humanize %>
|
10
10
|
<% end %>
|
@@ -4,19 +4,19 @@
|
|
4
4
|
<div class="relative w-full pb-3/4 rounded-t-xl overflow-hidden">
|
5
5
|
<%== item_selector_input floating: true, size: :lg %>
|
6
6
|
|
7
|
-
<% if
|
8
|
-
|
9
|
-
<% elsif
|
10
|
-
<% if
|
11
|
-
<%= link_to_if
|
7
|
+
<% if cover.respond_to? :to_image %>
|
8
|
+
<%= link_to_if cover.link_to_resource, image_tag(cover.to_image, class: 'absolute h-full w-full object-cover'), helpers.resource_path(@resource.model), class: 'absolute h-full w-full object-cover', title: title.value %>
|
9
|
+
<% elsif cover.type == 'file' %>
|
10
|
+
<% if cover.value.attached? && cover.value.representable? %>
|
11
|
+
<%= link_to_if cover.link_to_resource, image_tag(cover.variant(resize_to_limit: [480, 480]), class: 'absolute h-full w-full object-cover'), helpers.resource_path(@resource.model), class: 'absolute h-full w-full object-cover', title: title.value %>
|
12
12
|
<% else %>
|
13
13
|
<div class="absolute bg-gray-100 w-full h-full">
|
14
14
|
<%= helpers.svg 'avocado', class: 'relative transform -translate-x-1/2 -translate-y-1/2 h-20 text-gray-400 inset-auto top-1/2 left-1/2' %>
|
15
15
|
</div>
|
16
16
|
<% end %>
|
17
17
|
<% else %>
|
18
|
-
<% if
|
19
|
-
<%= link_to_if
|
18
|
+
<% if cover.value.present? %>
|
19
|
+
<%= link_to_if cover.link_to_resource, image_tag(cover.value, class: 'absolute h-full w-full object-cover'), helpers.resource_path(@resource.model), class: 'absolute h-full w-full object-cover', title: title.value %>
|
20
20
|
<% else %>
|
21
21
|
<div class="absolute bg-gray-100 w-full h-full">
|
22
22
|
<%= helpers.svg 'avocado', class: 'relative transform -translate-x-1/2 -translate-y-1/2 h-20 text-gray-400 inset-auto top-1/2 left-1/2' %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<div class="grid grid-cols-1 place-content-between p-4 h-full">
|
28
28
|
<div class="mb-4">
|
29
29
|
<div class="grid font-semibold leading-tight text-lg mb-2">
|
30
|
-
<%= link_to_if
|
30
|
+
<%= link_to_if title.link_to_resource, title.value, helpers.resource_path(@resource.model) if title.present? %>
|
31
31
|
</div>
|
32
32
|
<div class="text-sm break-words">
|
33
33
|
<%= body.value if body.present? %>
|
@@ -3,29 +3,23 @@
|
|
3
3
|
class Avo::Index::GridItemComponent < ViewComponent::Base
|
4
4
|
include Avo::ResourcesHelper
|
5
5
|
|
6
|
-
def initialize(resource:
|
6
|
+
def initialize(resource: nil, reflection: nil, parent_model: nil)
|
7
7
|
@resource = resource
|
8
8
|
@reflection = reflection
|
9
|
-
@grid_fields = resource.
|
9
|
+
@grid_fields = resource.get_grid_fields
|
10
10
|
@parent_model = parent_model
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
14
|
-
def
|
15
|
-
@grid_fields.
|
16
|
-
field.grid_position == :preview
|
17
|
-
end
|
14
|
+
def cover
|
15
|
+
@grid_fields.cover_field
|
18
16
|
end
|
19
17
|
|
20
18
|
def title
|
21
|
-
@grid_fields.
|
22
|
-
field.grid_position == :title
|
23
|
-
end
|
19
|
+
@grid_fields.title_field
|
24
20
|
end
|
25
21
|
|
26
22
|
def body
|
27
|
-
@grid_fields.
|
28
|
-
field.grid_position == :body
|
29
|
-
end
|
23
|
+
@grid_fields.body_field
|
30
24
|
end
|
31
25
|
end
|
@@ -23,7 +23,9 @@
|
|
23
23
|
<% end %>
|
24
24
|
|
25
25
|
<% if can_detach? %>
|
26
|
-
<%= form_with url: helpers.resource_detach_path(params[:resource_name], params[:id], params[:related_name], @resource.model.id), method: :delete, html: {
|
26
|
+
<%= form_with url: helpers.resource_detach_path(params[:resource_name], params[:id], params[:related_name], @resource.model.id), method: :delete, html: {
|
27
|
+
'data-turbo-frame': params[:turbo_frame]
|
28
|
+
} do |form| %>
|
27
29
|
<%= form.button helpers.svg('trash-sm', class: 'text-gray-400 h-6 hover:text-gray-600'),
|
28
30
|
title: t('avo.detach_item', { item: @resource.model.model_name.name.downcase }).capitalize,
|
29
31
|
type: :submit,
|
@@ -34,12 +36,16 @@
|
|
34
36
|
'tippy': 'tooltip',
|
35
37
|
}
|
36
38
|
%>
|
37
|
-
<%= hidden_field_tag :
|
39
|
+
<%= hidden_field_tag :turbo_frame, params[:turbo_frame], id: "turbo_frame_destroy_#{@resource.model.id}" if params[:turbo_frame] %>
|
40
|
+
<%= hidden_field_tag :referrer, request.fullpath, id: "referrer_destroy_#{@resource.model.id}" if params[:turbo_frame] %>
|
41
|
+
<%#= hidden_field_tag :referrer, request.fullpath, id: "referrer_detach_#{@resource.model.id}" if params[:via_resource_class] %>
|
38
42
|
<% end %>
|
39
43
|
<% end %>
|
40
44
|
|
41
45
|
<% if can_delete? %>
|
42
|
-
<%= form_with url: helpers.resource_path(@resource.model), method: :delete, html: {
|
46
|
+
<%= form_with url: helpers.resource_path(@resource.model), method: :delete, html: {
|
47
|
+
'data-turbo-frame': params[:turbo_frame]
|
48
|
+
} do |form| %>
|
43
49
|
<%= form.button helpers.svg('trash', class: 'text-gray-400 h-6 hover:text-gray-600'),
|
44
50
|
title: t('avo.delete_item', { item: @resource.model.model_name.name.downcase }).capitalize,
|
45
51
|
type: :submit,
|
@@ -50,7 +56,9 @@
|
|
50
56
|
'tippy': 'tooltip',
|
51
57
|
}
|
52
58
|
%>
|
53
|
-
<%= form.hidden_field :
|
59
|
+
<%= form.hidden_field :view_type, value: params[:view_type], id: "turbo_view_type_#{@resource.model.id}" if params[:view_type] %>
|
60
|
+
<%= form.hidden_field :turbo_frame, value: params[:turbo_frame], id: "turbo_frame_destroy_#{@resource.model.id}" if params[:turbo_frame] %>
|
61
|
+
<%= form.hidden_field :referrer, value: request.fullpath, id: "referrer_destroy_#{@resource.model.id}" if params[:turbo_frame] %>
|
54
62
|
<% end %>
|
55
63
|
<% end %>
|
56
64
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="w-full">
|
2
2
|
<% if @resources.present?%>
|
3
3
|
<table class="w-full px-4 overflow-hidden">
|
4
|
-
<%= render partial: 'avo/partials/table_header', locals: {fields: @resource.get_fields(
|
4
|
+
<%= render partial: 'avo/partials/table_header', locals: {fields: @resource.get_fields(reflection: @reflection)} %>
|
5
5
|
<tbody>
|
6
6
|
<% @resources.each_with_index do |resource, index| %>
|
7
7
|
<% cache_if Avo.configuration.cache_resources_on_index_view, resource.cache_hash(@parent_model) do %>
|