playbook_ui_docs 14.11.0.pre.rc.16 → 14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5339

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cd3bf17864f3bdda10843f3dc04840592077f43d2cffa14398a5d5dfcd6c5b3
4
- data.tar.gz: 4db300c59204f0c6770c9f0b1b381b8f77b9f4cafbef167e88980a9eca8443b5
3
+ metadata.gz: c53d29e6e1df6d3edae0d0f016373194e24e2ac77deab2bf57506fee2d1cf51d
4
+ data.tar.gz: 71457fc92b7b21071720f132bd4f6bb26581a22bd37e1338ed87cbcc00b59f0d
5
5
  SHA512:
6
- metadata.gz: 38ffcb708aa083ebe279561910811fdd5de12f86425994e861ca6dc3b9f09e85746163c798a2b8c32785446509b131cc8d2501af12c8cd0e40ba95c9512d2849
7
- data.tar.gz: 166847a56df61245709c20f3370b88b208837110d3599741589cc8826f1ef3f9a733975f6cc43904c0db92fbd1933b425ccc07b1920d1163f34d13296ad69fc3
6
+ metadata.gz: 54cb043af4c79fff3d48b501b2942b83e97567d77b960c8201c20181865771d75e7fc0fdb1079d1fd1de1c840970d5f0138ea58d1bd0f3a8e26e575ba997434d
7
+ data.tar.gz: 750d02d2ad0e32d9e73ecb18c194b4fc02117098364911482e3ca7aa485e0a2f39cd8ba99b9a57fc50ac7710c8bfc1c4d28a5fa997ee05b803b9cec5c3b269e6
@@ -0,0 +1,33 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, sticky: true }}) %>
@@ -0,0 +1 @@
1
+ This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
@@ -3,6 +3,7 @@ examples:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
5
  - advanced_table_collapsible_trail_rails: Collapsible Trail
6
+ - advanced_table_table_props: Table Props
6
7
  - advanced_table_beta_sort: Enable Sorting
7
8
  - advanced_table_custom_cell_rails: Custom Components for Cells
8
9
  - advanced_table_column_headers: Multi-Header Columns
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -45,8 +45,7 @@ const promiseOptions = (inputValue) =>
45
45
 
46
46
  const TypeaheadWithPillsAsync = (props) => {
47
47
  const [users, setUsers] = useState([])
48
- const handleOnChange = (value) => setUsers(formatUsers(value))
49
- const formatValue = (users) => formatUsers(users)
48
+
50
49
  const formatUsers = (users) => {
51
50
  const results = () => (users.map((user) => {
52
51
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -58,6 +57,9 @@ const TypeaheadWithPillsAsync = (props) => {
58
57
  return results()
59
58
  }
60
59
 
60
+ const handleOnChange = (value) => setUsers(formatUsers(value))
61
+ const formatValue = (users) => formatUsers(users)
62
+
61
63
  return (
62
64
  <>
63
65
  {users && users.length > 0 && (
@@ -83,13 +83,13 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
83
83
  onChange={handleOnChange}
84
84
  onMultiValueClick={handleOnMultiValueClick}
85
85
  placeholder="type the name of a Github user"
86
- valueComponent={(props) => (
86
+ valueComponent={({imageUrl, label, territory, type}) => (
87
87
  <User
88
88
  avatar
89
- avatarUrl={props.imageUrl}
90
- name={props.label}
91
- territory={props.territory}
92
- title={props.type}
89
+ avatarUrl={imageUrl}
90
+ name={label}
91
+ territory={territory}
92
+ title={type}
93
93
  />
94
94
  )}
95
95
  {...props}