ui_bibz 2.0.0.alpha32 → 2.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +111 -87
  4. data/app/assets/javascripts/form.coffee +24 -8
  5. data/app/assets/javascripts/ui_bibz.coffee +3 -2
  6. data/app/assets/stylesheets/bootstrap-switch.sass +17 -8
  7. data/app/assets/stylesheets/fix-dropdown-select.sass +1 -1
  8. data/app/assets/stylesheets/table.sass +1 -1
  9. data/app/assets/stylesheets/ui_bibz.sass +60 -22
  10. data/app/inputs/ui_bibz_form/ui_bibz_form_builder.rb +35 -0
  11. data/app/inputs/ui_bibz_inputs/auto_complete_field_input.rb +14 -0
  12. data/app/inputs/{custom_inputs → ui_bibz_inputs}/base_input.rb +7 -1
  13. data/app/inputs/{custom_inputs → ui_bibz_inputs}/collection_input.rb +6 -3
  14. data/app/inputs/{custom_inputs → ui_bibz_inputs}/string_input.rb +5 -1
  15. data/app/inputs/ui_bibz_inputs/ui_auto_complete_field_input.rb +14 -0
  16. data/app/inputs/ui_bibz_inputs/ui_button_choices_input.rb +20 -0
  17. data/app/inputs/{custom_inputs/date_picker_field_input.rb → ui_bibz_inputs/ui_date_picker_field_input.rb} +2 -2
  18. data/app/inputs/{custom_inputs/dropdown_select_field_input.rb → ui_bibz_inputs/ui_dropdown_select_field_input.rb} +2 -2
  19. data/app/inputs/{custom_inputs/formula_field_input.rb → ui_bibz_inputs/ui_formula_field_input.rb} +2 -2
  20. data/app/inputs/{custom_inputs/markdown_editor_field_input.rb → ui_bibz_inputs/ui_markdown_editor_field_input.rb} +2 -2
  21. data/app/inputs/{custom_inputs/multi_column_field_input.rb → ui_bibz_inputs/ui_multi_column_field_input.rb} +2 -2
  22. data/app/inputs/ui_bibz_inputs/ui_multi_select_field_input.rb +9 -0
  23. data/app/inputs/{custom_inputs/radio_field_input.rb → ui_bibz_inputs/ui_radio_field_input.rb} +2 -2
  24. data/app/inputs/{custom_inputs/select_field_input.rb → ui_bibz_inputs/ui_select_field_input.rb} +2 -2
  25. data/app/inputs/{custom_inputs/switch_field_input.rb → ui_bibz_inputs/ui_switch_field_input.rb} +2 -2
  26. data/app/inputs/ui_bibz_inputs/ui_text_field_input.rb +13 -0
  27. data/config/initializers/ui_bibz.rb +7 -0
  28. data/lib/ui_bibz/helpers/ui/core/cards_helper.rb +42 -0
  29. data/lib/ui_bibz/helpers/ui/core/dropdowns_helper.rb +21 -0
  30. data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +148 -0
  31. data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +27 -0
  32. data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +11 -0
  33. data/lib/ui_bibz/helpers/ui/core/navs_helper.rb +27 -0
  34. data/lib/ui_bibz/helpers/ui/core/paths_helper.rb +16 -0
  35. data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +11 -0
  36. data/lib/ui_bibz/helpers/ui/core_helper.rb +89 -0
  37. data/lib/ui_bibz/helpers/{ui_ux_helper.rb → ui/ux_helper.rb} +8 -18
  38. data/lib/ui_bibz/helpers/utils_helper.rb +22 -1
  39. data/lib/ui_bibz/rails/engine.rb +6 -2
  40. data/lib/ui_bibz/ui/base.rb +4 -0
  41. data/lib/ui_bibz/ui/core/{tag.rb → badge.rb} +10 -10
  42. data/lib/ui_bibz/ui/core/cards/card.rb +37 -13
  43. data/lib/ui_bibz/ui/core/cards/components/{block/card_block_link.rb → body/card_body_link.rb} +6 -6
  44. data/lib/ui_bibz/ui/core/cards/components/{block/card_block_text.rb → body/card_body_text.rb} +6 -6
  45. data/lib/ui_bibz/ui/core/cards/components/{block/card_block_title.rb → body/card_body_title.rb} +6 -6
  46. data/lib/ui_bibz/ui/core/cards/components/{card_block.rb → card_body.rb} +17 -13
  47. data/lib/ui_bibz/ui/core/cards/components/card_footer.rb +5 -1
  48. data/lib/ui_bibz/ui/core/cards/components/card_header.rb +5 -1
  49. data/lib/ui_bibz/ui/core/cards/components/card_image.rb +3 -2
  50. data/lib/ui_bibz/ui/core/component.rb +8 -6
  51. data/lib/ui_bibz/ui/core/dropdowns/dropdown.rb +21 -5
  52. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +37 -8
  53. data/lib/ui_bibz/ui/core/forms/buttons/button_choice.rb +17 -29
  54. data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +51 -11
  55. data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +18 -5
  56. data/lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb +13 -4
  57. data/lib/ui_bibz/ui/core/forms/buttons/button_toolbar.rb +90 -0
  58. data/lib/ui_bibz/ui/core/forms/buttons/components/choice.rb +116 -0
  59. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +21 -8
  60. data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +22 -9
  61. data/lib/ui_bibz/ui/core/forms/choices/switch_field.rb +17 -5
  62. data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +36 -16
  63. data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +20 -19
  64. data/lib/ui_bibz/ui/core/forms/selects/abstract_select.rb +99 -0
  65. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +16 -16
  66. data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +8 -13
  67. data/lib/ui_bibz/ui/core/forms/selects/multi_select_field.rb +17 -18
  68. data/lib/ui_bibz/ui/core/forms/selects/select_field.rb +8 -20
  69. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_addon.rb +25 -0
  70. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +16 -0
  71. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_group.rb +16 -0
  72. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +16 -0
  73. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_refresh.rb +16 -0
  74. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_checkbox_field.rb +16 -0
  75. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_dropdown.rb +16 -0
  76. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_radio_field.rb +16 -0
  77. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_switch_field.rb +16 -0
  78. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +153 -0
  79. data/lib/ui_bibz/ui/core/forms/texts/auto_complete_field.rb +13 -38
  80. data/lib/ui_bibz/ui/core/forms/texts/text_field.rb +81 -0
  81. data/lib/ui_bibz/ui/core/glyph.rb +1 -1
  82. data/lib/ui_bibz/ui/core/layouts/col.rb +10 -2
  83. data/lib/ui_bibz/ui/core/layouts/row.rb +7 -1
  84. data/lib/ui_bibz/ui/core/lists/components/list/list_body.rb +4 -2
  85. data/lib/ui_bibz/ui/core/lists/components/list/list_header.rb +5 -2
  86. data/lib/ui_bibz/ui/core/lists/components/list.rb +35 -14
  87. data/lib/ui_bibz/ui/core/lists/list_group.rb +4 -4
  88. data/lib/ui_bibz/ui/core/navs/components/navbar_form.rb +7 -2
  89. data/lib/ui_bibz/ui/core/navs/components/navbar_nav.rb +4 -0
  90. data/lib/ui_bibz/ui/core/navs/components/navbar_text.rb +1 -1
  91. data/lib/ui_bibz/ui/core/navs/components/pagination_link.rb +60 -0
  92. data/lib/ui_bibz/ui/core/navs/nav.rb +31 -3
  93. data/lib/ui_bibz/ui/core/navs/navbar.rb +32 -22
  94. data/lib/ui_bibz/ui/core/navs/pagination.rb +97 -0
  95. data/lib/ui_bibz/ui/core/{alert.rb → notifications/alert.rb} +23 -11
  96. data/lib/ui_bibz/ui/core/notifications/components/alert_body.rb +50 -0
  97. data/lib/ui_bibz/ui/core/notifications/components/alert_header.rb +67 -0
  98. data/lib/ui_bibz/ui/core/{progress.rb → progresses/components/bar.rb} +21 -28
  99. data/lib/ui_bibz/ui/core/progresses/progress_bar.rb +115 -0
  100. data/lib/ui_bibz/ui/core/windows/components/modal_header.rb +1 -1
  101. data/lib/ui_bibz/ui/{core → extensions/core}/component/glyph_extension.rb +2 -2
  102. data/lib/ui_bibz/ui/{core → extensions/core}/component/klass_extension.rb +1 -2
  103. data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +31 -0
  104. data/lib/ui_bibz/ui/extensions/core/forms/surround_extension.rb +48 -0
  105. data/lib/ui_bibz/utils/internationalization.rb +9 -0
  106. data/lib/ui_bibz/version.rb +1 -1
  107. data/lib/ui_bibz.rb +23 -7
  108. data/test/simple_form_test.rb +58 -41
  109. data/test/ui/core/badge_test.rb +19 -0
  110. data/test/ui/core/cards/card_test.rb +34 -35
  111. data/test/ui/{component_test.rb → core/component_test.rb} +0 -1
  112. data/test/ui/core/dropdowns/dropdown_test.rb +5 -5
  113. data/test/ui/core/forms/buttons/button_choice_test.rb +23 -7
  114. data/test/ui/core/forms/buttons/button_group_test.rb +35 -17
  115. data/test/ui/core/forms/buttons/button_link_test.rb +74 -4
  116. data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -2
  117. data/test/ui/core/forms/buttons/button_test.rb +66 -3
  118. data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -2
  119. data/test/ui/core/forms/choices/radio_field_test.rb +1 -2
  120. data/test/ui/core/forms/choices/switch_field_test.rb +0 -1
  121. data/test/ui/core/forms/dates/date_picker_field_test.rb +2 -3
  122. data/test/ui/core/forms/numbers/formula_field_test.rb +1 -2
  123. data/test/ui/core/forms/selects/dropdown_select_field_test.rb +1 -2
  124. data/test/ui/core/forms/selects/multi_column_field_test.rb +0 -1
  125. data/test/ui/core/forms/selects/multi_select_field_test.rb +1 -2
  126. data/test/ui/core/forms/selects/select_field_test.rb +1 -2
  127. data/test/ui/core/forms/surrounds/surround_field_test.rb +58 -0
  128. data/test/ui/core/forms/textareas/markdown_editor_field_test.rb +0 -1
  129. data/test/ui/core/forms/texts/auto_complete_field_test.rb +21 -4
  130. data/test/ui/core/forms/texts/text_field_test.rb +25 -0
  131. data/test/ui/{glyph_test.rb → core/glyph_test.rb} +5 -5
  132. data/test/ui/core/jumbotron_test.rb +20 -0
  133. data/test/ui/core/layouts/col_test.rb +31 -0
  134. data/test/ui/core/layouts/container_test.rb +13 -0
  135. data/test/ui/core/layouts/row_test.rb +24 -0
  136. data/test/ui/core/lists/list_group_test.rb +5 -4
  137. data/test/ui/core/navs/nav_test.rb +4 -5
  138. data/test/ui/core/navs/navbar_test.rb +39 -0
  139. data/test/ui/core/notifications/alert_test.rb +22 -0
  140. data/test/ui/core/paths/breadcrumb_test.rb +15 -4
  141. data/test/ui/core/progress_test.rb +14 -0
  142. data/test/ui/{star_test.rb → core/star_test.rb} +6 -7
  143. data/test/ui/core/windows/modal_test.rb +20 -0
  144. data/test/ui/ux/tables/table_test.rb +2 -3
  145. data/ui_bibz.gemspec +2 -1
  146. data/vendor/assets/javascripts/bootstrap-select.min.js +8 -7
  147. data/vendor/assets/stylesheets/awesome-bootstrap-checkbox.scss +62 -42
  148. data/vendor/assets/stylesheets/bootstrap-multiselect.min.css +1 -1
  149. data/vendor/assets/stylesheets/bootstrap-select.min.css +3 -3
  150. data/vendor/assets/stylesheets/bootstrap-theme.min.css +1 -1
  151. metadata +105 -44
  152. data/app/inputs/custom_inputs/auto_complete_field_input.rb +0 -16
  153. data/app/inputs/custom_inputs/multi_select_field_input.rb +0 -9
  154. data/app/inputs/custom_inputs/surround_field_input.rb +0 -10
  155. data/lib/ui_bibz/helpers/ui_core_helper.rb +0 -347
  156. data/lib/ui_bibz/ui/core/connected_component.rb +0 -87
  157. data/lib/ui_bibz/ui/core/forms/texts/surround_field.rb +0 -87
  158. data/test/ui/core/forms/texts/surround_field_test.rb +0 -26
  159. data/test/ui/grid_test.rb +0 -31
  160. data/test/ui_helper_test.rb +0 -109
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13c165c8b118ccfdb52a75561669670e5f99fece
4
- data.tar.gz: a8c0ad31172edcda2a4691cb4b797f01f7588e6a
3
+ metadata.gz: 0b836c1ac66951ffaf83b989d019ec5a92454c00
4
+ data.tar.gz: 9e15a15aa1a0b7161de8f8f034db1c3ccb6b4da0
5
5
  SHA512:
