avo 3.30.4 → 4.0.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +18 -1
- data/Gemfile.lock +257 -174
- data/README.md +1 -1
- data/app/assets/builds/avo/application.css +13979 -0
- data/app/assets/builds/avo/application.js +1160 -0
- data/app/assets/builds/avo/application.js.map +7 -0
- data/app/assets/builds/avo/late-registration.js +2 -0
- data/app/assets/builds/avo/late-registration.js.map +7 -0
- data/app/assets/config/avo_manifest.js +2 -1
- data/app/assets/images/avo/placeholder.svg +1 -0
- data/app/assets/stylesheets/application.css +250 -0
- data/app/assets/stylesheets/css/button-group.css +23 -0
- data/app/assets/stylesheets/css/components/avatar.css +128 -0
- data/app/assets/stylesheets/css/components/breadcrumbs.css +43 -0
- data/app/assets/stylesheets/css/components/button.css +343 -0
- data/app/assets/stylesheets/css/components/color_scheme_switcher.css +226 -0
- data/app/assets/stylesheets/css/components/discreet_information.css +49 -0
- data/app/assets/stylesheets/css/components/field-wrapper.css +107 -0
- data/app/assets/stylesheets/css/components/grid.css +120 -0
- data/app/assets/stylesheets/css/components/input.css +312 -0
- data/app/assets/stylesheets/css/components/modal.css +228 -0
- data/app/assets/stylesheets/css/components/tooltip.css +25 -0
- data/app/assets/stylesheets/css/components/ui/badge.css +143 -0
- data/app/assets/stylesheets/css/components/ui/card.css +95 -0
- data/app/assets/stylesheets/css/components/ui/checkbox.css +50 -0
- data/app/assets/stylesheets/css/components/ui/description_list.css +3 -0
- data/app/assets/stylesheets/css/components/ui/dropdown.css +68 -0
- data/app/assets/stylesheets/css/components/ui/file_upload_input.css +94 -0
- data/app/assets/stylesheets/css/components/ui/file_upload_item.css +78 -0
- data/app/assets/stylesheets/css/components/ui/panel.css +59 -0
- data/app/assets/stylesheets/css/components/ui/panel_header.css +48 -0
- data/app/assets/stylesheets/css/components/ui/radio.css +22 -0
- data/app/assets/stylesheets/css/components/ui/tabs.css +74 -0
- data/app/assets/stylesheets/css/css-animations.css +54 -0
- data/app/assets/stylesheets/css/fields/code.css +75 -9
- data/app/assets/stylesheets/css/fields/easy-mde.css +7 -0
- data/app/assets/stylesheets/css/fields/key_value.css +97 -0
- data/app/assets/stylesheets/css/fields/progress.css +4 -4
- data/app/assets/stylesheets/css/fields/status.css +7 -1
- data/app/assets/stylesheets/css/fields/tags.css +33 -16
- data/app/assets/stylesheets/css/fields/tiptap.css +17 -15
- data/app/assets/stylesheets/css/fields/trix.css +62 -2
- data/app/assets/stylesheets/css/fonts.css +24 -24
- data/app/assets/stylesheets/css/layout.css +135 -0
- data/app/assets/stylesheets/css/pagination.css +114 -78
- data/app/assets/stylesheets/css/resource-controls.css +13 -0
- data/app/assets/stylesheets/css/search.css +22 -12
- data/app/assets/stylesheets/css/sidebar.css +310 -24
- data/app/assets/stylesheets/css/table.css +60 -0
- data/app/assets/stylesheets/css/tooltips.css +1 -1
- data/app/assets/stylesheets/css/typography.css +10 -1
- data/app/assets/stylesheets/css/variables.css +318 -0
- data/app/assets/svgs/avo/moon-plus-plus.svg +1 -0
- data/app/components/avo/actions_component.html.erb +30 -36
- data/app/components/avo/actions_component.rb +8 -11
- data/app/components/avo/alert_component.html.erb +3 -3
- data/app/components/avo/alert_component.rb +1 -1
- data/app/components/avo/asset_manager/javascript_component.html.erb +1 -2
- data/app/components/avo/backtrace_alert_component.html.erb +4 -4
- data/app/components/avo/base_component.rb +3 -4
- data/app/components/avo/breadcrumb_element_component.html.erb +17 -0
- data/app/components/avo/breadcrumb_element_component.rb +21 -0
- data/app/components/avo/breadcrumbs_component.html.erb +19 -0
- data/app/components/avo/breadcrumbs_component.rb +5 -0
- data/app/components/avo/button_component.rb +20 -126
- data/app/components/avo/clipboard_component.html.erb +3 -2
- data/app/components/avo/clipboard_component.rb +1 -1
- data/app/components/avo/component_missing_component.rb +11 -0
- data/app/components/avo/cover_component.html.erb +3 -0
- data/app/components/avo/cover_component.rb +25 -0
- data/app/components/avo/debug/status_component.html.erb +59 -0
- data/app/components/avo/debug/status_component.rb +30 -0
- data/app/components/avo/description_list_component.rb +11 -0
- data/app/components/avo/discreet_information_component.html.erb +31 -6
- data/app/components/avo/discreet_information_component.rb +23 -32
- data/app/components/avo/divider_component.html.erb +2 -2
- data/app/components/avo/empty_state_component.html.erb +2 -9
- data/app/components/avo/empty_state_component.rb +0 -8
- data/app/components/avo/field_wrapper_component.html.erb +21 -22
- data/app/components/avo/field_wrapper_component.rb +9 -18
- data/app/components/avo/fields/avatar_field/index_component.html.erb +9 -0
- data/app/components/avo/fields/avatar_field/index_component.rb +4 -0
- data/app/components/avo/fields/badge_field/index_component.html.erb +7 -1
- data/app/components/avo/fields/badge_field/show_component.html.erb +6 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +16 -14
- data/app/components/avo/fields/belongs_to_field/edit_component.rb +13 -3
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.rb +2 -3
- data/app/components/avo/fields/code_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/common/boolean_check_component.rb +3 -3
- data/app/components/avo/fields/common/boolean_group_component.html.erb +2 -2
- data/app/components/avo/fields/common/files/controls_component.html.erb +30 -27
- data/app/components/avo/fields/common/files/controls_component.rb +0 -1
- data/app/components/avo/fields/common/files/list_viewer_component.html.erb +4 -5
- data/app/components/avo/fields/common/files/view_type/grid_item_component.html.erb +1 -1
- data/app/components/avo/fields/common/files/view_type/list_item_component.html.erb +7 -19
- data/app/components/avo/fields/common/heading_component.html.erb +2 -2
- data/app/components/avo/fields/common/heading_component.rb +1 -1
- data/app/components/avo/fields/common/key_value_component.html.erb +20 -24
- data/app/components/avo/fields/common/nested_field_component.html.erb +1 -1
- data/app/components/avo/fields/common/nested_field_component.rb +1 -1
- data/app/components/avo/fields/common/progress_bar_component.html.erb +2 -2
- data/app/components/avo/fields/common/stars_component.html.erb +1 -1
- data/app/components/avo/fields/common/status_viewer_component.html.erb +4 -10
- data/app/components/avo/fields/date_field/edit_component.html.erb +14 -1
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +3 -3
- data/app/components/avo/fields/easy_mde_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/edit_component.rb +9 -5
- data/app/components/avo/fields/file_field/edit_component.html.erb +14 -6
- data/app/components/avo/fields/files_field/edit_component.html.erb +11 -4
- data/app/components/avo/fields/has_one_field/show_component.html.erb +10 -9
- data/app/components/avo/fields/heading_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/heading_field/show_component.html.erb +2 -2
- data/app/components/avo/fields/password_field/edit_component.html.erb +5 -7
- data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/radio_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/show_component.rb +4 -7
- data/app/components/avo/fields/stars_field/edit_component.html.erb +3 -4
- data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/tag_component.html.erb +7 -8
- data/app/components/avo/fields/time_field/edit_component.html.erb +3 -3
- data/app/components/avo/fields/tiptap_field/edit_component.html.erb +11 -11
- data/app/components/avo/fields/tiptap_field/show_component.html.erb +4 -4
- data/app/components/avo/fields/trix_field/edit_component.html.erb +2 -2
- data/app/components/avo/filters_component.html.erb +8 -16
- data/app/components/avo/index/field_wrapper_component.html.erb +9 -2
- data/app/components/avo/index/field_wrapper_component.rb +0 -16
- data/app/components/avo/index/grid_cover_empty_state_component.html.erb +16 -2
- data/app/components/avo/index/grid_cover_empty_state_component.rb +90 -0
- data/app/components/avo/index/grid_item_component.html.erb +29 -12
- data/app/components/avo/index/grid_item_component.rb +12 -10
- data/app/components/avo/index/resource_controls_component.html.erb +1 -1
- data/app/components/avo/index/resource_controls_component.rb +7 -17
- data/app/components/avo/index/resource_controls_dropdown_component.html.erb +3 -0
- data/app/components/avo/index/resource_controls_dropdown_component.rb +81 -0
- data/app/components/avo/index/table_row_component.html.erb +11 -11
- data/app/components/avo/items/panel_component.html.erb +8 -18
- data/app/components/avo/items/panel_component.rb +0 -20
- data/app/components/avo/items/switcher_component.html.erb +60 -1
- data/app/components/avo/items/switcher_component.rb +10 -5
- data/app/components/avo/items/visible_items_component.html.erb +2 -1
- data/app/components/avo/items/visible_items_component.rb +1 -0
- data/app/components/avo/media_library/item_details_component.html.erb +2 -2
- data/app/components/avo/media_library/list_component.html.erb +24 -19
- data/app/components/avo/media_library/list_component.rb +2 -2
- data/app/components/avo/media_library/list_item_component.html.erb +3 -3
- data/app/components/avo/modal_component.html.erb +52 -20
- data/app/components/avo/modal_component.rb +7 -12
- data/app/components/avo/paginator_component.html.erb +46 -33
- data/app/components/avo/paginator_component.rb +10 -5
- data/app/components/avo/panel_name_component.html.erb +1 -1
- data/app/components/avo/profile_item_component.html.erb +4 -4
- data/app/components/avo/profile_item_component.rb +2 -4
- data/app/components/avo/referrer_params_component.html.erb +1 -1
- data/app/components/avo/resource_component.rb +8 -19
- data/app/components/avo/resource_listing_component.html.erb +22 -0
- data/app/components/avo/resource_listing_component.rb +28 -0
- data/app/components/avo/resource_sidebar_component.html.erb +2 -2
- data/app/components/avo/resource_sidebar_component.rb +0 -4
- data/app/components/avo/row_component.html.erb +1 -1
- data/app/components/avo/row_selector_component.html.erb +2 -4
- data/app/components/avo/row_selector_component.rb +0 -1
- data/app/components/avo/search_overlay_component.html.erb +6 -0
- data/app/components/avo/search_overlay_component.rb +2 -0
- data/app/components/avo/sidebar/base_item_component.rb +9 -9
- data/app/components/avo/sidebar/group_component.html.erb +23 -27
- data/app/components/avo/sidebar/group_component.rb +4 -0
- data/app/components/avo/sidebar/link_component.html.erb +30 -7
- data/app/components/avo/sidebar/link_component.rb +30 -2
- data/app/components/avo/sidebar/section_component.html.erb +31 -11
- data/app/components/avo/sidebar/section_component.rb +1 -3
- data/app/components/avo/sidebar_component.html.erb +35 -36
- data/app/components/avo/sidebar_component.rb +16 -0
- data/app/components/avo/sidebar_profile_component.html.erb +27 -36
- data/app/components/avo/sidebar_profile_component.rb +14 -0
- data/app/components/avo/tab_group_component.html.erb +21 -9
- data/app/components/avo/tab_group_component.rb +54 -15
- data/app/components/avo/turbo_frame_wrapper_component.html.erb +4 -8
- data/app/components/avo/turbo_frame_wrapper_component.rb +9 -0
- data/app/components/avo/u_i/avatar_component.html.erb +11 -0
- data/app/components/avo/u_i/avatar_component.rb +61 -0
- data/app/components/avo/u_i/badge_component.html.erb +9 -0
- data/app/components/avo/u_i/badge_component.rb +35 -0
- data/app/components/avo/u_i/card_component.html.erb +29 -0
- data/app/components/avo/u_i/card_component.rb +65 -0
- data/app/components/avo/u_i/dropdown_component.html.erb +14 -0
- data/app/components/avo/u_i/dropdown_component.rb +26 -0
- data/app/components/avo/u_i/dropdown_menu_component.html.erb +16 -0
- data/app/components/avo/u_i/dropdown_menu_component.rb +8 -0
- data/app/components/avo/u_i/file_upload_input_component.html.erb +26 -0
- data/app/components/avo/u_i/file_upload_input_component.rb +15 -0
- data/app/components/avo/u_i/file_upload_item_component.html.erb +48 -0
- data/app/components/avo/u_i/file_upload_item_component.rb +17 -0
- data/app/components/avo/u_i/icon_button_component.html.erb +7 -0
- data/app/components/avo/u_i/icon_button_component.rb +22 -0
- data/app/components/avo/u_i/panel_component.html.erb +49 -0
- data/app/components/avo/u_i/panel_component.rb +29 -0
- data/app/components/avo/u_i/panel_header_component.html.erb +37 -0
- data/app/components/avo/u_i/panel_header_component.rb +24 -0
- data/app/components/avo/u_i/search_input_component.html.erb +28 -0
- data/app/components/avo/u_i/search_input_component.rb +12 -0
- data/app/components/avo/u_i/tabs/tab_component.html.erb +26 -0
- data/app/components/avo/u_i/tabs/tab_component.rb +25 -0
- data/app/components/avo/u_i/tabs/tabs_component.html.erb +7 -0
- data/app/components/avo/u_i/tabs/tabs_component.rb +13 -0
- data/app/components/avo/view_types/base_view_type_component.rb +26 -0
- data/app/components/avo/view_types/grid_component.html.erb +18 -0
- data/app/components/avo/view_types/grid_component.rb +4 -0
- data/app/components/avo/view_types/map_component.html.erb +17 -0
- data/app/components/avo/view_types/map_component.rb +110 -0
- data/app/components/avo/view_types/table_component.html.erb +63 -0
- data/app/components/avo/{index/resource_table_component.rb → view_types/table_component.rb} +1 -10
- data/app/components/avo/views/resource_edit_component.html.erb +12 -18
- data/app/components/avo/views/resource_edit_component.rb +1 -27
- data/app/components/avo/views/resource_index_component.html.erb +97 -74
- data/app/components/avo/views/resource_index_component.rb +23 -3
- data/app/components/avo/views/resource_show_component.html.erb +4 -2
- data/app/components/avo/views/resource_show_component.rb +1 -4
- data/app/controllers/avo/associations_controller.rb +1 -1
- data/app/controllers/avo/base_application_controller.rb +7 -5
- data/app/controllers/avo/base_controller.rb +139 -40
- data/app/controllers/avo/debug_controller.rb +0 -29
- data/app/controllers/avo/media_library_controller.rb +17 -1
- data/app/controllers/avo/search_controller.rb +5 -0
- data/app/controllers/concerns/avo/initializes_avo.rb +7 -8
- data/app/helpers/avo/application_helper.rb +60 -46
- data/app/helpers/avo/turbo_stream_actions_helper.rb +10 -1
- data/app/helpers/avo/url_helpers.rb +3 -2
- data/app/javascript/{avo.base.js → application.js} +9 -18
- data/app/javascript/js/application.js +40 -0
- data/app/javascript/js/controllers/action_controller.js +4 -4
- data/app/javascript/js/controllers/actions_overflow_controller.js +21 -6
- data/app/javascript/js/controllers/color_scheme_switcher_controller.js +226 -0
- data/app/javascript/js/controllers/dropdown_menu_controller.js +42 -0
- data/app/javascript/js/controllers/fields/code_field_controller.js +20 -3
- data/app/javascript/js/controllers/fields/easy_mde_controller.js +23 -1
- data/app/javascript/js/controllers/fields/key_value_controller.js +43 -39
- data/app/javascript/js/controllers/fields/panel_refresh_controller.js +4 -0
- data/app/javascript/js/controllers/fields/tags_field_controller.js +2 -2
- data/app/javascript/js/controllers/fields/tags_field_helpers.js +4 -6
- data/app/javascript/js/controllers/grid_cover_empty_state_controller.js +42 -0
- data/app/javascript/js/controllers/item_selector_controller.js +0 -2
- data/app/javascript/js/controllers/loading_button_controller.js +1 -5
- data/app/javascript/js/controllers/map_dark_mode_controller.js +131 -0
- data/app/javascript/js/controllers/menu_controller.js +38 -16
- data/app/javascript/js/controllers/modal_controller.js +16 -0
- data/app/javascript/js/controllers/modal_size_controller.js +83 -0
- data/app/javascript/js/controllers/nested_form_controller.js +2 -2
- data/app/javascript/js/controllers/password_visibility_controller.js +13 -0
- data/app/javascript/js/controllers/preview_controller.js +2 -2
- data/app/javascript/js/controllers/resource_search_controller.js +123 -0
- data/app/javascript/js/controllers/search_controller.js +10 -29
- data/app/javascript/js/controllers/sidebar_controller.js +29 -9
- data/app/javascript/js/controllers/table_row_controller.js +28 -0
- data/app/javascript/js/controllers/tippy_controller.js +1 -1
- data/app/javascript/js/controllers/toggle_controller.js +40 -5
- data/app/javascript/js/controllers.js +14 -2
- data/app/javascript/js/custom-stream-actions.js +10 -8
- data/app/views/avo/actions/show.html.erb +14 -10
- data/app/views/avo/base/_boolean_filter.html.erb +1 -1
- data/app/views/avo/base/_date_time_filter.html.erb +3 -3
- data/app/views/avo/base/_multiple_select_filter.html.erb +1 -1
- data/app/views/avo/base/_new_via_belongs_to.html.erb +2 -3
- data/app/views/avo/base/_text_filter.html.erb +1 -1
- data/app/views/avo/base/preview.html.erb +5 -4
- data/app/views/avo/debug/status.html.erb +5 -92
- data/app/views/avo/debug/status.text.erb +0 -2
- data/app/views/avo/home/_actions.html.erb +1 -1
- data/app/views/avo/home/_dashboards.html.erb +1 -1
- data/app/views/avo/home/_filters.html.erb +1 -1
- data/app/views/avo/home/_resources.html.erb +2 -2
- data/app/views/avo/home/failed_to_load.html.erb +2 -2
- data/app/views/avo/home/index.html.erb +25 -25
- data/app/views/avo/media_library/_form.html.erb +43 -28
- data/app/views/avo/media_library/show.html.erb +7 -3
- data/app/views/avo/modal/_size_selector.html.erb +46 -0
- data/app/views/avo/partials/_alerts.html.erb +1 -1
- data/app/views/avo/partials/_color_scheme_switcher.html.erb +106 -0
- data/app/views/avo/partials/_color_theme_override.html.erb +49 -0
- data/app/views/avo/partials/_confirm_dialog.html.erb +19 -17
- data/app/views/avo/partials/_custom_tools_alert.html.erb +6 -6
- data/app/views/avo/partials/_footer.html.erb +1 -1
- data/app/views/avo/partials/_header.html.erb +1 -1
- data/app/views/avo/partials/_javascript.html.erb +0 -2
- data/app/views/avo/partials/_navbar.html.erb +53 -8
- data/app/views/avo/partials/_sortable_component.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +28 -19
- data/app/views/avo/partials/_view_toggle_button.html.erb +6 -29
- data/app/views/avo/partials/distribution_chart.html.erb +2 -2
- data/app/views/avo/private/_links_and_buttons.html.erb +12 -8
- data/app/views/avo/private/design.html.erb +8 -4
- data/app/views/avo/sidebar/_license_warning.html.erb +3 -3
- data/app/views/layouts/avo/application.html.erb +39 -17
- data/app/views/layouts/avo/modal.html.erb +7 -0
- data/avo.gemspec +3 -4
- data/config/i18n-tasks.yml +1 -1
- data/config/importmap.rb +1 -0
- data/config/initializers/pagy.rb +5 -25
- data/config/routes/dynamic_routes.rb +4 -0
- data/config/routes.rb +6 -7
- data/db/factories.rb +14 -0
- data/lib/avo/asset_manager.rb +2 -0
- data/lib/avo/avatar.rb +7 -0
- data/lib/avo/base_action.rb +16 -4
- data/lib/avo/concerns/breadcrumbs.rb +7 -66
- data/lib/avo/concerns/form_builder.rb +41 -0
- data/lib/avo/concerns/{has_profile_photo.rb → has_avatar.rb} +8 -4
- data/lib/avo/concerns/{has_cover_photo.rb → has_cover.rb} +4 -4
- data/lib/avo/concerns/has_description.rb +9 -0
- data/lib/avo/concerns/has_item_type.rb +6 -2
- data/lib/avo/concerns/has_items.rb +43 -58
- data/lib/avo/concerns/pagination.rb +29 -19
- data/lib/avo/concerns/row_controls_configuration.rb +22 -15
- data/lib/avo/configuration/branding.rb +7 -7
- data/lib/avo/configuration.rb +92 -45
- data/lib/avo/{cover_photo.rb → cover.rb} +2 -2
- data/lib/avo/current.rb +0 -11
- data/lib/avo/discreet_information.rb +52 -29
- data/lib/avo/dsl/field_parser.rb +1 -1
- data/lib/avo/engine.rb +41 -8
- data/lib/avo/error_manager.rb +1 -1
- data/lib/avo/fields/avatar_field.rb +19 -0
- data/lib/avo/fields/badge_field.rb +23 -3
- data/lib/avo/fields/base_field.rb +46 -1
- data/lib/avo/fields/concerns/dom_id.rb +17 -0
- data/lib/avo/fields/concerns/file_authorization.rb +4 -0
- data/lib/avo/fields/concerns/has_html_attributes.rb +1 -1
- data/lib/avo/fields/concerns/is_searchable.rb +2 -5
- data/lib/avo/fields/concerns/nested.rb +1 -1
- data/lib/avo/fields/files_field.rb +2 -2
- data/lib/avo/fields/frame_base_field.rb +2 -2
- data/lib/avo/fields/id_field.rb +5 -1
- data/lib/avo/fields/progress_bar_field.rb +1 -1
- data/lib/avo/fields/text_field.rb +1 -1
- data/lib/avo/photo_object.rb +12 -1
- data/lib/avo/plugin_manager.rb +4 -0
- data/lib/avo/resources/base.rb +33 -21
- data/lib/avo/resources/controls/actions_list.rb +3 -3
- data/lib/avo/resources/controls/base_control.rb +1 -1
- data/lib/avo/resources/items/card.rb +16 -0
- data/lib/avo/resources/items/header.rb +11 -0
- data/lib/avo/resources/items/holder.rb +18 -23
- data/lib/avo/resources/items/item_group.rb +5 -7
- data/lib/avo/resources/items/sidebar.rb +5 -9
- data/lib/avo/resources/items/tab.rb +8 -8
- data/lib/avo/resources/items/tab_group.rb +8 -10
- data/lib/avo/resources/resource_manager.rb +2 -1
- data/lib/avo/services/hq_reporter.rb +102 -0
- data/lib/avo/services/telemetry_service.rb +0 -1
- data/lib/avo/test_helpers.rb +36 -22
- data/lib/avo/u_i_instance.rb +60 -0
- data/lib/avo/version.rb +1 -1
- data/lib/avo/view_inquirer.rb +6 -1
- data/lib/avo/view_types/view_type_manager.rb +70 -0
- data/lib/avo.rb +30 -45
- data/lib/generators/avo/action_generator.rb +1 -1
- data/lib/generators/avo/resource_generator.rb +43 -0
- data/lib/generators/avo/resource_tool_generator.rb +1 -1
- data/lib/generators/avo/tailwindcss/install_generator.rb +0 -6
- data/lib/generators/avo/templates/cards/partial_card_partial.tt +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +7 -9
- data/lib/generators/avo/templates/locales/avo.ar.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.de.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.en.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.es.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.fr.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.it.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ja.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nb.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nl.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nn.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pl.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pt-BR.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pt.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ro.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ru.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.tr.yml +25 -0
- data/lib/generators/avo/templates/locales/{avo.uk.yml → avo.ua.yml} +26 -1
- data/lib/generators/avo/templates/locales/avo.zh-TW.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.zh.yml +25 -0
- data/lib/generators/avo/templates/resource/resource.tt +10 -1
- data/lib/generators/avo/templates/resource_tools/partial.tt +20 -22
- data/lib/generators/avo/templates/tailwindcss/avo.tailwind.css +1 -3
- data/lib/generators/avo/templates/tailwindcss/tailwind.config.js +0 -7
- data/lib/generators/avo/templates/tool/view.tt +14 -16
- data/lib/generators/avo/tool_generator.rb +3 -3
- data/lib/generators/avo/version_generator.rb +1 -1
- data/lib/tasks/avo_tasks.rake +29 -25
- metadata +145 -97
- data/app/assets/stylesheets/avo.base.css +0 -130
- data/app/assets/stylesheets/css/breadcrumbs.css +0 -16
- data/app/assets/stylesheets/css/buttons.css +0 -19
- data/app/assets/stylesheets/css/tailwindcss/base.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/components.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/utilities.css +0 -1
- data/app/assets/svgs/avo/arrow-down.svg +0 -3
- data/app/assets/svgs/avo/arrow-up.svg +0 -3
- data/app/assets/svgs/avo/detach.svg +0 -8
- data/app/assets/svgs/avo/download-solid-reversed.svg +0 -3
- data/app/assets/svgs/avo/download-solid.svg +0 -3
- data/app/assets/svgs/avo/edit.svg +0 -5
- data/app/assets/svgs/avo/editor-bold.svg +0 -1
- data/app/assets/svgs/avo/editor-italic.svg +0 -1
- data/app/assets/svgs/avo/editor-link.svg +0 -1
- data/app/assets/svgs/avo/editor-list.svg +0 -1
- data/app/assets/svgs/avo/editor-strike.svg +0 -1
- data/app/assets/svgs/avo/editor-underline.svg +0 -1
- data/app/assets/svgs/avo/eye.svg +0 -1
- data/app/assets/svgs/avo/trash-sm.svg +0 -3
- data/app/assets/svgs/avo/trash.svg +0 -7
- data/app/components/avo/cover_photo_component.html.erb +0 -3
- data/app/components/avo/cover_photo_component.rb +0 -19
- data/app/components/avo/fields/common/badge_viewer_component.html.erb +0 -1
- data/app/components/avo/fields/common/badge_viewer_component.rb +0 -33
- data/app/components/avo/index/resource_grid_component.html.erb +0 -23
- data/app/components/avo/index/resource_grid_component.rb +0 -10
- data/app/components/avo/index/resource_map_component.html.erb +0 -16
- data/app/components/avo/index/resource_map_component.rb +0 -114
- data/app/components/avo/index/resource_table_component.html.erb +0 -52
- data/app/components/avo/panel_component.html.erb +0 -63
- data/app/components/avo/panel_component.rb +0 -43
- data/app/components/avo/panel_header_component.html.erb +0 -42
- data/app/components/avo/panel_header_component.rb +0 -31
- data/app/components/avo/profile_photo_component.html.erb +0 -6
- data/app/components/avo/profile_photo_component.rb +0 -9
- data/app/components/avo/sidebar/heading_component.html.erb +0 -21
- data/app/components/avo/sidebar/heading_component.rb +0 -9
- data/app/components/avo/tab_switcher_component.html.erb +0 -20
- data/app/components/avo/tab_switcher_component.rb +0 -45
- data/app/views/avo/base/close_modal_and_reload_field.turbo_stream.erb +0 -8
- data/app/views/avo/debug/report.html.erb +0 -37
- data/app/views/avo/partials/_panel_breadcrumbs.html.erb +0 -3
- data/app/views/avo/partials/_resource_search.html.erb +0 -16
- data/lib/avo/licensing/community_license.rb +0 -6
- data/lib/avo/licensing/h_q.rb +0 -202
- data/lib/avo/licensing/license.rb +0 -76
- data/lib/avo/licensing/license_manager.rb +0 -24
- data/lib/avo/licensing/nil_license.rb +0 -14
- data/lib/avo/licensing/pro_license.rb +0 -20
- data/lib/avo/licensing/request.rb +0 -20
- data/lib/avo/profile_photo.rb +0 -7
- data/lib/avo/services/debug_service.rb +0 -107
- data/public/avo-assets/placeholder.svg +0 -1
- data/tailwind.preset.js +0 -171
- /data/{public/avo-assets → app/assets/images/avo}/favicon.ico +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logo-on-white.png +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logo.png +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logomark.png +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
@import './../../../node_modules/easymde/dist/easymde.min.css';
|
|
2
|
-
@import './../../../node_modules/tippy.js/dist/tippy.css';
|
|
3
|
-
@import './../../../node_modules/tippy.js/themes/light.css';
|
|
4
|
-
@import './../../../node_modules/flatpickr/dist/flatpickr.css';
|
|
5
|
-
@import './../../../node_modules/@algolia/autocomplete-theme-classic/dist/theme.css';
|
|
6
|
-
@import './../../../node_modules/@yaireo/tagify/dist/tagify.css';
|
|
7
|
-
@import './../../../node_modules/mapbox-gl/dist/mapbox-gl.css';
|
|
8
|
-
|
|
9
|
-
@import 'tailwindcss/base';
|
|
10
|
-
|
|
11
|
-
@import './css/fonts.css';
|
|
12
|
-
@import './css/buttons.css';
|
|
13
|
-
@import './css/typography.css';
|
|
14
|
-
@import './css/tooltips.css';
|
|
15
|
-
@import './css/loader.css';
|
|
16
|
-
@import './css/pagination.css';
|
|
17
|
-
@import './css/breadcrumbs.css';
|
|
18
|
-
@import './css/search.css';
|
|
19
|
-
@import './css/active-storage.css';
|
|
20
|
-
@import './css/scrollbar.css';
|
|
21
|
-
@import './css/sidebar.css';
|
|
22
|
-
@import './css/spinner.css';
|
|
23
|
-
|
|
24
|
-
@import './css/fields/status.css';
|
|
25
|
-
@import './css/fields/code.css';
|
|
26
|
-
@import './css/fields/progress.css';
|
|
27
|
-
@import './css/fields/trix.css';
|
|
28
|
-
@import './css/fields/tags.css';
|
|
29
|
-
@import './css/fields/tiptap.css';
|
|
30
|
-
@import './css/fields/stars.css';
|
|
31
|
-
|
|
32
|
-
@import 'tailwindcss/components';
|
|
33
|
-
|
|
34
|
-
@import 'tailwindcss/utilities';
|
|
35
|
-
|
|
36
|
-
html,
|
|
37
|
-
body {
|
|
38
|
-
@apply antialiased relative h-full;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.will-change-transform {
|
|
42
|
-
will-change: transform;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.fade-enter-active,
|
|
46
|
-
.fade-leave-active {
|
|
47
|
-
will-change: opacity;
|
|
48
|
-
will-change: transform;
|
|
49
|
-
|
|
50
|
-
@apply transition transform duration-150;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.fade-enter-active {
|
|
54
|
-
@apply relative ease-out delay-150;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.fade-leave-active {
|
|
58
|
-
@apply relative ease-in;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.fade-enter {
|
|
62
|
-
@apply delay-150 opacity-0 -translate-y-1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.fade-enter-to {
|
|
66
|
-
@apply delay-150 opacity-100 translate-y-0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.fade-leave {
|
|
70
|
-
@apply opacity-100 translate-y-0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.fade-leave-to {
|
|
74
|
-
@apply opacity-0 translate-y-1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.turbo-progress-bar {
|
|
78
|
-
@apply bg-primary-400;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
body.os-mac .mac\:hidden {
|
|
82
|
-
display: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
body.os-pc .pc\:hidden {
|
|
86
|
-
display: none;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
trix-editor {
|
|
90
|
-
max-height: 320px !important;
|
|
91
|
-
overflow-y: auto;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
dialog#turbo-confirm {
|
|
95
|
-
@apply bg-transparent;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
dl {
|
|
99
|
-
@apply text-sm grid gap-x-2 grid-cols-[max-content_1fr];
|
|
100
|
-
|
|
101
|
-
dt {
|
|
102
|
-
@apply font-bold;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
dd {
|
|
106
|
-
@apply ml-0 col-start-2;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/* TODO: make content like tailwindcss */
|
|
111
|
-
.floating-row-controls {
|
|
112
|
-
&:before {
|
|
113
|
-
content: "";
|
|
114
|
-
@apply absolute z-10 inset-auto left-0 top-0 mt-0 -translate-x-full w-3 h-full bg-gradient-to-l from-white to-transparent group-hover:from-gray-50;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&:has([data-toggle-target="panel"]:not(.hidden)) {
|
|
118
|
-
@apply z-30 opacity-100
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.shift-pressed {
|
|
123
|
-
& .highlighted-row {
|
|
124
|
-
@apply !bg-neutral-200;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.selected-row {
|
|
129
|
-
@apply !bg-neutral-100;
|
|
130
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@tailwind base;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@tailwind components;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@tailwind utilities;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor">
|
|
2
|
-
<path d="M9 6.75V4.5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M15 19.5V17.25" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M6.75 9H4.5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
<path d="M19.5 15H17.25" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
-
<path d="M6.65614 12.0376L5.59676 13.097C4.89311 13.8006 4.4978 14.755 4.4978 15.7501C4.4978 16.2428 4.59485 16.7307 4.78341 17.186C4.97197 17.6412 5.24835 18.0548 5.59676 18.4032C5.94518 18.7516 6.3588 19.028 6.81403 19.2166C7.26925 19.4051 7.75716 19.5022 8.24989 19.5022C9.245 19.5022 10.1994 19.1069 10.903 18.4032L11.9624 17.3438" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
-
<path d="M17.3438 11.9626L18.4032 10.9033C19.1069 10.1996 19.5022 9.24525 19.5022 8.25013C19.5022 7.25502 19.1069 6.30066 18.4032 5.59701C17.6996 4.89335 16.7452 4.49805 15.7501 4.49805C14.755 4.49805 13.8006 4.89335 13.097 5.59701L12.0376 6.65638" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
2
|
-
<path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" transform="rotate(-180 10 10)" />
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
2
|
-
<path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
|
|
3
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor">
|
|
2
|
-
<path d="M9.00001 20.2499H4.5C4.30109 20.2499 4.11033 20.1709 3.96967 20.0302C3.82902 19.8896 3.75 19.6988 3.75 19.4999V15.3093C3.74966 15.2119 3.76853 15.1154 3.80553 15.0253C3.84253 14.9352 3.89694 14.8533 3.96563 14.7843L15.2156 3.53429C15.2854 3.46343 15.3686 3.40715 15.4603 3.36874C15.5521 3.33033 15.6506 3.31055 15.75 3.31055C15.8495 3.31055 15.9479 3.33033 16.0397 3.36874C16.1314 3.40715 16.2146 3.46343 16.2844 3.53429L20.4656 7.71554C20.5365 7.78533 20.5928 7.86851 20.6312 7.96026C20.6696 8.052 20.6894 8.15046 20.6894 8.24992C20.6894 8.34938 20.6696 8.44784 20.6312 8.53958C20.5928 8.63132 20.5365 8.71451 20.4656 8.78429L9.00001 20.2499Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M20.25 20.25H9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M12.75 6L18 11.25" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z"></path><path d="m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;"><path d="M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z"></path></svg>
|
data/app/assets/svgs/avo/eye.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor"><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
|
|
2
|
-
<path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" />
|
|
3
|
-
</svg>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor">
|
|
2
|
-
<path d="M20.25 5.25H3.75" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M9.75 9.75V15.75" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M14.25 9.75V15.75" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
<path d="M18.75 5.25V19.5C18.75 19.6989 18.671 19.8897 18.5303 20.0303C18.3897 20.171 18.1989 20.25 18 20.25H6C5.80109 20.25 5.61032 20.171 5.46967 20.0303C5.32902 19.8897 5.25 19.6989 5.25 19.5V5.25" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
-
<path d="M15.75 5.25V3.75C15.75 3.35218 15.592 2.97064 15.3107 2.68934C15.0294 2.40804 14.6478 2.25 14.25 2.25H9.75C9.35218 2.25 8.97064 2.40804 8.68934 2.68934C8.40804 2.97064 8.25 3.35218 8.25 3.75V5.25" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
-
</svg>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class Avo::CoverPhotoComponent < Avo::BaseComponent
|
|
4
|
-
prop :cover_photo
|
|
5
|
-
prop :size do |value|
|
|
6
|
-
@cover_photo&.size
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
# aspect-cover-sm
|
|
10
|
-
# aspect-cover-md
|
|
11
|
-
# aspect-cover-lg
|
|
12
|
-
def size_class
|
|
13
|
-
"aspect-cover-#{@size}"
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def render?
|
|
17
|
-
@cover_photo.present? && @cover_photo.visible_in_current_view?
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span class="<%= classes %>"><%= @value %></span>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class Avo::Fields::Common::BadgeViewerComponent < Avo::BaseComponent
|
|
4
|
-
prop :value
|
|
5
|
-
prop :options
|
|
6
|
-
|
|
7
|
-
def after_initialize
|
|
8
|
-
@backgrounds = {
|
|
9
|
-
info: "bg-blue-500",
|
|
10
|
-
success: "bg-green-500",
|
|
11
|
-
danger: "bg-red-500",
|
|
12
|
-
warning: "bg-yellow-500",
|
|
13
|
-
neutral: "bg-gray-500"
|
|
14
|
-
}
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def classes
|
|
18
|
-
background = :info
|
|
19
|
-
|
|
20
|
-
@options.invert.each do |values, type|
|
|
21
|
-
if [values].flatten.map { |value| value.to_s }.include? @value.to_s
|
|
22
|
-
background = type.to_sym
|
|
23
|
-
next
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
classes = "whitespace-nowrap rounded-md uppercase px-2 py-1 text-xs font-bold block text-center truncate w-full max-w-[120px] "
|
|
28
|
-
|
|
29
|
-
classes += "#{@backgrounds[background]} text-white" if @backgrounds[background].present?
|
|
30
|
-
|
|
31
|
-
classes
|
|
32
|
-
end
|
|
33
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<% if @resources.present? %>
|
|
2
|
-
<turbo-frame id="<%= @resource.model_key %>_list" target="_top" class="relative w-full">
|
|
3
|
-
<%= content_tag :div,
|
|
4
|
-
class:"w-full grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6 gap-6 mt-8",
|
|
5
|
-
data: {
|
|
6
|
-
component_name: self.class.to_s.underscore,
|
|
7
|
-
selected_resources_name: @resource.model_key,
|
|
8
|
-
selected_resources: [],
|
|
9
|
-
**(try(:drag_reorder_data_attributes) || {})
|
|
10
|
-
} do %>
|
|
11
|
-
<% @resources.each_with_index do |resource, index| %>
|
|
12
|
-
<% cache_if Avo.configuration.cache_resources_on_index_view, resource.cache_hash(@parent_record) do %>
|
|
13
|
-
<%= render(resource.resolve_component(Avo::Index::GridItemComponent).new(resource: resource, reflection: @reflection, parent_record: @parent_record, parent_resource: @parent_resource, actions: actions)) %>
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% end %>
|
|
17
|
-
</turbo-frame>
|
|
18
|
-
<% else %>
|
|
19
|
-
<div class="bg-white rounded shadow-panel"
|
|
20
|
-
data-component-name="<%= self.class.to_s.underscore %>">
|
|
21
|
-
<%= helpers.empty_state by_association: params[:related_name].present?, view_type: :grid %>
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<% if @resources.present? %>
|
|
2
|
-
<div class="map-view-container grid <%= grid_layout_classes %>">
|
|
3
|
-
<div class="map-component min-h-full <%= map_component_order_class %>">
|
|
4
|
-
<%= js_map(resource_location_markers, **resource_mapkick_options) %>
|
|
5
|
-
</div>
|
|
6
|
-
<% if render_table? %>
|
|
7
|
-
<div class="overflow-auto <%= table_component_order_class %>">
|
|
8
|
-
<%= render(@resource.resolve_component(Avo::Index::ResourceTableComponent).new(resources: @resources, resource: @resource, reflection: @reflection, parent_record: @parent_record, parent_resource: @parent_resource, pagy: @pagy, query: @query)) %>
|
|
9
|
-
</div>
|
|
10
|
-
<% end %>
|
|
11
|
-
</div>
|
|
12
|
-
<% else %>
|
|
13
|
-
<div class="bg-white rounded shadow-panel">
|
|
14
|
-
<%= helpers.empty_state by_association: params[:related_name].present?, view_type: :map %>
|
|
15
|
-
</div>
|
|
16
|
-
<% end %>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Avo
|
|
4
|
-
module Index
|
|
5
|
-
# Render a map view for a list of resources, where each resource is
|
|
6
|
-
# expected to have an attribute/attribute set representing its location.
|
|
7
|
-
class ResourceMapComponent < Avo::BaseComponent
|
|
8
|
-
attr_reader :resources
|
|
9
|
-
|
|
10
|
-
def initialize(resources: nil, resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, pagy: nil, query: nil)
|
|
11
|
-
@resources = resources
|
|
12
|
-
@resource = resource
|
|
13
|
-
@reflection = reflection
|
|
14
|
-
@parent_record = parent_record
|
|
15
|
-
@parent_resource = parent_resource
|
|
16
|
-
@pagy = pagy
|
|
17
|
-
@query = query
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
delegate :js_map, to: :helpers
|
|
21
|
-
|
|
22
|
-
def grid_layout_classes
|
|
23
|
-
return unless render_table?
|
|
24
|
-
|
|
25
|
-
if table_positioned_horizontally
|
|
26
|
-
"grid-flow-row sm:grid-flow-col grid-rows-1 auto-cols-fr"
|
|
27
|
-
elsif table_positioned_vertically
|
|
28
|
-
"grid-flow-row grid-cols-1"
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def table_positioned_horizontally
|
|
33
|
-
%i[left right].include?(map_view_table_layout)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def table_positioned_vertically
|
|
37
|
-
%i[bottom top].include?(map_view_table_layout)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def map_component_order_class
|
|
41
|
-
if render_table? && table_positioned_at_the_start
|
|
42
|
-
"order-last"
|
|
43
|
-
else
|
|
44
|
-
"order-first"
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def table_component_order_class
|
|
49
|
-
if table_positioned_at_the_start
|
|
50
|
-
"order-first"
|
|
51
|
-
else
|
|
52
|
-
"order-last"
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def table_positioned_at_the_start
|
|
57
|
-
%i[left top].include?(map_view_table_layout)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def map_view_table_layout
|
|
61
|
-
map_options.dig(:table, :layout)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def resource_location_markers
|
|
65
|
-
# If we have no proc and no default location method, don't try to create markers
|
|
66
|
-
return [] unless resource_mappable?
|
|
67
|
-
|
|
68
|
-
records_markers = resources
|
|
69
|
-
.map do |resource|
|
|
70
|
-
Avo::ExecutionContext.new(target: marker_proc, record: resource.record).handle
|
|
71
|
-
end
|
|
72
|
-
.compact
|
|
73
|
-
.filter do |coordinates|
|
|
74
|
-
coordinates[:latitude].present? && coordinates[:longitude].present?
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
return records_markers if map_options[:extra_markers].nil?
|
|
78
|
-
|
|
79
|
-
records_markers + Avo::ExecutionContext.new(target: map_options[:extra_markers]).handle
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def resource_mapkick_options
|
|
83
|
-
map_options[:mapkick_options] || {}
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def render_table?
|
|
87
|
-
map_options.dig(:table, :visible)
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
private
|
|
91
|
-
|
|
92
|
-
def default_record_marker_proc
|
|
93
|
-
lambda {
|
|
94
|
-
{
|
|
95
|
-
latitude: record.coordinates.first,
|
|
96
|
-
longitude: record.coordinates.last
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
def map_options
|
|
102
|
-
@resource.map_view || {}
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def marker_proc
|
|
106
|
-
map_options[:record_marker] || default_record_marker_proc
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
def resource_mappable?
|
|
110
|
-
map_options[:record_marker].present? || map_options[:extra_markers].present? || @resources.first.record.respond_to?(:coordinates)
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<turbo-frame id="<%= @resource.model_key %>_list" target="_top" class="relative w-full">
|
|
2
|
-
<div class="w-full relative overflow-auto mac-styled-scrollbar"
|
|
3
|
-
data-component-name="<%= self.class.to_s.underscore %>"
|
|
4
|
-
data-controller="item-select-all"
|
|
5
|
-
data-resource-name="<%= @resource.model_key %>"
|
|
6
|
-
data-item-select-all-selected-all-value="false"
|
|
7
|
-
data-item-select-all-selected-all-query-value="<%= encrypted_query %>"
|
|
8
|
-
data-item-select-all-page-count-value="<%= @pagy.pages %>"
|
|
9
|
-
data-selected-resources-name="<%= @resource.model_key %>"
|
|
10
|
-
data-selected-resources="[]"
|
|
11
|
-
>
|
|
12
|
-
<% if @pagy.pages > 1 %>
|
|
13
|
-
<div class="absolute z-30 w-[calc(100%-2.5rem)] ml-10 pt-px hidden" data-item-select-all-target="selectAllOverlay">
|
|
14
|
-
<div class="bg-white flex items-center h-9 mt-0.5">
|
|
15
|
-
<div class="mt-1.5" data-item-select-all-target="unselectedMessage">
|
|
16
|
-
<%= selected_page_label %>
|
|
17
|
-
<%= a_link request.url,
|
|
18
|
-
size: :xs,
|
|
19
|
-
color: :primary,
|
|
20
|
-
class: "relative -top-[0.1rem] ml-2 cursor-pointer text-primary-500",
|
|
21
|
-
data: {action: "click->item-select-all#selectAll"} do
|
|
22
|
-
%>
|
|
23
|
-
<%= t "avo.select_all_matching" %>
|
|
24
|
-
<% end %>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="mt-1.5" data-item-select-all-target="selectedMessage" class="hidden">
|
|
27
|
-
<%= selected_all_label %>
|
|
28
|
-
<%= a_link request.url,
|
|
29
|
-
size: :xs,
|
|
30
|
-
color: :primary,
|
|
31
|
-
class: "relative -top-[0.1rem] ml-2 cursor-pointer text-primary-500",
|
|
32
|
-
data: {action: "click->item-select-all#selectAll"} do
|
|
33
|
-
%>
|
|
34
|
-
<%= t("avo.undo").humanize %>
|
|
35
|
-
<% end %>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<% end %>
|
|
40
|
-
<table class="w-full px-4 bg-white">
|
|
41
|
-
<%= render partial: 'avo/partials/table_header', locals: {fields: @header_fields} %>
|
|
42
|
-
<%= content_tag :tbody, class: "divide-y",
|
|
43
|
-
data: {
|
|
44
|
-
**(try(:drag_reorder_data_attributes) || {}),
|
|
45
|
-
} do %>
|
|
46
|
-
<% @table_row_components.each do |table_row_component| %>
|
|
47
|
-
<%= render table_row_component %>
|
|
48
|
-
<% end %>
|
|
49
|
-
<% end %>
|
|
50
|
-
</table>
|
|
51
|
-
</div>
|
|
52
|
-
</turbo-frame>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div, class: classes, data: data_attributes do %>
|
|
2
|
-
<%= render Avo::CoverPhotoComponent.new cover_photo: @cover_photo %>
|
|
3
|
-
<%= render Avo::PanelHeaderComponent.new(
|
|
4
|
-
name: @name,
|
|
5
|
-
description: @description,
|
|
6
|
-
display_breadcrumbs: @display_breadcrumbs,
|
|
7
|
-
profile_photo: @profile_photo,
|
|
8
|
-
external_link: @external_link,
|
|
9
|
-
discreet_information: @discreet_information
|
|
10
|
-
) do |header| %>
|
|
11
|
-
<% if name_slot.present? %>
|
|
12
|
-
<% header.with_name_slot do %>
|
|
13
|
-
<%= name_slot %>
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% if tools.present? %>
|
|
17
|
-
<% header.with_tools do %>
|
|
18
|
-
<%= tools %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<% end %>
|
|
21
|
-
<% end %>
|
|
22
|
-
<% if body? %>
|
|
23
|
-
<div data-target="panel-body" class="<%= class_names("flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:gap-4 w-full", "has-sidebar": sidebar?) %>">
|
|
24
|
-
<div class="<%= class_names("relative flex-1 w-full", "sm:w-2/3": sidebar?) %>">
|
|
25
|
-
<%# The body is wrapped inside another div in order to avoid long & tall panels next to sidebars when the sidebar taller. %>
|
|
26
|
-
<div class="relative <%= white_panel_classes %> <%= @body_classes %>">
|
|
27
|
-
<%= body %>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<% if sidebar? %>
|
|
31
|
-
<div class="max-w-full sm:w-1/3 flex-shrink-0 h-full">
|
|
32
|
-
<%= sidebar %>
|
|
33
|
-
</div>
|
|
34
|
-
<% end %>
|
|
35
|
-
<% if bare_sidebar? %>
|
|
36
|
-
<div class="max-w-full sm:w-1/3 flex-shrink-0 h-full">
|
|
37
|
-
<%= bare_sidebar %>
|
|
38
|
-
</div>
|
|
39
|
-
<% end %>
|
|
40
|
-
</div>
|
|
41
|
-
<% end %>
|
|
42
|
-
<% if bare_content? %>
|
|
43
|
-
<%= content_tag :div, class: class_names("relative flex flex-1 flex-col", "has-sidebar": sidebar?), data: {
|
|
44
|
-
target: :"panel-bare-content"
|
|
45
|
-
} do %>
|
|
46
|
-
<%= bare_content %>
|
|
47
|
-
<% end %>
|
|
48
|
-
<% end %>
|
|
49
|
-
<% if footer_tools? %>
|
|
50
|
-
<div
|
|
51
|
-
data-target="panel-footer-tools"
|
|
52
|
-
class="flex-1 w-full flex flex-col sm:flex-row xl:justify-end sm:items-end space-y-2 sm:space-y-0 sm:space-x-2 mt-4 xl:mt-0">
|
|
53
|
-
<%= footer_tools %>
|
|
54
|
-
</div>
|
|
55
|
-
<% end %>
|
|
56
|
-
<% if footer? %>
|
|
57
|
-
<div class="flex justify-end w-full">
|
|
58
|
-
<div>
|
|
59
|
-
<%= footer %>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<% end %>
|
|
63
|
-
<% end %>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
class Avo::PanelComponent < Avo::BaseComponent
|
|
4
|
-
include Avo::ApplicationHelper
|
|
5
|
-
|
|
6
|
-
delegate :white_panel_classes, to: :helpers
|
|
7
|
-
|
|
8
|
-
renders_one :cover_slot
|
|
9
|
-
renders_one :name_slot
|
|
10
|
-
renders_one :tools
|
|
11
|
-
renders_one :body
|
|
12
|
-
renders_one :sidebar
|
|
13
|
-
renders_one :bare_sidebar
|
|
14
|
-
renders_one :bare_content
|
|
15
|
-
renders_one :footer_tools
|
|
16
|
-
renders_one :footer
|
|
17
|
-
|
|
18
|
-
prop :description
|
|
19
|
-
prop :body_classes
|
|
20
|
-
prop :data, default: {}.freeze
|
|
21
|
-
prop :display_breadcrumbs, default: false
|
|
22
|
-
prop :discreet_information
|
|
23
|
-
prop :index
|
|
24
|
-
prop :classes
|
|
25
|
-
prop :profile_photo
|
|
26
|
-
prop :cover_photo
|
|
27
|
-
prop :args, kind: :**, default: {}.freeze
|
|
28
|
-
prop :external_link
|
|
29
|
-
|
|
30
|
-
def after_initialize
|
|
31
|
-
@name = @args.dig(:name) || @args.dig(:title)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def classes
|
|
35
|
-
class_names(@classes, "has-cover-photo": @cover_photo.present?, "has-profile-photo": @profile_photo.present?)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
def data_attributes
|
|
41
|
-
@data.merge(component: @data[:component] || self.class.to_s.underscore, "panel-index": @index)
|
|
42
|
-
end
|
|
43
|
-
end
|