avo 2.11.0 → 2.11.1.pre.3

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -2
  3. data/Gemfile.lock +7 -6
  4. data/app/assets/stylesheets/avo.css +1 -4
  5. data/app/assets/stylesheets/css/sidebar.css +28 -0
  6. data/app/components/avo/fields/date_field/show_component.html.erb +4 -0
  7. data/app/components/avo/fields/date_time_field/index_component.html.erb +1 -0
  8. data/app/components/avo/fields/date_time_field/show_component.html.erb +1 -0
  9. data/app/components/avo/fields/has_one_field/show_component.html.erb +1 -1
  10. data/app/components/avo/fields/has_one_field/show_component.rb +7 -6
  11. data/app/components/avo/fields/text_field/index_component.html.erb +2 -0
  12. data/app/components/avo/fields/text_field/show_component.html.erb +2 -0
  13. data/app/components/avo/index/field_wrapper_component.html.erb +4 -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 +1 -1
  18. data/app/components/avo/index/table_row_component.rb +2 -1
  19. data/app/components/avo/item_switcher_component.rb +2 -0
  20. data/app/components/avo/panel_component.html.erb +2 -4
  21. data/app/components/avo/panel_component.rb +0 -4
  22. data/app/components/avo/resource_component.rb +14 -27
  23. data/app/components/avo/sidebar/link_component.rb +4 -1
  24. data/app/components/avo/sidebar_component.html.erb +2 -2
  25. data/app/components/avo/tab_group_component.html.erb +1 -2
  26. data/app/components/avo/tab_switcher_component.rb +4 -0
  27. data/app/components/avo/views/resource_edit_component.html.erb +30 -8
  28. data/app/components/avo/views/resource_edit_component.rb +4 -8
  29. data/app/components/avo/views/resource_index_component.html.erb +1 -1
  30. data/app/components/avo/views/resource_index_component.rb +5 -3
  31. data/app/components/avo/views/resource_show_component.html.erb +14 -2
  32. data/app/components/avo/views/resource_show_component.rb +3 -3
  33. data/app/controllers/avo/application_controller.rb +24 -9
  34. data/app/controllers/avo/associations_controller.rb +38 -12
  35. data/app/controllers/avo/base_controller.rb +5 -3
  36. data/app/javascript/js/controllers/fields/date_field_controller.js +11 -1
  37. data/app/javascript/js/controllers/sidebar_controller.js +46 -0
  38. data/app/javascript/js/controllers.js +2 -2
  39. data/app/views/avo/base/edit.html.erb +0 -1
  40. data/app/views/avo/base/index.html.erb +1 -0
  41. data/app/views/avo/base/show.html.erb +7 -1
  42. data/app/views/avo/partials/_javascript.html.erb +1 -0
  43. data/app/views/avo/partials/_navbar.html.erb +5 -2
  44. data/app/views/layouts/avo/application.html.erb +3 -3
  45. data/avo.gemspec +1 -1
  46. data/lib/avo/base_action.rb +8 -6
  47. data/lib/avo/base_resource.rb +2 -5
  48. data/lib/avo/concerns/has_fields.rb +5 -0
  49. data/lib/avo/concerns/has_html_attributes.rb +1 -1
  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/services/authorization_service.rb +41 -37
  53. data/lib/avo/version.rb +1 -1
  54. data/lib/avo.rb +1 -0
  55. data/public/avo-assets/avo.css +51 -15
  56. data/public/avo-assets/avo.js +68 -67
  57. data/public/avo-assets/avo.js.map +3 -3
  58. metadata +10 -10
  59. data/app/javascript/js/controllers/mobile_controller.js +0 -9
  60. data/lib/avo/has_context.rb +0 -7
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.0
4
+ version: 2.11.1.pre.3
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-19 00:00:00.000000000 Z
12
+ date: 2022-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -127,16 +127,16 @@ dependencies:
127
127
  name: view_component
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ">="
130
+ - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: '0'
132
+ version: '2.60'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ">="
137
+ - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: '0'
139
+ version: '2.60'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: hotwire-rails
142
142
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -1084,7 +1085,6 @@ files:
1084
1085
  - app/javascript/js/controllers/item_selector_controller.js
1085
1086
  - app/javascript/js/controllers/loading_button_controller.js
1086
1087
  - app/javascript/js/controllers/menu_controller.js
1087
- - app/javascript/js/controllers/mobile_controller.js
1088
1088
  - app/javascript/js/controllers/modal_controller.js
1089
1089
  - app/javascript/js/controllers/multiple_select_filter_controller.js
1090
1090
  - app/javascript/js/controllers/per_page_controller.js
@@ -1094,6 +1094,7 @@ files:
1094
1094
  - app/javascript/js/controllers/search_controller.js
1095
1095
  - app/javascript/js/controllers/select_controller.js
1096
1096
  - app/javascript/js/controllers/select_filter_controller.js
1097
+ - app/javascript/js/controllers/sidebar_controller.js
1097
1098
  - app/javascript/js/controllers/tabs_controller.js
1098
1099
  - app/javascript/js/controllers/text_filter_controller.js
1099
1100
  - app/javascript/js/controllers/tippy_controller.js
@@ -1233,7 +1234,6 @@ files:
1233
1234
  - lib/avo/grid_fields/grid_field.rb
1234
1235
  - lib/avo/grid_fields/preview_field.rb
1235
1236
  - lib/avo/grid_fields/title_field.rb
1236
- - lib/avo/has_context.rb
1237
1237
  - lib/avo/hosts/association_scope_host.rb
1238
1238
  - lib/avo/hosts/base_host.rb
1239
1239
  - lib/avo/hosts/dashboard_card.rb
@@ -1371,9 +1371,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1371
1371
  version: 2.4.0
1372
1372
  required_rubygems_version: !ruby/object:Gem::Requirement
1373
1373
  requirements:
1374
- - - ">="
1374
+ - - ">"
1375
1375
  - !ruby/object:Gem::Version
1376
- version: '0'
1376
+ version: 1.3.1
1377
1377
  requirements: []
1378
1378
  rubygems_version: 3.3.3
1379
1379
  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
- }
@@ -1,7 +0,0 @@
1
- module Avo
2
- module HasContext
3
- def context
4
- App.context
5
- end
6
- end
7
- end