avo 2.5.2.pre.7 → 2.6.1.pre.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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +5 -1
  4. data/app/assets/builds/action_cable.js +2 -0
  5. data/app/assets/builds/action_cable.js.map +7 -0
  6. data/app/assets/builds/avo.css +175 -122
  7. data/app/assets/builds/avo.js +63 -63
  8. data/app/assets/builds/avo.js.map +3 -3
  9. data/app/assets/stylesheets/avo.css +33 -1
  10. data/app/assets/stylesheets/css/search.css +1 -1
  11. data/app/assets/svgs/heroicons/solid/user-remove.svg +1 -1
  12. data/app/components/avo/actions_component.html.erb +3 -2
  13. data/app/components/avo/alert_component.html.erb +1 -1
  14. data/app/components/avo/alert_component.rb +24 -5
  15. data/app/components/avo/button_component.rb +50 -17
  16. data/app/components/avo/card_component.rb +12 -0
  17. data/app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb +3 -0
  18. data/app/components/avo/fields/concerns/item_labels.rb +40 -0
  19. data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
  20. data/app/components/avo/fields/tags_field/index_component.html.erb +1 -5
  21. data/app/components/avo/fields/tags_field/index_component.rb +2 -0
  22. data/app/components/avo/fields/tags_field/show_component.rb +3 -7
  23. data/app/components/avo/fields/tags_field/tag_component.html.erb +1 -1
  24. data/app/components/avo/filters_component.html.erb +1 -1
  25. data/app/components/avo/index/field_wrapper_component.html.erb +1 -1
  26. data/app/components/avo/index/grid_cover_empty_state_component.html.erb +1 -1
  27. data/app/components/avo/index/table_row_component.html.erb +1 -1
  28. data/app/components/avo/paginator_component.html.erb +2 -2
  29. data/app/components/avo/panel_component.html.erb +3 -3
  30. data/app/components/avo/panel_component.rb +1 -1
  31. data/app/components/avo/resource_component.rb +50 -0
  32. data/app/components/avo/sidebar/group_component.html.erb +4 -2
  33. data/app/components/avo/sidebar/heading_component.html.erb +1 -1
  34. data/app/components/avo/sidebar/link_component.html.erb +1 -1
  35. data/app/components/avo/sidebar/link_component.rb +1 -1
  36. data/app/components/avo/sidebar_component.html.erb +5 -13
  37. data/app/components/avo/sidebar_profile_component.html.erb +1 -1
  38. data/app/components/avo/views/resource_edit_component.html.erb +28 -3
  39. data/app/components/avo/views/resource_edit_component.rb +4 -6
  40. data/app/components/avo/views/resource_index_component.html.erb +17 -9
  41. data/app/components/avo/views/resource_new_component.html.erb +8 -2
  42. data/app/components/avo/views/resource_show_component.html.erb +16 -6
  43. data/app/components/avo/views/resource_show_component.rb +0 -45
  44. data/app/controllers/avo/actions_controller.rb +23 -8
  45. data/app/controllers/avo/associations_controller.rb +3 -3
  46. data/app/controllers/avo/base_controller.rb +11 -21
  47. data/app/controllers/avo/private_controller.rb +1 -0
  48. data/app/controllers/avo/search_controller.rb +33 -13
  49. data/app/helpers/avo/application_helper.rb +1 -1
  50. data/app/javascript/js/controllers/fields/key_value_controller.js +1 -1
  51. data/app/javascript/js/controllers/fields/tags_field_controller.js +3 -3
  52. data/app/javascript/js/controllers/filter_controller.js +4 -1
  53. data/app/javascript/js/controllers/search_controller.js +9 -1
  54. data/app/javascript/js/controllers.js +0 -2
  55. data/app/views/avo/actions/show.html.erb +5 -2
  56. data/app/views/avo/dashboards/_chartkick_card.html.erb +1 -1
  57. data/app/views/avo/dashboards/_metric_card.html.erb +1 -1
  58. data/app/views/avo/partials/_global_search.html.erb +1 -1
  59. data/app/views/avo/partials/_logo.html.erb +1 -1
  60. data/app/views/avo/partials/_navbar.html.erb +9 -6
  61. data/app/views/avo/partials/_resource_search.html.erb +1 -1
  62. data/app/views/avo/partials/_table_header.html.erb +3 -2
  63. data/app/views/avo/private/_links_and_buttons.html.erb +2 -2
  64. data/app/views/layouts/avo/application.html.erb +50 -53
  65. data/lib/avo/base_action.rb +24 -6
  66. data/lib/avo/engine.rb +1 -1
  67. data/lib/avo/fields/belongs_to_field.rb +4 -4
  68. data/lib/avo/fields/has_and_belongs_to_many_field.rb +2 -2
  69. data/lib/avo/fields/has_base_field.rb +2 -0
  70. data/lib/avo/fields/has_many_field.rb +2 -2
  71. data/lib/avo/fields/has_one_field.rb +2 -2
  72. data/lib/avo/fields/tags_field.rb +5 -5
  73. data/lib/avo/hosts/base_host.rb +2 -0
  74. data/lib/avo/version.rb +1 -1
  75. data/lib/generators/avo/templates/cards/chartkick_card.tt +1 -1
  76. data/lib/generators/avo/templates/cards/chartkick_card_sample.tt +1 -1
  77. data/lib/generators/avo/templates/cards/metric_card.tt +1 -1
  78. data/lib/generators/avo/templates/cards/metric_card_sample.tt +1 -1
  79. data/lib/tasks/avo_tasks.rake +7 -3
  80. data/public/avo-assets/avo.css +225 -172
  81. data/public/avo-assets/avo.js +63 -63
  82. data/public/avo-assets/avo.js.map +3 -3
  83. metadata +5 -4
  84. data/app/assets/stylesheets/css/alerts.css +0 -35
  85. data/app/javascript/js/controllers/alerts_controller.js +0 -26
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.5.2.pre.7
4
+ version: 2.6.1.pre.2
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-05-07 00:00:00.000000000 Z
12
+ date: 2022-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -248,13 +248,14 @@ files:
248
248
  - Gemfile.lock
