@picked/client 0.0.1-dev.1788925875333 → 0.0.1-dev.1793753513002
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.
- package/LICENSE +1 -0
- package/README.md +34 -158
- package/dist/.tsbuildinfo +1 -1
- package/dist/api-ZkaFvphK.cjs +1 -0
- package/dist/{api-DbMJli3H.js → api-nJ3O-8r5.js} +1 -1
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/logic-engine.js +1 -0
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/telemetry/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/cjs/storage.js +1 -0
- package/dist/dom-7g2LZCIp.cjs +1 -0
- package/dist/{dom-BqcToNL0.js → dom-v6ulxr_z.js} +1 -5
- package/dist/esm/form/index.js +5 -16
- package/dist/esm/index.js +576 -615
- package/dist/esm/logic-engine.js +208 -0
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +4 -4
- package/dist/esm/plugins/experience-browser-storage/index.js +12 -10
- package/dist/esm/plugins/responses-browser-storage/index.js +2 -6
- package/dist/esm/plugins/telemetry/index.js +26 -15
- package/dist/esm/preview/index.js +1 -2
- package/dist/esm/server/index.js +47 -43
- package/dist/esm/storage.js +1 -0
- package/dist/experience-instance-4D6Yk-h0.js +774 -0
- package/dist/experience-instance-D2FAkiPx.cjs +1 -0
- package/dist/plugin-B1kexnbX.js +256 -0
- package/dist/plugin-Bnmk8pN8.cjs +1 -0
- package/dist/preview-channel-BMOEreho.cjs +1 -0
- package/dist/{preview-channel-CSr96XAo.js → preview-channel-CLXVoL_j.js} +2 -5
- package/dist/{version-VvasRUfR.js → preview-unavailable-BaHYVZQD.js} +100 -61
- package/dist/preview-unavailable-ClBw_DDY.cjs +1 -0
- package/dist/provider-BFdnIgeH.cjs +1 -0
- package/dist/provider-C98VWkEj.js +115 -0
- package/dist/{rules-logic-HesIUCu6.js → rules-logic-9hh8y_1b.js} +1 -1
- package/dist/rules-logic-VUbvWqdi.cjs +1 -0
- package/dist/types/data-source/preview-unavailable.d.ts +18 -0
- package/dist/types/data-source/preview-unavailable.d.ts.map +1 -0
- package/dist/types/data-source/provider.d.ts +5 -0
- package/dist/types/data-source/provider.d.ts.map +1 -1
- package/dist/types/data-source/request-observer.d.ts +21 -8
- package/dist/types/data-source/request-observer.d.ts.map +1 -1
- package/dist/types/entities/action/action.d.ts +94 -23
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +8 -0
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +14 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/exports.d.ts +1 -0
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/rules-logic.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +9 -0
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +38 -8
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts +1 -0
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +5 -2
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +2 -0
- package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
- package/dist/types/schema-registry.d.ts +34 -0
- package/dist/types/schema-registry.d.ts.map +1 -1
- package/dist/types/server/serialize.d.ts +1 -0
- package/dist/types/server/serialize.d.ts.map +1 -1
- package/dist/types/storage.d.ts +6 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/typed-content.d.ts +14 -1
- package/dist/types/typed-content.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +4 -0
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +16 -6
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +18 -7
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +30 -6
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/node-tree/node-adjacency.d.ts +50 -0
- package/dist/types/utils/node-tree/node-adjacency.d.ts.map +1 -0
- package/dist/types/utils/node-tree/node-tree-index.d.ts +57 -0
- package/dist/types/utils/node-tree/node-tree-index.d.ts.map +1 -0
- package/dist/types/utils/rules-logic.d.ts +3 -2
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/dist/types/utils/search-params.d.ts +20 -0
- package/dist/types/utils/search-params.d.ts.map +1 -1
- package/package.json +39 -13
- package/dist/api-qiqq8lgz.cjs +0 -1
- package/dist/docs/_root.css +0 -101
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
- package/dist/docs/explanation/content-references.md +0 -99
- package/dist/docs/explanation/feature-flag-allocation.md +0 -218
- package/dist/docs/explanation/how-picked-works.md +0 -124
- package/dist/docs/explanation/how-pickedql-works.md +0 -76
- package/dist/docs/explanation/pages-and-flows.md +0 -64
- package/dist/docs/explanation/the-content-model.md +0 -87
- package/dist/docs/explanation/the-two-apis.md +0 -68
- package/dist/docs/explanation/why-server-side-rendering.md +0 -76
- package/dist/docs/explanation/workspaces-and-versions.md +0 -71
- package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
- package/dist/docs/how-to/analytics/index.md +0 -316
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
- package/dist/docs/how-to/authenticate-the-cli.md +0 -97
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
- package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
- package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
- package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
- package/dist/docs/how-to/build-a-flow.md +0 -83
- package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
- package/dist/docs/how-to/create-a-content-entry.md +0 -48
- package/dist/docs/how-to/create-a-project.md +0 -29
- package/dist/docs/how-to/create-an-experience.md +0 -42
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
- package/dist/docs/how-to/define-a-page-layout.md +0 -46
- package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
- package/dist/docs/how-to/install-the-gtm-template.md +0 -84
- package/dist/docs/how-to/install-the-sdk.md +0 -93
- package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
- package/dist/docs/how-to/invite-and-remove-members.md +0 -34
- package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
- package/dist/docs/how-to/preview-a-workspace.md +0 -28
- package/dist/docs/how-to/publish-a-workspace.md +0 -30
- package/dist/docs/how-to/read-a-feature-flag.md +0 -113
- package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
- package/dist/docs/how-to/register-a-component.md +0 -55
- package/dist/docs/how-to/register-an-action-handler.md +0 -67
- package/dist/docs/how-to/render-a-step-form.md +0 -131
- package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
- package/dist/docs/how-to/reuse-a-section.md +0 -53
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
- package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
- package/dist/docs/how-to/run-an-ab-test.md +0 -49
- package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
- package/dist/docs/how-to/server-render-a-page.md +0 -81
- package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
- package/dist/docs/how-to/set-up-mfa.md +0 -69
- package/dist/docs/how-to/switch-workspaces.md +0 -122
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
- package/dist/docs/how-to/validate-a-field.md +0 -52
- package/dist/docs/how-to/write-a-condition.md +0 -45
- package/dist/docs/how-to/write-a-predicate.md +0 -60
- package/dist/docs/index.md +0 -59
- package/dist/docs/reference/dashboard/actions.mdx +0 -53
- package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
- package/dist/docs/reference/dashboard/conditions.mdx +0 -42
- package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
- package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
- package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
- package/dist/docs/reference/dashboard/content/models.mdx +0 -108
- package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
- package/dist/docs/reference/dashboard/experiences.mdx +0 -51
- package/dist/docs/reference/dashboard/features.mdx +0 -154
- package/dist/docs/reference/dashboard/fields.mdx +0 -106
- package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
- package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
- package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
- package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
- package/dist/docs/reference/dashboard/projects.mdx +0 -44
- package/dist/docs/reference/dashboard/reports.mdx +0 -43
- package/dist/docs/reference/dashboard/steps.mdx +0 -37
- package/dist/docs/reference/dashboard/team-management.md +0 -29
- package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
- package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
- package/dist/docs/reference/delivery-api/experience-content.md +0 -152
- package/dist/docs/reference/delivery-api/index.md +0 -45
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
- package/dist/docs/reference/delivery-api/project-config.md +0 -65
- package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
- package/dist/docs/reference/glossary.md +0 -181
- package/dist/docs/reference/management-api/authentication.md +0 -74
- package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
- package/dist/docs/reference/management-api/error-handling.md +0 -233
- package/dist/docs/reference/management-api/pagination.md +0 -192
- package/dist/docs/reference/pickedql/data-sources.md +0 -174
- package/dist/docs/reference/pickedql/dimensions.md +0 -103
- package/dist/docs/reference/pickedql/filtering.md +0 -64
- package/dist/docs/reference/pickedql/index.md +0 -18
- package/dist/docs/reference/pickedql/schema.md +0 -172
- package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
- package/dist/docs/reference/sdk/actions.md +0 -30
- package/dist/docs/reference/sdk/analytics-events.md +0 -445
- package/dist/docs/reference/sdk/conditions.md +0 -147
- package/dist/docs/reference/sdk/content-security-policy.md +0 -21
- package/dist/docs/reference/sdk/content.md +0 -213
- package/dist/docs/reference/sdk/experiences.md +0 -51
- package/dist/docs/reference/sdk/features.md +0 -256
- package/dist/docs/reference/sdk/fields.md +0 -255
- package/dist/docs/reference/sdk/index.md +0 -68
- package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
- package/dist/docs/reference/sdk/plugins/index.md +0 -29
- package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
- package/dist/docs/reference/sdk/predicates.md +0 -43
- package/dist/docs/reference/sdk/ssr/index.md +0 -33
- package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
- package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
- package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
- package/dist/docs/reference/sdk/steps.md +0 -86
- package/dist/docs/reference/sdk/type-generation.md +0 -196
- package/dist/docs/reference/tools/chrome-extension.md +0 -16
- package/dist/docs/reference/tools/cli.md +0 -146
- package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
- package/dist/docs/reference/tools/mcp.md +0 -90
- package/dist/docs/reference/tools/vite-plugin.md +0 -163
- package/dist/docs/tutorials/first-api-call.md +0 -228
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
- package/dist/docs/tutorials/first-experience.mdx +0 -254
- package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
- package/dist/dom-DlLH3FxV.cjs +0 -1
- package/dist/experience-instance-DGk11d8a.js +0 -563
- package/dist/experience-instance-Dej3P1sE.cjs +0 -1
- package/dist/plugin-BcLaCLm1.cjs +0 -1
- package/dist/plugin-De_BJSwE.js +0 -194
- package/dist/preview-channel-Cx0e6fye.cjs +0 -1
- package/dist/provider-C_9u0yGJ.cjs +0 -1
- package/dist/provider-ovM-CBX_.js +0 -98
- package/dist/rules-logic-CGZIYgAI.cjs +0 -1
- package/dist/version-BvLZaTMC.cjs +0 -1
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to install the Vite plugin
|
|
7
|
-
|
|
8
|
-
This guide shows you how to embed your project configuration at build time, so the SDK makes no
|
|
9
|
-
API request at runtime.
|
|
10
|
-
|
|
11
|
-
## 1. Install
|
|
12
|
-
|
|
13
|
-
:::code-group
|
|
14
|
-
|
|
15
|
-
```bash [npm]
|
|
16
|
-
npm install @picked/vite-plugin-picked picked
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
```bash [pnpm]
|
|
20
|
-
pnpm add @picked/vite-plugin-picked picked
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```bash [yarn]
|
|
24
|
-
yarn add @picked/vite-plugin-picked picked
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
:::
|
|
28
|
-
|
|
29
|
-
## 2. Name your project
|
|
30
|
-
|
|
31
|
-
Create `picked.config.ts` in the root of your project. The plugin reads your project
|
|
32
|
-
identity from this file:
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { defineConfig } from 'picked/config'
|
|
36
|
-
|
|
37
|
-
export default defineConfig({
|
|
38
|
-
projectId: 'your-project-id',
|
|
39
|
-
})
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## 3. Add the plugin to your Vite config
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
import { defineConfig } from 'vite'
|
|
46
|
-
import { picked } from '@picked/vite-plugin-picked'
|
|
47
|
-
|
|
48
|
-
export default defineConfig({
|
|
49
|
-
plugins: [picked()],
|
|
50
|
-
})
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
When Vite starts, the plugin reads your project configuration and embeds them in your bundle.
|
|
54
|
-
The SDK then reads the embedded configuration and makes no network request.
|
|
55
|
-
|
|
56
|
-
The plugin also writes `picked-env.d.ts`, which types your fields, features and steps
|
|
57
|
-
against the workspace. See [Type generation](/reference/sdk/type-generation).
|
|
58
|
-
|
|
59
|
-
:::note
|
|
60
|
-
When a preview token is there at runtime, the SDK ignores the embedded configuration and reads
|
|
61
|
-
fresh data from the API.
|
|
62
|
-
:::
|
|
63
|
-
|
|
64
|
-
## Related
|
|
65
|
-
|
|
66
|
-
- [Vite plugin](/reference/tools/vite-plugin) — every option.
|
|
67
|
-
- [Type generation](/reference/sdk/type-generation) — the `picked.config.ts` options.
|
|
68
|
-
- [About how Picked works](/explanation/how-picked-works) — where build-time configuration sit
|
|
69
|
-
in the startup order.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to invite and remove members
|
|
7
|
-
|
|
8
|
-
This guide shows you how to control who reaches your organization.
|
|
9
|
-
|
|
10
|
-
## Invite a member
|
|
11
|
-
|
|
12
|
-
1. Open your organization.
|
|
13
|
-
2. Click **Members**.
|
|
14
|
-
3. Click **Invite member**.
|
|
15
|
-
4. Enter an email address.
|
|
16
|
-
5. Choose a role. Give the smallest role that the work needs.
|
|
17
|
-
6. Click **Send invitation**.
|
|
18
|
-
|
|
19
|
-
The person receives an email with a link to join. A person with no Picked account must
|
|
20
|
-
create one first.
|
|
21
|
-
|
|
22
|
-
## Remove a member
|
|
23
|
-
|
|
24
|
-
1. Open your organization.
|
|
25
|
-
2. Click **Members**.
|
|
26
|
-
3. Find the member.
|
|
27
|
-
4. Click **Remove** next to the name.
|
|
28
|
-
5. Confirm.
|
|
29
|
-
|
|
30
|
-
The member loses access to every project in the organization immediately.
|
|
31
|
-
|
|
32
|
-
## Related
|
|
33
|
-
|
|
34
|
-
- [Team management](/reference/dashboard/team-management) — the roles.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to point one entry at another
|
|
7
|
-
|
|
8
|
-
This guide shows you how to point one content entry at another, such as a product at its
|
|
9
|
-
category. You need two Models: the one that holds the pointer, and the one that the
|
|
10
|
-
pointer reaches.
|
|
11
|
-
|
|
12
|
-
## 1. Create the target Model
|
|
13
|
-
|
|
14
|
-
1. Click **CMS** in the sidebar, then **Models**.
|
|
15
|
-
2. Click **New model**.
|
|
16
|
-
3. Enter a **Name** and a **Key**, such as `category`.
|
|
17
|
-
4. Leave **Category** as **None (general content)**.
|
|
18
|
-
5. Add your fields.
|
|
19
|
-
6. Click **Create model**.
|
|
20
|
-
|
|
21
|
-
## 2. Add a Reference field
|
|
22
|
-
|
|
23
|
-
1. Open the Model that holds the pointer.
|
|
24
|
-
2. Drag a **Reference** property onto the schema.
|
|
25
|
-
3. Enter a **Name** and a **Key**, such as `category`.
|
|
26
|
-
4. Set **Target Model** to the Model from step 1.
|
|
27
|
-
5. Click **Save**.
|
|
28
|
-
|
|
29
|
-
Turn on **repeatable** for a field that points at more than one entry. Leave **Target
|
|
30
|
-
Model** as **Any Model** to accept an entry of any Model in the workspace.
|
|
31
|
-
|
|
32
|
-
## 3. Choose a target on an entry
|
|
33
|
-
|
|
34
|
-
1. Open a content entry that uses the Model.
|
|
35
|
-
2. Find your Reference field.
|
|
36
|
-
3. Click **Choose entry**.
|
|
37
|
-
4. Search for the entry.
|
|
38
|
-
5. Choose the entry.
|
|
39
|
-
6. Click **Save**.
|
|
40
|
-
|
|
41
|
-
Use **Change entry** to point the field somewhere else. Use **Clear** to remove the
|
|
42
|
-
pointer. **Clear** deletes no content.
|
|
43
|
-
|
|
44
|
-
## Delete a target
|
|
45
|
-
|
|
46
|
-
Picked does not delete an entry while another entry points at it. Clear the reference on
|
|
47
|
-
each entry that points at the target, then delete the target.
|
|
48
|
-
|
|
49
|
-
The same rule holds for a Model. Remove the Reference field that holds it as its **Target
|
|
50
|
-
Model** first.
|
|
51
|
-
|
|
52
|
-
## Read it in your code
|
|
53
|
-
|
|
54
|
-
The pointer and the entry travel separately. See
|
|
55
|
-
[How to read a referenced entry](/how-to/read-a-referenced-entry).
|
|
56
|
-
|
|
57
|
-
## Related
|
|
58
|
-
|
|
59
|
-
- [About content references](/explanation/content-references) — why a reference is a pointer.
|
|
60
|
-
- [Models](/reference/dashboard/content/models) — the field and its options.
|
|
61
|
-
- [Content entries](/reference/dashboard/content/content-entries) — the editor reference.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to see a preview of a workspace
|
|
7
|
-
|
|
8
|
-
This guide shows you how to see an unpublished change on your own site before your
|
|
9
|
-
visitors get it. You need a draft workspace with at least one change in it.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. Click **Preview** in the workspace toolbar.
|
|
14
|
-
2. Enter the URL of your site.
|
|
15
|
-
3. Set each feature flag to the **Default** value, to **On**, or to **Off**. This step
|
|
16
|
-
is optional.
|
|
17
|
-
4. Click **Open preview**.
|
|
18
|
-
|
|
19
|
-
Your site opens in a new tab with the unpublished workspace applied.
|
|
20
|
-
|
|
21
|
-
The preview sends the workspace state to the SDK in the query parameters. The visitors on
|
|
22
|
-
your live site therefore see no change.
|
|
23
|
-
|
|
24
|
-
## Related
|
|
25
|
-
|
|
26
|
-
- [About workspaces and versions](/explanation/workspaces-and-versions) — why a preview
|
|
27
|
-
cannot reach production.
|
|
28
|
-
- [Workspaces](/reference/dashboard/workspaces) — the workspace states.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to publish a workspace
|
|
7
|
-
|
|
8
|
-
This guide shows you how to make the changes in a workspace live. You need a draft
|
|
9
|
-
workspace with at least one unpublished change.
|
|
10
|
-
|
|
11
|
-
The **Publish** button is active only when the workspace holds an unpublished change. A
|
|
12
|
-
badge in the toolbar shows the current state.
|
|
13
|
-
|
|
14
|
-
## Steps
|
|
15
|
-
|
|
16
|
-
1. Click **Publish** in the workspace toolbar.
|
|
17
|
-
2. Read the change preview in the publish modal.
|
|
18
|
-
3. Expand any modified row to see which properties changed.
|
|
19
|
-
4. Read the banner above the diff, if one is there. It reports a change that breaks
|
|
20
|
-
another record.
|
|
21
|
-
5. Click **Publish** to confirm.
|
|
22
|
-
|
|
23
|
-
Picked makes an immutable snapshot of your workspace, and the SDK serves it to your
|
|
24
|
-
visitors.
|
|
25
|
-
|
|
26
|
-
## Related
|
|
27
|
-
|
|
28
|
-
- [About workspaces and versions](/explanation/workspaces-and-versions) — why the modal
|
|
29
|
-
shows a diff.
|
|
30
|
-
- [How to roll back a published version](/how-to/roll-back-a-published-version).
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to read a feature flag
|
|
7
|
-
|
|
8
|
-
This guide shows you how to read the resolved bucket of a feature flag in your
|
|
9
|
-
application. You need a feature flag in your project first, either from the dashboard or
|
|
10
|
-
[defined in SDK code](/reference/sdk/features#define-a-feature-flag-in-sdk-code).
|
|
11
|
-
|
|
12
|
-
Which accessor you pick decides *when* the visitor enters the test, so read
|
|
13
|
-
[About feature flag allocation](/explanation/feature-flag-allocation) before you choose.
|
|
14
|
-
|
|
15
|
-
## 1. Choose an accessor
|
|
16
|
-
|
|
17
|
-
Each accessor returns a different value, and they differ in whether a read resolves the
|
|
18
|
-
feature flag. A read that resolves the feature flag commits the visitor to a bucket and reports the
|
|
19
|
-
decision.
|
|
20
|
-
|
|
21
|
-
| API | Returns | Does a read resolve the feature flag? |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| `useFeature` / `getFeature` | `() => Promise<bucket>` | Only when you call the function that it returns |
|
|
24
|
-
| `useFeatureResult` / `getFeatureResult` | `{ id, bucket }`, and `undefined` until it resolves | Yes, as soon as the component renders |
|
|
25
|
-
| `useFeatureEnabled` / `getFeatureEnabled` | `boolean \| undefined`, the dashboard **Enabled** setting | No |
|
|
26
|
-
| `client.features.listStore` | Every registered feature flag, each with an `isResolved` property | No |
|
|
27
|
-
| `client.features.getById(id)` | A store that holds one feature flag | No |
|
|
28
|
-
|
|
29
|
-
Some decisions must wait for data that you do not have yet, such as a cart, a quote, or
|
|
30
|
-
the profile of a signed-in user. For those, use `useFeature` or `getFeature`. Call the
|
|
31
|
-
function they return after the data arrives.
|
|
32
|
-
|
|
33
|
-
## 2. Read the bucket
|
|
34
|
-
|
|
35
|
-
The bucket is what your site receives. A Boolean feature flag gives `true` or `false`. A
|
|
36
|
-
Text feature flag gives the value of one variant, or `false` for the control group.
|
|
37
|
-
|
|
38
|
-
:::code-group
|
|
39
|
-
|
|
40
|
-
```tsx [React]
|
|
41
|
-
import { useFeatureResult } from '@picked/react/hooks'
|
|
42
|
-
|
|
43
|
-
function MyComponent() {
|
|
44
|
-
// { id, bucket }, or undefined until the feature flag resolves.
|
|
45
|
-
const result = useFeatureResult('hero')
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div>
|
|
49
|
-
{result?.bucket === false && <p>Control</p>}
|
|
50
|
-
{result?.bucket === 'hero-a' && <p>Hero A</p>}
|
|
51
|
-
{result?.bucket === 'hero-b' && <p>Hero B</p>}
|
|
52
|
-
</div>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```svelte [Svelte]
|
|
58
|
-
<script lang="ts">
|
|
59
|
-
import { getFeatureResult } from '@picked/svelte/hooks'
|
|
60
|
-
|
|
61
|
-
// A store that holds { id, bucket }, or undefined until the feature flag resolves.
|
|
62
|
-
const result = getFeatureResult('hero')
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
{#if $result?.bucket === false}
|
|
66
|
-
<p>Control</p>
|
|
67
|
-
{:else if $result?.bucket === 'hero-a'}
|
|
68
|
-
<p>Hero A</p>
|
|
69
|
-
{:else if $result?.bucket === 'hero-b'}
|
|
70
|
-
<p>Hero B</p>
|
|
71
|
-
{/if}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
:::
|
|
75
|
-
|
|
76
|
-
:::warning
|
|
77
|
-
`useFeatureResult` and `getFeatureResult` resolve the feature flag as soon as the component
|
|
78
|
-
renders, and they commit the visitor to a bucket at that moment.
|
|
79
|
-
:::
|
|
80
|
-
|
|
81
|
-
:::tip
|
|
82
|
-
Run [type generation](/reference/sdk/type-generation) and `bucket` narrows to the values
|
|
83
|
-
that this Text feature flag declares. Your editor then shows each value, and it reports a
|
|
84
|
-
comparison against a value that the feature flag cannot serve.
|
|
85
|
-
:::
|
|
86
|
-
|
|
87
|
-
## 3. Read it without a framework
|
|
88
|
-
|
|
89
|
-
The event bus works with any framework, and with none:
|
|
90
|
-
|
|
91
|
-
```ts
|
|
92
|
-
import { createClient } from 'picked'
|
|
93
|
-
|
|
94
|
-
const client = createClient({
|
|
95
|
-
/* Put your client options here. */
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
client.eventBus.watch((event) => {
|
|
99
|
-
if (event.type === 'feature_decide' && event.feature.id === 'my-feature') {
|
|
100
|
-
console.log(event.feature) // { id: 'my-feature', key: 'v1', bucket: 'hero-a' }
|
|
101
|
-
}
|
|
102
|
-
})
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
`feature_decide` fires only when the SDK makes a new decision. A visitor who returns
|
|
106
|
-
restores the decision from storage and fires nothing, so watch
|
|
107
|
-
`client.features.listStore` when you need the current state instead.
|
|
108
|
-
|
|
109
|
-
## Related
|
|
110
|
-
|
|
111
|
-
- [About feature flag allocation](/explanation/feature-flag-allocation) — when the
|
|
112
|
-
visitor enters the test.
|
|
113
|
-
- [SDK feature flags](/reference/sdk/features) — the definition shape and the overrides.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to read a referenced entry
|
|
7
|
-
|
|
8
|
-
This guide shows you how to read the content that a
|
|
9
|
-
[Reference field](/reference/dashboard/content/models#reference-fields) points at. You
|
|
10
|
-
need a component that renders a step first. See
|
|
11
|
-
[How to render a step form](/how-to/render-a-step-form).
|
|
12
|
-
|
|
13
|
-
A Reference field holds a pointer, and not the content. The entry travels beside the
|
|
14
|
-
content of the step, so you resolve the pointer against the content of the client.
|
|
15
|
-
|
|
16
|
-
## 1. Resolve a single reference
|
|
17
|
-
|
|
18
|
-
Pass the raw field value to `useReference()` in React, or to `getReference()` in Svelte.
|
|
19
|
-
|
|
20
|
-
:::code-group
|
|
21
|
-
|
|
22
|
-
```tsx [React]
|
|
23
|
-
import { useReference, useStepContent, useStoreGlobal } from '@picked/react/hooks'
|
|
24
|
-
|
|
25
|
-
export function ProductCategory() {
|
|
26
|
-
const content = useStepContent()
|
|
27
|
-
const category = useStoreGlobal(useReference(content?.category))
|
|
28
|
-
|
|
29
|
-
if (!category) return null
|
|
30
|
-
|
|
31
|
-
return <span>{String(category.data.name ?? '')}</span>
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
```svelte [Svelte]
|
|
36
|
-
<script lang="ts">
|
|
37
|
-
import { getStepContent, getReference } from '@picked/svelte/hooks'
|
|
38
|
-
|
|
39
|
-
const content = getStepContent()
|
|
40
|
-
const category = getReference(content.map((c) => c?.category ?? null, { skipVoid: false }))
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
{#if $category}
|
|
44
|
-
<span>{$category.data.name ?? ''}</span>
|
|
45
|
-
{/if}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
:::
|
|
49
|
-
|
|
50
|
-
In Svelte, pass a store and not a plain value. Content arrives after the component
|
|
51
|
-
starts. A plain value therefore holds the result at "not set".
|
|
52
|
-
|
|
53
|
-
## 2. Resolve a repeatable reference
|
|
54
|
-
|
|
55
|
-
Use `useReferences()` or `getReferences()`. They give a list in field order.
|
|
56
|
-
|
|
57
|
-
:::code-group
|
|
58
|
-
|
|
59
|
-
```tsx [React]
|
|
60
|
-
import { useReferences, useStepContent, useStoreGlobal } from '@picked/react/hooks'
|
|
61
|
-
|
|
62
|
-
export function ProductCategories() {
|
|
63
|
-
const content = useStepContent()
|
|
64
|
-
const categories = useStoreGlobal(useReferences(content?.categories))
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<ul>
|
|
68
|
-
{categories.map((category) => (
|
|
69
|
-
<li key={category.id}>{String(category.data.name ?? '')}</li>
|
|
70
|
-
))}
|
|
71
|
-
</ul>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
```svelte [Svelte]
|
|
77
|
-
<script lang="ts">
|
|
78
|
-
import { getStepContent, getReferences } from '@picked/svelte/hooks'
|
|
79
|
-
|
|
80
|
-
const content = getStepContent()
|
|
81
|
-
const categories = getReferences(content.map((c) => c?.categories ?? null, { skipVoid: false }))
|
|
82
|
-
</script>
|
|
83
|
-
|
|
84
|
-
<ul>
|
|
85
|
-
{#each $categories as category (category.id)}
|
|
86
|
-
<li>{category.data.name ?? ''}</li>
|
|
87
|
-
{/each}
|
|
88
|
-
</ul>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
:::
|
|
92
|
-
|
|
93
|
-
The list holds no empty places, so you need no check for each item.
|
|
94
|
-
|
|
95
|
-
## Handle a target that does not resolve
|
|
96
|
-
|
|
97
|
-
A single reference gives an empty result when Picked cannot resolve the target. A
|
|
98
|
-
repeatable reference leaves the item out of the list.
|
|
99
|
-
|
|
100
|
-
This happens when somebody deleted the target, when the target belongs to another
|
|
101
|
-
workspace, or when the chain of references is deeper than the limit.
|
|
102
|
-
|
|
103
|
-
Render something else for the empty case, as the React example above does.
|
|
104
|
-
|
|
105
|
-
## Related
|
|
106
|
-
|
|
107
|
-
- [Content](/reference/sdk/content) — every hook and its return type.
|
|
108
|
-
- [About content references](/explanation/content-references) — why the entry travels separately.
|
|
109
|
-
- [How to point one entry at another](/how-to/point-one-entry-at-another) — the dashboard side.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to register a component
|
|
7
|
-
|
|
8
|
-
This guide shows you how to connect a component in your application to an experience in
|
|
9
|
-
the dashboard.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. Wrap your component with the adapter for your framework.
|
|
14
|
-
2. Pass it in the `components` object of `createClient()`.
|
|
15
|
-
3. Use the same key as the component name of the experience.
|
|
16
|
-
|
|
17
|
-
:::code-group
|
|
18
|
-
|
|
19
|
-
```tsx [React]
|
|
20
|
-
import { createClient } from 'picked'
|
|
21
|
-
import { adaptReactComponent } from '@picked/react'
|
|
22
|
-
import { MyWidget } from './MyWidget'
|
|
23
|
-
|
|
24
|
-
const picked = createClient({
|
|
25
|
-
projectId: 'your-project-id',
|
|
26
|
-
components: {
|
|
27
|
-
MyWidget: adaptReactComponent(MyWidget),
|
|
28
|
-
},
|
|
29
|
-
})
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
```ts [Svelte]
|
|
33
|
-
import { createClient } from 'picked'
|
|
34
|
-
import { adaptSvelteComponent } from '@picked/svelte'
|
|
35
|
-
import MyWidget from './MyWidget.svelte'
|
|
36
|
-
|
|
37
|
-
const picked = createClient({
|
|
38
|
-
projectId: 'your-project-id',
|
|
39
|
-
components: {
|
|
40
|
-
MyWidget: adaptSvelteComponent(MyWidget),
|
|
41
|
-
},
|
|
42
|
-
})
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
:::
|
|
46
|
-
|
|
47
|
-
:::warning
|
|
48
|
-
`components` takes an adapted component. A plain React or Svelte component does not work
|
|
49
|
-
without `adaptReactComponent` or `adaptSvelteComponent`.
|
|
50
|
-
:::
|
|
51
|
-
|
|
52
|
-
## Related
|
|
53
|
-
|
|
54
|
-
- [SDK experiences](/reference/sdk/experiences) — the experience shape.
|
|
55
|
-
- [How to install the SDK](/how-to/install-the-sdk).
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to register an action handler
|
|
7
|
-
|
|
8
|
-
This guide shows you how to connect an action node in a flow to a function in your
|
|
9
|
-
application. You need an action in your project first, with a key. See
|
|
10
|
-
[Actions](/reference/dashboard/actions).
|
|
11
|
-
|
|
12
|
-
## 1. Register the handler
|
|
13
|
-
|
|
14
|
-
Pass an `actions` object to `createClient()`. Each key must match an action key from the
|
|
15
|
-
dashboard:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { createClient } from 'picked'
|
|
19
|
-
|
|
20
|
-
const picked = createClient({
|
|
21
|
-
projectId: 'your-project-id',
|
|
22
|
-
actions: {
|
|
23
|
-
'track-signup': () => {
|
|
24
|
-
analytics.track('signup_completed')
|
|
25
|
-
},
|
|
26
|
-
notify: (params) => {
|
|
27
|
-
sendNotification(params)
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The SDK calls the function that matches when the flow reaches the action node.
|
|
34
|
-
|
|
35
|
-
## 2. Throw only for a true error
|
|
36
|
-
|
|
37
|
-
The flow takes the failure branch when your handler throws or its promise rejects. Throw
|
|
38
|
-
when the request itself did not complete:
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
'check-eligibility': async () => {
|
|
42
|
-
const response = await fetch('/api/eligibility')
|
|
43
|
-
// Throw only when the request itself fails. That takes the failure branch.
|
|
44
|
-
if (!response.ok) throw new Error('Eligibility request failed')
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 3. Record a negative answer as a response
|
|
49
|
-
|
|
50
|
-
A valid negative result is not a failure. An endpoint can answer `200` with a "no". Store
|
|
51
|
-
that value as a response and branch on it with a condition instead:
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
'check-serviced-area': async ({ client, responses }) => {
|
|
55
|
-
const postcode = responses.find((r) => r.fieldKey === 'postcode')?.value
|
|
56
|
-
const { serviced } = await fetch(`/api/serviced?postcode=${postcode}`).then((r) => r.json())
|
|
57
|
-
// Store the outcome as a response. A later condition then takes the branch.
|
|
58
|
-
client.responses.register('is-serviced', serviced)
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Related
|
|
63
|
-
|
|
64
|
-
- [About how Picked works](/explanation/how-picked-works#how-an-action-decides-which-way-to-go)
|
|
65
|
-
— why a returned `false` is a success.
|
|
66
|
-
- [SDK actions](/reference/sdk/actions) — what the handler receives and returns.
|
|
67
|
-
- [Actions](/reference/dashboard/actions) — the dashboard options.
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to render a step form
|
|
7
|
-
|
|
8
|
-
This guide shows you how to render the fields of the active step and let a visitor submit
|
|
9
|
-
them.
|
|
10
|
-
|
|
11
|
-
## 1. Put the steps in a router
|
|
12
|
-
|
|
13
|
-
`StepRouter` watches the step state and activates the `Step` whose `id` matches.
|
|
14
|
-
|
|
15
|
-
:::code-group
|
|
16
|
-
|
|
17
|
-
```tsx [React]
|
|
18
|
-
import { StepRouter, Step } from '@picked/react/router'
|
|
19
|
-
|
|
20
|
-
function MyExperience() {
|
|
21
|
-
return (
|
|
22
|
-
<StepRouter>
|
|
23
|
-
<Step id="welcome">
|
|
24
|
-
<WelcomeScreen />
|
|
25
|
-
</Step>
|
|
26
|
-
<Step id="contact">
|
|
27
|
-
<ContactForm />
|
|
28
|
-
</Step>
|
|
29
|
-
</StepRouter>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```svelte [Svelte]
|
|
35
|
-
<script lang="ts">
|
|
36
|
-
import { StepRouter, Step } from '@picked/svelte/router'
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<StepRouter>
|
|
40
|
-
<Step id="welcome">
|
|
41
|
-
<WelcomeScreen />
|
|
42
|
-
</Step>
|
|
43
|
-
<Step id="contact">
|
|
44
|
-
<ContactForm />
|
|
45
|
-
</Step>
|
|
46
|
-
</StepRouter>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
:::
|
|
50
|
-
|
|
51
|
-
:::note
|
|
52
|
-
A router must hold every Step, even when there is only one Step.
|
|
53
|
-
:::
|
|
54
|
-
|
|
55
|
-
## 2. Render the fields
|
|
56
|
-
|
|
57
|
-
Bind `form.props` to your `<form>` element and map over the fields.
|
|
58
|
-
|
|
59
|
-
:::code-group
|
|
60
|
-
|
|
61
|
-
```tsx [React]
|
|
62
|
-
import { useStep, useStoreGlobal } from '@picked/react/hooks'
|
|
63
|
-
|
|
64
|
-
function StepForm() {
|
|
65
|
-
const { fields, form } = useStep()
|
|
66
|
-
const currentFields = useStoreGlobal(fields)
|
|
67
|
-
const isSubmitting = useStoreGlobal(form.submitting)
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<form {...form.props}>
|
|
71
|
-
{currentFields.map((field) => (
|
|
72
|
-
<div key={field.id}>
|
|
73
|
-
<label htmlFor={field.id}>{field.label}</label>
|
|
74
|
-
<input
|
|
75
|
-
id={field.id}
|
|
76
|
-
name={field.id}
|
|
77
|
-
value={field.value ?? ''}
|
|
78
|
-
onChange={field.onChange}
|
|
79
|
-
onBlur={field.onBlur}
|
|
80
|
-
/>
|
|
81
|
-
{field.error && field.touched && <p className="error">{field.error.userMessage}</p>}
|
|
82
|
-
</div>
|
|
83
|
-
))}
|
|
84
|
-
<button type="submit" disabled={isSubmitting}>Continue</button>
|
|
85
|
-
</form>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
```svelte [Svelte]
|
|
91
|
-
<script lang="ts">
|
|
92
|
-
import { getStep } from '@picked/svelte/hooks'
|
|
93
|
-
|
|
94
|
-
const { fields, form } = getStep()
|
|
95
|
-
const isSubmitting = form.submitting
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<form {...form.props}>
|
|
99
|
-
{#each $fields as field}
|
|
100
|
-
<div>
|
|
101
|
-
<label for={field.id}>{field.label}</label>
|
|
102
|
-
<input
|
|
103
|
-
id={field.id}
|
|
104
|
-
name={field.id}
|
|
105
|
-
value={field.value ?? ''}
|
|
106
|
-
onchange={field.onChange}
|
|
107
|
-
onblur={field.onBlur}
|
|
108
|
-
/>
|
|
109
|
-
{#if field.error && field.touched}
|
|
110
|
-
<p class="error">{field.error.userMessage}</p>
|
|
111
|
-
{/if}
|
|
112
|
-
</div>
|
|
113
|
-
{/each}
|
|
114
|
-
<button type="submit" disabled={$isSubmitting}>Continue</button>
|
|
115
|
-
</form>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
:::
|
|
119
|
-
|
|
120
|
-
The SDK checks a field on blur, and not while the visitor types.
|
|
121
|
-
|
|
122
|
-
## 3. Load a large step lazily
|
|
123
|
-
|
|
124
|
-
Pass a dynamic import to the `component` prop of `<Step>`. The SDK does not load the
|
|
125
|
-
content until that step becomes active.
|
|
126
|
-
|
|
127
|
-
## Related
|
|
128
|
-
|
|
129
|
-
- [How to run code on a form submission](/how-to/run-code-on-a-form-submission) — the
|
|
130
|
-
callbacks.
|
|
131
|
-
- [SDK steps](/reference/sdk/steps) — the `StepContext` shape.
|