@usgb/forms 1.0.2 → 1.0.3
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 +128 -142
- package/dist/forms-manifest.1.0.3.json +439 -0
- package/dist/forms-manifest.json +218 -84
- package/dist/index.js +642 -582
- 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 +10 -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.3.js +44 -0
- package/dist/usgb-forms.css +98 -15
- 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
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"package": {
|
|
4
|
-
"name": "@usgb/forms",
|
|
5
|
-
"compatiblePackageVersions": "^1.0.2"
|
|
6
|
-
},
|
|
7
|
-
"submissionContract": {
|
|
8
|
-
"version": "1.0.0",
|
|
9
|
-
"transport": "server-proxy",
|
|
10
|
-
"payloadShape": "data-and-context"
|
|
11
|
-
},
|
|
12
|
-
"trackingRegistry": {
|
|
13
|
-
"page_url": {
|
|
14
|
-
"destination": "form_submission_url",
|
|
15
|
-
"category": "page",
|
|
16
|
-
"collection": "server",
|
|
17
|
-
"required": true,
|
|
18
|
-
"states": ["collected", "unavailable"],
|
|
19
|
-
"description": "Canonical landing-page URL at submission time"
|
|
20
|
-
},
|
|
21
|
-
"page_title": {
|
|
22
|
-
"destination": "pageName",
|
|
23
|
-
"category": "page",
|
|
24
|
-
"collection": "server",
|
|
25
|
-
"required": false,
|
|
26
|
-
"states": ["collected", "unavailable"]
|
|
27
|
-
},
|
|
28
|
-
"referrer": {
|
|
29
|
-
"destination": "referrer",
|
|
30
|
-
"category": "page",
|
|
31
|
-
"collection": "browser",
|
|
32
|
-
"required": false,
|
|
33
|
-
"states": ["collected", "unavailable"]
|
|
34
|
-
},
|
|
35
|
-
"first_touch_url": {
|
|
36
|
-
"destination": "crossDomain_landing_url",
|
|
37
|
-
"category": "attribution",
|
|
38
|
-
"collection": "host-adapter",
|
|
39
|
-
"required": false,
|
|
40
|
-
"states": ["collected", "unavailable"]
|
|
41
|
-
},
|
|
42
|
-
"utm_source": {
|
|
43
|
-
"destination": "utm_source",
|
|
44
|
-
"category": "attribution",
|
|
45
|
-
"collection": "host-adapter",
|
|
46
|
-
"required": false,
|
|
47
|
-
"states": ["collected", "unavailable"]
|
|
48
|
-
},
|
|
49
|
-
"utm_medium": {
|
|
50
|
-
"destination": "utm_medium",
|
|
51
|
-
"category": "attribution",
|
|
52
|
-
"collection": "host-adapter",
|
|
53
|
-
"required": false,
|
|
54
|
-
"states": ["collected", "unavailable"]
|
|
55
|
-
},
|
|
56
|
-
"utm_campaign": {
|
|
57
|
-
"destination": "utm_campaign",
|
|
58
|
-
"category": "attribution",
|
|
59
|
-
"collection": "host-adapter",
|
|
60
|
-
"required": false,
|
|
61
|
-
"states": ["collected", "unavailable"]
|
|
62
|
-
},
|
|
63
|
-
"utm_term": {
|
|
64
|
-
"destination": "utm_term",
|
|
65
|
-
"category": "attribution",
|
|
66
|
-
"collection": "host-adapter",
|
|
67
|
-
"required": false,
|
|
68
|
-
"states": ["collected", "unavailable"]
|
|
69
|
-
},
|
|
70
|
-
"utm_content": {
|
|
71
|
-
"destination": "utm_content",
|
|
72
|
-
"category": "attribution",
|
|
73
|
-
"collection": "host-adapter",
|
|
74
|
-
"required": false,
|
|
75
|
-
"states": ["collected", "unavailable"]
|
|
76
|
-
},
|
|
77
|
-
"gclid": {
|
|
78
|
-
"destination": "gclid",
|
|
79
|
-
"category": "click-id",
|
|
80
|
-
"collection": "host-adapter",
|
|
81
|
-
"required": false,
|
|
82
|
-
"states": ["collected", "unavailable"]
|
|
83
|
-
},
|
|
84
|
-
"msclkid": {
|
|
85
|
-
"destination": "msclkid",
|
|
86
|
-
"category": "click-id",
|
|
87
|
-
"collection": "host-adapter",
|
|
88
|
-
"required": false,
|
|
89
|
-
"states": ["collected", "unavailable"]
|
|
90
|
-
},
|
|
91
|
-
"gbraid": {
|
|
92
|
-
"destination": "gbraid",
|
|
93
|
-
"category": "click-id",
|
|
94
|
-
"collection": "host-adapter",
|
|
95
|
-
"required": false,
|
|
96
|
-
"states": ["collected", "unavailable"]
|
|
97
|
-
},
|
|
98
|
-
"wbraid": {
|
|
99
|
-
"destination": "wbraid",
|
|
100
|
-
"category": "click-id",
|
|
101
|
-
"collection": "host-adapter",
|
|
102
|
-
"required": false,
|
|
103
|
-
"states": ["collected", "unavailable"]
|
|
104
|
-
},
|
|
105
|
-
"hubspot_utk": {
|
|
106
|
-
"destination": "hubspot_utk",
|
|
107
|
-
"category": "identity",
|
|
108
|
-
"collection": "host-adapter",
|
|
109
|
-
"required": false,
|
|
110
|
-
"states": ["collected", "unavailable", "consent-withheld"]
|
|
111
|
-
},
|
|
112
|
-
"ga_client_id": {
|
|
113
|
-
"destination": "ga_client_id",
|
|
114
|
-
"category": "analytics",
|
|
115
|
-
"collection": "host-adapter",
|
|
116
|
-
"required": false,
|
|
117
|
-
"states": ["collected", "unavailable", "consent-withheld"]
|
|
118
|
-
},
|
|
119
|
-
"ga_session_id": {
|
|
120
|
-
"destination": "session_id_start",
|
|
121
|
-
"category": "analytics",
|
|
122
|
-
"collection": "host-adapter",
|
|
123
|
-
"required": false,
|
|
124
|
-
"states": ["collected", "unavailable", "consent-withheld"]
|
|
125
|
-
},
|
|
126
|
-
"snowplow_id": {
|
|
127
|
-
"destination": "snowplow_id",
|
|
128
|
-
"category": "analytics",
|
|
129
|
-
"collection": "host-adapter",
|
|
130
|
-
"required": false,
|
|
131
|
-
"states": ["collected", "unavailable", "consent-withheld"]
|
|
132
|
-
},
|
|
133
|
-
"vwo_uuid": {
|
|
134
|
-
"destination": "vwo_uuid",
|
|
135
|
-
"category": "experiment",
|
|
136
|
-
"collection": "host-adapter",
|
|
137
|
-
"required": false,
|
|
138
|
-
"states": ["collected", "unavailable", "consent-withheld"]
|
|
139
|
-
},
|
|
140
|
-
"user_agent": {
|
|
141
|
-
"destination": "header_http_client_details",
|
|
142
|
-
"category": "technical",
|
|
143
|
-
"collection": "server",
|
|
144
|
-
"required": false,
|
|
145
|
-
"states": ["collected", "unavailable"]
|
|
146
|
-
},
|
|
147
|
-
"ip_address": {
|
|
148
|
-
"destination": "ipAddress",
|
|
149
|
-
"category": "technical",
|
|
150
|
-
"collection": "server",
|
|
151
|
-
"required": false,
|
|
152
|
-
"states": ["collected", "unavailable"]
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"forms": {
|
|
156
|
-
"main-investors-kit": {
|
|
157
|
-
"definitionVersion": "1",
|
|
158
|
-
"kind": "lead",
|
|
159
|
-
"flow": { "type": "single" },
|
|
160
|
-
"supportedHosts": ["pwa", "wordpress"],
|
|
161
|
-
"fields": [
|
|
162
|
-
{ "name": "firstname", "required": true, "group": "name" },
|
|
163
|
-
{ "name": "lastname", "required": true, "group": "name" },
|
|
164
|
-
{ "name": "email", "required": true },
|
|
165
|
-
{ "name": "phone", "required": false }
|
|
166
|
-
],
|
|
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
|
-
"ctaLabel": "GET MY FREE GUIDE",
|
|
190
|
-
"consents": [
|
|
191
|
-
{
|
|
192
|
-
"definitionId": "lead-tcpa",
|
|
193
|
-
"definitionVersion": "1",
|
|
194
|
-
"required": false
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"definitionId": "lead-sms",
|
|
198
|
-
"definitionVersion": "1",
|
|
199
|
-
"required": false
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"definitionId": "lead-tospp",
|
|
203
|
-
"definitionVersion": "1",
|
|
204
|
-
"required": false
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"editor": {
|
|
208
|
-
"label": "Main Investors Kit",
|
|
209
|
-
"description": "Standard lead form: name, email, phone, plus optional TCPA, marketing SMS, and terms/privacy checkboxes. Use on full-width landing pages and PWA kit/sidebar placements.",
|
|
210
|
-
"whenToUse": "Default kit request with optional consent checkboxes. Do not use for affiliate landers or IRA-specific leads.",
|
|
211
|
-
"whenNotToUse": "Affiliate pages (separate definition). IRA kit (separate definition when added). Clickwrap-only kit (`main-investors-kit-notice`).",
|
|
212
|
-
"supportedAppearances": ["on-light", "on-dark"],
|
|
213
|
-
"supportedVariants": ["dense", "large", "sidebar", "two-column"]
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
"main-investors-kit-notice": {
|
|
217
|
-
"definitionVersion": "1",
|
|
218
|
-
"kind": "lead",
|
|
219
|
-
"flow": { "type": "single" },
|
|
220
|
-
"supportedHosts": ["pwa", "wordpress"],
|
|
221
|
-
"fields": [
|
|
222
|
-
{ "name": "firstname", "required": true, "group": "name" },
|
|
223
|
-
{ "name": "lastname", "required": true, "group": "name" },
|
|
224
|
-
{ "name": "email", "required": true },
|
|
225
|
-
{ "name": "phone", "required": false }
|
|
226
|
-
],
|
|
227
|
-
"trackingFields": [
|
|
228
|
-
"page_url",
|
|
229
|
-
"page_title",
|
|
230
|
-
"referrer",
|
|
231
|
-
"first_touch_url",
|
|
232
|
-
"utm_source",
|
|
233
|
-
"utm_medium",
|
|
234
|
-
"utm_campaign",
|
|
235
|
-
"utm_term",
|
|
236
|
-
"utm_content",
|
|
237
|
-
"gclid",
|
|
238
|
-
"msclkid",
|
|
239
|
-
"gbraid",
|
|
240
|
-
"wbraid",
|
|
241
|
-
"hubspot_utk",
|
|
242
|
-
"ga_client_id",
|
|
243
|
-
"ga_session_id",
|
|
244
|
-
"snowplow_id",
|
|
245
|
-
"vwo_uuid",
|
|
246
|
-
"user_agent",
|
|
247
|
-
"ip_address"
|
|
248
|
-
],
|
|
249
|
-
"ctaLabel": "GET MY FREE GUIDE",
|
|
250
|
-
"consents": [
|
|
251
|
-
{ "definitionId": "lead-clickwrap", "definitionVersion": "1" }
|
|
252
|
-
],
|
|
253
|
-
"editor": {
|
|
254
|
-
"label": "Main Investors Kit (clickwrap)",
|
|
255
|
-
"description": "Same fields as Main Investors Kit with a clickwrap notice only — no consent checkboxes.",
|
|
256
|
-
"whenToUse": "Kit request where submit acknowledges legal docs via notice copy instead of checkboxes.",
|
|
257
|
-
"whenNotToUse": "Placements that need TCPA / marketing SMS / terms checkboxes (`main-investors-kit`).",
|
|
258
|
-
"supportedAppearances": ["on-light", "on-dark"],
|
|
259
|
-
"supportedVariants": ["dense", "large", "sidebar", "two-column"]
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
"newsletter": {
|
|
263
|
-
"definitionVersion": "1",
|
|
264
|
-
"kind": "newsletter",
|
|
265
|
-
"flow": { "type": "single" },
|
|
266
|
-
"supportedHosts": ["pwa"],
|
|
267
|
-
"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
|
-
"ctaLabel": "SUBSCRIBE",
|
|
279
|
-
"editor": {
|
|
280
|
-
"label": "Newsletter",
|
|
281
|
-
"description": "Email-only newsletter signup. No TCPA consent.",
|
|
282
|
-
"whenToUse": "Footer or landing newsletter capture where only an email is required.",
|
|
283
|
-
"whenNotToUse": "Lead kits that need name, phone, or TCPA consent.",
|
|
284
|
-
"supportedAppearances": ["on-light", "on-dark"],
|
|
285
|
-
"supportedVariants": []
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"hostAdapterContract": {
|
|
290
|
-
"hosts": ["pwa", "wordpress"],
|
|
291
|
-
"mayProvide": [
|
|
292
|
-
"browser cookies",
|
|
293
|
-
"URL parameters",
|
|
294
|
-
"page and placement context",
|
|
295
|
-
"host/store identity"
|
|
296
|
-
],
|
|
297
|
-
"mustNotDefine": [
|
|
298
|
-
"new tracking keys",
|
|
299
|
-
"destination property names",
|
|
300
|
-
"consent definitions",
|
|
301
|
-
"form fields",
|
|
302
|
-
"submission endpoints"
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TrackingKey, TrackingValue, HostAdapter } from './types';
|
|
2
|
-
import { TrackingRegistryEntry } from '../definitions/types';
|
|
3
|
-
export declare function collectTrackingContext(args: {
|
|
4
|
-
trackingFields: TrackingKey[];
|
|
5
|
-
trackingRegistry: Record<string, TrackingRegistryEntry>;
|
|
6
|
-
adapter: HostAdapter;
|
|
7
|
-
}): Partial<Record<TrackingKey, TrackingValue>>;
|
|
8
|
-
export declare function createIdempotencyKey(): string;
|
|
9
|
-
//# sourceMappingURL=collectContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectContext.d.ts","sourceRoot":"","sources":["../../../src/contract/collectContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAiB1C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IACzC,cAAc,EAAE,WAAW,EAAE,CAAA;IAC7B,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;IACvD,OAAO,EAAE,WAAW,CAAA;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAgD9C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAK7C"}
|