avo 2.10.2 → 2.11.1.pre.1

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +64 -62
  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 +10 -1
  9. data/app/components/avo/fields/date_time_field/show_component.html.erb +10 -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 +15 -9
  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 +108 -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_action.rb +8 -6
  27. data/lib/avo/base_resource.rb +7 -8
  28. data/lib/avo/concerns/handles_field_args.rb +1 -1
  29. data/lib/avo/concerns/has_fields.rb +2 -0
  30. data/lib/avo/configuration.rb +2 -12
  31. data/lib/avo/fields/base_field.rb +2 -0
  32. data/lib/avo/fields/country_field.rb +2 -0
  33. data/lib/avo/fields/date_field.rb +12 -10
  34. data/lib/avo/fields/date_time_field.rb +21 -9
  35. data/lib/avo/fields/field_extensions/has_include_blank.rb +17 -0
  36. data/lib/avo/fields/file_field.rb +2 -0
  37. data/lib/avo/fields/files_field.rb +2 -0
  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 +12 -12
  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/avo/has_context.rb +0 -7
  68. data/lib/generators/avo/chartkick_card_generator.rb +0 -16
  69. data/lib/generators/avo/metric_card_generator.rb +0 -16
  70. data/lib/generators/avo/partial_card_generator.rb +0 -17
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.10.2
4
+ version: 2.11.1.pre.1
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-07-10 00:00:00.000000000 Z
12
+ date: 2022-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -1051,6 +1051,7 @@ files:
1051
1051
  - app/controllers/avo/debug_controller.rb
1052
1052
  - app/controllers/avo/home_controller.rb
1053
1053
  - app/controllers/avo/private_controller.rb
1054
+ - app/controllers/avo/reorder_controller.rb
1054
1055
  - app/controllers/avo/resources_controller.rb
1055
1056
  - app/controllers/avo/search_controller.rb
1056
1057
  - app/helpers/avo/actions_helper.rb
@@ -1162,9 +1163,6 @@ files:
1162
1163
  - config/routes.rb
1163
1164
  - config/spring.rb
1164
1165
  - db/factories.rb
1165
- - db/migrate/20210421064037_add_color_to_teams.rb
1166
- - db/migrate/20210423075924_add_progress_to_projects.rb
1167
- - db/migrate/20210525143134_add_slug_to_users.rb
1168
1166
  - lib/avo.rb
1169
1167
  - lib/avo/action_model.rb
1170
1168
  - lib/avo/app.rb
@@ -1198,11 +1196,11 @@ files:
1198
1196
  - lib/avo/fields/code_field.rb
1199
1197
  - lib/avo/fields/concerns/is_required.rb
1200
1198
  - lib/avo/fields/country_field.rb
1201
- - lib/avo/fields/currency_field.rb
1202
1199
  - lib/avo/fields/date_field.rb
1203
1200
  - lib/avo/fields/date_time_field.rb
1204
1201
  - lib/avo/fields/external_image_field.rb
1205
1202
  - lib/avo/fields/field_extensions/has_field_name.rb
1203
+ - lib/avo/fields/field_extensions/has_include_blank.rb
1206
1204
  - lib/avo/fields/field_extensions/visible_in_different_views.rb
1207
1205
  - lib/avo/fields/file_field.rb
1208
1206
  - lib/avo/fields/files_field.rb
@@ -1235,7 +1233,6 @@ files:
1235
1233
  - lib/avo/grid_fields/grid_field.rb
1236
1234
  - lib/avo/grid_fields/preview_field.rb
1237
1235
  - lib/avo/grid_fields/title_field.rb
1238
- - lib/avo/has_context.rb
1239
1236
  - lib/avo/hosts/association_scope_host.rb
1240
1237
  - lib/avo/hosts/base_host.rb
1241
1238
  - lib/avo/hosts/dashboard_card.rb
@@ -1276,7 +1273,10 @@ files:
1276
1273
  - lib/avo/tools_manager.rb
1277
1274
  - lib/avo/version.rb
1278
1275
  - lib/generators/avo/action_generator.rb
1279
- - lib/generators/avo/chartkick_card_generator.rb
1276
+ - lib/generators/avo/base_generator.rb
1277
+ - lib/generators/avo/card/chartkick_generator.rb
1278
+ - lib/generators/avo/card/metric_generator.rb
1279
+ - lib/generators/avo/card/partial_generator.rb
1280
1280
  - lib/generators/avo/controller_generator.rb
