react_on_rails 14.0.4 → 14.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -2
- data/Gemfile.development_dependencies +2 -0
- data/Gemfile.lock +6 -1
- data/lib/react_on_rails/configuration.rb +7 -3
- data/lib/react_on_rails/helper.rb +8 -0
- data/lib/react_on_rails/react_component/render_options.rb +4 -0
- data/lib/react_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca8ba0235b9256e1b24f5afc2c874f258cf239d78ad6490e86ce4d918b26ecf4
|
4
|
+
data.tar.gz: 54796b7b8067b98180bf0e41eb20c4d6bb0a4ea54594af8365eb95c74158d1b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c081c9e1b626d9c986f212c2c351fd1774fddaa9be301ae05d6c890b41c30f21871acb56002001b2bf64584da3932457ffc9da522463f3d49f7b73dd62852032
|
7
|
+
data.tar.gz: 005f0dc9f274c6ba9edc8784efb679e6ba5bc7610b708c7c072f4301f4fe25d3a4bf887ad2e9449284f2bbce346dfec54f0e7bd54192ab8d3532c7d5b3004267
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,7 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
|
|
18
18
|
### [Unreleased]
|
19
19
|
Changes since the last non-beta release.
|
20
20
|
|
21
|
+
### [14.0.4] - 2024-07-02
|
21
22
|
|
22
23
|
#### Improved
|
23
24
|
- Improved dependency management by integrating package_json. [PR 1639](https://github.com/shakacode/react_on_rails/pull/1639) by [vaukalak](https://github.com/vaukalak).
|
@@ -25,7 +26,6 @@ Changes since the last non-beta release.
|
|
25
26
|
#### Changed
|
26
27
|
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).
|
27
28
|
|
28
|
-
|
29
29
|
### [14.0.3] - 2024-06-28
|
30
30
|
|
31
31
|
#### Fixed
|
@@ -1148,7 +1148,8 @@ Best done with Object destructing:
|
|
1148
1148
|
##### Fixed
|
1149
1149
|
- Fix several generator-related issues.
|
1150
1150
|
|
1151
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.0.
|
1151
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.0.4...master
|
1152
|
+
[14.0.4]: https://github.com/shakacode/react_on_rails/compare/14.0.3...14.0.4
|
1152
1153
|
[14.0.3]: https://github.com/shakacode/react_on_rails/compare/14.0.2...14.0.3
|
1153
1154
|
[14.0.2]: https://github.com/shakacode/react_on_rails/compare/14.0.1...14.0.2
|
1154
1155
|
[14.0.1]: https://github.com/shakacode/react_on_rails/compare/14.0.0...14.0.1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
react_on_rails (14.0.
|
4
|
+
react_on_rails (14.0.4)
|
5
5
|
addressable
|
6
6
|
connection_pool
|
7
7
|
execjs (~> 2.5)
|
@@ -369,6 +369,10 @@ GEM
|
|
369
369
|
tins (1.33.0)
|
370
370
|
bigdecimal
|
371
371
|
sync
|
372
|
+
turbo-rails (2.0.6)
|
373
|
+
actionpack (>= 6.0.0)
|
374
|
+
activejob (>= 6.0.0)
|
375
|
+
railties (>= 6.0.0)
|
372
376
|
turbolinks (5.2.1)
|
373
377
|
turbolinks-source (~> 5.2)
|
374
378
|
turbolinks-source (5.2.0)
|
@@ -431,6 +435,7 @@ DEPENDENCIES
|
|
431
435
|
spring (~> 4.0)
|
432
436
|
sprockets (~> 4.0)
|
433
437
|
sqlite3 (~> 1.6)
|
438
|
+
turbo-rails
|
434
439
|
turbolinks
|
435
440
|
uglifier
|
436
441
|
webdrivers (= 5.3.0)
|
@@ -39,7 +39,9 @@ module ReactOnRails
|
|
39
39
|
i18n_output_format: nil,
|
40
40
|
components_subdirectory: nil,
|
41
41
|
make_generated_server_bundle_the_entrypoint: false,
|
42
|
-
defer_generated_component_packs: true
|
42
|
+
defer_generated_component_packs: true,
|
43
|
+
# forces the loading of React components
|
44
|
+
force_load: false
|
43
45
|
)
|
44
46
|
end
|
45
47
|
|
@@ -53,7 +55,8 @@ module ReactOnRails
|
|
53
55
|
:server_render_method, :random_dom_id, :auto_load_bundle,
|
54
56
|
:same_bundle_for_client_and_server, :rendering_props_extension,
|
55
57
|
:make_generated_server_bundle_the_entrypoint,
|
56
|
-
:defer_generated_component_packs
|
58
|
+
:defer_generated_component_packs,
|
59
|
+
:force_load
|
57
60
|
|
58
61
|
# rubocop:disable Metrics/AbcSize
|
59
62
|
def initialize(node_modules_location: nil, server_bundle_js_file: nil, prerender: nil,
|
@@ -68,7 +71,7 @@ module ReactOnRails
|
|
68
71
|
same_bundle_for_client_and_server: nil,
|
69
72
|
i18n_dir: nil, i18n_yml_dir: nil, i18n_output_format: nil,
|
70
73
|
random_dom_id: nil, server_render_method: nil, rendering_props_extension: nil,
|
71
|
-
components_subdirectory: nil, auto_load_bundle: nil)
|
74
|
+
components_subdirectory: nil, auto_load_bundle: nil, force_load: nil)
|
72
75
|
self.node_modules_location = node_modules_location.present? ? node_modules_location : Rails.root
|
73
76
|
self.generated_assets_dirs = generated_assets_dirs
|
74
77
|
self.generated_assets_dir = generated_assets_dir
|
@@ -106,6 +109,7 @@ module ReactOnRails
|
|
106
109
|
self.auto_load_bundle = auto_load_bundle
|
107
110
|
self.make_generated_server_bundle_the_entrypoint = make_generated_server_bundle_the_entrypoint
|
108
111
|
self.defer_generated_component_packs = defer_generated_component_packs
|
112
|
+
self.force_load = force_load
|
109
113
|
end
|
110
114
|
# rubocop:enable Metrics/AbcSize
|
111
115
|
|
@@ -441,6 +441,14 @@ module ReactOnRails
|
|
441
441
|
"data-trace" => (render_options.trace ? true : nil),
|
442
442
|
"data-dom-id" => render_options.dom_id)
|
443
443
|
|
444
|
+
if render_options.force_load
|
445
|
+
component_specification_tag.concat(
|
446
|
+
content_tag(:script, %(
|
447
|
+
ReactOnRails.reactOnRailsComponentLoaded('#{render_options.dom_id}');
|
448
|
+
).html_safe)
|
449
|
+
)
|
450
|
+
end
|
451
|
+
|
444
452
|
load_pack_for_generated_component(react_component_name, render_options)
|
445
453
|
# Create the HTML rendering part
|
446
454
|
result = server_rendered_react_component(render_options)
|
@@ -91,6 +91,10 @@ module ReactOnRails
|
|
91
91
|
retrieve_configuration_value_for(:logging_on_server)
|
92
92
|
end
|
93
93
|
|
94
|
+
def force_load
|
95
|
+
retrieve_configuration_value_for(:force_load)
|
96
|
+
end
|
97
|
+
|
94
98
|
def to_s
|
95
99
|
"{ react_component_name = #{react_component_name}, options = #{options}, request_digest = #{request_digest}"
|
96
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.0.
|
4
|
+
version: 14.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|