isomorfeus-preact 10.6.9 → 10.6.13

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: 27e8a1720c3ddd6303e0941c1467787024e06167478baaa56dc785cfc13ccff7
4
- data.tar.gz: 6f47595f997ed6c199bc3ca23ea6a7172cc839233ab3ed010f0f752c52833779
3
+ metadata.gz: 55b2185c8d266cd270e8e00bae7896a1593ff3e4590a61280888f9c6d4149ff8
4
+ data.tar.gz: 86a7cb16f143d7152afcf3eb1317cb9f8fb7252f135e79d59297b8f1db496513
5
5
  SHA512:
6
- metadata.gz: 8029305a7fbbf06407e697f8a48ee3af6b64fe4f14244bf1c98da076b54ef54bb030d8e6756363d6fb23d8b914821fd0cdd7706cb812e630c0e0a611deb04201
7
- data.tar.gz: 7525368ac4fc2c2f6e7decd2e11bf134f4849057b00802fff6f4754e3bea89f86b8535957f3c84aabad9c3323871534ef1eb69b4b34fc265a356d5d4c1e442d9
6
+ metadata.gz: f0e06043e4ea705e63437a88aaa85a873d8ba081decda2c2fd652cd3646c8ebff95ac790730521bbf5a547c1a8c4a7a4eb86a78fada0606d8282e8fa874aa6c7
7
+ data.tar.gz: a351dd0fed547e8a7f0927c08c535fed18bccdff2a76cb6350de231c2c47b04c7bc0f35125cd4fcbceae545cfa3409e2f17107e06d3f3001e7b981078eecd418
data/lib/browser/event.rb CHANGED
@@ -14,6 +14,7 @@ module Browser
14
14
  `#@native.preventDefault()`
15
15
  self
16
16
  end
17
+ alias_method :prevent_default, :prevent
17
18
 
18
19
  # Prevent the runtime from bubbling this event up the hierarchy. This is
19
20
  # typically used to keep an event local to the element on which it was
@@ -31,6 +32,7 @@ module Browser
31
32
  def prevented?
32
33
  `#@native.defaultPrevented`
33
34
  end
35
+ alias_method :default_prevented?, :prevented?
34
36
 
35
37
  # @return [Boolean] true if the Meta/Command/Windows key was pressed when
36
38
  # this event fired, false otherwise
@@ -30,7 +30,7 @@ module Isomorfeus
30
30
 
31
31
  def ensure(v = nil, &block)
32
32
  if block_given?
33
- @validation_hash[:ensure_block] = block
33
+ @validation_hash[:ensure] = block
34
34
  else
35
35
  @validation_hash[:ensure] = v
36
36
  end
@@ -52,10 +52,12 @@ module Isomorfeus
52
52
 
53
53
  def ensure!
54
54
  if @o.key?(:ensure)
55
- @v = @o[:ensure] unless @v
56
- true
57
- elsif @o.key?(:ensure_block)
58
- @v = @o[:ensure_block].call(@v)
55
+ proc_or_val = @o[:ensure]
56
+ if proc_or_val.class == Proc
57
+ @v = proc_or_val.call(@v)
58
+ else
59
+ @v = proc_or_val
60
+ end
59
61
  true
60
62
  else
61
63
  false
@@ -70,7 +70,7 @@ module LucidApp
70
70
  return Opal.global.Preact.createElement(Opal.global.LucidApplicationContext.Provider, { value: { iso_store: this.state.isomorfeus_store_state, iso_theme: base.css_theme }}, children);
71
71
  }
72
72
  data_access() {
73
- this.state.isomorfeus_store_state;
73
+ return this.state.isomorfeus_store_state;
74
74
  }
75
75
  listener() {
76
76
  let next_state = Opal.Isomorfeus.store.native.getState();
@@ -64,7 +64,7 @@ module LucidComponent
64
64
  return (result.length === 1) ? result[0] : result;
65
65
  }
66
66
  data_access() {
67
- this.state.isomorfeus_store_state;
67
+ return this.props.iso_store;
68
68
  }
69
69
  shouldComponentUpdate(next_props, next_state) {
70
70
  if (!Opal.Preact.props_are_equal(this.props, next_props)) { return true; }
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = '10.6.9'
2
+ VERSION = '10.6.13'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.6.9
4
+ version: 10.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-19 00:00:00.000000000 Z
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby