avo 2.16.1.pre.1.nativefields → 2.17.0

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -2
  3. data/Gemfile.lock +3 -1
  4. data/README.md +1 -1
  5. data/app/assets/config/avo_manifest.js +1 -0
  6. data/app/assets/svgs/placeholder.svg +1 -0
  7. data/app/components/avo/actions_component.html.erb +3 -3
  8. data/app/components/avo/base_component.rb +7 -4
  9. data/app/components/avo/field_wrapper_component.html.erb +8 -10
  10. data/app/components/avo/field_wrapper_component.rb +14 -12
  11. data/app/components/avo/fields/badge_field/index_component.html.erb +1 -1
  12. data/app/components/avo/fields/belongs_to_field/edit_component.rb +9 -3
  13. data/app/components/avo/fields/belongs_to_field/index_component.html.erb +1 -1
  14. data/app/components/avo/fields/belongs_to_field/show_component.html.erb +1 -1
  15. data/app/components/avo/fields/belongs_to_field/show_component.rb +1 -1
  16. data/app/components/avo/fields/boolean_field/index_component.html.erb +1 -1
  17. data/app/components/avo/fields/boolean_field/show_component.html.erb +1 -1
  18. data/app/components/avo/fields/boolean_group_field/index_component.html.erb +1 -1
  19. data/app/components/avo/fields/boolean_group_field/show_component.html.erb +1 -1
  20. data/app/components/avo/fields/code_field/show_component.html.erb +1 -1
  21. data/app/components/avo/fields/common/heading_component.html.erb +5 -4
  22. data/app/components/avo/fields/common/heading_component.rb +6 -1
  23. data/app/components/avo/fields/country_field/index_component.html.erb +1 -1
  24. data/app/components/avo/fields/date_field/index_component.html.erb +1 -1
  25. data/app/components/avo/fields/date_time_field/index_component.html.erb +1 -1
  26. data/app/components/avo/fields/edit_component.rb +6 -4
  27. data/app/components/avo/fields/external_image_field/index_component.html.erb +1 -1
  28. data/app/components/avo/fields/file_field/edit_component.html.erb +2 -1
  29. data/app/components/avo/fields/file_field/index_component.html.erb +1 -1
  30. data/app/components/avo/fields/files_field/edit_component.html.erb +2 -1
  31. data/app/components/avo/fields/files_field/index_component.html.erb +1 -1
  32. data/app/components/avo/fields/files_field/show_component.html.erb +1 -1
  33. data/app/components/avo/fields/gravatar_field/index_component.html.erb +1 -1
  34. data/app/components/avo/fields/has_one_field/index_component.html.erb +1 -1
  35. data/app/components/avo/fields/heading_field/edit_component.html.erb +1 -1
  36. data/app/components/avo/fields/heading_field/show_component.html.erb +1 -1
  37. data/app/components/avo/fields/id_field/index_component.html.erb +1 -1
  38. data/app/components/avo/fields/index_component.rb +11 -2
  39. data/app/components/avo/fields/number_field/index_component.html.erb +1 -1
  40. data/app/components/avo/fields/progress_bar_field/index_component.html.erb +1 -1
  41. data/app/components/avo/fields/select_field/index_component.html.erb +1 -1
  42. data/app/components/avo/fields/show_component.rb +7 -1
  43. data/app/components/avo/fields/status_field/index_component.html.erb +1 -1
  44. data/app/components/avo/fields/tags_field/index_component.html.erb +1 -1
  45. data/app/components/avo/fields/text_field/edit_component.html.erb +3 -1
  46. data/app/components/avo/fields/text_field/index_component.html.erb +1 -1
  47. data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -1
  48. data/app/components/avo/filters_component.html.erb +2 -2
  49. data/app/components/avo/index/grid_cover_empty_state_component.html.erb +1 -1
  50. data/app/components/avo/index/grid_item_component.html.erb +15 -13
  51. data/app/components/avo/index/grid_item_component.rb +1 -1
  52. data/app/components/avo/index/ordering/buttons_component.html.erb +1 -1
  53. data/app/components/avo/index/resource_controls_component.rb +2 -2
  54. data/app/components/avo/index/table_row_component.html.erb +1 -1
  55. data/app/components/avo/panel_component.html.erb +11 -2
  56. data/app/components/avo/panel_component.rb +1 -0
  57. data/app/components/avo/resource_component.rb +18 -0
  58. data/app/components/avo/resource_sidebar_component.html.erb +19 -0
  59. data/app/components/avo/resource_sidebar_component.rb +26 -0
  60. data/app/components/avo/sidebar_profile_component.html.erb +1 -1
  61. data/app/components/avo/tab_switcher_component.html.erb +2 -2
  62. data/app/components/avo/views/resource_edit_component.html.erb +31 -25
  63. data/app/components/avo/views/resource_edit_component.rb +1 -1
  64. data/app/components/avo/views/resource_show_component.html.erb +8 -2
  65. data/app/components/avo/views/resource_show_component.rb +1 -1
  66. data/app/controllers/avo/actions_controller.rb +10 -2
  67. data/app/controllers/avo/application_controller.rb +4 -2
  68. data/app/controllers/avo/associations_controller.rb +10 -5
  69. data/app/controllers/avo/attachments_controller.rb +2 -1
  70. data/app/controllers/avo/base_controller.rb +6 -4
  71. data/app/controllers/avo/search_controller.rb +13 -4
  72. data/app/helpers/avo/application_helper.rb +3 -3
  73. data/app/helpers/avo/resources_helper.rb +2 -2
  74. data/app/javascript/avo.base.js +3 -1
  75. data/app/javascript/js/controllers/action_controller.js +1 -4
  76. data/app/javascript/js/controllers/actions_picker_controller.js +8 -9
  77. data/app/javascript/js/controllers/tabs_controller.js +14 -27
  78. data/app/views/avo/actions/show.html.erb +2 -2
  79. data/app/views/avo/home/failed_to_load.html.erb +3 -2
  80. data/config/brakeman.ignore +40 -0
  81. data/db/factories.rb +20 -0
  82. data/lib/avo/base_resource.rb +26 -0
  83. data/lib/avo/concerns/fetches_things.rb +1 -1
  84. data/lib/avo/concerns/has_fields.rb +22 -0
  85. data/lib/avo/concerns/is_resource_item.rb +4 -0
  86. data/lib/avo/configuration/branding.rb +9 -1
  87. data/lib/avo/fields/belongs_to_field.rb +3 -0
  88. data/lib/avo/fields/heading_field.rb +15 -0
  89. data/lib/avo/items_holder.rb +4 -0
  90. data/lib/avo/licensing/pro_license.rb +1 -0
  91. data/lib/avo/menu/builder.rb +1 -1
  92. data/lib/avo/menu/menu.rb +0 -2
  93. data/lib/avo/reloader.rb +27 -26
  94. data/lib/avo/services/encryption_service.rb +1 -1
  95. data/lib/avo/sidebar.rb +60 -0
  96. data/lib/avo/sidebar_builder.rb +24 -0
  97. data/lib/avo/version.rb +1 -1
  98. data/lib/generators/avo/templates/field/components/index_component.html.erb.tt +1 -1
  99. data/lib/generators/avo/templates/initializer/avo.tt +2 -1
  100. data/lib/generators/avo/templates/locales/avo.en.yml +0 -1
  101. data/lib/generators/avo/templates/locales/{avo.nb-NO.yml → avo.nb.yml} +35 -10
  102. data/lib/generators/avo/templates/locales/avo.nn.yml +118 -0
  103. data/lib/generators/avo/templates/locales/avo.tr.yml +119 -0
  104. data/public/avo-assets/avo.base.css +57 -75
  105. data/public/avo-assets/avo.base.js +63 -63
  106. data/public/avo-assets/avo.base.js.map +3 -3
  107. metadata +13 -7
  108. data/app/views/avo/home/failed_to_load.html copy.erb +0 -23
  109. data/config/master.key +0 -1
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.16.1.pre.1.nativefields
4
+ version: 2.17.0
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-09-29 00:00:00.000000000 Z
12
+ date: 2022-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -1351,6 +1351,7 @@ files:
1351
1351
  - app/assets/svgs/menu-back.svg
