avo 1.15.0 → 1.16.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 -1
- data/app/packs/js/controllers/text_filter_controller.js +23 -0
- data/app/views/avo/base/_text_filter.html.erb +23 -0
- data/lib/avo/filters/text_filter.rb +9 -0
- data/lib/avo/version.rb +1 -1
- data/public/avo-packs/css/application-2b4685ca.css.map +1 -1
- data/public/avo-packs/css/application-2b4685ca.css.map.br +0 -0
- data/public/avo-packs/css/application-2b4685ca.css.map.gz +0 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js +26 -0
- data/public/avo-packs/js/{application-6dbb940fca2e811fb7d5.js.LICENSE.txt → application-124d087ff9491dbf3511.js.LICENSE.txt} +0 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js.br +0 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js.gz +0 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js.map +1 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js.map.br +0 -0
- data/public/avo-packs/js/application-124d087ff9491dbf3511.js.map.gz +0 -0
- data/public/avo-packs/manifest.json +8 -8
- metadata +11 -8
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js +0 -26
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js.br +0 -0
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js.gz +0 -0
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js.map +0 -1
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js.map.br +0 -0
- data/public/avo-packs/js/application-6dbb940fca2e811fb7d5.js.map.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '058d74773e0381fcecf783cd8bebcb40324f6c2bab9de93c17d0f75b245319ba'
|
4
|
+
data.tar.gz: 8d5eba16f6aa0f07cb7215df8ef4b9e2c75bfc87cbdb64f24b5376d5068834a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3619d803b275d81b9d67f6adcf8d8ad4025325f39f64d2c9f421c556879045e188a484d1596e033f28bede52857793ea4004ff4a32f3e3000c78af446acb8b6f
|
7
|
+
data.tar.gz: ec928e6cb7d34e001c269cefaf60c8172526249420deb4dac14266108d2d847f36bf2bf3ba4d0a53f6f978063dd76e0695eb568827719ba40d5a79319a2543dd
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
import BaseFilterController from './filter_controller'
|
2
|
+
|
3
|
+
export default class extends BaseFilterController {
|
4
|
+
static targets = ['text']
|
5
|
+
|
6
|
+
getFilterValue() {
|
7
|
+
return this.textTarget.value
|
8
|
+
}
|
9
|
+
|
10
|
+
tryToSubmit(e) {
|
11
|
+
if (e.keyCode === 13) {
|
12
|
+
return this.changeFilter()
|
13
|
+
}
|
14
|
+
|
15
|
+
return undefined
|
16
|
+
}
|
17
|
+
|
18
|
+
getFilterClass() {
|
19
|
+
const { filterClass } = this.textTarget.dataset
|
20
|
+
|
21
|
+
return filterClass
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%
|
2
|
+
begin
|
3
|
+
decoded_filters_param = JSON.parse(Base64.decode64(params[:filters]))
|
4
|
+
set_value = decoded_filters_param[filter.class.to_s]
|
5
|
+
rescue => exception
|
6
|
+
set_value = filter.default
|
7
|
+
end
|
8
|
+
%>
|
9
|
+
<div data-controller="text-filter">
|
10
|
+
<%= filter_wrapper name: filter.name do %>
|
11
|
+
<%= text_field_tag filter.id, set_value,
|
12
|
+
class: input_classes('w-full mb-0'),
|
13
|
+
id: "avo_filters_#{filter.id.parameterize.underscore}",
|
14
|
+
'data-filter-class': filter.class.to_s,
|
15
|
+
'data-text-filter-target': 'text',
|
16
|
+
'data-action': 'keypress->text-filter#tryToSubmit'
|
17
|
+
%>
|
18
|
+
<div class="flex justify-end">
|
19
|
+
<%= a_button filter.button_label || "Filter by #{filter.name}", class: 'mt-4', color: 'blue', data: { action: "text-filter#changeFilter" }, size: :sm %>
|
20
|
+
</div>
|
21
|
+
<%= link_to 'url_redirect', request.url, data: { 'text-filter-target': 'urlRedirect', 'turbo-frame': params[:turbo_frame] }, style: 'hidden', class: 'hidden' %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
data/lib/avo/version.rb
CHANGED