voom-presenters 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29ec89fecaf9d2f5939f9178f8f00a90e9bf1ec00fdb5412584ab0a17138fe3c
4
- data.tar.gz: e8770f9f504e7b0613916db6471ddf44ef9f451a0a1162ebcb8a9ea4efc7999c
3
+ metadata.gz: 411aa64aebeac378f001123d10ae4c7dd45aa7d2f1a92c3593a0687cb9e105ac
4
+ data.tar.gz: 64bbc79971792a6f68c2f084d65b47631942281ff28faa9a52da15e3595ba020
5
5
  SHA512:
6
- metadata.gz: 9565aabc42dc2af95311447d176599567400cc428fb75a331f8d0b1da7c0648e94e6fbb2ae4757534bc5599f744d0c93fb1404e5ebb6c329a4948b7661e9f126
7
- data.tar.gz: 8739fc8697e28aed1ef15bb111a062217c5c45459a7fe0ba3b242277d89f7fa9da3d7d1d21c4bf728dbdd933d0e31ca4112aeb15202ffcf24a3995afd02d4997
6
+ metadata.gz: 67763e55b0cf99dfcef136bc5a0f822a91bfff6295c1b1780486b8c90405abdda5ec4a7c18d34c4043db97289a332dd2eff8cf238aec66db70e43424fdfa9bf2
7
+ data.tar.gz: f5eb112de819b9bc34b99034c5a1dd73f94871295fd2bf8b8ea5cc5c5eecc067bb90f4c59f0ba927ca8f1a283239a101e5502c3a536b944c10cc709841d306cc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- voom-presenters (0.1.3)
4
+ voom-presenters (0.1.5)
5
5
  dry-configurable (> 0.1, <= 7.0)
6
6
  dry-container (~> 0.6)
7
7
  dry-inflector (~> 0.1)
@@ -1,7 +1,7 @@
1
1
  require_relative '../lockable'
2
2
  require_relative '../../../serializer'
3
3
  require_relative '../../../trace'
4
-
4
+ require_relative 'mixins/yield_to'
5
5
  require 'securerandom'
6
6
 
7
7
  module Voom
@@ -16,6 +16,7 @@ module Voom
16
16
  include Voom::Serializer
17
17
  include LoggerMethods
18
18
  include Trace
19
+ include Mixins::YieldTo
19
20
 
20
21
  attr_reader :type, :id, :attributes, :context
21
22
 
@@ -11,6 +11,7 @@ require_relative 'mixins/toggles'
11
11
  require_relative 'mixins/attaches'
12
12
  require_relative 'mixins/expansion_panels'
13
13
  require_relative 'mixins/content'
14
+ require_relative 'mixins/typography'
14
15
 
15
16
  module Voom
16
17
  module Presenters
@@ -26,6 +27,7 @@ module Voom
26
27
  include Mixins::Attaches
27
28
  include Mixins::ExpansionPanels
28
29
  include Mixins::Content
30
+ include Mixins::Typography
29
31
 
30
32
  attr_reader :components, :shows_errors
31
33
 
@@ -1,10 +1,12 @@
1
1
  require_relative 'mixins/event'
2
+ require_relative 'mixins/tooltips'
2
3
 
3
4
  module Voom
4
5
  module Presenters
5
6
  module DSL
6
7
  module Components
7
8
  class Input < EventBase
9
+ include Mixins::Tooltips
8
10
  attr_reader :name
9
11
 
10
12
  def initialize(**attribs_, &block)
@@ -0,0 +1,15 @@
1
+ module Voom
2
+ module Presenters
3
+ module DSL
4
+ module Components
5
+ module Mixins
6
+ module YieldTo
7
+ def yield_to(&block)
8
+ instance_eval(&block) if block
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,6 +1,5 @@
1
1
  require_relative 'mixins/event'
2
2
  require_relative 'input'
3
- require_relative 'mixins/tooltips'
4
3
 
5
4
  module Voom
6
5
  module Presenters
@@ -8,8 +7,6 @@ module Voom
8
7
  module Components
9
8
  # Base class used by toggle classes