1352
1352
  - app/assets/svgs/menu.svg
1353
1353
  - app/assets/svgs/photograph.svg
1354
+ - app/assets/svgs/placeholder.svg
1354
1355
  - app/assets/svgs/play.svg
1355
1356
  - app/assets/svgs/plus-circle.svg
1356
1357
  - app/assets/svgs/plus.svg
@@ -1597,6 +1598,8 @@ files:
1597
1598
  - app/components/avo/referrer_params_component.html.erb
1598
1599
  - app/components/avo/referrer_params_component.rb
1599
1600
  - app/components/avo/resource_component.rb
1601
+ - app/components/avo/resource_sidebar_component.html.erb
1602
+ - app/components/avo/resource_sidebar_component.rb
1600
1603
  - app/components/avo/sidebar/base_item_component.rb
1601
1604
  - app/components/avo/sidebar/group_component.html.erb
1602
1605
  - app/components/avo/sidebar/group_component.rb
@@ -1703,7 +1706,6 @@ files:
1703
1706
  - app/views/avo/home/_docs.html.erb
1704
1707
  - app/views/avo/home/_filters.html.erb
1705
1708
  - app/views/avo/home/_resources.html.erb
1706
- - app/views/avo/home/failed_to_load.html copy.erb
1707
1709
  - app/views/avo/home/failed_to_load.html.erb
