searchjoy 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57f6279802863f6f7c864a8aab34a758607dee4fab88674d54ac0453d1dcd666
4
- data.tar.gz: f7294740266f88e864b5e15311448e212a7886022a461b6f0fec5499b6d0325d
3
+ metadata.gz: cae1538f158faa15c1daecc15876684dc82b87804fc5335912a08bee9bdb2957
4
+ data.tar.gz: 3c9974b3449b534d3e69024d45f931408ecf1838e32aad432338dfb8d6de9a66
5
5
  SHA512:
6
- metadata.gz: 110342d38c82b809447b33b7a104a9ef1c5c2b7e466df526fb8c0422279d2ff688f09d528f1de753b408b9b26a1c5aa79654c5f0c4af692ce81d1e1ee3551913
7
- data.tar.gz: 9f57e5cece3ef7843a6c36028618ffbe5072dc2a0328691712b52606ff59f3e3b959f88bd1c6f12c65a23deec59d23f29b76559847d4e5f81f147dea5d458597
6
+ metadata.gz: 00be5588d518c8bb1ac5591df38d7f5eb020791ef7bf9327740b67862826da209750df018b5ab1292ff0175ce2315ec2a18eeab4d6a0d0c05dabbf073bd0f5a1
7
+ data.tar.gz: 98a77ddaaa09957f77a786dbb2be7a6a89582613856ea09399c32e89a7987f6c2df0d09e771f5f3d9f044341c5af68b3102e4b14b0e9739dbd22cce6ba84ea7f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.3.2 (2024-11-21)
2
+
3
+ - Fixed date range picker for time zones with negative UTC offset
4
+
5
+ ## 1.3.1 (2024-10-14)
6
+
7
+ - Fixed error when Propshaft is installed but not used
8
+
1
9
  ## 1.3.0 (2024-07-10)
2
10
 
3
11
  - Improved CSP support
@@ -307,7 +307,7 @@ div.litepicker {
307
307
  }
308
308
 
309
309
  .conversion-col {
310
- width: 30%;
310
+ width: 35%;
311
311
  color: #5cb85c;
312
312
  }
313
313
 
@@ -6,7 +6,7 @@
6
6
  <meta charset="utf-8" />
7
7
  <%= csp_meta_tag %>
8
8
 
9
- <% if defined?(Propshaft::Railtie) %>
9
+ <% if defined?(Propshaft::Railtie) && Rails.application.assets.is_a?(Propshaft::Assembly) %>
10
10
  <%= stylesheet_link_tag "searchjoy/application", "searchjoy/litepicker" %>
11
11
  <%= javascript_include_tag "chartkick", "Chart.bundle", "searchjoy/application", "searchjoy/litepicker", nonce: true %>
12
12
  <% else %>
@@ -35,6 +35,9 @@
35
35
  </span>
36
36
  <span class="text-muted"><%= @time_zone.name.sub(" (US & Canada)", "") %></span>
37
37
  <%= javascript_tag nonce: true do %>
38
+ function toDate(d) {
39
+ return (new Date(d - (d.getTimezoneOffset() * 60000))).toISOString().slice(0, 10);
40
+ }
38
41
  var startDate = <%= raw json_escape(@time_range.first.to_json) %>;
39
42
  var endDate = <%= raw json_escape(@time_range.last.to_json) %>;
40
43
  new Litepicker({
@@ -52,8 +55,8 @@
52
55
  var currentParams = new URLSearchParams(window.location.search);
53
56
  var params = new URLSearchParams();
54
57
  params.set('search_type', currentParams.get('search_type'));
55
- params.set('start_date', date1.toISOString().slice(0, 10));
56
- params.set('end_date', date2.toISOString().slice(0, 10));
58
+ params.set('start_date', toDate(date1));
59
+ params.set('end_date', toDate(date2));
57
60
  window.location.href = window.location.pathname + "?" + params.toString();
58
61
  }
59
62
  });
@@ -3,8 +3,8 @@ module Searchjoy
3
3
  isolate_namespace Searchjoy
4
4
 
5
5
  initializer "searchjoy" do |app|
6
- if app.config.respond_to?(:assets)
7
- if defined?(Sprockets) && Sprockets::VERSION.to_i >= 4
6
+ if app.config.respond_to?(:assets) && defined?(Sprockets)
7
+ if Sprockets::VERSION.to_i >= 4
8
8
  app.config.assets.precompile << "searchjoy/application.js"
9
9
  app.config.assets.precompile << "searchjoy/application.css"
10
10
  else
@@ -1,3 +1,3 @@
1
1
  module Searchjoy
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchjoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.5.11
103
+ rubygems_version: 3.5.22
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Search analytics made easy