playbook_ui 14.19.0.pre.alpha.PLAY21297675 → 14.19.0.pre.alpha.play1997dropdownenablepillsinselection7702

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +1 -11
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +15 -148
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -20
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +13 -23
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -9
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -7
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -4
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -5
  10. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +0 -1
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +11 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +1 -1
  13. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +33 -2
  14. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +3 -1
  15. data/app/pb_kits/playbook/pb_dropdown/index.js +14 -1
  16. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +2 -2
  17. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +1 -1
  18. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +2 -2
  19. data/dist/chunks/{_typeahead-BPSIWtFT.js → _typeahead-BQV04mOl.js} +3 -3
  20. data/dist/chunks/_weekday_stacked-BdaYw6Ra.js +45 -0
  21. data/dist/chunks/{lib-B20MXZcW.js → lib-DwFasxbk.js} +2 -2
  22. data/dist/chunks/{pb_form_validation-WWvUXPKD.js → pb_form_validation-nnXW3T-3.js} +1 -1
  23. data/dist/chunks/vendor.js +1 -1
  24. data/dist/playbook-doc.js +1 -1
  25. data/dist/playbook-rails-react-bindings.js +1 -1
  26. data/dist/playbook-rails.js +1 -1
  27. data/dist/playbook.css +1 -1
  28. data/lib/playbook/version.rb +1 -1
  29. metadata +6 -15
  30. data/app/pb_kits/playbook/pb_advanced_table/Utilities/VisibilityTree.ts +0 -47
  31. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx +0 -57
  32. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md +0 -4
  33. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx +0 -62
  34. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md +0 -1
  35. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx +0 -82
  36. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md +0 -1
  37. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +0 -65
  38. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +0 -1
  39. data/dist/chunks/_weekday_stacked-BeuPAmxG.js +0 -45
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.19.0"
5
- VERSION = "14.19.0.pre.alpha.PLAY21297675"
5
+ VERSION = "14.19.0.pre.alpha.play1997dropdownenablepillsinselection7702"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.19.0.pre.alpha.PLAY21297675
4
+ version: 14.19.0.pre.alpha.play1997dropdownenablepillsinselection7702
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-05-09 00:00:00.000000000 Z
12
+ date: 2025-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -278,7 +278,6 @@ files:
278
278
  - app/pb_kits/playbook/pb_advanced_table/Utilities/IconHelpers.tsx
279
279
  - app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts
280
280
  - app/pb_kits/playbook/pb_advanced_table/Utilities/TableContainerStyles.ts
281
- - app/pb_kits/playbook/pb_advanced_table/Utilities/VisibilityTree.ts
282
281
  - app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts
283
282
  - app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss
284
283
  - app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx
@@ -306,14 +305,6 @@ files:
306
305
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb
307
306
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx
308
307
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md
309
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx
310
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md
311
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx
312
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md
313
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx
314
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md
315
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx
316
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md
317
308
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
318
309
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
319
310
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb
@@ -3565,11 +3556,11 @@ files:
3565
3556
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3566
3557
  - app/pb_kits/playbook/utilities/text.ts
3567
3558
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3568
- - dist/chunks/_typeahead-BPSIWtFT.js
3569
- - dist/chunks/_weekday_stacked-BeuPAmxG.js
3559
+ - dist/chunks/_typeahead-BQV04mOl.js
3560
+ - dist/chunks/_weekday_stacked-BdaYw6Ra.js
3570
3561
  - dist/chunks/lazysizes-B7xYodB-.js
3571
- - dist/chunks/lib-B20MXZcW.js
3572
- - dist/chunks/pb_form_validation-WWvUXPKD.js
3562
+ - dist/chunks/lib-DwFasxbk.js
3563
+ - dist/chunks/pb_form_validation-nnXW3T-3.js
3573
3564
  - dist/chunks/vendor.js
3574
3565
  - dist/menu.yml
3575
3566
  - dist/playbook-doc.js
