avo 1.22.0.pre.1 → 1.22.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 +1 -3
- data/app/assets/images/avo/logo.png +0 -0
- data/app/assets/stylesheets/avo.css +1 -1
- data/app/assets/stylesheets/css/fonts.css +0 -53
- data/app/assets/stylesheets/css/pagination.css +9 -9
- data/app/assets/stylesheets/css/search.css +2 -3
- data/app/components/avo/fields/boolean_field/index_component.html.erb +1 -1
- data/app/components/avo/index/field_wrapper_component.html.erb +2 -8
- data/app/components/avo/index/field_wrapper_component.rb +1 -2
- data/app/components/avo/index/resource_table_component.html.erb +3 -3
- data/app/components/avo/index/table_row_component.html.erb +1 -1
- data/app/components/avo/navigation_heading_component.html.erb +2 -2
- data/app/components/avo/navigation_heading_component.rb +1 -5
- data/app/components/avo/navigation_link_component.html.erb +2 -2
- data/app/components/avo/navigation_link_component.rb +2 -6
- data/app/components/avo/panel_component.html.erb +3 -5
- data/app/components/avo/views/resource_index_component.html.erb +7 -8
- data/app/components/avo/views/resource_show_component.html.erb +0 -10
- data/app/controllers/avo/application_controller.rb +16 -14
- data/app/controllers/avo/base_controller.rb +1 -4
- data/app/helpers/avo/application_helper.rb +5 -7
- data/app/helpers/avo/resources_helper.rb +2 -2
- data/app/views/avo/base/_actions.html.erb +3 -4
- data/app/views/avo/base/_filters.html.erb +1 -3
- data/app/views/avo/partials/_global_search.html.erb +2 -2
- data/app/views/avo/partials/_logo.html.erb +1 -1
- data/app/views/avo/partials/_paginator.html.erb +3 -4
- data/app/views/avo/partials/_profile_dropdown.html.erb +25 -0
- data/app/views/avo/partials/_resource_search.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +3 -3
- data/app/views/avo/partials/_view_toggle_button.html.erb +16 -22
- data/app/views/avo/{partials → sidebar}/_sidebar.html.erb +10 -14
- data/app/views/layouts/avo/application.html.erb +13 -3
- data/lib/avo/app.rb +3 -4
- data/lib/avo/fields/key_value_field.rb +28 -8
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/locales/avo.en.yml +1 -0
- data/lib/generators/avo/templates/locales/avo.nb-NO.yml +1 -0
- data/lib/generators/avo/templates/locales/avo.pt-BR.yml +1 -0
- data/lib/generators/avo/templates/locales/avo.ro.yml +1 -0
- data/public/avo-assets/avo.css +224 -405
- data/public/avo-assets/logo.png +0 -0
- metadata +7 -37
- data/app/assets/builds/avo.css +0 -8787
- data/app/assets/builds/avo.js +0 -87848
- data/app/assets/builds/avo.js.map +0 -7
- data/app/assets/svgs/dashboards-icon.svg +0 -6
- data/app/assets/svgs/resources-icon.svg +0 -13
- data/app/assets/svgs/three-dots.svg +0 -5
- data/app/assets/svgs/tools-icon.svg +0 -3
- data/app/components/avo/button_component.html.erb +0 -1
- data/app/components/avo/button_component.rb +0 -111
- data/app/components/avo/sidebar_profile_component.html.erb +0 -28
- data/app/components/avo/sidebar_profile_component.rb +0 -43
- data/app/views/avo/partials/_navbar.html.erb +0 -11
- data/public/avo-assets/fonts/inter-v7-latin-500.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.svg +0 -351
- data/public/avo-assets/fonts/inter-v7-latin-500.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-500.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.svg +0 -351
- data/public/avo-assets/fonts/inter-v7-latin-600.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-600.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.svg +0 -352
- data/public/avo-assets/fonts/inter-v7-latin-700.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-700.woff2 +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.eot +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.svg +0 -351
- data/public/avo-assets/fonts/inter-v7-latin-regular.ttf +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff +0 -0
- data/public/avo-assets/fonts/inter-v7-latin-regular.woff2 +0 -0
@@ -1,6 +0,0 @@
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M8.4 2H2V8.4H8.4V2Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
-
<path d="M18 2H11.6V8.4H18V2Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
-
<path d="M8.4 11.6001H2V18.0001H8.4V11.6001Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
5
|
-
<path d="M18 11.6001H11.6V18.0001H18V11.6001Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
6
|
-
</svg>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<g clip-path="url(#clip0_47_764)">
|
3
|
-
<path d="M1.52386 18V11.1428H6.8572" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
-
<path d="M19.0476 18H0" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
5
|
-
<path d="M6.85718 18.0001V6.57153H12.1905" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
6
|
-
<path d="M17.5238 2H12.1905V18H17.5238V2Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
7
|
-
</g>
|
8
|
-
<defs>
|
9
|
-
<clipPath id="clip0_47_764">
|
10
|
-
<rect width="20" height="20" fill="white"/>
|
11
|
-
</clipPath>
|
12
|
-
</defs>
|
13
|
-
</svg>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M17.5702 5.2533C18.0073 6.27384 18.1143 7.4055 17.8762 8.48986C17.6381 9.57423 17.0669 10.557 16.2425 11.3006C15.4182 12.0442 14.3819 12.5114 13.2788 12.6367C12.1757 12.7621 11.061 12.5394 10.0908 11.9997V11.9997L5.41832 17.4135C5.04279 17.789 4.53348 18 4.0024 18C3.47133 18 2.96201 17.789 2.58649 17.4135C2.21097 17.038 2 16.5287 2 15.9976C2 15.4665 2.21097 14.9572 2.58649 14.5817L8.00028 9.90916C7.46064 8.93895 7.23791 7.82427 7.36328 6.72119C7.48864 5.6181 7.95582 4.58183 8.69941 3.75746C9.443 2.93308 10.4258 2.36188 11.5101 2.12381C12.5945 1.88574 13.7262 1.99273 14.7467 2.4298L11.2486 5.91962L11.7233 8.2767L14.0804 8.75144L17.5702 5.2533Z" stroke="#757D8A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
3
|
-
</svg>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= output %>
|
@@ -1,111 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Avo::ButtonComponent < ViewComponent::Base
|
4
|
-
def initialize(size: :md, type: :secondary, icon: nil, is_link: false, href: nil, **args)
|
5
|
-
@size = size
|
6
|
-
@type = type
|
7
|
-
@icon = icon
|
8
|
-
@href = href
|
9
|
-
@is_link = is_link
|
10
|
-
@args = args || {}
|
11
|
-
end
|
12
|
-
|
13
|
-
def args
|
14
|
-
if @args[:spinner]
|
15
|
-
@args[:"data-controller"] = "loading-button"
|
16
|
-
end
|
17
|
-
|
18
|
-
@args
|
19
|
-
end
|
20
|
-
|
21
|
-
def label
|
22
|
-
'lalb'
|
23
|
-
end
|
24
|
-
|
25
|
-
def is_link?
|
26
|
-
@is_link
|
27
|
-
end
|
28
|
-
|
29
|
-
def the_content
|
30
|
-
result = ""
|
31
|
-
|
32
|
-
result += @icon if @icon.present?
|
33
|
-
result += content if content.present?
|
34
|
-
|
35
|
-
result.html_safe
|
36
|
-
end
|
37
|
-
|
38
|
-
def output
|
39
|
-
if is_link?
|
40
|
-
output_link
|
41
|
-
else
|
42
|
-
output_button
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def output_link
|
47
|
-
if content.empty?
|
48
|
-
link_to label, @href, **args
|
49
|
-
else
|
50
|
-
link_to @href, **args do
|
51
|
-
content
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def output_button
|
57
|
-
if content.empty?
|
58
|
-
button_tag label, **args
|
59
|
-
else
|
60
|
-
button_tag **args do
|
61
|
-
the_content
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
# args[:class] = button_classes(args[:class], color: args[:color], variant: args[:variant], size: args[:size])
|
74
|
-
# if args[:spinner]
|
75
|
-
# args[:"data-controller"] = "loading-button"
|
76
|
-
# end
|
77
|
-
|
78
|
-
# locals = {
|
79
|
-
# label: label,
|
80
|
-
# args: args
|
81
|
-
# }
|
82
|
-
|
83
|
-
# if block
|
84
|
-
# render layout: "avo/partials/a_button", locals: locals do
|
85
|
-
# capture(&block)
|
86
|
-
# end
|
87
|
-
# else
|
88
|
-
# render partial: "avo/partials/a_button", locals: locals
|
89
|
-
# end
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
# <% if is_link? %>
|
95
|
-
# <% if content.empty? %>
|
96
|
-
# <%= link_to label, @href, **args %>
|
97
|
-
# <% else %>
|
98
|
-
# <%= link_to @href, **args do %>
|
99
|
-
# <% end %>
|
100
|
-
# <% end %>
|
101
|
-
# <% else %>
|
102
|
-
# <% if content.empty? %>
|
103
|
-
# <%= button_tag label, **args %>
|
104
|
-
# <% else %>
|
105
|
-
# <%= button_tag **args do %>
|
106
|
-
# <%= the_content %>
|
107
|
-
# <% end %>
|
108
|
-
# <% end %>
|
109
|
-
# <% end %>
|
110
|
-
|
111
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<div class="text-black border-t border-gray-200 p-4 flex">
|
2
|
-
<div class="flex-1 flex space-x-4">
|
3
|
-
<div class="relative aspect-square w-10 h-10 overflow-hidden rounded">
|
4
|
-
<%= image_tag avatar, class: "object-cover min-w-full min-h-full h-full" %>
|
5
|
-
</div>
|
6
|
-
<div class="flex flex-col">
|
7
|
-
<div class="font-medium">
|
8
|
-
<%= name %>
|
9
|
-
</div>
|
10
|
-
<div class="text-xs text-gray-500 uppercase">
|
11
|
-
<%= title %>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div>
|
16
|
-
<% if can_destroy_user? %>
|
17
|
-
<a class="flex items-center h-full cursor-pointer">
|
18
|
-
<%= helpers.svg 'three-dots' %>
|
19
|
-
</a>
|
20
|
-
|
21
|
-
<%# if main_app.respond_to?(destroy_user_session_path)
|
22
|
-
<div class="hidden absolute inset-auto right-0 mr-6 mt-0 py-4 bg-white rounded-xl min-w-[200px] shadow-context" data-toggle-panel-target="panel">
|
23
|
-
<%= button_to t('avo.sign_out'), main_app.send(:destroy_user_session_path), method: :delete, form: { "data-turbo" => "false" }, class: "appearance-none bg-white text-left cursor-pointer text-green-600 font-semibold hover:text-white hover:bg-green-500 block px-4 py-1 w-full"
|
24
|
-
</div>
|
25
|
-
<%# end %>
|
26
|
-
<% end %>
|
27
|
-
</div>
|
28
|
-
</div>
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Avo::SidebarProfileComponent < ViewComponent::Base
|
4
|
-
attr_reader :user
|
5
|
-
|
6
|
-
def initialize(user:)
|
7
|
-
@user = user
|
8
|
-
end
|
9
|
-
|
10
|
-
def avatar
|
11
|
-
if user.respond_to?(:avatar) && user.avatar.present?
|
12
|
-
user.avatar
|
13
|
-
else
|
14
|
-
""
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def name
|
19
|
-
if user.respond_to?(:name) && user.name.present?
|
20
|
-
user.name
|
21
|
-
elsif user.respond_to?(:email) && user.email.present?
|
22
|
-
user.email
|
23
|
-
else
|
24
|
-
"Avo user"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def title
|
29
|
-
if user.respond_to?(:avo_title) && user.avo_title.present?
|
30
|
-
user.avo_title
|
31
|
-
else
|
32
|
-
""
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def destroy_user_session_path
|
37
|
-
"destroy_#{Avo.configuration.current_user_resource_name}_session_path".to_sym
|
38
|
-
end
|
39
|
-
|
40
|
-
def can_destroy_user?
|
41
|
-
helpers.main_app.respond_to?(destroy_user_session_path)
|
42
|
-
end
|
43
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<div class="relative bg-white p-2 h-20 w-full flex flex-shrink-0 items-center z-50 px-6 border-b" v-if="layout !== 'blank'">
|
2
|
-
<div>
|
3
|
-
<%= render partial: "avo/partials/header" %>
|
4
|
-
</div>
|
5
|
-
<div class="flex-1 flex ml-4 pl-4">
|
6
|
-
<%= render partial: "avo/partials/global_search" if ::Avo::App.license.has_with_trial(:global_search) && ::Avo.configuration.feature_enabled?(:global_search) %>
|
7
|
-
</div>
|
8
|
-
<div class="align-end">
|
9
|
-
<% # Notifications %>
|
10
|
-
</div>
|
11
|
-
</div>
|
Binary file
|