You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,68 +53,95 @@ The "Copy embed code" generates an iFrame that is sized to fit the content witho
53
53
> [!NOTE]
54
54
> Only the iFrame content is rendered dynamically. The copy of the product name / description are not dynamically updated and will need to be manually updated if either change significantly from the time the embed code is generated.
55
55
56
-
### Importing
56
+
### JSON
57
+
58
+
When viewing a Nutrition Facts page a "Copy JSON Object" helper is displayed in the header. This object is for use with @instructure/ui AI Components.
You can import a Nutrition Facts object by referencing its unique id in the query parameter such as `?id=igniteAgent`. Parameter values are case insensitive. If an invalid ID is provided the default product (an empty~ish object) is returned.
71
+
This makes outputting AI Components fairly simple, and standard.
59
72
60
-
> [!WARNING]
61
-
> The following import methods are DEPRECATED. They may still work, but are no longer being supported, and may be removed in a future version.
73
+
#### AiInformation
62
74
63
-
Two import types are provided: object-based and named params. Object-based import values take precedence, meaning if you include both, the value in the object will be imported. `/?q={"name":"foo"}&name=bar` will result in `bar` being stored. `/?q={"description":"I am a foo."}&name=foo` will store both `name` and `description` values.
75
+
```jsx
76
+
constai= {jsonObj}
64
77
65
-
#### Object-based Imports
78
+
<AiInformation
79
+
trigger={<Button>AI information</Button>}
66
80
67
-
The site accepts the query param `q` and a value that is a subset of the `ProductNutritionFacts` object. This will be coerced into a `NutritionFacts` compatible object. The basic structure is a bare object with `name`, `description`, and `data[]` keys.
modalLabel="This is a Data Permission Levels modal"
139
+
triggerText="Data Permission Levels"
115
140
```
116
141
117
-
Example: Set regions as Virginia & Oregon: `?privacy.regions.value="Virginia,Oregon"`
142
+
### Importing
143
+
144
+
You can import a Nutrition Facts object by referencing its unique id in the query parameter such as `?id=igniteAgent`. Parameter values are case insensitive. If an invalid ID is provided the default product (an empty~ish object) is returned.
118
145
119
146
## Getting Started
120
147
@@ -157,83 +184,6 @@ pnpm build nutritionfacts
157
184
158
185
The list of Nutrition Facts is fetched at every call. A fall-back cached version is included with the source and is updated on every build.
0 commit comments