@picked/client 0.0.62-next.1 → 0.0.62-next.10
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/README.md +0 -8
- package/dist/{api-Dfrznen2.js → api-C11HFYrl.js} +1 -1
- package/dist/api-DXosW8uz.cjs +1 -0
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dom-observer/index.js +1 -0
- 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/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/actions.mdx +0 -1
- package/dist/docs/api/authentication.md +376 -0
- package/dist/docs/api/authorization-and-scopes.md +262 -0
- package/dist/docs/api/error-handling.md +211 -0
- package/dist/docs/api/index.md +172 -11
- package/dist/docs/api/pagination.md +176 -0
- package/dist/docs/image-optimisation-service.md +72 -0
- package/dist/docs/index.md +0 -2
- package/dist/docs/pickedql/data-sources.md +2 -2
- package/dist/docs/pickedql/dimensions.md +2 -0
- package/dist/docs/pickedql/schema.md +2 -2
- package/dist/docs/pickedql/virtual-functions.md +27 -0
- package/dist/docs/sdk/actions.md +0 -1
- package/dist/docs/sdk/content-security-policy.md +8 -7
- package/dist/docs/sdk/features.md +0 -1
- package/dist/docs/sdk/fields.md +2 -2
- package/dist/docs/sdk/index.md +0 -1
- package/dist/docs/sdk/plugins/create-experience.md +0 -1
- package/dist/docs/sdk/plugins/dynamic-experiences.md +2 -3
- package/dist/docs/sdk/plugins/window-object.md +0 -1
- package/dist/docs/sdk/predicates.md +0 -1
- package/dist/docs/workspaces.mdx +60 -1
- package/dist/dom-C3C6Fmwz.cjs +1 -0
- package/dist/dom-DGePXPpM.js +84 -0
- package/dist/esm/form/index.js +1 -1
- package/dist/esm/index.js +1020 -494
- package/dist/esm/plugins/create-experience/index.js +1 -1
- package/dist/esm/plugins/dom-observer/index.js +87 -0
- package/dist/esm/plugins/dynamic-experiences/index.js +133 -60
- package/dist/esm/plugins/experience-browser-storage/index.js +9 -6
- package/dist/esm/plugins/history-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
- package/dist/esm/plugins/single-page-app/index.js +1 -1
- package/dist/esm/plugins/web-components/index.js +1 -1
- package/dist/esm/server/index.js +23 -13
- package/dist/experience-instance-DImym3m_.js +419 -0
- package/dist/experience-instance-DygAdzbn.cjs +1 -0
- package/dist/rules-logic-D_CVBuv7.js +13 -0
- package/dist/rules-logic-H6P8xwHF.cjs +1 -0
- package/dist/types/client.d.ts +2 -2
- package/dist/types/entities/action/action.d.ts +6 -3
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +39 -2
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/content/content.d.ts +37 -0
- package/dist/types/entities/content/content.d.ts.map +1 -0
- package/dist/types/entities/experience/experience.d.ts +69 -113
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +17 -2
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +26 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/framework/framework.d.ts +24 -3
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/plugin/plugin.d.ts +32 -1
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +24 -3
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/session/session.d.ts +45 -0
- package/dist/types/entities/session/session.d.ts.map +1 -0
- package/dist/types/entities/step/step.d.ts +17 -2
- package/dist/types/entities/step/step.d.ts.map +1 -1
- package/dist/types/exports.d.ts +9 -3
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts +47 -0
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -0
- package/dist/types/lifecycle/rules-logic.d.ts +24 -0
- package/dist/types/lifecycle/rules-logic.d.ts.map +1 -0
- package/dist/types/lifecycle/state-snapshot.d.ts +37 -0
- package/dist/types/lifecycle/state-snapshot.d.ts.map +1 -0
- package/dist/types/logic-engine.d.ts +1 -1
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +141 -187
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/index.d.ts +3 -0
- package/dist/types/plugins/dom-observer/index.d.ts.map +1 -0
- package/dist/types/plugins/dom-observer/plugin.d.ts +50 -0
- package/dist/types/plugins/dom-observer/plugin.d.ts.map +1 -0
- package/dist/types/plugins/dynamic-experiences/index.d.ts +2 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +18 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +63 -1
- 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/web-components/plugin.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +7 -0
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +1 -1
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/picked-config.d.ts +12 -4
- package/dist/types/utils/picked-config.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts +4 -9
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/package.json +12 -2
- package/dist/api-NpGrXHyM.cjs +0 -1
- package/dist/docs/reference/index.md +0 -11
- package/dist/docs/tooling/index.md +0 -19
- package/dist/experience-instance-DC2gKwA6.cjs +0 -1
- package/dist/experience-instance-DJaNc5Ob.js +0 -486
- package/dist/rules-logic-BTIxfrJJ.js +0 -240
- package/dist/rules-logic-DNLOv90w.cjs +0 -1
- package/dist/types/utils/state-snaphot.d.ts +0 -26
- package/dist/types/utils/state-snaphot.d.ts.map +0 -1
- package/dist/types/utils/user-session.d.ts +0 -12
- package/dist/types/utils/user-session.d.ts.map +0 -1
- /package/dist/docs/{tooling/chrome-extension.md → chrome-extension.md} +0 -0
- /package/dist/docs/{tooling/gtm-template.md → gtm-template.md} +0 -0
- /package/dist/docs/{tooling/mcp.md → mcp.md} +0 -0
- /package/dist/docs/{tooling/vite-plugin.md → vite-plugin.md} +0 -0
- /package/dist/{id-Bv44ilEo.cjs → id-Cg7fVl1O.cjs} +0 -0
- /package/dist/{id-CRqy981z.js → id-n2yrHvNo.js} +0 -0
- /package/dist/{object-C82v79xc.js → object-DvUDOytC.js} +0 -0
- /package/dist/{object-CUJOjanb.cjs → object-ThO1DEyl.cjs} +0 -0
- /package/dist/{storage-B6lQtc4-.cjs → storage-BXSlLTRa.cjs} +0 -0
- /package/dist/{storage-6Xk0uAxB.js → storage-hOHCCXvP.js} +0 -0
|
@@ -132,8 +132,8 @@ Aggregated step-transition edges for sankey / funnel charts. Parameters are supp
|
|
|
132
132
|
|
|
133
133
|
| Column | Type | Description |
|
|
134
134
|
|---|---|---|
|
|
135
|
-
| `source` | String | Edge start, formatted as `NN.
|
|
136
|
-
| `target` | String | Edge end, formatted as `NN.
|
|
135
|
+
| `source` | String | Edge start, formatted as `NN. <step title>` (e.g., `001. Welcome screen`) |
|
|
136
|
+
| `target` | String | Edge end, formatted as `NN. <step title>`.
|
|
137
137
|
| `users` | UInt64 | Distinct `user_canonical_id` count that traversed this edge. |
|
|
138
138
|
|
|
139
139
|
### Parameters (via `WHERE`)
|
|
@@ -149,6 +149,33 @@ Funnel metrics are being continuously updated. Check back for new functions.
|
|
|
149
149
|
| `step_enter_users()` | Users who entered a funnel step |
|
|
150
150
|
| `step_enter_sessions()` | Sessions that entered a funnel step |
|
|
151
151
|
|
|
152
|
+
## Cohort filters (`events` only)
|
|
153
|
+
|
|
154
|
+
Predicate-shaped functions that emit a `user_canonical_id IN (SELECT … FROM events …)` subquery. Use in `WHERE` to restrict any analysis to users who have at least one event matching a custom condition.
|
|
155
|
+
|
|
156
|
+
| Function | Description |
|
|
157
|
+
|---|---|
|
|
158
|
+
| `user_cohort_filter('<condition>')` | Restrict the query to users with ≥1 `events` row matching `<condition>` |
|
|
159
|
+
| `user_cohort_filter(filter='<condition>')` | Same, named-arg form |
|
|
160
|
+
|
|
161
|
+
`<condition>` uses the same `column=value [AND\|OR …]` shorthand as `control_users` / `variant_users`.
|
|
162
|
+
|
|
163
|
+
```sql
|
|
164
|
+
-- Funnel scoped to users who eventually submitted lead capture
|
|
165
|
+
SELECT all_users(), all_purchase_users()
|
|
166
|
+
FROM events
|
|
167
|
+
WHERE project_id = 'proj-abc'
|
|
168
|
+
AND user_cohort_filter('event_type=lead_capture')
|
|
169
|
+
|
|
170
|
+
-- Multi-condition cohort with OR-grouping
|
|
171
|
+
SELECT all_sessions()
|
|
172
|
+
FROM events
|
|
173
|
+
WHERE project_id = 'proj-abc'
|
|
174
|
+
AND user_cohort_filter('event_type=signup OR event_type=trial_start')
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The outer query MUST filter by a single `project_id` — the function bakes that tenant into the inner subquery so the cohort scan is scoped to your project, not the whole warehouse.
|
|
178
|
+
|
|
152
179
|
## Feature functions (`features` / `events`)
|
|
153
180
|
|
|
154
181
|
Parameterized functions that accept the feature name, bucket, and an optional feature key:
|
package/dist/docs/sdk/actions.md
CHANGED
|
@@ -14,7 +14,6 @@ Register actions when creating the Picked client. Each key in the `actions` obje
|
|
|
14
14
|
import { createClient } from '@picked/client'
|
|
15
15
|
|
|
16
16
|
const picked = createClient({
|
|
17
|
-
organizationId: 'your-org-id',
|
|
18
17
|
projectId: 'your-project-id',
|
|
19
18
|
actions: {
|
|
20
19
|
'track-signup': () => {
|
|
@@ -4,21 +4,22 @@ layout: docs
|
|
|
4
4
|
|
|
5
5
|
# Content Security Policy
|
|
6
6
|
|
|
7
|
-
The Picked SDK
|
|
7
|
+
The Picked SDK loads resources from the following domains. Add each to the matching CSP directive.
|
|
8
8
|
|
|
9
9
|
## Required domains
|
|
10
10
|
|
|
11
|
-
| Domain | Purpose |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| `api.picked.app` | API requests
|
|
14
|
-
| `evnts.pckd.dev` | Analytics event collection (Snowplow) |
|
|
11
|
+
| Domain | Directive | Purpose |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `api.picked.app` | `connect-src` | API requests, project configuration, experiences, session tracking |
|
|
14
|
+
| `evnts.pckd.dev` | `connect-src` | Analytics event collection (Snowplow) |
|
|
15
|
+
| `img.picked-content.com` | `img-src` | Optimised images served via the [image optimisation service](../image-optimisation-service.md) |
|
|
15
16
|
|
|
16
17
|
## Configuration
|
|
17
18
|
|
|
18
19
|
As an HTTP header:
|
|
19
20
|
|
|
20
21
|
```
|
|
21
|
-
Content-Security-Policy: connect-src 'self' https://api.picked.app https://evnts.pckd.dev;
|
|
22
|
+
Content-Security-Policy: connect-src 'self' https://api.picked.app https://evnts.pckd.dev; img-src 'self' https://img.picked-content.com;
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
Or as a `<meta>` tag:
|
|
@@ -26,6 +27,6 @@ Or as a `<meta>` tag:
|
|
|
26
27
|
```html
|
|
27
28
|
<meta
|
|
28
29
|
http-equiv="Content-Security-Policy"
|
|
29
|
-
content="connect-src 'self' https://api.picked.app https://evnts.pckd.dev;"
|
|
30
|
+
content="connect-src 'self' https://api.picked.app https://evnts.pckd.dev; img-src 'self' https://img.picked-content.com;"
|
|
30
31
|
/>
|
|
31
32
|
```
|
|
@@ -14,7 +14,6 @@ Define features when creating the Picked client by passing a `features` object.
|
|
|
14
14
|
import { createClient } from '@picked/client'
|
|
15
15
|
|
|
16
16
|
const client = createClient({
|
|
17
|
-
organizationId: 'your-org-id',
|
|
18
17
|
projectId: 'your-project-id',
|
|
19
18
|
features: {
|
|
20
19
|
'summer-sale': {
|
package/dist/docs/sdk/fields.md
CHANGED
|
@@ -193,7 +193,7 @@ const sensitiveField = createField({
|
|
|
193
193
|
required: true,
|
|
194
194
|
policies: {
|
|
195
195
|
doNotTrackValue: true, // Don't send value to analytics
|
|
196
|
-
doNotStoreValue: true, // Don't persist value to
|
|
196
|
+
doNotStoreValue: true, // Don't persist value to browser storage
|
|
197
197
|
},
|
|
198
198
|
})
|
|
199
199
|
```
|
|
@@ -201,7 +201,7 @@ const sensitiveField = createField({
|
|
|
201
201
|
**Privacy policies**:
|
|
202
202
|
|
|
203
203
|
- `doNotTrackValue`: Excludes field value from analytics events (only field ID is tracked)
|
|
204
|
-
- `doNotStoreValue`: Prevents field value from being persisted to
|
|
204
|
+
- `doNotStoreValue`: Prevents field value from being persisted to browser storage
|
|
205
205
|
|
|
206
206
|
Use these policies for sensitive data like SSNs, credit cards, or passwords that should only exist client-side.
|
|
207
207
|
|
package/dist/docs/sdk/index.md
CHANGED
|
@@ -20,7 +20,6 @@ import { windowObjectPlugin } from '@picked/client/plugins/window-object'
|
|
|
20
20
|
import { singlePageAppPlugin } from '@picked/client/plugins/single-page-app'
|
|
21
21
|
|
|
22
22
|
const picked = createClient({
|
|
23
|
-
organizationId: 'your-organization-id',
|
|
24
23
|
projectId: 'your-project-id',
|
|
25
24
|
plugins: [windowObjectPlugin(), singlePageAppPlugin()],
|
|
26
25
|
})
|
|
@@ -17,7 +17,6 @@ import { funnelExperience } from '../experiences/funnel-experience'
|
|
|
17
17
|
import { widgetExperience } from '../experiences/widget-experience'
|
|
18
18
|
|
|
19
19
|
const client = createClient({
|
|
20
|
-
organizationId: 'your-org-id',
|
|
21
20
|
projectId: 'your-project-id',
|
|
22
21
|
plugins: createExperiencePlugin({
|
|
23
22
|
experiences: [funnelExperience, widgetExperience],
|
|
@@ -15,7 +15,6 @@ import { createClient } from '@picked/client'
|
|
|
15
15
|
import { dynamicExperiencesPlugin } from '@picked/client/plugins/dynamic-experiences'
|
|
16
16
|
|
|
17
17
|
const client = createClient({
|
|
18
|
-
organizationId: 'your-org-id',
|
|
19
18
|
projectId: 'your-project-id',
|
|
20
19
|
plugins: [dynamicExperiencesPlugin()],
|
|
21
20
|
})
|
|
@@ -35,14 +34,14 @@ When the client starts, the plugin resolves your project configuration using a t
|
|
|
35
34
|
|
|
36
35
|
1. **Preview mode** — When you [enter preview mode from the dashboard](/workspaces#preview), the plugin fetches fresh config from the API. Feature decisions use session storage so they are not persisted beyond the current tab.
|
|
37
36
|
|
|
38
|
-
2. **Build-time config** — If `projectConfig` was passed as a plugin option, or the [Vite Plugin](/
|
|
37
|
+
2. **Build-time config** — If `projectConfig` was passed as a plugin option, or the [Vite Plugin](/vite-plugin) injected config at build time, the plugin uses that config with no network request.
|
|
39
38
|
|
|
40
39
|
3. **Runtime fetch** — Otherwise, the plugin fetches config from the API when the client starts.
|
|
41
40
|
|
|
42
41
|
Once resolved, the plugin registers all features, conditions, fields, steps, and experiences with the client. Experiences then initialize according to their [conditions](/sdk/conditions) and [target selectors](/sdk/experiences).
|
|
43
42
|
|
|
44
43
|
:::note
|
|
45
|
-
The [Vite Plugin](/
|
|
44
|
+
The [Vite Plugin](/vite-plugin) eliminates the runtime API request in production by embedding your project config at build time. This is the recommended setup for Vite-based applications.
|
|
46
45
|
:::
|
|
47
46
|
|
|
48
47
|
## Feature Allocation
|
|
@@ -13,7 +13,6 @@ import { createClient } from '@picked/client'
|
|
|
13
13
|
import { windowObjectPlugin } from '@picked/client/plugins/window-object'
|
|
14
14
|
|
|
15
15
|
const client = createClient({
|
|
16
|
-
organizationId: 'your-org-id',
|
|
17
16
|
projectId: 'your-project-id',
|
|
18
17
|
plugins: [windowObjectPlugin()],
|
|
19
18
|
})
|
|
@@ -14,7 +14,6 @@ Define predicates when creating the Picked client by passing a `predicates` obje
|
|
|
14
14
|
import { createClient } from '@picked/client'
|
|
15
15
|
|
|
16
16
|
const client = createClient({
|
|
17
|
-
organizationId: 'your-org-id',
|
|
18
17
|
projectId: 'your-project-id',
|
|
19
18
|
predicates: {
|
|
20
19
|
'is-example-page': ({ location }) => {
|
package/dist/docs/workspaces.mdx
CHANGED
|
@@ -18,6 +18,12 @@ A workspace is a version of your project's configuration. Use workspaces to stag
|
|
|
18
18
|
|
|
19
19
|
Each project has a workspace that holds your experiences, features, and entity configurations. When you make changes in the dashboard — editing a flow, updating a feature, or modifying an entity — those changes exist in the workspace until you publish.
|
|
20
20
|
|
|
21
|
+
A workspace is in one of three states:
|
|
22
|
+
|
|
23
|
+
- **Live** — the workspace the SDK serves to visitors. There is exactly one live workspace per project.
|
|
24
|
+
- **Draft** — a workspace not currently serving traffic. You can edit, preview, and publish a draft to make it live.
|
|
25
|
+
- **Archived** — a draft you have set aside. Archived workspaces stay editable but are filtered out of the default workspaces list.
|
|
26
|
+
|
|
21
27
|
## Preview
|
|
22
28
|
|
|
23
29
|
Preview your workspace to see how changes look before publishing.
|
|
@@ -34,10 +40,63 @@ Your site opens in a new tab with the unpublished workspace applied. Preview use
|
|
|
34
40
|
Publishing creates an immutable snapshot of your workspace. Once published, the SDK serves the new configuration to visitors.
|
|
35
41
|
|
|
36
42
|
1. Click **Publish** in the workspace toolbar.
|
|
37
|
-
2.
|
|
43
|
+
2. Review the change preview in the publish modal.
|
|
44
|
+
3. Click **Publish** to confirm.
|
|
38
45
|
|
|
39
46
|
The publish button is only enabled when there are unpublished changes. A status badge in the toolbar shows whether the workspace has unpublished changes or is up to date.
|
|
40
47
|
|
|
48
|
+
## Change previews
|
|
49
|
+
|
|
50
|
+
The publish modal shows a side-by-side change preview comparing the current workspace against the last published snapshot. Use it to verify exactly what your visitors will see after publishing.
|
|
51
|
+
|
|
52
|
+
<Screenshot
|
|
53
|
+
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/experiences?action=publish"
|
|
54
|
+
alt="The publish modal showing a change preview with added experiences, steps, and conditions"
|
|
55
|
+
selector='[role="dialog"]'
|
|
56
|
+
wait='[role="dialog"]'
|
|
57
|
+
hide={['[data-testid="publish-diff-replaces-version"]']}
|
|
58
|
+
renderWidth={720}
|
|
59
|
+
renderHeight={579}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
The preview groups changes by entity type — experiences, features, steps, fields, actions, and conditions. Each row shows whether the entity was **added**, **removed**, or **modified**. For modifications, expand the row to see which properties changed.
|
|
63
|
+
|
|
64
|
+
When the change preview includes breaking changes — for example, removing a field that other steps still reference — a banner highlights the breaking entries above the diff so you can reconsider before publishing.
|
|
65
|
+
|
|
66
|
+
The first publish of a workspace has no previous snapshot to compare against, so the publish modal shows the workspace's contents as the initial publish without a diff.
|
|
67
|
+
|
|
41
68
|
## Unpublished changes
|
|
42
69
|
|
|
43
70
|
The workspace tracks whether any changes have been made since the last publish. If you create or update an experience, feature, or entity after the last publish, the toolbar shows a warning badge indicating unpublished changes.
|
|
71
|
+
|
|
72
|
+
## Workspace settings
|
|
73
|
+
|
|
74
|
+
The workspace settings page (**Settings** in the workspace nav) covers renaming, archiving, and deleting a workspace.
|
|
75
|
+
|
|
76
|
+
### Rename
|
|
77
|
+
|
|
78
|
+
Change the workspace name in the **Name** field and click **Save**. Names are unique within a project — duplicates are rejected with a validation error.
|
|
79
|
+
|
|
80
|
+
### Archive
|
|
81
|
+
|
|
82
|
+
Archiving moves a draft workspace out of the default workspaces list without deleting it. Use it for drafts you want to set aside for later without losing the work.
|
|
83
|
+
|
|
84
|
+
1. Open the workspace settings page.
|
|
85
|
+
2. Click **Archive** in the page header.
|
|
86
|
+
3. Confirm in the modal.
|
|
87
|
+
|
|
88
|
+
Live workspaces cannot be archived directly — make a different workspace live first, then archive the previous one.
|
|
89
|
+
|
|
90
|
+
### Unarchive
|
|
91
|
+
|
|
92
|
+
Restore an archived workspace to draft status from the same page. The settings page detects the archived state and switches the toolbar button to **Unarchive**.
|
|
93
|
+
|
|
94
|
+
### Delete
|
|
95
|
+
|
|
96
|
+
Deleting a workspace permanently removes it and its entities. This is destructive and cannot be undone — prefer archive when in doubt.
|
|
97
|
+
|
|
98
|
+
1. Open the workspace settings page.
|
|
99
|
+
2. In the **Danger zone** card at the bottom, click **Delete**.
|
|
100
|
+
3. Confirm in the modal.
|
|
101
|
+
|
|
102
|
+
Live workspaces cannot be deleted. Archive or publish a different workspace first to free the workspace for deletion.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./supports-Dsjg-82e.cjs`);function t(t){return!e.d()||!e.r()?[]:Array.from(window.document.querySelectorAll(t)).filter(e=>e instanceof HTMLElement)}var n=`open`;function r(t){if(!e.l())throw Error(`Shadow DOM is not supported in this environment`);return t.attachShadow({mode:n})}function i(){return new Promise((t,n)=>{if(!e.r()){n();return}document.readyState===`loading`?document.addEventListener(`readystatechange`,()=>t(),{once:!0}):t()})}function a(e,t){let n=new MutationObserver(r=>{document.contains(e)||(n.disconnect(),t())});n.observe(document.body,{childList:!0,subtree:!0})}var o=`picked-root`,s=`picked-target`,c=`picked-root`;function l(e,n){return[...e,{selector:`${c}[experience-id="${n}"]`,placement:`replace`}].flatMap(e=>{let r=t(e.selector).filter(e=>!f(e,n)&&!p(e,n));return{...e,elements:r}})}function u(e,t,n){return e.flatMap(e=>e.elements.map(r=>h(r,e.placement,t,n)))}function d(e,t){e.classList.add(s),e.classList.add(`${s}-${t}`)}function f(e,t){return t?e.classList.contains(`${s}-${t}`):e.classList.contains(`${s}`)}function p(e,t){return t?e.classList.contains(`${o}-${t}`):e.classList.contains(o)}function m(e,t){let n=document.createElement(`div`);return n.style.display=`block`,n.classList.add(o),n.classList.add(`${o}-${e}`),n.classList.add(`${o}-${t}`),n}function h(e,t,n,r){let i,a=m(n,r);if(e instanceof Document)i=e.body.appendChild(a);else{switch(t){case`replace`:e.replaceWith(a);break;case`before`:e.before(a);break;case`after`:e.after(a);break;case`prepend`:e.prepend(a);break;case`append`:e.append(a);break}i=a}return i}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { d as e, l as t, r as n } from "./supports-0XIfd4-R.js";
|
|
2
|
+
//#region src/utils/dom.ts
|
|
3
|
+
function r(t) {
|
|
4
|
+
return !e() || !n() ? [] : Array.from(window.document.querySelectorAll(t)).filter((e) => e instanceof HTMLElement);
|
|
5
|
+
}
|
|
6
|
+
var i = "open";
|
|
7
|
+
function a(e) {
|
|
8
|
+
if (!t()) throw Error("Shadow DOM is not supported in this environment");
|
|
9
|
+
return e.attachShadow({ mode: i });
|
|
10
|
+
}
|
|
11
|
+
function o() {
|
|
12
|
+
return new Promise((e, t) => {
|
|
13
|
+
if (!n()) {
|
|
14
|
+
t();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
document.readyState === "loading" ? document.addEventListener("readystatechange", () => e(), { once: !0 }) : e();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function s(e, t) {
|
|
21
|
+
let n = new MutationObserver((r) => {
|
|
22
|
+
document.contains(e) || (n.disconnect(), t());
|
|
23
|
+
});
|
|
24
|
+
n.observe(document.body, {
|
|
25
|
+
childList: !0,
|
|
26
|
+
subtree: !0
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
var c = "picked-root", l = "picked-target", u = "picked-root";
|
|
30
|
+
function d(e, t) {
|
|
31
|
+
return [...e, {
|
|
32
|
+
selector: `${u}[experience-id="${t}"]`,
|
|
33
|
+
placement: "replace"
|
|
34
|
+
}].flatMap((e) => {
|
|
35
|
+
let n = r(e.selector).filter((e) => !m(e, t) && !h(e, t));
|
|
36
|
+
return {
|
|
37
|
+
...e,
|
|
38
|
+
elements: n
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function f(e, t, n) {
|
|
43
|
+
return e.flatMap((e) => e.elements.map((r) => _(r, e.placement, t, n)));
|
|
44
|
+
}
|
|
45
|
+
function p(e, t) {
|
|
46
|
+
e.classList.add(l), e.classList.add(`${l}-${t}`);
|
|
47
|
+
}
|
|
48
|
+
function m(e, t) {
|
|
49
|
+
return t ? e.classList.contains(`${l}-${t}`) : e.classList.contains(`${l}`);
|
|
50
|
+
}
|
|
51
|
+
function h(e, t) {
|
|
52
|
+
return t ? e.classList.contains(`${c}-${t}`) : e.classList.contains(c);
|
|
53
|
+
}
|
|
54
|
+
function g(e, t) {
|
|
55
|
+
let n = document.createElement("div");
|
|
56
|
+
return n.style.display = "block", n.classList.add(c), n.classList.add(`${c}-${e}`), n.classList.add(`${c}-${t}`), n;
|
|
57
|
+
}
|
|
58
|
+
function _(e, t, n, r) {
|
|
59
|
+
let i, a = g(n, r);
|
|
60
|
+
if (e instanceof Document) i = e.body.appendChild(a);
|
|
61
|
+
else {
|
|
62
|
+
switch (t) {
|
|
63
|
+
case "replace":
|
|
64
|
+
e.replaceWith(a);
|
|
65
|
+
break;
|
|
66
|
+
case "before":
|
|
67
|
+
e.before(a);
|
|
68
|
+
break;
|
|
69
|
+
case "after":
|
|
70
|
+
e.after(a);
|
|
71
|
+
break;
|
|
72
|
+
case "prepend":
|
|
73
|
+
e.prepend(a);
|
|
74
|
+
break;
|
|
75
|
+
case "append":
|
|
76
|
+
e.append(a);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
i = a;
|
|
80
|
+
}
|
|
81
|
+
return i;
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { h as a, d as i, a as n, s as o, o as r, p as s, f as t };
|
package/dist/esm/form/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../rules-logic-
|
|
1
|
+
import { t as e } from "../../rules-logic-D_CVBuv7.js";
|
|
2
2
|
import { attach as t, combine as n, createEffect as r, createEvent as i, createStore as a, sample as o, split as s } from "effector";
|
|
3
3
|
//#region src/form/build-responses.ts
|
|
4
4
|
function c(e, t, n) {
|