avo 3.0.1.beta24 → 3.0.2

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -5
  3. data/Gemfile.lock +164 -128
  4. data/README.md +19 -27
  5. data/app/components/avo/actions_component.rb +2 -2
  6. data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +122 -104
  7. data/app/components/avo/fields/belongs_to_field/edit_component.rb +11 -0
  8. data/app/components/avo/fields/location_field/edit_component.html.erb +12 -10
  9. data/app/components/avo/index/grid_item_component.html.erb +1 -1
  10. data/app/components/avo/index/resource_table_component.html.erb +2 -2
  11. data/app/components/avo/index/resource_table_component.rb +16 -0
  12. data/app/components/avo/index/table_row_component.html.erb +1 -1
  13. data/app/components/avo/items/panel_component.html.erb +25 -0
  14. data/app/components/avo/items/panel_component.rb +43 -0
  15. data/app/components/avo/items/switcher_component.html.erb +17 -0
  16. data/app/components/avo/items/switcher_component.rb +79 -0
  17. data/app/components/avo/items/visible_items_component.html.erb +10 -0
  18. data/app/components/avo/items/visible_items_component.rb +11 -0
  19. data/app/components/avo/modal_component.html.erb +11 -7
  20. data/app/components/avo/modal_component.rb +21 -0
  21. data/app/components/avo/paginator_component.html.erb +29 -40
  22. data/app/components/avo/paginator_component.rb +18 -0
  23. data/app/components/avo/panel_component.html.erb +2 -2
  24. data/app/components/avo/referrer_params_component.html.erb +1 -0
  25. data/app/components/avo/resource_component.rb +8 -15
  26. data/app/components/avo/resource_sidebar_component.html.erb +11 -18
  27. data/app/components/avo/resource_sidebar_component.rb +4 -2
  28. data/app/components/avo/sidebar_profile_component.html.erb +1 -1
  29. data/app/components/avo/tab_group_component.html.erb +1 -1
  30. data/app/components/avo/views/resource_edit_component.html.erb +15 -32
  31. data/app/components/avo/views/resource_edit_component.rb +18 -6
  32. data/app/components/avo/views/resource_index_component.rb +1 -0
  33. data/app/components/avo/views/resource_show_component.html.erb +14 -33
  34. data/app/components/avo/views/resource_show_component.rb +11 -0
  35. data/app/controllers/avo/actions_controller.rb +6 -4
  36. data/app/controllers/avo/application_controller.rb +2 -33
  37. data/app/controllers/avo/base_controller.rb +25 -16
  38. data/app/helpers/avo/application_helper.rb +4 -0
  39. data/app/javascript/js/controllers/fields/reload_belongs_to_field_controller.js +51 -0
  40. data/app/javascript/js/controllers.js +2 -0
  41. data/app/views/avo/actions/show.html.erb +4 -3
  42. data/app/views/avo/base/_new_via_belongs_to.html.erb +12 -0
  43. data/app/views/avo/base/close_modal_and_reload_field.turbo_stream.erb +8 -0
  44. data/app/views/avo/base/create_fail_action.turbo_stream.erb +13 -0
  45. data/app/views/avo/partials/_flash_alerts.turbo_stream.erb +3 -0
  46. data/config/i18n-tasks.yml +1 -1
  47. data/config/initializers/pagy.rb +2 -0
  48. data/config/master.key +1 -0
  49. data/lib/avo/base_action.rb +44 -38
  50. data/lib/avo/base_resource.rb +7 -8
  51. data/lib/avo/concerns/borrow_items_holder.rb +35 -0
  52. data/lib/avo/concerns/has_items.rb +65 -47
  53. data/lib/avo/concerns/hydration.rb +17 -0
  54. data/lib/avo/concerns/is_resource_item.rb +2 -10
  55. data/lib/avo/concerns/pagination.rb +53 -0
  56. data/lib/avo/concerns/visible_items.rb +7 -30
  57. data/lib/avo/dsl/field_parser.rb +1 -1
  58. data/lib/avo/fields/concerns/is_searchable.rb +3 -1
  59. data/lib/avo/fields/location_field.rb +2 -2
  60. data/lib/avo/filters/base_filter.rb +1 -0
  61. data/lib/avo/html/builder.rb +1 -0
  62. data/lib/avo/licensing/h_q.rb +4 -6
  63. data/lib/avo/licensing/license.rb +4 -0
  64. data/lib/avo/plugin.rb +5 -1
  65. data/lib/avo/resources/items/holder.rb +29 -11
  66. data/lib/avo/resources/items/item_group.rb +4 -9
  67. data/lib/avo/resources/items/main_panel.rb +10 -0
  68. data/lib/avo/resources/items/row.rb +4 -16
  69. data/lib/avo/resources/items/sidebar.rb +9 -10
  70. data/lib/avo/resources/items/tab.rb +3 -9
  71. data/lib/avo/resources/items/tab_group.rb +6 -12
  72. data/lib/avo/version.rb +1 -1
  73. data/lib/generators/avo/templates/locales/avo.ar.yml +7 -6
  74. data/lib/generators/avo/templates/locales/avo.en.yml +2 -0
  75. data/lib/generators/avo/templates/locales/avo.es.yml +127 -0
  76. data/lib/generators/avo/templates/locales/avo.fr.yml +2 -0
  77. data/lib/generators/avo/templates/locales/avo.nb.yml +2 -0
  78. data/lib/generators/avo/templates/locales/avo.nn.yml +2 -0
  79. data/lib/generators/avo/templates/locales/avo.pt-BR.yml +2 -0
  80. data/lib/generators/avo/templates/locales/avo.pt.yml +2 -0
  81. data/lib/generators/avo/templates/locales/avo.ro.yml +2 -0
  82. data/lib/generators/avo/templates/locales/avo.tr.yml +2 -0
  83. data/public/avo-assets/avo.base.css +121 -4
  84. data/public/avo-assets/avo.base.js +86 -86
  85. data/public/avo-assets/avo.base.js.map +3 -3
  86. data/public/avo-assets/avo.css +9744 -0
  87. data/public/avo-assets/avo.js +513 -0
  88. data/public/avo-assets/avo.js.map +7 -0
  89. metadata +23 -8
  90. data/app/components/avo/item_switcher_component.html.erb +0 -27
  91. data/app/components/avo/item_switcher_component.rb +0 -48
  92. data/app/views/avo/actions/keep_modal_open.turbo_stream.erb +0 -5
  93. data/lib/avo/action_model.rb +0 -20