1281
1281
  - lib/generators/avo/dashboard_generator.rb
1282
1282
  - lib/generators/avo/eject_generator.rb
@@ -1284,8 +1284,7 @@ files:
1284
1284
  - lib/generators/avo/filter_generator.rb
1285
1285
  - lib/generators/avo/install_generator.rb
1286
1286
  - lib/generators/avo/locales_generator.rb
1287
- - lib/generators/avo/metric_card_generator.rb
1288
- - lib/generators/avo/partial_card_generator.rb
1287
+ - lib/generators/avo/named_base_generator.rb
1289
1288
  - lib/generators/avo/resource_generator.rb
1290
1289
  - lib/generators/avo/resource_tool_generator.rb
1291
1290
  - lib/generators/avo/templates/action.tt
@@ -1323,6 +1322,7 @@ files:
1323
1322
  - lib/generators/avo/templates/tool/sidebar_item.tt
1324
1323
  - lib/generators/avo/templates/tool/view.tt
1325
1324
  - lib/generators/avo/tool_generator.rb
1325
+ - lib/generators/avo/version_generator.rb
1326
1326
  - lib/tasks/avo_tasks.rake
1327
1327
  - public/avo-assets/avo.css
1328
1328
  - public/avo-assets/avo.js
@@ -1370,9 +1370,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1370
1370
  version: 2.4.0
1371
1371
  required_rubygems_version: !ruby/object:Gem::Requirement
1372
1372
  requirements:
1373
- - - ">="
1373
+ - - ">"
1374
1374
  - !ruby/object:Gem::Version
1375
- version: '0'
1375
+ version: 1.3.1
1376
1376
  requirements: []
1377
1377
  rubygems_version: 3.3.3
1378
1378
  signing_key:
@@ -1,5 +0,0 @@
1
- class AddColorToTeams < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :teams, :color, :string
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddProgressToProjects < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :projects, :progress, :integer
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddSlugToUsers < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :users, :slug, :string
4
- add_index :users, :slug, unique: true
5
- end
6
- end
@@ -1,15 +0,0 @@
1
- module Avo
2
- module Fields
3
- class CurrencyField < BaseField
4
- attr_reader :currency
5
- attr_reader :locale
6
-
7
- def initialize(id, **args, &block)
8
- super(id, **args, &block)
9
-
10
- @currency = args[:currency].present? ? args[:currency].to_s : Avo.configuration.currency
11
- @locale = args[:locale].present? ? args[:locale].to_s : Avo.configuration.locale
12
- end
13
- end
14
- end
15
- end
@@ -1,7 +0,0 @@
1
- module Avo
2
- module HasContext
3
- def context
4
- App.context
5
- end
6
- end
7
- end
@@ -1,16 +0,0 @@
1
- require "rails/generators"
2
-
3
- module Generators
4
- module Avo
5
- class ChartkickCardGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("templates", __dir__)
7
-
8
- namespace "avo:card:chartkick"
9
- desc "Add a chartkick card for your Avo dashboard."
10
-
11
- def handle
12
- template "cards/chartkick_card_sample.tt", "app/avo/cards/#{name.underscore}.rb"
13
- end
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- require "rails/generators"
2
-
3
- module Generators
4
- module Avo
5
- class MetricCardGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("templates", __dir__)
7
-
8
- namespace "avo:card:metric"
9
- desc "Add a metric card for your Avo dashboard."
10
-
11
- def handle
12
- template "cards/metric_card_sample.tt", "app/avo/cards/#{name.underscore}.rb"
13
- end
14
- end
15
- end
16
- end
@@ -1,17 +0,0 @@
1
- require "rails/generators"
2
-
3
- module Generators
4
- module Avo
5
- class PartialCardGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("templates", __dir__)
7
-
8
- namespace "avo:card:partial"
9
- desc "Add a partial card for your Avo dashboard."
10
-
11
- def handle
12
- template "cards/partial_card_sample.tt", "app/avo/cards/#{name.underscore}.rb"
13
- template "cards/partial_card_partial.tt", "app/views/avo/cards/_#{name.underscore}.html.erb"
14
- end
15
- end
16
- end
17
- end