refine-rails 2.9.8 → 2.9.10
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.
- checksums.yaml +4 -4
- data/app/views/refine/inline/criteria/_form_fields.html.erb +5 -14
- data/app/views/refine/inline/criteria/edit.turbo_stream.erb +1 -0
- data/app/views/refine/inline/criteria/index.html.erb +12 -10
- data/app/views/refine/inline/criteria/new.turbo_stream.erb +4 -1
- data/lib/refine/rails/version.rb +1 -1
- metadata +2 -3
- data/app/views/refine/inline/filters/_load_button.html.erb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3852aabcc43de99952aaa6053a9dd9e395c41c53df8c6b63d57607bb8fe764b
|
4
|
+
data.tar.gz: 9bb7fc117742ab678dfc21bb01118293ae86e13ed58678504bf5cc046f7bf377
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6904f56779e8bab97700a3ddc2d5db7b6c549e424ec78cdab26324b37fff26d14e435065ddb30f08f6ef34a8c83e9e8770418716fb16bfc69747f2a0403f6dc0
|
7
|
+
data.tar.gz: b2e1afe3abfbd72ee39677bada39ef642584cb2a4e05d51d15a649a338c1ca83b3162dee6b773f847d67849474319b9bce43ba9dcb348a524bce22b1b0b96666
|
@@ -2,6 +2,7 @@
|
|
2
2
|
condition = @criterion.condition
|
3
3
|
date_refinement_condition = condition.has_date_refinement? && condition.get_date_refinement_condition
|
4
4
|
count_refinement_condition = condition.has_count_refinement? && condition.get_count_refinement_condition
|
5
|
+
condition_clause = @criterion.input.clause || condition.approved_clauses.first.id
|
5
6
|
|
6
7
|
last_clause_select = if count_refinement_condition
|
7
8
|
:count
|
@@ -23,7 +24,7 @@
|
|
23
24
|
|
24
25
|
|
25
26
|
<%# Input Value %>
|
26
|
-
<% unless ['st', 'nst'].include?
|
27
|
+
<% unless ['st', 'nst'].include? condition_clause %>
|
27
28
|
<%= render @criterion.input_partial, criterion: @criterion, form: form, input_fields: input_fields, form_id: form_id %>
|
28
29
|
<% if last_clause_select == :criterion %>
|
29
30
|
<div class="refine--separator"></div>
|
@@ -37,7 +38,7 @@
|
|
37
38
|
@criterion.condition.approved_clauses,
|
38
39
|
:id,
|
39
40
|
:display,
|
40
|
-
{},
|
41
|
+
{selected: condition_clause},
|
41
42
|
class: "refine--select refine--clause-select",
|
42
43
|
data: {action: "change->refine--criterion-form#refresh"},
|
43
44
|
form: form_id
|
@@ -50,7 +51,7 @@
|
|
50
51
|
<%# Date Refinement %>
|
51
52
|
<% if @criterion.condition.has_date_refinement? %>
|
52
53
|
<div class="refine--separator"></div>
|
53
|
-
<label
|
54
|
+
<label><%= date_refinement_condition.display %></label>
|
54
55
|
<%= input_fields.fields :date_refinement_attributes, model: @criterion.input.date_refinement do |date_fields| %>
|
55
56
|
<div class="refine--refinement-input-container">
|
56
57
|
<% unless ['st', 'nst'].include? @criterion.input.date_refinement.clause %>
|
@@ -80,7 +81,7 @@
|
|
80
81
|
|
81
82
|
<%# Count Refinement %>
|
82
83
|
<% if count_refinement_condition %>
|
83
|
-
<label
|
84
|
+
<label><%= @criterion.condition.get_count_refinement_condition.display %></label>
|
84
85
|
<%= input_fields.fields :count_refinement_attributes, model: @criterion.input.count_refinement do |count_fields| %>
|
85
86
|
<div class="refine--criterion-clause-container">
|
86
87
|
<%= count_fields.collection_select :clause,
|
@@ -112,18 +113,8 @@
|
|
112
113
|
<%= form.button t('global.buttons.apply'), class: "refine--apply-button", type: "submit", form: form_id %>
|
113
114
|
<% end %>
|
114
115
|
</div>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
116
|
<% end %>
|
119
|
-
|
120
117
|
<% end %>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
118
|
<% end %>
|
128
119
|
|
129
120
|
<% @error_messages&.each do |msg| %>
|
@@ -17,6 +17,17 @@
|
|
17
17
|
<input class="refine--search-trigger" data-search-target="filterProperties" placeholder="<%= t('.type_to_search') %>..." type="text" data-action="refine--typeahead-list#filter" autofocus>
|
18
18
|
</div>
|
19
19
|
|
20
|
+
<%= render "refine/inline/filters/popup",
|
21
|
+
frame_id: dom_id(@criterion, :load),
|
22
|
+
src: refine_inline_stored_filters_path(@criterion.to_params),
|
23
|
+
frame_class: "refine--stored-filter-list-popup" do
|
24
|
+
%>
|
25
|
+
<%= link_to "#", class: "refine--stored-filters-link", data: {action: "click->refine--popup#show"} do %>
|
26
|
+
<div class="material-icons-outlined refine--list-icon">save</div>
|
27
|
+
<%= t('.saved_filters') %>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
30
|
+
|
20
31
|
<div class="refine--separator-m0"></div>
|
21
32
|
|
22
33
|
<div class="refine--condition-list">
|
@@ -52,14 +63,5 @@
|
|
52
63
|
|
53
64
|
</div>
|
54
65
|
<div class="refine--separator"></div>
|
55
|
-
|
56
|
-
frame_id: dom_id(@criterion, :load),
|
57
|
-
src: refine_inline_stored_filters_path(@criterion.to_params),
|
58
|
-
frame_class: "refine--stored-filter-list-popup" do
|
59
|
-
%>
|
60
|
-
<%= link_to "#", class: "refine--stored-filters-link", data: {action: "click->refine--popup#show"} do %>
|
61
|
-
<div class="material-icons-outlined refine--list-icon">save</div>
|
62
|
-
<%= t('.saved_filters') %>
|
63
|
-
<% end %>
|
64
|
-
<% end %>
|
66
|
+
|
65
67
|
<% end %>
|
@@ -18,6 +18,9 @@
|
|
18
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. %>
|
19
19
|
<%= turbo_stream.append_all "body" do %>
|
20
20
|
<%= form_with url: refine_inline_criteria_path,
|
21
|
-
method: :post,
|
21
|
+
method: :post,
|
22
|
+
id: form_id,
|
23
|
+
html: { autocomplete: "off" },
|
24
|
+
data: {controller: "refine--turbo-stream-form", action: "submit->refine--turbo-stream-form#submit"} %>
|
22
25
|
<% end %>
|
23
26
|
|
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.10
|
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: 2024-03-
|
12
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -145,7 +145,6 @@ files:
|
|
145
145
|
- app/views/refine/inline/filters/_and_button.html.erb
|
146
146
|
- app/views/refine/inline/filters/_criterion.html.erb
|
147
147
|
- app/views/refine/inline/filters/_group.html.erb
|
148
|
-
- app/views/refine/inline/filters/_load_button.html.erb
|
149
148
|
- app/views/refine/inline/filters/_or_button.html.erb
|
150
149
|
- app/views/refine/inline/filters/_popup.html.erb
|
151
150
|
- app/views/refine/inline/filters/_save_button.html.erb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
criterion = Refine::Inline::Criterion.new(
|
3
|
-
stable_id: @refine_filter.to_stable_id,
|
4
|
-
client_id: @refine_client_id,
|
5
|
-
)
|
6
|
-
%>
|
7
|
-
|
8
|
-
<%= render "refine/inline/filters/popup",
|
9
|
-
frame_id: dom_id(criterion, :load),
|
10
|
-
src: refine_inline_stored_filters_path(criterion.to_params) do
|
11
|
-
%>
|
12
|
-
<button class="refine--inline-btn" type="button" data-action="click->refine--popup#show">
|
13
|
-
<%= t(".load_filter") %>
|
14
|
-
</button>
|
15
|
-
<% end %>
|