@@ -81,6 +81,7 @@ nn:
81
81
  to_top: Flytt elementet til toppen
82
82
  per_page: Per side
83
83
  prev_page: Førre side
84
+ records_selected_from_all_pages_html: Alle poster valgt fra alle sider
84
85
  remove_selection: Fjern val
85
86
  reset_filters: Nullstill filter
86
87
  resource_created: Ressurs generert
@@ -118,4 +119,5 @@ nn:
118
119
  zero: ingen fleire element
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> valde postar på denne sida av totalt <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> valde postar frå alle sider
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> poster valgt på denne siden
121
123
  you_missed_something_check_form: Her manglar du noko. Ver venleg og sjekk skjemaet.
@@ -81,6 +81,7 @@ pt-BR:
81
81
  to_top: Mover registro para cima
82
82
  per_page: Por página
83
83
  prev_page: Página anterior
84
+ records_selected_from_all_pages_html: Todos os registros de todas as páginas selecionados
84
85
  remove_selection: Remover seleção
85
86
  reset_filters: Limpar filtros
86
87
  resource_created: Recurso criado
@@ -118,4 +119,5 @@ pt-BR:
118
119
  zero: mais nenhum item
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> registros selecionados nesta página de um total de <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> registros selecionados de todas as páginas
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> registros selecionados nesta página
121
123
  you_missed_something_check_form: Você pode ter esquecido algo. Por favor, cheque o formulário.
@@ -81,6 +81,7 @@ pt:
81
81
  to_top: Mover recurso para o topo
82
82
  per_page: Por página
83
83
  prev_page: Página anterior
84
+ records_selected_from_all_pages_html: Todos os itens de todas as páginas selecionados
84
85
  remove_selection: Remover seleção
