avo 2.1.2.pre2 → 2.2.2

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.

Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -2
  3. data/Gemfile.lock +11 -5
  4. data/app/assets/svgs/{dashboards-icon.svg → dashboards.svg} +1 -1
  5. data/app/assets/svgs/{resources-icon.svg → resources.svg} +0 -0
  6. data/app/assets/svgs/{tools-icon.svg → tools.svg} +0 -0
  7. data/app/components/avo/button_component.rb +6 -2
  8. data/app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb +1 -0
  9. data/app/components/avo/fields/belongs_to_field/edit_component.rb +5 -2
  10. data/app/components/avo/index/field_wrapper_component.rb +13 -0
  11. data/app/components/avo/index/grid_item_component.html.erb +3 -1
  12. data/app/components/avo/index/table_row_component.html.erb +7 -5
  13. data/app/components/avo/panel_component.html.erb +4 -4
  14. data/app/components/avo/profile_item_component.html.erb +2 -2
  15. data/app/components/avo/profile_item_component.rb +6 -0
  16. data/app/components/avo/sidebar/base_item_component.rb +31 -0
  17. data/app/components/avo/sidebar/group_component.html.erb +28 -0
  18. data/app/components/avo/sidebar/group_component.rb +4 -0
  19. data/app/components/avo/sidebar/heading_component.html.erb +14 -0
  20. data/app/components/avo/sidebar/heading_component.rb +15 -0
  21. data/app/components/avo/sidebar/item_switcher_component.html.erb +16 -0
  22. data/app/components/avo/sidebar/item_switcher_component.rb +15 -0
  23. data/app/components/avo/sidebar/link_component.html.erb +12 -0
  24. data/app/components/avo/sidebar/link_component.rb +28 -0
  25. data/app/components/avo/sidebar/section_component.html.erb +15 -0
  26. data/app/components/avo/sidebar/section_component.rb +9 -0
  27. data/app/components/avo/sidebar_component.html.erb +33 -24
  28. data/app/components/avo/sidebar_component.rb +3 -9
  29. data/app/components/avo/sidebar_profile_component.html.erb +10 -1
  30. data/app/components/avo/views/resource_edit_component.html.erb +2 -2
  31. data/app/components/avo/views/resource_new_component.html.erb +2 -2
  32. data/app/components/avo/views/resource_show_component.html.erb +2 -2
  33. data/app/controllers/avo/application_controller.rb +1 -2
  34. data/app/controllers/avo/base_controller.rb +1 -1
  35. data/app/helpers/avo/application_helper.rb +2 -0
  36. data/app/javascript/js/controllers/loading_button_controller.js +47 -10
  37. data/app/javascript/js/controllers/menu_controller.js +60 -0
  38. data/app/javascript/js/controllers/search_controller.js +28 -10
  39. data/app/javascript/js/controllers.js +2 -0
  40. data/app/views/avo/base/_boolean_filter.html.erb +1 -1
  41. data/app/views/avo/base/_multiple_select_filter.html.erb +7 -4
  42. data/app/views/avo/base/_select_filter.html.erb +1 -1
  43. data/app/views/avo/base/_text_filter.html.erb +1 -1
  44. data/app/views/avo/partials/_table_header.html.erb +12 -13
  45. data/app/views/layouts/avo/application.html.erb +3 -0
  46. data/avo.gemspec +1 -0
  47. data/bin/helpers.rb +7 -1
  48. data/bin/init +2 -2
  49. data/lib/avo/app.rb +8 -86
  50. data/lib/avo/base_resource.rb +1 -3
  51. data/lib/avo/concerns/fetches_things.rb +127 -0
  52. data/lib/avo/configuration.rb +4 -0
  53. data/lib/avo/dynamic_router.rb +1 -1
  54. data/lib/avo/engine.rb +0 -1
  55. data/lib/avo/fields/base_field.rb +2 -0
  56. data/lib/avo/fields/belongs_to_field.rb +2 -0
  57. data/lib/avo/hosts/base_host.rb +20 -0
  58. data/lib/avo/licensing/pro_license.rb +2 -1
  59. data/lib/avo/menu/base_item.rb +20 -0
  60. data/lib/avo/menu/builder.rb +77 -0
  61. data/lib/avo/menu/dashboard.rb +17 -0
  62. data/lib/avo/menu/group.rb +2 -0
  63. data/lib/avo/menu/link.rb +4 -0
  64. data/lib/avo/menu/menu.rb +2 -0
  65. data/lib/avo/menu/resource.rb +9 -0
  66. data/lib/avo/menu/section.rb +2 -0
  67. data/lib/avo/reloader.rb +15 -7
  68. data/lib/avo/version.rb +1 -1
  69. data/lib/generators/avo/filter_generator.rb +2 -0
  70. data/lib/generators/avo/templates/filters/boolean_filter.tt +1 -1
  71. data/lib/generators/avo/templates/filters/multiple_select_filter.tt +11 -0
  72. data/lib/generators/avo/templates/filters/select_filter.tt +1 -1
  73. data/lib/generators/avo/templates/filters/text_filter.tt +1 -1
  74. data/lib/generators/avo/templates/tool/sidebar_item.tt +1 -1
  75. data/public/avo-assets/avo.css +23 -6
  76. data/public/avo-assets/avo.js +63 -63
  77. data/public/avo-assets/avo.js.map +3 -3
  78. metadata +44 -14
  79. data/app/assets/builds/avo.css +0 -8810
  80. data/app/assets/builds/avo.js +0 -423
  81. data/app/assets/builds/avo.js.map +0 -7
  82. data/app/components/avo/sidebar_heading_component.html.erb +0 -3
  83. data/app/components/avo/sidebar_heading_component.rb +0 -11
  84. data/app/components/avo/sidebar_item_component.html.erb +0 -3
  85. data/app/components/avo/sidebar_item_component.rb +0 -10
@@ -1,3 +0,0 @@
1
- <div class="flex items-center p-4 py-2 text-gray-500 text-sm uppercase font-semibold leading-none space-x-1">
2
- <%= icon %> <span><%= label %></span>
3
- </div>
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Avo::SidebarHeadingComponent < ViewComponent::Base
4
- attr_reader :label
5
- attr_reader :icon
6
-
7
- def initialize(label: nil, icon: nil)
8
- @label = label
9
- @icon = icon
10
- end
11
- end
@@ -1,3 +0,0 @@
1
- <%= active_link_to @path, class: 'px-4 block mx-6 leading-none py-2 text-black rounded font-medium hover:bg-gray-150', active: @active, target: @target do %>
2
- <%= @label %>
3
- <% end %>
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Avo::SidebarItemComponent < ViewComponent::Base
4
- def initialize(label: nil, path: nil, active: :inclusive, target: nil)
5
- @label = label
6
- @path = path
7
- @active = active
8
- @target = target
9
- end
10
- end