6
- metadata.gz: b3a7e6c0e34de9f4fa6b2f12e1cb737ea4735304d6ffefa5c477b875108871231482b09a96907cae1647f0b8b7c64897e73f90fb8145640068708a3e789c4890
7
- data.tar.gz: a254e7d3520e11c26d5c073c874580fdc0a621c2b22840acdddf7ab73a4095b6999b947ff89867cc93e95030a67059d82279685e69869a0c5eaad6fd903acf4b
6
+ metadata.gz: b040fdc375f75c72b4983a933908c9e1f55b2648024f450600e8e71de6d853de13baa4af83b9441a44c7796ae5bd75a4f7e52485f1b03764c89621df4b8ff6f9
7
+ data.tar.gz: e39de5a39ee465cb6060a2db30145b8838aeb6e459c6973423ec110534e62c2a28ab70be4b2fc6d688b523aedd8fdf4036a16e237b6e271362de7a86dfd1dc45
data/Gemfile CHANGED
@@ -18,6 +18,7 @@ gemspec
18
18
  # your gem to rubygems.org.
19
19
 
20
20
  # To use a debugger
21
- #gem 'byebug', group: [:development, :test]
21
+ gem 'byebug', group: [:development, :test]
22
22
  gem 'simple_form', group: [:test, :development]