85
86
  reset_filters: Limpar filtros
86
87
  resource_created: Recurso criado
@@ -118,4 +119,5 @@ pt:
118
119
  zero: mais nenhum item
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> itens selecionados nesta página de um total de <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> itens selecionados de todas as páginas
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> itens selecionados nesta página
121
123
  you_missed_something_check_form: Pode ter-se esquecido algo. Por favor, verifique o formulário.
@@ -81,6 +81,7 @@ ro:
81
81
  to_top: Mutați înregistrarea sus de tot
82
82
  per_page: Pe pagină
83
83
  prev_page: Pagina anterioara
84
+ records_selected_from_all_pages_html: Toate selectate din toate paginile
84
85
  remove_selection: Șterge selecția
85
86
  reset_filters: Resetați filtrele
86
87
  resource_created: Resursă creata
@@ -118,4 +119,5 @@ ro:
118
119
  zero: zero articole
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> selectate dintr-un total de <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> selectate din toate paginile
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> selectate
121
123
  you_missed_something_check_form: S-ar putea să fi omis ceva. Vă rugăm să verificați formularul.
@@ -81,6 +81,7 @@ tr:
81
81
  to_top: Kaydı en üste taşı
82
82
  per_page: Sayfa başına
83
83
  prev_page: Önceki sayfa
84
+ records_selected_from_all_pages_html: Tüm sayfalardan seçilen tüm kayıtlar
84
85
  remove_selection: Seçimi sil
85
86
  reset_filters: Filtreleri sıfırla
86
87
  resource_created: Kayıt oluşturuldu
@@ -118,4 +119,5 @@ tr:
118
119
  zero: daha fazla öğe yok
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> bu sayfada seçilen toplam kayıtlar <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> tüm sayfalardan seçilen kayıtlar
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> bu sayfada seçilen kayıtlar
121
123
  you_missed_something_check_form: Bir şeyleri kaçırmış olabilirsiniz. Lütfen formu kontrol edin.
@@ -6697,10 +6697,18 @@ tag.tagify__tag{
6697
6697
  float:right
6698
6698
  }
6699
6699
 
6700
+ .float-left{
6701
+ float:left
6702
+ }
6703
+
6700
6704
  .m-0{
6701
6705
  margin:0px
6702
6706
  }
6703
6707
 
6708
+ .m-1{
6709
+ margin:0.25rem
6710
+ }
6711
+
6704
6712
  .-mx-1{
6705
6713
  margin-left:-0.25rem;
6706
6714
  margin-right:-0.25rem
@@ -6785,14 +6793,30 @@ tag.tagify__tag{
6785
6793
  margin-bottom:-0.5rem
6786
6794
  }
6787
6795
 
6796
+ .-ml-10{
6797
+ margin-left:-2.5rem
6798
+ }
6799
+
6800
+ .-ml-20{
6801
+ margin-left:-5rem
6802
+ }
6803
+
6788
6804
  .-ml-4{
6789
6805
  margin-left:-1rem
6790
6806
  }
6791
6807
 
6808
+ .-ml-px{
6809
+ margin-left:-1px
6810
+ }
6811
+
6792
6812
  .-mt-1{
6793
6813
  margin-top:-0.25rem
6794
6814
  }
6795
6815
 
6816
+ .-mt-10{
6817
+ margin-top:-2.5rem
6818
+ }
6819
+
6796
6820
  .-mt-12{
6797
6821
  margin-top:-3rem
6798
6822
  }
@@ -6801,6 +6825,10 @@ tag.tagify__tag{
6801
6825
  margin-top:-0.5rem
6802
6826
  }
6803
6827
 
6828
+ .-mt-24{
6829
+ margin-top:-6rem
6830
+ }
6831
+
6804
6832
  .-mt-9{
6805
6833
  margin-top:-2.25rem
6806
6834
  }
@@ -6845,6 +6873,10 @@ tag.tagify__tag{
6845
6873
  margin-left:0.5rem
6846
6874
  }
6847
6875
 
6876
+ .ml-20{
6877
+ margin-left:5rem
6878
+ }
6879
+
6848
6880
  .ml-3{
6849
6881
  margin-left:0.75rem
6850
6882
  }
@@ -6857,6 +6889,10 @@ tag.tagify__tag{
6857
6889
  margin-left:1.5rem
6858
6890
  }
6859
6891
 
6892
+ .ml-8{
6893
+ margin-left:2rem
6894
+ }
6895
+
6860
6896
  .ml-auto{
6861
6897
  margin-left:auto
6862
6898
  }
@@ -7045,10 +7081,18 @@ tag.tagify__tag{
7045
7081
  height:0.75rem
7046
7082
  }
7047
7083
 
7084
+ .h-36{
7085
+ height:9rem
7086
+ }
7087
+
7048
7088
  .h-4{
7049
7089
  height:1rem
7050
7090
  }
7051
7091
 
7092
+ .h-40{
7093
+ height:10rem
7094
+ }
7095
+
7052
7096
  .h-5{
7053
7097
  height:1.25rem
7054
7098
  }
@@ -7065,6 +7109,10 @@ tag.tagify__tag{
7065
7109
  height:16rem
7066
7110
  }
7067
7111
 
7112
+ .h-72{
7113
+ height:18rem
7114
+ }
7115
+
7068
7116
  .h-8{
7069
7117
  height:2rem
7070
7118
  }
@@ -7085,6 +7133,10 @@ tag.tagify__tag{
7085
7133
  height:100%
7086
7134
  }
7087
7135
 
7136
+ .max-h-11\/12{
7137
+ max-height:91.666667%
7138
+ }
7139
+
7088
7140
  .max-h-full{
7089
7141
  max-height:100%
7090
7142
  }
@@ -7387,10 +7439,6 @@ tag.tagify__tag{
7387
7439
  grid-auto-flow:row
7388
7440
  }
7389
7441
 
7390
- .grid-flow-col{
7391
- grid-auto-flow:column
7392
- }
7393
-
7394
7442
  .grid-cols-1{
7395
7443
  grid-template-columns:repeat(1, minmax(0, 1fr))
7396
7444
  }
@@ -7475,6 +7523,10 @@ tag.tagify__tag{
7475
7523
  justify-content:space-between
7476
7524
  }
7477
7525
 
7526
+ .justify-around{
7527
+ justify-content:space-around
7528
+ }
7529
+
7478
7530
  .justify-evenly{
7479
7531
  justify-content:space-evenly
7480
7532
  }
@@ -7491,6 +7543,10 @@ tag.tagify__tag{
7491
7543
  gap:0.5rem
7492
7544
  }
7493
7545
 
7546
+ .gap-3{
7547
+ gap:0.75rem
7548
+ }
7549
+
7494
7550
  .gap-4{
7495
7551
  gap:1rem
7496
7552
  }
@@ -7559,6 +7615,12 @@ tag.tagify__tag{
7559
7615
  margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))
7560
7616
  }
7561
7617
 
7618
+ .space-y-3 > :not([hidden]) ~ :not([hidden]){
7619
+ --tw-space-y-reverse:0;
7620
+ margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
7621
+ margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))
7622
+ }
7623
+
7562
7624
  .space-y-4 > :not([hidden]) ~ :not([hidden]){
7563
7625
  --tw-space-y-reverse:0;
7564
7626
  margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));
@@ -7684,6 +7746,16 @@ tag.tagify__tag{
7684
7746
  border-bottom-left-radius:0.25rem
7685
7747
  }
7686
7748
 
