avo 2.10.0 → 2.11.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +64 -64
  3. data/app/components/avo/fields/country_field/edit_component.html.erb +9 -3
  4. data/app/components/avo/fields/date_field/edit_component.html.erb +26 -8
  5. data/app/components/avo/fields/date_field/index_component.html.erb +7 -1
  6. data/app/components/avo/fields/date_field/show_component.html.erb +7 -1
  7. data/app/components/avo/fields/date_time_field/edit_component.html.erb +26 -10
  8. data/app/components/avo/fields/date_time_field/index_component.html.erb +9 -1
  9. data/app/components/avo/fields/date_time_field/show_component.html.erb +9 -1
  10. data/app/components/avo/fields/file_field/edit_component.html.erb +1 -0
  11. data/app/components/avo/fields/files_field/edit_component.html.erb +1 -0
  12. data/app/components/avo/fields/select_field/edit_component.html.erb +14 -10
  13. data/app/components/avo/index/ordering/button_component.rb +1 -5
  14. data/app/components/avo/views/resource_index_component.html.erb +1 -1
  15. data/app/controllers/avo/application_controller.rb +20 -14
  16. data/app/controllers/avo/base_controller.rb +11 -3
  17. data/app/controllers/avo/reorder_controller.rb +25 -0
  18. data/app/helpers/avo/application_helper.rb +6 -0
  19. data/app/helpers/avo/url_helpers.rb +0 -4
  20. data/app/javascript/js/controllers/fields/date_field_controller.js +98 -24
  21. data/app/javascript/js/controllers/search_controller.js +3 -0
  22. data/app/views/avo/partials/_javascript.html.erb +1 -1
  23. data/config/routes.rb +5 -4
  24. data/db/factories.rb +1 -0
  25. data/lib/avo/app.rb +1 -3
  26. data/lib/avo/base_resource.rb +5 -3
  27. data/lib/avo/concerns/handles_field_args.rb +1 -1
  28. data/lib/avo/concerns/has_fields.rb +2 -0
  29. data/lib/avo/configuration.rb +2 -12
  30. data/lib/avo/fields/base_field.rb +2 -0
  31. data/lib/avo/fields/country_field.rb +2 -0
  32. data/lib/avo/fields/date_field.rb +12 -10
  33. data/lib/avo/fields/date_time_field.rb +21 -9
  34. data/lib/avo/fields/field_extensions/has_include_blank.rb +17 -0
  35. data/lib/avo/fields/file_field.rb +2 -0
  36. data/lib/avo/fields/files_field.rb +2 -0
  37. data/lib/avo/fields/key_value_field.rb +4 -4
  38. data/lib/avo/fields/select_field.rb +2 -0
  39. data/lib/avo/licensing/h_q.rb +2 -0
  40. data/lib/avo/services/uri_service.rb +4 -0
  41. data/lib/avo/version.rb +1 -1
  42. data/lib/generators/avo/action_generator.rb +3 -2
  43. data/lib/generators/avo/base_generator.rb +14 -0
  44. data/lib/generators/avo/card/chartkick_generator.rb +18 -0
  45. data/lib/generators/avo/card/metric_generator.rb +18 -0
  46. data/lib/generators/avo/card/partial_generator.rb +19 -0
  47. data/lib/generators/avo/controller_generator.rb +9 -3
  48. data/lib/generators/avo/dashboard_generator.rb +2 -2
  49. data/lib/generators/avo/eject_generator.rb +2 -3
  50. data/lib/generators/avo/field_generator.rb +2 -2
  51. data/lib/generators/avo/filter_generator.rb +3 -2
  52. data/lib/generators/avo/install_generator.rb +2 -2
  53. data/lib/generators/avo/locales_generator.rb +2 -2
  54. data/lib/generators/avo/named_base_generator.rb +14 -0
  55. data/lib/generators/avo/resource_generator.rb +2 -2
  56. data/lib/generators/avo/resource_tool_generator.rb +4 -4
  57. data/lib/generators/avo/tool_generator.rb +4 -4
  58. data/lib/generators/avo/version_generator.rb +23 -0
  59. data/public/avo-assets/avo.css +4 -0
  60. data/public/avo-assets/avo.js +69 -69
  61. data/public/avo-assets/avo.js.map +2 -2
  62. metadata +10 -9
  63. data/db/migrate/20210421064037_add_color_to_teams.rb +0 -5
  64. data/db/migrate/20210423075924_add_progress_to_projects.rb +0 -5
  65. data/db/migrate/20210525143134_add_slug_to_users.rb +0 -6
  66. data/lib/avo/fields/currency_field.rb +0 -15
  67. data/lib/generators/avo/chartkick_card_generator.rb +0 -16
  68. data/lib/generators/avo/metric_card_generator.rb +0 -16
  69. data/lib/generators/avo/partial_card_generator.rb +0 -17
