playbook_ui 14.21.2.pre.alpha.PLAY2233removetreemapchart8408 → 14.21.2.pre.alpha.PLAY2241tablestickycolumnsdatanotids8357

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -4
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +0 -8
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +5 -30
  6. data/app/pb_kits/playbook/pb_advanced_table/Utilities/CellRendererUtils.tsx +1 -4
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +0 -4
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -25
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md +3 -5
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -1
  13. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +39 -1
  14. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +39 -1
  15. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb +3 -3
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx +4 -7
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +3 -6
  18. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +3 -6
  19. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +3 -3
  20. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb +3 -3
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx +4 -7
  22. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +3 -3
  23. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +4 -7
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx +10 -19
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx +10 -19
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb +10 -10
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb +10 -10
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb +10 -10
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx +11 -20
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb +3 -3
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx +8 -8
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb +10 -10
  33. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx +14 -23
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +3 -3
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +3 -6
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx +3 -6
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb +3 -3
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +3 -3
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +3 -6
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +3 -3
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +3 -3
  42. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +4 -4
  43. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.jsx +4 -4
  44. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +4 -4
  45. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +4 -4
  46. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +3 -3
  47. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +3 -3
  48. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +3 -3
  49. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx +3 -3
  50. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +3 -3
  51. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +3 -3
  52. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx +3 -3
  53. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -3
  54. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +3 -6
  55. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +3 -3
  56. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +3 -3
  57. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -4
  58. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -3
  59. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +0 -4
  60. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.scss +14 -0
  61. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +119 -0
  62. data/app/pb_kits/playbook/pb_treemap_chart/docs/_description.md +5 -0
  63. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb +37 -0
  64. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx +48 -0
  65. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md +2 -0
  66. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb +37 -0
  67. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx +47 -0
  68. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md +3 -0
  69. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb +79 -0
  70. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx +90 -0
  71. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md +1 -0
  72. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb +54 -0
  73. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx +65 -0
  74. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md +3 -0
  75. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb +37 -0
  76. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx +48 -0
  77. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md +3 -0
  78. data/app/pb_kits/playbook/pb_treemap_chart/docs/example.yml +15 -0
  79. data/app/pb_kits/playbook/pb_treemap_chart/docs/index.js +5 -0
  80. data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +63 -0
  81. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb +1 -0
  82. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +48 -0
  83. data/dist/chunks/_typeahead-BmfmVMFP.js +22 -0
  84. data/dist/chunks/_weekday_stacked-DAC7yY_H.js +45 -0
  85. data/dist/chunks/lib-C2o6nu8G.js +29 -0
  86. data/dist/chunks/{pb_form_validation-DqRmTS8m.js → pb_form_validation-EyK6DbAT.js} +1 -1
  87. data/dist/chunks/vendor.js +1 -1
  88. data/dist/menu.yml +9 -0
  89. data/dist/playbook-doc.js +3 -3
  90. data/dist/playbook-rails-react-bindings.js +1 -1
  91. data/dist/playbook-rails.js +1 -1
  92. data/dist/playbook.css +1 -1
  93. data/lib/playbook/version.rb +1 -1
  94. metadata +29 -16
  95. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +0 -64
  96. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md +0 -7
  97. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.html.erb +0 -52
  98. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.jsx +0 -99
  99. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_rails.md +0 -1
  100. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_react.md +0 -1
  101. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.html.erb +0 -28
  102. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +0 -47
  103. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_rails.md +0 -1
  104. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +0 -1
  105. data/dist/chunks/_typeahead-DOgzItP7.js +0 -22
  106. data/dist/chunks/_weekday_stacked-SYZ-Kt4V.js +0 -45
  107. data/dist/chunks/lib-Carqm8Ip.js +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca80f9aba62971e4c9bc99c22dc32c4b2f8f608b9ba89954e6bfad5be025a640
4
- data.tar.gz: ad28bae091ba788af85a99d55aaaaa6ffe4a4321cc1ca0545c673682e299c1c8
3
+ metadata.gz: dcb903e9fac61dab1799f3b2480e1107fbe15b44cc240a7b47d203c96caecd13
4
+ data.tar.gz: d6114a181c65aa31d5c7f30bb729652ebb30b59ea8cf71946294c1d81c9206e2
5
5
  SHA512:
