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
@@ -4536,6 +4536,45 @@ input[type=file][data-direct-upload-url][disabled] {
4536
4536
  display: none;
4537
4537
  }
4538
4538
 
4539
+ .application-sidebar .active:hover, .application-sidebar .active{
4540
+ --tw-bg-opacity:1;
4541
+ background-color:rgb(206 231 248 / var(--tw-bg-opacity));
4542
+ --tw-text-opacity:1;
4543
+ color:rgb(8 134 222 / var(--tw-text-opacity))
4544
+ }
4545
+
4546
+ /* remove the left padding. */
4547
+
4548
+ @media (min-width: 1024px){
4549
+ .content-area .main-content-area{
4550
+ padding-left:0px
4551
+ }
4552
+ }
4553
+
4554
+ /* Hide the sidebar by default. */
4555
+
4556
+ @media (min-width: 1024px){
4557
+ .content-area .avo-sidebar{
4558
+ display:none
4559
+ }
4560
+ }
4561
+
4562
+ /* Add padding to the main area to allow for the sidebar to expand. */
4563
+
4564
+ @media (min-width: 1024px){
4565
+ .content-area.sidebar-open .main-content-area{
4566
+ padding-left:16rem
4567
+ }
4568
+ }
4569
+
4570
+ /* Show the sidebar. */
4571
+
4572
+ @media (min-width: 1024px){
4573
+ .content-area.sidebar-open .avo-sidebar{
4574
+ display:block
4575
+ }
4576
+ }
4577
+
4539
4578
  .button-spinner {
4540
4579
  width: 24px;
4541
4580
  height: 24px;
@@ -6461,10 +6500,6 @@ trix-editor .attachment__metadata .attachment__size {
6461
6500
  margin-bottom:0.5rem
6462
6501
  }
6463
6502
 
6464
- .mt-6{
6465
- margin-top:1.5rem
6466
- }
6467
-
6468
6503
  .ml-1\/2{
6469
6504
  margin-left:50%
6470
6505
  }
@@ -6481,6 +6516,10 @@ trix-editor .attachment__metadata .attachment__size {
6481
6516
  margin-left:auto
6482
6517
  }
6483
6518
 
6519
+ .mt-12{
6520
+ margin-top:3rem
6521
+ }
6522
+
6484
6523
  .-mb-2{
6485
6524
  margin-bottom:-0.5rem
6486
6525
  }
@@ -6489,6 +6528,10 @@ trix-editor .attachment__metadata .attachment__size {
6489
6528
  margin-top:0px
6490
6529
  }
6491
6530
 
6531
+ .mt-6{
6532
+ margin-top:1.5rem
6533
+ }
6534
+
6492
6535
  .mr-px{
6493
6536
  margin-right:1px
6494
6537
  }
@@ -7999,13 +8042,6 @@ html, body{
7999
8042
  opacity:0
8000
8043
  }
8001
8044
 
8002
- .application-sidebar .active:hover, .application-sidebar .active{
8003
- --tw-bg-opacity:1;
8004
- background-color:rgb(206 231 248 / var(--tw-bg-opacity));
8005
- --tw-text-opacity:1;
8006
- color:rgb(8 134 222 / var(--tw-text-opacity))
8007
- }
8008
-
8009
8045
  .turbo-progress-bar{
8010
8046
  --tw-bg-opacity:1;
8011
8047
  background-color:rgb(57 158 229 / var(--tw-bg-opacity))
@@ -8909,6 +8945,10 @@ trix-editor {
8909
8945
  margin-bottom:-1rem
8910
8946
  }
8911
8947
 
8948
+ .lg\:block{
8949
+ display:block
8950
+ }
8951
+
8912
8952
  .lg\:flex{
8913
8953
  display:flex
8914
8954
  }
@@ -8968,10 +9008,6 @@ trix-editor {
8968
9008
  .lg\:pl-4{
8969
9009
  padding-left:1rem
8970
9010
  }
8971
-
8972
- .lg\:pl-64{
8973
- padding-left:16rem
8974
- }
8975
9011
  }
8976
9012
 
8977
9013
  @media (min-width: 1280px){