23
23
  gem 'awesome_print', group: [:test, :development]
24
+ gem 'jquery-rails', '>= 3.1.0'
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.0.0.alpha32)
5
- bootstrap (= 4.0.0.alpha5)
4
+ ui_bibz (2.0.0.beta2)
5
+ bootstrap (= 4.0.0.beta2)
6
6
  font-awesome-sass
7
7
  haml
8
8
  haml-rails
9
+ jquery-rails (>= 3.1.0)
9
10
  rails (>= 4.2.0)
10
11
  sass-rails (>= 5.0.0)
11
12
  will-paginate-i18n
@@ -15,167 +16,190 @@ PATH
15
16
  GEM
16
17
  remote: https://rubygems.org/
17
18
  specs:
18
- actioncable (5.0.2)
19
- actionpack (= 5.0.2)
20
- nio4r (>= 1.2, < 3.0)
19
+ actioncable (5.1.4)
20
+ actionpack (= 5.1.4)
21
+ nio4r (~> 2.0)
21
22
  websocket-driver (~> 0.6.1)
22
- actionmailer (5.0.2)
23
- actionpack (= 5.0.2)
24
- actionview (= 5.0.2)
25
- activejob (= 5.0.2)
23
+ actionmailer (5.1.4)
24
+ actionpack (= 5.1.4)
25
+ actionview (= 5.1.4)
26
+ activejob (= 5.1.4)
26
27
  mail (~> 2.5, >= 2.5.4)
