avo 2.7.1.pre.1 → 2.8.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 +2 -0
- data/Gemfile.lock +5 -5
- data/app/components/avo/alert_component.rb +6 -0
- data/app/components/avo/card_component.html.erb +2 -2
- data/app/components/avo/common_field_wrapper_component.html.erb +10 -3
- data/app/components/avo/common_field_wrapper_component.rb +27 -1
- data/app/components/avo/edit/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/fields/badge_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/badge_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb +21 -10
- data/app/components/avo/fields/belongs_to_field/autocomplete_component.rb +7 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +27 -15
- data/app/components/avo/fields/belongs_to_field/edit_component.rb +4 -0
- data/app/components/avo/fields/belongs_to_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +4 -2
- data/app/components/avo/fields/boolean_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +7 -1
- data/app/components/avo/fields/boolean_group_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/code_field/edit_component.html.erb +7 -5
- data/app/components/avo/fields/code_field/show_component.html.erb +2 -2
- data/app/components/avo/fields/common/key_value_component.html.erb +10 -4
- data/app/components/avo/fields/common/key_value_component.rb +2 -0
- data/app/components/avo/fields/country_field/edit_component.html.erb +4 -2
- data/app/components/avo/fields/country_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/country_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/date_field/edit_component.html.erb +6 -4
- data/app/components/avo/fields/date_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/date_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +6 -4
- data/app/components/avo/fields/date_time_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/date_time_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/edit_component.rb +7 -0
- data/app/components/avo/fields/external_image_field/edit_component.html.erb +5 -2
- data/app/components/avo/fields/external_image_field/index_component.html.erb +6 -4
- data/app/components/avo/fields/external_image_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/file_field/edit_component.html.erb +6 -1
- data/app/components/avo/fields/file_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/file_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/files_field/edit_component.html.erb +7 -1
- data/app/components/avo/fields/files_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/files_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/gravatar_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/gravatar_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/has_one_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/hidden_field/edit_component.html.erb +5 -1
- data/app/components/avo/fields/id_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/id_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/id_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/index_component.rb +3 -0
- data/app/components/avo/fields/key_value_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/key_value_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/markdown_field/edit_component.html.erb +8 -5
- data/app/components/avo/fields/markdown_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/number_field/edit_component.html.erb +7 -4
- data/app/components/avo/fields/number_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/number_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/password_field/edit_component.html.erb +4 -2
- data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +7 -4
- data/app/components/avo/fields/progress_bar_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/progress_bar_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/select_field/edit_component.html.erb +9 -3
- data/app/components/avo/fields/select_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/select_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/show_component.rb +3 -0
- data/app/components/avo/fields/status_field/edit_component.html.erb +6 -3
- data/app/components/avo/fields/status_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/status_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/edit_component.html.erb +19 -11
- data/app/components/avo/fields/tags_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/text_field/edit_component.html.erb +5 -2
- data/app/components/avo/fields/text_field/index_component.html.erb +1 -1
- data/app/components/avo/fields/text_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/textarea_field/edit_component.html.erb +6 -3
- data/app/components/avo/fields/textarea_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/trix_field/edit_component.html.erb +13 -4
- data/app/components/avo/fields/trix_field/edit_component.rb +3 -0
- data/app/components/avo/fields/trix_field/show_component.html.erb +1 -1
- data/app/components/avo/index/field_wrapper_component.html.erb +12 -5
- data/app/components/avo/index/field_wrapper_component.rb +27 -3
- data/app/components/avo/panel_component.rb +4 -3
- data/app/components/avo/resource_component.rb +1 -0
- data/app/components/avo/show/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/show/field_wrapper_component.rb +2 -1
- data/app/components/avo/views/resource_edit_component.html.erb +7 -4
- data/app/components/avo/views/resource_edit_component.rb +2 -1
- data/app/components/avo/views/resource_index_component.html.erb +6 -3
- data/app/components/avo/views/resource_index_component.rb +7 -1
- data/app/components/avo/views/resource_new_component.html.erb +7 -2
- data/app/components/avo/views/resource_new_component.rb +2 -1
- data/app/components/avo/views/resource_show_component.html.erb +9 -7
- data/app/components/avo/views/resource_show_component.rb +1 -0
- data/app/controllers/avo/actions_controller.rb +4 -1
- data/app/controllers/avo/base_controller.rb +14 -8
- data/app/controllers/avo/search_controller.rb +7 -1
- data/app/javascript/js/controllers/custom/course_resource_controller.js +102 -0
- data/app/javascript/js/controllers/fields/code_field_controller.js +7 -1
- data/app/javascript/js/controllers/fields/key_value_controller.js +1 -0
- data/app/javascript/js/controllers/fields/tags_field_controller.js +0 -1
- data/app/javascript/js/controllers/menu_controller.js +4 -3
- data/app/javascript/js/controllers/resource_edit_controller.js +72 -0
- data/app/javascript/js/controllers/resource_index_controller.js +4 -0
- data/app/javascript/js/controllers/resource_show_controller.js +4 -0
- data/app/javascript/js/controllers/search_controller.js +28 -5
- data/app/javascript/js/controllers.js +10 -0
- data/app/views/avo/associations/new.html.erb +2 -1
- data/app/views/avo/base/_select_filter.html.erb +1 -1
- data/app/views/avo/base/_text_filter.html.erb +1 -0
- data/app/views/avo/partials/_logo.html.erb +3 -2
- data/app/views/avo/partials/_navbar.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/db/factories.rb +1 -0
- data/lib/avo/base_action.rb +9 -2
- data/lib/avo/base_card.rb +0 -23
- data/lib/avo/base_resource.rb +17 -15
- data/lib/avo/concerns/has_fields.rb +93 -0
- data/lib/avo/concerns/has_html_attributes.rb +110 -0
- data/lib/avo/concerns/has_stimulus_controllers.rb +42 -0
- data/lib/avo/fields/base_field.rb +23 -13
- data/lib/avo/fields/select_field.rb +1 -1
- data/lib/avo/grid_collector.rb +4 -4
- data/lib/avo/html/builder.rb +117 -0
- data/lib/avo/licensing/pro_license.rb +1 -0
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +4 -0
- data/lib/generators/avo/templates/cards/chartkick_card_sample.tt +11 -1
- data/lib/generators/avo/templates/cards/metric_card_sample.tt +11 -1
- data/lib/generators/avo/templates/field/components/edit_component.html.erb.tt +1 -1
- data/lib/generators/avo/templates/field/components/index_component.html.erb.tt +1 -1
- data/lib/generators/avo/templates/field/components/show_component.html.erb.tt +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +1 -1
- data/lib/generators/avo/templates/locales/avo.en.yml +3 -3
- data/public/avo-assets/avo.css +28 -8
- data/public/avo-assets/avo.js +148 -148
- data/public/avo-assets/avo.js.map +3 -3
- data/public/avo-assets/logomark.png +0 -0
- metadata +13 -10
- data/app/assets/builds/action_cable.js +0 -2
- data/app/assets/builds/action_cable.js.map +0 -7
- data/app/assets/builds/avo.css +0 -9610
- data/app/assets/builds/avo.js +0 -512
- data/app/assets/builds/avo.js.map +0 -7
- data/lib/avo/fields_collector.rb +0 -70
@@ -4,7 +4,17 @@ class <%= class_name.camelize %> < Avo::Dashboards::MetricCard
|
|
4
4
|
# self.description = "Some description"
|
5
5
|
# self.cols = 1
|
6
6
|
# self.initial_range = 30
|
7
|
-
# self.ranges =
|
7
|
+
# self.ranges = {
|
8
|
+
# "7 days": 7,
|
9
|
+
# "30 days": 30,
|
10
|
+
# "60 days": 60,
|
11
|
+
# "365 days": 365,
|
12
|
+
# Today: "TODAY",
|
13
|
+
# "Month to date": "MTD",
|
14
|
+
# "Quarter to date": "QTD",
|
15
|
+
# "Year to date": "YTD",
|
16
|
+
# All: "ALL",
|
17
|
+
# }
|
8
18
|
# self.prefix = ""
|
9
19
|
# self.suffix = ""
|
10
20
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
|
2
2
|
<%%= @form.text_field @field.id,
|
3
|
-
class:
|
3
|
+
class: classes("w-full"),
|
4
4
|
placeholder: @field.placeholder,
|
5
5
|
disabled: @field.readonly %>
|
6
6
|
<%% end %>
|
@@ -3,7 +3,7 @@ Avo.configure do |config|
|
|
3
3
|
## == Routing ==
|
4
4
|
config.root_path = '/<%= options[:path] %>'
|
5
5
|
|
6
|
-
# Where should the user be redirected when
|
6
|
+
# Where should the user be redirected when visting the `/<%= options[:path] %>` url
|
7
7
|
# config.home_path = nil
|
8
8
|
|
9
9
|
## == Licensing ==
|
@@ -13,9 +13,9 @@ en:
|
|
13
13
|
unauthorized: 'Unauthorized'
|
14
14
|
attachment_class_attached: '%{attachment_class} attached.'
|
15
15
|
attachment_class_detached: '%{attachment_class} detached.'
|
16
|
-
resource_updated: '
|
17
|
-
resource_created: '
|
18
|
-
resource_destroyed: '
|
16
|
+
resource_updated: 'Record updated'
|
17
|
+
resource_created: 'Record created'
|
18
|
+
resource_destroyed: 'Record destroyed'
|
19
19
|
switch_to_view: "Switch to %{view_type} view"
|
20
20
|
click_to_reveal_filters: "Click to reveal filters"
|
21
21
|
attachment_destroyed: 'Attachment destroyed'
|
data/public/avo-assets/avo.css
CHANGED
@@ -7181,10 +7181,6 @@ progress[value]::-moz-progress-bar{
|
|
7181
7181
|
height:1.5rem
|
7182
7182
|
}
|
7183
7183
|
|
7184
|
-
.h-10{
|
7185
|
-
height:2.5rem
|
7186
|
-
}
|
7187
|
-
|
7188
7184
|
.h-16{
|
7189
7185
|
height:4rem
|
7190
7186
|
}
|
@@ -7201,6 +7197,10 @@ progress[value]::-moz-progress-bar{
|
|
7201
7197
|
height:calc(100vh - 4rem)
|
7202
7198
|
}
|
7203
7199
|
|
7200
|
+
.h-10{
|
7201
|
+
height:2.5rem
|
7202
|
+
}
|
7203
|
+
|
7204
7204
|
.max-h-\[42rem\]{
|
7205
7205
|
max-height:42rem
|
7206
7206
|
}
|
@@ -7241,8 +7241,8 @@ progress[value]::-moz-progress-bar{
|
|
7241
7241
|
width:100%
|
7242
7242
|
}
|
7243
7243
|
|
7244
|
-
.w-
|
7245
|
-
width:
|
7244
|
+
.w-auto{
|
7245
|
+
width:auto
|
7246
7246
|
}
|
7247
7247
|
|
7248
7248
|
.w-24{
|
@@ -7581,6 +7581,10 @@ progress[value]::-moz-progress-bar{
|
|
7581
7581
|
white-space:nowrap
|
7582
7582
|
}
|
7583
7583
|
|
7584
|
+
.whitespace-pre-line{
|
7585
|
+
white-space:pre-line
|
7586
|
+
}
|
7587
|
+
|
7584
7588
|
.break-words{
|
7585
7589
|
overflow-wrap:break-word
|
7586
7590
|
}
|
@@ -7958,6 +7962,10 @@ progress[value]::-moz-progress-bar{
|
|
7958
7962
|
stroke:currentColor
|
7959
7963
|
}
|
7960
7964
|
|
7965
|
+
.object-contain{
|
7966
|
+
object-fit:contain
|
7967
|
+
}
|
7968
|
+
|
7961
7969
|
.object-cover{
|
7962
7970
|
object-fit:cover
|
7963
7971
|
}
|
@@ -8441,6 +8449,10 @@ progress[value]::-moz-progress-bar{
|
|
8441
8449
|
opacity:0.5
|
8442
8450
|
}
|
8443
8451
|
|
8452
|
+
.opacity-10{
|
8453
|
+
opacity:0.1
|
8454
|
+
}
|
8455
|
+
|
8444
8456
|
.shadow-panel{
|
8445
8457
|
--tw-shadow:0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04);
|
8446
8458
|
--tw-shadow-colored:0px 4px 8px var(--tw-shadow-color), 0px 0px 2px var(--tw-shadow-color), 0px 0px 1px var(--tw-shadow-color);
|
@@ -9323,6 +9335,10 @@ trix-editor {
|
|
9323
9335
|
grid-column:span 6 / span 6
|
9324
9336
|
}
|
9325
9337
|
|
9338
|
+
.sm\:block{
|
9339
|
+
display:block
|
9340
|
+
}
|
9341
|
+
|
9326
9342
|
.sm\:flex{
|
9327
9343
|
display:flex
|
9328
9344
|
}
|
@@ -9331,8 +9347,8 @@ trix-editor {
|
|
9331
9347
|
display:inline-flex
|
9332
9348
|
}
|
9333
9349
|
|
9334
|
-
.sm\:
|
9335
|
-
|
9350
|
+
.sm\:hidden{
|
9351
|
+
display:none
|
9336
9352
|
}
|
9337
9353
|
|
9338
9354
|
.sm\:w-auto{
|
@@ -9479,6 +9495,10 @@ trix-editor {
|
|
9479
9495
|
display:none
|
9480
9496
|
}
|
9481
9497
|
|
9498
|
+
.lg\:w-64{
|
9499
|
+
width:16rem
|
9500
|
+
}
|
9501
|
+
|
9482
9502
|
.lg\:w-1\/2{
|
9483
9503
|
width:50%
|
9484
9504
|
}
|