isomorfeus-preact 10.6.15 → 10.6.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus-preact.rb +1 -1
- data/lib/isomorfeus_preact/lucid_component/initializer.rb +0 -2
- data/lib/preact/component/api.rb +1 -1
- data/lib/preact/component/resolution.rb +2 -2
- data/lib/preact/params.rb +16 -0
- data/lib/preact/props.rb +1 -1
- data/lib/preact/version.rb +1 -1
- metadata +2 -2
- data/lib/preact/component/params.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2796e916f3c62cec0b330e99b7ac6fb46b368f059c3ed1278353211fc4c8370c
|
4
|
+
data.tar.gz: ad47708be18d9e8f781a8e5bbddbc8501667bafbdee75b9589656789245d656c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d40522093a724e462b77833292c29622521832d1faac7cedf584eadf20ea4005a42de057252927eac7d1c96b847f4a19c62416722f1e818a058b3b97b04a2a2
|
7
|
+
data.tar.gz: 612ebd137795482e93c356869f32af3c4f50b4164ce629ff4c3822a4dda8a4fc748b34899ee771771c3e0e0e57e4198547c62fb7e2466f3b02b2215ce8198d25
|
data/lib/isomorfeus-preact.rb
CHANGED
@@ -31,6 +31,7 @@ if RUBY_ENGINE == 'opal'
|
|
31
31
|
require 'isomorfeus/props/validate_hash_proxy'
|
32
32
|
require 'isomorfeus/props/validator'
|
33
33
|
require 'lucid_prop_declaration/mixin'
|
34
|
+
require 'preact/params'
|
34
35
|
require 'preact/props'
|
35
36
|
|
36
37
|
# HTML Elements and Fragment support
|
@@ -46,7 +47,6 @@ if RUBY_ENGINE == 'opal'
|
|
46
47
|
require 'preact/component/initializer'
|
47
48
|
require 'preact/component/native_component_constructor'
|
48
49
|
require 'preact/state'
|
49
|
-
require 'preact/component/params'
|
50
50
|
require 'preact/component/resolution'
|
51
51
|
require 'preact/component/mixin'
|
52
52
|
require 'preact/component/base'
|
@@ -4,8 +4,6 @@ module LucidComponent
|
|
4
4
|
@native = native_component
|
5
5
|
@app_store = LucidComponent::AppStoreProxy.new(self)
|
6
6
|
@class_store = LucidComponent::ClassStoreProxy.new(self.class.to_s, self, @native)
|
7
|
-
# @iso_store = Isomorfeus::IsomorphicStoreProxy.new(self)
|
8
|
-
# @local_store = Isomorfeus::LocalStoreProxy.new(self)
|
9
7
|
@store = LucidComponent::InstanceStoreProxy.new(self)
|
10
8
|
@props = `Opal.Preact.Props.$new(#@native)`
|
11
9
|
@state = `Opal.Preact.State.$new(#@native)`
|
data/lib/preact/component/api.rb
CHANGED
@@ -10,9 +10,9 @@ module Preact
|
|
10
10
|
def const_missing(const_name)
|
11
11
|
%x{
|
12
12
|
if (typeof Opal.global[const_name] !== "undefined" && (const_name[0] === const_name[0].toUpperCase())) {
|
13
|
-
var new_const =
|
13
|
+
var new_const = Opal.Preact.NativeConstantWrapper.$new(Opal.global[const_name], const_name);
|
14
14
|
new_const.preact_component = Opal.global[const_name];
|
15
|
-
|
15
|
+
Opal.Object.$const_set(const_name, new_const);
|
16
16
|
return new_const;
|
17
17
|
} else {
|
18
18
|
return #{_preact_component_class_resolution_original_const_missing(const_name)};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Preact
|
2
|
+
class Params
|
3
|
+
include Native::Wrapper
|
4
|
+
|
5
|
+
def method_missing(prop, *args, &block)
|
6
|
+
%x{
|
7
|
+
const p = #@native;
|
8
|
+
if (typeof p[prop] === 'undefined') {
|
9
|
+
prop = Opal.Preact.lower_camelize(prop);
|
10
|
+
if (typeof p[prop] === 'undefined') { return nil; }
|
11
|
+
}
|
12
|
+
return p[prop];
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/preact/props.rb
CHANGED
@@ -29,7 +29,7 @@ module Preact
|
|
29
29
|
def params
|
30
30
|
return @params if @params
|
31
31
|
return nil if `typeof #@native.props.params === 'undefined'`
|
32
|
-
@params =
|
32
|
+
@params = `Opal.Preact.Params.$new(#@native.props.params)`
|
33
33
|
end
|
34
34
|
|
35
35
|
def to_h
|
data/lib/preact/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-preact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.6.
|
4
|
+
version: 10.6.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
@@ -268,11 +268,11 @@ files:
|
|
268
268
|
- lib/preact/component/initializer.rb
|
269
269
|
- lib/preact/component/mixin.rb
|
270
270
|
- lib/preact/component/native_component_constructor.rb
|
271
|
-
- lib/preact/component/params.rb
|
272
271
|
- lib/preact/component/resolution.rb
|
273
272
|
- lib/preact/context_wrapper.rb
|
274
273
|
- lib/preact/native_constant_wrapper.rb
|
275
274
|
- lib/preact/options.rb
|
275
|
+
- lib/preact/params.rb
|
276
276
|
- lib/preact/props.rb
|
277
277
|
- lib/preact/ref.rb
|
278
278
|
- lib/preact/state.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Preact
|
2
|
-
module Component
|
3
|
-
class Params
|
4
|
-
include Native::Wrapper
|
5
|
-
|
6
|
-
def method_missing(prop, *args, &block)
|
7
|
-
%x{
|
8
|
-
const p = #@native;
|
9
|
-
if (typeof p[prop] === 'undefined') {
|
10
|
-
prop = Opal.Preact.lower_camelize(prop);
|
11
|
-
if (typeof p[prop] === 'undefined') { return nil; }
|
12
|
-
}
|
13
|
-
return p[prop];
|
14
|
-
}
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|