27
28
  rails-dom-testing (~> 2.0)
28
- actionpack (5.0.2)
29
- actionview (= 5.0.2)
30
- activesupport (= 5.0.2)
29
+ actionpack (5.1.4)
30
+ actionview (= 5.1.4)
31
+ activesupport (= 5.1.4)
31
32
  rack (~> 2.0)
32
- rack-test (~> 0.6.3)
33
+ rack-test (>= 0.6.3)
33
34
  rails-dom-testing (~> 2.0)
34
35
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
- actionview (5.0.2)
36
- activesupport (= 5.0.2)
36
+ actionview (5.1.4)
37
+ activesupport (= 5.1.4)
37
38
  builder (~> 3.1)
38
- erubis (~> 2.7.0)
39
+ erubi (~> 1.4)
39
40
  rails-dom-testing (~> 2.0)
40
41
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
41
- activejob (5.0.2)
42
- activesupport (= 5.0.2)
42
+ activejob (5.1.4)
43
+ activesupport (= 5.1.4)
43
44
  globalid (>= 0.3.6)
44
- activemodel (5.0.2)
45
- activesupport (= 5.0.2)
46
- activerecord (5.0.2)
47
- activemodel (= 5.0.2)
48
- activesupport (= 5.0.2)
49
- arel (~> 7.0)
50
- activesupport (5.0.2)
45
+ activemodel (5.1.4)
46
+ activesupport (= 5.1.4)
47
+ activerecord (5.1.4)
48
+ activemodel (= 5.1.4)
49
+ activesupport (= 5.1.4)
50
+ arel (~> 8.0)
51
+ activesupport (5.1.4)
51
52
  concurrent-ruby (~> 1.0, >= 1.0.2)
52
53
  i18n (~> 0.7)
53
54
  minitest (~> 5.1)
54
55
  tzinfo (~> 1.1)
55
- arel (7.1.4)
56
- autoprefixer-rails (6.7.7.1)
56
+ arel (8.0.0)
57
+ autoprefixer-rails (7.1.6)
57
58
  execjs
58
- awesome_print (1.7.0)
59
- bootstrap (4.0.0.alpha5)
59
+ awesome_print (1.8.0)
60
+ bootstrap (4.0.0.beta2)
60
61
  autoprefixer-rails (>= 6.0.3)
61
- sass (>= 3.4.19)
62
+ popper_js (>= 1.12.3, < 2)
63
+ sass (>= 3.5.2)
62
64
  builder (3.2.3)
65
+ byebug (9.1.0)
63
66
  codeclimate-test-reporter (1.0.8)
64
67
  simplecov (<= 0.13)
65
68
  concurrent-ruby (1.0.5)
69
+ crass (1.0.2)
66
70
  docile (1.1.5)
71
+ erubi (1.7.0)
67
72
  erubis (2.7.0)
68
73
  execjs (2.7.0)
69
- factory_girl (4.8.0)
74
+ factory_girl (4.9.0)
70
75
  activesupport (>= 3.0.0)
71
- factory_girl_rails (4.8.0)
72
- factory_girl (~> 4.8.0)
76
+ factory_girl_rails (4.9.0)
77
+ factory_girl (~> 4.9.0)
73
78
  railties (>= 3.0.0)
79
+ ffi (1.9.18)
74
80
  font-awesome-sass (4.7.0)
75
81
  sass (>= 3.2)
76
- globalid (0.3.7)
77
- activesupport (>= 4.1.0)
78
- haml (4.0.7)
82
+ globalid (0.4.1)
83
+ activesupport (>= 4.2.0)
84
+ haml (5.0.4)
85
+ temple (>= 0.8.0)
79
86
  tilt
80
- haml-rails (0.9.0)
87
+ haml-rails (1.0.0)
81
88
  actionpack (>= 4.0.1)
82
89
  activesupport (>= 4.0.1)
83
- haml (>= 4.0.6, < 5.0)
90
+ haml (>= 4.0.6, < 6.0)
84
91
  html2haml (>= 1.0.1)
85
92
  railties (>= 4.0.1)
86
- html2haml (2.1.0)
93
+ html2haml (2.2.0)
87
94
  erubis (~> 2.7.0)
88
- haml (~> 4.0)
95
+ haml (>= 4.0, < 6)
89
96
  nokogiri (>= 1.6.0)
90
97
  ruby_parser (~> 3.5)