1708
1710
  - app/views/avo/home/index.html.erb
1709
1711
  - app/views/avo/partials/_branding.html.erb
@@ -1736,10 +1738,10 @@ files:
1736
1738
  - bin/rspec
1737
1739
  - bin/spring
1738
1740
  - bin/test
1741
+ - config/brakeman.ignore
1739
1742
  - config/cable.yml
1740
1743
  - config/credentials.yml.enc
1741
1744
  - config/initializers/pagy.rb
1742
- - config/master.key
1743
1745
  - config/routes.rb
1744
1746
  - config/spring.rb
1745
1747
  - db/factories.rb
@@ -1861,6 +1863,8 @@ files:
1861
1863
  - lib/avo/services/authorization_service.rb
1862
1864
  - lib/avo/services/encryption_service.rb
1863
1865
  - lib/avo/services/uri_service.rb
1866
+ - lib/avo/sidebar.rb
1867
+ - lib/avo/sidebar_builder.rb
1864
1868
  - lib/avo/svg_finder.rb
1865
1869
  - lib/avo/tab.rb
1866
1870
  - lib/avo/tab_builder.rb
@@ -1909,9 +1913,11 @@ files:
1909
1913
  - lib/generators/avo/templates/js/avo.custom.js
1910
1914
  - lib/generators/avo/templates/locales/avo.en.yml
1911
1915
  - lib/generators/avo/templates/locales/avo.fr.yml
1912
- - lib/generators/avo/templates/locales/avo.nb-NO.yml
1916
+ - lib/generators/avo/templates/locales/avo.nb.yml
1917
+ - lib/generators/avo/templates/locales/avo.nn.yml
1913
1918
  - lib/generators/avo/templates/locales/avo.pt-BR.yml
1914
1919
  - lib/generators/avo/templates/locales/avo.ro.yml
1920
+ - lib/generators/avo/templates/locales/avo.tr.yml
1915
1921
  - lib/generators/avo/templates/resource/controller.tt
1916
1922
  - lib/generators/avo/templates/resource/resource.tt
1917
1923
  - lib/generators/avo/templates/resource_tools/partial.tt
@@ -1972,9 +1978,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1972
1978
  version: 2.4.0
1973
1979
  required_rubygems_version: !ruby/object:Gem::Requirement
1974
1980
  requirements:
1975
- - - ">"
1981
+ - - ">="
1976
1982
  - !ruby/object:Gem::Version
1977
- version: 1.3.1
1983
+ version: '0'
1978
1984
  requirements: []
1979
1985
  rubygems_version: 3.3.3
1980
1986
  signing_key:
@@ -1,23 +0,0 @@
1
- <%= render Avo::TurboFrameWrapperComponent.new(params[:turbo_frame]) do %>
2
- <%
3
- classes = 'absolute inset-auto left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2'
4
- label = t 'avo.failed_to_load'
5
- %>
6
- <div class="relative flex-1 py-12">
7
- <div class="relative block text-gray-300 h-40 w-full">
8
- <%= svg 'avocado', class: "#{classes} h-20 text-gray-400" %>
9
- <%= svg 'code', class: "#{classes} h-8 -ml-20 -mt-12" %>
10
- <%= svg 'fire', class: "#{classes} h-8 -ml-10 -mt-24" %>
11
- <%= svg 'color-swatch', class: "#{classes} h-8 ml-8 -mt-24" %>
12
- <%= svg 'globe', class: "#{classes} h-8 ml-20 -mt-12" %>
13
- <%= svg 'library', class: "#{classes} h-8 -ml-20 mt-4" %>
14
- <%= svg 'photograph', class: "#{classes} h-8 ml-20 mt-4" %>
15
- </div>
16
- <div class="relative block text-center text-lg text-gray-400 font-semibold -mt-10"><%= label %> <span class="border-b-2 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
17
- </div>
18
- <% if Rails.env.development? %>
19
- <div class="text-center text-sm w-full">
20
- This is not an issue with Avo. Click <%= link_to 'this link', params[:src], target: :_blank %> to see why this frame failed to load.
21
- </div>
22
- <% end %>
23
- <% end %>
data/config/master.key DELETED
@@ -1 +0,0 @@
1
- 2aeb23d82b909d9c6b5abb62f7058c2a