ui_bibz 3.0.0.alpha6 → 3.0.0.alpha8

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: 38589277f9143465e38e93374fe2a2c2b5c98b6c419b817e71807258dd694d11
4
- data.tar.gz: '087b07e3cecf23f9eace93ff8cab21324cbcbfaf30f7f26d1cf5af229a85c45a'
3
+ metadata.gz: b300cb9230c765a1c306b793a0916ef4994201aaec99ffd1fb756cca5730ea95
4
+ data.tar.gz: 9850b71613e52ad0e70b92a568dcfcdfe478eb4a7a31e09518354817d6ba06cc
5
5
  SHA512:
6
- metadata.gz: 0116b98a6962813164b842c69424c368ab0dfb4425b05259c6b16b93d2067712a642182d4ec1147932cc6880c34fe29e2b7acfc84d2b5f7ef96d064d20bf4a5b
7
- data.tar.gz: c54954c90ca0d394ead85a12f7ab2b353c860fa8d93c9b73bc82e7735cc9a23c9ec8e2cdd699d4d7b00fd2db0c84751c5cb22b381bf018122acafcd28be56183
6
+ metadata.gz: 4bef370c6464ecddc0572ffa111b188f96f036425b984d03398974d0e8ed0f479e8525fd9d95c3861f806d71102a02857026ea91f15ab79577fe7fca40888fd4
7
+ data.tar.gz: be2d421018472e69f5450a07d725e1501e378a2fe8ffc1de7d2b440e2b3a846cf5f7e4a5ae303d707869645080a28a9245ead20a562fb5af7f432287b9062beb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.0.alpha6)
4
+ ui_bibz (3.0.0.alpha8)
5
5
  rails (~> 6.0.3, >= 6.0.3.2)
6
6
  will-paginate-i18n
7
7
  will_paginate (~> 3.1.0)
@@ -123,7 +123,7 @@ GEM
123
123
  overcommit (0.57.0)
124
124
  childprocess (>= 0.6.3, < 5)
125
125
  iniparse (~> 1.4)
126
- parallel (1.19.2)
126
+ parallel (1.20.0)
127
127
  parser (2.7.2.0)
128
128
  ast (~> 2.4.1)
129
129
  rack (2.2.3)
@@ -159,16 +159,16 @@ GEM
159
159
  rake (13.0.1)
160
160
  regexp_parser (1.8.2)
161
161
  rexml (3.2.4)
162
- rubocop (1.1.0)
162
+ rubocop (1.3.0)
163
163
  parallel (~> 1.10)
164
164
  parser (>= 2.7.1.5)
165
165
  rainbow (>= 2.2.2, < 4.0)
166
166
  regexp_parser (>= 1.8)
167
167
  rexml
168
- rubocop-ast (>= 1.0.1)
168
+ rubocop-ast (>= 1.1.1)
169
169
  ruby-progressbar (~> 1.7)
170
170
  unicode-display_width (>= 1.4.0, < 2.0)
171
- rubocop-ast (1.1.0)
171
+ rubocop-ast (1.1.1)
172
172
  parser (>= 2.7.1.5)
173
173
  rubocop-minitest (0.10.1)
174
174
  rubocop (>= 0.87)
@@ -202,7 +202,7 @@ GEM
202
202
  thor (1.0.1)
203
203
  thread_safe (0.3.6)
204
204
  tilt (2.0.10)
205
- tzinfo (1.2.7)
205
+ tzinfo (1.2.8)
206
206
  thread_safe (~> 0.1)
207
207
  unicode-display_width (1.7.0)
208
208
  websocket-driver (0.7.3)
@@ -12,6 +12,6 @@ module UiBibz
12
12
  REPO = 'git+https://github.com/thooams/Ui-Bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams'
15
- VERSION = '3.0.0.alpha6'
15
+ VERSION = '3.0.0.alpha8'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -5,11 +5,11 @@ module UiBibz::Ui::Concerns::HtmlConcern #:nodoc:
5
5
 
6
6
  included do
7
7
  def html(content = nil, &block)
8
- if !block.nil?
8
+ if block.nil?
9
+ @items << content
10
+ else
9
11
  context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
10
12
  @items << context.capture(&block)
11
- else
12
- @items << content
13
13
  end
14
14
  end
15
15
  end
@@ -49,10 +49,12 @@ module UiBibz::Ui::Core::Forms::Numbers
49
49
 
50
50
  def formula_field_html_tag
51
51
  UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(class: join_classes('formula_field', state, size)).tap do |sf|
