playbook_ui 14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355 → 14.11.1.pre.alpha.PBNTR769sticky5359
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_responsive.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -13
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb +1 -12
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c318646e50eb8f4974a79029c4553c98dd90c0c878ec0fdd60fd77045d36a8
|
4
|
+
data.tar.gz: 777f930d187a4815ab702202437cbb96868039c9e115acfd97cee157bbd42d07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8a756512afdc408c56dbcccb9c6660ea746e14a3656f1fef48557bb09c57140f5f069c2160d2a6ac31883fae34861b9f909eb5fb0c05ec9fa4230145db24da9
|
7
|
+
data.tar.gz: 1cbeb5057637f11e479097c70b6e1e59b52abc1bd88d8f4ff0bf329e8ba56c1847eee4b3680c54c7b8cc423c0ad4c052cd77a3e9c5a348c58148a2747d0af1a0
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import { AdvancedTable } from "playbook-ui"
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableStickyHeaderResponsive = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "newEnrollments",
|
14
|
+
label: "New Enrollments",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "scheduledMeetings",
|
18
|
+
label: "Scheduled Meetings",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "attendanceRate",
|
22
|
+
label: "Attendance Rate",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "completedClasses",
|
26
|
+
label: "Completed Classes",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "classCompletionRate",
|
30
|
+
label: "Class Completion Rate",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
accessor: "graduatedStudents",
|
34
|
+
label: "Graduated Students",
|
35
|
+
},
|
36
|
+
]
|
37
|
+
|
38
|
+
|
39
|
+
return (
|
40
|
+
<div>
|
41
|
+
<AdvancedTable
|
42
|
+
columnDefinitions={columnDefinitions}
|
43
|
+
htmlOptions={{style: { maxHeight: "100vh" }}}
|
44
|
+
tableData={MOCK_DATA}
|
45
|
+
tableProps={{sticky:true}}
|
46
|
+
{...props}
|
47
|
+
/>
|
48
|
+
</div>
|
49
|
+
)
|
50
|
+
}
|
51
|
+
|
52
|
+
export default AdvancedTableStickyHeaderResponsive
|
@@ -22,6 +22,7 @@ examples:
|
|
22
22
|
- advanced_table_table_props: Table Props
|
23
23
|
- advanced_table_inline_row_loading: Inline Row Loading
|
24
24
|
- advanced_table_responsive: Responsive Tables
|
25
|
+
- advanced_table_sticky_header_responsive: Sticky Header and Responsive
|
25
26
|
- advanced_table_custom_cell: Custom Components for Cells
|
26
27
|
- advanced_table_pagination: Pagination
|
27
28
|
- advanced_table_pagination_with_props: Pagination Props
|
@@ -13,4 +13,5 @@ export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cel
|
|
13
13
|
export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
|
14
14
|
export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
|
15
15
|
export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
|
16
|
-
export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
|
16
|
+
export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
|
17
|
+
export { default as AdvancedTableStickyHeaderResponsive } from './_advanced_table_sticky_header_responsive.jsx'
|
@@ -68,7 +68,7 @@
|
|
68
68
|
</div>
|
69
69
|
|
70
70
|
<%= javascript_tag do %>
|
71
|
-
|
71
|
+
window.addEventListener("DOMContentLoaded", () => {
|
72
72
|
datePickerHelper(<%= object.date_picker_config %>, "<%= object.scroll_container %>")
|
73
73
|
|
74
74
|
if (<%= object.selection_type == "quickpick" %>) {
|
@@ -80,17 +80,6 @@
|
|
80
80
|
endDate.value = splittedValue[1] ? splittedValue[1] : splittedValue[0]
|
81
81
|
})
|
82
82
|
}
|
83
|
-
}
|
84
|
-
|
85
|
-
window.addEventListener("DOMContentLoaded", () => {
|
86
|
-
loadDatePicker();
|
87
|
-
});
|
88
|
-
|
89
|
-
if (<%= !object.custom_event_listener.empty? %>) {
|
90
|
-
window.addEventListener("<%= object.custom_event_listener %>", () => {
|
91
|
-
console.log("Custom Event listener fired");
|
92
|
-
loadDatePicker();
|
93
|
-
})
|
94
|
-
}
|
83
|
+
})
|
95
84
|
<% end %>
|
96
85
|
<% end %>
|
@@ -73,8 +73,6 @@ module Playbook
|
|
73
73
|
default: false
|
74
74
|
prop :year_range, type: Playbook::Props::Array,
|
75
75
|
default: [1900, 2100]
|
76
|
-
prop :custom_event_listener, type: Playbook::Props::String,
|
77
|
-
default: ""
|
78
76
|
|
79
77
|
def classname
|
80
78
|
default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
|
@@ -1,12 +1 @@
|
|
1
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-default"
|
2
|
-
<%= pb_rails("button", props: { id: "date-picker-loader", text: "Load Custom Event" }) %>
|
3
|
-
|
4
|
-
<script>
|
5
|
-
document.getElementById("date-picker-loader").addEventListener("click", () => {
|
6
|
-
window.document.dispatchEvent(
|
7
|
-
new CustomEvent("datePickerLoader", {
|
8
|
-
bubbles: true,
|
9
|
-
})
|
10
|
-
);
|
11
|
-
});
|
12
|
-
</script>
|
1
|
+
<%= pb_rails("date_picker", props: { picker_id: "date-picker-default"}) %>
|