@@ -1,8 +1,8 @@
1
- require "rails/generators"
1
+ require_relative "named_base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class DashboardGenerator < ::Rails::Generators::NamedBase
5
+ class DashboardGenerator < NamedBaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
7
 
8
8
  namespace "avo:dashboard"
@@ -1,9 +1,8 @@
1
- require "rails/generators"
2
- require "fileutils"
1
+ require_relative "base_generator"
3
2
 
4
3
  module Generators
5
4
  module Avo
6
- class EjectGenerator < ::Rails::Generators::Base
5
+ class EjectGenerator < BaseGenerator
7
6
  argument :filename, type: :string, required: true
8
7
 
9
8
  source_root ::Avo::Engine.root
@@ -1,8 +1,8 @@
1
- require "rails/generators"
1
+ require_relative "named_base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class FieldGenerator < ::Rails::Generators::NamedBase
5
+ class FieldGenerator < NamedBaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
7
 
8
8
  namespace "avo:field"
@@ -1,9 +1,10 @@
1
- require "rails/generators"
1
+ require_relative "named_base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class FilterGenerator < ::Rails::Generators::NamedBase
5
+ class FilterGenerator < NamedBaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
+
7
8
  class_option :multiple_select, type: :boolean
8
9
  class_option :select, type: :boolean
9
10
  class_option :text, type: :boolean
@@ -1,8 +1,8 @@
1
- require "rails/generators"
1
+ require_relative "base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class InstallGenerator < Rails::Generators::Base
5
+ class InstallGenerator < BaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
7
 
8
8
  namespace "avo:install"
@@ -1,8 +1,8 @@
1
- require "rails/generators"
1
+ require_relative "base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class LocalesGenerator < ::Rails::Generators::Base
5
+ class LocalesGenerator < BaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
7
 
8
8
  namespace "avo:locales"
@@ -0,0 +1,14 @@
1
+ require "rails/generators"
2
+
3
+ module Generators
4
+ module Avo
5
+ class NamedBaseGenerator < ::Rails::Generators::NamedBase
6
+ hide!
7
+
8
+ def initialize(name, *options)
9
+ super(name, *options)
10
+ invoke "avo:version", name, *options
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,8 +1,8 @@
1
- require "rails/generators"
1
+ require_relative "named_base_generator"
2
2
 
3
3
  module Generators
4
4
  module Avo
5
- class ResourceGenerator < ::Rails::Generators::NamedBase
5
+ class ResourceGenerator < NamedBaseGenerator
6
6
  source_root File.expand_path("templates", __dir__)
7
7
 
8
8
  namespace "avo:resource"
@@ -1,13 +1,13 @@
1
- require "rails/generators"
2
1
  require "fileutils"
2
+ require_relative "named_base_generator"
3
3
 
4
4
  module Generators
5
5
  module Avo
6
- class ResourceToolGenerator < ::Rails::Generators::NamedBase
7
- argument :name, type: :string, required: true
8
-
6
+ class ResourceToolGenerator < NamedBaseGenerator
9
7
  source_root File.expand_path("templates", __dir__)
10
8
 
9
+ argument :name, type: :string, required: true
10
+
11
11
  namespace "avo:resource_tool"
12
12
 
13
13
  def handle
@@ -1,13 +1,13 @@
1
- require "rails/generators"
2
1
  require "fileutils"
2
+ require_relative "base_generator"
3
3
 
4
4
  module Generators
5
5
  module Avo
6
- class ToolGenerator < ::Rails::Generators::Base
7
- argument :name, type: :string, required: true
8
-
6
+ class ToolGenerator < BaseGenerator
9
7
  source_root File.expand_path("templates", __dir__)
10
8
 
9
+ argument :name, type: :string, required: true
10
+
11
11
  namespace "avo:tool"
12
12
 
13
13
  def handle
@@ -0,0 +1,23 @@
1
+ require "rails/generators"
2
+
3
+ module Generators
4
+ module Avo
5
+ class VersionGenerator < ::Rails::Generators::Base
6
+ namespace "avo:version"
7
+
8
+ def handle
9
+ if defined? ::Avo::Engine
10
+ output "Avo #{::Avo.configuration.license} #{::Avo::VERSION}"
11
+ else
12
+ output "Avo not installed."
13
+ end
14
+ end
15
+
16
+ private
17
+
18
+ def output(message)
19
+ puts message unless options["quiet"]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -7017,6 +7017,10 @@ trix-editor .attachment__metadata .attachment__size {
7017
7017
  border-radius:9999px
7018
7018
  }
7019
7019
 
7020
+ .rounded-none{
7021
+ border-radius:0px
7022
+ }
7023
+
7020
7024
  .\!rounded-none{
7021
7025
  border-radius:0px !important
7022
7026
  }