avo 2.2.1 → 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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +5 -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/index/field_wrapper_component.rb +13 -0
  8. data/app/components/avo/profile_item_component.html.erb +2 -2
  9. data/app/components/avo/profile_item_component.rb +6 -0
  10. data/app/components/avo/sidebar/base_item_component.rb +31 -0
  11. data/app/components/avo/sidebar/group_component.html.erb +28 -0
  12. data/app/components/avo/sidebar/group_component.rb +4 -0
  13. data/app/components/avo/sidebar/heading_component.html.erb +14 -0
  14. data/app/components/avo/sidebar/heading_component.rb +15 -0
  15. data/app/components/avo/sidebar/item_switcher_component.html.erb +16 -0
  16. data/app/components/avo/sidebar/item_switcher_component.rb +15 -0
  17. data/app/components/avo/sidebar/link_component.html.erb +12 -0
  18. data/app/components/avo/sidebar/link_component.rb +28 -0
  19. data/app/components/avo/sidebar/section_component.html.erb +15 -0
  20. data/app/components/avo/sidebar/section_component.rb +9 -0
  21. data/app/components/avo/sidebar_component.html.erb +33 -24
  22. data/app/components/avo/sidebar_component.rb +3 -9
  23. data/app/components/avo/sidebar_profile_component.html.erb +10 -1
  24. data/app/controllers/avo/application_controller.rb +1 -2
  25. data/app/helpers/avo/application_helper.rb +2 -0
  26. data/app/javascript/js/controllers/menu_controller.js +60 -0
  27. data/app/javascript/js/controllers.js +2 -0
  28. data/app/views/avo/base/_boolean_filter.html.erb +1 -1
  29. data/app/views/avo/base/_multiple_select_filter.html.erb +7 -4
  30. data/app/views/avo/base/_select_filter.html.erb +1 -1
  31. data/app/views/avo/base/_text_filter.html.erb +1 -1
  32. data/avo.gemspec +1 -0
  33. data/lib/avo/app.rb +8 -86
  34. data/lib/avo/concerns/fetches_things.rb +127 -0
  35. data/lib/avo/configuration.rb +4 -0
  36. data/lib/avo/fields/base_field.rb +2 -0
  37. data/lib/avo/hosts/base_host.rb +20 -0
  38. data/lib/avo/licensing/pro_license.rb +2 -1
  39. data/lib/avo/menu/base_item.rb +20 -0
  40. data/lib/avo/menu/builder.rb +77 -0
  41. data/lib/avo/menu/dashboard.rb +17 -0
  42. data/lib/avo/menu/group.rb +2 -0
  43. data/lib/avo/menu/link.rb +4 -0
  44. data/lib/avo/menu/menu.rb +2 -0
  45. data/lib/avo/menu/resource.rb +9 -0
  46. data/lib/avo/menu/section.rb +2 -0
  47. data/lib/avo/reloader.rb +10 -2
  48. data/lib/avo/version.rb +1 -1
  49. data/lib/generators/avo/filter_generator.rb +2 -0
  50. data/lib/generators/avo/templates/filters/boolean_filter.tt +1 -1
  51. data/lib/generators/avo/templates/filters/multiple_select_filter.tt +11 -0
  52. data/lib/generators/avo/templates/filters/select_filter.tt +1 -1
  53. data/lib/generators/avo/templates/filters/text_filter.tt +1 -1
  54. data/lib/generators/avo/templates/tool/sidebar_item.tt +1 -1
  55. data/public/avo-assets/avo.css +21 -4
  56. data/public/avo-assets/avo.js +63 -63
  57. data/public/avo-assets/avo.js.map +3 -3
  58. metadata +42 -9
  59. data/app/components/avo/sidebar_heading_component.html.erb +0 -3
  60. data/app/components/avo/sidebar_heading_component.rb +0 -11
  61. data/app/components/avo/sidebar_item_component.html.erb +0 -3
  62. data/app/components/avo/sidebar_item_component.rb +0 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-12 00:00:00.000000000 Z
12
+ date: 2022-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -221,6 +221,20 @@ dependencies:
221
221
  - - ">="
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: docile
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :runtime
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
224
238
  description: Avo abstracts away the common parts of building apps, letting your engineers
225
239
  work on your app's essential components. The result is a full-featured admin panel
226
240
  that works out of the box, ready to give to your end-users.
@@ -266,7 +280,7 @@ files:
266
280
  - app/assets/svgs/chevron-up.svg
267
281
  - app/assets/svgs/code.svg
268
282
  - app/assets/svgs/color-swatch.svg
269
- - app/assets/svgs/dashboards-icon.svg
283
+ - app/assets/svgs/dashboards.svg
270
284
  - app/assets/svgs/detach.svg
271
285
  - app/assets/svgs/document-text.svg
272
286
  - app/assets/svgs/download-solid-reversed.svg
@@ -754,7 +768,7 @@ files:
754
768
  - app/assets/svgs/plus-circle.svg
755
769
  - app/assets/svgs/plus.svg
756
770
  - app/assets/svgs/question-mark-circle.svg
757
- - app/assets/svgs/resources-icon.svg
771
+ - app/assets/svgs/resources.svg
758
772
  - app/assets/svgs/save.svg
