searchjoy 1.3.1 → 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: c20617ffec8c9f2916412616d83d851daa746f044ece8006556776e98ae97c52
4
- data.tar.gz: 78d0292a022bd11a1c9cdea629e21b743f6a75781d5487f57f8bfb5e00f6e078
3
+ metadata.gz: cae1538f158faa15c1daecc15876684dc82b87804fc5335912a08bee9bdb2957
4
+ data.tar.gz: 3c9974b3449b534d3e69024d45f931408ecf1838e32aad432338dfb8d6de9a66
5
5
  SHA512:
6
- metadata.gz: 3739bad0113aa56c52b695491c5ea4d337fecaa60d577e28cdee16db520fa2186ca4c356267e8f6bae64c779dca244c0bd9567b6bdf19f89a5c18506cf5fd464
7
- data.tar.gz: d2e44ee64aa73296d200f8665577ad07f57fa4b6d4b71f7a09c0b90a265e83a87117f32b78e2ca5495300f892c27409b2242d8be10497e8dc3818015888d68a9
6
+ metadata.gz: 00be5588d518c8bb1ac5591df38d7f5eb020791ef7bf9327740b67862826da209750df018b5ab1292ff0175ce2315ec2a18eeab4d6a0d0c05dabbf073bd0f5a1
7
+ data.tar.gz: 98a77ddaaa09957f77a786dbb2be7a6a89582613856ea09399c32e89a7987f6c2df0d09e771f5f3d9f044341c5af68b3102e4b14b0e9739dbd22cce6ba84ea7f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.3.2 (2024-11-21)
2
+
3
+ - Fixed date range picker for time zones with negative UTC offset
4
+
1
5
  ## 1.3.1 (2024-10-14)
2
6
 
3
7
  - Fixed error when Propshaft is installed but not used
@@ -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
  });
@@ -1,3 +1,3 @@
1
1
  module Searchjoy
2
- VERSION = "1.3.1"
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.1
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-10-15 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.16
103
+ rubygems_version: 3.5.22
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Search analytics made easy