refine-rails 2.9.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,18 @@
1
1
  <% form_id = dom_id(@criterion, :form) %>
2
2
 
3
3
  <%= turbo_stream.update dom_id(@criterion) do %>
4
- <div class="refine--criterion-fields">
5
- <%= fields model: @criterion,
6
- class: "refine--criterion-form",
7
- data: {
8
- controller: "refine--criterion-form",
9
- refine__criterion_form_url_value: new_refine_inline_criterion_url(
10
- @criterion.to_params),
11
- refine__criterion_form_turbo_frame_value: dom_id(@criterion),
12
- } do |form|
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
- </div>
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-option--condition-container">
2
- <%= input_fields.collection_select :selected,
3
- criterion.options,
4
- :id,
5
- ->(o) {o.display.truncate(64)},
6
- {},
7
- class: "refine--select refine--option-select",
8
- multiple: criterion.multiple?,
9
- form: form_id
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 %>
@@ -1,5 +1,5 @@
1
1
  module Refine
2
2
  module Rails
3
- VERSION = "2.9.0"
3
+ VERSION = "2.9.1"
4
4
  end
5
5
  end
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.0
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-11-30 00:00:00.000000000 Z
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.3.26
200
+ rubygems_version: 3.1.6
199
201
  signing_key:
200
202
  specification_version: 4
201
203
  summary: Visual query builder for Rails