759
773
  - app/assets/svgs/selector.svg
760
774
  - app/assets/svgs/sort-ascending.svg
@@ -767,7 +781,7 @@ files:
767
781
  - app/assets/svgs/thumbs-down.svg
768
782
  - app/assets/svgs/thumbs-up.svg
769
783
  - app/assets/svgs/times.svg
770
- - app/assets/svgs/tools-icon.svg
784
+ - app/assets/svgs/tools.svg
771
785
  - app/assets/svgs/trash-sm.svg
772
786
  - app/assets/svgs/trash.svg
773
787
  - app/assets/svgs/user-circle.svg
@@ -988,12 +1002,19 @@ files:
988
1002
  - app/components/avo/resource_component.rb
989
1003
  - app/components/avo/show/field_wrapper_component.html.erb
990
1004
  - app/components/avo/show/field_wrapper_component.rb
1005
+ - app/components/avo/sidebar/base_item_component.rb
1006
+ - app/components/avo/sidebar/group_component.html.erb
1007
+ - app/components/avo/sidebar/group_component.rb
1008
+ - app/components/avo/sidebar/heading_component.html.erb
1009
+ - app/components/avo/sidebar/heading_component.rb
1010
+ - app/components/avo/sidebar/item_switcher_component.html.erb
1011
+ - app/components/avo/sidebar/item_switcher_component.rb
1012
+ - app/components/avo/sidebar/link_component.html.erb
1013
+ - app/components/avo/sidebar/link_component.rb
1014
+ - app/components/avo/sidebar/section_component.html.erb
1015
+ - app/components/avo/sidebar/section_component.rb
991
1016
  - app/components/avo/sidebar_component.html.erb
992
1017
  - app/components/avo/sidebar_component.rb
993
- - app/components/avo/sidebar_heading_component.html.erb
994
- - app/components/avo/sidebar_heading_component.rb
995
- - app/components/avo/sidebar_item_component.html.erb
996
- - app/components/avo/sidebar_item_component.rb
997
1018
  - app/components/avo/sidebar_profile_component.html.erb
998
1019
  - app/components/avo/sidebar_profile_component.rb
999
1020
  - app/components/avo/turbo_frame_wrapper_component.html.erb
@@ -1042,6 +1063,7 @@ files:
1042
1063
  - app/javascript/js/controllers/item_select_all_controller.js
1043
1064
  - app/javascript/js/controllers/item_selector_controller.js
1044
1065
  - app/javascript/js/controllers/loading_button_controller.js
1066
+ - app/javascript/js/controllers/menu_controller.js
1045
1067
  - app/javascript/js/controllers/mobile_controller.js
1046
1068
  - app/javascript/js/controllers/modal_controller.js
1047
1069
  - app/javascript/js/controllers/multiple_select_filter_controller.js
@@ -1123,6 +1145,7 @@ files:
1123
1145
  - lib/avo/base_action.rb
1124
1146
  - lib/avo/base_card.rb
1125
1147
  - lib/avo/base_resource.rb
1148
+ - lib/avo/concerns/fetches_things.rb
1126
1149
  - lib/avo/configuration.rb
1127
1150
  - lib/avo/dashboards/base_dashboard.rb
1128
1151
  - lib/avo/dashboards/base_divider.rb
@@ -1177,6 +1200,7 @@ files:
1177
1200
  - lib/avo/grid_fields/preview_field.rb
1178
1201
  - lib/avo/grid_fields/title_field.rb
1179
1202
  - lib/avo/has_context.rb
1203
+ - lib/avo/hosts/base_host.rb
1180
1204
  - lib/avo/hosts/dashboard_card.rb
1181
1205
  - lib/avo/hosts/dashboard_visibility.rb
1182
1206
  - lib/avo/hosts/ordering.rb
@@ -1190,6 +1214,14 @@ files:
1190
1214
  - lib/avo/loaders/fields_loader.rb
1191
1215
  - lib/avo/loaders/filters_loader.rb
1192
1216
  - lib/avo/loaders/loader.rb
1217
+ - lib/avo/menu/base_item.rb
1218
+ - lib/avo/menu/builder.rb
1219
+ - lib/avo/menu/dashboard.rb
1220
+ - lib/avo/menu/group.rb
1221
+ - lib/avo/menu/link.rb
1222
+ - lib/avo/menu/menu.rb
1223
+ - lib/avo/menu/resource.rb
1224
+ - lib/avo/menu/section.rb
1193
1225
  - lib/avo/reloader.rb
1194
1226
  - lib/avo/services/authorization_service.rb
1195
1227
  - lib/avo/tools_manager.rb
@@ -1223,6 +1255,7 @@ files:
1223
1255
  - lib/generators/avo/templates/field/components/show_component.html.erb.tt
1224
1256
  - lib/generators/avo/templates/field/components/show_component.rb.tt
1225
1257
  - lib/generators/avo/templates/filters/boolean_filter.tt
1258
+ - lib/generators/avo/templates/filters/multiple_select_filter.tt
1226
1259
  - lib/generators/avo/templates/filters/select_filter.tt
1227
1260
  - lib/generators/avo/templates/filters/text_filter.tt
1228
1261
  - lib/generators/avo/templates/initializer/avo.tt
@@ -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