52
+ sf.addon @options[:append] unless @options[:append].nil?
52
53
  sf.text_field formula_field_name, nil, text_field_formula_html_options
53
54
  sf.addon '=', class: 'formula-field-sign'
54
55
  sf.text_field content, nil, text_field_input_html_options
55
56
  sf.addon formula_field_alert_glyph, { class: 'formula-field-alert' }, { data: { toggle: 'tooltip' } }
57
+ sf.addon @options[:prepend] unless @options[:prepend].nil?
56
58
  end.render
57
59
  end
58
60
 
@@ -5,9 +5,7 @@ module UiBibz::Ui::Core::Forms::Surrounds
5
5
  # See UiBibz::Ui::Core::Dropdown.initialize
6
6
 
7
7
  def pre_render
8
- content_tag :div, class: 'input-group-btn' do
9
- button_html_tag
10
- end
8
+ button_html_tag
11
9
  end
12
10
  end
13
11
  end
@@ -5,9 +5,7 @@ module UiBibz::Ui::Core::Forms::Surrounds
5
5
  # See UiBibz::Ui::Core::Dropdown.initialize
6
6
 
7
7
  def pre_render
8
- content_tag :div, class: 'input-group-btn' do
9
- button_link_html_tag
10
- end
8
+ button_link_html_tag
11
9
  end
12
10
  end
13
11
  end
@@ -31,6 +31,8 @@ module UiBibz::Ui::Core::Navigations
31
31
  # * +title+ - String
32
32
  # * +container+ - Hash container options
33
33
  # * +container_html+ - Hash container html options
34
+ # * +expand_size+ - Symbol size
35
+ # (+:sm+, +:md+, +:lg+, +:xl+, +:xxl+)
34
36
  #
35
37
  # ==== Signatures
36
38
  #
@@ -132,11 +134,11 @@ module UiBibz::Ui::Core::Navigations
132
134
  end
133
135
 
134
136
  def navbar_toggle_html(content = nil, &block)
135
- @navbar_toggle_html = if !block.nil?
137
+ @navbar_toggle_html = if block.nil?
138
+ content
139
+ else
136
140
  context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
137
141
  context.capture(&block)
138
- else
139
- content
140
142
  end
141
143
  end
142
144
 
@@ -165,7 +167,7 @@ module UiBibz::Ui::Core::Navigations
165
167
  end
166
168
 
167
169
  def expand_size
168
- "navbar-expand-#{@options[:expand_size] || :lg}" # unless @options[:expand_size].nil?
170
+ "navbar-expand-#{@options[:expand_size] || :lg}" unless options[:collapsible] == false
169
171
  end
170
172
 
171
173
  def position
@@ -7,7 +7,7 @@ module SurroundExtension
7
7
  private
8
8
 
9
9
  def surrounded?
10
- !options[:append].nil? || !options[:prepend].nil? || !options[:refresh].nil? || !options[:surrounded].nil?
10
+ options[:append].present? || options[:prepend].present? || options[:refresh].present? || options[:surrounded].present?
11
11
  end
12
12
 
13
13
  def surround_wrapper_tag(ct_tag)
@@ -34,12 +34,12 @@ module UiBibz::Ui::Ux::Tables
34
34
 
35
35
  # Render html tag
36
36
  def render
37
- if @per_page_field.options[:wrap_form] != false
37
+ if @per_page_field.options[:wrap_form] == false
38
+ per_page_html
39
+ else
38
40
  form_tag(url_for(url_parameters), method: :get) do
39
41
  per_page_html_in_wrap
40
42
  end
41
- else
42
- per_page_html
43
43
  end
44
44
  end
45
45
 
@@ -13,12 +13,12 @@ module UiBibz::Ui::Ux::Tables
13
13
 
14
14
  # Render html tag
15
15
  def pre_render
16
- if options[:wrap_form] != false
16
+ if options[:wrap_form] == false
17
+ search_field_html
18
+ else
17
19
  form_tag(url_for(url_parameters), method: :get, class: 'form-table-search-field') do
18
20
  search_field_html_in_wrap
19
21
  end
20
- else
21
- search_field_html
22
22
  end
23
23
  end
24
24
 
@@ -40,7 +40,7 @@ class SurroundFieldTest < ActionView::TestCase
40
40
  actual = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new.tap do |sf|
41
41
  sf.button 'Submit'
42
42
  end.render
