ui_bibz 3.0.0.alpha6 → 3.0.0.alpha8
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/Gemfile.lock +6 -6
- data/lib/ui_bibz/infos.rb +1 -1
- data/lib/ui_bibz/ui/concerns/html_concern.rb +3 -3
- data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +2 -0
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +1 -3
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +1 -3
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +6 -4
- data/lib/ui_bibz/ui/extensions/core/forms/surround_extension.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb +3 -3
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +3 -3
- data/test/ui/core/forms/surrounds/surround_field_test.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b300cb9230c765a1c306b793a0916ef4994201aaec99ffd1fb756cca5730ea95
|
4
|
+
data.tar.gz: 9850b71613e52ad0e70b92a568dcfcdfe478eb4a7a31e09518354817d6ba06cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bef370c6464ecddc0572ffa111b188f96f036425b984d03398974d0e8ed0f479e8525fd9d95c3861f806d71102a02857026ea91f15ab79577fe7fca40888fd4
|
7
|
+
data.tar.gz: be2d421018472e69f5450a07d725e1501e378a2fe8ffc1de7d2b440e2b3a846cf5f7e4a5ae303d707869645080a28a9245ead20a562fb5af7f432287b9062beb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (3.0.0.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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)
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -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
|
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
|
|
@@ -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
|
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}"
|
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
|
-
|
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]
|
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]
|
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 =
|
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 =
|
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><
|
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=\"{"events":"click","mode":"remote","target":{"selector":"","url":"","data":[]}}\" 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.
|
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-
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|