avo 2.18.1 → 2.20.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.
- checksums.yaml +4 -4
- data/Gemfile +4 -6
- data/Gemfile.lock +76 -77
- data/app/components/avo/actions_component.html.erb +1 -1
- data/app/components/avo/actions_component.rb +4 -4
- data/app/components/avo/base_component.rb +17 -0
- data/app/components/avo/card_component.html.erb +15 -15
- data/app/components/avo/card_component.rb +7 -5
- data/app/components/avo/field_wrapper_component.rb +7 -1
- data/app/components/avo/fields/has_one_field/show_component.rb +1 -2
- data/app/components/avo/fields/index_component.rb +4 -3
- data/app/components/avo/fields/select_field/edit_component.html.erb +1 -1
- data/app/components/avo/filters_component.html.erb +1 -1
- data/app/components/avo/filters_component.rb +2 -2
- data/app/components/avo/index/grid_item_component.rb +2 -2
- data/app/components/avo/index/resource_controls_component.rb +2 -2
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/item_switcher_component.html.erb +1 -1
- data/app/components/avo/panel_component.html.erb +1 -1
- data/app/components/avo/resource_component.rb +1 -1
- data/app/components/avo/resource_sidebar_component.rb +1 -6
- data/app/components/avo/sidebar/group_component.html.erb +18 -12
- data/app/components/avo/sidebar/heading_component.html.erb +17 -10
- data/app/components/avo/sidebar_profile_component.rb +3 -1
- data/app/components/avo/tab_group_component.rb +1 -1
- data/app/components/avo/views/resource_show_component.html.erb +1 -1
- data/app/controllers/avo/actions_controller.rb +27 -5
- data/app/controllers/avo/application_controller.rb +7 -0
- data/app/controllers/avo/base_controller.rb +30 -18
- data/app/controllers/avo/dashboards/cards_controller.rb +37 -0
- data/app/controllers/avo/dashboards_controller.rb +1 -0
- data/app/helpers/avo/application_helper.rb +5 -1
- data/app/javascript/js/controllers/search_controller.js +11 -2
- data/app/views/avo/actions/keep_modal_open.turbo_stream.erb +5 -0
- data/app/views/avo/actions/show.html.erb +2 -1
- data/app/views/avo/{cards → dashboards/cards}/_chartkick_card.html.erb +0 -0
- data/app/views/avo/{cards → dashboards/cards}/_metric_card.html.erb +0 -0
- data/app/views/avo/{cards → dashboards/cards}/chartkick_missing.html.erb +0 -0
- data/app/views/avo/{cards → dashboards/cards}/show.html.erb +0 -0
- data/app/views/avo/partials/_branding.html.erb +1 -0
- data/app/views/layouts/avo/application.html.erb +1 -1
- data/avo.gemspec +1 -2
- data/bin/init +11 -1
- data/bin/test +1 -0
- data/config/routes.rb +2 -2
- data/db/factories.rb +10 -0
- data/lib/avo/app.rb +14 -1
- data/lib/avo/base_action.rb +35 -10
- data/lib/avo/base_card.rb +3 -1
- data/lib/avo/base_resource.rb +21 -10
- data/lib/avo/concerns/breadcrumbs.rb +96 -0
- data/lib/avo/concerns/filters_session_handler.rb +43 -0
- data/lib/avo/concerns/has_fields.rb +2 -0
- data/lib/avo/concerns/has_html_attributes.rb +14 -16
- data/lib/avo/concerns/visible_items.rb +44 -0
- data/lib/avo/configuration/branding.rb +10 -2
- data/lib/avo/configuration.rb +3 -0
- data/lib/avo/dashboards/base_dashboard.rb +7 -1
- data/lib/avo/dynamic_router.rb +16 -15
- data/lib/avo/engine.rb +6 -9
- data/lib/avo/fields/base_field.rb +21 -12
- data/lib/avo/fields/concerns/has_default.rb +17 -0
- data/lib/avo/fields/concerns/is_readonly.rb +1 -1
- data/lib/avo/fields/concerns/is_required.rb +2 -2
- data/lib/avo/fields/has_base_field.rb +2 -0
- data/lib/avo/fields/key_value_field.rb +1 -1
- data/lib/avo/fields/select_field.rb +39 -34
- data/lib/avo/filters/base_filter.rb +24 -2
- data/lib/avo/hosts/resource_view_record_host.rb +7 -0
- data/lib/avo/hosts/visibility_host.rb +13 -0
- data/lib/avo/panel.rb +4 -1
- data/lib/avo/resources/controls/action.rb +1 -3
- data/lib/avo/sidebar.rb +1 -31
- data/lib/avo/tab.rb +5 -22
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +9 -0
- data/lib/generators/avo/resource_generator.rb +281 -0
- data/lib/generators/avo/templates/action.tt +3 -0
- data/lib/generators/avo/templates/filters/boolean_filter.tt +3 -0
- data/lib/generators/avo/templates/filters/multiple_select_filter.tt +3 -0
- data/lib/generators/avo/templates/filters/select_filter.tt +3 -0
- data/lib/generators/avo/templates/filters/text_filter.tt +3 -0
- data/lib/generators/avo/templates/initializer/avo.tt +4 -0
- data/lib/generators/avo/templates/resource/controller.tt +1 -1
- data/lib/generators/avo/templates/resource/resource.tt +2 -2
- data/lib/generators/model_generator.rb +10 -0
- data/lib/generators/rails/avo_resource_generator.rb +11 -0
- data/public/avo-assets/avo.base.css +14 -14
- data/public/avo-assets/avo.base.js +1 -1
- data/public/avo-assets/avo.base.js.map +2 -2
- data/public/avo-assets/favicon.ico +0 -0
- data/{app/assets/svgs → public/avo-assets}/placeholder.svg +0 -0
- metadata +20 -25
- data/app/controllers/avo/cards_controller.rb +0 -35
- data/config/master.key +0 -1
Binary file
|
File without changes
|
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.
|
4
|
+
version: 2.20.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-11-
|
12
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 2.6.2
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 2.6.2
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: httparty
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,20 +151,6 @@ dependencies:
|
|
151
151
|
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
|
-
- !ruby/object:Gem::Dependency
|
155
|
-
name: breadcrumbs_on_rails
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
157
|
-
requirements:
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
161
|
-
type: :runtime
|
162
|
-
prerelease: false
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- - ">="
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: '0'
|
168
154
|
- !ruby/object:Gem::Dependency
|
169
155
|
name: dry-initializer
|
170
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1309,7 +1295,6 @@ files:
|
|
1309
1295
|
- app/assets/svgs/menu-back.svg
|
1310
1296
|
- app/assets/svgs/menu.svg
|
1311
1297
|
- app/assets/svgs/photograph.svg
|
1312
|
-
- app/assets/svgs/placeholder.svg
|
1313
1298
|
- app/assets/svgs/play.svg
|
1314
1299
|
- app/assets/svgs/plus-circle.svg
|
1315
1300
|
- app/assets/svgs/plus.svg
|
@@ -1596,7 +1581,7 @@ files:
|
|
1596
1581
|
- app/controllers/avo/associations_controller.rb
|
1597
1582
|
- app/controllers/avo/attachments_controller.rb
|
1598
1583
|
- app/controllers/avo/base_controller.rb
|
1599
|
-
- app/controllers/avo/cards_controller.rb
|
1584
|
+
- app/controllers/avo/dashboards/cards_controller.rb
|
1600
1585
|
- app/controllers/avo/dashboards_controller.rb
|
1601
1586
|
- app/controllers/avo/debug_controller.rb
|
1602
1587
|
- app/controllers/avo/home_controller.rb
|
@@ -1649,6 +1634,7 @@ files:
|
|
1649
1634
|
- app/javascript/js/controllers/toggle_panel_controller.js
|
1650
1635
|
- app/javascript/js/helpers/cast_boolean.js
|
1651
1636
|
- app/javascript/js/helpers/debounce_promise.js
|
1637
|
+
- app/views/avo/actions/keep_modal_open.turbo_stream.erb
|
1652
1638
|
- app/views/avo/actions/show.html.erb
|
1653
1639
|
- app/views/avo/associations/new.html.erb
|
1654
1640
|
- app/views/avo/base/_boolean_filter.html.erb
|
@@ -1659,10 +1645,10 @@ files:
|
|
1659
1645
|
- app/views/avo/base/index.html.erb
|
1660
1646
|
- app/views/avo/base/new.html.erb
|
1661
1647
|
- app/views/avo/base/show.html.erb
|
1662
|
-
- app/views/avo/cards/_chartkick_card.html.erb
|
1663
|
-
- app/views/avo/cards/_metric_card.html.erb
|
1664
|
-
- app/views/avo/cards/chartkick_missing.html.erb
|
1665
|
-
- app/views/avo/cards/show.html.erb
|
1648
|
+
- app/views/avo/dashboards/cards/_chartkick_card.html.erb
|
1649
|
+
- app/views/avo/dashboards/cards/_metric_card.html.erb
|
1650
|
+
- app/views/avo/dashboards/cards/chartkick_missing.html.erb
|
1651
|
+
- app/views/avo/dashboards/cards/show.html.erb
|
1666
1652
|
- app/views/avo/dashboards/show.html.erb
|
1667
1653
|
- app/views/avo/debug/index.html.erb
|
1668
1654
|
- app/views/avo/debug/report.html.erb
|
@@ -1708,7 +1694,6 @@ files:
|
|
1708
1694
|
- config/credentials.yml.enc
|
1709
1695
|
- config/i18n-tasks.yml
|
1710
1696
|
- config/initializers/pagy.rb
|
1711
|
-
- config/master.key
|
1712
1697
|
- config/routes.rb
|
1713
1698
|
- config/spring.rb
|
1714
1699
|
- db/factories.rb
|
@@ -1719,8 +1704,10 @@ files:
|
|
1719
1704
|
- lib/avo/base_card.rb
|
1720
1705
|
- lib/avo/base_resource.rb
|
1721
1706
|
- lib/avo/base_resource_tool.rb
|
1707
|
+
- lib/avo/concerns/breadcrumbs.rb
|
1722
1708
|
- lib/avo/concerns/can_replace_fields.rb
|
1723
1709
|
- lib/avo/concerns/fetches_things.rb
|
1710
|
+
- lib/avo/concerns/filters_session_handler.rb
|
1724
1711
|
- lib/avo/concerns/handles_field_args.rb
|
1725
1712
|
- lib/avo/concerns/has_editable_controls.rb
|
1726
1713
|
- lib/avo/concerns/has_fields.rb
|
@@ -1728,6 +1715,7 @@ files:
|
|
1728
1715
|
- lib/avo/concerns/has_stimulus_controllers.rb
|
1729
1716
|
- lib/avo/concerns/is_resource_item.rb
|
1730
1717
|
- lib/avo/concerns/model_class_constantized.rb
|
1718
|
+
- lib/avo/concerns/visible_items.rb
|
1731
1719
|
- lib/avo/configuration.rb
|
1732
1720
|
- lib/avo/configuration/branding.rb
|
1733
1721
|
- lib/avo/configuration/resource_configuration.rb
|
@@ -1746,6 +1734,7 @@ files:
|
|
1746
1734
|
- lib/avo/fields/boolean_field.rb
|
1747
1735
|
- lib/avo/fields/boolean_group_field.rb
|
1748
1736
|
- lib/avo/fields/code_field.rb
|
1737
|
+
- lib/avo/fields/concerns/has_default.rb
|
1749
1738
|
- lib/avo/fields/concerns/is_readonly.rb
|
1750
1739
|
- lib/avo/fields/concerns/is_required.rb
|
1751
1740
|
- lib/avo/fields/country_field.rb
|
@@ -1793,8 +1782,10 @@ files:
|
|
1793
1782
|
- lib/avo/hosts/dashboard_visibility.rb
|
1794
1783
|
- lib/avo/hosts/ordering.rb
|
1795
1784
|
- lib/avo/hosts/record_host.rb
|
1785
|
+
- lib/avo/hosts/resource_view_record_host.rb
|
1796
1786
|
- lib/avo/hosts/search_scope_host.rb
|
1797
1787
|
- lib/avo/hosts/view_record_host.rb
|
1788
|
+
- lib/avo/hosts/visibility_host.rb
|
1798
1789
|
- lib/avo/html/builder.rb
|
1799
1790
|
- lib/avo/items_holder.rb
|
1800
1791
|
- lib/avo/licensing/community_license.rb
|
@@ -1901,11 +1892,14 @@ files:
|
|
1901
1892
|
- lib/generators/avo/templates/tool/view.tt
|
1902
1893
|
- lib/generators/avo/tool_generator.rb
|
1903
1894
|
- lib/generators/avo/version_generator.rb
|
1895
|
+
- lib/generators/model_generator.rb
|
1896
|
+
- lib/generators/rails/avo_resource_generator.rb
|
1904
1897
|
- lib/tasks/avo_tasks.rake
|
1905
1898
|
- lib/tasks/tailwindcss_rails.rake
|
1906
1899
|
- public/avo-assets/avo.base.css
|
1907
1900
|
- public/avo-assets/avo.base.js
|
1908
1901
|
- public/avo-assets/avo.base.js.map
|
1902
|
+
- public/avo-assets/favicon.ico
|
1909
1903
|
- public/avo-assets/fonts/inter-v7-latin-500.eot
|
1910
1904
|
- public/avo-assets/fonts/inter-v7-latin-500.svg
|
1911
1905
|
- public/avo-assets/fonts/inter-v7-latin-500.ttf
|
@@ -1929,6 +1923,7 @@ files:
|
|
1929
1923
|
- public/avo-assets/logo-on-white.png
|
1930
1924
|
- public/avo-assets/logo.png
|
1931
1925
|
- public/avo-assets/logomark.png
|
1926
|
+
- public/avo-assets/placeholder.svg
|
1932
1927
|
homepage: https://avohq.io
|
1933
1928
|
licenses:
|
1934
1929
|
- Commercial
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require_dependency "avo/application_controller"
|
2
|
-
|
3
|
-
module Avo
|
4
|
-
class CardsController < ApplicationController
|
5
|
-
before_action :set_dashboard
|
6
|
-
before_action :set_card
|
7
|
-
before_action :detect_chartkick
|
8
|
-
|
9
|
-
def show
|
10
|
-
render(:chartkick_missing) unless @chartkick_installed
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def set_dashboard
|
16
|
-
@dashboard = Avo::App.get_dashboard_by_id params[:dashboard_id]
|
17
|
-
|
18
|
-
raise ActionController::RoutingError.new("Not Found") if @dashboard.nil? || @dashboard.is_hidden?
|
19
|
-
end
|
20
|
-
|
21
|
-
def set_card
|
22
|
-
@card = @dashboard.item_at_index(params[:index].to_i).tap do |card|
|
23
|
-
card.hydrate(dashboard: @dashboard, params: params)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def detect_chartkick
|
28
|
-
@chartkick_installed = if @card.class.ancestors.map(&:to_s).include?("Avo::Dashboards::ChartkickCard")
|
29
|
-
defined?(Chartkick)
|
30
|
-
else
|
31
|
-
true
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
data/config/master.key
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2aeb23d82b909d9c6b5abb62f7058c2a
|