43
- expected = '<div class="input-group ui_surround_field"><div class="input-group-btn"><button class="btn-secondary btn">Submit</button></div></div>'
43
+ expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn-secondary btn\">Submit</button></div>"
44
44
 
45
45
  assert_equal expected, actual
46
46
  end
@@ -51,7 +51,7 @@ class SurroundFieldTest < ActionView::TestCase
51
51
  sf.addon '€'
52
52
  sf.glyph 'pencil'
53
53
  end.render
54
- expected = '<div class="input-group ui_surround_field"><div class="input-group-btn"><button class="btn-secondary btn">Submit</button></div><span class="input-group-text">€</span><span class="input-group-text"><i class="glyph fas fa-pencil"></i></span></div>'
54
+ expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn-secondary btn\">Submit</button><span class=\"input-group-text\">€</span><span class=\"input-group-text\"><i class=\"glyph fas fa-pencil\"></i></span></div>"
55
55
 
56
56
  assert_equal expected, actual
57
57
  end
@@ -87,7 +87,7 @@ class SurroundFieldTest < ActionView::TestCase
87
87
  sf.button_refresh
88
88
  end.render
89
89
 
90
- expected = "<div class=\"input-group ui_surround_field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-gem\"></i></span><span class=\"input-group-text\">test</span><div class=\"input-group-btn\"><button class=\"btn-secondary btn\">button</button></div><div class=\"input-group-btn\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div><div class=\"input-group-btn\"><a class=\"btn-secondary btn\" role=\"button\" href=\"#\">link</a></div><div class=\"input-group-text\" label=\"false\"><input type=\"checkbox\" name=\"check\" id=\"check\" value=\"1\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"check\">check</label></div><div class=\"input-group-text\" label=\"false\"><input type=\"radio\" name=\"radio\" id=\"radio_\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"radio_\">radio</label></div><input type=\"text\" name=\"text\" id=\"text\" class=\"form-control\" /><input type=\"text\" name=\"date\" id=\"date\" data-date-locale=\"en\" data-provide=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-today-btn=\"linked\" data-date-toggle-active=\"true\" class=\"date_picker form-control\" /><select name=\"dropdown_select\" id=\"dropdown_select\" data-wrapper-classes=\"input-group-btn\" class=\"btn-secondary multi-select-field\"></select><select name=\"select\" id=\"select\" class=\"select-field form-control form-select\"></select><input type=\"text\" name=\"auto\" id=\"auto\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"auto-datalist\" /><datalist id=\"auto-datalist\"></datalist><span data-connect=\"{&quot;events&quot;:&quot;click&quot;,&quot;mode&quot;:&quot;remote&quot;,&quot;target&quot;:{&quot;selector&quot;:&quot;&quot;,&quot;url&quot;:&quot;&quot;,&quot;data&quot;:[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i> </span></div>"
90
+ expected = "<div class=\"input-group ui_surround_field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-gem\"></i></span><span class=\"input-group-text\">test</span><button class=\"btn-secondary btn\">button</button><div class=\"input-group-btn\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div><a class=\"btn-secondary btn\" role=\"button\" href=\"#\">link</a><div class=\"input-group-text\" label=\"false\"><input type=\"checkbox\" name=\"check\" id=\"check\" value=\"1\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"check\">check</label></div><div class=\"input-group-text\" label=\"false\"><input type=\"radio\" name=\"radio\" id=\"radio_\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"radio_\">radio</label></div><input type=\"text\" name=\"text\" id=\"text\" class=\"form-control\" /><input type=\"text\" name=\"date\" id=\"date\" data-date-locale=\"en\" data-provide=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-today-btn=\"linked\" data-date-toggle-active=\"true\" class=\"date_picker form-control\" /><select name=\"dropdown_select\" id=\"dropdown_select\" data-wrapper-classes=\"input-group-btn\" class=\"btn-secondary multi-select-field\"></select><select name=\"select\" id=\"select\" class=\"select-field form-control form-select\"></select><input type=\"text\" name=\"auto\" id=\"auto\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"auto-datalist\" /><datalist id=\"auto-datalist\"></datalist><span data-connect=\"{&quot;events&quot;:&quot;click&quot;,&quot;mode&quot;:&quot;remote&quot;,&quot;target&quot;:{&quot;selector&quot;:&quot;&quot;,&quot;url&quot;:&quot;&quot;,&quot;data&quot;:[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i> </span></div>"
91
91
 
92
92
  assert_equal expected, actual
93
93
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.alpha6
4
+ version: 3.0.0.alpha8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails