refine-rails 2.9.2 → 2.9.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7291e0c87324f5ea5f6d9116e74b4996e873738a1a6f0cb192b5b4f3d6428482
4
- data.tar.gz: 10d80a905ddc6ce6d3d0f9e3b1f6c0439bda1e93e0092866b36d184247ec4a6c
3
+ metadata.gz: 0c511b1d652c0c97df24249a54ff96afcf0857129194e6babd19207cf6418dec
4
+ data.tar.gz: 3ffebe81b88605d56aec0bcea24b79b1b3c181228bec5d06bea8c33a16a445c7
5
5
  SHA512:
6
- metadata.gz: bd7d4016067808b0d9d32c3d7a564be9c3c35c15b39d1461a7ab01fef04ff44ed9dd65d03162209b339406103620a9b69f591e7d6be7a46d686b69dce74dd283
7
- data.tar.gz: 660cd1e5bc02473e92d11d8155ea78591d572a288986c09be87ec355719e59476f6e7085eec63e8450817dbc67c680a97b5c9ba1b353c6cd6054404897e460c9
6
+ metadata.gz: 53db67c1486011495f1efbe6cccd3a8508697d23eea902c738277a5b55f3cc1ef460bf54960bff7dc40b6db7d75daa4b6a895430c81a6034daf80a1bfd13393b
7
+ data.tar.gz: 7dc1a7a8d51967bdb15f33b074a4564690b80be1902ab35bd67526dc9fbf2f492f34db3d6513987f9a620eeb16cf839ea4931f052e299ca8bf3a048ef39dc638
data/README.md CHANGED
@@ -42,41 +42,6 @@ This is a helper method you can inspect in `Hammerstone::FilterApplicationContro
42
42
  @pagy, @contacts = pagy(@refine_filter.get_query)
43
43
  ```
44
44
 
45
- # TODO: Everything below this header was not covered in the installation guide. Not sure if it is deprecated
46
-
47
- 12. Add the `reveal` controller to your application if using the `filter_builder_dropdown` partial
48
-
49
- `yarn add stimulus-reveal`
50
-
51
- ```javascript
52
- //index.js
53
- import RevealController from 'stimulus-reveal'
54
-
55
- application.register('reveal', RevealController)
56
- ```
57
-
58
- ~13. If the gems tailwind styles are being purged with JIT you can add the gem to `tmp/gems` and add this to your tailwing config.~
59
-
60
- ``` tailwind.config.js
61
- './tmp/gems/*/app/views/**/*.html.erb',
62
- './tmp/gems/*/app/helpers/**/*.rb',
63
- './tmp/gems/*/app/assets/stylesheets/**/*.css',
64
- './tmp/gems/*/app/javascript/**/*.js',
65
- ```
66
-
67
- ~Run the following rake task:~
68
- ```
69
- task :add_temp_gems do
70
- target = `bundle show refine-rails`.chomp
71
- if target.present?
72
- puts "Linking refine-rails to '#{target}'."
73
- `ln -s #{target} tmp/gems/refine-rails`
74
- end
75
- end
76
- ```
77
-
78
- Don't forget to restart the server!
79
-
80
45
  14. Add external styles - currently themify icons (can be overriden - the trash can icon is located in `_criterion.html.erb`) and `daterangepicker`
81
46
  A quick way to load them is in the `head` section. Also available as an npm package.
82
47
 
@@ -374,25 +339,11 @@ import { controllerDefinitions as refineControllers } from "@hammerstone/refine-
374
339
  application.load(refineControllers)
375
340
  ```
376
341
 
377
- ## Readme Installation Goals (what we're working towards - does not work yet)
378
-
379
- 1. Run the generator
380
- `rails generate refine:install`
381
-
382
- 2. Define your filters, subclassing from `Hammerstone::Refine::Filter`
383
-
384
- 3. Call `apply_filter` in your controller (or even better, instantiate the filter in your controller `@contacts = ContactFilter.new(blueprint, initial_query` -> might not be possible, how can we do this with validations?)
385
-
386
- 4. If you want to customize the views you can override our stylesheet with you own.
387
- If you need even more customization you can override the views with `rails generate refine:views` will extract the views
388
-
389
- 5. Add custom datepicker if desired and scope stored filters.
390
-
391
342
  ## Releasing New Versions
392
343
 
393
344
  - Every release should update the gem and NPM package so version numbers stay in sync.
394
345
  - Make sure to update the CHANGELOG with a note explaining what the new version does
