avo 1.3.5 → 1.4.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 (342) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +1 -0
  4. data/app/components/avo/fields/badge_field/index_component.html.erb +3 -0
  5. data/app/components/avo/fields/badge_field/index_component.rb +4 -0
  6. data/app/components/avo/fields/badge_field/show_component.html.erb +3 -0
  7. data/app/components/avo/fields/badge_field/show_component.rb +4 -0
  8. data/app/components/avo/{edit/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/edit_component.html.erb} +0 -0
  9. data/app/components/avo/{edit/fields/belongs_to_field_component.rb → fields/belongs_to_field/edit_component.rb} +1 -1
  10. data/app/components/avo/{index/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/index_component.html.erb} +0 -0
  11. data/app/components/avo/fields/belongs_to_field/index_component.rb +4 -0
  12. data/app/components/avo/{show/fields/belongs_to_field_component.html.erb → fields/belongs_to_field/show_component.html.erb} +0 -0
  13. data/app/components/avo/fields/belongs_to_field/show_component.rb +4 -0
  14. data/app/components/avo/{edit/fields/boolean_field_component.html.erb → fields/boolean_field/edit_component.html.erb} +0 -0
  15. data/app/components/avo/fields/boolean_field/edit_component.rb +4 -0
  16. data/app/components/avo/fields/boolean_field/index_component.html.erb +3 -0
  17. data/app/components/avo/fields/boolean_field/index_component.rb +4 -0
  18. data/app/components/avo/{show/fields/boolean_field_component.html.erb → fields/boolean_field/show_component.html.erb} +1 -1
  19. data/app/components/avo/fields/boolean_field/show_component.rb +4 -0
  20. data/app/components/avo/{edit/fields/boolean_group_field_component.html.erb → fields/boolean_group_field/edit_component.html.erb} +0 -0
  21. data/app/components/avo/fields/boolean_group_field/edit_component.rb +4 -0
  22. data/app/components/avo/fields/boolean_group_field/index_component.html.erb +3 -0
  23. data/app/components/avo/fields/boolean_group_field/index_component.rb +4 -0
  24. data/app/components/avo/fields/boolean_group_field/show_component.html.erb +3 -0
  25. data/app/components/avo/fields/boolean_group_field/show_component.rb +4 -0
  26. data/app/components/avo/{edit/fields/code_field_component.html.erb → fields/code_field/edit_component.html.erb} +0 -0
  27. data/app/components/avo/fields/code_field/edit_component.rb +4 -0
  28. data/app/components/avo/{show/fields/code_field_component.html.erb → fields/code_field/show_component.html.erb} +0 -0
  29. data/app/components/avo/fields/code_field/show_component.rb +4 -0
  30. data/app/components/avo/{common → fields/common}/badge_viewer_component.html.erb +0 -0
  31. data/app/components/avo/{common → fields/common}/badge_viewer_component.rb +1 -1
  32. data/app/components/avo/{common → fields/common}/boolean_check_component.html.erb +0 -0
  33. data/app/components/avo/{common → fields/common}/boolean_check_component.rb +1 -1
  34. data/app/components/avo/{common → fields/common}/boolean_group_component.html.erb +1 -1
  35. data/app/components/avo/{common → fields/common}/boolean_group_component.rb +1 -1
  36. data/app/components/avo/fields/common/files_list_viewer_component.html.erb +5 -0
  37. data/app/components/avo/{common → fields/common}/files_list_viewer_component.rb +1 -1
  38. data/app/components/avo/{common → fields/common}/gravatar_viewer_component.html.erb +0 -0
  39. data/app/components/avo/{common → fields/common}/gravatar_viewer_component.rb +1 -1
  40. data/app/components/avo/{common → fields/common}/heading_component.html.erb +0 -0
  41. data/app/components/avo/{common → fields/common}/heading_component.rb +1 -1
  42. data/app/components/avo/{common → fields/common}/key_value_component.html.erb +0 -0
  43. data/app/components/avo/{common → fields/common}/key_value_component.rb +1 -1
  44. data/app/components/avo/{common → fields/common}/multiple_file_viewer_component.html.erb +0 -0
  45. data/app/components/avo/{common → fields/common}/multiple_file_viewer_component.rb +1 -1
  46. data/app/components/avo/{common → fields/common}/single_file_viewer_component.html.erb +0 -0
  47. data/app/components/avo/{common → fields/common}/single_file_viewer_component.rb +1 -1
  48. data/app/components/avo/fields/common/status_viewer_component.html.erb +18 -0
  49. data/app/components/avo/{common → fields/common}/status_viewer_component.rb +1 -1
  50. data/app/components/avo/{edit/fields/country_field_component.html.erb → fields/country_field/edit_component.html.erb} +0 -0
  51. data/app/components/avo/fields/country_field/edit_component.rb +4 -0
  52. data/app/components/avo/{index/fields/country_field_component.html.erb → fields/country_field/index_component.html.erb} +0 -0
  53. data/app/components/avo/fields/country_field/index_component.rb +4 -0
  54. data/app/components/avo/{show/fields/country_field_component.html.erb → fields/country_field/show_component.html.erb} +0 -0
  55. data/app/components/avo/fields/country_field/show_component.rb +4 -0
  56. data/app/components/avo/{edit/fields/date_field_component.html.erb → fields/date_field/edit_component.html.erb} +0 -0
  57. data/app/components/avo/fields/date_field/edit_component.rb +4 -0
  58. data/app/components/avo/{index/fields/date_field_component.html.erb → fields/date_field/index_component.html.erb} +0 -0
  59. data/app/components/avo/fields/date_field/index_component.rb +4 -0
  60. data/app/components/avo/{show/fields/date_field_component.html.erb → fields/date_field/show_component.html.erb} +0 -0
  61. data/app/components/avo/fields/date_field/show_component.rb +4 -0
  62. data/app/components/avo/{edit/fields/date_time_field_component.html.erb → fields/date_time_field/edit_component.html.erb} +0 -0
  63. data/app/components/avo/fields/date_time_field/edit_component.rb +4 -0
  64. data/app/components/avo/{index/fields/date_time_field_component.html.erb → fields/date_time_field/index_component.html.erb} +0 -0
  65. data/app/components/avo/fields/date_time_field/index_component.rb +4 -0
  66. data/app/components/avo/{show/fields/date_time_field_component.html.erb → fields/date_time_field/show_component.html.erb} +0 -0
  67. data/app/components/avo/fields/date_time_field/show_component.rb +4 -0
  68. data/app/components/avo/{edit/fields/field_component.rb → fields/edit_component.rb} +1 -1
  69. data/app/components/avo/{edit/fields/external_image_field_component.html.erb → fields/external_image_field/edit_component.html.erb} +0 -0
  70. data/app/components/avo/fields/external_image_field/edit_component.rb +4 -0
  71. data/app/components/avo/{index/fields/external_image_field_component.html.erb → fields/external_image_field/index_component.html.erb} +0 -0
  72. data/app/components/avo/fields/external_image_field/index_component.rb +4 -0
  73. data/app/components/avo/{show/fields/external_image_field_component.html.erb → fields/external_image_field/show_component.html.erb} +0 -0
  74. data/app/components/avo/fields/external_image_field/show_component.rb +4 -0
  75. data/app/components/avo/{edit/fields/file_field_component.html.erb → fields/file_field/edit_component.html.erb} +1 -1
  76. data/app/components/avo/fields/file_field/edit_component.rb +4 -0
  77. data/app/components/avo/{index/fields/file_field_component.html.erb → fields/file_field/index_component.html.erb} +1 -1
  78. data/app/components/avo/fields/file_field/index_component.rb +4 -0
  79. data/app/components/avo/fields/file_field/show_component.html.erb +3 -0
  80. data/app/components/avo/fields/file_field/show_component.rb +4 -0
  81. data/app/components/avo/{edit/fields/files_field_component.html.erb → fields/files_field/edit_component.html.erb} +1 -1
  82. data/app/components/avo/fields/files_field/edit_component.rb +4 -0
  83. data/app/components/avo/{index/fields/files_field_component.html.erb → fields/files_field/index_component.html.erb} +0 -0
  84. data/app/components/avo/fields/files_field/index_component.rb +4 -0
  85. data/app/components/avo/fields/files_field/show_component.html.erb +3 -0
  86. data/app/components/avo/fields/files_field/show_component.rb +4 -0
  87. data/app/components/avo/{index/fields/gravatar_field_component.html.erb → fields/gravatar_field/index_component.html.erb} +2 -2
  88. data/app/components/avo/fields/gravatar_field/index_component.rb +4 -0
  89. data/app/components/avo/{show/fields/gravatar_field_component.html.erb → fields/gravatar_field/show_component.html.erb} +1 -1
  90. data/app/components/avo/fields/gravatar_field/show_component.rb +4 -0
  91. data/app/components/avo/{show/fields/has_many_field_component.html.erb → fields/has_many_field/show_component.html.erb} +0 -0
  92. data/app/components/avo/fields/has_many_field/show_component.rb +4 -0
  93. data/app/components/avo/{index/fields/has_one_field_component.html.erb → fields/has_one_field/index_component.html.erb} +0 -0
  94. data/app/components/avo/fields/has_one_field/index_component.rb +4 -0
  95. data/app/components/avo/{show/fields/has_one_field_component.html.erb → fields/has_one_field/show_component.html.erb} +0 -0
  96. data/app/components/avo/fields/has_one_field/show_component.rb +5 -0
  97. data/app/components/avo/{show/fields/heading_field_component.html.erb → fields/heading_field/edit_component.html.erb} +1 -1
  98. data/app/components/avo/fields/heading_field/edit_component.rb +4 -0
  99. data/app/components/avo/{edit/fields/heading_field_component.html.erb → fields/heading_field/show_component.html.erb} +1 -1
  100. data/app/components/avo/fields/heading_field/show_component.rb +4 -0
  101. data/app/components/avo/{edit/fields/hidden_field_component.html.erb → fields/hidden_field/edit_component.html.erb} +0 -0
  102. data/app/components/avo/fields/hidden_field/edit_component.rb +4 -0
  103. data/app/components/avo/{edit/fields/id_field_component.html.erb → fields/id_field/edit_component.html.erb} +0 -0
  104. data/app/components/avo/fields/id_field/edit_component.rb +4 -0
  105. data/app/components/avo/fields/id_field/index_component.html.erb +3 -0
  106. data/app/components/avo/fields/id_field/index_component.rb +4 -0
  107. data/app/components/avo/{show/fields/id_field_component.html.erb → fields/id_field/show_component.html.erb} +0 -0
  108. data/app/components/avo/fields/id_field/show_component.rb +4 -0
  109. data/app/components/avo/fields/index_component.rb +20 -0
  110. data/app/components/avo/{edit/fields/key_value_field_component.html.erb → fields/key_value_field/edit_component.html.erb} +1 -1
  111. data/app/components/avo/fields/key_value_field/edit_component.rb +4 -0
  112. data/app/components/avo/{show/fields/key_value_field_component.html.erb → fields/key_value_field/show_component.html.erb} +1 -1
  113. data/app/components/avo/fields/key_value_field/show_component.rb +4 -0
  114. data/app/components/avo/{edit/fields/markdown_field_component.html.erb → fields/markdown_field/edit_component.html.erb} +0 -0
  115. data/app/components/avo/fields/markdown_field/edit_component.rb +4 -0
  116. data/app/components/avo/{show/fields/markdown_field_component.html.erb → fields/markdown_field/show_component.html.erb} +1 -1
  117. data/app/components/avo/fields/markdown_field/show_component.rb +4 -0
  118. data/app/components/avo/{edit/fields/number_field_component.html.erb → fields/number_field/edit_component.html.erb} +3 -3
  119. data/app/components/avo/fields/number_field/edit_component.rb +4 -0
  120. data/app/components/avo/{index/fields/number_field_component.html.erb → fields/number_field/index_component.html.erb} +0 -0
  121. data/app/components/avo/fields/number_field/index_component.rb +4 -0
  122. data/app/components/avo/{show/fields/number_field_component.html.erb → fields/number_field/show_component.html.erb} +0 -0
  123. data/app/components/avo/fields/number_field/show_component.rb +4 -0
  124. data/app/components/avo/{edit/fields/password_field_component.html.erb → fields/password_field/edit_component.html.erb} +0 -0
  125. data/app/components/avo/fields/password_field/edit_component.rb +4 -0
  126. data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +26 -0
  127. data/app/components/avo/fields/progress_bar_field/edit_component.rb +4 -0
  128. data/app/components/avo/fields/progress_bar_field/index_component.html.erb +8 -0
  129. data/app/components/avo/fields/progress_bar_field/index_component.rb +4 -0
  130. data/app/components/avo/fields/progress_bar_field/show_component.html.erb +8 -0
  131. data/app/components/avo/fields/progress_bar_field/show_component.rb +4 -0
  132. data/app/components/avo/{edit/fields/select_field_component.html.erb → fields/select_field/edit_component.html.erb} +0 -0
  133. data/app/components/avo/fields/select_field/edit_component.rb +4 -0
  134. data/app/components/avo/{index/fields/select_field_component.html.erb → fields/select_field/index_component.html.erb} +0 -0
  135. data/app/components/avo/fields/select_field/index_component.rb +4 -0
  136. data/app/components/avo/{show/fields/select_field_component.html.erb → fields/select_field/show_component.html.erb} +0 -0
  137. data/app/components/avo/fields/select_field/show_component.rb +4 -0
  138. data/app/components/avo/{show/fields/field_component.rb → fields/show_component.rb} +1 -1
  139. data/app/components/avo/{edit/fields/status_field_component.html.erb → fields/status_field/edit_component.html.erb} +0 -0
  140. data/app/components/avo/fields/status_field/edit_component.rb +4 -0
  141. data/app/components/avo/fields/status_field/index_component.html.erb +3 -0
  142. data/app/components/avo/fields/status_field/index_component.rb +4 -0
  143. data/app/components/avo/fields/status_field/show_component.html.erb +3 -0
  144. data/app/components/avo/fields/status_field/show_component.rb +4 -0
  145. data/app/components/avo/{edit/fields/text_field_component.html.erb → fields/text_field/edit_component.html.erb} +0 -0
  146. data/app/components/avo/fields/text_field/edit_component.rb +4 -0
  147. data/app/components/avo/fields/text_field/index_component.html.erb +3 -0
  148. data/app/components/avo/fields/text_field/index_component.rb +4 -0
  149. data/app/components/avo/{show/fields/text_field_component.html.erb → fields/text_field/show_component.html.erb} +0 -0
  150. data/app/components/avo/fields/text_field/show_component.rb +4 -0
  151. data/app/components/avo/{edit/fields/textarea_field_component.html.erb → fields/textarea_field/edit_component.html.erb} +1 -1
  152. data/app/components/avo/fields/textarea_field/edit_component.rb +4 -0
  153. data/app/components/avo/{show/fields/textarea_field_component.html.erb → fields/textarea_field/show_component.html.erb} +0 -0
  154. data/app/components/avo/fields/textarea_field/show_component.rb +4 -0
  155. data/app/components/avo/fields/trix_field/edit_component.html.erb +19 -0
  156. data/app/components/avo/fields/trix_field/edit_component.rb +4 -0
  157. data/app/components/avo/{show/fields/trix_field_component.html.erb → fields/trix_field/show_component.html.erb} +0 -0
  158. data/app/components/avo/fields/trix_field/show_component.rb +4 -0
  159. data/app/components/avo/index/resource_controls_component.html.erb +2 -3
  160. data/app/components/avo/index/table_row_component.html.erb +1 -1
  161. data/app/components/avo/panel_component.html.erb +1 -1
  162. data/app/components/avo/panel_component.rb +4 -4
  163. data/app/components/avo/views/resource_edit_component.html.erb +2 -2
  164. data/app/components/avo/views/resource_index_component.html.erb +3 -3
  165. data/app/components/avo/views/resource_new_component.html.erb +2 -2
  166. data/app/components/avo/views/resource_show_component.html.erb +5 -5
  167. data/app/controllers/avo/application_controller.rb +5 -1
  168. data/app/controllers/avo/attachments_controller.rb +14 -3
  169. data/app/controllers/avo/base_controller.rb +26 -2
  170. data/app/controllers/avo/home_controller.rb +1 -1
  171. data/app/controllers/avo/search_controller.rb +1 -1
  172. data/app/helpers/avo/resources_helper.rb +0 -44
  173. data/app/packs/entrypoints/application.css +1 -0
  174. data/app/packs/entrypoints/application.js +0 -1
  175. data/app/packs/js/controllers/fields/date_field_controller.js +1 -1
  176. data/app/packs/js/controllers/fields/key_value_controller.js +0 -1
  177. data/app/packs/js/controllers/fields/trix_field_controller.js +121 -0
  178. data/app/packs/stylesheets/components/progress.css +13 -0
  179. data/app/packs/stylesheets/components/status.css +31 -20
  180. data/app/packs/svgs/check-circle-sm.svg +3 -0
  181. data/app/packs/svgs/x-circle-sm.svg +3 -0
  182. data/app/views/avo/actions/show.html.erb +1 -1
  183. data/app/views/avo/partials/_javascript.html.erb +3 -1
  184. data/app/views/avo/partials/_profile_dropdown.html.erb +19 -0
  185. data/app/views/layouts/avo/application.html.erb +6 -3
  186. data/config/routes.rb +4 -0
  187. data/config/webpacker.yml +2 -2
  188. data/db/factories.rb +3 -0
  189. data/db/migrate/20210421064037_add_color_to_teams.rb +5 -0
  190. data/db/migrate/20210423075924_add_progress_to_projects.rb +5 -0
  191. data/lib/avo/app.rb +9 -20
  192. data/lib/avo/base_resource.rb +9 -1
  193. data/lib/avo/configuration.rb +1 -1
  194. data/lib/avo/engine.rb +1 -0
  195. data/lib/avo/fields/badge_field.rb +4 -6
  196. data/lib/avo/fields/base_field.rb +62 -83
  197. data/lib/avo/fields/belongs_to_field.rb +11 -11
  198. data/lib/avo/fields/boolean_field.rb +2 -7
  199. data/lib/avo/fields/boolean_group_field.rb +2 -7
  200. data/lib/avo/fields/code_field.rb +3 -7
  201. data/lib/avo/fields/country_field.rb +3 -6
  202. data/lib/avo/fields/currency_field.rb +4 -13
  203. data/lib/avo/fields/date_field.rb +2 -8
  204. data/lib/avo/fields/date_time_field.rb +2 -3
  205. data/lib/avo/fields/external_image_field.rb +3 -7
  206. data/lib/avo/fields/file_field.rb +4 -8
  207. data/lib/avo/fields/files_field.rb +6 -8
  208. data/lib/avo/fields/gravatar_field.rb +6 -9
  209. data/lib/avo/fields/has_and_belongs_to_many_field.rb +6 -7
  210. data/lib/avo/fields/has_many_field.rb +3 -9
  211. data/lib/avo/fields/has_one_field.rb +3 -8
  212. data/lib/avo/fields/heading_field.rb +10 -8
  213. data/lib/avo/fields/hidden_field.rb +2 -6
  214. data/lib/avo/fields/id_field.rb +5 -17
  215. data/lib/avo/fields/key_value_field.rb +4 -6
  216. data/lib/avo/fields/markdown_field.rb +3 -5
  217. data/lib/avo/fields/number_field.rb +8 -11
  218. data/lib/avo/fields/password_field.rb +2 -6
  219. data/lib/avo/fields/progress_bar_field.rb +19 -0
  220. data/lib/avo/fields/select_field.rb +13 -12
  221. data/lib/avo/fields/status_field.rb +2 -6
  222. data/lib/avo/fields/text_field.rb +3 -6
  223. data/lib/avo/fields/textarea_field.rb +4 -7
  224. data/lib/avo/fields/trix_field.rb +7 -7
  225. data/lib/avo/fields_collector.rb +47 -11
  226. data/lib/avo/licensing/pro_license.rb +2 -1
  227. data/lib/avo/version.rb +1 -1
  228. data/lib/generators/avo/eject_generator.rb +1 -0
  229. data/lib/generators/avo/field_generator.rb +17 -0
  230. data/lib/generators/avo/filter_generator.rb +1 -1
  231. data/lib/generators/avo/templates/field/%singular_name%_field.rb.tt +5 -0
  232. data/lib/generators/avo/templates/field/components/edit_component.html.erb.tt +6 -0
  233. data/lib/generators/avo/templates/field/components/edit_component.rb.tt +4 -0
  234. data/lib/generators/avo/templates/field/components/index_component.html.erb.tt +3 -0
  235. data/lib/generators/avo/templates/field/components/index_component.rb.tt +4 -0
  236. data/lib/generators/avo/templates/field/components/show_component.html.erb.tt +3 -0
  237. data/lib/generators/avo/templates/field/components/show_component.rb.tt +4 -0
  238. data/lib/generators/avo/templates/tool/view.tt +1 -1
  239. data/public/avo-packs/css/{application-0b91a712.css → application-68691c73.css} +132 -49
  240. data/public/avo-packs/css/application-68691c73.css.br +0 -0
  241. data/public/avo-packs/css/application-68691c73.css.gz +0 -0
  242. data/public/avo-packs/css/application-68691c73.css.map +1 -0
  243. data/public/avo-packs/css/application-68691c73.css.map.br +0 -0
  244. data/public/avo-packs/css/application-68691c73.css.map.gz +0 -0
  245. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js +26 -0
  246. data/public/avo-packs/js/{application-c2a8a64ca8f5d2805d79.js.LICENSE.txt → application-6a0b9e58526ae6bef242.js.LICENSE.txt} +0 -0
  247. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.br +0 -0
  248. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.gz +0 -0
  249. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map +1 -0
  250. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map.br +0 -0
  251. data/public/avo-packs/js/application-6a0b9e58526ae6bef242.js.map.gz +0 -0
  252. data/public/avo-packs/manifest.json +15 -15
  253. metadata +186 -165
  254. data/app/components/avo/common/files_list_viewer_component.html.erb +0 -5
  255. data/app/components/avo/common/status_viewer_component.html.erb +0 -10
  256. data/app/components/avo/edit/fields/boolean_field_component.rb +0 -4
  257. data/app/components/avo/edit/fields/boolean_group_field_component.rb +0 -4
  258. data/app/components/avo/edit/fields/code_field_component.rb +0 -4
  259. data/app/components/avo/edit/fields/country_field_component.rb +0 -4
  260. data/app/components/avo/edit/fields/date_field_component.rb +0 -4
  261. data/app/components/avo/edit/fields/date_time_field_component.rb +0 -4
  262. data/app/components/avo/edit/fields/external_image_field_component.rb +0 -4
  263. data/app/components/avo/edit/fields/file_field_component.rb +0 -4
  264. data/app/components/avo/edit/fields/files_field_component.rb +0 -4
  265. data/app/components/avo/edit/fields/heading_field_component.rb +0 -4
  266. data/app/components/avo/edit/fields/hidden_field_component.rb +0 -4
  267. data/app/components/avo/edit/fields/id_field_component.rb +0 -4
  268. data/app/components/avo/edit/fields/key_value_field_component.rb +0 -4
  269. data/app/components/avo/edit/fields/markdown_field_component.rb +0 -4
  270. data/app/components/avo/edit/fields/number_field_component.rb +0 -4
  271. data/app/components/avo/edit/fields/password_field_component.rb +0 -4
  272. data/app/components/avo/edit/fields/select_field_component.rb +0 -4
  273. data/app/components/avo/edit/fields/status_field_component.rb +0 -4
  274. data/app/components/avo/edit/fields/text_field_component.rb +0 -4
  275. data/app/components/avo/edit/fields/textarea_field_component.rb +0 -4
  276. data/app/components/avo/edit/fields/trix_field_component.html.erb +0 -11
  277. data/app/components/avo/edit/fields/trix_field_component.rb +0 -4
  278. data/app/components/avo/index/fields/badge_field_component.html.erb +0 -3
  279. data/app/components/avo/index/fields/badge_field_component.rb +0 -4
  280. data/app/components/avo/index/fields/belongs_to_field_component.rb +0 -4
  281. data/app/components/avo/index/fields/boolean_field_component.html.erb +0 -3
  282. data/app/components/avo/index/fields/boolean_field_component.rb +0 -4
  283. data/app/components/avo/index/fields/boolean_group_field_component.html.erb +0 -3
  284. data/app/components/avo/index/fields/boolean_group_field_component.rb +0 -4
  285. data/app/components/avo/index/fields/country_field_component.rb +0 -4
  286. data/app/components/avo/index/fields/date_field_component.rb +0 -4
  287. data/app/components/avo/index/fields/date_time_field_component.rb +0 -4
  288. data/app/components/avo/index/fields/external_image_field_component.rb +0 -4
  289. data/app/components/avo/index/fields/field_component.html.erb +0 -1
  290. data/app/components/avo/index/fields/field_component.rb +0 -11
  291. data/app/components/avo/index/fields/file_field_component.rb +0 -4
  292. data/app/components/avo/index/fields/files_field_component.rb +0 -4
  293. data/app/components/avo/index/fields/gravatar_field_component.rb +0 -4
  294. data/app/components/avo/index/fields/has_one_field_component.rb +0 -4
  295. data/app/components/avo/index/fields/id_field_component.html.erb +0 -10
  296. data/app/components/avo/index/fields/id_field_component.rb +0 -4
  297. data/app/components/avo/index/fields/number_field_component.rb +0 -4
  298. data/app/components/avo/index/fields/select_field_component.rb +0 -4
  299. data/app/components/avo/index/fields/status_field_component.html.erb +0 -3
  300. data/app/components/avo/index/fields/status_field_component.rb +0 -4
  301. data/app/components/avo/index/fields/text_field_component.html.erb +0 -3
  302. data/app/components/avo/index/fields/text_field_component.rb +0 -4
  303. data/app/components/avo/show/fields/badge_field_component.html.erb +0 -3
  304. data/app/components/avo/show/fields/badge_field_component.rb +0 -4
  305. data/app/components/avo/show/fields/belongs_to_field_component.rb +0 -4
  306. data/app/components/avo/show/fields/boolean_field_component.rb +0 -4
  307. data/app/components/avo/show/fields/boolean_group_field_component.html.erb +0 -3
  308. data/app/components/avo/show/fields/boolean_group_field_component.rb +0 -4
  309. data/app/components/avo/show/fields/code_field_component.rb +0 -4
  310. data/app/components/avo/show/fields/country_field_component.rb +0 -4
  311. data/app/components/avo/show/fields/date_field_component.rb +0 -4
  312. data/app/components/avo/show/fields/date_time_field_component.rb +0 -4
  313. data/app/components/avo/show/fields/external_image_field_component.rb +0 -4
  314. data/app/components/avo/show/fields/file_field_component.html.erb +0 -3
  315. data/app/components/avo/show/fields/file_field_component.rb +0 -4
  316. data/app/components/avo/show/fields/files_field_component.html.erb +0 -3
  317. data/app/components/avo/show/fields/files_field_component.rb +0 -4
  318. data/app/components/avo/show/fields/gravatar_field_component.rb +0 -4
  319. data/app/components/avo/show/fields/has_many_field_component.rb +0 -4
  320. data/app/components/avo/show/fields/has_one_field_component.rb +0 -5
  321. data/app/components/avo/show/fields/heading_field_component.rb +0 -4
  322. data/app/components/avo/show/fields/id_field_component.rb +0 -4
  323. data/app/components/avo/show/fields/key_value_field_component.rb +0 -4
  324. data/app/components/avo/show/fields/markdown_field_component.rb +0 -4
  325. data/app/components/avo/show/fields/number_field_component.rb +0 -4
  326. data/app/components/avo/show/fields/select_field_component.rb +0 -4
  327. data/app/components/avo/show/fields/status_field_component.html.erb +0 -3
  328. data/app/components/avo/show/fields/status_field_component.rb +0 -4
  329. data/app/components/avo/show/fields/text_field_component.rb +0 -4
  330. data/app/components/avo/show/fields/textarea_field_component.rb +0 -4
  331. data/app/components/avo/show/fields/trix_field_component.rb +0 -4
  332. data/public/avo-packs/css/application-0b91a712.css.br +0 -0
  333. data/public/avo-packs/css/application-0b91a712.css.gz +0 -0
  334. data/public/avo-packs/css/application-0b91a712.css.map +0 -1
  335. data/public/avo-packs/css/application-0b91a712.css.map.br +0 -0
  336. data/public/avo-packs/css/application-0b91a712.css.map.gz +0 -0
  337. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js +0 -26
  338. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js.br +0 -0
  339. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js.gz +0 -0
  340. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js.map +0 -1
  341. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js.map.br +0 -0
  342. data/public/avo-packs/js/application-c2a8a64ca8f5d2805d79.js.map.gz +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f31ebc9caf8e281af2cb0e8ce4d0423ab4852f3475843af1d632e795930f5df0