10
9
  class ToggleBase < Input
11
- include Mixins::Tooltips
12
-
13
10
  attr_accessor :text, :checked, :value, :disabled
14
11
 
15
12
  def initialize(**attribs_, &block)
@@ -4,6 +4,7 @@ require_relative 'components/mixins/common'
4
4
  require_relative 'components/mixins/helpers'
5
5
  require_relative 'components/mixins/dialogs'
6
6
  require_relative 'components/mixins/snackbars'
7
+ require_relative 'components/mixins/text_fields'
7
8
  require_relative 'invalid_presenter'
8
9
 
9
10
  require 'voom/serializer'
@@ -21,6 +22,7 @@ module Voom
21
22
  include Components::Mixins::Dialogs
22
23
  include Components::Mixins::Snackbars
23
24
  include Components::Mixins::Icons
25
+ include Components::Mixins::TextFields
24
26
 
25
27
  include Voom::Serializer
26
28
  include Voom::Trace
@@ -15,12 +15,13 @@ if defined?(Rails)
15
15
  def presenters_path(presenter, **params)
16
16
  path = voom_presenters_web_client_app_path(params)
17
17
  if path.include?('?')
18
- path = path.sub('?', "#{presenter}?")
18
+ path = path.sub('?', "/#{presenter}?")
19
19
  else
20
20
  path = "#{path}/" unless path.end_with?('/')
21
21
  # replace last / with the presenter
22
- path.reverse.sub('/', "/#{presenter}".reverse).reverse
22
+ path = path.reverse.sub('/', "/#{presenter}".reverse).reverse
23
23
  end
24
+ path
24
25
  end
25
26
 
26
27
  def table_for(query_,
@@ -1,5 +1,5 @@
1
1
  module Voom
2
2
  module Presenters
3
- VERSION = '0.1.4'.freeze
3
+ VERSION = '0.1.5'.freeze
4
4
  end
5
5
  end
@@ -35,7 +35,7 @@ export class VForm {
35
35
  }
36
36
 
37
37
  inputs() {
38
- return this.element.querySelectorAll('input');
38
+ return this.element.elements;
39
39
  }
40
40
 
41
41
  // Called to collect data for submission
@@ -19,4 +19,5 @@
19
19
  <%= 'mdc-floating-label--float-above' if float_label%>"><%= comp.label %></div>
20
20
  <div class="mdc-select__bottom-line"></div>
21
21
  </div>
22
+ <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
22
23
  <% end %>
@@ -3,6 +3,8 @@
3
3
  <textarea id="<%= comp.id %>"
4
4
  name="<%= comp.name %>"
5
5
  class="mdl-textfield__input" type="text" rows= "<%= comp.rows %>" ><%= comp.value %></textarea>
6
- <label class="mdl-textfield__label" for="<%= comp.id %>"><%= comp.label %></label>
6
+ <label class="mdl-textfield__label" for="<%= comp.id %>"><%= expand_text(comp.label) %></label>
7
7
  <span class="mdl-textfield__error <% if comp.error %> is-invalid<%end%>" ><%= comp.error || comp.hint%></span>
8
8
  </div>
9
+ <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
10
+
@@ -25,3 +25,4 @@
25
25
  <p id="<%= comp.id %>-input-helper-text" class="mdc-text-field-helper-text" aria-hidden="true">
26
26
  <%= comp.error || comp.hint %>
27
27
  </p>
28
+ <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voom-presenters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Edens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ice_nine
@@ -341,6 +341,7 @@ files:
341
341
  - lib/voom/presenters/dsl/components/mixins/toggles.rb
342
342
  - lib/voom/presenters/dsl/components/mixins/tooltips.rb
343
343
  - lib/voom/presenters/dsl/components/mixins/typography.rb
344
+ - lib/voom/presenters/dsl/components/mixins/yield_to.rb
344
345
  - lib/voom/presenters/dsl/components/page.rb
345
346
  - lib/voom/presenters/dsl/components/radio_button.rb
346
347
  - lib/voom/presenters/dsl/components/select.rb