6
- metadata.gz: 5caa647eeee027e2507921bf5b5f2d28773145256580fad1403cf50efe18359fbe33dacd1f7cae56e81184541861f814c833265ecf45ebd0ab21270b186c00de
7
- data.tar.gz: 1aa83eef3b557a29e6897efd57e74f27636393118e511c700147d4dc6dfd0f56aee4da6e0a57f9f66660c01495afd5f809c49d990f7f43e5992359d9c4a1bd44
6
+ metadata.gz: f322fb4c59317a1f6d71ed145305656f34c3461b585904996b63c5f8b76fc175374dd9c82fc5ff2ab7f4d8830da244c1208ed44a3b29ae1fd334b12c7086dd5d
7
+ data.tar.gz: 60dbd83fd98aab746396b84410bc7c52125fcced4261870642be768fd6ce1db41dbc61f59ff845bcb76edcdbda826a4839397d3d39cc114b0c7a6a16c2e222f3
@@ -104,6 +104,7 @@
104
104
  @import 'pb_title_detail/title_detail';
105
105
  @import 'pb_toggle/toggle';
106
106
  @import 'pb_tooltip/tooltip';
107
+ @import 'pb_treemap_chart/treemap_chart';
107
108
  @import 'pb_typeahead/typeahead';
108
109
  @import 'pb_user/user';
109
110
  @import 'pb_user_badge/user_badge';
@@ -19,7 +19,6 @@ interface CustomCellProps {
19
19
  value?: string
20
20
  customRenderer?: (row: Row<GenericObject>, value: string | undefined) => React.ReactNode
21
21
  selectableRows?: boolean
22
- customStyle?: GenericObject
23
22
  }
24
23
 
