avo 2.12.1.pre.1 → 2.13.0

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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -3
  3. data/README.md +2 -1
  4. data/app/components/avo/actions_component.html.erb +3 -3
  5. data/app/components/avo/actions_component.rb +12 -3
  6. data/app/components/avo/button_component.rb +1 -3
  7. data/app/components/avo/fields/common/gravatar_viewer_component.html.erb +1 -1
  8. data/app/components/avo/fields/date_field/edit_component.html.erb +0 -3
  9. data/app/components/avo/fields/date_time_field/edit_component.html.erb +0 -2
  10. data/app/components/avo/fields/has_one_field/show_component.html.erb +1 -1
  11. data/app/components/avo/fields/tags_field/show_component.rb +0 -2
  12. data/app/components/avo/item_switcher_component.html.erb +1 -1
  13. data/app/components/avo/panel_component.html.erb +1 -1
  14. data/app/components/avo/panel_component.rb +3 -4
  15. data/app/components/avo/resource_component.rb +6 -4
  16. data/app/components/avo/sidebar_component.html.erb +1 -1
  17. data/app/components/avo/tab_group_component.html.erb +1 -1
  18. data/app/components/avo/tab_switcher_component.rb +2 -2
  19. data/app/components/avo/views/resource_edit_component.html.erb +1 -1
  20. data/app/components/avo/views/resource_edit_component.rb +1 -1
  21. data/app/components/avo/views/resource_index_component.html.erb +3 -3
  22. data/app/components/avo/views/resource_index_component.rb +18 -1
  23. data/app/components/avo/views/resource_show_component.html.erb +139 -48
  24. data/app/components/avo/views/resource_show_component.rb +1 -0
  25. data/app/controllers/avo/base_controller.rb +8 -11
  26. data/app/controllers/avo/search_controller.rb +57 -20
  27. data/app/javascript/js/controllers/menu_controller.js +2 -2
  28. data/app/javascript/js/controllers/search_controller.js +42 -15
  29. data/app/views/avo/associations/new.html.erb +1 -0
  30. data/app/views/avo/dashboards/show.html.erb +1 -1
  31. data/app/views/avo/debug/index.html.erb +1 -1
  32. data/app/views/avo/debug/report.html.erb +1 -0
  33. data/app/views/avo/home/index.html.erb +1 -1
  34. data/app/views/avo/partials/_resource_search.html.erb +6 -0
  35. data/app/views/avo/private/design.html.erb +2 -2
  36. data/app/views/layouts/avo/application.html.erb +1 -1
  37. data/lib/avo/base_resource.rb +5 -1
  38. data/lib/avo/concerns/has_editable_controls.rb +34 -0
  39. data/lib/avo/fields/base_field.rb +1 -1
  40. data/lib/avo/fields/date_field.rb +1 -3
  41. data/lib/avo/fields/field_extensions/has_include_blank.rb +1 -1
  42. data/lib/avo/fields/has_base_field.rb +2 -0
  43. data/lib/avo/fields/key_value_field.rb +6 -6
  44. data/lib/avo/hosts/search_scope_host.rb +7 -0
  45. data/lib/avo/licensing/h_q.rb +12 -4
  46. data/lib/avo/licensing/pro_license.rb +1 -0
  47. data/lib/avo/menu/builder.rb +2 -0
  48. data/lib/avo/resources/controls/action.rb +32 -0
  49. data/lib/avo/resources/controls/actions_list.rb +19 -0
  50. data/lib/avo/resources/controls/back_button.rb +13 -0
  51. data/lib/avo/resources/controls/base_control.rb +59 -0
  52. data/lib/avo/resources/controls/delete_button.rb +13 -0
  53. data/lib/avo/resources/controls/detach_button.rb +13 -0
  54. data/lib/avo/resources/controls/edit_button.rb +13 -0
  55. data/lib/avo/resources/controls/execution_context.rb +58 -0
  56. data/lib/avo/resources/controls/items_holder.rb +19 -0
  57. data/lib/avo/resources/controls/link_to.rb +27 -0
  58. data/lib/avo/version.rb +1 -1
  59. data/lib/generators/avo/templates/action.tt +1 -1
  60. data/lib/generators/avo/templates/initializer/avo.tt +1 -0
  61. data/lib/generators/avo/templates/resource/resource.tt +1 -1
  62. data/lib/generators/avo/templates/resource_tools/partial.tt +1 -1
  63. data/lib/generators/avo/templates/standalone_action.tt +1 -1
  64. data/public/avo-assets/avo.css +564 -44
  65. data/public/avo-assets/avo.js +47 -47
  66. data/public/avo-assets/avo.js.map +2 -2
  67. metadata +16 -5
  68. data/lib/avo/concerns/has_model.rb +0 -11
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.12.1.pre.1
4
+ version: 2.13.0
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-08-05 00:00:00.000000000 Z
12
+ date: 2022-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -1176,9 +1176,9 @@ files:
1176
1176
  - lib/avo/base_resource_tool.rb
1177
1177
  - lib/avo/concerns/fetches_things.rb
1178
1178
  - lib/avo/concerns/handles_field_args.rb
1179
+ - lib/avo/concerns/has_editable_controls.rb
1179
1180
  - lib/avo/concerns/has_fields.rb
1180
1181
  - lib/avo/concerns/has_html_attributes.rb
1181
- - lib/avo/concerns/has_model.rb
1182
1182
  - lib/avo/concerns/has_stimulus_controllers.rb
1183
1183
  - lib/avo/concerns/is_resource_item.rb
1184
1184
  - lib/avo/concerns/model_class_constantized.rb
@@ -1244,6 +1244,7 @@ files:
1244
1244
  - lib/avo/hosts/dashboard_visibility.rb
1245
1245
  - lib/avo/hosts/ordering.rb
1246
1246
  - lib/avo/hosts/record_host.rb
1247
+ - lib/avo/hosts/search_scope_host.rb
1247
1248
  - lib/avo/hosts/view_record_host.rb
1248
1249
  - lib/avo/html/builder.rb
1249
1250
  - lib/avo/items_holder.rb
@@ -1269,6 +1270,16 @@ files:
1269
1270
  - lib/avo/panel.rb
1270
1271
  - lib/avo/panel_builder.rb
1271
1272
  - lib/avo/reloader.rb
1273
+ - lib/avo/resources/controls/action.rb
1274
+ - lib/avo/resources/controls/actions_list.rb
1275
+ - lib/avo/resources/controls/back_button.rb
1276
+ - lib/avo/resources/controls/base_control.rb
1277
+ - lib/avo/resources/controls/delete_button.rb
1278
+ - lib/avo/resources/controls/detach_button.rb
1279
+ - lib/avo/resources/controls/edit_button.rb
1280
+ - lib/avo/resources/controls/execution_context.rb
1281
+ - lib/avo/resources/controls/items_holder.rb
1282
+ - lib/avo/resources/controls/link_to.rb
1272
1283
  - lib/avo/services/authorization_service.rb
1273
1284
  - lib/avo/services/uri_service.rb
1274
1285
  - lib/avo/tab.rb
@@ -1375,9 +1386,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1375
1386
  version: 2.4.0
1376
1387
  required_rubygems_version: !ruby/object:Gem::Requirement
1377
1388
  requirements:
1378
- - - ">"
1389
+ - - ">="
1379
1390
  - !ruby/object:Gem::Version
1380
- version: 1.3.1
1391
+ version: '0'
1381
1392
  requirements: []
1382
1393
  rubygems_version: 3.3.3
1383
1394
  signing_key:
@@ -1,11 +0,0 @@
1
- module Avo
2
- module Concerns
3
- module HasModel
4
- extend ActiveSupport::Concern
5
-
6
- def has_model_id?
7
- model.present? && model.id.present?
8
- end
9
- end
10
- end
11
- end