avo 3.10.6 → 3.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +4 -9
- 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.rb +1 -1
- data/app/components/avo/fields/common/boolean_group_component.html.erb +3 -6
- data/app/components/avo/resource_component.rb +0 -2
- data/app/components/avo/turbo_frame_wrapper_component.html.erb +1 -1
- data/app/controllers/avo/base_controller.rb +9 -2
- data/lib/avo/asset_manager.rb +8 -3
- data/lib/avo/base_resource.rb +2 -601
- data/lib/avo/fields/boolean_group_field.rb +1 -1
- data/lib/avo/licensing/request.rb +3 -1
- data/lib/avo/resources/base.rb +607 -0
- data/lib/avo/resources/items/item_group.rb +2 -0
- data/lib/avo/resources/items/tab.rb +2 -0
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +1 -0
- data/lib/generators/avo/eject_generator.rb +1 -1
- data/lib/generators/avo/templates/locales/avo.de.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.it.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.nl.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.pl.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.ru.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.uk.yml +120 -0
- data/lib/generators/avo/templates/locales/avo.zh.yml +120 -0
- data/public/avo-assets/avo.base.css +3 -71
- data/public/avo-assets/avo.base.js +230 -227
- data/public/avo-assets/avo.base.js.map +4 -4
- data/public/avo-assets/logo-on-white.png +0 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6522100491a3502db0cd2f730a0a8135cf567cf17a6d38084d00122b9f4683a
|
4
|
+
data.tar.gz: b878fcd1ad6fb33182ab27b9c16d180fc6324f268f419bf8033f5b41fa7e36f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5feea15d9c0607c974f687346630fd69109b69fbf874c41d1885c5402f356bbcfdf426c1f25d565f5c103d15ee5fe596f5fe7343468abcc2b6ebf78008f70c41
|
7
|
+
data.tar.gz: c0e12f8faa5c48e9da89f1f5e24fb89db4e9ae9978533ae9e6abda17280f94e41a9da981dfb5a8f663662b02bf307686b683be7043a423e51a03039a64f2195a
|
data/Gemfile.lock
CHANGED
@@ -115,7 +115,7 @@ GIT
|
|
115
115
|
PATH
|
116
116
|
remote: .
|
117
117
|
specs:
|
118
|
-
avo (3.10.
|
118
|
+
avo (3.10.7)
|
119
119
|
actionview (>= 6.1)
|
120
120
|
active_link_to
|
121
121
|
activerecord (>= 6.1)
|
@@ -484,7 +484,7 @@ GEM
|
|
484
484
|
railties (>= 5.2)
|
485
485
|
reverse_markdown (2.1.1)
|
486
486
|
nokogiri
|
487
|
-
rexml (3.3.
|
487
|
+
rexml (3.3.2)
|
488
488
|
strscan
|
489
489
|
ripper-tags (1.0.2)
|
490
490
|
rspec-core (3.13.0)
|
data/README.md
CHANGED
@@ -14,9 +14,6 @@
|
|
14
14
|
<a href="https://github.com/testdouble/standard">
|
15
15
|
<img alt="Ruby Style" src="https://img.shields.io/badge/style-standard-168AFE?logo=ruby&logoColor=FE1616" />
|
16
16
|
</a>
|
17
|
-
<a href="https://discord.com/invite/vuuwFe4Km3">
|
18
|
-
<img alt="Avo Rails Admin Discord Community" src="https://img.shields.io/discord/740892036978442260?color=8892F6&label=discord&logo=discord&logoColor=8892F6">
|
19
|
-
</a>
|
20
17
|
[](https://codecov.io/gh/avo-hq/avo)
|
21
18
|
[](https://codeclimate.com/github/avo-hq/avo/maintainability)
|
22
19
|
|
@@ -36,15 +33,13 @@ Avo is a very custom Admin Panel Framework, Content Management System, and Inter
|
|
36
33
|
<br>
|
37
34
|
🗺 **Roadmap**: [GitHub Roadmap](https://github.com/orgs/avo-hq/projects/14)
|
38
35
|
<br>
|
39
|
-
🎸 **Demo
|
40
|
-
<br>
|
41
|
-
🐤 **Twitter**: [avo_hq](https://twitter.com/avo_hq)
|
36
|
+
🎸 **Demo App**: [Avodemo](https://main.avodemo.com/)
|
42
37
|
<br>
|
43
|
-
|
38
|
+
🐤 **Twitter**: [`avo_hq`](https://twitter.com/avo_hq)
|
44
39
|
<br>
|
45
|
-
🔧 **Issue
|
40
|
+
🔧 **Issue Tracker**: [GitHub Issues](http://github.com/avo-hq/avo/issues)
|
46
41
|
<br>
|
47
|
-
🎙 **Discussions and
|
42
|
+
🎙 **Discussions and Feature Requests**: [GitHub Discussions](http://github.com/avo-hq/avo/discussions)
|
48
43
|
|
49
44
|
## Features
|
50
45
|
|
@@ -17,7 +17,7 @@ class Avo::Fields::BooleanGroupField::EditComponent < Avo::Fields::EditComponent
|
|
17
17
|
if params[@form_scope].present? && params[@form_scope][@field.id.to_s].present?
|
18
18
|
params[@form_scope][@field.id.to_s].include?(id.to_s)
|
19
19
|
elsif @field.value.present?
|
20
|
-
@field.value[id
|
20
|
+
@field.value.with_indifferent_access[id]
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -1,13 +1,10 @@
|
|
1
1
|
<div data-controller="tippy">
|
2
|
-
<%= link_to t(
|
2
|
+
<%= link_to t("avo.view").humanize, "javascript:void(0);", data: {"tippy-target": :source} %>
|
3
3
|
<div class="hidden" data-tippy-target="content">
|
4
4
|
<div class="p-2 space-y-2">
|
5
|
-
<%
|
6
|
-
@options.each do |id, label|
|
7
|
-
checked = @value.present? && @value[id.to_s].present?
|
8
|
-
%>
|
5
|
+
<% @options.each do |id, label| %>
|
9
6
|
<div class="flex flex-nowrap">
|
10
|
-
<%= render Avo::Fields::Common::BooleanCheckComponent.new checked:
|
7
|
+
<%= render Avo::Fields::Common::BooleanCheckComponent.new checked: @value.present? && @value&.with_indifferent_access[id].present? %>
|
11
8
|
<div class="ml-px text-left py-px"><%= label %></div>
|
12
9
|
</div>
|
13
10
|
<% end %>
|
@@ -50,8 +50,6 @@ class Avo::ResourceComponent < Avo::BaseComponent
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def can_see_the_actions_button?
|
53
|
-
return false if @actions.blank?
|
54
|
-
|
55
53
|
return authorize_association_for(:act_on) if @reflection.present?
|
56
54
|
|
57
55
|
@resource.authorization.authorize_action(:act_on, raise_exception: false) && !has_reflection_and_is_read_only
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# We're appending it back if it's a turbo_frame_request.
|
5
5
|
%>
|
6
6
|
<% if helpers.turbo_frame_request? %>
|
7
|
-
<%= helpers.turbo_stream_action_tag :append, target:
|
7
|
+
<%= helpers.turbo_stream_action_tag :append, target: "alerts", template: render(Avo::FlashAlertsComponent.new(flashes: helpers.flash)) %>
|
8
8
|
<% end %>
|
9
9
|
<%= content %>
|
10
10
|
<% if name.present? %></turbo-frame><% end %>
|
@@ -305,8 +305,15 @@ module Avo
|
|
305
305
|
# Sorting
|
306
306
|
if params[:sort_by].present?
|
307
307
|
@index_params[:sort_by] = params[:sort_by]
|
308
|
-
elsif @resource.model_class.present?
|
309
|
-
|
308
|
+
elsif @resource.model_class.present?
|
309
|
+
available_columns = @resource.model_class.column_names
|
310
|
+
default_sort_column = @resource.default_sort_column
|
311
|
+
|
312
|
+
if available_columns.include?(default_sort_column.to_s)
|
313
|
+
@index_params[:sort_by] = default_sort_column
|
314
|
+
elsif available_columns.include?("created_at")
|
315
|
+
@index_params[:sort_by] = :created_at
|
316
|
+
end
|
310
317
|
end
|
311
318
|
|
312
319
|
@index_params[:sort_direction] = params[:sort_direction] || :desc
|
data/lib/avo/asset_manager.rb
CHANGED
@@ -2,9 +2,6 @@ module Avo
|
|
2
2
|
class AssetManager
|
3
3
|
include ActionView::Helpers::AssetTagHelper
|
4
4
|
|
5
|
-
attr_reader :stylesheets
|
6
|
-
attr_reader :javascripts
|
7
|
-
|
8
5
|
def initialize
|
9
6
|
@stylesheets = []
|
10
7
|
@javascripts = []
|
@@ -22,6 +19,14 @@ module Avo
|
|
22
19
|
def add_javascript(path)
|
23
20
|
@javascripts.push path
|
24
21
|
end
|
22
|
+
|
23
|
+
def stylesheets
|
24
|
+
@stylesheets.uniq
|
25
|
+
end
|
26
|
+
|
27
|
+
def javascripts
|
28
|
+
@javascripts.uniq
|
29
|
+
end
|
25
30
|
end
|
26
31
|
|
27
32
|
def self.asset_manager
|