25
24
  export const CustomCell = ({
@@ -29,7 +28,6 @@ export const CustomCell = ({
29
28
  value,
30
29
  customRenderer,
31
30
  selectableRows,
32
- customStyle = {},
33
31
  }: CustomCellProps & GlobalProps) => {
34
32
  const { setExpanded, expanded, expandedControl, inlineRowLoading, hasAnySubRows } = useContext(AdvancedTableContext);
35
33
 
@@ -45,7 +43,7 @@ export const CustomCell = ({
45
43
  const renderButton = inlineRowLoading ? RowHasChildren : row.getCanExpand()
46
44
 
47
45
  return (
48
- <div style={{ paddingLeft: `${row.depth * 1.25}em`}}>
46
+ <div style={{ paddingLeft: `${row.depth * 1.25}em` }}>
49
47
  <Flex
50
48
  alignItems="center"
51
49
  columnGap="xs"
@@ -67,7 +65,6 @@ export const CustomCell = ({
67
65
  <button
68
66
  className="gray-icon expand-toggle-icon"
69
67
  onClick={() => handleOnExpand(row)}
70
- style={{ color: customStyle?.expandButtonColor }}
71
68
  >
72
69
  {row.getIsExpanded() ? (
73
70
  <Icon cursor="pointer"
@@ -27,7 +27,6 @@ const TableCellRenderer = ({
27
27
  loading = false,
28
28
  stickyLeftColumn,
29
29
  columnPinning,
30
- customRowStyle,
31
30
  columnDefinitions,
32
31
  }: {
33
32
  row: Row<GenericObject>
@@ -35,7 +34,6 @@ const TableCellRenderer = ({
35
34
  loading?: boolean | string
36
35
  stickyLeftColumn?: string[]
37
36
  columnPinning: { left: string[] }
38
- customRowStyle?: GenericObject
39
37
  columnDefinitions?: {[key:string]:any}[]
40
38
  }) => {
41
39
  return (
@@ -76,8 +74,6 @@ const TableCellRenderer = ({
76
74
  ? '180px'
77
75
  : `${column.getStart("left")}px`
78
76
  : undefined,
79
- backgroundColor: i === 0 && customRowStyle?.backgroundColor,
80
- color: customRowStyle?.fontColor,
81
77
  }}
82
78
  >
83
79
  {collapsibleTrail && i === 0 && row.depth > 0 && renderCollapsibleTrail(row.depth)}
@@ -111,7 +107,6 @@ export const RegularTableView = ({
111
107
  pinnedRows,
112
108
  headerHeight,
113
109
  rowHeight,
114
- rowStyling = [],
115
110
  sampleRowRef,
116
111
  } = useContext(AdvancedTableContext)
117
112
 
@@ -176,7 +171,6 @@ export const RegularTableView = ({
176
171
  const rowBackground = isExpandable && ((!inlineRowLoading && row.getCanExpand()) || (inlineRowLoading && rowHasNoChildren));
177
172
  const rowColor = row.getIsSelected() ? "bg-row-selection" : rowBackground ? "bg-silver" : "bg-white";
178
173
  const isFirstRegularRow = rowIndex === 0 && !row.getIsPinned();
179
- const customRowStyle = rowStyling?.length > 0 && rowStyling?.find((s: GenericObject) => s?.rowId === row.id);
180
174
 
181
175
  return (
182
176
  <React.Fragment key={`${row.index}-${row.id}-${row.depth}-row`}>
@@ -195,7 +189,6 @@ export const RegularTableView = ({
195
189
  className={`${rowColor} ${row.depth > 0 ? `depth-sub-row-${row.depth}` : ""}`}
196
190
  id={`${row.index}-${row.id}-${row.depth}-row`}
197
191
  ref={isFirstRegularRow ? sampleRowRef : null}
198
- style={{backgroundColor: customRowStyle?.backgroundColor, color: customRowStyle?.fontColor}}
199
192
  >
200
193
  {/* Render custom checkbox column when we want selectableRows for non-expanding tables */}
201
194
  {selectableRows && !hasAnySubRows && (
@@ -213,7 +206,6 @@ export const RegularTableView = ({
213
206
  collapsibleTrail={collapsibleTrail}
214
207
  columnDefinitions={columnDefinitions}
215
208
  columnPinning={columnPinning}
216
- customRowStyle={customRowStyle}
217
209
  loading={loading}
218
210
  row={row}
219
211
  stickyLeftColumn={stickyLeftColumn}
@@ -1,4 +1,4 @@
1
- import { useState, useCallback, useMemo, useEffect } from 'react';
1
+ import { useState, useCallback, useMemo } from 'react';
2
2
  import {
3
3
  useReactTable,
4
4
  getCoreRowModel,
@@ -32,7 +32,6 @@ interface UseTableStateProps {
32
32
  tableOptions?: GenericObject;
33
33
  onRowSelectionChange?: (arg: RowSelectionState) => void;
34
34
  columnVisibilityControl?: GenericObject;
35
- rowStyling?: GenericObject;
36
35
  }
37
36
 
38
37
  export function useTableState({
@@ -50,9 +49,7 @@ export function useTableState({
50
49
  tableOptions,
51
50
  columnVisibilityControl,
52
51
  pinnedRows,
53
- rowStyling
54
52
  }: UseTableStateProps) {
55
-
56
53
  // Create a local state for expanded and setExpanded if expandedControl not used
57
54
  const [localExpanded, setLocalExpanded] = useState({});
58
55
  const [loadingStateRowCount, setLoadingStateRowCount] = useState(initialLoadingRowsCount);
@@ -66,8 +63,8 @@ export function useTableState({
66
63
  const setExpanded = expandedControl ? expandedControl.onChange : setLocalExpanded;
67
64
  const columnVisibility = (columnVisibilityControl && columnVisibilityControl.value) ? columnVisibilityControl.value : localColumnVisibility;
68
65
  const setColumnVisibility = (columnVisibilityControl && columnVisibilityControl.onChange) ? columnVisibilityControl.onChange : setLocalColumnVisibility;
69
- const rowPinning = pinnedRows?.value ?? localRowPinning
70
- const onRowPinningChange = pinnedRows?.onChange ?? setLocalRowPinning
66
+ const rowPinning = pinnedRows && pinnedRows.value || localRowPinning;
67
+ const setRowPinning = (pinnedRows && pinnedRows.onChange) ? pinnedRows.onChange : setLocalRowPinning;
71
68
 
72
69
  // Virtualized data handling (chunked loading)
73
70
  const fetchSize = 20; // Number of rows per "page"
@@ -105,8 +102,7 @@ export function useTableState({
105
102
  column.customRenderer,
106
103
  isFirstColumn,
107
104
  onRowToggleClick,
108
- selectableRows,
109
- rowStyling
105
+ selectableRows
110
106
  );
111
107
  }
112
108
 
@@ -169,8 +165,7 @@ export function useTableState({
169
165
  enableSortingRemoval: false,
170
166
  sortDescFirst: true,
171
167
  onRowSelectionChange: setRowSelection,
172
- onRowPinningChange,
173
- getRowId: (selectableRows || pinnedRows || rowStyling) ? row => row.id : undefined,
168
+ getRowId: (selectableRows || pinnedRows) ? row => row.id : undefined,
174
169
  onColumnVisibilityChange: setColumnVisibility,
175
170
  meta: {
176
171
  columnDefinitions
@@ -180,26 +175,6 @@ export function useTableState({
180
175
  ...tableOptions,
181
176
  });
182
177
 
183
- // Handle row pinning changes
184
- useEffect(() => {
185
- const topPins = pinnedRows?.value?.top ?? [];
186
- if (topPins.length === 0) {
187
- onRowPinningChange({ top: [] });
188
- return;
189
- }
190
- const rows = table.getRowModel().rows;
191
- const collectAllDescendantIds = (subs: Row<GenericObject>[]): string[] =>
192
- subs.flatMap(r => [r.id, ...collectAllDescendantIds(r.subRows)]);
193
- const allPinned: string[] = [];
194
- topPins.forEach(id => {
195
- const parent = rows.find(r => r.id === id && r.depth === 0);
196
- if (parent) {
197
- allPinned.push(parent.id, ...collectAllDescendantIds(parent.subRows));
198
- }
199
- });
200
- onRowPinningChange({ top: allPinned });
201
- }, [table, pinnedRows?.value?.top?.join(',')]);
202
-
203
178
  // Check if table has any sub-rows
204
179
  const hasAnySubRows = table.getRowModel().rows.some(row => row.subRows && row.subRows.length > 0);
205
180
  const selectedRowsLength = Object.keys(table.getState().rowSelection).length;
@@ -17,8 +17,7 @@ export const createCellFunction = (
17
17
  customRenderer?: (row: Row<GenericObject>, value: any) => JSX.Element,
18
18
  isFirstColumn?: boolean,
19
19
  onRowToggleClick?: (row: Row<GenericObject>) => void,
20
- selectableRows?: boolean,
21
- rowStyling?: GenericObject
20
+ selectableRows?: boolean
22
21
  ) => {
23
22
  // Add display name to the returned function
24
23
  const cellRenderer = ({
@@ -29,7 +28,6 @@ export const createCellFunction = (
29
28
  getValue: Getter<string>
30
29
  }) => {
31
30
  const rowData = row.original;
32
- const customStyle = rowStyling?.length > 0 && rowStyling?.find((s:GenericObject) => s?.rowId === row.id);
33
31
 
34
32
  if (isFirstColumn) {
35
33
  switch (row.depth) {
@@ -37,7 +35,6 @@ export const createCellFunction = (
37
35
  return (
38
36
  <CustomCell
39
37
  customRenderer={customRenderer}
40
- customStyle={customStyle}
41
38
  getValue={getValue}
42
39
  onRowToggleClick={onRowToggleClick}
43
40
  row={row}
@@ -57,7 +57,6 @@ type AdvancedTableProps = {
57
57
  onChange?: (value: RowPinningState) => void;
58
58
  };
59
59
  responsive?: "scroll" | "none",
60
- rowStyling?: GenericObject[],
61
60
  scrollBarNone?: boolean,
62
61
  selectableRows?: boolean,
63
62
  showActionsBar?: boolean,
@@ -99,7 +98,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
99
98
  paginationProps,
100
99
  pinnedRows,
101
100
  responsive = "scroll",
102
- rowStyling,
103
101
  scrollBarNone= false,
104
102
  showActionsBar = true,
105
103
  selectableRows,
@@ -146,7 +144,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
146
144
  onRowSelectionChange,
147
145
  columnVisibilityControl,
148
146
  pinnedRows,
149
- rowStyling
150
147
  });
151
148
 
152
149
  // Initialize table actions
@@ -339,7 +336,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
339
336
  onExpandByDepthClick={onExpandByDepthClick}
340
337
  pinnedRows={pinnedRows}
341
338
  responsive={responsive}
342
- rowStyling={rowStyling}
343
339
  selectableRows={selectableRows}
344
340
  setExpanded={setExpanded}
345
341
  showActionsBar={showActionsBar}
@@ -1,7 +1,7 @@
1
1
  import React, {useState} from "react"
2
2
  import { render, screen, waitFor } from "../utilities/test-utils"
3
3
 
4
- import { AdvancedTable, Pill, colors } from "playbook-ui"
4
+ import { AdvancedTable, Pill } from "playbook-ui"
5
5
 
6
6
  global.ResizeObserver = class {
7
7
  observe() {}
@@ -652,27 +652,3 @@ test("renders virtualized table rows and header", () => {
652
652
  const virtualizedRows = kit.querySelectorAll('.virtualized-table-row')
653
653
  expect(virtualizedRows.length).toBeLessThan(MOCK_DATA_WITH_ID.length)
654
654
  })
655
-
656
- test("rowStyling prop works as expected", () => {
657
- const rowStyling = [
658
- {
659
- rowId: "1",
660
- backgroundColor: colors.white,
661
- fontColor: colors.black
662
- },
663
- ];
664
-
665
- render(
666
- <AdvancedTable
667
- columnDefinitions={columnDefinitions}
668
- data={{ testid: testId }}
669
- rowStyling={rowStyling}
670
- tableData={MOCK_DATA_WITH_ID}
671
- />
672
- )
673
-
674
- const kit = screen.getByTestId(testId)
675
- const tableBody = kit.querySelector('tbody')
676
- const row1 = tableBody.querySelector('tr:nth-child(1)')
677
- expect(row1).toHaveStyle({backgroundColor: colors.white, color: colors.black})
678
- })
@@ -35,7 +35,7 @@ const AdvancedTableRowPinning = (props) => {
35
35
  },
36
36
  ]
37
37
 
38
- const [pinnedRows, setPinnedRows] = useState({top: ["8"]})
38
+ const [pinnedRows, setPinnedRows] = useState({top: ["8", "9", "10", "11", "12", "13", "14"]})
39
39
 
40
40
  return (
41
41
  <div>
@@ -1,7 +1,5 @@
1
- Use the `pinnedRows` prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and will not change position if sorting is used.
1
+ Use the `pinnedRows` prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and reorganizing via sorting.
2
2
 
3
- **NOTE:**
3
+ **NOTE:** This prop is in Beta. Current Requirements for V1:
4
4
  - Sticky header required: Pinned rows must be used with `sticky: true` via `tableProps` (works with both responsive and non-responsive tables)
5
- - Row ids required: Each object within the `tableData` Array must contain a unique id in order to attach an id to all Rows for this to function.
6
- - `pinnedRows` takes an array of row ids to the `top` property as shown in the code snippet below.
7
- - For expandable rows, use the parent id in `pinnedRows`, all its children will automatically be pinned with it. If id for a child is passed in without parent being pinned, nothing will be pinned.
5
+ - Row ids required: Pass an array of row ids to the `top` property. For expandable rows, both parent and all its child row ids must be included individually
@@ -59,7 +59,6 @@ examples:
59
59
  - advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
60
60
  - advanced_table_pinned_rows: Pinned Rows
61
61
  - advanced_table_scrollbar_none: Advanced Table Scrollbar None
62
- - advanced_table_row_styling: Row Styling
63
62
  - advanced_table_column_styling: Column Styling
64
63
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
65
64
  - advanced_table_infinite_scroll: Infinite Scroll
@@ -34,7 +34,6 @@ export { default as AdvancedTableColumnVisibilityMulti } from './_advanced_table
34
34
  export { default as AdvancedTableColumnVisibilityWithState } from './_advanced_table_column_visibility_with_state.jsx'
35
35
  export { default as AdvancedTablePinnedRows } from './_advanced_table_pinned_rows.jsx'
36
36
  export { default as AdvancedTableScrollbarNone} from './_advanced_table_scrollbar_none.jsx'
37
- export { default as AdvancedTableRowStyling } from './_advanced_table_row_styling.jsx'
38
37
  export { default as AdvancedTableColumnStyling } from './_advanced_table_column_styling.jsx'
39
38
  export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
40
39
  export { default as AdvancedTableInfiniteScroll} from './_advanced_table_infinite_scroll.jsx'
@@ -3,6 +3,8 @@ import typography from '../tokens/exports/_typography.module.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
+ import { PlotTreemapOptions } from "highcharts";
7
+
6
8
  const highchartsDarkTheme: ThemeProps = {
7
9
  lang: {
8
10
  thousandsSep: ',',
@@ -164,7 +166,43 @@ const highchartsDarkTheme: ThemeProps = {
164
166
  marker: {
165
167
  lineColor: colors.border_dark,
166
168
  },
167
- }
169
+ },
170
+
171
+ //TREEMAP CHART STYLES
172
+ treemap: {
173
+ layoutAlgorithm: "squarified",
174
+ allowTraversingTree: false,
175
+ animationLimit: 1000,
176
+ colors: [
177
+ colors.data_1,
178
+ colors.data_2,
179
+ colors.data_3,
180
+ colors.data_4,
181
+ colors.data_5,
182
+ colors.data_6,
183
+ colors.data_7,
184
+ colors.data_8,
185
+ ],
186
+ dataLabels: {
187
+ enabled: true,
188
+ style: {
189
+ fontFamily: typography.font_family_base,
190
+ fontWeight: typography.bold,
191
+ fontSize: typography.heading_4,
192
+ },
193
+ },
194
+ levels: [
195
+ {
196
+ level: 1,
197
+ dataLabels: {
198
+ enabled: false,
199
+ },
200
+ },
201
+ ],
202
+ traverseUpButton: {
203
+ position: { y: -50 },
204
+ },
205
+ } as PlotTreemapOptions,
168
206
  },
169
207
  credits: {
170
208
  enabled: false
@@ -3,6 +3,8 @@ import typography from '../tokens/exports/_typography.module.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
+ import { PlotTreemapOptions } from "highcharts";
7
+
6
8
  const highchartsTheme: ThemeProps = {
7
9
  lang: {
8
10
  thousandsSep: ',',
@@ -163,7 +165,43 @@ const highchartsTheme: ThemeProps = {
163
165
  marker: {
164
166
  lineColor: '#333',
165
167
  },
166
- }
168
+ },
169
+
170
+ //TREEMAP CHART STYLES
171
+ treemap: {
172
+ layoutAlgorithm: "squarified",
173
+ allowTraversingTree: false,
174
+ animationLimit: 1000,
175
+ colors: [
176
+ colors.data_1,
177
+ colors.data_2,
178
+ colors.data_3,
179
+ colors.data_4,
180
+ colors.data_5,
181
+ colors.data_6,
182
+ colors.data_7,
183
+ colors.data_8,
184
+ ],
185
+ dataLabels: {
186
+ enabled: true,
187
+ style: {
188
+ fontFamily: typography.font_family_base,
189
+ fontWeight: typography.bold,
190
+ fontSize: typography.heading_4,
191
+ },
192
+ },
193
+ levels: [
194
+ {
195
+ level: 1,
196
+ dataLabels: {
197
+ enabled: false,
198
+ },
199
+ },
200
+ ],
201
+ traverseUpButton: {
202
+ position: { y: -50 },
203
+ },
204
+ } as PlotTreemapOptions,
167
205
  },
168
206
  credits: {
169
207
  enabled: false
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
3
+ { label: 'United States', value: 'United States', id: 'us' },
4
+ { label: 'Canada', value: 'Canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -5,20 +5,17 @@ const DropdownBlankSelection = (props) => {
5
5
  const options = [
6
6
  {
7
7
  label: "United States",
8
- value: "unitedStates",
9
- id: "us"
8
+ value: "United States",
10
9
  },
11
10
  {
12
11
  label: "Canada",
13
- value: "canada",
14
- id: "ca"
12
+ value: "Canada",
15
13
  },
16
14
  {
17
15
  label: "Pakistan",
18
- value: "pakistan",
19
- id: "pk"
16
+ value: "Pakistan",
20
17
  }
21
- ];
18
+ ];
22
19
 
23
20
  return (
24
21
  <>
@@ -6,18 +6,15 @@ import Dropdown from '../../pb_dropdown/_dropdown'
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "unitedStates",
10
- id: "us"
9
+ value: "United States",
11
10
  },
12
11
  {
13
12
  label: "Canada",
14
- value: "canada",
15
- id: "ca"
13
+ value: "Canada",
16
14
  },
17
15
  {
18
16
  label: "Pakistan",
19
- value: "pakistan",
20
- id: "pk"
17
+ value: "Pakistan",
21
18
  }
22
19
  ]
23
20
 
@@ -6,18 +6,15 @@ const DropdownDefault = (props) => {
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "unitedStates",
10
- id: "us"
9
+ value: "United States",
11
10
  },
12
11
  {
13
12
  label: "Canada",
14
- value: "canada",
15
- id: "ca"
13
+ value: "Canada",
16
14
  },
17
15
  {
18
16
  label: "Pakistan",
19
- value: "pakistan",
20
- id: "pk"
17
+ value: "Pakistan",
21
18
  }
22
19
  ];
23
20
 
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
3
+ { label: 'United States', value: 'United States', id: 'us' },
4
+ { label: 'Canada', value: 'Canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
3
+ { label: 'United States', value: 'United States', id: 'us' },
4
+ { label: 'Canada', value: 'Canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -5,20 +5,17 @@ const DropdownDefaultValue = (props) => {
5
5
  const options = [
6
6
  {
7
7
  label: "United States",
8
- value: "unitedStates",
9
- id: "us"
8
+ value: "United States",
10
9
  },
11
10
  {
12
11
  label: "Canada",
13
- value: "canada",
14
- id: "ca"
12
+ value: "Canada",
15
13
  },
16
14
  {
17
15
  label: "Pakistan",
18
- value: "pakistan",
19
- id: "pk"
16
+ value: "Pakistan",
20
17
  }
21
- ];
18
+ ];
22
19
 
23
20
  return (
24
21
  <>
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
3
+ { label: 'United States', value: 'United States', id: 'us' },
4
+ { label: 'Canada', value: 'Canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
6
  ]
7
7
  %>
8
8
 
@@ -10,20 +10,17 @@ const DropdownError = (props) => {
10
10
  const options = [
11
11
  {
12
12
  label: "United States",
13
- value: "unitedStates",
14
- id: "us"
13
+ value: "United States",
15
14
  },
16
15
  {
17
16
  label: "Canada",
18
- value: "canada",
19
- id: "ca"
17
+ value: "Canada",
20
18
  },
21
19
  {
22
20
  label: "Pakistan",
23
- value: "pakistan",
24
- id: "pk"
21
+ value: "Pakistan",
25
22
  }
26
- ];
23
+ ]
27
24
 
28
25
  return (
29
26
  <>
@@ -6,48 +6,39 @@ const DropdownMultiSelect = (props) => {
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "unitedStates",
10
- id: "us"
9
+ value: "United States",
11
10
  },
12
11
  {
13
- label: "United Kingdom",
14
- value: "unitedKingdom",
15
- id: "gb"
12
+ label: "United Kingdom",
13
+ value: "United Kingdom",
16
14
  },
17
15
  {
18
16
  label: "Canada",
19
- value: "canada",
20
- id: "ca"
17
+ value: "Canada",
21
18
  },
22
19
  {
23
20
  label: "Pakistan",
24
- value: "pakistan",
25
- id: "pk"
21
+ value: "Pakistan",
26
22
  },
27
23
  {
28
24
  label: "India",
29
- value: "india",
30
- id: "in"
25
+ value: "India",
31
26
  },
32
27
  {
33
28
  label: "Australia",
34
- value: "australia",
35
- id: "au"
29
+ value: "Australia",
36
30
  },
37
31
  {
38
32
  label: "New Zealand",
39
- value: "new Zealand",
40
- id: "nz"
33
+ value: "New Zealand",
41
34
  },
42
35
  {
43
36
  label: "Italy",
44
- value: "italy",
45
- id: "it"
37
+ value: "Italy",
46
38
  },
47
39
  {
48
40
  label: "Spain",
49
- value: "spain",
50
- id: "es"
41
+ value: "Spain",
51
42
  }
52
43
  ];
53
44