395
- - Make sure you have the [bump](https://rubygems.org/gems/bump) and [gemfury](https://rubygems.org/gems/gemfury) gems installed locally
346
+ - Make sure you have the [bump](https://rubygems.org/gems/bump) gems installed locally
396
347
 
397
348
  ### Releasing the Ruby Gem
398
349
 
@@ -822,11 +822,13 @@
822
822
  }
823
823
 
824
824
  .refine-criterion-refinement-container {
825
- width: 100%
825
+ width: 100%;
826
+ padding-top: 0.75rem
826
827
  }
827
828
 
828
829
  @media (min-width: 640px) {
829
830
  .refine-criterion-refinement-container {
831
+ margin-right: 0.75rem;
830
832
  width: auto;
831
833
  flex-shrink: 0
832
834
  }
@@ -1424,10 +1426,6 @@
1424
1426
  padding: 0.5rem 0;
1425
1427
  }
1426
1428
 
1427
- .refine--refinement-input-container {
1428
- margin: 0.5rem 0;
1429
- }
1430
-
1431
1429
  /* _date_condition.html.erb */
1432
1430
 
1433
1431
  .refine--date-condition-days-text {
@@ -5,33 +5,38 @@
5
5
  refine__update_criterion_id_value: criterion_id,
6
6
  position: criterion.position}) do %>
7
7
 
8
+ <div class="refine-criterion-line">
8
9
  <!-- Select Condition -->
9
- <div class="refine-criterion-condition-container">
10
- <%= render partial: 'refine/blueprints/condition_select', locals: {
11
- selected_condition_id: criterion.condition_id } %>
12
- </div>
10
+ <div class="refine-criterion-condition-container">
11
+ <%= render partial: 'refine/blueprints/condition_select', locals: {
12
+ selected_condition_id: criterion.condition_id } %>
13
+ </div>
13
14
 
14
- <!-- Select Clause -->
15
- <div class="refine-criterion-clause-container">
16
- <%= render partial: 'refine/blueprints/clause_select', locals: {
17
- meta: criterion.meta, selected_clause: criterion.input[:clause]} %>
18
- </div>
15
+ <!-- Select Clause -->
16
+ <div class="refine-criterion-clause-container">
17
+ <%= render partial: 'refine/blueprints/clause_select', locals: {
18
+ meta: criterion.meta, selected_clause: criterion.input[:clause]} %>
19
+ </div>
19
20
 
20
- <!-- Render correct type of condition -->
21
- <%= render partial: "refine/blueprints/clauses/#{criterion.component}", locals: {
22
- criterion: criterion,
23
- condition: criterion.condition, input: criterion.input, criterion_id: criterion_id, meta: criterion.meta, meta_clause: criterion.selected_clause_meta, input_id: nil } %>
21
+ <!-- Render correct type of condition -->
22
+ <%= render partial: "refine/blueprints/clauses/#{criterion.component}", locals: {
23
+ criterion: criterion,
24
+ condition: criterion.condition, input: criterion.input, criterion_id: criterion_id, meta: criterion.meta, meta_clause: criterion.selected_clause_meta, input_id: nil } %>
25
+ </div>
24
26
 
25
27
  <!-- Refinements -->
26
28
  <% criterion.refinements.each do |refinement|%>
27
29
 
28
- <div class="refine-criterion-refinement-container">
29
- <%= render partial: 'refine/blueprints/clause_select', locals: {
30
- meta: refinement[:meta], input_id: "input, #{refinement[:id]}", selected_clause: criterion.input.dig(refinement[:id].to_sym, :clause) || {} } %>
31
- </div>
30
+ <div class="refine-criterion-refinement-line">
31
+ <i class="fa-thin fa-l"></i>
32
+ <div class="refine-criterion-refinement-container">
33
+ <%= render partial: 'refine/blueprints/clause_select', locals: {
34
+ meta: refinement[:meta], input_id: "input, #{refinement[:id]}", selected_clause: criterion.input.dig(refinement[:id].to_sym, :clause) || {} } %>
35
+ </div>
32
36
 
33
- <%= render partial: "refine/blueprints/clauses/#{refinement[:component].underscore}", locals: {
34
- condition: refinement, input: criterion.input[refinement[:id].to_sym] || {}, criterion_id: criterion_id, meta: refinement[:meta], input_id: "input, #{refinement[:id]}", meta_clause: criterion.meta_for_refinement_clause(refinement), criterion: criterion} %>
37
+ <%= render partial: "refine/blueprints/clauses/#{refinement[:component].underscore}", locals: {
38
+ condition: refinement, input: criterion.input[refinement[:id].to_sym] || {}, criterion_id: criterion_id, meta: refinement[:meta], input_id: "input, #{refinement[:id]}", meta_clause: criterion.meta_for_refinement_clause(refinement), criterion: criterion} %>
39
+ </div>
35
40
  <% end %>
36
41
  <!-- End Refinements -->
37
42
 
@@ -1,5 +1,5 @@
1
1
  module Refine
2
2
  module Rails
3
- VERSION = "2.9.2"
3
+ VERSION = "2.9.3"
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.2
4
+ version: 2.9.3
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-01-26 00:00:00.000000000 Z
12
+ date: 2024-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -178,7 +178,7 @@ files:
178
178
  - lib/tasks/refine/rails_tasks.rake
179
179
  homepage: https://rubygems.org/gems/refine-rails
180
180
  licenses:
181
- - Nonstandard
181
+ - MIT
182
182
  metadata:
183
183
  homepage_uri: https://rubygems.org/gems/refine-rails
184
184
  source_code_uri: https://github.com/clickfunnels2/refine-rails