91
- i18n (0.8.1)
92
- json (2.0.3)
93
- loofah (2.0.3)
98
+ i18n (0.9.0)
99
+ concurrent-ruby (~> 1.0)
100
+ jquery-rails (4.3.1)
101
+ rails-dom-testing (>= 1, < 3)
102
+ railties (>= 4.2.0)
103
+ thor (>= 0.14, < 2.0)
104
+ json (2.1.0)
105
+ loofah (2.1.1)
106
+ crass (~> 1.0.2)
94
107
  nokogiri (>= 1.5.9)
95
- mail (2.6.4)
108
+ mail (2.6.6)
96
109
  mime-types (>= 1.16, < 4)
97
- method_source (0.8.2)
110
+ method_source (0.9.0)
98
111
  mime-types (3.1)
99
112
  mime-types-data (~> 3.2015)
100
113
  mime-types-data (3.2016.0521)
101
- mini_portile2 (2.1.0)
102
- minitest (5.10.1)
103
- nio4r (2.0.0)
104
- nokogiri (1.7.1)
105
- mini_portile2 (~> 2.1.0)
106
- rack (2.0.1)
107
- rack-test (0.6.3)
108
- rack (>= 1.0)
109
- rails (5.0.2)
110
- actioncable (= 5.0.2)
111
- actionmailer (= 5.0.2)
112
- actionpack (= 5.0.2)
113
- actionview (= 5.0.2)
114
- activejob (= 5.0.2)
115
- activemodel (= 5.0.2)
116
- activerecord (= 5.0.2)
117
- activesupport (= 5.0.2)
118
- bundler (>= 1.3.0, < 2.0)
119
- railties (= 5.0.2)
114
+ mini_portile2 (2.3.0)
115
+ minitest (5.10.3)
116
+ nio4r (2.1.0)
117
+ nokogiri (1.8.1)
118
+ mini_portile2 (~> 2.3.0)
119
+ popper_js (1.12.5)
120
+ rack (2.0.3)
121
+ rack-test (0.7.0)
122
+ rack (>= 1.0, < 3)
123
+ rails (5.1.4)
124
+ actioncable (= 5.1.4)
125
+ actionmailer (= 5.1.4)
126
+ actionpack (= 5.1.4)
127
+ actionview (= 5.1.4)
128
+ activejob (= 5.1.4)
129
+ activemodel (= 5.1.4)
130
+ activerecord (= 5.1.4)
131
+ activesupport (= 5.1.4)
132
+ bundler (>= 1.3.0)
133
+ railties (= 5.1.4)
120
134
  sprockets-rails (>= 2.0.0)
121
- rails-dom-testing (2.0.2)
122
- activesupport (>= 4.2.0, < 6.0)
123
- nokogiri (~> 1.6)
135
+ rails-dom-testing (2.0.3)
136
+ activesupport (>= 4.2.0)
137
+ nokogiri (>= 1.6)
124
138
  rails-html-sanitizer (1.0.3)
125
139
  loofah (~> 2.0)
126
- railties (5.0.2)
127
- actionpack (= 5.0.2)
128
- activesupport (= 5.0.2)
140
+ railties (5.1.4)
141
+ actionpack (= 5.1.4)
142
+ activesupport (= 5.1.4)
129
143
  method_source
130
144
  rake (>= 0.8.7)
131
145
  thor (>= 0.18.1, < 2.0)
132
- rake (12.0.0)
133
- ruby_parser (3.8.4)
134
- sexp_processor (~> 4.1)
135
- sass (3.4.23)
146
+ rake (12.2.1)
147
+ rb-fsevent (0.10.2)
148
+ rb-inotify (0.9.10)
149
+ ffi (>= 0.5.0, < 2)
150
+ ruby_parser (3.10.1)
151
+ sexp_processor (~> 4.9)
152
+ sass (3.5.3)
153
+ sass-listen (~> 4.0.0)
154
+ sass-listen (4.0.0)
155
+ rb-fsevent (~> 0.9, >= 0.9.4)
156
+ rb-inotify (~> 0.9, >= 0.9.7)
136
157
  sass-rails (5.0.6)
137
158
  railties (>= 4.0.0, < 6)
138
159
  sass (~> 3.1)
139
160
  sprockets (>= 2.8, < 4.0)
140
161
  sprockets-rails (>= 2.0, < 4.0)
141
162
  tilt (>= 1.1, < 3)
142
- sexp_processor (4.8.0)
143
- simple_form (3.4.0)
144
- actionpack (> 4, < 5.1)
145
- activemodel (> 4, < 5.1)
163
+ sexp_processor (4.10.0)
164
+ simple_form (3.5.0)
165
+ actionpack (> 4, < 5.2)
166
+ activemodel (> 4, < 5.2)
146
167
  simplecov (0.13.0)
147
168
  docile (~> 1.1.0)
148
169
  json (>= 1.8, < 3)
149
170
  simplecov-html (~> 0.10.0)
150
- simplecov-html (0.10.0)
171
+ simplecov-html (0.10.2)
151
172
  sprockets (3.7.1)
152
173
  concurrent-ruby (~> 1.0)
153
174
  rack (> 1, < 3)
154
- sprockets-rails (3.2.0)
175
+ sprockets-rails (3.2.1)
155
176
  actionpack (>= 4.0)
156
177
  activesupport (>= 4.0)
157
178
  sprockets (>= 3.0.0)
158
179
  sqlite3 (1.3.13)
159
- thor (0.19.4)
180
+ temple (0.8.0)
181
+ thor (0.20.0)
160
182
  thread_safe (0.3.6)
161
- tilt (2.0.7)
162
- tzinfo (1.2.3)
183
+ tilt (2.0.8)
184
+ tzinfo (1.2.4)
163
185
  thread_safe (~> 0.1)
164
186
  websocket-driver (0.6.5)
165
187
  websocket-extensions (>= 0.1.0)
166
188
  websocket-extensions (0.1.2)
167
189
  will-paginate-i18n (0.1.15)
168
- will_paginate (3.1.5)
169
- will_paginate-bootstrap4 (0.1.2)
170
- will_paginate (~> 3.0, >= 3.0.9)
190
+ will_paginate (3.1.6)
191
+ will_paginate-bootstrap4 (0.1.3)
192
+ will_paginate (~> 3.0, >= 3.0.0)
171
193
 
172
194
  PLATFORMS
173
195
  ruby
174
196
 
175
197
  DEPENDENCIES
176
198
  awesome_print
199
+ byebug
177
200
  codeclimate-test-reporter
178
201
  factory_girl_rails (~> 4.0)
202
+ jquery-rails (>= 3.1.0)
179
203
  minitest
180
204
  simple_form
181
205
  simplecov
@@ -183,4 +207,4 @@ DEPENDENCIES
183
207
  ui_bibz!
184
208
 
185
209
  BUNDLED WITH
186
- 1.13.6
210
+ 1.15.4
@@ -1,12 +1,13 @@
1
1
  @UiBibzForm = class Form
2
2
 
3
3
  constructor: ->
4
- @switch() if $('input.switch-field').length > 0
5
- @inputConnected() if $('.ui-bibz-connect').length > 0
6
- @selectPicker() if $('.dropdown-select-field').length > 0
7
- @multiSelect() if $('.multi-select-field').length > 0
8
- @multiColumn() if $('.multi-column-field').length > 0
9
- @formula() if $('.formula-field').length > 0
4
+ @switch() if $('input.switch-field').length > 0
5
+ @inputConnected() if $('.ui-bibz-connect').length > 0
6
+ @selectPicker() if $('.dropdown-select-field').length > 0
7
+ @multiSelect() if $('.multi-select-field').length > 0
8
+ @multiColumn() if $('.multi-column-field').length > 0
9
+ @formula() if $('.formula-field').length > 0
10
+ @autoCompleteFix() if $('.auto-complete-field').length > 0
10
11
 
11
12
  inputConnected: ->
12
13
  $('.ui-bibz-connect').inputConnected()
@@ -24,10 +25,13 @@
24
25
  multiSelect: ->
25
26
  # http://loudev.com/
26
27
  $('.multi-select-field').each ->
27
- data = $(this).data()
28
+ data = $(this).data()
29
+ classes = $(this)[0].classList.value
30
+
28
31
  delete data["multiselect"]
29
- data = Object.assign({ buttonClass: 'btn btn-secondary', inheritClass: true }, data)
32
+ data = Object.assign({ buttonClass: "btn #{ classes }"}, data)
30
33
  $(this).multiselect(data)
34
+ $(this).siblings('.btn-group').addClass('input-group-btn') if $(this).parent().hasClass('input-group')
31
35
 
32
36
  formula: ->
33
37
  me = this
@@ -69,3 +73,15 @@
69
73
 
70
74
  multiColumn: ->
71
75
  $(".multi-column-field").multiSelect()
76
+
77
+ autoCompleteFix: ->
78
+ $(".auto-complete-field").each ->
79
+ parent = $(this).parent('.input-group')
80
+ if parent.length > 0
81
+ lastChild = parent.children().last()
82
+ if lastChild.is('datalist')# || lastChild.not('visible')
83
+ radius = parent.children().first().css("border-bottom-left-radius")
84
+ $(this).css("border-bottom-right-radius", radius)
85
+ $(this).css("border-top-right-radius", radius)
86
+
87
+
@@ -1,5 +1,4 @@
1
- #= require jquery
2
- #= require jquery_ujs
1
+ #= require jquery2
3
2
 
4
3
  # multi_column_field component
5
4
  #= require jquery.quicksearch.min
@@ -8,6 +7,7 @@
8
7
 
9
8
  # Bootstrap
10
9
  #= require tether.min
10
+ #= require popper
11
11
  #= require bootstrap
12
12
 
13
13
  # date_picker_field component
@@ -55,6 +55,7 @@ ready = ->
55
55
  # turbolinks:load and ready together load twice time javascript
56
56
  #$(document).on('ready turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
57
57
  if Turbolinks?
