avo 2.11.1.pre.3 → 2.11.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/stylesheets/avo.css +4 -1
  4. data/app/components/avo/fields/date_field/show_component.html.erb +0 -4
  5. data/app/components/avo/fields/has_one_field/show_component.html.erb +1 -1
  6. data/app/components/avo/fields/has_one_field/show_component.rb +6 -7
  7. data/app/components/avo/fields/text_field/index_component.html.erb +0 -2
  8. data/app/components/avo/fields/text_field/show_component.html.erb +0 -2
  9. data/app/components/avo/index/field_wrapper_component.html.erb +0 -4
  10. data/app/components/avo/index/resource_controls_component.rb +5 -7
  11. data/app/components/avo/index/resource_table_component.html.erb +1 -1
  12. data/app/components/avo/index/resource_table_component.rb +1 -2
  13. data/app/components/avo/index/table_row_component.html.erb +1 -1
  14. data/app/components/avo/index/table_row_component.rb +1 -2
  15. data/app/components/avo/resource_component.rb +5 -11
  16. data/app/components/avo/sidebar_component.html.erb +2 -2
  17. data/app/components/avo/tab_switcher_component.rb +0 -4
  18. data/app/components/avo/views/resource_edit_component.rb +6 -4
  19. data/app/components/avo/views/resource_index_component.html.erb +1 -1
  20. data/app/components/avo/views/resource_index_component.rb +3 -5
  21. data/app/components/avo/views/resource_show_component.html.erb +1 -1
  22. data/app/components/avo/views/resource_show_component.rb +1 -3
  23. data/app/controllers/avo/application_controller.rb +9 -24
  24. data/app/controllers/avo/associations_controller.rb +12 -38
  25. data/app/controllers/avo/base_controller.rb +1 -2
  26. data/app/javascript/js/controllers/mobile_controller.js +9 -0
  27. data/app/javascript/js/controllers.js +2 -2
  28. data/app/views/avo/base/index.html.erb +0 -1
  29. data/app/views/avo/base/show.html.erb +1 -7
  30. data/app/views/avo/partials/_javascript.html.erb +0 -1
  31. data/app/views/avo/partials/_navbar.html.erb +2 -5
  32. data/app/views/layouts/avo/application.html.erb +3 -3
  33. data/lib/avo/concerns/has_fields.rb +0 -5
  34. data/lib/avo/concerns/has_html_attributes.rb +1 -1
  35. data/lib/avo/fields/has_base_field.rb +0 -11
  36. data/lib/avo/fields/text_field.rb +2 -4
  37. data/lib/avo/services/authorization_service.rb +37 -41
  38. data/lib/avo/version.rb +1 -1
  39. data/lib/avo.rb +0 -1
  40. data/public/avo-assets/avo.css +11 -43
  41. data/public/avo-assets/avo.js +67 -68
  42. data/public/avo-assets/avo.js.map +3 -3
  43. metadata +5 -6
  44. data/app/assets/stylesheets/css/sidebar.css +0 -28
  45. data/app/javascript/js/controllers/sidebar_controller.js +0 -46
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.pre.3
4
+ version: 2.11.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-24 00:00:00.000000000 Z
12
+ date: 2022-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -261,7 +261,6 @@ 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
265
264
  - app/assets/stylesheets/css/spinner.css
266
265
  - app/assets/stylesheets/css/tags.css
267
266
  - app/assets/stylesheets/css/tailwindcss/base.css
@@ -1085,6 +1084,7 @@ files:
1085
1084
  - app/javascript/js/controllers/item_selector_controller.js
1086
1085
  - app/javascript/js/controllers/loading_button_controller.js
1087
1086
  - 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,7 +1094,6 @@ 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
1098
1097
  - app/javascript/js/controllers/tabs_controller.js
1099
1098
  - app/javascript/js/controllers/text_filter_controller.js
1100
1099
  - app/javascript/js/controllers/tippy_controller.js
@@ -1371,9 +1370,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1371
1370
  version: 2.4.0
1372
1371
  required_rubygems_version: !ruby/object:Gem::Requirement
1373
1372
  requirements:
1374
- - - ">"
1373
+ - - ">="
1375
1374
  - !ruby/object:Gem::Version
1376
- version: 1.3.1
1375
+ version: '0'
1377
1376
  requirements: []
1378
1377
  rubygems_version: 3.3.3
1379
1378
  signing_key:
@@ -1,28 +0,0 @@
1
- .application-sidebar .active:hover,
2
- .application-sidebar .active {
3
- @apply bg-blue-100 text-blue-500;
4
- }
5
-
6
- .content-area {
7
- /* remove the left padding. */
8
- .main-content-area {
9
- @apply lg:pl-0;
10
- }
11
-
12
- /* Hide the sidebar by default. */
13
- .avo-sidebar {
14
- @apply lg:hidden;
15
- }
16
-
17
- &.sidebar-open {
18
- /* Add padding to the main area to allow for the sidebar to expand. */
19
- .main-content-area {
20
- @apply lg:pl-64;
21
- }
22
-
23
- /* Show the sidebar. */
24
- .avo-sidebar {
25
- @apply lg:block;
26
- }
27
- }
28
- }
@@ -1,46 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus'
2
- import Cookies from 'js-cookie'
3
-
4
- export default class extends Controller {
5
- static targets = ['sidebar', 'mainArea']
6
-
7
- static values = {
8
- open: Boolean,
9
- }
10
-
11
- get cookieKey() {
12
- return `${window.Avo.configuration.cookies_key}.sidebar.open`
13
- }
14
-
15
- get sidebarOpen() {
16
- return Cookies.get(this.cookieKey) === '1'
17
- }
18
-
19
- set cookie(state) {
20
- Cookies.set(this.cookieKey, state === true ? 1 : 0)
21
- }
22
-
23
- markSidebarClosed() {
24
- Cookies.set(this.cookieKey, '0')
25
- this.openValue = false
26
- this.mainAreaTarget.classList.remove('sidebar-open')
27
- }
28
-
29
- markSidebarOpen() {
30
- Cookies.set(this.cookieKey, '1')
31
- this.openValue = true
32
- this.mainAreaTarget.classList.add('sidebar-open')
33
- }
34
-
35
- toggleSidebar() {
36
- if (this.openValue) {
37
- this.markSidebarClosed()
38
- } else {
39
- this.markSidebarOpen()
40
- }
41
- }
42
-
43
- toggleSidebarOnMobile() {
44
- this.sidebarTarget.classList.toggle('hidden')
45
- }
46
- }