7749
+ .rounded-l-md{
7750
+ border-top-left-radius:0.375rem;
7751
+ border-bottom-left-radius:0.375rem
7752
+ }
7753
+
7754
+ .rounded-r-md{
7755
+ border-top-right-radius:0.375rem;
7756
+ border-bottom-right-radius:0.375rem
7757
+ }
7758
+
7687
7759
  .rounded-t{
7688
7760
  border-top-left-radius:0.25rem;
7689
7761
  border-top-right-radius:0.25rem
@@ -7693,6 +7765,11 @@ tag.tagify__tag{
7693
7765
  border-width:1px
7694
7766
  }
7695
7767
 
7768
+ .border-y{
7769
+ border-top-width:1px;
7770
+ border-bottom-width:1px
7771
+ }
7772
+
7696
7773
  .border-b{
7697
7774
  border-bottom-width:1px
7698
7775
  }
@@ -7833,6 +7910,10 @@ tag.tagify__tag{
7833
7910
  border-color:rgb(236 72 153 / var(--tw-border-opacity))
7834
7911
  }
7835
7912
 
7913
+ .border-primary-300{
7914
+ border-color:rgb(var(--color-primary-300))
7915
+ }
7916
+
7836
7917
  .border-primary-500{
7837
7918
  border-color:rgb(var(--color-primary-500))
7838
7919
  }
@@ -8238,6 +8319,11 @@ tag.tagify__tag{
8238
8319
  padding-bottom:0.375rem
8239
8320
  }
8240
8321
 
8322
+ .py-12{
8323
+ padding-top:3rem;
8324
+ padding-bottom:3rem
8325
+ }
8326
+
8241
8327
  .py-2{
8242
8328
  padding-top:0.5rem;
8243
8329
  padding-bottom:0.5rem
@@ -8301,6 +8387,10 @@ tag.tagify__tag{
8301
8387
  padding-bottom:1.5rem
8302
8388
  }
8303
8389
 
8390
+ .pb-8{
8391
+ padding-bottom:2rem
8392
+ }
8393
+
8304
8394
  .pe-48{
8305
8395
  padding-inline-end:12rem
8306
8396
  }
@@ -8309,6 +8399,10 @@ tag.tagify__tag{
8309
8399
  padding-left:0.25rem
8310
8400
  }
8311
8401
 
8402
+ .pl-4{
8403
+ padding-left:1rem
8404
+ }
8405
+
8312
8406
  .pr-0{
8313
8407
  padding-right:0px
8314
8408
  }
@@ -8474,6 +8568,11 @@ tag.tagify__tag{
8474
8568
  letter-spacing:-0.025em
8475
8569
  }
8476
8570
 
8571
+ .\!text-blue-700{
8572
+ --tw-text-opacity:1 !important;
8573
+ color:rgb(5 80 133 / var(--tw-text-opacity)) !important
8574
+ }
8575
+
8477
8576
  .\!text-pink-600{
8478
8577
  --tw-text-opacity:1 !important;
8479
8578
  color:rgb(219 39 119 / var(--tw-text-opacity)) !important
@@ -8714,6 +8813,10 @@ tag.tagify__tag{
8714
8813
  opacity:0.75
8715
8814
  }
8716
8815
 
8816
+ .opacity-80{
8817
+ opacity:0.8
8818
+ }
8819
+
8717
8820
  .shadow{
8718
8821
  --tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
8719
8822
  --tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
@@ -8785,6 +8888,11 @@ tag.tagify__tag{
8785
8888
  filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
8786
8889
  }
8787
8890
 
8891
+ .sepia{
8892
+ --tw-sepia:sepia(100%);
8893
+ filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
8894
+ }
8895
+
8788
8896
  .filter{
8789
8897
  filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
8790
8898
  }
@@ -9120,6 +9228,11 @@ trix-editor {
9120
9228
  background-color:rgb(206 231 248 / var(--tw-bg-opacity))
9121
9229
  }
9122
9230
 
9231
+ .hover\:bg-blue-500:hover{
9232
+ --tw-bg-opacity:1;
9233
+ background-color:rgb(8 134 222 / var(--tw-bg-opacity))
9234
+ }
9235
+
9123
9236
  .hover\:bg-blue-600:hover{
9124
9237
  --tw-bg-opacity:1;
9125
9238
  background-color:rgb(6 107 178 / var(--tw-bg-opacity))
@@ -10423,6 +10536,10 @@ trix-editor {
10423
10536
  width:50%
10424
10537
  }
10425
10538
 
10539
+ .lg\:w-3\/4{
10540
+ width:75%
10541
+ }
10542
+
10426
10543
  .lg\:w-64{
10427
10544
  width:16rem
10428
10545
  }