58
+ ready()
58
59
  $(document).on('turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
59
60
  else
60
61
  $(document).on('ready', ready) # catch event for turbolinks and fix in ready() function
@@ -5,14 +5,14 @@
5
5
  * Copyright 2012-2013 Mattia Larentis
6
6
  *
7
7
  * ========================================================================
8
- * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * Licensed under the Apache License, Version 2.0 (the License);
9
9
  * you may not use this file except in compliance with the License.
10
10
  * You may obtain a copy of the License at
11
11
  *
12
12
  * http://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * distributed under the License is distributed on an AS IS BASIS,
16
16
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
17
  * See the License for the specific language governing permissions and
18
18
  * limitations under the License.
@@ -58,22 +58,22 @@
58
58
  z-index: 1
59
59
  .bootstrap-switch-handle-off.bootstrap-switch-primary, .bootstrap-switch-handle-on.bootstrap-switch-primary
60
60
  color: #fff
61
- background: $brand-primary
61
+ background: theme-color(primary)
62
62
  .bootstrap-switch-handle-off.bootstrap-switch-info, .bootstrap-switch-handle-on.bootstrap-switch-info
63
63
  color: #fff
64
- background: $brand-info
64
+ background: theme-color(info)
65
65
  .bootstrap-switch-handle-off.bootstrap-switch-success, .bootstrap-switch-handle-on.bootstrap-switch-success
66
66
  color: #fff
67
- background: $brand-success
67
+ background: theme-color(success)
68
68
  .bootstrap-switch-handle-off.bootstrap-switch-warning, .bootstrap-switch-handle-on.bootstrap-switch-warning
69
- background: $brand-warning
69
+ background: theme-color(warning)
70
70
  color: #fff
71
71
  .bootstrap-switch-handle-off.bootstrap-switch-danger, .bootstrap-switch-handle-on.bootstrap-switch-danger
72
72
  color: #fff
73
- background: $brand-danger
73
+ background: theme-color(danger)
74
74
  .bootstrap-switch-handle-off.bootstrap-switch-default, .bootstrap-switch-handle-on.bootstrap-switch-default
75
75
  color: #000
76
- background: $brand-secondary
76
+ background: theme-color(secondary)
77
77
  .bootstrap-switch-label
78
78
  text-align: center
79
79
  margin-top: -1px
@@ -148,3 +148,12 @@
148
148
  &.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label, &.bootstrap-switch-off .bootstrap-switch-label
149
149
  border-bottom-left-radius: 3px
150
150
  border-top-left-radius: 3px
151
+
152
+ .bootstrap-switch-handle-off
153
+ color: white !important
154
+
155
+ .switch-field-container.btn-group
156
+ display: inline
157
+
158
+ .bootstrap-switch-handle-off, .bootstrap-switch-handle-on
159
+ word-wrap: normal
@@ -265,7 +265,7 @@ div.bootstrap-select
265
265
 
266
266
  .bootstrap-select > .dropdown-menu > .dropdown-menu li:hover, .bootstrap-select > .dropdown-menu > .dropdown-menu li.selected
267
267
  color: white
268
- background-color: $brand-primary
268
+ background-color: theme-color(primary)
269
269
  a
270
270
  color: white
271
271
  border: 0px
@@ -8,7 +8,7 @@
8
8
 
9
9
  .progress
10
10
  margin: 5px 0px 0px 0px
11
- border: 1px solid $gray-light
11
+ border: 1px solid $gray-200
12
12
  border-radius: $border-radius
13
13
 
14
14
  .card-header
@@ -3,17 +3,20 @@
3
3
  @import font-awesome
4
4
 
5
5
  // Bootstrap
6
- @import bootstrap/_variables
7
6
  $enable-flex: true
8
7
 
9
8
  //@import bootstrap-sprockets
9
+ //@import bootstrap/_variables
10
+ //@import bootstrap/functions
11
+ //@import bootstrap/variables
10
12
  @import bootstrap
11
13
  @import tether.min
12
14
 
13
15
 
14
- $brand-secondary: $gray-lighter
15
- $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $brand-secondary, info: $brand-info, danger: $brand-danger, warning: $brand-warning)
16
+ //$brand-secondary: $gray-lighter
17
+ //$states_colors: (success: $brand-success, primary: $brand-primary, secondary: $brand-secondary, info: $brand-info, danger: $brand-danger, warning: $brand-warning, light: $brand-light, dark: $brand-dark)
16
18
 
19
+ $states_colors: $theme-colors
17
20
 
18
21
  // ##### Bootstrap Plugins
19
22
  // date_picker_field component
@@ -25,6 +28,7 @@ $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $b
25
28
  // multi_select_field component
26
29
  @import bootstrap-multiselect.min
27
30
  // dropdown_select_field component
31
+ //@import bootstrap-select.min
28
32
  @import bootstrap-select.min
29
33
  // mardown-editor component
30
34
  @import bootstrap-markdown.min
@@ -33,7 +37,7 @@ $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $b
33
37
 
34
38
  // fix plugins
35
39
  @import fix-bootstrap-4
36
- @import fix-dropdown-select
40
+ //@import fix-dropdown-select
37
41
 
38
42
  // Components
39
43
  @import table
@@ -56,8 +60,6 @@ $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $b
56
60
  .stars-notation
57
61
  white-space: nowrap
58
62
 
59
- select.form-control
60
- height: 38px !important // to fix boostrap 4 alpha bug
61
63
 