@@ -1,47 +0,0 @@
1
- export interface VisibilityNode {
2
- id: string;
3
- label: string;
4
- children?: VisibilityNode[];
5
- }
6
- export const buildVisibilityTree = (
7
- defs: any[],
8
- allowed?: string[] | null
9
- ): VisibilityNode[] =>
10
- defs
11
- .map((def) => {
12
- const isGroup = Array.isArray(def.columns) && def.columns.length > 0;
13
-
14
- // No filter at all → keep it
15
- if (!allowed?.length) {
16
- return isGroup
17
- ? {
18
- id: def.id,
19
- label: def.label,
20
- children: buildVisibilityTree(def.columns, allowed),
21
- }
22
- : { id: def.id, label: def.label };
23
- }
24
-
25
- // 1️⃣ If *this* ID is explicitly allowed → keep it & all its children
26
- if (allowed.includes(def.id)) {
27
- return isGroup
28
- ? {
29
- id: def.id,
30
- label: def.label,
31
- children: buildVisibilityTree(def.columns, null),
32
- }
33
- : { id: def.id, label: def.label };
34
- }
35
-
36
- // Otherwise, if it’s a group, recurse & keep only if kids survive
37
- if (isGroup) {
38
- const kids = buildVisibilityTree(def.columns, allowed).filter(Boolean);
39
- return kids.length
40
- ? { id: def.id, label: def.label, children: kids }
41
- : null;
42
- }
43
-
44
- // Leaf not allowed → drop it
45
- return null;
46
- })
47
- .filter(Boolean);
@@ -1,57 +0,0 @@
1
- import React from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnVisibility = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
12
- },
13
- {
14
- accessor: "newEnrollments",
15
- label: "New Enrollments",
16
- id: "newEnrollments"
17
- },
18
- {
19
- accessor: "scheduledMeetings",
20
- label: "Scheduled Meetings",
21
- id: "scheduledMeetings"
22
- },
23
- {
24
- accessor: "attendanceRate",
25
- label: "Attendance Rate",
26
- id: "attendanceRate"
27
- },
28
- {
29
- accessor: "completedClasses",
30
- label: "Completed Classes",
31
- id: "completedClasses"
32
- },
33
- {
34
- accessor: "classCompletionRate",
35
- label: "Class Completion Rate",
36
- id: "classCompletionRate"
37
- },
38
- {
39
- accessor: "graduatedStudents",
40
- label: "Graduated Students",
41
- id: "graduatedStudents"
42
- },
43
- ]
44
-
45
- return (
46
- <div>
47
- <AdvancedTable
48
- columnDefinitions={columnDefinitions}
49
- columnVisibilityControl={{default: true}}
50
- tableData={MOCK_DATA}
51
- {...props}
52
- />
53
- </div>
54
- )
55
- }
56
-
57
- export default AdvancedTableColumnVisibility
@@ -1,4 +0,0 @@
1
- The `columnVisibilityControl` prop allows users to toggle the visibility of table columns dynamically.
2
-
3
- The default can be enabled simply by passing `{ default:true }` to the prop as shown. This will render the header with the icon enabled dropdown. The dropdown contains all columns present in the Table and any can be toggled on or off via the checkboxes.
4
- **NOTE**: The first column will not be shown in the dropdown as an option since all the expansion logic/functionality lives there and it should always be visible.
@@ -1,62 +0,0 @@
1
- import React from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnVisibilityCustom = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
12
- },
13
- {
14
- accessor: "newEnrollments",
15
- label: "New Enrollments",
16
- id: "newEnrollments"
17
- },
18
- {
19
- accessor: "scheduledMeetings",
20
- label: "Scheduled Meetings",
21
- id: "scheduledMeetings"
22
- },
23
- {
24
- accessor: "attendanceRate",
25
- label: "Attendance Rate",
26
- id: "attendanceRate"
27
- },
28
- {
29
- accessor: "completedClasses",
30
- label: "Completed Classes",
31
- id: "completedClasses"
32
- },
33
- {
34
- accessor: "classCompletionRate",
35
- label: "Class Completion Rate",
36
- id: "classCompletionRate"
37
- },
38
- {
39
- accessor: "graduatedStudents",
40
- label: "Graduated Students",
41
- id: "graduatedStudents"
42
- },
43
- ]
44
-
45
- const columnVisibilityControl = {
46
- // This is the list of column ids that will be included in the column visibility control
47
- includeIds:["newEnrollments", "scheduledMeetings", "attendanceRate", "completedClasses"],
48
- }
49
-
50
- return (
51
- <div>
52
- <AdvancedTable
53
- columnDefinitions={columnDefinitions}
54
- columnVisibilityControl={columnVisibilityControl}
55
- tableData={MOCK_DATA}
56
- {...props}
57
- />
58
- </div>
59
- )
60
- }
61
-
62
- export default AdvancedTableColumnVisibilityCustom
@@ -1 +0,0 @@
1
- By using the `includeIds` key/value pair as shown within the `columnVisibilityControl` prop, you can control which columns show up as options in the columnVisibility dropdown.
@@ -1,82 +0,0 @@
1
- import React from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnVisibilityMulti = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- id: "year",
11
- cellAccessors: ["quarter", "month", "day"],
12
- },
13
- {
14
- label: "Enrollment Data",
15
- id: "enrollmentData",
16
- columns: [
17
- {
18
- label: "Enrollment Stats",
19
- id: "enrollmentStats",
20
- columns: [
21
- {
22
- accessor: "newEnrollments",
23
- label: "New Enrollments",
24
- id: "newEnrollments",
25
- },
26
- {
27
- accessor: "scheduledMeetings",
28
- label: "Scheduled Meetings",
29
- id: "scheduledMeetings",
30
- },
31
- ],
32
- },
33
- ],
34
- },
35
- {
36
- label: "Performance Data",
37
- id: "performanceData",
38
- columns: [
39
- {
40
- label: "Completion Metrics",
41
- id: "completionMetrics",
42
- columns: [
43
- {
44
- accessor: "completedClasses",
45
- label: "Completed Classes",
46
- id: "completedClasses",
47
- },
48
- {
49
- accessor: "classCompletionRate",
50
- label: "Class Completion Rate",
51
- id: "classCompletionRate",
52
- },
53
- ],
54
- },
55
- {
56
- label: "Attendance",
57
- id: "attendance",
58
- columns: [
59
- {
60
- accessor: "attendanceRate",
61
- label: "Attendance Rate",
62
- id: "attendanceRate",
63
- },
64
- ],
65
- },
66
- ],
67
- },
68
- ];
69
-
70
- return (
71
- <div>
72
- <AdvancedTable
73
- columnDefinitions={columnDefinitions}
74
- columnVisibilityControl={{default: true}}
75
- tableData={MOCK_DATA}
76
- {...props}
77
- />
78
- </div>
79
- )
80
- }
81
-
82
- export default AdvancedTableColumnVisibilityMulti
@@ -1 +0,0 @@
1
- The `columnVisibilityControl` prop can also be used with multi-header columns as shown.
@@ -1,65 +0,0 @@
1
- import React, { useState } from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnVisibilityWithState = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
12
- },
13
- {
14
- accessor: "newEnrollments",
15
- label: "New Enrollments",
16
- id: "newEnrollments"
17
- },
18
- {
19
- accessor: "scheduledMeetings",
20
- label: "Scheduled Meetings",
21
- id: "scheduledMeetings"
22
- },
23
- {
24
- accessor: "attendanceRate",
25
- label: "Attendance Rate",
26
- id: "attendanceRate"
27
- },
28
- {
29
- accessor: "completedClasses",
30
- label: "Completed Classes",
31
- id: "completedClasses"
32
- },
33
- {
34
- accessor: "classCompletionRate",
35
- label: "Class Completion Rate",
36
- id: "classCompletionRate"
37
- },
38
- {
39
- accessor: "graduatedStudents",
40
- label: "Graduated Students",
41
- id: "graduatedStudents"
42
- },
43
- ]
44
-
45
- const [columnVisibility, setColumnVisibility] = useState({
46
- newEnrollments: false
47
- })
48
-
49
- const columnVisibilityControl = {
50
- value: columnVisibility,
51
- onChange: setColumnVisibility,
52
- }
53
- return (
54
- <div>
55
- <AdvancedTable
56
- columnDefinitions={columnDefinitions}
57
- columnVisibilityControl={columnVisibilityControl}
58
- tableData={MOCK_DATA}
59
- {...props}
60
- />
61
- </div>
62
- )
63
- }
64
-
65
- export default AdvancedTableColumnVisibilityWithState
@@ -1 +0,0 @@
1
- The `columnVisibilityControl` prop also allows for greater control over the columnVisibility state. Devs can manage state themselves by passing in `value` and `onChange` as shown.