feat: more docs

This commit is contained in:
Stevan Freeborn
2023-04-13 09:27:38 -05:00
parent 0b9ebcb71c
commit fd18398baa
3 changed files with 126 additions and 40 deletions
+40 -34
View File
@@ -14,40 +14,46 @@ function TreeNode({ doc }: { doc: Doc }) {
return (
<li className={styles.listItem}>
{hasChildren ? (
<div
onClick={() => setIsExpanded(!isExpanded)}
className={styles.expandable}
>
<a className={styles.link}>{doc.title}</a>
{isExpanded ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className={styles.chevron}
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"
/>
</svg>
) : (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className={styles.chevron}
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
/>
</svg>
)}
<div className={styles.expandable}>
<a
href={`#${doc.title
.replaceAll(' ', '-')
.toLowerCase()}`}
className={styles.link}
>
{doc.title}
</a>
<div onClick={() => setIsExpanded(!isExpanded)}>
{isExpanded ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className={styles.chevron}
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"
/>
</svg>
) : (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className={styles.chevron}
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
/>
</svg>
)}
</div>
</div>
) : (
<a
@@ -13,19 +13,19 @@ These are objects representing a content record in your instance. You can create
---
- App Id
- integer
- number
- The id of the app or survey.
---
- recordId
- integer
- number
- The id of the record.
---
- fieldData
- array
- An array of field value objects.
- object[]
- An array of [Field Value](#field-values) objects.
{% /table %}
@@ -1,6 +1,6 @@
# Field Values {% #field-values %}
These are objects representing a field value in a record. They will comprise the `fieldData` array in a [Record](#records) object.
These are objects representing a field value in a record. They will comprise the `fieldData` array in a [Record](#records) object. The `type` property will determine what the type and structure of the `value` property will be.
## Field Value Properties
@@ -19,7 +19,7 @@ These are objects representing a field value in a record. They will comprise the
---
- fieldId
- integer
- number
- The id of the field.
---
@@ -29,3 +29,83 @@ These are objects representing a field value in a record. They will comprise the
- The value of the field.
{% /table %}
### Field Value Types
{% table .propertiesTable %}
- Type
- Description
- Value Data Type
---
- String
- A string value.
- `string`
---
- Integer
- An integer value.
- `number`
---
- Decimal
- A decimal value.
- `number`
---
- Date
- A date value.
- `string`
---
- TimeSpan
- A time span value.
- `string`
---
- Guid
- A GUID value.
- `string`
---
- StringList
- A list of string values.
- `string[]`
---
- IntegerList
- A list of integer values.
- `number[]`
---
- GuidList
- A list of GUID values.
- `string[]`
---
- AttachmentList
- A list of [Attachment](#attachment) values.
- `object[]`
---
- ScoringGroupList
- A list of [Scoring Group](#scoring-group) values.
- `object[]`
---
- FileList
- A list of file values.
- `number[]`