4
- data.tar.gz: 8117f6fca30c9f9f90ff61f5c7bdeb2908cb13fd731e3168c6678b5c4427f0a9
3
+ metadata.gz: 380b07580be342a7704954836661ffcb47871124092b8c890b4e0f1eb21e49b5
4
+ data.tar.gz: fe64597fe439ae1da3758b787256ccc6087415bac4fe52eaca577cab30c190a8
5
5
  SHA512:
6
- metadata.gz: 4d1deeabbc3538d4094312e9c08b384355882e55d1124976981e4e8f5356ed8d032f6a595261065a9fc567ca7529e639926f627e72231baf409709b2d19626d0
7
- data.tar.gz: 036e731952aaf067ba2397fefa5d79a714332f39e7779a6586bee49e247c17ceb80f4e4226f4fa4cbb73be45c8d4573b09e5d4d7df29e921df1a767b980aca1e
6
+ metadata.gz: ae8b98a0aaee29e0bc1fc332a2fae3cdf93ce3637ccff1d0c2625def3fac70ec2ee0f469b4096eaf99396f06b3133fe1e5ebf7163c2b8b80f26120e7f62e2478
7
+ data.tar.gz: a98acda283b80b19e3b119b11f90fccba3f6659e0c0f79bda31462c574dbb73fe9e96cd3078555523593c92f4383b206de996890c1a044d52edace7e6e09c6ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (1.3.5)
4
+ avo (1.4.3)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -87,7 +87,7 @@ GEM
87
87
  ast (2.4.2)
