ui_bibz 2.0.0.alpha14 → 2.0.0.alpha15
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 +1 -1
- data/app/inputs/custom_inputs/autocomplete_input.rb +2 -2
- data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
- data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
- data/app/inputs/custom_inputs/formula_input.rb +2 -2
- data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
- data/app/inputs/custom_inputs/surround_input.rb +2 -2
- data/app/inputs/custom_inputs/switch_input.rb +2 -2
- data/lib/ui_bibz/helpers/ui_core_helper.rb +189 -25
- data/lib/ui_bibz/helpers/ui_ux_helper.rb +38 -11
- data/lib/ui_bibz/ui/core/{button → buttons}/button.rb +6 -17
- data/lib/ui_bibz/ui/core/{button → buttons}/button_choice.rb +8 -8
- data/lib/ui_bibz/ui/core/{button → buttons}/button_dropdown.rb +6 -6
- data/lib/ui_bibz/ui/core/{button → buttons}/button_group.rb +6 -6
- data/lib/ui_bibz/ui/core/{button → buttons}/button_link.rb +8 -8
- data/lib/ui_bibz/ui/core/{button → buttons}/button_split_dropdown.rb +5 -5
- data/lib/ui_bibz/ui/core/{card → cards}/card.rb +13 -13
- data/lib/ui_bibz/ui/core/{card → cards}/card_column.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/card_deck.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/card_group.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_link.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_text.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_title.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_block.rb +9 -9
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_footer.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_header.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_image.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_list_group.rb +5 -5
- data/lib/ui_bibz/ui/core/{input → inputs}/autocomplete_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/date_picker_field.rb +20 -19
- data/lib/ui_bibz/ui/core/{input → inputs}/dropdown_select_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{input → inputs}/formula_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/markdown_editor_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/multi_column_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/multi_select_field.rb +8 -8
- data/lib/ui_bibz/ui/core/{input → inputs}/surround_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/switch_field.rb +4 -4
- data/lib/ui_bibz/ui/core/jumbotron.rb +2 -2
- data/lib/ui_bibz/ui/core/{layout → layouts}/col.rb +6 -6
- data/lib/ui_bibz/ui/core/{layout → layouts}/container.rb +6 -6
- data/lib/ui_bibz/ui/core/{layout → layouts}/row.rb +4 -4
- data/lib/ui_bibz/ui/core/list/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_dropdown.rb +6 -6
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link.rb +11 -11
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_link.rb +3 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_list.rb +2 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_brand.rb +2 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_form.rb +4 -5
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_nav.rb +7 -7
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_text.rb +6 -6
- data/lib/ui_bibz/ui/core/{nav → navs}/nav.rb +9 -9
- data/lib/ui_bibz/ui/core/{nav → navs}/navbar.rb +9 -9
- data/lib/ui_bibz/ui/ux/{table → tables}/components/actions.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/as.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/column.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/columns.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/store.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/components/thead.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/actionable.rb +2 -2
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/paginable.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/searchable.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/sortable.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/table.rb +17 -17
- data/lib/ui_bibz/ui/ux/{table → tables}/table_card.rb +10 -10
- data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination_per_page.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/table_search_field.rb +3 -2
- data/lib/ui_bibz/version.rb +1 -1
- data/lib/ui_bibz.rb +45 -29
- data/test/store_test.rb +2 -2
- data/test/ui/button_test.rb +15 -15
- data/test/ui/grid_test.rb +3 -3
- data/test/ui/input_dropdown_select_field_test.rb +9 -9
- data/test/ui/input_switch_field_test.rb +10 -10
- data/test/ui/inputs_test.rb +13 -13
- data/test/ui/nav_test.rb +2 -2
- data/test/ui/table_test.rb +26 -26
- metadata +57 -57
@@ -1,8 +1,8 @@
|
|
1
|
-
module UiBibz::Ui::Core
|
1
|
+
module UiBibz::Ui::Core::Navs
|
2
2
|
|
3
3
|
# Create a NavbarNav
|
4
4
|
#
|
5
|
-
# This element is an extend of UiBibz::Ui::Core::Nav.
|
5
|
+
# This element is an extend of UiBibz::Ui::Core::Navs::Nav.
|
6
6
|
#
|
7
7
|
# ==== Attributes
|
8
8
|
#
|
@@ -21,9 +21,9 @@ module UiBibz::Ui::Core
|
|
21
21
|
#
|
22
22
|
# ==== Signatures
|
23
23
|
#
|
24
|
-
# UiBibz::Ui::Core::NavbarNav.new(content, options = nil, html_options = nil)
|
24
|
+
# UiBibz::Ui::Core::Navs::NavbarNav.new(content, options = nil, html_options = nil)
|
25
25
|
#
|
26
|
-
# UiBibz::Ui::Core::NavbarNav.new(options = nil, html_options = nil).tap do |n|
|
26
|
+
# UiBibz::Ui::Core::Navs::NavbarNav.new(options = nil, html_options = nil).tap do |n|
|
27
27
|
# ...
|
28
28
|
# n.link content = nil, options = nil, html_options = nil, block
|
29
29
|
# ...
|
@@ -31,14 +31,14 @@ module UiBibz::Ui::Core
|
|
31
31
|
#
|
32
32
|
# ==== Examples
|
33
33
|
#
|
34
|
-
# UiBibz::Ui::Core::NavbarNav.new().tap do |n|
|
34
|
+
# UiBibz::Ui::Core::Navs::NavbarNav.new().tap do |n|
|
35
35
|
# n.link 'Test', url: '#test'
|
36
36
|
# n.link 'Test2', url: '#test2', state: :active
|
37
37
|
# end.render
|
38
38
|
#
|
39
|
-
class NavbarNav < Nav
|
39
|
+
class NavbarNav < UiBibz::Ui::Core::Navs::Nav
|
40
40
|
|
41
|
-
# See UiBibz::Ui::Core::
|
41
|
+
# See UiBibz::Ui::Core::Navs::Nav.initialize
|
42
42
|
def initialize content = nil, options = nil, html_options = nil, &block
|
43
43
|
super
|
44
44
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module UiBibz::Ui::Core
|
1
|
+
module UiBibz::Ui::Core::Navs
|
2
2
|
|
3
3
|
# Create a NavbarText
|
4
4
|
#
|
@@ -17,21 +17,21 @@ module UiBibz::Ui::Core
|
|
17
17
|
#
|
18
18
|
# ==== Signatures
|
19
19
|
#
|
20
|
-
# UiBibz::Ui::Core::NavbarText.new(content, options = nil, html_options = nil)
|
20
|
+
# UiBibz::Ui::Core::Navs::NavbarText.new(content, options = nil, html_options = nil)
|
21
21
|
#
|
22
|
-
# UiBibz::Ui::Core::NavbarText.new(options = nil, html_options = nil) do
|
22
|
+
# UiBibz::Ui::Core::Navs::NavbarText.new(options = nil, html_options = nil) do
|
23
23
|
# content
|
24
24
|
# end
|
25
25
|
#
|
26
26
|
# ==== Examples
|
27
27
|
#
|
28
|
-
# UiBibz::Ui::Core::NavbarText.new('Exemple).render
|
28
|
+
# UiBibz::Ui::Core::Navs::NavbarText.new('Exemple).render
|
29
29
|
#
|
30
|
-
# UiBibz::Ui::Core::NavbarText.new(position: :right) do
|
30
|
+
# UiBibz::Ui::Core::Navs::NavbarText.new(position: :right) do
|
31
31
|
# 'Exemple'
|
32
32
|
# end.render
|
33
33
|
#
|
34
|
-
class NavbarText < Component
|
34
|
+
class NavbarText < UiBibz::Ui::Core::Component
|
35
35
|
|
36
36
|
# See UiBibz::Ui::Core::Component.initialize
|
37
37
|
def initialize content = nil, options = nil, html_options = nil, &block
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'ui_bibz/ui/core/
|
2
|
-
require 'ui_bibz/ui/core/
|
3
|
-
module UiBibz::Ui::Core
|
1
|
+
require 'ui_bibz/ui/core/navs/components/nav_link'
|
2
|
+
require 'ui_bibz/ui/core/navs/components/nav_dropdown'
|
3
|
+
module UiBibz::Ui::Core::Navs
|
4
4
|
|
5
5
|
# Create a nav
|
6
6
|
#
|
@@ -21,9 +21,9 @@ module UiBibz::Ui::Core
|
|
21
21
|
#
|
22
22
|
# ==== Signatures
|
23
23
|
#
|
24
|
-
# UiBibz::Ui::Core::Nav.new(content, options = nil, html_options = nil)
|
24
|
+
# UiBibz::Ui::Core::Navs::Nav.new(content, options = nil, html_options = nil)
|
25
25
|
#
|
26
|
-
# UiBibz::Ui::Core::Nav.new(options = nil, html_options = nil).tap do |n|
|
26
|
+
# UiBibz::Ui::Core::Navs::Nav.new(options = nil, html_options = nil).tap do |n|
|
27
27
|
# ...
|
28
28
|
# n.link content = nil, options = nil, html_options = nil, block
|
29
29
|
# n.link content = nil, options = nil, html_options = nil, block
|
@@ -33,7 +33,7 @@ module UiBibz::Ui::Core
|
|
33
33
|
#
|
34
34
|
# ==== Examples
|
35
35
|
#
|
36
|
-
# UiBibz::Ui::Core::Nav.new(type: :pills).tap do |n|
|
36
|
+
# UiBibz::Ui::Core::Navs::Nav.new(type: :pills).tap do |n|
|
37
37
|
# n.link 'Test', url: '#test'
|
38
38
|
# n.link 'Test2', url: '#test2', state: :active
|
39
39
|
# n.dropdown('Action') do |d|
|
@@ -56,7 +56,7 @@ module UiBibz::Ui::Core
|
|
56
56
|
# end
|
57
57
|
# end
|
58
58
|
#
|
59
|
-
class Nav < Component
|
59
|
+
class Nav < UiBibz::Ui::Core::Component
|
60
60
|
|
61
61
|
# See UiBibz::Ui::Core::Component.initialize
|
62
62
|
def initialize content = nil, options = nil, html_options = nil, &block
|
@@ -70,7 +70,7 @@ module UiBibz::Ui::Core
|
|
70
70
|
end
|
71
71
|
|
72
72
|
# Add nav link items
|
73
|
-
# See UiBibz::Ui::Core::NavLink
|
73
|
+
# See UiBibz::Ui::Core::Navs::NavLink
|
74
74
|
def link content = nil, options = {}, html_options = nil, &block
|
75
75
|
block_given? ? content.merge!({ nav_type: type }) : options.merge!({ nav_type: type })
|
76
76
|
@items << NavLink.new(content, options, html_options, &block).render
|
@@ -82,7 +82,7 @@ module UiBibz::Ui::Core
|
|
82
82
|
end
|
83
83
|
|
84
84
|
# Add nav dropdown items
|
85
|
-
# See UiBibz::Ui::Core::NavDropdown
|
85
|
+
# See UiBibz::Ui::Core::Navs::NavDropdown
|
86
86
|
def dropdown content = nil, options = {}, html_options = nil, &block
|
87
87
|
@items << NavDropdown.new(content, options, html_options).tap(&block).render
|
88
88
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'ui_bibz/ui/core/
|
2
|
-
require 'ui_bibz/ui/core/
|
3
|
-
require 'ui_bibz/ui/core/
|
4
|
-
require 'ui_bibz/ui/core/
|
5
|
-
module UiBibz::Ui::Core
|
1
|
+
require 'ui_bibz/ui/core/navs/components/navbar_nav'
|
2
|
+
require 'ui_bibz/ui/core/navs/components/navbar_text'
|
3
|
+
require 'ui_bibz/ui/core/navs/components/navbar_form'
|
4
|
+
require 'ui_bibz/ui/core/navs/components/navbar_brand'
|
5
|
+
module UiBibz::Ui::Core::Navs
|
6
6
|
|
7
7
|
# Create a Navbar
|
8
8
|
#
|
@@ -64,7 +64,7 @@ module UiBibz::Ui::Core
|
|
64
64
|
# end
|
65
65
|
# end
|
66
66
|
#
|
67
|
-
class Navbar < Component
|
67
|
+
class Navbar < UiBibz::Ui::Core::Component
|
68
68
|
|
69
69
|
# See UiBibz::Ui::Core::Component.initialize
|
70
70
|
def initialize content = nil, options = nil, html_options = nil, &block
|
@@ -86,13 +86,13 @@ module UiBibz::Ui::Core
|
|
86
86
|
# See UiBibz::Ui::Core::NavbarNav
|
87
87
|
def nav content = nil, options = nil, html_options = nil, &block
|
88
88
|
options = options || {}
|
89
|
-
@items << UiBibz::Ui::Core::NavbarNav.new(content, options, html_options).tap(&block).render
|
89
|
+
@items << UiBibz::Ui::Core::Navs::NavbarNav.new(content, options, html_options).tap(&block).render
|
90
90
|
end
|
91
91
|
|
92
92
|
# Add navbar form items
|
93
93
|
# See UiBibz::Ui::Core::NavbarForm
|
94
94
|
def form model_or_url, options = {}, &block
|
95
|
-
@items << UiBibz::Ui::Core::NavbarForm.new(model_or_url, options, &block).render
|
95
|
+
@items << UiBibz::Ui::Core::Navs::NavbarForm.new(model_or_url, options, &block).render
|
96
96
|
end
|
97
97
|
|
98
98
|
# Not use !!!!!
|
@@ -103,7 +103,7 @@ module UiBibz::Ui::Core
|
|
103
103
|
#end
|
104
104
|
|
105
105
|
def brand content = nil, options = nil, html_options = nil, &block
|
106
|
-
@brand = UiBibz::Ui::Core::NavbarBrand.new(content, options, html_options, &block).render
|
106
|
+
@brand = UiBibz::Ui::Core::Navs::NavbarBrand.new(content, options, html_options, &block).render
|
107
107
|
end
|
108
108
|
|
109
109
|
private
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'ui_bibz/ui/core/dropdown/components/dropdown_header'
|
2
2
|
require 'ui_bibz/ui/core/dropdown/components/dropdown_divider'
|
3
3
|
require 'ui_bibz/ui/core/dropdown/components/dropdown_link'
|
4
|
-
module UiBibz::Ui::Ux
|
4
|
+
module UiBibz::Ui::Ux::Tables
|
5
5
|
class Actions
|
6
6
|
|
7
7
|
def initialize store
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'ui_bibz/ui/ux/
|
2
|
-
require 'ui_bibz/ui/ux/
|
3
|
-
module UiBibz::Ui::Ux
|
1
|
+
require 'ui_bibz/ui/ux/tables/components/columns'
|
2
|
+
require 'ui_bibz/ui/ux/tables/components/column'
|
3
|
+
module UiBibz::Ui::Ux::Tables
|
4
4
|
class Store
|
5
5
|
|
6
6
|
attr_accessor :records
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module UiBibz::Ui::Ux
|
1
|
+
module UiBibz::Ui::Ux::Tables
|
2
2
|
class Actionable < UiBibz::Ui::Base
|
3
3
|
|
4
4
|
def initialize store, options, actions = nil
|
@@ -31,7 +31,7 @@ module UiBibz::Ui::Ux
|
|
31
31
|
unless @actions.nil?
|
32
32
|
@actions.format_action.call(record) unless @actions.format_action.nil?
|
33
33
|
unless (default_actions? != true && @actions.raw_list.empty?)
|
34
|
-
UiBibz::Ui::Core::ButtonDropdown.new(dropdown_action_name, { position: :right, size: :xs, glyph: actions_glyph }, { class: 'dropdown-action' }).tap do |d|
|
34
|
+
UiBibz::Ui::Core::Buttons::ButtonDropdown.new(dropdown_action_name, { position: :right, size: :xs, glyph: actions_glyph }, { class: 'dropdown-action' }).tap do |d|
|
35
35
|
actions_links(record).each do |l|
|
36
36
|
d.html l.to_s.html_safe
|
37
37
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module UiBibz::Ui::Ux
|
1
|
+
module UiBibz::Ui::Ux::Tables
|
2
2
|
class Paginable < UiBibz::Ui::Base
|
3
3
|
include WillPaginate::ActionView
|
4
4
|
|
@@ -11,8 +11,8 @@ module UiBibz::Ui::Ux
|
|
11
11
|
# Render html tag
|
12
12
|
def render
|
13
13
|
content_tag :div, @html_options do
|
14
|
-
concat UiBibz::Ui::Ux::TablePagination.new(store: @store).render
|
15
|
-
concat UiBibz::Ui::Ux::TablePaginationPerPage.new(store: @store).render
|
14
|
+
concat UiBibz::Ui::Ux::Tables::TablePagination.new(store: @store).render
|
15
|
+
concat UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(store: @store).render
|
16
16
|
concat tag(:br, class: 'ui-bibz-clear')
|
17
17
|
end
|
18
18
|
end
|
@@ -1,19 +1,19 @@
|
|
1
|
-
require "ui_bibz/ui/ux/
|
2
|
-
require "ui_bibz/ui/ux/
|
3
|
-
require "ui_bibz/ui/ux/
|
4
|
-
require "ui_bibz/ui/ux/
|
5
|
-
require "ui_bibz/ui/ux/
|
6
|
-
require "ui_bibz/ui/ux/
|
7
|
-
require "ui_bibz/ui/ux/
|
8
|
-
require "ui_bibz/ui/ux/
|
9
|
-
require "ui_bibz/ui/ux/
|
10
|
-
require "ui_bibz/ui/ux/
|
11
|
-
require "ui_bibz/ui/ux/
|
12
|
-
module UiBibz::Ui::Ux
|
1
|
+
require "ui_bibz/ui/ux/tables/components/store"
|
2
|
+
require "ui_bibz/ui/ux/tables/components/columns"
|
3
|
+
require "ui_bibz/ui/ux/tables/components/column"
|
4
|
+
require "ui_bibz/ui/ux/tables/components/actions"
|
5
|
+
require "ui_bibz/ui/ux/tables/components/thead"
|
6
|
+
require "ui_bibz/ui/ux/tables/components/as"
|
7
|
+
require "ui_bibz/ui/ux/tables/extensions/paginable"
|
8
|
+
require "ui_bibz/ui/ux/tables/extensions/paginable"
|
9
|
+
require "ui_bibz/ui/ux/tables/extensions/searchable"
|
10
|
+
require "ui_bibz/ui/ux/tables/extensions/sortable"
|
11
|
+
require "ui_bibz/ui/ux/tables/extensions/actionable"
|
12
|
+
module UiBibz::Ui::Ux::Tables
|
13
13
|
|
14
14
|
# Create a Table
|
15
15
|
#
|
16
|
-
# This element is an extend of UiBibz::Ui::
|
16
|
+
# This element is an extend of UiBibz::Ui::Core::Component.
|
17
17
|
#
|
18
18
|
# ==== Attributes
|
19
19
|
#
|
@@ -47,9 +47,9 @@ module UiBibz::Ui::Ux
|
|
47
47
|
#
|
48
48
|
# ==== Signatures
|
49
49
|
#
|
50
|
-
# UiBibz::Ui::Ux::Table.new(store: @store)
|
50
|
+
# UiBibz::Ui::Ux::Tables::Table.new(store: @store)
|
51
51
|
#
|
52
|
-
# UiBibz::Ui::Ux::Table.new(store: @store, tap: true) do |t|
|
52
|
+
# UiBibz::Ui::Ux::Tables::Table.new(store: @store, tap: true) do |t|
|
53
53
|
# t.columns do |c|
|
54
54
|
# c.column :id, name: '#'
|
55
55
|
# end
|
@@ -60,9 +60,9 @@ module UiBibz::Ui::Ux
|
|
60
60
|
#
|
61
61
|
# ==== Examples
|
62
62
|
#
|
63
|
-
# UiBibz::Ui::Ux::Table.new(store: @users).render
|
63
|
+
# UiBibz::Ui::Ux::Tables::Table.new(store: @users).render
|
64
64
|
#
|
65
|
-
# UiBibz::Ui::Ux::Table.new(store: @users).tap do |t|
|
65
|
+
# UiBibz::Ui::Ux::Tables::Table.new(store: @users).tap do |t|
|
66
66
|
# t.columns do |c|
|
67
67
|
# c.column :id, { name: '#' }
|
68
68
|
# c.column :name_fr', { link: edit_user_path(:id), order: 2 }
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require "ui_bibz/ui/ux/
|
2
|
-
module UiBibz::Ui::Ux
|
1
|
+
require "ui_bibz/ui/ux/tables/components/store"
|
2
|
+
module UiBibz::Ui::Ux::Tables
|
3
3
|
|
4
4
|
# Create a TableCard
|
5
5
|
#
|
6
|
-
# This element is an extend of UiBibz::Ui::
|
6
|
+
# This element is an extend of UiBibz::Ui::Core::Cards::card.
|
7
7
|
#
|
8
8
|
# ==== Attributes
|
9
9
|
#
|
@@ -37,9 +37,9 @@ module UiBibz::Ui::Ux
|
|
37
37
|
#
|
38
38
|
# ==== Signatures
|
39
39
|
#
|
40
|
-
# UiBibz::Ui::Ux::TableCard.new(store: @store)
|
40
|
+
# UiBibz::Ui::Ux::Tables::TableCard.new(store: @store)
|
41
41
|
#
|
42
|
-
# UiBibz::Ui::Ux::TableCard.new(store: @store, tap: true) do |t|
|
42
|
+
# UiBibz::Ui::Ux::Tables::TableCard.new(store: @store, tap: true) do |t|
|
43
43
|
# t.columns do |c|
|
44
44
|
# c.column '#', { data_index: '#' }
|
45
45
|
# end
|
@@ -50,9 +50,9 @@ module UiBibz::Ui::Ux
|
|
50
50
|
#
|
51
51
|
# ==== Examples
|
52
52
|
#
|
53
|
-
# UiBibz::Ui::Ux::TableCard.new(store: @users, table_options: { actionable: false }).render
|
53
|
+
# UiBibz::Ui::Ux::Tables::TableCard.new(store: @users, table_options: { actionable: false }).render
|
54
54
|
#
|
55
|
-
# UiBibz::Ui::Ux::TableCard.new(store: @users).tap do |t|
|
55
|
+
# UiBibz::Ui::Ux::Tables::TableCard.new(store: @users).tap do |t|
|
56
56
|
# t.header 'My Table card'
|
57
57
|
# t.columns do |c|
|
58
58
|
# c.column :id, { name: '# }, { class: 'column-id' }
|
@@ -103,15 +103,15 @@ module UiBibz::Ui::Ux
|
|
103
103
|
# content
|
104
104
|
# end
|
105
105
|
# end
|
106
|
-
class TableCard < UiBibz::Ui::Core::Card
|
106
|
+
class TableCard < UiBibz::Ui::Core::Cards::Card
|
107
107
|
|
108
108
|
attr_accessor :columns
|
109
109
|
|
110
|
-
# See UiBibz::Ui::Core::
|
110
|
+
# See UiBibz::Ui::Core::Cards::Card.initialize
|
111
111
|
def initialize content = nil, options = nil, html_options = nil, &block
|
112
112
|
super
|
113
113
|
table_options = (@options[:table_options] || {}).merge({ store: store })
|
114
|
-
@table = UiBibz::Ui::Ux::Table.new(table_options, @options[:table_html_options])
|
114
|
+
@table = UiBibz::Ui::Ux::Tables::Table.new(table_options, @options[:table_html_options])
|
115
115
|
end
|
116
116
|
|
117
117
|
# Render html tag
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'will_paginate'
|
2
2
|
require "will_paginate-bootstrap"
|
3
|
-
require "ui_bibz/ui/ux/
|
4
|
-
module UiBibz::Ui::Ux
|
3
|
+
require "ui_bibz/ui/ux/tables/components/store"
|
4
|
+
module UiBibz::Ui::Ux::Tables
|
5
5
|
|
6
6
|
# Create a pagination for table
|
7
7
|
#
|
@@ -18,7 +18,7 @@ module UiBibz::Ui::Ux
|
|
18
18
|
#
|
19
19
|
# ==== Signatures
|
20
20
|
#
|
21
|
-
# UiBibz::Ui::Ux::TablePagination.new(store: @store)
|
21
|
+
# UiBibz::Ui::Ux::Tables::TablePagination.new(store: @store)
|
22
22
|
#
|
23
23
|
# ==== Helper
|
24
24
|
#
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require "ui_bibz/ui/ux/
|
2
|
-
module UiBibz::Ui::Ux
|
1
|
+
require "ui_bibz/ui/ux/tables/components/store"
|
2
|
+
module UiBibz::Ui::Ux::Tables
|
3
3
|
|
4
4
|
# Create a select pagination per page
|
5
5
|
#
|
@@ -16,7 +16,7 @@ module UiBibz::Ui::Ux
|
|
16
16
|
#
|
17
17
|
# ==== Signatures
|
18
18
|
#
|
19
|
-
# UiBibz::Ui::Ux::TablePaginationPerPage.new(store: @store)
|
19
|
+
# UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(store: @store)
|
20
20
|
#
|
21
21
|
# ==== Helper
|
22
22
|
#
|
data/lib/ui_bibz/version.rb
CHANGED
data/lib/ui_bibz.rb
CHANGED
@@ -12,39 +12,50 @@ module UiBibz
|
|
12
12
|
|
13
13
|
# Core
|
14
14
|
module Core
|
15
|
+
|
15
16
|
# Button section
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
module Buttons
|
18
|
+
autoload :Button, "ui_bibz/ui/core/buttons/button"
|
19
|
+
autoload :ButtonChoice, "ui_bibz/ui/core/buttons/button_choice"
|
20
|
+
autoload :ButtonDropdown, "ui_bibz/ui/core/buttons/button_dropdown"
|
21
|
+
autoload :ButtonGroup, "ui_bibz/ui/core/buttons/button_group"
|
22
|
+
autoload :ButtonLink, "ui_bibz/ui/core/buttons/button_link"
|
23
|
+
autoload :ButtonSplitDropdown, "ui_bibz/ui/core/buttons/button_split_dropdown"
|
24
|
+
end
|
22
25
|
|
23
26
|
# Card section
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
27
|
+
module Cards
|
28
|
+
autoload :Card, "ui_bibz/ui/core/cards/card"
|
29
|
+
autoload :CardColumn, "ui_bibz/ui/core/cards/card_column"
|
30
|
+
autoload :CardDeck, "ui_bibz/ui/core/cards/card_deck"
|
31
|
+
autoload :CardGroup, "ui_bibz/ui/core/cards/card_group"
|
32
|
+
end
|
28
33
|
|
29
34
|
# Input section
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
module Inputs
|
36
|
+
autoload :AutocompleteField, "ui_bibz/ui/core/inputs/autocomplete_field"
|
37
|
+
autoload :DatePickerField, "ui_bibz/ui/core/inputs/date_picker_field"
|
38
|
+
autoload :DropdownSelectField, "ui_bibz/ui/core/inputs/dropdown_select_field"
|
39
|
+
autoload :FormulaField, "ui_bibz/ui/core/inputs/formula_field"
|
40
|
+
autoload :MarkdownEditorField, "ui_bibz/ui/core/inputs/markdown_editor_field"
|
41
|
+
autoload :MultiColumnField, "ui_bibz/ui/core/inputs/multi_column_field"
|
42
|
+
autoload :MultiSelectField, "ui_bibz/ui/core/inputs/multi_select_field"
|
43
|
+
autoload :SurroundField, "ui_bibz/ui/core/inputs/surround_field"
|
44
|
+
autoload :SwitchField, "ui_bibz/ui/core/inputs/switch_field"
|
45
|
+
end
|
39
46
|
|
40
47
|
# Layout section
|
41
|
-
|
42
|
-
|
43
|
-
|
48
|
+
module Layouts
|
49
|
+
autoload :Row, "ui_bibz/ui/core/layouts/row"
|
50
|
+
autoload :Col, "ui_bibz/ui/core/layouts/col"
|
51
|
+
autoload :Container, "ui_bibz/ui/core/layouts/container"
|
52
|
+
end
|
44
53
|
|
45
54
|
# Nav section
|
46
|
-
|
47
|
-
|
55
|
+
module Navs
|
56
|
+
autoload :Nav, "ui_bibz/ui/core/navs/nav"
|
57
|
+
autoload :Navbar, "ui_bibz/ui/core/navs/navbar"
|
58
|
+
end
|
48
59
|
|
49
60
|
# Other section
|
50
61
|
autoload :Alert, "ui_bibz/ui/core/alert"
|
@@ -63,11 +74,16 @@ module UiBibz
|
|
63
74
|
|
64
75
|
# Ux
|
65
76
|
module Ux
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
77
|
+
|
78
|
+
# Table section
|
79
|
+
module Tables
|
80
|
+
autoload :Table, "ui_bibz/ui/ux/tables/table"
|
81
|
+
autoload :TableCard, "ui_bibz/ui/ux/tables/table_card"
|
82
|
+
autoload :TableSearchField, "ui_bibz/ui/ux/tables/table_search_field"
|
83
|
+
autoload :TablePagination, "ui_bibz/ui/ux/tables/table_pagination"
|
84
|
+
autoload :TablePaginationPerPage, "ui_bibz/ui/ux/tables/table_pagination_per_page"
|
85
|
+
end
|
86
|
+
|
71
87
|
end
|
72
88
|
end
|
73
89
|
|
data/test/store_test.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'test_helper'
|
2
|
-
require "ui_bibz/ui/ux/
|
2
|
+
require "ui_bibz/ui/ux/tables/components/store"
|
3
3
|
require 'will_paginate'
|
4
4
|
|
5
5
|
class StoreTest < ActionView::TestCase
|
@@ -16,7 +16,7 @@ class StoreTest < ActionView::TestCase
|
|
16
16
|
page: 1
|
17
17
|
}
|
18
18
|
users = User.table_search_pagination(params, session)
|
19
|
-
@store = UiBibz::Ui::Ux::Store.new users
|
19
|
+
@store = UiBibz::Ui::Ux::Tables::Store.new users
|
20
20
|
end
|
21
21
|
|
22
22
|
test 'total pages' do
|