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
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
@import 'codemirror/lib/codemirror.css';
|
2
|
+
|
3
|
+
/* themes */
|
4
|
+
@import 'codemirror/theme/dracula.css';
|
5
|
+
@import 'codemirror/theme/eclipse.css';
|
6
|
+
@import 'codemirror/theme/material-darker.css';
|
7
|
+
|
8
|
+
.CodeMirror {
|
9
|
+
height: var(--height) !important;
|
10
|
+
min-height: auto;
|
11
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -7,7 +7,7 @@
|
|
7
7
|
data-resource-id="<%= params[:id] %>"
|
8
8
|
class="hidden text-blue-gray-800"
|
9
9
|
>
|
10
|
-
<%= form_with scope: 'fields', url: "/avo/resources/#{@resource.model_class.model_name.route_key}/actions/#{@action.param_id}", data: {'turbo-frame': '_top', 'action-target': 'form'} do |form| %>
|
10
|
+
<%= form_with model: @model, scope: 'fields', url: "/avo/resources/#{@resource.model_class.model_name.route_key}/actions/#{@action.param_id}", data: {'turbo-frame': '_top', 'action-target': 'form'} do |form| %>
|
11
11
|
<%= render Avo::ModalComponent.new do |c| %>
|
12
12
|
<% c.with :heading do %>
|
13
13
|
<%= @action.name %>
|
@@ -26,46 +26,10 @@
|
|
26
26
|
<% end %>
|
27
27
|
|
28
28
|
<% c.with :controls do %>
|
29
|
-
<%= a_button @action.
|
30
|
-
<%= a_button @action.
|
29
|
+
<%= a_button @action.cancel_button_label, 'data-action': 'click->modal#close', size: :sm %>
|
30
|
+
<%= a_button @action.confirm_button_label, type: :submit, color: :green, size: :sm %>
|
31
31
|
<% end %>
|
32
32
|
<% end %>
|
33
33
|
<% end %>
|
34
34
|
</div>
|
35
35
|
<% end %>
|
36
|
-
|
37
|
-
<%#
|
38
|
-
<div v-if="hasFields">
|
39
|
-
<component
|
40
|
-
v-for="(field, index) in fields"
|
41
|
-
:key="uniqueKey(field, index)"
|
42
|
-
:index="index"
|
43
|
-
:is="`edit-${field.component}`"
|
44
|
-
:field="field"
|
45
|
-
:errors="errors"
|
46
|
-
:resource-name="resourceName"
|
47
|
-
:field-id="field.id"
|
48
|
-
:via-resource-name="viaResourceName"
|
49
|
-
:via-resource-id="viaResourceId"
|
50
|
-
:field-component="field.component"
|
51
|
-
displayed-in="modal"
|
52
|
-
/>
|
53
|
-
</div>
|
54
|
-
<div class="flex-1 flex items-center justify-center px-8 text-lg mt-8 mb-12" v-else>
|
55
|
-
{{ action.message }}
|
56
|
-
</div>
|
57
|
-
<div class="flex justify-end items-baseline space-x-4 p-4 bg-gray-200">
|
58
|
-
<a-button
|
59
|
-
size="sm"
|
60
|
-
@click="$emit('close')"
|
61
|
-
v-text="action.cancel_text"
|
62
|
-
/>
|
63
|
-
<a-button
|
64
|
-
ref="confirm-button"
|
65
|
-
:color="buttonColor"
|
66
|
-
size="sm"
|
67
|
-
@click="handle"
|
68
|
-
v-text="action.confirm_text"
|
69
|
-
/>
|
70
|
-
</div>
|
71
|
-
</div> %>
|
@@ -1,6 +1,13 @@
|
|
1
1
|
<%= turbo_frame_tag 'destroy_attachment_form' do %>
|
2
2
|
<%= form_with url: "/avo/resources/#{params[:resource_name]}/#{params[:id]
|
3
|
-
}/active_storage_attachments/#{params[:attachment_name]}/#{params[:signed_attachment_id]}",
|
3
|
+
}/active_storage_attachments/#{params[:attachment_name]}/#{params[:signed_attachment_id]}",
|
4
|
+
method: :delete,
|
5
|
+
html: {
|
6
|
+
'data-turbo-frame': 'destroy_attachment_form',
|
7
|
+
'data-controller': 'attachments',
|
8
|
+
'data-attachments-target': 'form',
|
9
|
+
class: 'hidden'
|
10
|
+
} do |form| %>
|
4
11
|
<%= form.button 'destroy', type: :submit %>
|
5
12
|
<%= form.hidden_field :referrer, value: request.referer, id: "referrer_destroy_attachment_#{params[:signed_attachment_id]}" %>
|
6
13
|
<% end %>
|
@@ -14,12 +14,6 @@
|
|
14
14
|
>
|
15
15
|
<%
|
16
16
|
@actions.each_with_index do |action, index|
|
17
|
-
case action.class.superclass.to_s
|
18
|
-
when Avo::Filters::SelectFilter.to_s
|
19
|
-
template = 'select_action'
|
20
|
-
when Avo::Filters::BooleanFilter.to_s
|
21
|
-
template = 'boolean_action'
|
22
|
-
end
|
23
17
|
path = action_name == 'show' ?
|
24
18
|
"/avo/resources/#{@resource.model_class.model_name.route_key}/#{@model.id}/actions/#{action.param_id}" :
|
25
19
|
"/avo/resources/#{@resource.model_class.model_name.route_key}/actions/#{action.param_id}"
|
@@ -12,13 +12,14 @@
|
|
12
12
|
set_value = {} if set_value.nil?
|
13
13
|
%>
|
14
14
|
<div data-controller="boolean-filter">
|
15
|
-
<%= filter_wrapper name: filter.name
|
15
|
+
<%= filter_wrapper name: filter.name do %>
|
16
16
|
<div class="flex items-center">
|
17
17
|
<div class="space-y-2">
|
18
18
|
<% filter.options.each do |value, label| %>
|
19
19
|
<label class="flex items-center text-gray-700 text-sm">
|
20
20
|
<%= check_box_tag filter.id, value, set_value[value.to_s],
|
21
21
|
class: 'mr-2 text-lg h-4 w-4',
|
22
|
+
id: "avo_filters_#{filter.id.parameterize.underscore}",
|
22
23
|
'data-filter-class': filter.class,
|
23
24
|
'data-boolean-filter-target': 'option',
|
24
25
|
'data-action': 'input->boolean-filter#changeFilter'
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<%= a_button class: 'focus:outline-none',
|
4
4
|
color: 'blue-gray',
|
5
5
|
title: t('avo.click_to_reveal_filters'),
|
6
|
+
'data-button': 'resource-filters',
|
6
7
|
'data-action': 'click->toggle-panel#togglePanel',
|
7
8
|
'data-tippy': 'tooltip' do
|
8
9
|
%>
|
@@ -10,19 +11,11 @@
|
|
10
11
|
<% end %>
|
11
12
|
|
12
13
|
<div
|
13
|
-
class="absolute block inset-auto right-0 top-full bg-white min-w-300px mt-2 z-20 shadow-context rounded-xl hidden"
|
14
|
+
class="absolute block inset-auto right-0 top-full bg-white min-w-300px mt-2 z-20 shadow-context rounded-xl hidden divide-y divide-gray-300"
|
14
15
|
data-toggle-panel-target="panel"
|
15
16
|
>
|
16
|
-
<%
|
17
|
-
|
18
|
-
case filter.class.superclass.to_s
|
19
|
-
when Avo::Filters::SelectFilter.to_s
|
20
|
-
template = 'avo/base/select_filter'
|
21
|
-
when Avo::Filters::BooleanFilter.to_s
|
22
|
-
template = 'avo/base/boolean_filter'
|
23
|
-
end
|
24
|
-
%>
|
25
|
-
<%= render partial: template, locals: {filter: filter, index: index} %>
|
17
|
+
<% @filters.each do |filter| %>
|
18
|
+
<%= render partial: filter.class.template, locals: {filter: filter} %>
|
26
19
|
<% end %>
|
27
20
|
|
28
21
|
<div class="p-4 border-gray-300 border-t">
|
@@ -7,10 +7,11 @@
|
|
7
7
|
end
|
8
8
|
%>
|
9
9
|
<div data-controller="select-filter">
|
10
|
-
<%= filter_wrapper name: filter.name
|
10
|
+
<%= filter_wrapper name: filter.name do %>
|
11
11
|
<%= select_tag filter.id, options_for_select(filter.options.invert, set_value),
|
12
12
|
class: input_classes('w-full mb-0'),
|
13
13
|
include_blank: '—',
|
14
|
+
id: "avo_filters_#{filter.id.parameterize.underscore}",
|
14
15
|
'data-filter-class': filter.class,
|
15
16
|
'data-select-filter-target': 'selector',
|
16
17
|
'data-action': "change->select-filter#changeFilter"
|
@@ -1,6 +1,11 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
2
|
+
per_page_options = [*Avo.configuration.per_page_steps, Avo.configuration.per_page.to_i, @index_params[:per_page].to_i]
|
3
|
+
|
4
|
+
if @parent_resource.present?
|
5
|
+
per_page_options.prepend Avo.configuration.via_per_page
|
6
|
+
end
|
7
|
+
|
8
|
+
per_page_options = per_page_options.sort.uniq
|
4
9
|
%>
|
5
10
|
|
6
11
|
<div class="bg-white px-4 flex items-center justify-between aborder-t aborder-blue-gray-200 sm:px-6 rounded-xl">
|
@@ -11,11 +16,23 @@
|
|
11
16
|
|
12
17
|
<div data-controller="per-page">
|
13
18
|
<div class="flex items-center">
|
14
|
-
<%= select_tag 'per_page',
|
19
|
+
<%= select_tag 'per_page',
|
20
|
+
options_for_select(per_page_options, @index_params[:per_page]),
|
21
|
+
class: 'appearance-none inline-flex bg-blue-gray-100 disabled:bg-blue-gray-400 disabled:cursor-not-allowed focus:bg-white text-blue-gray-700 disabled:text-blue-gray-600 rounded-md py-1 px-2 leading-tight border border-blue-gray-300 outline-none focus:border-blue-gray-400 outline w-16 mr-1 text-sm',
|
22
|
+
data: {
|
23
|
+
'turbo-frame': turbo_frame,
|
24
|
+
'per-page-target': 'selector',
|
25
|
+
action: 'change->per-page#reload'
|
26
|
+
}
|
27
|
+
%> <%= t('avo.per_page').downcase %>
|
15
28
|
</div>
|
16
29
|
|
17
30
|
<% per_page_options.each do |option| %>
|
18
|
-
|
31
|
+
<% if @parent_resource.present? %>
|
32
|
+
<%= link_to "Change to #{option} items per page", related_resources_path(@parent_resource.model, @resource.model_class, per_page: option, keep_query_params: true), class: 'hidden', 'data-per-page-option': option, 'data-turbo-frame': turbo_frame %>
|
33
|
+
<% else %>
|
34
|
+
<%= link_to "Change to #{option} items per page", resources_path(@resource.model_class, per_page: option, keep_query_params: true), class: 'hidden', 'data-per-page-option': option, 'data-turbo-frame': turbo_frame %>
|
35
|
+
<% end %>
|
19
36
|
<% end %>
|
20
37
|
</div>
|
21
38
|
</div>
|
@@ -24,7 +41,9 @@
|
|
24
41
|
<div class="flex">
|
25
42
|
<div class="flex-2 sm:flex sm:items-center sm:justify-between">
|
26
43
|
<%# @todo: add first & last page. make the first and last buttons rounded %>
|
27
|
-
|
44
|
+
<% if @pagy.pages > 1 %>
|
45
|
+
<%== pagy_nav @pagy %>
|
46
|
+
<% end %>
|
28
47
|
</div>
|
29
48
|
</div>
|
30
49
|
</div>
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<%= turbo_frame_tag 'attach_modal' do %>
|
2
|
-
<%= form_with scope: 'fields',
|
2
|
+
<%= form_with scope: 'fields',
|
3
|
+
url: "/avo/resources/#{params[:resource_name]}/#{params[:id]}/#{params[:related_name]}/",
|
4
|
+
data: {
|
5
|
+
'turbo-frame': '_top'
|
6
|
+
} do |form| %>
|
3
7
|
<%= render Avo::ModalComponent.new do |c| %>
|
4
8
|
<% c.with :heading do %>
|
5
9
|
<%= t('avo.choose_item', { item: params[:related_name].downcase }) %>
|
data/avo.gemspec
CHANGED
@@ -39,9 +39,9 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_dependency 'countries'
|
40
40
|
spec.add_dependency 'pundit'
|
41
41
|
spec.add_dependency 'httparty'
|
42
|
-
spec.add_dependency 'i18n-js'
|
43
42
|
spec.add_dependency 'active_link_to'
|
44
43
|
spec.add_dependency 'image_processing'
|
45
44
|
spec.add_dependency 'view_component'
|
46
45
|
spec.add_dependency 'hotwire-rails'
|
46
|
+
spec.add_dependency 'addressable'
|
47
47
|
end
|
data/bin/helpers.rb
CHANGED
File without changes
|
data/bin/rspec
CHANGED
data/bin/webpack
CHANGED
@@ -2,9 +2,11 @@
|
|
2
2
|
|
3
3
|
ENV['RAILS_ENV'] ||= ENV['RACK_ENV'] || 'development'
|
4
4
|
ENV['NODE_ENV'] ||= 'development'
|
5
|
+
ENV['TAILWIND_MODE'] ||= 'build'
|
5
6
|
|
6
7
|
require 'pathname'
|
7
|
-
ENV[
|
8
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
9
|
+
Pathname.new(__FILE__).realpath)
|
8
10
|
|
9
11
|
require 'rubygems'
|
10
12
|
require 'bundler/setup'
|
data/config/webpack/aliases.js
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
const { webpackConfig, merge } = require('@rails/webpacker')
|
2
|
+
const aliases = require('./aliases')
|
3
|
+
|
4
|
+
const customConfig = {
|
5
|
+
resolve: {
|
6
|
+
extensions: ['.css']
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
const config = merge(webpackConfig, aliases, customConfig)
|
11
|
+
|
12
|
+
delete config.optimization
|
13
|
+
|
14
|
+
module.exports = config
|