phlex-reactive 0.11.0 → 0.11.1
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 +4 -4
- data/CHANGELOG.md +19 -0
- data/app/javascript/phlex/reactive/reactive_controller.js +47 -0
- data/app/javascript/phlex/reactive/reactive_controller.min.js +2 -2
- data/app/javascript/phlex/reactive/reactive_controller.min.js.map +3 -3
- data/lib/phlex/reactive/component/helpers.rb +7 -1
- data/lib/phlex/reactive/inspector.rb +5 -1
- data/lib/phlex/reactive/version.rb +1 -1
- metadata +1 -1
|
@@ -730,7 +730,13 @@ module Phlex
|
|
|
730
730
|
action: "input->reactive#recompute",
|
|
731
731
|
reactive_compute_reducer_param: definition.reducer,
|
|
732
732
|
reactive_compute_inputs_param: compute_inputs_param(definition),
|
|
733
|
-
reactive_compute_outputs_param: definition.outputs.map(&:to_s).to_json
|
|
733
|
+
reactive_compute_outputs_param: definition.outputs.map(&:to_s).to_json,
|
|
734
|
+
# Issue #199: the client self-seeds the derived fields on connect from
|
|
735
|
+
# this marker, so a freshly-rendered compute root computes its outputs
|
|
736
|
+
# + mirrors on first paint — no wait for the first user input, and no
|
|
737
|
+
# synthetic seed `input` for an app to race. STRING "true" (a valueless
|
|
738
|
+
# boolean attr renders "" → falsy client-side; the client reads == "true").
|
|
739
|
+
reactive_compute_seed: "true"
|
|
734
740
|
}
|
|
735
741
|
# Declared cross-root text mirrors (issue #159) ride as a JSON object of
|
|
736
742
|
# name → [id selectors]; omitted entirely when undeclared so the shipped
|
|
@@ -106,7 +106,11 @@ module Phlex
|
|
|
106
106
|
return false unless result.success?
|
|
107
107
|
|
|
108
108
|
names = authorization_method_names
|
|
109
|
-
|
|
109
|
+
# Set#intersect? on the Set receiver (names) — Array#intersect? would raise
|
|
110
|
+
# TypeError on a Set arg (caught by the rescue below → a silent false, the
|
|
111
|
+
# bug the naive Style/ArrayIntersect autocorrect introduces). Set#intersect?
|
|
112
|
+
# accepts any Enumerable, so the call_names Array is a valid argument.
|
|
113
|
+
names.intersect?(call_names(result.value))
|
|
110
114
|
rescue StandardError
|
|
111
115
|
false
|
|
112
116
|
end
|