playbook_ui 14.12.0.pre.alpha.PLAY1865reactdatepickerreinitializingbug5732 → 14.12.0.pre.alpha.advancedtablealignmentfixes5693
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading_react.md → _advanced_table_loading.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -5
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
- data/dist/chunks/{_typeahead-BIhRQo8Q.js → _typeahead-BWwaAo_0.js} +3 -3
- data/dist/chunks/_weekday_stacked-N1NVUtQO.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -6
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/pb_forms_helper.rb +4 -13
- data/lib/playbook/version.rb +1 -1
- metadata +5 -16
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -3
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
- data/dist/chunks/_weekday_stacked-bORvL0Zi.js +0 -45
- data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e4dc3d2e5a79486ca82c7d90654b0cf1db86bdb42cc9c0540ffb9635c373174
|
4
|
+
data.tar.gz: cb9d6f1a2680e4ac81dc637ec1984efa4368d5b0739c44f6134ec44f214dccd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ec944b74d30f62a35b54bb1138fa97dd7b4635a67375336fd6c4fd6d3d2875abb8338d271a874688c22f562e126c49387d2ce5ca1d9610a3b12d077f5efb7a
|
7
|
+
data.tar.gz: dfbf55ff877f9c17064e58ee45b72a24adf289238e3b06cac9b27f4fa3492dec18d7d6b756cd5053b954d1142de84942468d8b794e2f3432dc8c88e16c19a3c7
|
@@ -15,7 +15,6 @@
|
|
15
15
|
@import 'pb_circle_chart/circle_chart';
|
16
16
|
@import 'pb_circle_icon_button/circle_icon_button';
|
17
17
|
@import 'pb_collapsible/collapsible';
|
18
|
-
@import 'pb_copy_button/copy_button';
|
19
18
|
@import 'pb_contact/contact';
|
20
19
|
@import 'pb_currency/currency';
|
21
20
|
@import 'pb_dashboard_value/dashboard_value';
|
@@ -1,10 +1,15 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
<%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive: "none", dark: dark }.merge(object.table_props)) do %>
|
3
|
+
<% if content.present? %>
|
4
|
+
<% content.presence %>
|
5
|
+
<% else %>
|
6
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions,
|
7
|
+
enable_toggle_expansion: object.enable_toggle_expansion,
|
8
|
+
responsive: object.responsive }) %>
|
9
|
+
<%= pb_rails("advanced_table/table_body", props: { id: object.id,
|
10
|
+
table_data: object.table_data,
|
11
|
+
column_definitions: object.column_definitions,
|
12
|
+
responsive: object.responsive }) %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
10
15
|
<% end %>
|
@@ -10,8 +10,6 @@ module Playbook
|
|
10
10
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
11
11
|
values: %w[all header none],
|
12
12
|
default: "header"
|
13
|
-
prop :loading, type: Playbook::Props::Boolean,
|
14
|
-
default: false
|
15
13
|
prop :responsive, type: Playbook::Props::Enum,
|
16
14
|
values: %w[none scroll],
|
17
15
|
default: "scroll"
|
@@ -245,7 +245,7 @@ test("toggleExpansionAll button exists and toggles subrows open and closed", asy
|
|
245
245
|
})
|
246
246
|
|
247
247
|
|
248
|
-
test("loading state +
|
248
|
+
test("loading state + initialLoadingRowCount prop", () => {
|
249
249
|
render(
|
250
250
|
<AdvancedTable
|
251
251
|
columnDefinitions={columnDefinitions}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
the optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
|
2
2
|
|
3
|
-
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `
|
3
|
+
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
|
@@ -1,7 +1,6 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
4
|
-
- advanced_table_loading: Loading State
|
5
4
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
6
5
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
7
6
|
- advanced_table_table_props: Table Props
|
@@ -16,8 +16,6 @@ module Playbook
|
|
16
16
|
default: []
|
17
17
|
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
18
18
|
default: true
|
19
|
-
prop :loading, type: Playbook::Props::Boolean,
|
20
|
-
default: false
|
21
19
|
prop :responsive, type: Playbook::Props::Enum,
|
22
20
|
values: %w[none scroll],
|
23
21
|
default: "scroll"
|
@@ -56,7 +54,7 @@ module Playbook
|
|
56
54
|
current_data_attributes = current_depth.zero? ? { row_depth: 0 } : table_data_attributes
|
57
55
|
|
58
56
|
# Additional class and data attributes needed for toggle logic
|
59
|
-
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive
|
57
|
+
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive })
|
60
58
|
|
61
59
|
if row[:children].present?
|
62
60
|
row[:children].each do |child_row|
|
@@ -6,15 +6,11 @@
|
|
6
6
|
<%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
|
7
7
|
<%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: "end" }) do %>
|
8
8
|
<% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
onclick="expandAllRows(this); event.preventDefault();">
|
15
|
-
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
|
16
|
-
</button>
|
17
|
-
<% end %>
|
9
|
+
<button
|
10
|
+
class="gray-icon toggle-all-icon"
|
11
|
+
onclick="expandAllRows(this); event.preventDefault();">
|
12
|
+
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
|
13
|
+
</button>
|
18
14
|
<% end %>
|
19
15
|
<%= cell[:label] %>
|
20
16
|
<% end %>
|
@@ -8,8 +8,6 @@ module Playbook
|
|
8
8
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
9
9
|
values: %w[all header none],
|
10
10
|
default: "header"
|
11
|
-
prop :loading, type: Playbook::Props::Boolean,
|
12
|
-
default: false
|
13
11
|
prop :responsive, type: Playbook::Props::Enum,
|
14
12
|
values: %w[none scroll],
|
15
13
|
default: "scroll"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
3
|
<% next unless column[:accessor].present? %>
|
4
4
|
<%= pb_rails("table/table_cell", props: { classname:object.td_classname(column, index)}) do %>
|
5
|
-
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end"
|
5
|
+
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
6
6
|
<% if collapsible_trail && index.zero? %>
|
7
7
|
<% (1..depth).each do |i| %>
|
8
8
|
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
|
@@ -13,8 +13,6 @@ module Playbook
|
|
13
13
|
default: true
|
14
14
|
prop :table_data_attributes, type: Playbook::Props::HashProp,
|
15
15
|
default: {}
|
16
|
-
prop :loading, type: Playbook::Props::Boolean,
|
17
|
-
default: false
|
18
16
|
prop :responsive, type: Playbook::Props::Enum,
|
19
17
|
values: %w[none scroll],
|
20
18
|
default: "scroll"
|
@@ -32,7 +32,6 @@ type TooltipProps = {
|
|
32
32
|
position?: "absolute" | "fixed";
|
33
33
|
text: string,
|
34
34
|
showTooltip?: boolean,
|
35
|
-
forceOpenTooltip?: boolean,
|
36
35
|
} & GlobalProps
|
37
36
|
|
38
37
|
const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): React.ReactElement => {
|
@@ -50,7 +49,6 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
50
49
|
text,
|
51
50
|
showTooltip = true,
|
52
51
|
zIndex,
|
53
|
-
forceOpenTooltip = false,
|
54
52
|
...rest
|
55
53
|
} = props
|
56
54
|
|
@@ -137,7 +135,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
137
135
|
>
|
138
136
|
{children}
|
139
137
|
</div>
|
140
|
-
{
|
138
|
+
{open && (
|
141
139
|
<div
|
142
140
|
{...getFloatingProps({
|
143
141
|
className: `tooltip_tooltip ${placement} visible`,
|