avo 2.29.1 → 2.30.1.pre1.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 +2 -0
- data/Gemfile.lock +6 -4
- data/app/components/avo/fields/common/files/controls_component.html.erb +29 -0
- data/app/components/avo/fields/common/files/controls_component.rb +19 -0
- data/app/components/avo/fields/common/files/list_viewer_component.html.erb +14 -0
- data/app/components/avo/fields/common/files/list_viewer_component.rb +26 -0
- data/app/components/avo/fields/common/files/view_type/grid_component.html.erb +27 -0
- data/app/components/avo/fields/common/{single_file_viewer_component.rb → files/view_type/grid_component.rb} +7 -12
- data/app/components/avo/fields/common/files/view_type/list_component.html.erb +22 -0
- data/app/components/avo/fields/common/files/view_type/list_component.rb +15 -0
- data/app/components/avo/fields/file_field/edit_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 +2 -2
- data/app/components/avo/fields/files_field/show_component.html.erb +2 -2
- data/app/components/avo/fields/location_field/edit_component.html.erb +22 -0
- data/app/components/avo/fields/location_field/edit_component.rb +4 -0
- data/app/components/avo/fields/location_field/show_component.html.erb +7 -0
- data/app/components/avo/fields/location_field/show_component.rb +4 -0
- data/app/javascript/js/application.js +2 -0
- data/app/views/avo/partials/_view_toggle_button.html.erb +4 -0
- data/config/master.key +1 -0
- data/db/factories.rb +1 -0
- data/lib/avo/fields/base_field.rb +4 -2
- data/lib/avo/fields/file_field.rb +2 -0
- data/lib/avo/fields/files_field.rb +13 -0
- data/lib/avo/fields/id_field.rb +2 -1
- data/lib/avo/fields/location_field.rb +70 -0
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/resource_generator.rb +1 -1
- data/public/avo-assets/avo.base.css +29 -22
- data/public/avo-assets/avo.base.js +681 -185
- data/public/avo-assets/avo.base.js.map +3 -3
- metadata +18 -8
- data/app/components/avo/fields/common/files_list_viewer_component.html.erb +0 -5
- data/app/components/avo/fields/common/files_list_viewer_component.rb +0 -8
- data/app/components/avo/fields/common/single_file_viewer_component.html.erb +0 -55
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.30.1.pre1.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-
|
12
|
+
date: 2023-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -1371,8 +1371,14 @@ files:
|
|
1371
1371
|
- app/components/avo/fields/common/boolean_check_component.rb
|
1372
1372
|
- app/components/avo/fields/common/boolean_group_component.html.erb
|
1373
1373
|
- app/components/avo/fields/common/boolean_group_component.rb
|
1374
|
-
- app/components/avo/fields/common/
|
1375
|
-
- app/components/avo/fields/common/
|
1374
|
+
- app/components/avo/fields/common/files/controls_component.html.erb
|
1375
|
+
- app/components/avo/fields/common/files/controls_component.rb
|
1376
|
+
- app/components/avo/fields/common/files/list_viewer_component.html.erb
|
1377
|
+
- app/components/avo/fields/common/files/list_viewer_component.rb
|
1378
|
+
- app/components/avo/fields/common/files/view_type/grid_component.html.erb
|
1379
|
+
- app/components/avo/fields/common/files/view_type/grid_component.rb
|
1380
|
+
- app/components/avo/fields/common/files/view_type/list_component.html.erb
|
1381
|
+
- app/components/avo/fields/common/files/view_type/list_component.rb
|
1376
1382
|
- app/components/avo/fields/common/gravatar_viewer_component.html.erb
|
1377
1383
|
- app/components/avo/fields/common/gravatar_viewer_component.rb
|
1378
1384
|
- app/components/avo/fields/common/heading_component.html.erb
|
@@ -1381,8 +1387,6 @@ files:
|
|
1381
1387
|
- app/components/avo/fields/common/key_value_component.rb
|
1382
1388
|
- app/components/avo/fields/common/progress_bar_component.html.erb
|
1383
1389
|
- app/components/avo/fields/common/progress_bar_component.rb
|
1384
|
-
- app/components/avo/fields/common/single_file_viewer_component.html.erb
|
1385
|
-
- app/components/avo/fields/common/single_file_viewer_component.rb
|
1386
1390
|
- app/components/avo/fields/common/status_viewer_component.html.erb
|
1387
1391
|
- app/components/avo/fields/common/status_viewer_component.rb
|
1388
1392
|
- app/components/avo/fields/concerns/item_labels.rb
|
@@ -1450,6 +1454,10 @@ files:
|
|
1450
1454
|
- app/components/avo/fields/key_value_field/edit_component.rb
|
1451
1455
|
- app/components/avo/fields/key_value_field/show_component.html.erb
|
1452
1456
|
- app/components/avo/fields/key_value_field/show_component.rb
|
1457
|
+
- app/components/avo/fields/location_field/edit_component.html.erb
|
1458
|
+
- app/components/avo/fields/location_field/edit_component.rb
|
1459
|
+
- app/components/avo/fields/location_field/show_component.html.erb
|
1460
|
+
- app/components/avo/fields/location_field/show_component.rb
|
1453
1461
|
- app/components/avo/fields/markdown_field/edit_component.html.erb
|
1454
1462
|
- app/components/avo/fields/markdown_field/edit_component.rb
|
1455
1463
|
- app/components/avo/fields/markdown_field/show_component.html.erb
|
@@ -1696,6 +1704,7 @@ files:
|
|
1696
1704
|
- config/credentials.yml.enc
|
1697
1705
|
- config/i18n-tasks.yml
|
1698
1706
|
- config/initializers/pagy.rb
|
1707
|
+
- config/master.key
|
1699
1708
|
- config/routes.rb
|
1700
1709
|
- config/spring.rb
|
1701
1710
|
- db/factories.rb
|
@@ -1761,6 +1770,7 @@ files:
|
|
1761
1770
|
- lib/avo/fields/hidden_field.rb
|
1762
1771
|
- lib/avo/fields/id_field.rb
|
1763
1772
|
- lib/avo/fields/key_value_field.rb
|
1773
|
+
- lib/avo/fields/location_field.rb
|
1764
1774
|
- lib/avo/fields/markdown_field.rb
|
1765
1775
|
- lib/avo/fields/number_field.rb
|
1766
1776
|
- lib/avo/fields/password_field.rb
|
@@ -1956,9 +1966,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1956
1966
|
version: 2.6.0
|
1957
1967
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1958
1968
|
requirements:
|
1959
|
-
- - "
|
1969
|
+
- - ">"
|
1960
1970
|
- !ruby/object:Gem::Version
|
1961
|
-
version:
|
1971
|
+
version: 1.3.1
|
1962
1972
|
requirements: []
|
1963
1973
|
rubygems_version: 3.3.3
|
1964
1974
|
signing_key:
|
@@ -1,5 +0,0 @@
|
|
1
|
-
<div class="relative py-3 grid xs:grid-cols-2 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 rounded-xl">
|
2
|
-
<% @field.value.attachments.each do |file| %>
|
3
|
-
<%= render Avo::Fields::Common::SingleFileViewerComponent.new field: @field, resource: @resource, file: file %>
|
4
|
-
<% end %>
|
5
|
-
</div>
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<div class="relative min-h-full max-w-full flex-1 flex flex-col justify-between space-y-3">
|
2
|
-
<% if file.present? %>
|
3
|
-
<div class="flex flex-col justify-between h-full">
|
4
|
-
<% if file.representable? && is_image? %>
|
5
|
-
<div class="max-h-[42rem] h-full flex">
|
6
|
-
<%= image_tag helpers.main_app.url_for(file), class: 'rounded-lg object-cover' %>
|
7
|
-
</div>
|
8
|
-
<% elsif is_audio? %>
|
9
|
-
<%= audio_tag(helpers.main_app.url_for(file), controls: true, preload: false, class: 'w-full') %>
|
10
|
-
<% elsif is_video? %>
|
11
|
-
<%= video_tag(helpers.main_app.url_for(file), controls: true, preload: false, class: 'w-full') %>
|
12
|
-
<% else %>
|
13
|
-
<div class="relative flex flex-col justify-evenly items-center px-2 rounded-lg border bg-white border-gray-500 min-h-24">
|
14
|
-
<div class="flex flex-col justify-center items-center w-full">
|
15
|
-
<%= helpers.svg 'document-text', class: 'h-10 text-gray-600 mb-2' %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<% end %>
|
19
|
-
<span class="text-gray-500 mt-2 text-sm truncate" title="<%= file.filename %>"><%= file.filename %></span>
|
20
|
-
</div>
|
21
|
-
<div class="flex space-x-2">
|
22
|
-
<div class="flex">
|
23
|
-
<% if can_download_file? %>
|
24
|
-
<%= a_link Rails.application.routes.url_helpers.rails_blob_path(file, only_path: true, disposition: :attachment),
|
25
|
-
icon: 'heroicons/outline/download',
|
26
|
-
color: :primary,
|
27
|
-
download: true,
|
28
|
-
class: 'text-center',
|
29
|
-
title: t('avo.download_file'),
|
30
|
-
data: { tippy: :tooltip },
|
31
|
-
compact: true,
|
32
|
-
size: :xs %>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
<div>
|
36
|
-
<% if can_delete_file? %>
|
37
|
-
<%= a_link destroy_path,
|
38
|
-
icon: 'heroicons/outline/trash',
|
39
|
-
color: :red,
|
40
|
-
compact: true,
|
41
|
-
size: :xs,
|
42
|
-
class: 'text-center',
|
43
|
-
title: t('avo.delete_file', item: file.filename),
|
44
|
-
data: {
|
45
|
-
turbo_method: :delete,
|
46
|
-
turbo_confirm: t('avo.are_you_sure'),
|
47
|
-
tippy: :tooltip
|
48
|
-
} %>
|
49
|
-
<% end %>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
<% else %>
|
53
|
-
–
|
54
|
-
<% end %>
|
55
|
-
</div>
|