refine-rails 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -6
- data/app/assets/javascripts/refine-stimulus.esm.js +1 -1
- data/app/assets/javascripts/refine-stimulus.esm.js.map +1 -1
- data/app/assets/javascripts/refine-stimulus.js +1 -1
- data/app/assets/javascripts/refine-stimulus.js.map +1 -1
- data/app/assets/javascripts/refine-stimulus.modern.js +1 -1
- data/app/assets/javascripts/refine-stimulus.modern.js.map +1 -1
- data/app/assets/javascripts/refine-stimulus.umd.js +1 -1
- data/app/assets/javascripts/refine-stimulus.umd.js.map +1 -1
- data/app/assets/stylesheets/index.css +11 -14
- data/app/assets/stylesheets/index.tailwind.css +11 -14
- data/app/javascript/controllers/index.js +3 -3
- data/app/javascript/controllers/refine/criterion-form-controller.js +13 -12
- data/app/javascript/controllers/refine/typeahead-list-controller.js +33 -0
- data/app/models/refine/conditions/date_condition.rb +1 -1
- data/app/models/refine/filter/internationalized.rb +28 -0
- data/app/models/refine/filter.rb +10 -1
- data/app/views/refine/inline/criteria/_form_fields.html.erb +1 -1
- data/app/views/refine/inline/criteria/edit.turbo_stream.erb +11 -11
- data/app/views/refine/inline/criteria/index.html.erb +6 -5
- data/app/views/refine/inline/criteria/new.turbo_stream.erb +10 -11
- data/app/views/refine/inline/inputs/_option_condition.html.erb +21 -10
- data/lib/refine/rails/version.rb +1 -1
- metadata +5 -3
@@ -1,19 +1,18 @@
|
|
1
1
|
<% form_id = dom_id(@criterion, :form) %>
|
2
2
|
|
3
3
|
<%= turbo_stream.update dom_id(@criterion) do %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
%>
|
4
|
+
<%= tag.div class: "refine--criterion-fields",
|
5
|
+
data: {
|
6
|
+
controller: "refine--criterion-form",
|
7
|
+
refine__criterion_form_url_value: new_refine_inline_criterion_url(
|
8
|
+
@criterion.to_params),
|
9
|
+
refine__criterion_form_form_id_value: form_id
|
10
|
+
} do
|
11
|
+
%>
|
12
|
+
<%= fields model: @criterion do |form| %>
|
14
13
|
<%= render "form_fields", form: form, conjunction: @conjunction, position: @position, form_id: form_id %>
|
15
14
|
<% end %>
|
16
|
-
|
15
|
+
<% end %>
|
17
16
|
<% end %>
|
18
17
|
|
19
18
|
<%# The actual form tag is appended to the end of the body html. Inputs are attached using the `form` attribute. This allows the query builder to be placed inside an outer form on the page. %>
|
@@ -1,13 +1,24 @@
|
|
1
|
-
<div class="refine-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
<div class="refine--option-condition-container" data-controller="refine--typeahead-list">
|
2
|
+
<div class="refine--search-box">
|
3
|
+
<span class="material-icons refine--icon-search">search</span>
|
4
|
+
<input class="refine--search-trigger" data-search-target="filterProperties" placeholder="<%= t('.type_to_search') %>..." type="text" data-action="refine--typeahead-list#filter" autofocus>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<% criterion.options.each do |option| %>
|
8
|
+
<%= tag.label class: "refine--option-label",
|
9
|
+
data: {
|
10
|
+
refine__typeahead_list_target: "listItem",
|
11
|
+
list_item_value: option.display
|
12
|
+
} do
|
13
|
+
%>
|
14
|
+
<% if criterion.multiple? %>
|
15
|
+
<%= check_box_tag input_fields.field_name("selected", multiple: true), option.id, criterion.input.selected.to_a.include?(option.id), class: "refine--option-input", form: form_id %>
|
16
|
+
<% else %>
|
17
|
+
<%= radio_button_tag input_fields.field_name("selected"), option.id, (criterion.input.selected == [option.id]), class: "refine--option-input", form: form_id %>
|
18
|
+
<% end %>
|
19
|
+
<span class="refine--option-text"><%= option.display.truncate(64) %></span>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
11
22
|
<% if criterion.condition.meta[:postfix] %>
|
12
23
|
<span class="refine-option--condition-postfix"><%= meta[:postfix] %></span>
|
13
24
|
<% end %>
|
data/lib/refine/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refine-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colleen Schnettler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- app/javascript/controllers/refine/toggle-controller.js
|
71
71
|
- app/javascript/controllers/refine/turbo-stream-form-controller.js
|
72
72
|
- app/javascript/controllers/refine/turbo-stream-link-controller.js
|
73
|
+
- app/javascript/controllers/refine/typeahead-list-controller.js
|
73
74
|
- app/javascript/controllers/refine/update-controller.js
|
74
75
|
- app/javascript/index.js
|
75
76
|
- app/javascript/refine/helpers/index.js
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- app/models/refine/conditions/text_condition.rb
|
96
97
|
- app/models/refine/conditions/uses_attributes.rb
|
97
98
|
- app/models/refine/filter.rb
|
99
|
+
- app/models/refine/filter/internationalized.rb
|
98
100
|
- app/models/refine/filters/blueprint_editor.rb
|
99
101
|
- app/models/refine/filters/builder.rb
|
100
102
|
- app/models/refine/filters/criterion.rb
|
@@ -195,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
197
|
- !ruby/object:Gem::Version
|
196
198
|
version: '0'
|
197
199
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
200
|
+
rubygems_version: 3.1.6
|
199
201
|
signing_key:
|
200
202
|
specification_version: 4
|
201
203
|
summary: Visual query builder for Rails
|