avo 2.11.1 → 2.11.2.pre.1

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/stylesheets/avo.css +1 -4
  4. data/app/assets/stylesheets/css/sidebar.css +18 -0
  5. data/app/assets/svgs/failed_to_load.svg +15 -0
  6. data/app/components/avo/common_field_wrapper_component.html.erb +4 -0
  7. data/app/components/avo/fields/has_one_field/show_component.html.erb +1 -1
  8. data/app/components/avo/fields/has_one_field/show_component.rb +7 -6
  9. data/app/components/avo/fields/text_field/index_component.html.erb +2 -0
  10. data/app/components/avo/fields/text_field/show_component.html.erb +2 -0
  11. data/app/components/avo/fields/trix_field/edit_component.rb +1 -1
  12. data/app/components/avo/index/field_wrapper_component.html.erb +4 -0
  13. data/app/components/avo/index/resource_controls_component.html.erb +3 -0
  14. data/app/components/avo/index/resource_controls_component.rb +7 -5
  15. data/app/components/avo/index/resource_table_component.html.erb +1 -1
  16. data/app/components/avo/index/resource_table_component.rb +2 -1
  17. data/app/components/avo/index/table_row_component.html.erb +14 -5
  18. data/app/components/avo/index/table_row_component.rb +2 -1
  19. data/app/components/avo/item_switcher_component.html.erb +1 -1
  20. data/app/components/avo/resource_component.rb +11 -5
  21. data/app/components/avo/sidebar_component.html.erb +8 -2
  22. data/app/components/avo/sidebar_component.rb +9 -0
  23. data/app/components/avo/tab_switcher_component.rb +4 -0
  24. data/app/components/avo/views/resource_edit_component.rb +4 -6
  25. data/app/components/avo/views/resource_index_component.html.erb +1 -1
  26. data/app/components/avo/views/resource_index_component.rb +5 -3
  27. data/app/components/avo/views/resource_show_component.html.erb +1 -1
  28. data/app/components/avo/views/resource_show_component.rb +3 -1
  29. data/app/controllers/avo/application_controller.rb +25 -10
  30. data/app/controllers/avo/associations_controller.rb +38 -12
  31. data/app/controllers/avo/base_controller.rb +7 -2
  32. data/app/javascript/js/controllers/fields/key_value_controller.js +3 -1
  33. data/app/javascript/js/controllers/sidebar_controller.js +49 -0
  34. data/app/javascript/js/controllers.js +2 -2
  35. data/app/views/avo/base/index.html.erb +1 -0
  36. data/app/views/avo/base/show.html.erb +7 -1
  37. data/app/views/avo/home/failed_to_load.html copy.erb +23 -0
  38. data/app/views/avo/home/failed_to_load.html.erb +9 -15
  39. data/app/views/avo/partials/_javascript.html.erb +1 -0
  40. data/app/views/avo/partials/_navbar.html.erb +5 -2
  41. data/app/views/avo/partials/_table_header.html.erb +12 -5
  42. data/app/views/layouts/avo/application.html.erb +9 -4
  43. data/bin/init +5 -0
  44. data/lib/avo/base_resource.rb +16 -1
  45. data/lib/avo/concerns/has_fields.rb +12 -3
  46. data/lib/avo/concerns/has_html_attributes.rb +1 -1
  47. data/lib/avo/concerns/model_class_constantized.rb +1 -1
  48. data/lib/avo/configuration/resource_configuration.rb +21 -0
  49. data/lib/avo/configuration.rb +2 -0
  50. data/lib/avo/fields/has_base_field.rb +11 -0
  51. data/lib/avo/fields/text_field.rb +4 -2
  52. data/lib/avo/items_holder.rb +6 -0
  53. data/lib/avo/panel_builder.rb +1 -0
  54. data/lib/avo/services/authorization_service.rb +41 -37
  55. data/lib/avo/version.rb +1 -1
  56. data/lib/avo.rb +1 -0
  57. data/public/avo-assets/avo.css +78 -16
  58. data/public/avo-assets/avo.js +70 -69
  59. data/public/avo-assets/avo.js.map +3 -3
  60. metadata +9 -5
  61. data/app/javascript/js/controllers/mobile_controller.js +0 -9
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.11.1
4
+ version: 2.11.2.pre.1
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-07-21 00:00:00.000000000 Z
12
+ date: 2022-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -261,6 +261,7 @@ files:
261
261
  - app/assets/stylesheets/css/loader.css
