ui_bibz 3.0.0.beta12 → 3.0.0.beta17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile.lock +64 -66
- data/lib/ui_bibz.rb +2 -0
- data/lib/ui_bibz/concerns/models/searchable.rb +6 -6
- data/lib/ui_bibz/infos.rb +2 -2
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +9 -12
- data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +6 -8
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_radio_field_input.rb +2 -13
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_switch_field_input.rb +1 -13
- data/lib/ui_bibz/rails/engine.rb +2 -2
- data/lib/ui_bibz/ui/concerns/navigation_concern.rb +12 -0
- data/lib/ui_bibz/ui/concerns/notification_concern.rb +13 -0
- data/lib/ui_bibz/ui/core/component.rb +5 -1
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +10 -2
- data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +8 -4
- data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +1 -20
- data/lib/ui_bibz/ui/core/forms/choices/switch_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/nav.rb +1 -5
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +1 -5
- data/lib/ui_bibz/ui/core/notifications/popover.rb +2 -6
- data/lib/ui_bibz/ui/core/notifications/toast.rb +32 -2
- data/lib/ui_bibz/ui/core/notifications/tooltip.rb +2 -6
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/store.rb +3 -0
- data/lib/ui_bibz/ui/ux/tables/extensions/paginable.rb +0 -3
- data/lib/ui_bibz/ui/ux/tables/table_pagination.rb +0 -3
- data/lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb +0 -3
- data/test/simple_form_test.rb +38 -29
- data/test/ui/core/notifications/toast_test.rb +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293f9667c9bfae713e8968aedb6fb67bb8f391b0ef8f57663e048be71589e4e5
|
4
|
+
data.tar.gz: 4b15c120616b00753011fd7f58e278dbe249cacd98e1642bac153b80b0e6b5de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9d3053d5303bd6c9ff0c6de3dde049a08a75f25f94e70f3812031050328dd66dc14e3b6909a35f083993ee09b1782c615d3b00c0c8fd41e224bc50f223b4077
|
7
|
+
data.tar.gz: a167b60e21e64c303227f580ca599b95351ae1b5554a5c611fef8abc199abe9180c5aa44af7654a5b61ef777b21d81cb7e289389d3098bfd10f78a26a5597638
|
data/.github/workflows/ci.yml
CHANGED
@@ -23,6 +23,6 @@ jobs:
|
|
23
23
|
- name: Test with Rake
|
24
24
|
uses: paambaati/codeclimate-action@v2.7.5
|
25
25
|
env:
|
26
|
-
CC_TEST_REPORTER_ID:
|
26
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
27
27
|
with:
|
28
28
|
coverageCommand: bundle exec rake
|
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.beta17)
|
5
5
|
will-paginate-i18n
|
6
6
|
will_paginate (~> 3.3.0)
|
7
7
|
will_paginate-bootstrap4
|
@@ -9,63 +9,63 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (6.0.3.
|
13
|
-
actionpack (= 6.0.3.
|
12
|
+
actioncable (6.0.3.6)
|
13
|
+
actionpack (= 6.0.3.6)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (6.0.3.
|
17
|
-
actionpack (= 6.0.3.
|
18
|
-
activejob (= 6.0.3.
|
19
|
-
activerecord (= 6.0.3.
|
20
|
-
activestorage (= 6.0.3.
|
21
|
-
activesupport (= 6.0.3.
|
16
|
+
actionmailbox (6.0.3.6)
|
17
|
+
actionpack (= 6.0.3.6)
|
18
|
+
activejob (= 6.0.3.6)
|
19
|
+
activerecord (= 6.0.3.6)
|
20
|
+
activestorage (= 6.0.3.6)
|
21
|
+
activesupport (= 6.0.3.6)
|
22
22
|
mail (>= 2.7.1)
|
23
|
-
actionmailer (6.0.3.
|
24
|
-
actionpack (= 6.0.3.
|
25
|
-
actionview (= 6.0.3.
|
26
|
-
activejob (= 6.0.3.
|
23
|
+
actionmailer (6.0.3.6)
|
24
|
+
actionpack (= 6.0.3.6)
|
25
|
+
actionview (= 6.0.3.6)
|
26
|
+
activejob (= 6.0.3.6)
|
27
27
|
mail (~> 2.5, >= 2.5.4)
|
28
28
|
rails-dom-testing (~> 2.0)
|
29
|
-
actionpack (6.0.3.
|
30
|
-
actionview (= 6.0.3.
|
31
|
-
activesupport (= 6.0.3.
|
29
|
+
actionpack (6.0.3.6)
|
30
|
+
actionview (= 6.0.3.6)
|
31
|
+
activesupport (= 6.0.3.6)
|
32
32
|
rack (~> 2.0, >= 2.0.8)
|
33
33
|
rack-test (>= 0.6.3)
|
34
34
|
rails-dom-testing (~> 2.0)
|
35
35
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
-
actiontext (6.0.3.
|
37
|
-
actionpack (= 6.0.3.
|
38
|
-
activerecord (= 6.0.3.
|
39
|
-
activestorage (= 6.0.3.
|
40
|
-
activesupport (= 6.0.3.
|
36
|
+
actiontext (6.0.3.6)
|
37
|
+
actionpack (= 6.0.3.6)
|
38
|
+
activerecord (= 6.0.3.6)
|
39
|
+
activestorage (= 6.0.3.6)
|
40
|
+
activesupport (= 6.0.3.6)
|
41
41
|
nokogiri (>= 1.8.5)
|
42
|
-
actionview (6.0.3.
|
43
|
-
activesupport (= 6.0.3.
|
42
|
+
actionview (6.0.3.6)
|
43
|
+
activesupport (= 6.0.3.6)
|
44
44
|
builder (~> 3.1)
|
45
45
|
erubi (~> 1.4)
|
46
46
|
rails-dom-testing (~> 2.0)
|
47
47
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
-
activejob (6.0.3.
|
49
|
-
activesupport (= 6.0.3.
|
48
|
+
activejob (6.0.3.6)
|
49
|
+
activesupport (= 6.0.3.6)
|
50
50
|
globalid (>= 0.3.6)
|
51
|
-
activemodel (6.0.3.
|
52
|
-
activesupport (= 6.0.3.
|
53
|
-
activerecord (6.0.3.
|
54
|
-
activemodel (= 6.0.3.
|
55
|
-
activesupport (= 6.0.3.
|
56
|
-
activestorage (6.0.3.
|
57
|
-
actionpack (= 6.0.3.
|
58
|
-
activejob (= 6.0.3.
|
59
|
-
activerecord (= 6.0.3.
|
60
|
-
marcel (~> 0.
|
61
|
-
activesupport (6.0.3.
|
51
|
+
activemodel (6.0.3.6)
|
52
|
+
activesupport (= 6.0.3.6)
|
53
|
+
activerecord (6.0.3.6)
|
54
|
+
activemodel (= 6.0.3.6)
|
55
|
+
activesupport (= 6.0.3.6)
|
56
|
+
activestorage (6.0.3.6)
|
57
|
+
actionpack (= 6.0.3.6)
|
58
|
+
activejob (= 6.0.3.6)
|
59
|
+
activerecord (= 6.0.3.6)
|
60
|
+
marcel (~> 1.0.0)
|
61
|
+
activesupport (6.0.3.6)
|
62
62
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
63
63
|
i18n (>= 0.7, < 2)
|
64
64
|
minitest (~> 5.1)
|
65
65
|
tzinfo (~> 1.1)
|
66
66
|
zeitwerk (~> 2.2, >= 2.2.2)
|
67
67
|
ast (2.4.2)
|
68
|
-
awesome_print (1.
|
68
|
+
awesome_print (1.9.2)
|
69
69
|
builder (3.2.4)
|
70
70
|
byebug (11.1.3)
|
71
71
|
childprocess (4.0.0)
|
@@ -95,7 +95,7 @@ GEM
|
|
95
95
|
haml (>= 4.0, < 6)
|
96
96
|
nokogiri (>= 1.6.0)
|
97
97
|
ruby_parser (~> 3.5)
|
98
|
-
i18n (1.8.
|
98
|
+
i18n (1.8.9)
|
99
99
|
concurrent-ruby (~> 1.0)
|
100
100
|
iniparse (1.5.0)
|
101
101
|
jquery-rails (4.4.0)
|
@@ -107,15 +107,13 @@ GEM
|
|
107
107
|
nokogiri (>= 1.5.9)
|
108
108
|
mail (2.7.1)
|
109
109
|
mini_mime (>= 0.1.1)
|
110
|
-
marcel (0.
|
111
|
-
mimemagic (~> 0.3.2)
|
110
|
+
marcel (1.0.0)
|
112
111
|
method_source (1.0.0)
|
113
|
-
|
114
|
-
mini_mime (1.0.2)
|
112
|
+
mini_mime (1.0.3)
|
115
113
|
mini_portile2 (2.5.0)
|
116
|
-
minitest (5.14.
|
117
|
-
nio4r (2.5.
|
118
|
-
nokogiri (1.11.
|
114
|
+
minitest (5.14.4)
|
115
|
+
nio4r (2.5.7)
|
116
|
+
nokogiri (1.11.2)
|
119
117
|
mini_portile2 (~> 2.5.0)
|
120
118
|
racc (~> 1.4)
|
121
119
|
overcommit (0.57.0)
|
@@ -128,37 +126,37 @@ GEM
|
|
128
126
|
rack (2.2.3)
|
129
127
|
rack-test (1.1.0)
|
130
128
|
rack (>= 1.0, < 3)
|
131
|
-
rails (6.0.3.
|
132
|
-
actioncable (= 6.0.3.
|
133
|
-
actionmailbox (= 6.0.3.
|
134
|
-
actionmailer (= 6.0.3.
|
135
|
-
actionpack (= 6.0.3.
|
136
|
-
actiontext (= 6.0.3.
|
137
|
-
actionview (= 6.0.3.
|
138
|
-
activejob (= 6.0.3.
|
139
|
-
activemodel (= 6.0.3.
|
140
|
-
activerecord (= 6.0.3.
|
141
|
-
activestorage (= 6.0.3.
|
142
|
-
activesupport (= 6.0.3.
|
129
|
+
rails (6.0.3.6)
|
130
|
+
actioncable (= 6.0.3.6)
|
131
|
+
actionmailbox (= 6.0.3.6)
|
132
|
+
actionmailer (= 6.0.3.6)
|
133
|
+
actionpack (= 6.0.3.6)
|
134
|
+
actiontext (= 6.0.3.6)
|
135
|
+
actionview (= 6.0.3.6)
|
136
|
+
activejob (= 6.0.3.6)
|
137
|
+
activemodel (= 6.0.3.6)
|
138
|
+
activerecord (= 6.0.3.6)
|
139
|
+
activestorage (= 6.0.3.6)
|
140
|
+
activesupport (= 6.0.3.6)
|
143
141
|
bundler (>= 1.3.0)
|
144
|
-
railties (= 6.0.3.
|
142
|
+
railties (= 6.0.3.6)
|
145
143
|
sprockets-rails (>= 2.0.0)
|
146
144
|
rails-dom-testing (2.0.3)
|
147
145
|
activesupport (>= 4.2.0)
|
148
146
|
nokogiri (>= 1.6)
|
149
147
|
rails-html-sanitizer (1.3.0)
|
150
148
|
loofah (~> 2.3)
|
151
|
-
railties (6.0.3.
|
152
|
-
actionpack (= 6.0.3.
|
153
|
-
activesupport (= 6.0.3.
|
149
|
+
railties (6.0.3.6)
|
150
|
+
actionpack (= 6.0.3.6)
|
151
|
+
activesupport (= 6.0.3.6)
|
154
152
|
method_source
|
155
153
|
rake (>= 0.8.7)
|
156
154
|
thor (>= 0.20.3, < 2.0)
|
157
155
|
rainbow (3.0.0)
|
158
156
|
rake (13.0.3)
|
159
|
-
regexp_parser (2.
|
157
|
+
regexp_parser (2.1.1)
|
160
158
|
rexml (3.2.4)
|
161
|
-
rubocop (1.
|
159
|
+
rubocop (1.12.0)
|
162
160
|
parallel (~> 1.10)
|
163
161
|
parser (>= 3.0.0.0)
|
164
162
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -169,9 +167,9 @@ GEM
|
|
169
167
|
unicode-display_width (>= 1.4.0, < 3.0)
|
170
168
|
rubocop-ast (1.4.1)
|
171
169
|
parser (>= 2.7.1.5)
|
172
|
-
rubocop-minitest (0.
|
173
|
-
rubocop (>= 0.
|
174
|
-
rubocop-performance (1.
|
170
|
+
rubocop-minitest (0.11.1)
|
171
|
+
rubocop (>= 0.90, < 2.0)
|
172
|
+
rubocop-performance (1.10.2)
|
175
173
|
rubocop (>= 0.90.0, < 2.0)
|
176
174
|
rubocop-ast (>= 0.4.0)
|
177
175
|
rubocop-rails (2.9.1)
|
data/lib/ui_bibz.rb
CHANGED
@@ -78,6 +78,8 @@ module UiBibz
|
|
78
78
|
module Concerns
|
79
79
|
autoload :HtmlConcern, 'ui_bibz/ui/concerns/html_concern'
|
80
80
|
autoload :CardItemableConcern, 'ui_bibz/ui/concerns/card_itemable_concern'
|
81
|
+
autoload :NavigationConcern, 'ui_bibz/ui/concerns/navigation_concern'
|
82
|
+
autoload :NotificationConcern, 'ui_bibz/ui/concerns/notification_concern'
|
81
83
|
end
|
82
84
|
|
83
85
|
# Core
|
@@ -119,19 +119,19 @@ module UiBibz::Concerns::Models::Searchable
|
|
119
119
|
if attribute.is_a?(Hash)
|
120
120
|
if attribute == :as
|
121
121
|
attribute.each_value do |value|
|
122
|
-
sql_subquery << "lower(#{value}) LIKE :#{value}_#{i}"
|
123
|
-
sql_attributes = sql_attributes.merge(
|
122
|
+
sql_subquery << "lower(CAST(#{value} AS TEXT)) LIKE :#{value}_#{i}"
|
123
|
+
sql_attributes = sql_attributes.merge({ "#{value}_#{i}".to_sym => "%#{pattern}%" })
|
124
124
|
end
|
125
125
|
else
|
126
126
|
key_name = attribute.keys.first.to_s.pluralize
|
127
127
|
attribute.each_value do |value|
|
128
|
-
sql_subquery << "lower(#{key_name}.#{value}) LIKE :#{key_name}_#{value}_#{i}"
|
129
|
-
sql_attributes = sql_attributes.merge(
|
128
|
+
sql_subquery << "lower(CAST(#{key_name}.#{value} AS TEXT)) LIKE :#{key_name}_#{value}_#{i}"
|
129
|
+
sql_attributes = sql_attributes.merge({ "#{key_name}_#{value}_#{i}".to_sym => "%#{pattern}%" })
|
130
130
|
end
|
131
131
|
end
|
132
132
|
else
|
133
|
-
sql_subquery << "lower(#{to_s.underscore.pluralize.split('/').last}.#{attribute}) LIKE :#{attribute}_#{i}"
|
134
|
-
sql_attributes = sql_attributes.merge(
|
133
|
+
sql_subquery << "lower(CAST(#{to_s.underscore.pluralize.split('/').last}.#{attribute} AS TEXT)) LIKE :#{attribute}_#{i}"
|
134
|
+
sql_attributes = sql_attributes.merge({ "#{attribute}_#{i}".to_sym => "%#{pattern}%" })
|
135
135
|
end
|
136
136
|
end
|
137
137
|
sql_query << "(#{sql_subquery.join(' OR ')})"
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module UiBibz
|
4
4
|
NAME = 'Ui Bibz'
|
5
5
|
SLUG = 'ui_bibz'
|
6
|
-
BOOTSTRAP_VERSION = '5.0.0.
|
6
|
+
BOOTSTRAP_VERSION = '5.0.0.beta3'
|
7
7
|
DESCRIPTION = "A Rails Interface Framework using Bootstrap #{BOOTSTRAP_VERSION}."
|
8
8
|
SUMMARY = "Ui Bibz is an Ui Framework that allows you to build an interface very quickly and simply using Bootstrap #{BOOTSTRAP_VERSION}."
|
9
9
|
LICENSE = 'MIT'
|
@@ -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 [Thomas HUMMEL]'
|
15
|
-
VERSION = '3.0.0.
|
15
|
+
VERSION = '3.0.0.beta17'
|
16
16
|
AUTHORS = ['Thooams'].freeze
|
17
17
|
end
|
@@ -17,7 +17,7 @@ module UiBibzForm
|
|
17
17
|
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
18
18
|
surround_field = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&block)
|
19
19
|
errors_text = surround_field.errors.flatten.to_sentence
|
20
|
-
required = surround_field.required_fields.any?
|
20
|
+
required = surround_field.required_fields.any?(true)
|
21
21
|
wrapper_classes = UiBibz::Utils::Screwdriver.join_classes(('has-error' if errors_text.present?), wrapper_html.try(:[], :class))
|
22
22
|
label_classes = UiBibz::Utils::Screwdriver.join_classes(('required' if required), 'control-label')
|
23
23
|
abbr_html = content_tag('abbr', I18n.t(:"simple_form.required.mark", default: '*'), title: I18n.t(:"simple_form.required.text", default: 'required')) if required
|
@@ -32,19 +32,16 @@ module UiBibzForm
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def ui_button_group(content = nil, opts = nil, html_options = nil, &block)
|
35
|
-
|
36
|
-
content = content.merge(template: @template, form: self)
|
37
|
-
|
38
|
-
input_classes = UiBibz::Utils::Screwdriver.join_classes('button_group', options[:input_html].try(:[], :class))
|
39
|
-
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
40
|
-
|
41
|
-
content_tag :div, wrapper_html do
|
42
|
-
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
43
|
-
concat UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, opts, html_options).tap(&block).render
|
44
|
-
end
|
35
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Buttons::ButtonGroup, content, opts, html_options, &block)
|
45
36
|
end
|
46
37
|
|
47
38
|
def ui_choice_group(content = nil, opts = nil, html_options = nil, &block)
|
39
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Choices::ChoiceGroup, content, opts, html_options, &block)
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def ui_component_group_by(component_class, content = nil, opts = nil, html_options = nil, &block)
|
48
45
|
content = (options || {}).merge(content || {})
|
49
46
|
content = content.merge(template: @template, form: self)
|
50
47
|
|
@@ -53,7 +50,7 @@ module UiBibzForm
|
|
53
50
|
|
54
51
|
content_tag :div, wrapper_html do
|
55
52
|
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
56
|
-
concat
|
53
|
+
concat component_class.new(content, opts, html_options).tap(&block).render
|
57
54
|
end
|
58
55
|
end
|
59
56
|
end
|
@@ -60,14 +60,12 @@ module UiBibzInputs
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def collection
|
63
|
-
@collection ||=
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
end
|
70
|
-
end
|
63
|
+
@collection ||= if options[:grouped]
|
64
|
+
grouped_collection.map { |collection| collection.try(:send, group_method) }.detect(&:present?) || []
|
65
|
+
else
|
66
|
+
collection = options.delete(:collection) || self.class.boolean_collection
|
67
|
+
collection.respond_to?(:call) ? collection.call : collection.to_a
|
68
|
+
end
|
71
69
|
end
|
72
70
|
|
73
71
|
def group_method
|
@@ -1,20 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module UiBibzInputs
|
4
|
-
class UiRadioFieldInput <
|
5
|
-
include UiBibz::Ui::Core::Forms::Choices
|
6
|
-
|
4
|
+
class UiRadioFieldInput < UiCheckboxFieldInput
|
7
5
|
def input(_wrapper_options)
|
8
|
-
|
9
|
-
options[:item_wrapper_tag] = :div
|
10
|
-
options[:item_wrapper_class] = i.html_options[:class]
|
11
|
-
|
12
|
-
label_method, value_method = detect_collection_methods
|
13
|
-
|
14
|
-
@builder.send(:collection_radio_buttons,
|
15
|
-
attribute_name, collection, value_method, label_method,
|
16
|
-
input_options, i.html_options,
|
17
|
-
&collection_block_for_nested_boolean_style)
|
6
|
+
UiBibz::Ui::Core::Forms::Choices::RadioField.new(input_attribute_name, new_options, input_html_options).render
|
18
7
|
end
|
19
8
|
end
|
20
9
|
end
|
@@ -1,23 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module UiBibzInputs
|
4
|
-
class UiSwitchFieldInput <
|
4
|
+
class UiSwitchFieldInput < UiCheckboxFieldInput
|
5
5
|
include UiBibz::Ui::Core::Forms::Choices
|
6
6
|
|
7
7
|
def input(_wrapper_options)
|
8
8
|
UiBibz::Ui::Core::Forms::Choices::SwitchField.new(input_attribute_name, new_options, new_input_html_options).render
|
9
9
|
end
|
10
|
-
|
11
|
-
def new_input_html_options
|
12
|
-
input_html_options.merge({ checked: value.nil? ? false : value })
|
13
|
-
end
|
14
|
-
|
15
|
-
def value
|
16
|
-
@value ||= @builder.object.send(attribute_name)
|
17
|
-
end
|
18
|
-
|
19
|
-
def new_options
|
20
|
-
options.merge({ label: attribute_name.to_s.titleize })
|
21
|
-
end
|
22
10
|
end
|
23
11
|
end
|
data/lib/ui_bibz/rails/engine.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# to load pagination in rails app
|
4
|
-
require 'will_paginate' if
|
5
|
-
require 'simple_form' if
|
4
|
+
require 'will_paginate' if Gem.loaded_specs.key?('will_paginate')
|
5
|
+
require 'simple_form' if Gem.loaded_specs.key?('simple_form')
|
6
6
|
|
7
7
|
module UiBibz
|
8
8
|
module Rails
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UiBibz::Ui::Concerns::NavigationConcern #:nodoc:
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
def spacer(num = 'auto')
|
8
|
+
kls = " me-#{num}"
|
9
|
+
@items.last.html_options[:class].nil? ? @items.last.html_options[:class] = kls : @items.last.html_options[:class] << kls
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UiBibz::Ui::Concerns::NotificationConcern #:nodoc:
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
def data_attributes
|
8
|
+
self.class.const_get('DATA_ATTRIBUTES').map do |data_attribute|
|
9
|
+
options[data_attribute].to_s.blank? ? nil : { "data-bs-#{data_attribute}" => data_attribute_value(data_attribute) }
|
10
|
+
end.compact.reduce(&:merge) || {}
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -122,6 +122,10 @@ module UiBibz::Ui::Core
|
|
122
122
|
# To turbolinks
|
123
123
|
data_turbolinks = html_options.try(:[], :data).try(:[], :turbolinks) || options.try(:delete, :turbolinks)
|
124
124
|
add_html_data(:turbolinks, value: data_turbolinks) unless data_turbolinks.nil?
|
125
|
+
|
126
|
+
# To Turbo
|
127
|
+
data_turbo = html_options.try(:[], :data).try(:[], :turbo) || options.try(:delete, :turbo)
|
128
|
+
add_html_data(:turbo, value: data_turbo) unless data_turbo.nil?
|
125
129
|
end
|
126
130
|
|
127
131
|
# Override this method to add html Options
|
@@ -145,7 +149,7 @@ module UiBibz::Ui::Core
|
|
145
149
|
def add_html_data(name, value: true)
|
146
150
|
html_options[:data] = {} if html_options[:data].nil?
|
147
151
|
value = value.is_a?(String) ? value.strip : value
|
148
|
-
html_options[:data].update(
|
152
|
+
html_options[:data].update({ name => value })
|
149
153
|
end
|
150
154
|
|
151
155
|
def disabled?
|
@@ -65,13 +65,13 @@ module UiBibz::Ui::Core::Forms::Choices
|
|
65
65
|
|
66
66
|
def wrapper_html_options
|
67
67
|
(options[:wrapper_html] || {}).tap do |option|
|
68
|
-
option[:class] = UiBibz::Utils::Screwdriver.join_classes(
|
68
|
+
option[:class] = UiBibz::Utils::Screwdriver.join_classes(wrapper_classes, inline, options[:wrapper_html].try(:[], :class))
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
72
|
def label_html_options
|
73
73
|
(options[:label_html] || {}).tap do |option|
|
74
|
-
option[:class] = UiBibz::Utils::Screwdriver.join_classes(
|
74
|
+
option[:class] = UiBibz::Utils::Screwdriver.join_classes(label_classes, options[:label_html].try(:[], :class))
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
@@ -111,5 +111,13 @@ module UiBibz::Ui::Core::Forms::Choices
|
|
111
111
|
def inline
|
112
112
|
'form-check-inline' if options[:inline]
|
113
113
|
end
|
114
|
+
|
115
|
+
def wrapper_classes
|
116
|
+
'form-check'
|
117
|
+
end
|
118
|
+
|
119
|
+
def label_classes
|
120
|
+
'form-check-label'
|
121
|
+
end
|
114
122
|
end
|
115
123
|
end
|
@@ -82,10 +82,14 @@ module UiBibz::Ui::Core::Forms::Choices
|
|
82
82
|
if options[:label]
|
83
83
|
content_tag :label, options[:label], html_options.merge(for: input_id)
|
84
84
|
else
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
generated_label
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def generated_label
|
90
|
+
content_tag :label, html_options.merge(for: input_id) do
|
91
|
+
concat glyph_and_content_html(options[:text].nil? ? @content : ' ')
|
92
|
+
concat badge_html unless options[:badge].nil?
|
89
93
|
end
|
90
94
|
end
|
91
95
|
|
@@ -61,27 +61,8 @@ module UiBibz::Ui::Core::Forms::Choices
|
|
61
61
|
|
62
62
|
private
|
63
63
|
|
64
|
-
def wrapper_html_options
|
65
|
-
(options[:wrapper_html] || {}).tap do |option|
|
66
|
-
option[:class] = UiBibz::Utils::Screwdriver.join_classes('form-check', inline, options[:wrapper_html].try(:[], :class))
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def label_html_options
|
71
|
-
(options[:label_html] || {}).tap do |option|
|
72
|
-
option[:class] = UiBibz::Utils::Screwdriver.join_classes('form-check-label', options[:label_html].try(:[], :class))
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
def radio_field_html_tag
|
77
|
-
content_tag :div, html_options.except(:id) do
|
78
|
-
concat radio_button_tag content, options[:value], options[:checked] || false, checkbox_html_options
|
79
|
-
concat label_tag(label_name, label_content, class: 'form-check-label') if options[:label] != false
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
64
|
def label_name
|
84
|
-
"#{content}_#{options[:value]}"
|
65
|
+
html_options[:id] || "#{content}_#{options[:value]}"
|
85
66
|
end
|
86
67
|
end
|
87
68
|
end
|
@@ -86,7 +86,7 @@ module UiBibz::Ui::Core::Forms::Numbers
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def content_formula_name
|
89
|
-
content.to_s.
|
89
|
+
content.to_s.chars.count { |i| i == ']' }.positive? ? content.to_s.gsub(/]$/, '_formula]') : "#{content}_formula"
|
90
90
|
end
|
91
91
|
|
92
92
|
def state
|
@@ -67,6 +67,7 @@ module UiBibz::Ui::Core::Navigations
|
|
67
67
|
#
|
68
68
|
class Nav < UiBibz::Ui::Core::Component
|
69
69
|
include UiBibz::Ui::Concerns::HtmlConcern
|
70
|
+
include UiBibz::Ui::Concerns::NavigationConcern
|
70
71
|
|
71
72
|
# See UiBibz::Ui::Core::Component.initialize
|
72
73
|
def initialize(content = nil, options = nil, html_options = nil, &block)
|
@@ -108,11 +109,6 @@ module UiBibz::Ui::Core::Navigations
|
|
108
109
|
@items << NavDropdown.new(content, options, html_options).tap(&block)
|
109
110
|
end
|
110
111
|
|
111
|
-
def spacer(num = 'auto')
|
112
|
-
kls = " me-#{num}"
|
113
|
-
@items.last.html_options[:class].nil? ? @items.last.html_options[:class] = kls : @items.last.html_options[:class] << kls
|
114
|
-
end
|
115
|
-
|
116
112
|
protected
|
117
113
|
|
118
114
|
def component_html_classes
|
@@ -75,6 +75,7 @@ module UiBibz::Ui::Core::Navigations
|
|
75
75
|
#
|
76
76
|
class Navbar < UiBibz::Ui::Core::Component
|
77
77
|
include UiBibz::Ui::Concerns::HtmlConcern
|
78
|
+
include UiBibz::Ui::Concerns::NavigationConcern
|
78
79
|
|
79
80
|
# See UiBibz::Ui::Core::Component.initialize
|
80
81
|
def initialize(content = nil, options = nil, html_options = nil, &block)
|
@@ -124,11 +125,6 @@ module UiBibz::Ui::Core::Navigations
|
|
124
125
|
@brand = UiBibz::Ui::Core::Navigations::NavbarBrand.new(content, options, html_options, &block).render
|
125
126
|
end
|
126
127
|
|
127
|
-
def spacer(num = 'auto')
|
128
|
-
kls = " me-#{num}"
|
129
|
-
@items.last.html_options[:class].nil? ? @items.last.html_options[:class] = kls : @items.last.html_options[:class] << kls
|
130
|
-
end
|
131
|
-
|
132
128
|
def id
|
133
129
|
@id ||= generate_id('navbar-id')
|
134
130
|
end
|
@@ -47,6 +47,8 @@ module UiBibz::Ui::Core::Notifications
|
|
47
47
|
# ui_glyph("diamond", popover: { title: "My content", position: :right})
|
48
48
|
#
|
49
49
|
class Popover < UiBibz::Ui::Core::Component
|
50
|
+
include UiBibz::Ui::Concerns::NotificationConcern
|
51
|
+
|
50
52
|
# Note that for security reasons the sanitize, sanitizeFn, and allowList
|
51
53
|
# options cannot be supplied using data attributes.
|
52
54
|
# https://getbootstrap.com/docs/5.0/components/popovers/#options
|
@@ -76,12 +78,6 @@ module UiBibz::Ui::Core::Notifications
|
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
79
|
-
def data_attributes
|
80
|
-
DATA_ATTRIBUTES.map do |data_attribute|
|
81
|
-
options[data_attribute].to_s.blank? ? nil : { "data-bs-#{data_attribute}" => data_attribute_value(data_attribute) }
|
82
|
-
end.compact.reduce(&:merge) || {}
|
83
|
-
end
|
84
|
-
|
85
81
|
def data_attribute_value(data_attribute)
|
86
82
|
options[data_attribute].is_a?(String) ? options[data_attribute].html_safe : options[data_attribute]
|
87
83
|
end
|
@@ -76,13 +76,29 @@ module UiBibz::Ui::Core::Notifications
|
|
76
76
|
|
77
77
|
# Add Body which is a component
|
78
78
|
def body(content = nil, options = nil, html_options = nil, &block)
|
79
|
-
@body =
|
79
|
+
@body = if @header.nil?
|
80
|
+
content_tag :div, class: 'd-flex' do
|
81
|
+
concat UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &block).render
|
82
|
+
concat close_html if (options || {})[:closable]
|
83
|
+
end
|
84
|
+
else
|
85
|
+
UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &block).render
|
86
|
+
end
|
80
87
|
end
|
81
88
|
|
82
89
|
private
|
83
90
|
|
91
|
+
def only_body_html
|
92
|
+
@body = UiBibz::Ui::Core::Notifications::Components::ToastBody.new(content, options, html_options, &block).render
|
93
|
+
end
|
94
|
+
|
95
|
+
def close_html
|
96
|
+
content_tag :button, '', type: 'button', class: close_button_classes,
|
97
|
+
'data-bs-dismiss' => 'toast', 'aria-label' => 'Close'
|
98
|
+
end
|
99
|
+
|
84
100
|
def component_html_classes
|
85
|
-
super << ['toast', status, white_text_color]
|
101
|
+
super << ['toast', status, white_text_color, align_items_center]
|
86
102
|
end
|
87
103
|
|
88
104
|
def component_html_options
|
@@ -98,10 +114,24 @@ module UiBibz::Ui::Core::Notifications
|
|
98
114
|
"bg-#{options[:status]}" if options[:status]
|
99
115
|
end
|
100
116
|
|
117
|
+
def align_items_center
|
118
|
+
'align-items-center' if @header.nil?
|
119
|
+
end
|
120
|
+
|
101
121
|
def white_text_color
|
102
122
|
return if options[:status].nil?
|
103
123
|
|
104
124
|
'text-white' unless %i[info warning info light].include?(options[:status])
|
105
125
|
end
|
126
|
+
|
127
|
+
def white_btn_color
|
128
|
+
return if options[:status].nil?
|
129
|
+
|
130
|
+
'btn-close-white' unless %i[info warning info light].include?(options[:status])
|
131
|
+
end
|
132
|
+
|
133
|
+
def close_button_classes
|
134
|
+
UiBibz::Utils::Screwdriver.join_classes('btn-close', 'me-2', 'm-auto', white_btn_color)
|
135
|
+
end
|
106
136
|
end
|
107
137
|
end
|
@@ -48,6 +48,8 @@ module UiBibz::Ui::Core::Notifications
|
|
48
48
|
# ui_glyph("diamond", tooltip: { title: "My content", position: :right})
|
49
49
|
#
|
50
50
|
class Tooltip < UiBibz::Ui::Core::Component
|
51
|
+
include UiBibz::Ui::Concerns::NotificationConcern
|
52
|
+
|
51
53
|
# Note that for security reasons the sanitize, sanitizeFn, and allowList
|
52
54
|
# options cannot be supplied using data attributes.
|
53
55
|
# https://getbootstrap.com/docs/5.0/components/tooltips/#options
|
@@ -76,12 +78,6 @@ module UiBibz::Ui::Core::Notifications
|
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
79
|
-
def data_attributes
|
80
|
-
DATA_ATTRIBUTES.map do |data_attribute|
|
81
|
-
options[data_attribute].to_s.blank? ? nil : { "data-bs-#{data_attribute}" => data_attribute_value(data_attribute) }
|
82
|
-
end.compact.reduce(&:merge) || {}
|
83
|
-
end
|
84
|
-
|
85
81
|
def data_attribute_value(data_attribute)
|
86
82
|
options[data_attribute].is_a?(String) ? options[data_attribute].html_safe : options[data_attribute]
|
87
83
|
end
|
@@ -52,7 +52,7 @@ module UiBibz::Ui::Ux::Tables
|
|
52
52
|
def defaults_actions
|
53
53
|
[
|
54
54
|
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(show_name, url: { controller: @store.controller, action: 'show', id: :id }, glyph: 'eye').render,
|
55
|
-
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(edit_name, url: { controller: @store.controller, action: 'edit', id: :id }, glyph: '
|
55
|
+
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(edit_name, url: { controller: @store.controller, action: 'edit', id: :id }, glyph: 'edit').render,
|
56
56
|
UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(delete_name, { glyph: 'trash', url: { controller: @store.controller, action: 'destroy', id: :id }, link_html_options: { data: { confirm: 'Are you sure?', method: :delete } } }).render
|
57
57
|
]
|
58
58
|
end
|
@@ -8,6 +8,9 @@ module UiBibz::Ui::Ux::Tables
|
|
8
8
|
|
9
9
|
# Store Use WillPaginate store methods
|
10
10
|
def initialize(store)
|
11
|
+
raise 'Store is nil!' if store.nil?
|
12
|
+
raise 'Store can be created only with "table_search_pagination" method!' if store.try(:records).nil?
|
13
|
+
|
11
14
|
@records = store.records
|
12
15
|
@store = store
|
13
16
|
@model = store.model
|
@@ -26,9 +26,6 @@ module UiBibz::Ui::Ux::Tables
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def store
|
29
|
-
raise 'Store is nil!' if @search_field.options[:store].nil?
|
30
|
-
raise 'Store can be created only with "table_search_pagination" method!' if @search_field.options[:store].try(:records).nil?
|
31
|
-
|
32
29
|
@store ||= Store.new @search_field.options[:store]
|
33
30
|
end
|
34
31
|
end
|
@@ -53,9 +53,6 @@ module UiBibz::Ui::Ux::Tables
|
|
53
53
|
|
54
54
|
# Store must be generated by *table_search_pagination* method
|
55
55
|
def store
|
56
|
-
raise 'Store is nil!' if @pagination.options[:store].nil?
|
57
|
-
raise 'Store can be created only with "table_search_pagination" method!' if @pagination.options[:store].try(:records).nil?
|
58
|
-
|
59
56
|
@store ||= Store.new @pagination.options[:store]
|
60
57
|
end
|
61
58
|
end
|
@@ -46,9 +46,6 @@ module UiBibz::Ui::Ux::Tables
|
|
46
46
|
private
|
47
47
|
|
48
48
|
def store
|
49
|
-
raise 'Store is nil!' if @per_page_field.options[:store].nil?
|
50
|
-
raise 'Store can be created only with "table_search_pagination" method!' if @per_page_field.options[:store].try(:records).nil?
|
51
|
-
|
52
49
|
@store ||= Store.new @per_page_field.options[:store]
|
53
50
|
end
|
54
51
|
|
data/test/simple_form_test.rb
CHANGED
@@ -132,10 +132,10 @@ test1</textarea></div></form>"
|
|
132
132
|
|
133
133
|
test 'radio field input in simple form' do
|
134
134
|
actual = simple_form_for @user do |f|
|
135
|
-
f.input :name_fr, as: :ui_radio_field,
|
135
|
+
f.input :name_fr, as: :ui_radio_field, label: 'Radio 1', input_html: { id: "radio_1" }
|
136
136
|
end
|
137
137
|
|
138
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_radio_field optional user_name_fr\"><
|
138
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_radio_field optional user_name_fr\"><div class=\"form-check\"><input type=\"radio\" name=\"user[name_fr]\" id=\"radio_1\" value=\"test1\" class=\"ui_radio_field optional form-check-input\" /><label class=\"form-check-label\" for=\"radio_1\">Radio 1</label></div></div></form>"
|
139
139
|
|
140
140
|
assert_equal expected, actual
|
141
141
|
end
|
@@ -237,31 +237,40 @@ test1</textarea></div></form>"
|
|
237
237
|
assert_equal expected, actual
|
238
238
|
end
|
239
239
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
240
|
+
test 'ui_button_group' do
|
241
|
+
actual = ui_form_for @user do |f|
|
242
|
+
f.ui_button_group do |bg|
|
243
|
+
bg.button "test"
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"button_group\"><div class=\"btn-group\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div></div></form>"
|
248
|
+
|
249
|
+
assert_equal expected, actual
|
250
|
+
end
|
251
|
+
|
252
|
+
test 'ui_choice_group' do
|
253
|
+
actual = ui_form_for @user do |f|
|
254
|
+
f.ui_choice_group do |cg|
|
255
|
+
cg.input :name_fr, as: :ui_checkbox_field
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"button_group\"><div data-toggle=\"buttons\" class=\"btn-group button-choice btn-group-toggle\"><div class=\"form-check\"><input type=\"checkbox\" name=\"user[name_fr]\" id=\"user_name_fr\" value=\"test1\" class=\"ui_checkbox_field optional form-check-input\" checked=\"checked\" /><label class=\"form-check-label\" for=\"user_name_fr\">Name Fr</label></div></div></div></form>"
|
260
|
+
|
261
|
+
assert_equal expected, actual
|
262
|
+
end
|
263
|
+
|
264
|
+
test 'test surround field into simple form' do
|
265
|
+
actual = ui_form_for @user do |f|
|
266
|
+
f.ui_surround_field do |sf|
|
267
|
+
sf.input :name_en, as: :ui_text_field
|
268
|
+
sf.addon("€")
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
expected = "<form class=\"simple_form\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group surround_field\"><div class=\"input-group ui_surround_field\"><input type=\"text\" name=\"user[name_en]\" id=\"user_name_en\" value=\"test1 en\" class=\"form-control string ui_text_field optional\" /><span class=\"input-group-text\">€</span></div></div></form>"
|
273
|
+
|
274
|
+
assert_equal expected, actual
|
275
|
+
end
|
267
276
|
end
|
@@ -9,7 +9,7 @@ class ToastTest < ActionView::TestCase
|
|
9
9
|
t.header 'My header toast', glyph: 'eye', time: 'Now', class: 'my-header-toast'
|
10
10
|
t.body 'My body toast', class: 'my-body-toast'
|
11
11
|
end
|
12
|
-
expected = "<div data-bs-autohide=\"true\" class=\"my-toast toast\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\"><div class=\"my-header-toast toast-header\"><i class=\"me-2 glyph fas fa-eye\"></i><strong class=\"me-auto\">My header toast</strong><small class=\"text-muted\">Now</small><button class=\"ml-2 mb-1 btn-close\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button></div><div class=\"my-body-toast toast-body\">My body toast</div></div>"
|
12
|
+
expected = "<div data-bs-autohide=\"true\" class=\"my-toast toast align-items-center\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\"><div class=\"my-header-toast toast-header\"><i class=\"me-2 glyph fas fa-eye\"></i><strong class=\"me-auto\">My header toast</strong><small class=\"text-muted\">Now</small><button class=\"ml-2 mb-1 btn-close\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button></div><div class=\"my-body-toast toast-body\">My body toast</div></div>"
|
13
13
|
|
14
14
|
assert_equal expected, actual
|
15
15
|
end
|
@@ -18,7 +18,7 @@ class ToastTest < ActionView::TestCase
|
|
18
18
|
actual = ui_toast do
|
19
19
|
'My body toast'
|
20
20
|
end
|
21
|
-
expected = "<div class=\"toast\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\"><div class=\"toast-body\">My body toast</div></div>"
|
21
|
+
expected = "<div class=\"toast align-items-center\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\"><div class=\"d-flex\"><div class=\"toast-body\">My body toast</div></div></div>"
|
22
22
|
|
23
23
|
assert_equal expected, actual
|
24
24
|
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.beta17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thooams [Thomas HUMMEL]
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -240,7 +240,7 @@ dependencies:
|
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0'
|
243
|
-
description: A Rails Interface Framework using Bootstrap 5.0.0.
|
243
|
+
description: A Rails Interface Framework using Bootstrap 5.0.0.beta3.
|
244
244
|
email: thomas@hummel.link
|
245
245
|
executables:
|
246
246
|
- test
|
@@ -312,6 +312,8 @@ files:
|
|
312
312
|
- lib/ui_bibz/ui/base.rb
|
313
313
|
- lib/ui_bibz/ui/concerns/card_itemable_concern.rb
|
314
314
|
- lib/ui_bibz/ui/concerns/html_concern.rb
|
315
|
+
- lib/ui_bibz/ui/concerns/navigation_concern.rb
|
316
|
+
- lib/ui_bibz/ui/concerns/notification_concern.rb
|
315
317
|
- lib/ui_bibz/ui/core/boxes/card.rb
|
316
318
|
- lib/ui_bibz/ui/core/boxes/card_accordion.rb
|
317
319
|
- lib/ui_bibz/ui/core/boxes/card_column.rb
|
@@ -666,7 +668,7 @@ rubygems_version: 3.1.2
|
|
666
668
|
signing_key:
|
667
669
|
specification_version: 4
|
668
670
|
summary: Ui Bibz is an Ui Framework that allows you to build an interface very quickly
|
669
|
-
and simply using Bootstrap 5.0.0.
|
671
|
+
and simply using Bootstrap 5.0.0.beta3.
|
670
672
|
test_files:
|
671
673
|
- test/dummy/README.rdoc
|
672
674
|
- test/dummy/Rakefile
|