62
64
  .multiselect-container
63
65
  .filter
@@ -71,27 +73,63 @@ select.form-control
71
73
  border-bottom-right-radius: 0 !important
72
74
  border-top-right-radius: 0 !important
73
75
  width: 100%
74
- .formula-field-sign
75
- width: auto
76
- min-width: 16px
77
- font-weight: 400
78
- line-height: 1.42857143
79
- text-align: center
80
- text-shadow: 0 1px 0 #fff
81
- vertical-align: middle
82
- background-color: #eee
83
- border: solid #ccc
84
- border-width: 1px 0
85
- padding: 0.5rem 0.75rem
86
- margin-left: -5px
87
- margin-right: -5px
88
- border-left: none
89
- border-right: none
90
76
  .form-control[readonly]
91
77
  background-color: white
92
78
  .formula-field_alert, .formula-field-result, .formula-field-sign
93
79
  display: none
94
80
 
81
+ .formula-field-alert
82
+ padding-top: 10px
83
+
95
84
  .select-field-refresh
96
85
  .btn
97
86
  padding: 10px 16px
87
+
88
+ .input-group-addon.abc-checkbox label, .input-group-addon.abc-radio label
89
+ margin-bottom: 0
90
+
91
+ .checkbox-inline, .radio-inline
92
+ display: inline-block
93
+ margin-right: 10px
94
+
95
+ .input-group-btn
96
+ .input-refresh-button
97
+ padding: 10px 16px
98
+
99
+ .input-group-btn
100
+ label.btn
101
+ margin: 0
102
+
103
+ .fix-label
104
+ margin-right: -11px
105
+
106
+ .date_picker
107
+ min-width: 104px
108
+
109
+ .navbar
110
+ .simple_form
111
+ input
112
+ width: auto
113
+ .form-control
114
+ width: auto
115
+ .form-group
116
+ display: inline-block
117
+
118
+ .ui_surround_field
119
+ select
120
+ -webkit-appearance: none
121
+ .mr-sm-2
122
+ margin-right: 0px !important
123
+ input:not(:first-child):not(:last-child)
124
+ border-radius: 0px
125
+ .abc-radio.input-group-addon, .abc-checkbox.input-group-addon
126
+ input
127
+ margin-left: 17px
128
+ select:not(:first-child):not(:last-child)
129
+ border-radius: 0px
130
+
131
+ .btn.without-text
132
+ padding-right: 3px
133
+
134
+ .progress-bar-line
135
+ height: 1px
@@ -0,0 +1,35 @@
1
+ module UiBibzForm
2
+ class UiBibzFormBuilder < SimpleForm::FormBuilder
3
+ include ActionView::Helpers::TagHelper
4
+ include ActionView::Helpers::TextHelper
5
+
6
+ attr_accessor :output_buffer
7
+
8
+ def ui_surround_field content = nil, opts = nil, html_options = nil, &block
9
+ content = (options || {}).merge(content || {})
10
+ content = content.merge(template: @template, form: self)
11
+
12
+ input_classes = UiBibz::Utils::Screwdriver.join_classes('form-group', 'surround_field', options[:input_html].try(:[], :class))
13
+ wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
14
+
15
+ content_tag :div, wrapper_html do
16
+ concat content_tag(:label, content[:label]) unless content[:label].nil?
17
+ concat UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&block).render
18
+ end
19
+ end
20
+
21
+ def ui_button_group content = nil, opts = nil, html_options = nil, &block
22
+ content = (options || {}).merge(content || {})
23
+ content = content.merge(template: @template, form: self)
24
+
25
+ input_classes = UiBibz::Utils::Screwdriver.join_classes('button_group', options[:input_html].try(:[], :class))
26
+ wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
27
+
28
+ content_tag :div, wrapper_html do
29
+ concat content_tag(:label, content[:label]) unless content[:label].nil?
30
+ concat UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, opts, html_options).tap(&block).render
31
+ end
32
+ end
33
+
34
+ end
35
+ end
@@ -0,0 +1,14 @@
1
+ module UiBibzInputs
2
+ class UiAutoCompleteFieldInput < CollectionInput
3
+ include UiBibz::Ui::Core::Forms::Texts
4
+
5
+ def input(wrapper_options)
6
+ UiBibz::Ui::Core::Forms::Texts::AutoCompleteField.new(input_attribute_name, new_options, input_html_options).render
7
+ end
8
+
9
+ def new_options
10
+ super.merge({ value: @builder.object.send(attribute_name) })
11
+ end
12
+
13
+ end
14
+ end
@@ -1,10 +1,16 @@
1
- module CustomInputs
1
+ module UiBibzInputs
2
2
  class BaseInput < SimpleForm::Inputs::Base
3
3
 
4
4
  def input(wrapper_options)
5
5
  super
6
6
  end
7
7
 
8
+ def options
9
+ super.merge({ value: @builder.object.send(attribute_name)}).merge(@builder.options[:input_html] || {})
10
+ end
11
+
12
+ private
13
+
8
14
  def input_attribute_name
9
15
  "#{ @builder.object.class.to_s.underscore }[#{ attribute_name }]"
10
16
  end