262
262
  - app/assets/stylesheets/css/pagination.css
263
263
  - app/assets/stylesheets/css/search.css
264
+ - app/assets/stylesheets/css/sidebar.css
264
265
  - app/assets/stylesheets/css/spinner.css
265
266
  - app/assets/stylesheets/css/tags.css
266
267
  - app/assets/stylesheets/css/tailwindcss/base.css
@@ -292,6 +293,7 @@ files:
292
293
  - app/assets/svgs/exclamation-sm.svg
293
294
  - app/assets/svgs/exclamation.svg
294
295
  - app/assets/svgs/eye.svg
296
+ - app/assets/svgs/failed_to_load.svg
295
297
  - app/assets/svgs/filter.svg
296
298
  - app/assets/svgs/fire.svg
297
299
  - app/assets/svgs/game-board.svg
@@ -1084,7 +1086,6 @@ files:
1084
1086
  - app/javascript/js/controllers/item_selector_controller.js
1085
1087
  - app/javascript/js/controllers/loading_button_controller.js
1086
1088
  - app/javascript/js/controllers/menu_controller.js
1087
- - app/javascript/js/controllers/mobile_controller.js
1088
1089
  - app/javascript/js/controllers/modal_controller.js
1089
1090
  - app/javascript/js/controllers/multiple_select_filter_controller.js
1090
1091
  - app/javascript/js/controllers/per_page_controller.js
@@ -1094,6 +1095,7 @@ files:
1094
1095
  - app/javascript/js/controllers/search_controller.js
1095
1096
  - app/javascript/js/controllers/select_controller.js
1096
1097
  - app/javascript/js/controllers/select_filter_controller.js
1098
+ - app/javascript/js/controllers/sidebar_controller.js
1097
1099
  - app/javascript/js/controllers/tabs_controller.js
1098
1100
  - app/javascript/js/controllers/text_filter_controller.js
1099
1101
  - app/javascript/js/controllers/tippy_controller.js
@@ -1121,6 +1123,7 @@ files:
1121
1123
  - app/views/avo/home/_docs.html.erb
1122
1124
  - app/views/avo/home/_filters.html.erb
1123
1125
  - app/views/avo/home/_resources.html.erb
1126
+ - app/views/avo/home/failed_to_load.html copy.erb
1124
1127
  - app/views/avo/home/failed_to_load.html.erb
1125
1128
  - app/views/avo/home/index.html.erb
1126
1129
  - app/views/avo/partials/_custom_tools_alert.html.erb
@@ -1179,6 +1182,7 @@ files:
1179
1182
  - lib/avo/concerns/is_resource_item.rb
1180
1183
  - lib/avo/concerns/model_class_constantized.rb
1181
1184
  - lib/avo/configuration.rb
1185
+ - lib/avo/configuration/resource_configuration.rb
1182
1186
  - lib/avo/dashboards/base_dashboard.rb
1183
1187
  - lib/avo/dashboards/base_divider.rb
1184
1188
  - lib/avo/dashboards/chartkick_card.rb
@@ -1370,9 +1374,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1370
1374
  version: 2.4.0
1371
1375
  required_rubygems_version: !ruby/object:Gem::Requirement
1372
1376
  requirements:
1373
- - - ">="
1377
+ - - ">"
1374
1378
  - !ruby/object:Gem::Version
1375
- version: '0'
1379
+ version: 1.3.1
1376
1380
  requirements: []
1377
1381
  rubygems_version: 3.3.3
1378
1382
  signing_key:
@@ -1,9 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus'
2
-
3
- export default class extends Controller {
4
- static targets = ['sidebar']
5
-
6
- toggleSidebar() {
7
- this.sidebarTarget.classList.toggle('hidden')
8
- }
9
- }