@abgov/adsp-sdk-mcp-server 1.22.0 → 1.22.1
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.
|
@@ -82,7 +82,7 @@ const ContextProvider = ContextProviderFactory();
|
|
|
82
82
|
renderers={GoARenderers}
|
|
83
83
|
cells={GoACells}
|
|
84
84
|
/>
|
|
85
|
-
</ContextProvider
|
|
85
|
+
</ContextProvider>;
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
When the target arrived as a link, turn the parameters back into that same object, and clear them once they cannot be honoured so that a reload does not retry a dead target.
|
|
@@ -121,7 +121,32 @@ import { GoACells, GoAReviewRenderers, ReviewRenderProvider } from '@abgov/jsonf
|
|
|
121
121
|
cells={GoACells}
|
|
122
122
|
/>
|
|
123
123
|
</ReviewRenderProvider>
|
|
124
|
-
</ContextProvider
|
|
124
|
+
</ContextProvider>;
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
**NOTE**: Every control reports, including the composite ones. Address, full name, full name with date of birth, contact information and list controls report through `onReviewChange` exactly like a plain text field does. If a Change button appears to do nothing, check that `ReviewRenderProvider` is above the `JsonForms` element rather than beside it, that the category carries the `options.id` you are matching on, and that the previous target was cleared in `onNavigationChange`.
|
|
128
|
+
|
|
129
|
+
### 5. Track the step the user is on
|
|
130
|
+
|
|
131
|
+
`onStepChange` on the same provider reports where the user is, so a host can act on it - show progress, change a banner, or log analytics. It is called once when the form mounts and again each time the step changes, including when an answer shows or hides a page. Typing on a step does not trigger it.
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
import { ContextProviderFactory, useStepChange } from '@abgov/jsonforms-components';
|
|
135
|
+
|
|
136
|
+
// stepInfo is undefined until the form reports on mount. The optional listener runs on each report.
|
|
137
|
+
const { stepInfo, onStepChange } = useStepChange((info) => analytics.track('step', info));
|
|
138
|
+
|
|
139
|
+
<ContextProvider onStepChange={onStepChange}>
|
|
140
|
+
<JsonForms ... />
|
|
141
|
+
</ContextProvider>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`useStepChange` is a convenience; any `(stepInfo: StepInfo) => void` callback works as `onStepChange`.
|
|
145
|
+
|
|
146
|
+
| Field | Meaning |
|
|
147
|
+
| -------------- | ---------------------------------------------------------------------------------------------- |
|
|
148
|
+
| `currentStep` | 1-based step number over visible pages, as shown in "Step X of Y". `0` on review and overview. |
|
|
149
|
+
| `isFirstStep` | The user is on the first visible step. |
|
|
150
|
+
| `isLastStep` | The user is on the last visible step before the review. |
|
|
151
|
+
| `isOnReview` | The user is on the review page. |
|
|
152
|
+
| `isOnTaskList` | The user is on the application overview (`pages` variant only). |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/adsp-sdk-mcp-server",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|