avo 2.9.1.pre7 → 2.10.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.lock +5 -7
- data/README.md +4 -0
- data/app/assets/stylesheets/css/buttons.css +4 -1
- data/app/components/avo/base_component.rb +2 -0
- data/app/components/avo/button_component.rb +3 -1
- data/app/components/avo/fields/edit_component.rb +5 -0
- data/app/components/avo/fields/show_component.rb +1 -1
- data/app/components/avo/index/ordering/button_component.rb +3 -5
- data/app/components/avo/index/resource_table_component.html.erb +1 -1
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/item_switcher_component.html.erb +19 -0
- data/app/components/avo/item_switcher_component.rb +45 -0
- data/app/components/avo/panel_component.html.erb +23 -24
- data/app/components/avo/panel_component.rb +8 -5
- data/app/components/avo/tab_group_component.html.erb +53 -0
- data/app/components/avo/tab_group_component.rb +51 -0
- data/app/components/avo/tab_switcher_component.html.erb +21 -0
- data/app/components/avo/tab_switcher_component.rb +86 -0
- data/app/components/avo/views/resource_edit_component.html.erb +34 -56
- data/app/components/avo/views/resource_edit_component.rb +10 -0
- data/app/components/avo/views/resource_index_component.html.erb +1 -1
- data/app/components/avo/views/resource_index_component.rb +1 -1
- data/app/components/avo/views/resource_show_component.html.erb +58 -89
- data/app/components/avo/views/resource_show_component.rb +2 -2
- data/app/controllers/avo/actions_controller.rb +1 -1
- data/app/controllers/avo/application_controller.rb +6 -10
- data/app/helpers/avo/application_helper.rb +0 -6
- data/app/helpers/avo/url_helpers.rb +1 -1
- data/app/javascript/js/controllers/loading_button_controller.js +25 -21
- data/app/javascript/js/controllers/tabs_controller.js +9 -3
- data/app/javascript/js/controllers.js +2 -0
- data/app/views/avo/base/index.html.erb +1 -1
- data/app/views/avo/base/show.html.erb +1 -1
- data/app/views/avo/cards/show.html.erb +1 -1
- data/app/views/avo/debug/index.html.erb +1 -1
- data/app/views/avo/home/_actions.html.erb +1 -1
- data/app/views/avo/home/_dashboards.html.erb +19 -0
- data/app/views/avo/home/_filters.html.erb +1 -1
- data/app/views/avo/home/_resources.html.erb +1 -1
- data/app/views/avo/home/failed_to_load.html.erb +1 -1
- data/app/views/avo/home/index.html.erb +14 -2
- data/app/views/avo/partials/_tabs_toggle.html.erb +20 -0
- data/app/views/avo/private/design.html.erb +1 -1
- data/lib/avo/base_action.rb +2 -19
- data/lib/avo/base_resource.rb +0 -94
- data/lib/avo/base_resource_tool.rb +3 -1
- data/lib/avo/concerns/has_fields.rb +247 -50
- data/lib/avo/concerns/has_html_attributes.rb +1 -1
- data/lib/avo/concerns/is_resource_item.rb +36 -0
- data/lib/avo/dsl/field_parser.rb +83 -0
- data/lib/avo/fields/base_field.rb +19 -2
- data/lib/avo/fields/field_extensions/visible_in_different_views.rb +18 -1
- data/lib/avo/fields/has_base_field.rb +18 -1
- data/lib/avo/grid_collector.rb +6 -3
- data/lib/avo/items_holder.rb +68 -0
- data/lib/avo/licensing/h_q.rb +10 -0
- data/lib/avo/main_panel.rb +3 -0
- data/lib/avo/menu/builder.rb +6 -6
- data/lib/avo/panel.rb +25 -0
- data/lib/avo/panel_builder.rb +23 -0
- data/lib/avo/tab.rb +78 -0
- data/lib/avo/tab_builder.rb +25 -0
- data/lib/avo/tab_group.rb +40 -0
- data/lib/avo/tab_group_builder.rb +43 -0
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/resource/controller.tt +2 -0
- data/lib/generators/avo/templates/resource_tools/partial.tt +1 -1
- data/lib/generators/avo/templates/tool/view.tt +1 -1
- data/public/avo-assets/avo.css +27 -3
- data/public/avo-assets/avo.js +73 -73
- data/public/avo-assets/avo.js.map +3 -3
- metadata +22 -5
- data/lib/avo/concerns/has_tools.rb +0 -47
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.10.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-07-
|
12
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -997,6 +997,8 @@ files:
|
|
997
997
|
- app/components/avo/index/resource_table_component.rb
|
998
998
|
- app/components/avo/index/table_row_component.html.erb
|
999
999
|
- app/components/avo/index/table_row_component.rb
|
1000
|
+
- app/components/avo/item_switcher_component.html.erb
|
1001
|
+
- app/components/avo/item_switcher_component.rb
|
1000
1002
|
- app/components/avo/loading_component.html.erb
|
1001
1003
|
- app/components/avo/loading_component.rb
|
1002
1004
|
- app/components/avo/modal_component.html.erb
|
@@ -1027,6 +1029,10 @@ files:
|
|
1027
1029
|
- app/components/avo/sidebar_component.rb
|
1028
1030
|
- app/components/avo/sidebar_profile_component.html.erb
|
1029
1031
|
- app/components/avo/sidebar_profile_component.rb
|
1032
|
+
- app/components/avo/tab_group_component.html.erb
|
1033
|
+
- app/components/avo/tab_group_component.rb
|
1034
|
+
- app/components/avo/tab_switcher_component.html.erb
|
1035
|
+
- app/components/avo/tab_switcher_component.rb
|
1030
1036
|
- app/components/avo/turbo_frame_wrapper_component.html.erb
|
1031
1037
|
- app/components/avo/turbo_frame_wrapper_component.rb
|
1032
1038
|
- app/components/avo/views/resource_edit_component.html.erb
|
@@ -1110,6 +1116,7 @@ files:
|
|
1110
1116
|
- app/views/avo/debug/index.html.erb
|
1111
1117
|
- app/views/avo/debug/report.html.erb
|
1112
1118
|
- app/views/avo/home/_actions.html.erb
|
1119
|
+
- app/views/avo/home/_dashboards.html.erb
|
1113
1120
|
- app/views/avo/home/_docs.html.erb
|
1114
1121
|
- app/views/avo/home/_filters.html.erb
|
1115
1122
|
- app/views/avo/home/_resources.html.erb
|
@@ -1128,6 +1135,7 @@ files:
|
|
1128
1135
|
- app/views/avo/partials/_sidebar_extra.html.erb
|
1129
1136
|
- app/views/avo/partials/_sortable_component.html.erb
|
1130
1137
|
- app/views/avo/partials/_table_header.html.erb
|
1138
|
+
- app/views/avo/partials/_tabs_toggle.html.erb
|
1131
1139
|
- app/views/avo/partials/_view_toggle_button.html.erb
|
1132
1140
|
- app/views/avo/private/_links_and_buttons.html.erb
|
1133
1141
|
- app/views/avo/private/design.html.erb
|
@@ -1170,7 +1178,7 @@ files:
|
|
1170
1178
|
- lib/avo/concerns/has_html_attributes.rb
|
1171
1179
|
- lib/avo/concerns/has_model.rb
|
1172
1180
|
- lib/avo/concerns/has_stimulus_controllers.rb
|
1173
|
-
- lib/avo/concerns/
|
1181
|
+
- lib/avo/concerns/is_resource_item.rb
|
1174
1182
|
- lib/avo/concerns/model_class_constantized.rb
|
1175
1183
|
- lib/avo/configuration.rb
|
1176
1184
|
- lib/avo/dashboards/base_dashboard.rb
|
@@ -1179,6 +1187,7 @@ files:
|
|
1179
1187
|
- lib/avo/dashboards/dashboard_card.rb
|
1180
1188
|
- lib/avo/dashboards/metric_card.rb
|
1181
1189
|
- lib/avo/dashboards/partial_card.rb
|
1190
|
+
- lib/avo/dsl/field_parser.rb
|
1182
1191
|
- lib/avo/dynamic_router.rb
|
1183
1192
|
- lib/avo/engine.rb
|
1184
1193
|
- lib/avo/fields/badge_field.rb
|
@@ -1235,6 +1244,7 @@ files:
|
|
1235
1244
|
- lib/avo/hosts/record_host.rb
|
1236
1245
|
- lib/avo/hosts/view_record_host.rb
|
1237
1246
|
- lib/avo/html/builder.rb
|
1247
|
+
- lib/avo/items_holder.rb
|
1238
1248
|
- lib/avo/licensing/community_license.rb
|
1239
1249
|
- lib/avo/licensing/h_q.rb
|
1240
1250
|
- lib/avo/licensing/license.rb
|
@@ -1245,6 +1255,7 @@ files:
|
|
1245
1255
|
- lib/avo/loaders/fields_loader.rb
|
1246
1256
|
- lib/avo/loaders/filters_loader.rb
|
1247
1257
|
- lib/avo/loaders/loader.rb
|
1258
|
+
- lib/avo/main_panel.rb
|
1248
1259
|
- lib/avo/menu/base_item.rb
|
1249
1260
|
- lib/avo/menu/builder.rb
|
1250
1261
|
- lib/avo/menu/dashboard.rb
|
@@ -1253,9 +1264,15 @@ files:
|
|
1253
1264
|
- lib/avo/menu/menu.rb
|
1254
1265
|
- lib/avo/menu/resource.rb
|
1255
1266
|
- lib/avo/menu/section.rb
|
1267
|
+
- lib/avo/panel.rb
|
1268
|
+
- lib/avo/panel_builder.rb
|
1256
1269
|
- lib/avo/reloader.rb
|
1257
1270
|
- lib/avo/services/authorization_service.rb
|
1258
1271
|
- lib/avo/services/uri_service.rb
|
1272
|
+
- lib/avo/tab.rb
|
1273
|
+
- lib/avo/tab_builder.rb
|
1274
|
+
- lib/avo/tab_group.rb
|
1275
|
+
- lib/avo/tab_group_builder.rb
|
1259
1276
|
- lib/avo/tools_manager.rb
|
1260
1277
|
- lib/avo/version.rb
|
1261
1278
|
- lib/generators/avo/action_generator.rb
|
@@ -1353,9 +1370,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1353
1370
|
version: 2.4.0
|
1354
1371
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1355
1372
|
requirements:
|
1356
|
-
- - "
|
1373
|
+
- - ">="
|
1357
1374
|
- !ruby/object:Gem::Version
|
1358
|
-
version:
|
1375
|
+
version: '0'
|
1359
1376
|
requirements: []
|
1360
1377
|
rubygems_version: 3.3.3
|
1361
1378
|
signing_key:
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module Avo
|
2
|
-
module Concerns
|
3
|
-
module HasTools
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
included do
|
7
|
-
class_attribute :tools_holder
|
8
|
-
|
9
|
-
def tools
|
10
|
-
check_license
|
11
|
-
|
12
|
-
return [] if App.license.lacks_with_trial :resource_tools
|
13
|
-
return [] if self.class.tools.blank?
|
14
|
-
|
15
|
-
self.class.tools
|
16
|
-
.map do |tool|
|
17
|
-
tool.hydrate view: view
|
18
|
-
end
|
19
|
-
.select do |field|
|
20
|
-
field.send("show_on_#{view}")
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
class_methods do
|
26
|
-
def tool(klass, **args)
|
27
|
-
self.tools_holder ||= []
|
28
|
-
|
29
|
-
self.tools_holder << klass.new(**args)
|
30
|
-
end
|
31
|
-
|
32
|
-
def tools
|
33
|
-
self.tools_holder
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def check_license
|
40
|
-
if !Rails.env.production? && App.license.lacks(:resource_tools)
|
41
|
-
# Add error message to let the developer know the resource tool will not be available in a production environment.
|
42
|
-
Avo::App.error_messages.push "Warning: Your license is invalid or doesn't support resource tools. The resource tools will not be visible in a production environment."
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|