isomorfeus-react 16.12.17 → 16.12.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/config.rb +1 -0
- data/lib/isomorfeus/react_view_helper.rb +4 -0
- data/lib/isomorfeus/top_level.rb +2 -0
- data/lib/react/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cdb3fe9f9ac0989e122cd62cebb2eb9c9d906e65b160d6ec89311410673c796
|
4
|
+
data.tar.gz: 4fe01c1d3bba31402af4fc1e3d12a208735178f66f42c54beb9a49d4e725f75d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f4d13ca4f1d3ca81f3563a57e72ff7ef338606e2abcdfd41518cd8e85e4a1a5fe952904d6382a9100c1db7d882e0387effa6568b71b2d8375ac6d1a0cd173ad
|
7
|
+
data.tar.gz: d7887ef8e4ab8f5b0a91de7feeebd0bfcb6bfa613b2a2cfc389c39a4a020d91c373bd95e5311f6431f3d3813767f71f95eff8e849ac8afd92625bae40d95f87c
|
data/lib/isomorfeus/config.rb
CHANGED
@@ -66,6 +66,7 @@ module Isomorfeus
|
|
66
66
|
global.Opal.React.active_redux_components = [];
|
67
67
|
global.FirstPassFinished = false;
|
68
68
|
global.Exception = false;
|
69
|
+
global.IsomorfeusSessionId = '#{Thread.current[:isomorfeus_session_id]}';
|
69
70
|
global.Opal.Isomorfeus['$env=']('#{Isomorfeus.env}');
|
70
71
|
if (typeof global.Opal.Isomorfeus.$negotiated_locale === 'function') {
|
71
72
|
global.Opal.Isomorfeus["$negotiated_locale="]('#{props[:locale]}');
|
@@ -188,6 +189,9 @@ module Isomorfeus
|
|
188
189
|
|
189
190
|
# build result
|
190
191
|
render_result << " data-iso-hydrated='true'" if rendered_tree
|
192
|
+
if Isomorfeus.respond_to?(:current_user) && Isomorfeus.current_user && !Isomorfeus.current_user.anonymous?
|
193
|
+
render_result << " data-iso-usid=#{Oj.dump(Isomorfeus.current_user.to_sid, mode: :strict)}"
|
194
|
+
end
|
191
195
|
render_result << " data-iso-nloc='#{props[:locale]}'>"
|
192
196
|
render_result << (rendered_tree ? rendered_tree : "SSR didn't work")
|
193
197
|
else
|
data/lib/isomorfeus/top_level.rb
CHANGED
@@ -8,6 +8,8 @@ module Isomorfeus
|
|
8
8
|
Isomorfeus.raise_error(message: "Isomorfeus root element not found!") unless root_element
|
9
9
|
component_name = root_element.JS.getAttribute('data-iso-root')
|
10
10
|
Isomorfeus.env = root_element.JS.getAttribute('data-iso-env')
|
11
|
+
user_sid = root_element.JS.getAttribute('data-iso-usid')
|
12
|
+
Isomorfeus.current_user_sid =`JSON.parse(user_sid)` if user_sid
|
11
13
|
component = nil
|
12
14
|
begin
|
13
15
|
component = component_name.constantize
|
data/lib/react/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.12.
|
4
|
+
version: 16.12.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -277,7 +277,7 @@ metadata:
|
|
277
277
|
github_repo: ssh://github.com/isomorfeus/gems
|
278
278
|
post_install_message: |2+
|
279
279
|
|
280
|
-
isomorfeus-react 16.12.
|
280
|
+
isomorfeus-react 16.12.18:
|
281
281
|
Breaking change:
|
282
282
|
The event_handler DSL is gone. Instead use normal methods and method_ref, see:
|
283
283
|
https://github.com/isomorfeus/isomorfeus-react/blob/master/ruby/docs/events.md
|