avo 2.13.2.pre.2 → 2.13.3.pre.3
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 +5 -3
- data/app/assets/stylesheets/avo.css +1 -1
- data/app/assets/stylesheets/css/fields/progress.css +3 -3
- data/app/assets/stylesheets/css/pagination.css +4 -0
- data/app/assets/stylesheets/css/search.css +1 -1
- data/app/assets/stylesheets/css/sidebar.css +1 -1
- data/app/assets/stylesheets/css/tags.css +0 -7
- data/app/assets/svgs/arrow-circle-right.svg +1 -1
- data/app/assets/svgs/arrow-down.svg +1 -1
- data/app/assets/svgs/arrow-up.svg +1 -1
- data/app/assets/svgs/bell.svg +1 -1
- data/app/assets/svgs/chevron-right.svg +1 -1
- data/app/assets/svgs/exclamation.svg +1 -1
- data/app/assets/svgs/failed_to_load.svg +5 -4
- data/app/assets/svgs/grid-empty-state.svg +11 -10
- data/app/assets/svgs/information-circle.svg +1 -1
- data/app/assets/svgs/logout.svg +1 -1
- data/app/assets/svgs/menu.svg +1 -1
- data/app/assets/svgs/play.svg +1 -1
- data/app/assets/svgs/switch-vertical.svg +1 -1
- data/app/assets/svgs/table-empty-state.svg +12 -11
- data/app/assets/svgs/user-circle.svg +1 -1
- data/app/assets/svgs/x.svg +1 -1
- data/app/components/avo/actions_component.html.erb +2 -2
- data/app/components/avo/actions_component.rb +1 -1
- data/app/components/avo/button_component.html.erb +1 -0
- data/app/components/avo/button_component.rb +3 -3
- data/app/components/avo/card_component.html.erb +12 -11
- data/app/components/avo/common_field_wrapper_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.rb +1 -1
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/code_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/country_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/date_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/external_image_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/file_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/files_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/has_one_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/markdown_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/markdown_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/number_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/password_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +1 -1
- 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 +1 -1
- data/app/components/avo/fields/status_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/edit_component.html.erb +3 -3
- data/app/components/avo/fields/tags_field/show_component.rb +0 -2
- data/app/components/avo/fields/text_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/textarea_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -1
- data/app/components/avo/profile_item_component.html.erb +1 -1
- data/app/components/avo/resource_component.rb +23 -0
- data/app/components/avo/tab_group_component.html.erb +1 -1
- data/app/components/avo/tab_switcher_component.rb +2 -2
- data/app/components/avo/views/resource_edit_component.html.erb +3 -1
- data/app/components/avo/views/resource_edit_component.rb +1 -1
- data/app/components/avo/views/resource_index_component.html.erb +2 -2
- data/app/components/avo/views/resource_index_component.rb +17 -23
- data/app/components/avo/views/resource_show_component.html.erb +7 -4
- data/app/components/avo/views/resource_show_component.rb +8 -0
- data/app/controllers/avo/base_controller.rb +87 -33
- data/app/controllers/avo/search_controller.rb +57 -20
- data/app/helpers/avo/actions_helper.rb +4 -0
- data/app/helpers/avo/application_helper.rb +36 -44
- data/app/helpers/avo/attachments_helper.rb +4 -0
- data/app/helpers/avo/resources_helper.rb +2 -2
- data/app/javascript/avo.js +1 -0
- data/app/javascript/js/controllers/fields/trix_field_controller.js +3 -4
- data/app/javascript/js/controllers/item_selector_controller.js +1 -1
- data/app/javascript/js/controllers/menu_controller.js +2 -2
- data/app/javascript/js/controllers/search_controller.js +42 -15
- data/app/views/avo/associations/new.html.erb +3 -2
- data/app/views/avo/base/_multiple_select_filter.html.erb +1 -1
- data/app/views/avo/base/_text_filter.html.erb +1 -1
- data/app/views/avo/partials/_header.html.erb +1 -1
- data/app/views/avo/partials/_logo.html.erb +2 -2
- data/app/views/avo/partials/_resource_search.html.erb +6 -0
- data/app/views/avo/private/_links_and_buttons.html.erb +1 -1
- data/app/views/avo/private/design.html.erb +3 -3
- data/app/views/kaminari/_first_page.html.erb +3 -0
- data/app/views/kaminari/_last_page.html.erb +3 -0
- data/app/views/kaminari/_next_page.html.erb +9 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_prev_page.html.erb +9 -0
- data/app/views/layouts/avo/application.html.erb +1 -1
- data/avo.gemspec +1 -0
- data/lib/avo/concerns/has_editable_controls.rb +1 -1
- data/lib/avo/configuration.rb +0 -5
- data/lib/avo/dashboards/chartkick_card.rb +1 -1
- data/lib/avo/engine.rb +3 -0
- data/lib/avo/fields/base_field.rb +2 -1
- data/lib/avo/fields/concerns/is_readonly.rb +17 -0
- data/lib/avo/fields/has_base_field.rb +2 -0
- data/lib/avo/hosts/search_scope_host.rb +7 -0
- data/lib/avo/licensing/pro_license.rb +0 -1
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/field/components/edit_component.html.erb.tt +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +1 -15
- data/lib/generators/avo/templates/resource/resource.tt +1 -1
- data/public/avo-assets/avo.css +248 -286
- data/public/avo-assets/avo.js +47 -47
- data/public/avo-assets/avo.js.map +2 -2
- metadata +25 -3
- data/app/views/avo/partials/_branding.html.erb +0 -5
- data/lib/avo/configuration/branding.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e872452c4bd0412af9b42203d98aaa4f4d98c3ac1e64bac3f83829cc74512a1
|
4
|
+
data.tar.gz: b6599c9c3e7115f555757525eec57b4ea8295f72acc5b5c5b5762d49b5b40ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0645c82e51a7771452b702108d9fa022e74a8445d70d44d45bdb9bed5f95112efe86ecfb376e5c7c015c4bcafe87db89ab61bade18abf96ffb070c8c05cdad0c
|
7
|
+
data.tar.gz: 283be87c9d1c2c5977f61b04436ca947353c49845b372d25fd07cefa7adb4ec2d199e3f1f3a180ed438c241eb802f7d77c430df86b289c99b03b77c98da4d3cc
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (2.13.
|
4
|
+
avo (2.13.3.pre.3)
|
5
5
|
active_link_to
|
6
6
|
addressable
|
7
7
|
breadcrumbs_on_rails
|
@@ -12,6 +12,7 @@ PATH
|
|
12
12
|
hotwire-rails
|
13
13
|
httparty
|
14
14
|
image_processing
|
15
|
+
inline_svg
|
15
16
|
meta-tags
|
16
17
|
pagy
|
17
18
|
pundit
|
@@ -208,6 +209,9 @@ GEM
|
|
208
209
|
image_processing (1.12.2)
|
209
210
|
mini_magick (>= 4.9.5, < 5)
|
210
211
|
ruby-vips (>= 2.0.17, < 3)
|
212
|
+
inline_svg (1.8.0)
|
213
|
+
activesupport (>= 3.0)
|
214
|
+
nokogiri (>= 1.6)
|
211
215
|
io-wait (0.2.1)
|
212
216
|
iso (0.4.0)
|
213
217
|
i18n
|
@@ -252,8 +256,6 @@ GEM
|
|
252
256
|
nokogiri (1.13.7)
|
253
257
|
mini_portile2 (~> 2.8.0)
|
254
258
|
racc (~> 1.4)
|
255
|
-
nokogiri (1.13.7-x86_64-linux)
|
256
|
-
racc (~> 1.4)
|
257
259
|
orm_adapter (0.5.0)
|
258
260
|
pagy (5.10.1)
|
259
261
|
activesupport
|
@@ -1,13 +1,13 @@
|
|
1
1
|
progress {
|
2
|
-
@apply h-2 bg-white border border-
|
2
|
+
@apply h-2 bg-white border border-gray-400 rounded shadow-inner;
|
3
3
|
}
|
4
4
|
progress[value]::-webkit-progress-bar {
|
5
5
|
@apply bg-white border border-gray-500 rounded shadow-inner;
|
6
6
|
}
|
7
7
|
progress[value]::-webkit-progress-value{
|
8
|
-
@apply bg-
|
8
|
+
@apply bg-green-600 rounded;
|
9
9
|
|
10
10
|
}
|
11
11
|
progress[value]::-moz-progress-bar {
|
12
|
-
@apply bg-
|
12
|
+
@apply bg-green-600 rounded appearance-none;
|
13
13
|
}
|
@@ -1,12 +1,5 @@
|
|
1
1
|
tags.tagify {
|
2
2
|
--tag-inset-shadow-size: 3em;
|
3
|
-
--tags-border-color: rgb(var(--color-primary-500));
|
4
|
-
--tags-hover-border-color: rgb(var(--color-primary-500));
|
5
|
-
--tags-hover-border-color: rgb(var(--color-primary-500));
|
6
|
-
}
|
7
|
-
|
8
|
-
.tagify__dropdown {
|
9
|
-
--tagify-dd-color-primary: rgb(var(--color-primary-500));
|
10
3
|
}
|
11
4
|
|
12
5
|
tags.tagify {
|
@@ -1 +1 @@
|
|
1
|
-
<svg
|
1
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19 14l-7 7m0 0l-7-7m7 7V3" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M5 10l7-7m0 0l7 7m-7-7v18" />
|
3
3
|
</svg>
|
data/app/assets/svgs/bell.svg
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
3
3
|
</svg>
|
@@ -1 +1 @@
|
|
1
|
-
<svg
|
1
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg>
|
@@ -1,12 +1,13 @@
|
|
1
1
|
<svg width="275" height="275" viewBox="0 0 275 275" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M137.714 274.227C213.377 274.227 274.714 212.89 274.714 137.227C274.714 61.5636 213.377 0.226593 137.714 0.226593C62.0512 0.226593 0.714233 61.5636 0.714233 137.227C0.714233 212.89 62.0512 274.227 137.714 274.227Z" fill="
|
2
|
+
<path d="M137.714 274.227C213.377 274.227 274.714 212.89 274.714 137.227C274.714 61.5636 213.377 0.226593 137.714 0.226593C62.0512 0.226593 0.714233 61.5636 0.714233 137.227C0.714233 212.89 62.0512 274.227 137.714 274.227Z" fill="url(#paint0_linear_663_759)"/>
|
3
3
|
<rect x="55.5142" y="67.8133" width="164.4" height="32.88" fill="white"/>
|
4
4
|
<path d="M219.914 274.227H55.5142V97.0399C63.2629 97.0312 70.6918 93.9492 76.171 88.4701C81.6502 82.9909 84.7322 75.562 84.7409 67.8133H190.688C190.679 71.6518 191.432 75.4538 192.903 78.9994C194.374 82.5449 196.533 85.7636 199.256 88.4692C201.962 91.1929 205.181 93.353 208.727 94.8242C212.273 96.2953 216.075 97.0484 219.914 97.0399V274.227Z" fill="white"/>
|
5
|
-
<path d="M137.714 186.547C161.926 186.547 181.554 166.919 181.554 142.707C181.554 118.494 161.926 98.8666 137.714 98.8666C113.502 98.8666 93.8743 118.494 93.8743 142.707C93.8743 166.919 113.502 186.547 137.714 186.547Z" fill="
|
5
|
+
<path d="M137.714 186.547C161.926 186.547 181.554 166.919 181.554 142.707C181.554 118.494 161.926 98.8666 137.714 98.8666C113.502 98.8666 93.8743 118.494 93.8743 142.707C93.8743 166.919 113.502 186.547 137.714 186.547Z" fill="#4285F4"/>
|
6
6
|
<path d="M153.214 163.373L137.714 147.874L122.214 163.373L117.048 158.207L132.548 142.707L117.048 127.207L122.214 122.041L137.714 137.54L153.214 122.041L158.381 127.207L142.881 142.707L158.381 158.207L153.214 163.373Z" fill="white"/>
|
7
|
-
<path d="M161.461 197.507H113.968C110.941 197.507 108.488 199.96 108.488 202.987C108.488 206.013 110.941 208.467 113.968 208.467H161.461C164.487 208.467 166.941 206.013 166.941 202.987C166.941 199.96 164.487 197.507 161.461 197.507Z" fill="
|
8
|
-
<path d="M177.901 219.427H97.5275C94.501 219.427 92.0475 221.88 92.0475 224.907C92.0475 227.933 94.501 230.387 97.5275 230.387H177.901C180.927 230.387 183.381 227.933 183.381 224.907C183.381 221.88 180.927 219.427 177.901 219.427Z" fill="
|
7
|
+
<path d="M161.461 197.507H113.968C110.941 197.507 108.488 199.96 108.488 202.987C108.488 206.013 110.941 208.467 113.968 208.467H161.461C164.487 208.467 166.941 206.013 166.941 202.987C166.941 199.96 164.487 197.507 161.461 197.507Z" fill="#DFEAFB"/>
|
8
|
+
<path d="M177.901 219.427H97.5275C94.501 219.427 92.0475 221.88 92.0475 224.907C92.0475 227.933 94.501 230.387 97.5275 230.387H177.901C180.927 230.387 183.381 227.933 183.381 224.907C183.381 221.88 180.927 219.427 177.901 219.427Z" fill="#DFEAFB"/>
|
9
9
|
<defs>
|
10
|
+
<linearGradient id="paint0_linear_663_759" x1="137.714" y1="0.226593" x2="137.714" y2="274.227" gradientUnits="userSpaceOnUse">
|
10
11
|
<stop stop-color="#E3ECFA"/>
|
11
12
|
<stop offset="1" stop-color="#DAE7FF"/>
|
12
13
|
</linearGradient>
|
@@ -1,20 +1,21 @@
|
|
1
1
|
<svg width="248" height="287" viewBox="0 0 248 287" fill="none" xmlns="http://www.w3.org/2000/svg" data-target="grid-empty-state-svg">
|
2
|
-
<path d="M124 270.227C192.483 270.227 248 214.71 248 146.227C248 77.7433 192.483 22.2266 124 22.2266C55.5167 22.2266 0 77.7433 0 146.227C0 214.71 55.5167 270.227 124 270.227Z" fill="
|
3
|
-
<g filter="
|
2
|
+
<path d="M124 270.227C192.483 270.227 248 214.71 248 146.227C248 77.7433 192.483 22.2266 124 22.2266C55.5167 22.2266 0 77.7433 0 146.227C0 214.71 55.5167 270.227 124 270.227Z" fill="#DDF0FE"/>
|
3
|
+
<g filter="url(#filter0_d_577_1090)">
|
4
4
|
<path d="M195.093 93.3198H52.9068C48.3412 93.3198 44.6401 97.0209 44.6401 101.586V275.186C44.6401 279.752 48.3412 283.453 52.9068 283.453H195.093C199.659 283.453 203.36 279.752 203.36 275.186V101.586C203.36 97.0209 199.659 93.3198 195.093 93.3198Z" fill="white"/>
|
5
5
|
</g>
|
6
|
-
<path d="M107.467 118.12H64.48C61.7407 118.12 59.52 120.34 59.52 123.08C59.52 125.819 61.7407 128.04 64.48 128.04H107.467C110.206 128.04 112.427 125.819 112.427 123.08C112.427 120.34 110.206 118.12 107.467 118.12Z" fill="
|
7
|
-
<path d="M137.227 139.613H64.48C61.7407 139.613 59.52 141.834 59.52 144.573C59.52 147.312 61.7407 149.533 64.48 149.533H137.227C139.966 149.533 142.187 147.312 142.187 144.573C142.187 141.834 139.966 139.613 137.227 139.613Z" fill="
|
8
|
-
<path d="M107.467 162.76H64.48C61.7407 162.76 59.52 164.981 59.52 167.72C59.52 170.459 61.7407 172.68 64.48 172.68H107.467C110.206 172.68 112.427 170.459 112.427 167.72C112.427 164.981 110.206 162.76 107.467 162.76Z" fill="
|
9
|
-
<path d="M137.227 184.253H64.48C61.7407 184.253 59.52 186.474 59.52 189.213C59.52 191.953 61.7407 194.173 64.48 194.173H137.227C139.966 194.173 142.187 191.953 142.187 189.213C142.187 186.474 139.966 184.253 137.227 184.253Z" fill="
|
10
|
-
<path d="M107.467 207.4H64.48C61.7407 207.4 59.52 209.621 59.52 212.36C59.52 215.099 61.7407 217.32 64.48 217.32H107.467C110.206 217.32 112.427 215.099 112.427 212.36C112.427 209.621 110.206 207.4 107.467 207.4Z" fill="
|
11
|
-
<path d="M137.227 228.893H64.48C61.7407 228.893 59.52 231.114 59.52 233.853C59.52 236.592 61.7407 238.813 64.48 238.813H137.227C139.966 238.813 142.187 236.592 142.187 233.853C142.187 231.114 139.966 228.893 137.227 228.893Z" fill="
|
6
|
+
<path d="M107.467 118.12H64.48C61.7407 118.12 59.52 120.34 59.52 123.08C59.52 125.819 61.7407 128.04 64.48 128.04H107.467C110.206 128.04 112.427 125.819 112.427 123.08C112.427 120.34 110.206 118.12 107.467 118.12Z" fill="#A2D7FC"/>
|
7
|
+
<path d="M137.227 139.613H64.48C61.7407 139.613 59.52 141.834 59.52 144.573C59.52 147.312 61.7407 149.533 64.48 149.533H137.227C139.966 149.533 142.187 147.312 142.187 144.573C142.187 141.834 139.966 139.613 137.227 139.613Z" fill="#DDF0FE"/>
|
8
|
+
<path d="M107.467 162.76H64.48C61.7407 162.76 59.52 164.981 59.52 167.72C59.52 170.459 61.7407 172.68 64.48 172.68H107.467C110.206 172.68 112.427 170.459 112.427 167.72C112.427 164.981 110.206 162.76 107.467 162.76Z" fill="#A2D7FC"/>
|
9
|
+
<path d="M137.227 184.253H64.48C61.7407 184.253 59.52 186.474 59.52 189.213C59.52 191.953 61.7407 194.173 64.48 194.173H137.227C139.966 194.173 142.187 191.953 142.187 189.213C142.187 186.474 139.966 184.253 137.227 184.253Z" fill="#DDF0FE"/>
|
10
|
+
<path d="M107.467 207.4H64.48C61.7407 207.4 59.52 209.621 59.52 212.36C59.52 215.099 61.7407 217.32 64.48 217.32H107.467C110.206 217.32 112.427 215.099 112.427 212.36C112.427 209.621 110.206 207.4 107.467 207.4Z" fill="#A2D7FC"/>
|
11
|
+
<path d="M137.227 228.893H64.48C61.7407 228.893 59.52 231.114 59.52 233.853C59.52 236.592 61.7407 238.813 64.48 238.813H137.227C139.966 238.813 142.187 236.592 142.187 233.853C142.187 231.114 139.966 228.893 137.227 228.893Z" fill="#DDF0FE"/>
|
12
12
|
<g filter="url(#filter1_d_577_1090)">
|
13
|
-
<path d="M195.093 9H52.9068C48.3412 9 44.6401 12.7011 44.6401 17.2667V66.8667C44.6401 71.4322 48.3412 75.1333 52.9068 75.1333H195.093C199.659 75.1333 203.36 71.4322 203.36 66.8667V17.2667C203.36 12.7011 199.659 9 195.093 9Z" fill="
|
13
|
+
<path d="M195.093 9H52.9068C48.3412 9 44.6401 12.7011 44.6401 17.2667V66.8667C44.6401 71.4322 48.3412 75.1333 52.9068 75.1333H195.093C199.659 75.1333 203.36 71.4322 203.36 66.8667V17.2667C203.36 12.7011 199.659 9 195.093 9Z" fill="#0886DE"/>
|
14
14
|
</g>
|
15
|
-
<path d="M107.467 27.1865H64.48C61.7407 27.1865 59.52 29.4072 59.52 32.1465C59.52 34.8859 61.7407 37.1065 64.48 37.1065H107.467C110.206 37.1065 112.427 34.8859 112.427 32.1465C112.427 29.4072 110.206 27.1865 107.467 27.1865Z" fill="
|
15
|
+
<path d="M107.467 27.1865H64.48C61.7407 27.1865 59.52 29.4072 59.52 32.1465C59.52 34.8859 61.7407 37.1065 64.48 37.1065H107.467C110.206 37.1065 112.427 34.8859 112.427 32.1465C112.427 29.4072 110.206 27.1865 107.467 27.1865Z" fill="#A2D7FC"/>
|
16
16
|
<path d="M137.227 48.6799H64.48C61.7407 48.6799 59.52 50.9006 59.52 53.6399C59.52 56.3793 61.7407 58.5999 64.48 58.5999H137.227C139.966 58.5999 142.187 56.3793 142.187 53.6399C142.187 50.9006 139.966 48.6799 137.227 48.6799Z" fill="white"/>
|
17
17
|
<defs>
|
18
|
+
<filter id="filter0_d_577_1090" x="38.6401" y="84.3198" width="170.72" height="202.133" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
18
19
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
19
20
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
20
21
|
<feOffset dy="-3"/>
|
@@ -1 +1 @@
|
|
1
|
-
<svg
|
1
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
data/app/assets/svgs/logout.svg
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
|
3
3
|
</svg>
|
data/app/assets/svgs/menu.svg
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
3
3
|
</svg>
|
data/app/assets/svgs/play.svg
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<svg
|
1
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" />
|
3
3
|
</svg>
|
@@ -1,26 +1,26 @@
|
|
1
1
|
<svg width="348" height="250" viewBox="0 0 348 250" fill="none" xmlns="http://www.w3.org/2000/svg" data-target="table-empty-state-svg">
|
2
|
-
<path d="M284.572 0H70.2863C60.4241 0 52.4292 7.99492 52.4292 17.8571V232.143C52.4292 242.005 60.4241 250 70.2863 250H284.572C294.434 250 302.429 242.005 302.429 232.143V17.8571C302.429 7.99492 294.434 0 284.572 0Z" fill="
|
2
|
+
<path d="M284.572 0H70.2863C60.4241 0 52.4292 7.99492 52.4292 17.8571V232.143C52.4292 242.005 60.4241 250 70.2863 250H284.572C294.434 250 302.429 242.005 302.429 232.143V17.8571C302.429 7.99492 294.434 0 284.572 0Z" fill="url(#paint0_linear_577_1275)"/>
|
3
3
|
<g filter="url(#filter0_d_577_1275)">
|
4
4
|
<path d="M91.7142 96.4287H332.786C335.154 96.4287 337.425 97.3694 339.099 99.0438C340.774 100.718 341.714 102.989 341.714 105.357V150C341.714 152.368 340.774 154.639 339.099 156.314C337.425 157.988 335.154 158.929 332.786 158.929H91.7142C89.3462 158.929 87.0752 157.988 85.4008 156.314C83.7263 154.639 82.7856 152.368 82.7856 150V105.357C82.7856 102.989 83.7263 100.718 85.4008 99.0438C87.0752 97.3694 89.3462 96.4287 91.7142 96.4287V96.4287Z" fill="white"/>
|
5
5
|
</g>
|
6
|
-
<path d="M223.857 110.714H177.429C174.47 110.714 172.072 113.112 172.072 116.071C172.072 119.03 174.47 121.428 177.429 121.428H223.857C226.816 121.428 229.215 119.03 229.215 116.071C229.215 113.112 226.816 110.714 223.857 110.714Z" fill="
|
7
|
-
<path d="M256 133.928H177.429C174.47 133.928 172.072 136.327 172.072 139.285C172.072 142.244 174.47 144.643 177.429 144.643H256C258.959 144.643 261.357 142.244 261.357 139.285C261.357 136.327 258.959 133.928 256 133.928Z" fill="
|
8
|
-
<path d="M137.251 144.642C146.621 144.642 154.216 137.047 154.216 127.678C154.216 118.309 146.621 110.714 137.251 110.714C127.882 110.714 120.287 118.309 120.287 127.678C120.287 137.047 127.882 144.642 137.251 144.642Z" fill="
|
6
|
+
<path d="M223.857 110.714H177.429C174.47 110.714 172.072 113.112 172.072 116.071C172.072 119.03 174.47 121.428 177.429 121.428H223.857C226.816 121.428 229.215 119.03 229.215 116.071C229.215 113.112 226.816 110.714 223.857 110.714Z" fill="#B4DAFF"/>
|
7
|
+
<path d="M256 133.928H177.429C174.47 133.928 172.072 136.327 172.072 139.285C172.072 142.244 174.47 144.643 177.429 144.643H256C258.959 144.643 261.357 142.244 261.357 139.285C261.357 136.327 258.959 133.928 256 133.928Z" fill="#DEE9FC"/>
|
8
|
+
<path d="M137.251 144.642C146.621 144.642 154.216 137.047 154.216 127.678C154.216 118.309 146.621 110.714 137.251 110.714C127.882 110.714 120.287 118.309 120.287 127.678C120.287 137.047 127.882 144.642 137.251 144.642Z" fill="#1485FD"/>
|
9
9
|
<path d="M133.905 133V131.668L137.44 128.202C137.778 127.861 138.059 127.558 138.285 127.293C138.51 127.027 138.679 126.771 138.792 126.522C138.905 126.273 138.961 126.008 138.961 125.727C138.961 125.405 138.888 125.13 138.742 124.901C138.596 124.669 138.396 124.49 138.141 124.364C137.885 124.238 137.595 124.175 137.271 124.175C136.936 124.175 136.643 124.245 136.391 124.384C136.139 124.52 135.943 124.714 135.804 124.966C135.668 125.218 135.6 125.518 135.6 125.866H133.845C133.845 125.219 133.993 124.658 134.288 124.18C134.583 123.703 134.989 123.334 135.506 123.072C136.026 122.81 136.623 122.679 137.295 122.679C137.978 122.679 138.578 122.807 139.095 123.062C139.612 123.317 140.013 123.667 140.298 124.111C140.587 124.555 140.731 125.062 140.731 125.632C140.731 126.013 140.658 126.388 140.512 126.756C140.366 127.124 140.109 127.531 139.741 127.979C139.377 128.426 138.865 128.968 138.205 129.604L136.45 131.389V131.459H140.885V133H133.905Z" fill="white"/>
|
10
10
|
<g filter="url(#filter1_d_577_1275)">
|
11
11
|
<path d="M14.9286 173.214H256C258.368 173.214 260.639 174.155 262.313 175.829C263.988 177.504 264.929 179.775 264.929 182.143V226.786C264.929 229.154 263.988 231.425 262.313 233.099C260.639 234.774 258.368 235.714 256 235.714H14.9286C12.5606 235.714 10.2896 234.774 8.61512 233.099C6.94069 231.425 6 229.154 6 226.786V182.143C6 179.775 6.94069 177.504 8.61512 175.829C10.2896 174.155 12.5606 173.214 14.9286 173.214V173.214Z" fill="white"/>
|
12
12
|
</g>
|
13
|
-
<path d="M147.071 187.5H100.643C97.6841 187.5 95.2856 189.898 95.2856 192.857C95.2856 195.816 97.6841 198.214 100.643 198.214H147.071C150.03 198.214 152.429 195.816 152.429 192.857C152.429 189.898 150.03 187.5 147.071 187.5Z" fill="
|
14
|
-
<path d="M179.214 210.714H100.643C97.6841 210.714 95.2856 213.113 95.2856 216.071C95.2856 219.03 97.6841 221.429 100.643 221.429H179.214C182.173 221.429 184.571 219.03 184.571 216.071C184.571 213.113 182.173 210.714 179.214 210.714Z" fill="
|
15
|
-
<path d="M37.2499 221.428C46.619 221.428 54.2142 213.833 54.2142 204.464C54.2142 195.095 46.619 187.5 37.2499 187.5C27.8808 187.5 20.2856 195.095 20.2856 204.464C20.2856 213.833 27.8808 221.428 37.2499 221.428Z" fill="
|
13
|
+
<path d="M147.071 187.5H100.643C97.6841 187.5 95.2856 189.898 95.2856 192.857C95.2856 195.816 97.6841 198.214 100.643 198.214H147.071C150.03 198.214 152.429 195.816 152.429 192.857C152.429 189.898 150.03 187.5 147.071 187.5Z" fill="#B4DAFF"/>
|
14
|
+
<path d="M179.214 210.714H100.643C97.6841 210.714 95.2856 213.113 95.2856 216.071C95.2856 219.03 97.6841 221.429 100.643 221.429H179.214C182.173 221.429 184.571 219.03 184.571 216.071C184.571 213.113 182.173 210.714 179.214 210.714Z" fill="#DEE9FC"/>
|
15
|
+
<path d="M37.2499 221.428C46.619 221.428 54.2142 213.833 54.2142 204.464C54.2142 195.095 46.619 187.5 37.2499 187.5C27.8808 187.5 20.2856 195.095 20.2856 204.464C20.2856 213.833 27.8808 221.428 37.2499 221.428Z" fill="#1485FD"/>
|
16
16
|
<path d="M36.9077 209.119C36.294 209.119 35.7486 209.014 35.2713 208.804C34.7969 208.594 34.4219 208.301 34.1463 207.926C33.8707 207.551 33.7244 207.118 33.7074 206.626H35.3097C35.3239 206.862 35.402 207.068 35.544 207.244C35.6861 207.418 35.875 207.553 36.1108 207.649C36.3466 207.746 36.6108 207.794 36.9034 207.794C37.2159 207.794 37.4929 207.74 37.7344 207.632C37.9759 207.521 38.1648 207.368 38.3011 207.172C38.4375 206.976 38.5043 206.75 38.5014 206.494C38.5043 206.23 38.4361 205.997 38.2969 205.795C38.1577 205.594 37.956 205.436 37.6918 205.322C37.4304 205.209 37.1151 205.152 36.7457 205.152H35.9744V203.933H36.7457C37.0497 203.933 37.3153 203.881 37.5426 203.776C37.7727 203.67 37.9531 203.523 38.0838 203.332C38.2145 203.139 38.2784 202.916 38.2756 202.663C38.2784 202.416 38.223 202.202 38.1094 202.02C37.9986 201.835 37.8409 201.692 37.6364 201.589C37.4347 201.487 37.1974 201.436 36.9247 201.436C36.6577 201.436 36.4105 201.484 36.1832 201.581C35.956 201.678 35.7727 201.815 35.6335 201.994C35.4943 202.17 35.4205 202.381 35.4119 202.625H33.8906C33.902 202.136 34.0426 201.707 34.3125 201.338C34.5852 200.966 34.9489 200.676 35.4034 200.469C35.858 200.259 36.3679 200.153 36.9332 200.153C37.5156 200.153 38.0213 200.263 38.4503 200.482C38.8821 200.697 39.2159 200.989 39.4517 201.355C39.6875 201.722 39.8054 202.126 39.8054 202.57C39.8082 203.061 39.6634 203.473 39.3707 203.805C39.081 204.138 38.7003 204.355 38.2287 204.457V204.526C38.8423 204.611 39.3125 204.838 39.6392 205.207C39.9688 205.574 40.1321 206.03 40.1293 206.575C40.1293 207.064 39.9901 207.501 39.7116 207.888C39.4361 208.271 39.0554 208.572 38.5696 208.791C38.0866 209.01 37.5327 209.119 36.9077 209.119Z" fill="white"/>
|
17
17
|
<g filter="url(#filter2_d_577_1275)">
|
18
|
-
<path d="M256 19.6428H14.9286C9.99746 19.6428 6 23.6403 6 28.5714V73.2142C6 78.1454 9.99746 82.1428 14.9286 82.1428H256C260.931 82.1428 264.929 78.1454 264.929 73.2142V28.5714C264.929 23.6403 260.931 19.6428 256 19.6428Z"
|
18
|
+
<path d="M256 19.6428H14.9286C9.99746 19.6428 6 23.6403 6 28.5714V73.2142C6 78.1454 9.99746 82.1428 14.9286 82.1428H256C260.931 82.1428 264.929 78.1454 264.929 73.2142V28.5714C264.929 23.6403 260.931 19.6428 256 19.6428Z" fill="#0886DE"/>
|
19
19
|
</g>
|
20
|
-
<path d="M143.5 33.929H97.0715C94.1128 33.929 91.7144 36.3274 91.7144 39.2861C91.7144 42.2448 94.1128 44.6432 97.0715 44.6432H143.5C146.459 44.6432 148.857 42.2448 148.857 39.2861C148.857 36.3274 146.459 33.929 143.5 33.929Z" fill="
|
21
|
-
<path d="M175.643 57.1431H97.0715C94.1128 57.1431 91.7144 59.5415 91.7144 62.5002C91.7144 65.4589 94.1128 67.8574 97.0715 67.8574H175.643C178.602 67.8574 181 65.4589 181 62.5002C181 59.5415 178.602 57.1431 175.643 57.1431Z" fill="
|
20
|
+
<path d="M143.5 33.929H97.0715C94.1128 33.929 91.7144 36.3274 91.7144 39.2861C91.7144 42.2448 94.1128 44.6432 97.0715 44.6432H143.5C146.459 44.6432 148.857 42.2448 148.857 39.2861C148.857 36.3274 146.459 33.929 143.5 33.929Z" fill="#B4DAFF"/>
|
21
|
+
<path d="M175.643 57.1431H97.0715C94.1128 57.1431 91.7144 59.5415 91.7144 62.5002C91.7144 65.4589 94.1128 67.8574 97.0715 67.8574H175.643C178.602 67.8574 181 65.4589 181 62.5002C181 59.5415 178.602 57.1431 175.643 57.1431Z" fill="#DEE9FC"/>
|
22
22
|
<path d="M60.4643 67.857C69.8334 67.857 77.4286 60.2619 77.4286 50.8928C77.4286 41.5236 69.8334 33.9285 60.4643 33.9285C51.0952 33.9285 43.5 41.5236 43.5 50.8928C43.5 60.2619 51.0952 67.857 60.4643 67.857Z" fill="white"/>
|
23
|
-
<path d="M62.1477 45.6746V55.8564H60.3032V47.4694H60.2435L57.8621 48.9907V47.3003L60.3927 45.6746H62.1477Z" fill="
|
23
|
+
<path d="M62.1477 45.6746V55.8564H60.3032V47.4694H60.2435L57.8621 48.9907V47.3003L60.3927 45.6746H62.1477Z" fill="#0886DE"/>
|
24
24
|
<defs>
|
25
25
|
<filter id="filter0_d_577_1275" x="76.7856" y="93.4287" width="270.929" height="74.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
26
26
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
@@ -49,6 +49,7 @@
|
|
49
49
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_577_1275"/>
|
50
50
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_577_1275" result="shape"/>
|
51
51
|
</filter>
|
52
|
+
<linearGradient id="paint0_linear_577_1275" x1="177.429" y1="0" x2="177.429" y2="250" gradientUnits="userSpaceOnUse">
|
52
53
|
<stop stop-color="#E3ECFA"/>
|
53
54
|
<stop offset="1" stop-color="#DAE7FF"/>
|
54
55
|
</linearGradient>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
3
3
|
</svg>
|
data/app/assets/svgs/x.svg
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
2
2
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
3
3
|
</svg>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="relative flex flex-col w-full sm:w-auto z-40 js-actions-dropdown"
|
2
2
|
data-controller="toggle-panel actions-picker"
|
3
|
-
data-actions-picker-enabled-class="text-black hover:bg-
|
3
|
+
data-actions-picker-enabled-class="text-black hover:bg-blue-500 hover:text-white"
|
4
4
|
data-actions-picker-disabled-class="cursor-wait text-gray-500"
|
5
5
|
>
|
6
6
|
<%= a_button style: @style,
|
@@ -27,7 +27,7 @@
|
|
27
27
|
'disabled': is_disabled?(action),
|
28
28
|
},
|
29
29
|
title: action.action_name,
|
30
|
-
class: "flex items-center px-4 py-3 w-full font-semibold text-sm
|
30
|
+
class: "flex items-center px-4 py-3 w-full font-semibold text-sm #{is_disabled?(action) ? 'text-gray-500' : 'text-black hover:bg-blue-500 hover:text-white'}" do %>
|
31
31
|
<%= svg 'play', class: 'h-5 mr-1 inline' %> <%= action.action_name %>
|
32
32
|
<% end %>
|
33
33
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class Avo::ActionsComponent < ViewComponent::Base
|
4
4
|
include Avo::ApplicationHelper
|
5
5
|
|
6
|
-
def initialize(actions: [], resource: nil, view: nil, exclude: [], style: :outline, color: :
|
6
|
+
def initialize(actions: [], resource: nil, view: nil, exclude: [], style: :outline, color: :blue)
|
7
7
|
@actions = actions || []
|
8
8
|
@resource = resource
|
9
9
|
@view = view
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= output %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# A button/link can have the following settings:
|
4
|
-
# style: primary/
|
4
|
+
# style: primary/secondary/ternary
|
5
5
|
# size: :xs :sm, :md, :lg
|
6
6
|
class Avo::ButtonComponent < ViewComponent::Base
|
7
7
|
def initialize(path = nil, size: :md, style: :outline, color: :gray, icon: nil, icon_class: "", is_link: false, rounded: true, compact: false, **args)
|
@@ -73,7 +73,7 @@ class Avo::ButtonComponent < ViewComponent::Base
|
|
73
73
|
result.html_safe
|
74
74
|
end
|
75
75
|
|
76
|
-
def
|
76
|
+
def output
|
77
77
|
if is_link?
|
78
78
|
output_link
|
79
79
|
else
|
@@ -149,7 +149,7 @@ class Avo::ButtonComponent < ViewComponent::Base
|
|
149
149
|
def style_classes
|
150
150
|
case @style
|
151
151
|
when :primary
|
152
|
-
" bg-#{@color}-500 text-white border-#{@color}-500 hover:bg-#{@color}-600 hover:border-#{@color}-600 active:border-#{@color}-
|
152
|
+
" bg-#{@color}-500 text-white border-#{@color}-500 hover:bg-#{@color}-600 hover:border-#{@color}-600 active:border-#{@color}-700 active:outline-#{@color}-700 active:bg-#{@color}-600"
|
153
153
|
when :outline
|
154
154
|
" bg-white text-#{@color}-500 border-#{@color}-500 hover:bg-#{@color}-100 active:bg-#{@color}-100 active:border-#{@color}-500 active:outline-#{@color}-500"
|
155
155
|
when :text
|
@@ -7,9 +7,9 @@
|
|
7
7
|
<% if @card.class.display_header %>
|
8
8
|
<div class="px-4 pt-4">
|
9
9
|
<div class="flex justify-between items-center min-h-6">
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
<div class="text-base font-bold text-gray-700 leading-none">
|
11
|
+
<%= @card.label %>
|
12
|
+
</div>
|
13
13
|
<div data-controller="select">
|
14
14
|
<% if @card.type.in?([:metric, :chartkick, :partial]) && @card.ranges.present? %>
|
15
15
|
<%= select_tag "#{@card.id}_#{@card.index}_range", options_for_select(@card.ranges, @card.range),
|
@@ -33,13 +33,14 @@
|
|
33
33
|
<%= render 'metric_card', card: @card %>
|
34
34
|
</div>
|
35
35
|
<% end %>
|
36
|
-
<% if @card.description %>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
<% if @card.description.present? %>
|
37
|
+
<%= content_tag :div, class: "absolute inset-auto bottom-0 right-0 mb-4 mr-4",
|
38
|
+
title: @card.description,
|
39
|
+
data: {
|
40
|
+
target: 'card-description',
|
41
|
+
tippy: 'tooltip',
|
42
|
+
} do %>
|
43
|
+
<%= helpers.svg 'heroicons/solid/information-circle', class: 'h-4 text-gray-500 cursor-pointer' %>
|
44
|
+
<% end %>
|
44
45
|
<% end %>
|
45
46
|
</div>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% else %>
|
14
14
|
<%= @field.name %>
|
15
15
|
<% end %>
|
16
|
-
<% if @field.is_required? %> <span class="text-red-600 ml-1">*</span> <% end %>
|
16
|
+
<% if @view != :show && @field.is_required? %> <span class="text-red-600 ml-1">*</span> <% end %>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
19
|
<div class="flex-1 flex flex-row md:min-h-inherit py-2 <% unless @displayed_in_modal %> px-6 <% end %>">
|
@@ -8,7 +8,7 @@ class Avo::Fields::BelongsToField::EditComponent < Avo::Fields::EditComponent
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def disabled
|
11
|
-
return true if @field.
|
11
|
+
return true if @field.is_readonly?
|
12
12
|
|
13
13
|
# When visiting the record through it's association we keep the field disabled by default
|
14
14
|
# We make an exception when the user deliberately instructs Avo to allow detaching in this scenario
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<div class="h-8 flex items-center">
|
3
3
|
<%= @form.check_box @field.id,
|
4
4
|
checked: @field.value,
|
5
|
-
class: "text-lg h-4 w-4
|
5
|
+
class: "text-lg h-4 w-4 #{@field.get_html(:classes, view: view, element: :input)}",
|
6
6
|
data: @field.get_html(:data, view: view, element: :input),
|
7
|
-
disabled: @field.
|
7
|
+
disabled: @field.is_readonly?,
|
8
8
|
style: @field.get_html(:style, view: view, element: :input)
|
9
9
|
%>
|
10
10
|
</div>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<%= check_box_tag "#{model_param_key}[#{@field.id}][]", id, checked, {
|
21
21
|
class: "w-4 h-4 #{@field.get_html(:classes, view: view, element: :input)}",
|
22
22
|
data: @field.get_html(:data, view: view, element: :input),
|
23
|
-
disabled: @field.
|
23
|
+
disabled: @field.is_readonly?,
|
24
24
|
id: "#{model_param_key}_#{@field.id}_#{id}",
|
25
25
|
style: @field.get_html(:style, view: view, element: :input)
|
26
26
|
} %> <%= label %>
|
@@ -8,12 +8,12 @@
|
|
8
8
|
language: @field.language,
|
9
9
|
theme: @field.theme,
|
10
10
|
'tab-size': @field.tab_size,
|
11
|
-
'read-only': @field.
|
11
|
+
'read-only': @field.is_readonly?,
|
12
12
|
'indent-with-tabs': @field.indent_with_tabs,
|
13
13
|
'line-wrapping': @field.line_wrapping,
|
14
14
|
**@field.get_html(:data, view: view, element: :input),
|
15
15
|
},
|
16
|
-
disabled: @field.
|
16
|
+
disabled: @field.is_readonly?,
|
17
17
|
placeholder: @field.placeholder,
|
18
18
|
style: @field.get_html(:style, view: view, element: :input)
|
19
19
|
%>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
},
|
9
9
|
class: classes("w-full"),
|
10
10
|
data: @field.get_html(:data, view: view, element: :input),
|
11
|
-
disabled: @field.
|
11
|
+
disabled: @field.is_readonly?,
|
12
12
|
style: @field.get_html(:style, view: view, element: :input),
|
13
13
|
placeholder: @field.include_blank.present? ? nil : @field.placeholder
|
14
14
|
%>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
placeholder: @field.placeholder,
|
17
17
|
**@field.get_html(:data, view: view, element: :input)
|
18
18
|
},
|
19
|
-
disabled: @field.
|
19
|
+
disabled: @field.is_readonly?,
|
20
20
|
placeholder: @field.placeholder,
|
21
21
|
style: @field.get_html(:style, view: view, element: :input)
|
22
22
|
%>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
placeholder: @field.placeholder,
|
29
29
|
**@field.get_html(:data, view: view, element: :input)
|
30
30
|
},
|
31
|
-
disabled: @field.
|
31
|
+
disabled: @field.is_readonly?,
|
32
32
|
placeholder: @field.placeholder,
|
33
33
|
style: @field.get_html(:style, view: view, element: :input)
|
34
34
|
%>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
placeholder: @field.placeholder,
|
18
18
|
**@field.get_html(:data, view: view, element: :input)
|
19
19
|
},
|
20
|
-
disabled: @field.
|
20
|
+
disabled: @field.is_readonly?,
|
21
21
|
placeholder: @field.placeholder,
|
22
22
|
style: @field.get_html(:style, view: view, element: :input)
|
23
23
|
%>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
placeholder: @field.placeholder,
|
30
30
|
**@field.get_html(:data, view: view, element: :input)
|
31
31
|
},
|
32
|
-
disabled: @field.
|
32
|
+
disabled: @field.is_readonly?,
|
33
33
|
placeholder: @field.placeholder,
|
34
34
|
style: @field.get_html(:style, view: view, element: :input)
|
35
35
|
%>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= @form.text_field @field.id,
|
3
3
|
class: classes("w-full"),
|
4
4
|
data: @field.get_html(:data, view: view, element: :input),
|
5
|
-
disabled: @field.
|
5
|
+
disabled: @field.is_readonly?,
|
6
6
|
placeholder: @field.placeholder,
|
7
7
|
style: @field.get_html(:style, view: view, element: :input)
|
8
8
|
%>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
accept: @field.accept,
|
11
11
|
data: @field.get_html(:data, view: view, element: :input),
|
12
12
|
direct_upload: @field.direct_upload,
|
13
|
-
disabled: @field.
|
13
|
+
disabled: @field.is_readonly?,
|
14
14
|
style: @field.get_html(:style, view: view, element: :input)
|
15
15
|
%>
|
16
16
|
<% end %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
accept: @field.accept,
|
8
8
|
data: @field.get_html(:data, view: view, element: :input),
|
9
9
|
direct_upload: @field.direct_upload,
|
10
|
-
disabled: @field.
|
10
|
+
disabled: @field.is_readonly?,
|
11
11
|
multiple: true,
|
12
12
|
style: @field.get_html(:style, view: view, element: :input)
|
13
13
|
%>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% else %>
|
6
6
|
<%= render Avo::PanelComponent.new(name: @field.name) do |c| %>
|
7
7
|
<% c.tools do %>
|
8
|
-
<% if !@field.
|
8
|
+
<% if !@field.is_readonly? && can_attach? %>
|
9
9
|
<%= a_link attach_path, icon: 'heroicons/outline/link', color: :primary, 'data-turbo-frame': 'attach_modal' do %>
|
10
10
|
<%= t('avo.attach_item', item: @field.name.downcase) %>
|
11
11
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= text_area_tag @field.id, @field.value,
|
4
4
|
class: helpers.input_classes('w-full js-has-simple-mde-editor'),
|
5
5
|
placeholder: @field.placeholder,
|
6
|
-
disabled: @field.
|
6
|
+
disabled: @field.is_readonly?,
|
7
7
|
'data-simple-mde-target': 'element',
|
8
8
|
'data-component-options': @field.options.to_json,
|
9
9
|
'data-view': :show %>
|