88
88
  bcrypt (3.1.16)
89
89
  bindex (0.8.1)
90
- bootsnap (1.4.8)
90
+ bootsnap (1.7.3)
91
91
  msgpack (~> 1.0)
92
92
  breadcrumbs_on_rails (4.0.0)
93
93
  rails (>= 5.0)
@@ -178,7 +178,7 @@ GEM
178
178
  mini_mime (1.1.0)
179
179
  mini_portile2 (2.5.0)
180
180
  minitest (5.14.4)
181
- msgpack (1.3.3)
181
+ msgpack (1.4.2)
182
182
  multi_xml (0.6.0)
183
183
  nio4r (2.5.7)
184
184
  nokogiri (1.11.3)
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Gem Version](https://badge.fury.io/rb/avo.svg)](https://badge.fury.io/rb/avo)
1
2
  ![Tests](https://github.com/avo-hq/avo/workflows/Tests/badge.svg)
2
3
  ![reviewdog](https://github.com/avo-hq/avo/workflows/reviewdog/badge.svg)
3
4
  [![codecov](https://codecov.io/gh/avo-hq/avo/branch/master/graph/badge.svg?token=Q2LMFE4989)](https://codecov.io/gh/avo-hq/avo)
@@ -0,0 +1,3 @@
1
+ <%= index_field_wrapper field: @field do %>
2
+ <%= render Avo::Fields::Common::BadgeViewerComponent.new value: @field.value, options: @field.options %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BadgeField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,3 @@
1
+ <%= show_field_wrapper field: @field, index: @index do %>
2
+ <%= render Avo::Fields::Common::BadgeViewerComponent.new value: @field.value, options: @field.options %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BadgeField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Edit::Fields::BelongsToFieldComponent < Avo::Edit::Fields::FieldComponent
3
+ class Avo::Fields::BelongsToField::EditComponent < Avo::Fields::EditComponent
4
4
  def disabled
5
5
  return true if @field.readonly
6
6
  return true if @field.target_resource.model_class.name == params[:via_resource_class]
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BelongsToField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BelongsToField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,3 @@
1
+ <%= index_field_wrapper field: @field, dash_if_blank: false do %>
2
+ <%= render Avo::Fields::Common::BooleanCheckComponent.new checked: @field.value %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -1,3 +1,3 @@
1
1
  <%= show_field_wrapper field: @field, index: @index, dash_if_blank: false do %>
2
- <%= render Avo::Common::BooleanCheckComponent.new checked: @field.value %>
2
+ <%= render Avo::Fields::Common::BooleanCheckComponent.new checked: @field.value %>
3
3
  <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanGroupField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,3 @@
1
+ <%= index_field_wrapper field: @field, dash_if_blank: false do %>
2
+ <%= render Avo::Fields::Common::BooleanGroupComponent.new options: @field.options, value: @field.value %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanGroupField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,3 @@
1
+ <%= show_field_wrapper field: @field, index: @index, dash_if_blank: false do %>
2
+ <%= render Avo::Fields::Common::BooleanGroupComponent.new options: @field.options, value: @field.value %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::BooleanGroupField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::CodeField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::CodeField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::BadgeViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::BadgeViewerComponent < ViewComponent::Base
4
4
  def initialize(value:, options:)
5
5
  @value = value
6
6
  @options = options
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::BooleanCheckComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::BooleanCheckComponent < ViewComponent::Base
4
4
  def initialize(checked: false)
5
5
  @checked = checked
6
6
  end
@@ -7,7 +7,7 @@
7
7
  checked = @value.present? && @value[id.to_s].present?
8
8
  %>
9
9
  <div>
10
- <%= render Avo::Common::BooleanCheckComponent.new checked: checked %>
10
+ <%= render Avo::Fields::Common::BooleanCheckComponent.new checked: checked %>
11
11
  <div class="ml-6 text-left py-px"><%= label %></div>
12
12
  </div>
13
13
  <% end %>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::BooleanGroupComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::BooleanGroupComponent < ViewComponent::Base
4
4
  def initialize(options: {}, value: nil)
5
5
  @options = options
6
6
  @value = value
@@ -0,0 +1,5 @@
1
+ <div class="relative p-3 bg-blue-gray-200 grid grid-cols-3 xl:grid-cols-4 gap-3 rounded-xl">
2
+ <% @field.value.attachments.each do |file| %>
3
+ <%= render Avo::Fields::Common::MultipleFileViewerComponent.new id: @field.id, file: file, is_image: @field.is_image, button_size: :xs, resource: @resource %>
4
+ <% end %>
5
+ </div>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::FilesListViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::FilesListViewerComponent < ViewComponent::Base
4
4
  def initialize(field:, resource:)
5
5
  @field = field
6
6
  @resource = resource
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::GravatarViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::GravatarViewerComponent < ViewComponent::Base
4
4
  def initialize(md5: nil, link: nil, default: nil, size: nil, rounded: false, link_to_resource: false, title: nil)
5
5
  @md5 = md5
6
6
  @link = link
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::HeadingComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::HeadingComponent < ViewComponent::Base
4
4
  def initialize(value:, as_html:)
5
5
  @value = value
6
6
  @as_html = as_html
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::KeyValueComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::KeyValueComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
6
  def initialize(field:, form: nil, view: :show)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::MultipleFileViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::MultipleFileViewerComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
6
  def initialize(id:, file:, is_image:, resource:, button_size: :md)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::SingleFileViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::SingleFileViewerComponent < ViewComponent::Base
4
4
  include Avo::ApplicationHelper
5
5
 
6
6
  def initialize(id:, file:, is_image:, resource:, button_size: :md)
@@ -0,0 +1,18 @@
1
+ <%
2
+ classes = "inline-block"
3
+ classes += " text-red-600" if @status == 'failed'
4
+ classes += " text-green-600" if @status == 'success'
5
+ %>
6
+ <div class="flex flex-shrink-0 <%= classes %> items-center">
7
+ <% if @status == 'success' %>
8
+ <%= helpers.svg 'check-circle-sm', class: 'h-4' %>
9
+ <% elsif @status == 'failed' %>
10
+ <%= helpers.svg 'x-circle-sm', class: 'h-4' %>
11
+ <% elsif @status == 'loading' %>
12
+ <div class="spinner">
13
+ <div class="double-bounce1 bg-gray-600"></div>
14
+ <div class="double-bounce2 bg-gray-800"></div>
15
+ </div>
16
+ <% end %>
17
+ <span class="ml-1"><%= @label %></span>
18
+ </div>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Common::StatusViewerComponent < ViewComponent::Base
3
+ class Avo::Fields::Common::StatusViewerComponent < ViewComponent::Base
4
4
  def initialize(status:, label:)
5
5
  @status = status
6
6
  @label = label
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::CountryField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::CountryField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::CountryField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateTimeField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateTimeField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::DateTimeField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Avo::Edit::Fields::FieldComponent < ViewComponent::Base
3
+ class Avo::Fields::EditComponent < ViewComponent::Base
4
4
  include Avo::ResourcesHelper
5
5
 
6
6
  def initialize(field: nil, resource: nil, index: 0, form: nil, displayed_in_modal: false)
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::ExternalImageField::EditComponent < Avo::Fields::EditComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::ExternalImageField::IndexComponent < Avo::Fields::IndexComponent
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Avo::Fields::ExternalImageField::ShowComponent < Avo::Fields::ShowComponent
4
+ end
@@ -1,7 +1,7 @@
1
1
  <%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
2
2
  <% if @field.value.present? %>
3
3
  <div class="mb-2">
4
- <%= render Avo::Common::SingleFileViewerComponent.new resource: @resource, id: @field.id, file: @field.value, is_image: @field.is_image, button_size: :md %>
4
+ <%= render Avo::Fields::Common::SingleFileViewerComponent.new resource: @resource, id: @field.id, file: @field.value, is_image: @field.is_image, button_size: :md %>
5
5
  </div>
6
6
  <% end %>
7
7