avo 2.30.1.pre1.pr1683 → 2.30.1.pre2.pr1683
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 -1
- data/app/components/avo/field_wrapper_component.html.erb +2 -2
- data/app/components/avo/fields/common/files/list_viewer_component.html.erb +2 -2
- data/app/components/avo/fields/common/files/list_viewer_component.rb +7 -1
- data/app/components/avo/fields/common/files/view_type/list_component.html.erb +4 -4
- data/app/components/avo/fields/files_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/files_field/show_component.html.erb +1 -1
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.base.css +4 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9bb94729b7e065e13af29ac65735d3234c26b1239dd649e6de5dada23b15aa
|
4
|
+
data.tar.gz: 71d338dab4be874a0d7acd450c64e420be9de5e124ca57d727591af3a9828cdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5fb2e3b4527c5181650f3c1cb73ef4e8808f9cc42e71b24dbaee687b768f1d5c8ed44be7514e13d5ba4c79408528abcb02eea5ec5cf07c4ffc7ee23bc30bfcb
|
7
|
+
data.tar.gz: f349827d0b287eeefd1296dba288abbf0226ae86d61e864562d10a07b74d225488c3f53a8190897b30b7e68acb54c521520e386a0737bb7175bb5624ea3fb8b4
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
class: classes,
|
3
3
|
style: style,
|
4
4
|
data: data do %>
|
5
|
-
<div class="h-full <% if stacked? %> md:pt-4 <% else %> md:pt-0 md:h-14 <% end %> pt-4 flex self-start items-center <%= @field.get_html(:classes, view: view, element: :label) %> w-48 <% if compact? %> md:w-48 xl:w-64 <% else %> md:w-64 <% end %> px-6 uppercase font-semibold text-gray-500 text-sm" data-slot="label">
|
5
|
+
<div class="h-full <% if stacked? %> md:pt-4 <% else %> md:pt-0 md:h-14 <% end %> pt-4 flex self-start items-center flex-shrink-0 <%= @field.get_html(:classes, view: view, element: :label) %> w-48 <% if compact? %> md:w-48 xl:w-64 <% else %> md:w-64 <% end %> px-6 uppercase font-semibold text-gray-500 text-sm" data-slot="label">
|
6
6
|
<% if form.present? %>
|
7
7
|
<%= form.label field.id, label %>
|
8
8
|
<% else %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% if on_edit? && field.is_required? %> <span class="text-red-600 ml-1">*</span> <% end %>
|
12
12
|
</div>
|
13
13
|
<div class="flex-1 flex flex-row md:min-h-inherit py-2 <% if stacked? %> pb-4 <% else %><% end %> px-6 <%= @field.get_html(:classes, view: view, element: :content) %>" data-slot="value">
|
14
|
-
<div class="self-center <% if full_width? || compact? || stacked? %>
|
14
|
+
<div class="self-center w-full <% if full_width? || compact? || stacked? %> <% else %> md:w-8/12 <% end %>">
|
15
15
|
<% if on_show? %>
|
16
16
|
<% if field.value.blank? and dash_if_blank %>
|
17
17
|
—
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<%= content_tag :div, class: wrapper_classes do %>
|
2
2
|
<%= turbo_frame_tag @field.id do %>
|
3
3
|
<% unless @field.hide_view_type_changer %>
|
4
4
|
<div class="justify-self-end flex justify-end items-center space-x-3">
|
@@ -11,4 +11,4 @@
|
|
11
11
|
<% end %>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
|
-
|
14
|
+
<% end %>
|
@@ -3,13 +3,15 @@
|
|
3
3
|
class Avo::Fields::Common::Files::ListViewerComponent < ViewComponent::Base
|
4
4
|
include Turbo::FramesHelper
|
5
5
|
|
6
|
+
attr_reader :field
|
7
|
+
|
6
8
|
def initialize(field:, resource:)
|
7
9
|
@field = field
|
8
10
|
@resource = resource
|
9
11
|
end
|
10
12
|
|
11
13
|
def classes
|
12
|
-
base_classes = "py-4 rounded-xl"
|
14
|
+
base_classes = "py-4 rounded-xl max-w-full"
|
13
15
|
|
14
16
|
view_type_classes = if @field.view_type == :list
|
15
17
|
"flex flex-col space-y-2"
|
@@ -20,6 +22,10 @@ class Avo::Fields::Common::Files::ListViewerComponent < ViewComponent::Base
|
|
20
22
|
"#{base_classes} #{view_type_classes}"
|
21
23
|
end
|
22
24
|
|
25
|
+
def wrapper_classes
|
26
|
+
field.stacked ? "-mt-9" : ""
|
27
|
+
end
|
28
|
+
|
23
29
|
def available_view_types
|
24
30
|
[:list, :grid]
|
25
31
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<div class="relative min-h-full max-w-full flex-1 flex">
|
2
2
|
<% if file.present? %>
|
3
|
-
<div class="
|
4
|
-
<div class="flex-1 flex flex-row
|
3
|
+
<div class="grid grid-cols-6 gap-2 items-center max-w-full w-full">
|
4
|
+
<div class="col-span-4 flex-1 flex flex-row items-center text-gray-700 overflow-x-auto mac-styled-scrollbar ">
|
5
5
|
<div class="rounded-full bg-slate-100 border border-gray-500 p-1.5 flex items-center justify-center">
|
6
6
|
<%= helpers.svg icon_for_file, class: "h-5 text-gray-600" %>
|
7
7
|
</div>
|
8
|
-
<p class="
|
8
|
+
<p class="items-center h-full p-2 flex-shrink-0">
|
9
9
|
<%= file.filename %>
|
10
10
|
</p>
|
11
11
|
</div>
|
12
|
-
<div class="
|
12
|
+
<div class="text-gray-700 flex-shrink-0 text-sm">
|
13
13
|
<%= helpers.number_to_human_size(file.byte_size) %>
|
14
14
|
</div>
|
15
15
|
<div class="flex space-x-2 justify-end col-span-1 flex-shrink-0">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= field_wrapper **field_wrapper_args,
|
1
|
+
<%= field_wrapper **field_wrapper_args, full_width: true do %>
|
2
2
|
<%= render Avo::Fields::Common::Files::ListViewerComponent.new(field: @field, resource: @resource) if @field.value.present? %>
|
3
3
|
|
4
4
|
<% if can_upload_file? %>
|
data/lib/avo/version.rb
CHANGED
@@ -6386,10 +6386,6 @@ trix-toolbar .trix-button-group:not(:first-child){
|
|
6386
6386
|
grid-column:1 / -1
|
6387
6387
|
}
|
6388
6388
|
|
6389
|
-
.col-span-7{
|
6390
|
-
grid-column:span 7 / span 7
|
6391
|
-
}
|
6392
|
-
|
6393
6389
|
.col-span-4{
|
6394
6390
|
grid-column:span 4 / span 4
|
6395
6391
|
}
|
@@ -6930,6 +6926,10 @@ trix-toolbar .trix-button-group:not(:first-child){
|
|
6930
6926
|
grid-template-columns:repeat(1, minmax(0, 1fr))
|
6931
6927
|
}
|
6932
6928
|
|
6929
|
+
.grid-cols-6{
|
6930
|
+
grid-template-columns:repeat(6, minmax(0, 1fr))
|
6931
|
+
}
|
6932
|
+
|
6933
6933
|
.flex-row{
|
6934
6934
|
flex-direction:row
|
6935
6935
|
}
|
@@ -7113,10 +7113,6 @@ trix-toolbar .trix-button-group:not(:first-child){
|
|
7113
7113
|
overflow-x:auto
|
7114
7114
|
}
|
7115
7115
|
|
7116
|
-
.overflow-x-scroll{
|
7117
|
-
overflow-x:scroll
|
7118
|
-
}
|
7119
|
-
|
7120
7116
|
.truncate{
|
7121
7117
|
overflow:hidden;
|
7122
7118
|
text-overflow:ellipsis;
|
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.30.1.
|
4
|
+
version: 2.30.1.pre2.pr1683
|
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: 2023-04-
|
12
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|