playbook_ui 15.3.0.pre.alpha.play262912095 → 15.3.0.pre.rc.0
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/app/pb_kits/playbook/_playbook.scss +5 -5
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +3 -18
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +14 -71
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +3 -12
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +5 -127
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +0 -28
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -11
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +1 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/index.js +8 -12
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +6 -79
- data/app/pb_kits/playbook/pb_background/background.html.erb +2 -10
- data/app/pb_kits/playbook/pb_background/docs/_background_category.md +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +4 -4
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -4
- data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -20
- data/app/pb_kits/playbook/pb_currency/currency.rb +8 -35
- data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -47
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +30 -11
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.md +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md +0 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -10
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/formHelper.js +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.md +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.md +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +14 -7
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +15 -6
- data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.md +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +6 -8
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +1 -73
- data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +0 -47
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -25
- data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +34 -69
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_popover/popover.test.js +0 -80
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +2 -41
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +20 -60
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +0 -36
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.test.js +1 -127
- data/app/pb_kits/playbook/pb_section_separator/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -29
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_react.md +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sm.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -76
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -85
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -2
- data/app/pb_kits/playbook/tokens/_positioning.scss +0 -1
- data/app/pb_kits/playbook/utilities/_positioning.scss +1 -6
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -3
- data/dist/chunks/{_line_graph-CqE0-dq5.js → _line_graph-DY4PK6AH.js} +1 -1
- data/dist/chunks/_typeahead-fQDb_yVO.js +6 -0
- data/dist/chunks/{_weekday_stacked-W1kKx2Gl.js → _weekday_stacked-D_bGbWtk.js} +3 -3
- data/dist/chunks/{lib-CGxXTQ75.js → lib-QZuu1ltS.js} +1 -1
- data/dist/chunks/{pb_form_validation-DebqlUKZ.js → pb_form_validation-CleM960_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -12
- data/dist/playbook-doc.js +2 -2
- 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 +6 -7
- data/lib/playbook/version.rb +2 -2
- data/lib/playbook/z_index.rb +1 -1
- metadata +8 -101
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +0 -51
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +0 -42
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +0 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.scss +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.tsx +0 -69
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.html.erb +0 -12
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +0 -24
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +0 -5
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.html.erb +0 -45
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +0 -119
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.html.erb +0 -5
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.html.erb +0 -12
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.jsx +0 -24
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.html.erb +0 -23
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +0 -37
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.html.erb +0 -40
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +0 -56
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_live_data.jsx +0 -64
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.html.erb +0 -27
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +0 -40
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.html.erb +0 -19
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.jsx +0 -65
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.md +0 -3
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.html.erb +0 -14
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.jsx +0 -27
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.html.erb +0 -39
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +0 -58
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.md +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/example.yml +0 -29
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pbGaugeGraphTheme.ts +0 -91
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.rb +0 -25
- data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +0 -80
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.scss +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.tsx +0 -61
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +0 -52
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +0 -5
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +0 -47
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +0 -64
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +0 -24
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +0 -37
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +0 -39
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +0 -86
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +0 -116
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +0 -11
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +0 -20
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_pb_line_graph/pbLineGraphTheme.ts +0 -125
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.rb +0 -25
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +0 -110
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +0 -68
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx +0 -34
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +0 -69
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.html.erb +0 -63
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx +0 -89
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md +0 -4
- data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md +0 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +0 -64
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +0 -70
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.html.erb +0 -102
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.jsx +0 -103
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.md +0 -1
- data/dist/chunks/_typeahead-3ZAbZUqU.js +0 -6
- /data/app/pb_kits/playbook/pb_popover/docs/{_popover_append_to_rails.md → _popover_append_to.md} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
The `columnStyling` prop is an optional item that can be used within `columnDefinitions` as shown in the code snippet below. It is an object that has
|
|
1
|
+
The `columnStyling` prop is an optional item that can be used within `columnDefinitions` as shown in the code snippet below. It is an object that has 2 optional key/value pairs:
|
|
2
2
|
|
|
3
3
|
1) `headerAlignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
4
4
|
|
|
5
5
|
2) `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
6
6
|
|
|
7
|
-
3) `fontColor`: This will allow you to control the font color for a given column.
|
|
8
|
-
|
|
9
7
|
`columnStyling` can be used within the columnDefinition of all the columns or some of them, as shown. Each column has its own individual control in this way.
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
] %>
|
|
59
59
|
|
|
60
60
|
<%= pb_rails("advanced_table", props: { id: "column-styling-multi", table_data: @table_data, column_definitions: column_definitions }) do %>
|
|
61
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
62
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
61
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
|
62
|
+
<%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions }) %>
|
|
63
63
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb
CHANGED
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
{
|
|
30
30
|
accessor: "graduatedStudents",
|
|
31
31
|
label: "Graduated Students",
|
|
32
|
-
column_styling: { font_color: "red" }
|
|
33
32
|
}
|
|
34
33
|
] %>
|
|
35
34
|
|
|
36
35
|
<%= pb_rails("advanced_table", props: { id: "column-styling", table_data: @table_data, column_definitions: column_definitions }) do %>
|
|
37
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
38
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
36
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
|
37
|
+
<%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions }) %>
|
|
39
38
|
<% end %>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
The `column_styling` prop is an optional item that can be used within `column_definitions` as shown in the code snippet below.
|
|
1
|
+
The `column_styling` prop is an optional item that can be used within `column_definitions` as shown in the code snippet below. It is an object that has 2 optional key/value pairs:
|
|
2
2
|
|
|
3
3
|
1) `header_alignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
4
4
|
|
|
5
5
|
2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
6
6
|
|
|
7
|
-
3) `font_color`: This will allow you to control the font color for a given column.
|
|
8
|
-
|
|
9
7
|
`column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
|
-
import Caption from '../../pb_caption/_caption'
|
|
4
3
|
import { MOCK_DATA_INLINE_LOADING } from "./_mock_data_inline_loading"
|
|
5
|
-
import { MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN } from "./_mock_data_inline_loading_empty_children"
|
|
6
4
|
|
|
7
5
|
const AdvancedTableInlineRowLoading = (props) => {
|
|
8
6
|
const columnDefinitions = [
|
|
@@ -43,42 +41,16 @@ const AdvancedTableInlineRowLoading = (props) => {
|
|
|
43
41
|
|
|
44
42
|
return (
|
|
45
43
|
<div>
|
|
46
|
-
<Caption text="Inline Row Loading - Demonstrated in Row 1 (Rows 2 and 3 have data)" />
|
|
47
44
|
<AdvancedTable
|
|
48
45
|
columnDefinitions={columnDefinitions}
|
|
49
46
|
enableToggleExpansion="all"
|
|
50
47
|
inlineRowLoading
|
|
51
|
-
marginBottom="md"
|
|
52
48
|
tableData={MOCK_DATA_INLINE_LOADING}
|
|
53
49
|
{...props}
|
|
54
50
|
>
|
|
55
51
|
<AdvancedTable.Header />
|
|
56
52
|
<AdvancedTable.Body subRowHeaders={subRowHeaders}/>
|
|
57
53
|
</AdvancedTable>
|
|
58
|
-
<Caption text="Inline Row Loading with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is not rendered" />
|
|
59
|
-
<AdvancedTable
|
|
60
|
-
columnDefinitions={columnDefinitions}
|
|
61
|
-
enableToggleExpansion="all"
|
|
62
|
-
inlineRowLoading
|
|
63
|
-
marginBottom="md"
|
|
64
|
-
tableData={MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN}
|
|
65
|
-
{...props}
|
|
66
|
-
>
|
|
67
|
-
<AdvancedTable.Header />
|
|
68
|
-
<AdvancedTable.Body subRowHeaders={subRowHeaders}/>
|
|
69
|
-
</AdvancedTable>
|
|
70
|
-
<Caption text="Inline Row Loading and Persist Toggle Expansion Button with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is rendered" />
|
|
71
|
-
<AdvancedTable
|
|
72
|
-
columnDefinitions={columnDefinitions}
|
|
73
|
-
enableToggleExpansion="all"
|
|
74
|
-
inlineRowLoading
|
|
75
|
-
persistToggleExpansionButton
|
|
76
|
-
tableData={MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN}
|
|
77
|
-
{...props}
|
|
78
|
-
>
|
|
79
|
-
<AdvancedTable.Header />
|
|
80
|
-
<AdvancedTable.Body subRowHeaders={subRowHeaders}/>
|
|
81
|
-
</AdvancedTable>
|
|
82
54
|
</div>
|
|
83
55
|
)
|
|
84
56
|
}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
### inlineRowLoading
|
|
2
1
|
As a default, the kit assumes that the initial dataset is complete, and it renders all expansion buttons/controls based on that data; if no children are present, no expansion controls are rendered. If, however, you want to change the initial dataset to omit some or all of its children (to improve load times of a complex dataset, perhaps), and you implement a querying logic that loads children only when its parent is expanded, then you must use the `inlineRowLoading` prop to ensure your expansion controls are rendered even though your child data is not yet loaded. You must also pass an empty `children` array to any node that will have children to ensure its parent maintains its ability to expand. If this prop is called AND your data contains empty `children` arrays, the kit will render expansion controls on any row with empty children, and then add an inline loading state within the expanded subrow until those child row(s) are returned to the page [by your query logic].
|
|
3
2
|
|
|
4
|
-
In
|
|
3
|
+
In this code example, 2021 has an empty children array. Toggle it open to see the inline loading state. Once the correct data loads, this state will be replaced with the correct data rows.
|
|
5
4
|
|
|
6
|
-
This prop is set to `false` by default.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### persistToggleExpansion
|
|
10
|
-
The `persistToggleExpansionButton` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceeding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
|
|
11
|
-
|
|
12
|
-
In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persistToggleExpansionButton` in place. The third Advanced Table shows the toggle all button due to `persistToggleExpansionButton`.
|
|
13
|
-
|
|
14
|
-
This prop is set to false by default and should only be used in conjunction with `inlineRowLoading`.
|
|
5
|
+
This prop is set to `false` by default.
|
|
@@ -22,6 +22,7 @@ const AdvancedTablePaddingControl = (props) => {
|
|
|
22
22
|
{value}
|
|
23
23
|
</Background>
|
|
24
24
|
),
|
|
25
|
+
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
accessor: "scheduledMeetings",
|
|
@@ -38,15 +39,6 @@ const AdvancedTablePaddingControl = (props) => {
|
|
|
38
39
|
{
|
|
39
40
|
accessor: "classCompletionRate",
|
|
40
41
|
label: "Class Completion Rate",
|
|
41
|
-
columnStyling:{cellPadding: "none", fontColor: "white"},
|
|
42
|
-
customRenderer: (row, value) => (
|
|
43
|
-
<Background
|
|
44
|
-
backgroundColor={"category_1"}
|
|
45
|
-
padding="xs"
|
|
46
|
-
>
|
|
47
|
-
{value}
|
|
48
|
-
</Background>
|
|
49
|
-
),
|
|
50
42
|
},
|
|
51
43
|
{
|
|
52
44
|
accessor: "graduatedStudents",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
`columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
|
|
2
2
|
|
|
3
|
-
This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
|
|
3
|
+
This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
`paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with
|
|
1
|
+
`paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with 2 optional items:
|
|
2
2
|
|
|
3
3
|
- `pageIndex`: An optional prop to set which page is set to open on initial load. Default is '0'
|
|
4
4
|
- `pageSize`: An optional prop to set total number of rows for each page before the Table paginates. Default is '20'
|
|
5
|
-
- `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'
|
|
6
|
-
- `onPageChange`: A callback function that gives to access to the current page index.
|
|
5
|
+
- `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
The `row_styling` prop can be used in conjunction with row ids to control certain styling options on individual rows.
|
|
1
|
+
The `row_styling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `row_styling` gives you 3 optional controls:
|
|
2
2
|
|
|
3
3
|
- `background_color` : use this to control the background color of the row
|
|
4
4
|
- `font_color`: use this to control font color for each row if needed, for example if using a darker background color.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
The `rowStyling` prop can be used in conjunction with row ids to control certain styling options on individual rows.
|
|
1
|
+
The `rowStyling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `rowStyling` gives you 3 optional controls:
|
|
2
2
|
|
|
3
3
|
- `backgroundColor` : use this to control the background color of the row
|
|
4
4
|
- `fontColor`: use this to control font color for each row if needed, for example if using a darker background color.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb
CHANGED
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
%>
|
|
35
35
|
|
|
36
36
|
<%= pb_rails("advanced_table", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, selectable_rows: true }) do %>
|
|
37
|
-
<%= pb_rails("advanced_table/table_header", props: {
|
|
38
|
-
<%= pb_rails("advanced_table/table_body", props: {
|
|
37
|
+
<%= pb_rails("advanced_table/table_header", props: { id: "selectable_rows", column_definitions: column_definitions, selectable_rows: true }) %>
|
|
38
|
+
<%= pb_rails("advanced_table/table_body", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all", selectable_rows: true }) %>
|
|
39
39
|
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
To achieve a sticky header AND sticky columns together, in addition to the `stickyLeftColumn` logic outlined above, you can:
|
|
2
2
|
|
|
3
3
|
- Set `sticky: true` via `tableProps`
|
|
4
|
-
- Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud
|
|
4
|
+
- Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
|
|
5
5
|
|
|
6
6
|
**NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the column stickiness.
|
|
7
7
|
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
|
|
2
2
|
|
|
3
3
|
**NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
|
4
4
|
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
|
|
2
2
|
|
|
3
3
|
**NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
|
4
4
|
|
|
@@ -21,11 +21,8 @@ examples:
|
|
|
21
21
|
- advanced_table_selectable_rows_header_rails: Selectable Rows (No Actions Bar)
|
|
22
22
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
|
23
23
|
- advanced_table_row_styling: Row Styling
|
|
24
|
-
- advanced_table_padding_control_per_row_rails: Padding Control using Row Styling
|
|
25
24
|
- advanced_table_column_styling_rails: Column Styling
|
|
26
25
|
- advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
|
27
|
-
- advanced_table_padding_control_rails: Padding Control using Column Styling
|
|
28
|
-
- advanced_table_background_control_rails: Background Control using Column Styling
|
|
29
26
|
- advanced_table_column_border_color_rails: Column Group Border Color
|
|
30
27
|
|
|
31
28
|
|
|
@@ -51,7 +51,7 @@ export default class PbFlatAdvancedTable extends PbEnhancedElement {
|
|
|
51
51
|
|
|
52
52
|
const tr = rowCb.closest("tr");
|
|
53
53
|
tr?.classList.toggle("bg-row-selection", rowCb.checked);
|
|
54
|
-
tr?.classList.toggle("
|
|
54
|
+
tr?.classList.toggle("bg-white", !rowCb.checked);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
if (allCb) {
|
|
@@ -62,7 +62,7 @@ export default class PbFlatAdvancedTable extends PbEnhancedElement {
|
|
|
62
62
|
cb.checked = checked;
|
|
63
63
|
const tr = cb.closest("tr");
|
|
64
64
|
tr?.classList.toggle("bg-row-selection", checked);
|
|
65
|
-
tr?.classList.toggle("
|
|
65
|
+
tr?.classList.toggle("bg-white", !checked);
|
|
66
66
|
const id = cb.id;
|
|
67
67
|
if (checked) this.selectedRows.add(id);
|
|
68
68
|
else this.selectedRows.delete(id);
|
|
@@ -76,7 +76,7 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
76
76
|
// Only apply styling if the checkbox is inside a table row
|
|
77
77
|
if (rowEl) {
|
|
78
78
|
rowEl.classList.add("bg-row-selection");
|
|
79
|
-
rowEl.classList.remove("
|
|
79
|
+
rowEl.classList.remove("bg-white", "bg-silver");
|
|
80
80
|
}
|
|
81
81
|
} else {
|
|
82
82
|
// Only apply styling if the checkbox is inside a table row
|
|
@@ -85,9 +85,9 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
85
85
|
|
|
86
86
|
if (this.isRowExpanded(rowEl)) {
|
|
87
87
|
rowEl.classList.remove("bg-silver");
|
|
88
|
-
rowEl.classList.add("
|
|
88
|
+
rowEl.classList.add("bg-white");
|
|
89
89
|
} else {
|
|
90
|
-
rowEl.classList.remove("
|
|
90
|
+
rowEl.classList.remove("bg-white");
|
|
91
91
|
rowEl.classList.add("bg-silver");
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -120,7 +120,7 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
120
120
|
if (isChecked) {
|
|
121
121
|
PbAdvancedTable.selectedRows.add(rowId);
|
|
122
122
|
rowEl.classList.add("bg-row-selection");
|
|
123
|
-
rowEl.classList.remove("
|
|
123
|
+
rowEl.classList.remove("bg-white", "bg-silver");
|
|
124
124
|
} else {
|
|
125
125
|
PbAdvancedTable.selectedRows.delete(rowId);
|
|
126
126
|
}
|
|
@@ -130,9 +130,9 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
130
130
|
|
|
131
131
|
if (this.isRowExpanded(rowEl)) {
|
|
132
132
|
rowEl.classList.remove("bg-silver");
|
|
133
|
-
rowEl.classList.add("
|
|
133
|
+
rowEl.classList.add("bg-white");
|
|
134
134
|
} else {
|
|
135
|
-
rowEl.classList.remove("
|
|
135
|
+
rowEl.classList.remove("bg-white");
|
|
136
136
|
rowEl.classList.add("bg-silver");
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -331,12 +331,8 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
331
331
|
// Split the dataContent to get all ancestor IDs, check against ExpandedRows
|
|
332
332
|
const ancestorIds = dataContent.split("-").slice(0, -1);
|
|
333
333
|
|
|
334
|
-
// Get the table_id from the child row's parent to construct proper prefixed IDs
|
|
335
|
-
const parentRowId = childRow.dataset.rowParent;
|
|
336
|
-
const tableId = parentRowId ? parentRowId.split('_').slice(0, -1).join('_') : '';
|
|
337
|
-
|
|
338
334
|
const prefixedAncestorIds = ancestorIds.map(
|
|
339
|
-
(id) => `${
|
|
335
|
+
(id) => `${childRow.id}_${id}`
|
|
340
336
|
);
|
|
341
337
|
const allAncestorsExpanded = prefixedAncestorIds.every((id) =>
|
|
342
338
|
PbAdvancedTable.expandedRows.has(id)
|
|
@@ -407,7 +403,7 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
|
407
403
|
const row = this.element.closest("tr");
|
|
408
404
|
if (row) {
|
|
409
405
|
row.classList.toggle("bg-silver", !isVisible);
|
|
410
|
-
row.classList.toggle("
|
|
406
|
+
row.classList.toggle("bg-white", isVisible);
|
|
411
407
|
}
|
|
412
408
|
|
|
413
409
|
this.addBorderRadiusOnLastVisibleRow();
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
.bg-white {
|
|
56
56
|
td:first-child,
|
|
57
57
|
.sticky-left {
|
|
58
58
|
background-color: $bg-main;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
&.bg-silver td:first-child {
|
|
64
64
|
background-color: $bg-secondary;
|
|
65
65
|
}
|
|
66
|
-
&.
|
|
66
|
+
&.bg-white td:first-child {
|
|
67
67
|
background-color: $bg-main;
|
|
68
68
|
}
|
|
69
69
|
&.bg-row-selection td:first-child {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Playbook
|
|
4
4
|
module PbAdvancedTable
|
|
5
5
|
class TableBody < Playbook::KitBase
|
|
6
|
-
prop :
|
|
7
|
-
|
|
6
|
+
prop :id, type: Playbook::Props::String,
|
|
7
|
+
default: ""
|
|
8
8
|
prop :table_data, type: Playbook::Props::Array,
|
|
9
9
|
default: []
|
|
10
10
|
prop :column_definitions, type: Playbook::Props::Array,
|
|
@@ -53,7 +53,7 @@ module Playbook
|
|
|
53
53
|
subrow_data_attributes = {
|
|
54
54
|
advanced_table_content: subrow_ancestor_ids.join("-"),
|
|
55
55
|
row_depth: current_depth,
|
|
56
|
-
row_parent: "#{
|
|
56
|
+
row_parent: "#{id}_#{ancestor_ids.last}",
|
|
57
57
|
}
|
|
58
58
|
# Subrow header if applicable
|
|
59
59
|
output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: leaf_columns, depth: current_depth, subrow_header: subrow_headers[current_depth - 1], collapsible_trail: collapsible_trail, classname: "toggle-content", responsive: responsive, subrow_data_attributes: subrow_data_attributes, last_row: last_row, immediate_parent_row_id: immediate_parent_row_id }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
|
|
@@ -69,7 +69,7 @@ module Playbook
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
# Additional class and data attributes needed for toggle logic
|
|
72
|
-
output << pb_rails("advanced_table/table_row", props: {
|
|
72
|
+
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, loading: loading, selectable_rows: selectable_rows, row_id: row[:id], enable_toggle_expansion: enable_toggle_expansion, row_styling: row_styling, last_row: last_row, immediate_parent_row_id: immediate_parent_row_id })
|
|
73
73
|
|
|
74
74
|
if row[:children].present?
|
|
75
75
|
row[:children].each do |child_row|
|
|
@@ -78,9 +78,9 @@ module Playbook
|
|
|
78
78
|
data_content = new_ancestor_ids.join("-") + "-#{child_row.object_id}"
|
|
79
79
|
|
|
80
80
|
child_data_attributes = {
|
|
81
|
-
top_parent: "#{
|
|
81
|
+
top_parent: "#{id}_#{top_parent_id}",
|
|
82
82
|
row_depth: current_depth + 1,
|
|
83
|
-
row_parent: "#{
|
|
83
|
+
row_parent: "#{id}_#{immediate_parent_id}",
|
|
84
84
|
advanced_table_content: data_content,
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Playbook
|
|
4
4
|
module PbAdvancedTable
|
|
5
5
|
class TableHeader < Playbook::KitBase
|
|
6
|
-
prop :
|
|
7
|
-
|
|
6
|
+
prop :id, type: Playbook::Props::String,
|
|
7
|
+
default: ""
|
|
8
8
|
prop :column_definitions, type: Playbook::Props::Array,
|
|
9
9
|
default: []
|
|
10
10
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
|
@@ -58,10 +58,10 @@ module Playbook
|
|
|
58
58
|
classname: additional_classes.join(" "),
|
|
59
59
|
}) do
|
|
60
60
|
pb_rails("checkbox", props: {
|
|
61
|
-
id: "#{
|
|
61
|
+
id: "#{id ? "#{id}-" : ''}select-all-rows",
|
|
62
62
|
indeterminate_main: true,
|
|
63
63
|
indeterminate_main_labels: ["", ""],
|
|
64
|
-
name: "#{
|
|
64
|
+
name: "#{id ? "#{id}-" : ''}select-all-rows",
|
|
65
65
|
})
|
|
66
66
|
end
|
|
67
67
|
end
|
|
@@ -71,10 +71,10 @@ module Playbook
|
|
|
71
71
|
def render_select_all_checkbox
|
|
72
72
|
if selectable_rows
|
|
73
73
|
pb_rails("checkbox", props: {
|
|
74
|
-
id: "#{
|
|
74
|
+
id: "#{id ? "#{id}-" : ''}select-all-rows",
|
|
75
75
|
indeterminate_main: true,
|
|
76
76
|
indeterminate_main_labels: ["", ""],
|
|
77
|
-
name: "#{
|
|
77
|
+
name: "#{id ? "#{id}-" : ''}select-all-rows",
|
|
78
78
|
data: {
|
|
79
79
|
action: "click->pb-advanced-table#toggleAllRowSelection",
|
|
80
80
|
},
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
<% end %>
|
|
13
13
|
<% object.column_definitions.each_with_index do |column, index| %>
|
|
14
14
|
<% next unless column[:accessor].present? %>
|
|
15
|
-
|
|
16
|
-
<%= pb_rails(component_info[:name], props: component_info[:props]) do %>
|
|
15
|
+
<%= pb_rails("table/table_cell", props: { html_options: { style: { "background-color": bg_color, color: font_color } }, classname:object.td_classname(column, index)}) do %>
|
|
17
16
|
<%= pb_rails("flex", props:{ align: "center", justify: object.justify_for(column, index), classname: object.loading ? "loading-cell" : "" }) do %>
|
|
18
17
|
<% if collapsible_trail && index.zero? %>
|
|
19
18
|
<% (1..depth).each do |i| %>
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
<% end %>
|
|
35
34
|
<% if object.row[:children].present? %>
|
|
36
35
|
<button
|
|
37
|
-
id="<%= "#{object.
|
|
36
|
+
id="<%= "#{object.id}_#{object.row.object_id}" %>"
|
|
38
37
|
class="gray-icon expand-toggle-icon"
|
|
39
38
|
data-advanced-table="true"
|
|
40
39
|
style="color: <%= button_color %>"
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Playbook
|
|
4
4
|
module PbAdvancedTable
|
|
5
5
|
class TableRow < Playbook::KitBase
|
|
6
|
-
prop :
|
|
7
|
-
|
|
6
|
+
prop :id, type: Playbook::Props::String,
|
|
7
|
+
default: ""
|
|
8
8
|
prop :column_definitions, type: Playbook::Props::Array,
|
|
9
9
|
default: []
|
|
10
10
|
prop :row
|
|
@@ -39,89 +39,16 @@ module Playbook
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def classname
|
|
42
|
-
generate_classname("pb_table_tr", "
|
|
42
|
+
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def td_classname(column, index)
|
|
46
46
|
classes = %w[id-cell]
|
|
47
47
|
classes << "last-cell" if column[:is_last_in_group]
|
|
48
48
|
classes << "pinned-left" if index.zero? && is_pinned_left && responsive == "scroll"
|
|
49
|
-
|
|
50
|
-
row_style = row_styling.find { |style| style[:row_id].to_s == row_id.to_s }
|
|
51
|
-
row_padding = row_style&.[](:cell_padding)
|
|
52
|
-
|
|
53
|
-
if column[:accessor].present?
|
|
54
|
-
orig_def = find_column_def_by_accessor(column_definitions, column[:accessor])
|
|
55
|
-
column_padding = orig_def[:column_styling][:cell_padding] if orig_def && orig_def[:column_styling].is_a?(Hash) && orig_def[:column_styling][:cell_padding].present?
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
classes << "p_#{row_padding}" if row_padding.present?
|
|
59
|
-
classes << "p_#{column_padding}" if column_padding.present?
|
|
60
|
-
|
|
61
49
|
classes.join(" ")
|
|
62
50
|
end
|
|
63
51
|
|
|
64
|
-
def cell_background_color(column)
|
|
65
|
-
return nil unless column[:accessor].present?
|
|
66
|
-
|
|
67
|
-
orig_def = find_column_def_by_accessor(column_definitions, column[:accessor])
|
|
68
|
-
if orig_def && orig_def[:column_styling].is_a?(Hash) && orig_def[:column_styling][:cell_background_color].present?
|
|
69
|
-
bg_color = orig_def[:column_styling][:cell_background_color]
|
|
70
|
-
if bg_color.respond_to?(:call)
|
|
71
|
-
bg_color.call(row)
|
|
72
|
-
else
|
|
73
|
-
bg_color
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def has_custom_background_color?(column)
|
|
79
|
-
cell_background_color(column).present?
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def cell_font_color(column)
|
|
83
|
-
return nil unless column[:accessor].present?
|
|
84
|
-
|
|
85
|
-
orig_def = find_column_def_by_accessor(column_definitions, column[:accessor])
|
|
86
|
-
if orig_def && orig_def[:column_styling].is_a?(Hash) && orig_def[:column_styling][:font_color].present?
|
|
87
|
-
font_color = orig_def[:column_styling][:font_color]
|
|
88
|
-
if font_color.respond_to?(:call)
|
|
89
|
-
font_color.call(row)
|
|
90
|
-
else
|
|
91
|
-
font_color
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Uses a regular table/table_cell component if there is no custom background color; if there is a cell_background_color uses a background component with tag "td"
|
|
97
|
-
def cell_component_info(column, index, bg_color, font_color)
|
|
98
|
-
column_font_color = cell_font_color(column)
|
|
99
|
-
effective_font_color = column_font_color || font_color
|
|
100
|
-
|
|
101
|
-
if has_custom_background_color?(column)
|
|
102
|
-
custom_bg_color = cell_background_color(column)
|
|
103
|
-
component_name = "background"
|
|
104
|
-
component_props = {
|
|
105
|
-
background_color: custom_bg_color,
|
|
106
|
-
tag: "td",
|
|
107
|
-
classname: td_classname(column, index),
|
|
108
|
-
}
|
|
109
|
-
component_props[:html_options] = { style: { color: effective_font_color } } if effective_font_color.present?
|
|
110
|
-
else
|
|
111
|
-
component_name = "table/table_cell"
|
|
112
|
-
style_hash = { "background-color": bg_color }
|
|
113
|
-
style_hash[:color] = effective_font_color if effective_font_color.present?
|
|
114
|
-
component_props = {
|
|
115
|
-
html_options: {
|
|
116
|
-
style: style_hash,
|
|
117
|
-
},
|
|
118
|
-
classname: td_classname(column, index),
|
|
119
|
-
}
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
{ name: component_name, props: component_props }
|
|
123
|
-
end
|
|
124
|
-
|
|
125
52
|
def depth_accessors
|
|
126
53
|
column_definitions.flat_map do |column|
|
|
127
54
|
column[:cellAccessors] if column.key?(:cellAccessors)
|
|
@@ -131,13 +58,13 @@ module Playbook
|
|
|
131
58
|
# Selectable Rows No Subrows - checkboxes in their own first cell
|
|
132
59
|
def render_checkbox_cell
|
|
133
60
|
if selectable_rows
|
|
134
|
-
prefix =
|
|
61
|
+
prefix = id ? "#{id}-" : ""
|
|
135
62
|
pb_rails("table/table_cell", props: {
|
|
136
63
|
classname: "checkbox-cell",
|
|
137
64
|
}) do
|
|
138
65
|
pb_rails("checkbox", props: {
|
|
139
66
|
id: "#{prefix}select-row-#{row_id || row.object_id}",
|
|
140
|
-
indeterminate_parent: "#{
|
|
67
|
+
indeterminate_parent: "#{id ? "#{id}-" : ''}select-all-rows",
|
|
141
68
|
name: "#{prefix}select-row-#{row_id || row.object_id}",
|
|
142
69
|
data: {
|
|
143
70
|
row_id: row_id || row.object_id.to_s,
|
|
@@ -151,7 +78,7 @@ module Playbook
|
|
|
151
78
|
# Selectable Rows w/ Subrows - checkboxes part of toggleable first cell
|
|
152
79
|
def render_row_checkbox
|
|
153
80
|
if selectable_rows
|
|
154
|
-
prefix =
|
|
81
|
+
prefix = id ? "#{id}-" : ""
|
|
155
82
|
indeterminate_parent =
|
|
156
83
|
if depth.zero?
|
|
157
84
|
"#{prefix}select-all-rows"
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
<%
|
|
2
|
-
html_options_style = ""
|
|
3
|
-
if object.html_options[:style].is_a?(Hash)
|
|
4
|
-
html_options_style = object.html_options[:style].map { |k, v| "#{k.to_s.tr('_', '-')}: #{v}" }.join("; ")
|
|
5
|
-
elsif object.html_options[:style].is_a?(String)
|
|
6
|
-
html_options_style = object.html_options[:style]
|
|
7
|
-
end
|
|
8
|
-
%>
|
|
9
1
|
<% if object.image_url.present? %>
|
|
10
2
|
<%= pb_content_tag(object.tag,
|
|
11
3
|
style: "background-image: url('#{object.image_url}');
|
|
@@ -17,8 +9,8 @@
|
|
|
17
9
|
<% end %>
|
|
18
10
|
<% else %>
|
|
19
11
|
<%= pb_content_tag(object.tag,
|
|
20
|
-
style:
|
|
12
|
+
style: object.custom_background_color
|
|
21
13
|
) do %>
|
|
22
14
|
<%= content.presence %>
|
|
23
15
|
<% end %>
|
|
24
|
-
<% end %>
|
|
16
|
+
<% end %>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Category colors can be passed into the background kit. Values `category_1` to `category_21` are accepted. List of all category and status colors can be viewed <a href="https://playbook.powerapp.cloud/
|
|
1
|
+
Category colors can be passed into the background kit. Values `category_1` to `category_21` are accepted. List of all category and status colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">here</a>.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
<div>
|
|
3
3
|
<%= pb_rails("bread_crumbs", props: { aria: { label: "Breadcrumb Navigation" } }) do%>
|
|
4
|
-
<%= pb_rails("icon", props: { icon: "home"
|
|
4
|
+
<%= pb_rails("icon", props: { icon: "home"}) %>
|
|
5
5
|
<%= pb_rails("bread_crumbs/bread_crumb_item", props: { link: "/" }) do %>
|
|
6
|
-
<%= pb_rails("title", props: { size: 4, text: "Home", tag: "span"
|
|
6
|
+
<%= pb_rails("title", props: { size: 4, text: "Home", tag: "span" }) %>
|
|
7
7
|
<%end%>
|
|
8
|
-
<%= pb_rails("icon", props: { icon: 'users'
|
|
8
|
+
<%= pb_rails("icon", props: { icon: 'users'}) %>
|
|
9
9
|
<%= pb_rails("bread_crumbs/bread_crumb_item", props: { link: "/users" }) do %>
|
|
10
|
-
<%= pb_rails("title", props: { size: 4, text: "Users", tag: "span"
|
|
10
|
+
<%= pb_rails("title", props: { size: 4, text: "Users", tag: "span" }) %>
|
|
11
11
|
<%end%>
|
|
12
12
|
<%= pb_rails("icon", props: { icon: "user"}) %>
|
|
13
13
|
<%= pb_rails("bread_crumbs/bread_crumb_item") do %>
|