@usgb/forms 1.0.2 → 1.0.4
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 +131 -142
- package/dist/forms-manifest.1.0.4.json +439 -0
- package/dist/forms-manifest.json +218 -84
- package/dist/index.js +636 -559
- package/dist/src/contract/createIdempotencyKey.d.ts +2 -0
- package/dist/src/contract/createIdempotencyKey.d.ts.map +1 -0
- package/dist/src/contract/createStubAdapter.d.ts.map +1 -1
- package/dist/src/contract/types.d.ts +15 -15
- package/dist/src/contract/types.d.ts.map +1 -1
- package/dist/src/definitions/consents.d.ts +15 -0
- package/dist/src/definitions/consents.d.ts.map +1 -1
- package/dist/src/definitions/index.d.ts +4 -3
- package/dist/src/definitions/index.d.ts.map +1 -1
- package/dist/src/definitions/manifest.d.ts +14 -1
- package/dist/src/definitions/manifest.d.ts.map +1 -1
- package/dist/src/definitions/types.d.ts +35 -5
- package/dist/src/definitions/types.d.ts.map +1 -1
- package/dist/src/form/FormShell.d.ts +2 -1
- package/dist/src/form/FormShell.d.ts.map +1 -1
- package/dist/src/form/UsgbForm.d.ts +5 -4
- package/dist/src/form/UsgbForm.d.ts.map +1 -1
- package/dist/src/form/chunkFields.d.ts +1 -1
- package/dist/src/form/kinds/LeadKindForm.d.ts +1 -1
- package/dist/src/form/kinds/LeadKindForm.d.ts.map +1 -1
- package/dist/src/form/kinds/NewsletterKindForm.d.ts +1 -1
- package/dist/src/form/kinds/NewsletterKindForm.d.ts.map +1 -1
- package/dist/src/form/kinds/types.d.ts +3 -1
- package/dist/src/form/kinds/types.d.ts.map +1 -1
- package/dist/src/form/useUsgbFormSession.d.ts +3 -4
- package/dist/src/form/useUsgbFormSession.d.ts.map +1 -1
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/ui/Button.d.ts.map +1 -1
- package/dist/src/ui/ConsentField.d.ts.map +1 -1
- package/dist/usgb-forms.1.0.4.js +44 -0
- package/dist/usgb-forms.css +141 -45
- package/dist/usgb-forms.js +11 -11
- package/forms-manifest.json +218 -84
- package/package.json +1 -1
- package/dist/forms-manifest.1.0.2.json +0 -305
- package/dist/src/contract/collectContext.d.ts +0 -9
- package/dist/src/contract/collectContext.d.ts.map +0 -1
- package/dist/usgb-forms.1.0.2.js +0 -44
package/forms-manifest.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "1.
|
|
2
|
+
"schemaVersion": "1.1.0",
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "@usgb/forms",
|
|
5
5
|
"compatiblePackageVersions": "^1.0.2"
|
|
6
6
|
},
|
|
7
7
|
"submissionContract": {
|
|
8
8
|
"version": "1.0.0",
|
|
9
|
-
"transport": "server-proxy"
|
|
10
|
-
"payloadShape": "data-and-context"
|
|
9
|
+
"transport": "server-proxy"
|
|
11
10
|
},
|
|
12
11
|
"trackingRegistry": {
|
|
13
12
|
"page_url": {
|
|
@@ -152,40 +151,105 @@
|
|
|
152
151
|
"states": ["collected", "unavailable"]
|
|
153
152
|
}
|
|
154
153
|
},
|
|
154
|
+
"editorOptions": {
|
|
155
|
+
"appearance": {
|
|
156
|
+
"label": "Appearance",
|
|
157
|
+
"control": "select",
|
|
158
|
+
"reactProp": "appearance",
|
|
159
|
+
"attribute": "appearance",
|
|
160
|
+
"required": false,
|
|
161
|
+
"default": "on-light",
|
|
162
|
+
"valuesFrom": "supportedAppearances",
|
|
163
|
+
"description": "Recolors the form for a light or dark host surface. It never paints a background, padding, or radius — the host container owns those."
|
|
164
|
+
},
|
|
165
|
+
"variant": {
|
|
166
|
+
"label": "Size variant",
|
|
167
|
+
"control": "select",
|
|
168
|
+
"reactProp": "variant",
|
|
169
|
+
"attribute": "variant",
|
|
170
|
+
"required": false,
|
|
171
|
+
"default": "dense",
|
|
172
|
+
"valuesFrom": "supportedVariants",
|
|
173
|
+
"description": "Select exactly one size treatment: `dense`, `large`, or `sidebar`."
|
|
174
|
+
},
|
|
175
|
+
"twoColumn": {
|
|
176
|
+
"label": "Two-column name row",
|
|
177
|
+
"control": "checkbox",
|
|
178
|
+
"reactProp": "twoColumn",
|
|
179
|
+
"attribute": "two-column",
|
|
180
|
+
"required": false,
|
|
181
|
+
"default": false,
|
|
182
|
+
"description": "Places grouped name fields in two columns when the form container is wide enough."
|
|
183
|
+
},
|
|
184
|
+
"heading": {
|
|
185
|
+
"label": "Heading",
|
|
186
|
+
"control": "text",
|
|
187
|
+
"reactProp": "heading",
|
|
188
|
+
"attribute": "heading",
|
|
189
|
+
"required": false,
|
|
190
|
+
"description": "Placement copy above the fields. Omit to render no heading."
|
|
191
|
+
},
|
|
192
|
+
"subheading": {
|
|
193
|
+
"label": "Subheading",
|
|
194
|
+
"control": "text",
|
|
195
|
+
"reactProp": "subheading",
|
|
196
|
+
"attribute": "subheading",
|
|
197
|
+
"required": false,
|
|
198
|
+
"description": "Supporting copy under the heading. Omit to render none."
|
|
199
|
+
},
|
|
200
|
+
"ctaLabel": {
|
|
201
|
+
"label": "Button label",
|
|
202
|
+
"control": "text",
|
|
203
|
+
"reactProp": "ctaLabel",
|
|
204
|
+
"attribute": "cta",
|
|
205
|
+
"required": false,
|
|
206
|
+
"defaultFrom": "ctaLabel",
|
|
207
|
+
"description": "Overrides the catalog submit label for this placement."
|
|
208
|
+
},
|
|
209
|
+
"legalUrls": {
|
|
210
|
+
"label": "Legal document URLs",
|
|
211
|
+
"control": "url-group",
|
|
212
|
+
"reactProp": "legalUrls",
|
|
213
|
+
"attributes": {
|
|
214
|
+
"clientAgreement": "client-agreement-url",
|
|
215
|
+
"privacyPolicy": "privacy-policy-url",
|
|
216
|
+
"userAgreement": "user-agreement-url",
|
|
217
|
+
"marketLossPolicy": "market-loss-policy-url",
|
|
218
|
+
"electronicDisclaimer": "electronic-disclaimer-url",
|
|
219
|
+
"termsOfSale": "terms-of-sale-url"
|
|
220
|
+
},
|
|
221
|
+
"required": true,
|
|
222
|
+
"valuesFrom": "requiredLegalUrls",
|
|
223
|
+
"description": "Host CMS hrefs for the documents named in this form's consent copy. Every key in `requiredLegalUrls` must be a non-empty URL or the form does not render."
|
|
224
|
+
},
|
|
225
|
+
"successMessage": {
|
|
226
|
+
"label": "Thank-you message",
|
|
227
|
+
"control": "text",
|
|
228
|
+
"reactProp": "successMessage",
|
|
229
|
+
"attribute": "success-message",
|
|
230
|
+
"required": false,
|
|
231
|
+
"description": "Inline copy shown after accept. Ignored when a thank-you URL is set; omitted values fall back to a package default line."
|
|
232
|
+
},
|
|
233
|
+
"successUrl": {
|
|
234
|
+
"label": "Thank-you URL",
|
|
235
|
+
"control": "url",
|
|
236
|
+
"reactProp": "successUrl",
|
|
237
|
+
"attribute": "success-url",
|
|
238
|
+
"required": false,
|
|
239
|
+
"description": "Redirect after accept. A full navigation can cut off analytics beacons — prefer measuring the conversion on the thank-you page."
|
|
240
|
+
}
|
|
241
|
+
},
|
|
155
242
|
"forms": {
|
|
156
|
-
"
|
|
243
|
+
"magento-fik": {
|
|
157
244
|
"definitionVersion": "1",
|
|
158
245
|
"kind": "lead",
|
|
159
246
|
"flow": { "type": "single" },
|
|
160
|
-
"supportedHosts": ["pwa", "wordpress"],
|
|
161
247
|
"fields": [
|
|
162
248
|
{ "name": "firstname", "required": true, "group": "name" },
|
|
163
249
|
{ "name": "lastname", "required": true, "group": "name" },
|
|
164
250
|
{ "name": "email", "required": true },
|
|
165
251
|
{ "name": "phone", "required": false }
|
|
166
252
|
],
|
|
167
|
-
"trackingFields": [
|
|
168
|
-
"page_url",
|
|
169
|
-
"page_title",
|
|
170
|
-
"referrer",
|
|
171
|
-
"first_touch_url",
|
|
172
|
-
"utm_source",
|
|
173
|
-
"utm_medium",
|
|
174
|
-
"utm_campaign",
|
|
175
|
-
"utm_term",
|
|
176
|
-
"utm_content",
|
|
177
|
-
"gclid",
|
|
178
|
-
"msclkid",
|
|
179
|
-
"gbraid",
|
|
180
|
-
"wbraid",
|
|
181
|
-
"hubspot_utk",
|
|
182
|
-
"ga_client_id",
|
|
183
|
-
"ga_session_id",
|
|
184
|
-
"snowplow_id",
|
|
185
|
-
"vwo_uuid",
|
|
186
|
-
"user_agent",
|
|
187
|
-
"ip_address"
|
|
188
|
-
],
|
|
189
253
|
"ctaLabel": "GET MY FREE GUIDE",
|
|
190
254
|
"consents": [
|
|
191
255
|
{
|
|
@@ -205,98 +269,168 @@
|
|
|
205
269
|
}
|
|
206
270
|
],
|
|
207
271
|
"editor": {
|
|
208
|
-
"label": "
|
|
209
|
-
"description": "
|
|
210
|
-
"whenToUse": "
|
|
211
|
-
"whenNotToUse": "
|
|
272
|
+
"label": "Magento FIK",
|
|
273
|
+
"description": "First name, last name, and email required; phone optional. Optional checkboxes: transactional SMS (lead-tcpa v1), marketing SMS (lead-sms v1), and terms and privacy (lead-tospp v1).",
|
|
274
|
+
"whenToUse": "TBD",
|
|
275
|
+
"whenNotToUse": "TBD",
|
|
276
|
+
"options": [
|
|
277
|
+
"appearance",
|
|
278
|
+
"variant",
|
|
279
|
+
"twoColumn",
|
|
280
|
+
"heading",
|
|
281
|
+
"subheading",
|
|
282
|
+
"ctaLabel",
|
|
283
|
+
"legalUrls",
|
|
284
|
+
"successMessage",
|
|
285
|
+
"successUrl"
|
|
286
|
+
],
|
|
212
287
|
"supportedAppearances": ["on-light", "on-dark"],
|
|
213
|
-
"supportedVariants": ["dense", "large", "sidebar",
|
|
288
|
+
"supportedVariants": ["dense", "large", "sidebar"],
|
|
289
|
+
"requiredLegalUrls": ["userAgreement", "privacyPolicy"]
|
|
214
290
|
}
|
|
215
291
|
},
|
|
216
|
-
"
|
|
292
|
+
"magento-ira-kick-article": {
|
|
217
293
|
"definitionVersion": "1",
|
|
218
294
|
"kind": "lead",
|
|
219
295
|
"flow": { "type": "single" },
|
|
220
|
-
"supportedHosts": ["pwa", "wordpress"],
|
|
221
296
|
"fields": [
|
|
222
297
|
{ "name": "firstname", "required": true, "group": "name" },
|
|
223
298
|
{ "name": "lastname", "required": true, "group": "name" },
|
|
224
299
|
{ "name": "email", "required": true },
|
|
225
|
-
{ "name": "phone", "required":
|
|
300
|
+
{ "name": "phone", "required": true }
|
|
226
301
|
],
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
302
|
+
"ctaLabel": "GET MY FREE GUIDE",
|
|
303
|
+
"consents": [
|
|
304
|
+
{
|
|
305
|
+
"definitionId": "lead-tcpa",
|
|
306
|
+
"definitionVersion": "2",
|
|
307
|
+
"required": false
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"editor": {
|
|
311
|
+
"label": "Magento IRA Kick Article",
|
|
312
|
+
"description": "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).",
|
|
313
|
+
"whenToUse": "TBD",
|
|
314
|
+
"whenNotToUse": "TBD",
|
|
315
|
+
"options": [
|
|
316
|
+
"appearance",
|
|
317
|
+
"variant",
|
|
318
|
+
"twoColumn",
|
|
319
|
+
"heading",
|
|
320
|
+
"subheading",
|
|
321
|
+
"ctaLabel",
|
|
322
|
+
"legalUrls",
|
|
323
|
+
"successMessage",
|
|
324
|
+
"successUrl"
|
|
325
|
+
],
|
|
326
|
+
"supportedAppearances": ["on-light", "on-dark"],
|
|
327
|
+
"supportedVariants": ["dense", "large", "sidebar"],
|
|
328
|
+
"requiredLegalUrls": ["userAgreement", "privacyPolicy"]
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"magento-fik-blog-rail": {
|
|
332
|
+
"definitionVersion": "1",
|
|
333
|
+
"kind": "lead",
|
|
334
|
+
"flow": { "type": "single" },
|
|
335
|
+
"fields": [
|
|
336
|
+
{ "name": "firstname", "required": true, "group": "name" },
|
|
337
|
+
{ "name": "lastname", "required": true, "group": "name" },
|
|
338
|
+
{ "name": "email", "required": true },
|
|
339
|
+
{ "name": "phone", "required": true }
|
|
248
340
|
],
|
|
249
341
|
"ctaLabel": "GET MY FREE GUIDE",
|
|
250
342
|
"consents": [
|
|
251
|
-
{
|
|
343
|
+
{
|
|
344
|
+
"definitionId": "lead-tcpa",
|
|
345
|
+
"definitionVersion": "3",
|
|
346
|
+
"required": true
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"editor": {
|
|
350
|
+
"label": "Magento FIK Blog Rail",
|
|
351
|
+
"description": "First name, last name, email, and phone required. Required automated text-message consent checkbox with linked terms of service and privacy policy (lead-tcpa v3).",
|
|
352
|
+
"whenToUse": "TBD",
|
|
353
|
+
"whenNotToUse": "TBD",
|
|
354
|
+
"options": [
|
|
355
|
+
"appearance",
|
|
356
|
+
"variant",
|
|
357
|
+
"twoColumn",
|
|
358
|
+
"heading",
|
|
359
|
+
"subheading",
|
|
360
|
+
"ctaLabel",
|
|
361
|
+
"legalUrls",
|
|
362
|
+
"successMessage",
|
|
363
|
+
"successUrl"
|
|
364
|
+
],
|
|
365
|
+
"supportedAppearances": ["on-light", "on-dark"],
|
|
366
|
+
"supportedVariants": ["dense", "large", "sidebar"],
|
|
367
|
+
"requiredLegalUrls": ["userAgreement", "privacyPolicy"]
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"main-investors-kit-notice": {
|
|
371
|
+
"definitionVersion": "1",
|
|
372
|
+
"kind": "lead",
|
|
373
|
+
"flow": { "type": "single" },
|
|
374
|
+
"fields": [
|
|
375
|
+
{ "name": "firstname", "required": true, "group": "name" },
|
|
376
|
+
{ "name": "lastname", "required": true, "group": "name" },
|
|
377
|
+
{ "name": "email", "required": true },
|
|
378
|
+
{ "name": "phone", "required": false }
|
|
379
|
+
],
|
|
380
|
+
"ctaLabel": "CLAIM YOUR OFFER",
|
|
381
|
+
"consents": [
|
|
382
|
+
{ "definitionId": "lead-clickwrap", "definitionVersion": "2" }
|
|
252
383
|
],
|
|
253
384
|
"editor": {
|
|
254
385
|
"label": "Main Investors Kit (clickwrap)",
|
|
255
|
-
"description": "
|
|
256
|
-
"whenToUse": "
|
|
257
|
-
"whenNotToUse": "
|
|
386
|
+
"description": "First name, last name, and email required; phone optional. Clickwrap notice only (lead-clickwrap v2); no consent checkboxes.",
|
|
387
|
+
"whenToUse": "TBD",
|
|
388
|
+
"whenNotToUse": "TBD",
|
|
389
|
+
"options": [
|
|
390
|
+
"appearance",
|
|
391
|
+
"variant",
|
|
392
|
+
"twoColumn",
|
|
393
|
+
"heading",
|
|
394
|
+
"subheading",
|
|
395
|
+
"ctaLabel",
|
|
396
|
+
"legalUrls",
|
|
397
|
+
"successMessage",
|
|
398
|
+
"successUrl"
|
|
399
|
+
],
|
|
258
400
|
"supportedAppearances": ["on-light", "on-dark"],
|
|
259
|
-
"supportedVariants": ["dense", "large", "sidebar",
|
|
401
|
+
"supportedVariants": ["dense", "large", "sidebar"],
|
|
402
|
+
"requiredLegalUrls": ["privacyPolicy", "userAgreement"]
|
|
260
403
|
}
|
|
261
404
|
},
|
|
262
405
|
"newsletter": {
|
|
263
406
|
"definitionVersion": "1",
|
|
264
407
|
"kind": "newsletter",
|
|
265
408
|
"flow": { "type": "single" },
|
|
266
|
-
"supportedHosts": ["pwa"],
|
|
267
409
|
"fields": [{ "name": "email", "required": true }],
|
|
268
|
-
"trackingFields": [
|
|
269
|
-
"page_url",
|
|
270
|
-
"page_title",
|
|
271
|
-
"referrer",
|
|
272
|
-
"utm_source",
|
|
273
|
-
"utm_medium",
|
|
274
|
-
"utm_campaign",
|
|
275
|
-
"utm_term",
|
|
276
|
-
"utm_content"
|
|
277
|
-
],
|
|
278
410
|
"ctaLabel": "SUBSCRIBE",
|
|
279
411
|
"editor": {
|
|
280
412
|
"label": "Newsletter",
|
|
281
|
-
"description": "Email
|
|
282
|
-
"whenToUse": "
|
|
283
|
-
"whenNotToUse": "
|
|
413
|
+
"description": "Email only. No consent.",
|
|
414
|
+
"whenToUse": "TBD",
|
|
415
|
+
"whenNotToUse": "TBD",
|
|
416
|
+
"options": [
|
|
417
|
+
"appearance",
|
|
418
|
+
"heading",
|
|
419
|
+
"subheading",
|
|
420
|
+
"ctaLabel",
|
|
421
|
+
"successMessage",
|
|
422
|
+
"successUrl"
|
|
423
|
+
],
|
|
284
424
|
"supportedAppearances": ["on-light", "on-dark"],
|
|
285
|
-
"supportedVariants": []
|
|
425
|
+
"supportedVariants": [],
|
|
426
|
+
"requiredLegalUrls": []
|
|
286
427
|
}
|
|
287
428
|
}
|
|
288
429
|
},
|
|
289
430
|
"hostAdapterContract": {
|
|
290
431
|
"hosts": ["pwa", "wordpress"],
|
|
291
|
-
"mayProvide": [
|
|
292
|
-
"browser cookies",
|
|
293
|
-
"URL parameters",
|
|
294
|
-
"page and placement context",
|
|
295
|
-
"host/store identity"
|
|
296
|
-
],
|
|
432
|
+
"mayProvide": ["legal document URLs", "host/store identity"],
|
|
297
433
|
"mustNotDefine": [
|
|
298
|
-
"new tracking keys",
|
|
299
|
-
"destination property names",
|
|
300
434
|
"consent definitions",
|
|
301
435
|
"form fields",
|
|
302
436
|
"submission endpoints"
|