249
249
  - README.md
250
250
  - Rakefile
251
+ - app/assets/builds/action_cable.js
252
+ - app/assets/builds/action_cable.js.map
251
253
  - app/assets/builds/avo.css
252
254
  - app/assets/builds/avo.js
253
255
  - app/assets/builds/avo.js.map
254
256
  - app/assets/config/avo_manifest.js
255
257
  - app/assets/stylesheets/avo.css
256
258
  - app/assets/stylesheets/css/active-storage.css
257
- - app/assets/stylesheets/css/alerts.css
258
259
  - app/assets/stylesheets/css/breadcrumbs.css
259
260
  - app/assets/stylesheets/css/buttons.css
260
261
  - app/assets/stylesheets/css/components/code.css
@@ -859,6 +860,7 @@ files:
859
860
  - app/components/avo/fields/common/single_file_viewer_component.rb
860
861
  - app/components/avo/fields/common/status_viewer_component.html.erb
861
862
  - app/components/avo/fields/common/status_viewer_component.rb
863
+ - app/components/avo/fields/concerns/item_labels.rb
862
864
  - app/components/avo/fields/country_field/edit_component.html.erb
863
865
  - app/components/avo/fields/country_field/edit_component.rb
864
866
  - app/components/avo/fields/country_field/index_component.html.erb
@@ -1061,7 +1063,6 @@ files:
1061
1063
  - app/javascript/js/controllers.js
1062
1064
  - app/javascript/js/controllers/action_controller.js
1063
1065
  - app/javascript/js/controllers/actions_picker_controller.js
1064
- - app/javascript/js/controllers/alerts_controller.js
1065
1066
  - app/javascript/js/controllers/attachments_controller.js
1066
1067
  - app/javascript/js/controllers/base_controller.js
1067
1068
  - app/javascript/js/controllers/boolean_filter_controller.js
@@ -1,35 +0,0 @@
1
- #toast-container > div {
2
- box-shadow: none;
3
- background-size: 1.5rem;
4
- background-position: 0.8rem 0.8rem;
5
- width: 500px;
6
-
7
- @apply shadow-md opacity-100 border border-gray-200 rounded-md pt-3 pr-3 pb-3 bg-white;
8
-
9
- &:hover {
10
- @apply shadow-xl;
11
- }
12
-
13
- .toast-title {
14
- @apply text-gray-800;
15
- }
16
- .toast-message {
17
- @apply text-gray-800;
18
- }
19
-
20
- &.toast-success {
21
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0iIzM4YTE2OSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi4yNjcgMy40NTVhMy4wNjYgMy4wNjYgMCAwMDEuNzQ1LS43MjMgMy4wNjYgMy4wNjYgMCAwMTMuOTc2IDAgMy4wNjYgMy4w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uOTJ6TTExIDEzYTEgMSAwIDExLTIgMCAxIDEgMCAwMTIgMHptLTEtOGExIDEgMCAwMC0xIDF2M2ExIDEgMCAwMDIgMFY2YTEgMSAwIDAwLTEtMXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIgLz4KPC9zdmc+Cg==) !important;
26
- }
27
-
28
- &.toast-info {
29
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0icmdiYSgzNywgOTksIDIzNSwgMSkiPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTE4IDEwYTggOCAwIDExLTE2IDAgOCA4IDAgMDExNiAwem0tNy00YTEgMSAwIDExLTIgMCAxIDEgMCAwMTIgMHpNOSA5YTEgMSAwIDAwMCAydjNhMSAxIDAgMDAxIDFoMWExIDEgMCAxMDAtMnYtM2ExIDEgMCAwMC0xLTFIOXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIgLz4KPC9zdmc+Cg==) !important;
30
- }
31
-
32
- &.toast-error {
33
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0icmdiYSgyMjAsIDM4LCAzOCwgMSkiPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTE4IDEwYTggOCAwIDExLTE2IDAgOCA4IDAgMDExNiAwem0tNyA0YTEgMSAwIDExLTIgMCAxIDEgMCAwMTIgMHptLTEtOWExIDEgMCAwMC0xIDF2NGExIDEgMCAxMDIgMFY2YTEgMSAwIDAwLTEtMXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIgLz4KPC9zdmc+Cg==) !important;
34
- }
35
- }
@@ -1,26 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus'
2
-
3
- export default class extends Controller {
4
- static targets = ['container']
5
-
6
- connect() {
7
- window.toastr[this.type](this.message)
8
- }
9
-
10
- get type() {
11
- const typeMap = {
12
- info: 'info',
13
- warning: 'warning',
14
- success: 'success',
15
- error: 'error',
16
- notice: 'info',
17
- alert: 'error',
18
- }
19
-
20
- return typeMap[this.containerTarget.dataset.alertType]
21
- }
22
-
23
- get message() {
24
- return this.containerTarget.innerHTML
25
- }
26
- }