@picked/client 0.0.1-dev.1787543060859 → 0.0.1-dev.1787788898336

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.
Files changed (51) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/api-9gq3GBPF.cjs +1 -0
  3. package/dist/api-DU4j3Qw0.js +22 -0
  4. package/dist/cjs/index.js +2 -2
  5. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  6. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  7. package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
  8. package/dist/cjs/plugins/telemetry/index.js +1 -1
  9. package/dist/cjs/server/index.js +1 -1
  10. package/dist/docs/how-to/fill-and-publish-a-page.md +18 -2
  11. package/dist/docs/reference/dashboard/content/pages.mdx +25 -0
  12. package/dist/docs/reference/delivery-api/preview-caching-crawling.md +1 -1
  13. package/dist/docs/reference/sdk/fields.md +30 -16
  14. package/dist/esm/index.js +163 -152
  15. package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
  16. package/dist/esm/plugins/responses-browser-storage/index.js +2 -2
  17. package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
  18. package/dist/esm/plugins/telemetry/index.js +42 -46
  19. package/dist/esm/server/index.js +1 -1
  20. package/dist/{plugin-L5y4NdFX.js → plugin-CYXHEafF.js} +2 -2
  21. package/dist/{plugin-BcFzHPC7.cjs → plugin-rwzR9hVc.cjs} +1 -1
  22. package/dist/provider-BWDd3oaq.js +94 -0
  23. package/dist/provider-lgLyP_0N.cjs +1 -0
  24. package/dist/types/data-source/api.d.ts.map +1 -1
  25. package/dist/types/data-source/provider.d.ts +3 -0
  26. package/dist/types/data-source/provider.d.ts.map +1 -1
  27. package/dist/types/data-source/request-observer.d.ts +24 -12
  28. package/dist/types/data-source/request-observer.d.ts.map +1 -1
  29. package/dist/types/entities/field/field.d.ts +6 -0
  30. package/dist/types/entities/field/field.d.ts.map +1 -1
  31. package/dist/types/entities/plugin/plugin.d.ts +3 -3
  32. package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
  33. package/dist/types/picked.d.ts +14 -7
  34. package/dist/types/picked.d.ts.map +1 -1
  35. package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
  36. package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
  37. package/dist/types/plugins/telemetry/emit.d.ts +3 -3
  38. package/dist/types/plugins/telemetry/emit.d.ts.map +1 -1
  39. package/dist/types/plugins/telemetry/plugin.d.ts +9 -0
  40. package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
  41. package/dist/types/utils/user-timing.d.ts +16 -13
  42. package/dist/types/utils/user-timing.d.ts.map +1 -1
  43. package/dist/{version-BqU6f22c.cjs → version-BaI_1eQx.cjs} +1 -1
  44. package/dist/{version-DAFO6eas.js → version-DXDZM7eT.js} +1 -1
  45. package/package.json +3 -3
  46. package/dist/api-CahTmEWe.cjs +0 -1
  47. package/dist/api-DwTNwuWK.js +0 -33
  48. package/dist/provider-BLDm3i8g.cjs +0 -1
  49. package/dist/provider-Dx6VjvZg.js +0 -69
  50. package/dist/request-observer-BXDfOU0V.cjs +0 -1
  51. package/dist/request-observer-DtG0cRfz.js +0 -19
@@ -124,36 +124,50 @@ const conditionalField = createField({
124
124
 
125
125
  ## Field policies
126
126
 
127
- Use a privacy policy to control how Picked tracks and stores the data of a field:
127
+ A field captures nothing until you permit it. Use a privacy policy to let Picked track
128
+ or store the data of a field:
128
129
 
129
130
  ```ts
130
- const sensitiveField = createField({
131
- id: 'ssn',
132
- name: 'ssn',
131
+ const colourField = createField({
132
+ id: 'favourite-colour',
133
+ name: 'favourite-colour',
133
134
  type: 'text',
134
- label: 'Social Security Number',
135
+ label: 'Favourite colour',
135
136
  multiple: false,
136
137
  required: true,
137
138
  policies: {
138
- doNotTrackValue: true, // Do not send the value to analytics.
139
- doNotStoreValue: true, // Do not keep the value in browser storage.
139
+ doNotTrackValue: false, // Send the value to analytics.
140
+ doNotStoreValue: false, // Keep the value in browser storage.
140
141
  },
141
142
  })
142
143
  ```
143
144
 
144
145
  **Privacy policies**:
145
146
 
146
- - `doNotTrackValue`: keeps the value of the field out of your analytics events. The
147
- events carry the field ID only.
148
- - `doNotStoreValue`: stops the SDK, so that it does not put the value in browser
149
- storage.
147
+ - `doNotTrackValue`: set it to `false` to put the value of the field in your analytics
148
+ events. At `true`, and when the policy is absent, the events carry the field ID only.
149
+ - `doNotStoreValue`: set it to `false` to let the SDK put the value in browser storage.
150
+ At `true`, and when the policy is absent, the SDK keeps the value out of storage.
150
151
 
151
- Use these policies for sensitive data such as a tax number, a credit card number, or
152
- a password. That data must stay in the browser.
152
+ Both policies keep the value in the browser by default. A field with no `policies`
153
+ object sends no value to your analytics and writes no value to browser storage. Keep
154
+ the default for sensitive data such as a tax number, a credit card number, or a
155
+ password. That data stays in the browser:
156
+
157
+ ```ts
158
+ const sensitiveField = createField({
159
+ id: 'ssn',
160
+ name: 'ssn',
161
+ type: 'text',
162
+ label: 'Social Security Number',
163
+ multiple: false,
164
+ required: true,
165
+ })
166
+ ```
153
167
 
154
- Neither policy stops the flow from the use of the value inside the page. A field with both
155
- policies set still holds its value there, for step validation and for the conditions after
156
- the step. The policies control what leaves the page: your analytics, and browser
168
+ Neither policy stops the flow from the use of the value inside the page. A field that
169
+ captures nothing still holds its value there, for step validation and for the conditions
170
+ after the step. The policies control what leaves the page: your analytics, and browser
157
171
  storage.
158
172
 
159
173
  ## Field metadata