@drawbridge/components 0.1.13 → 0.1.15
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/components/styles.css +364 -2
- package/dist/advertisement.js +3 -1
- package/dist/advertisement.mjs +3 -1
- package/dist/bridge/advertisements.js +2 -0
- package/dist/bridge/advertisements.mjs +2 -0
- package/dist/bridge/countdown.js +2 -1
- package/dist/bridge/countdown.mjs +2 -1
- package/dist/bridge/form-subdomain-embed.js +18 -20
- package/dist/bridge/form-subdomain-embed.mjs +18 -20
- package/dist/bridge/form-subdomain-header.js +24 -1
- package/dist/bridge/form-subdomain-header.mjs +24 -1
- package/dist/bridge/form-subdomain-missions.js +577 -0
- package/dist/bridge/form-subdomain-missions.mjs +540 -0
- package/dist/bridge/form-subdomain.js +530 -220
- package/dist/bridge/form-subdomain.mjs +533 -222
- package/dist/bridge/lib/entry.js +59 -0
- package/dist/bridge/lib/entry.mjs +29 -0
- package/dist/bridge/lib/location.js +38 -0
- package/dist/bridge/lib/location.mjs +13 -0
- package/dist/bridge/lib/order.js +71 -0
- package/dist/bridge/lib/order.mjs +44 -0
- package/dist/bridge/lib/url.js +9 -0
- package/dist/bridge/lib/url.mjs +7 -0
- package/dist/bridge/share-button.js +5 -3
- package/dist/bridge/share-button.mjs +5 -3
- package/dist/bridge/subdomain-content.js +7 -6
- package/dist/bridge/subdomain-content.mjs +7 -6
- package/dist/bridge/template-layout.js +59 -21
- package/dist/bridge/template-layout.mjs +59 -21
- package/dist/bridge/template-modal.js +42 -76
- package/dist/bridge/template-modal.mjs +39 -73
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +6 -2
- package/dist/bridge/template-subdomain-gallery.mjs +6 -2
- package/dist/bridge/template-subdomain-link.js +6 -1
- package/dist/bridge/template-subdomain-link.mjs +6 -1
- package/dist/bridge/template-subdomain.js +20 -15
- package/dist/bridge/template-subdomain.mjs +20 -15
- package/dist/dashboard/accordion.js +74 -39
- package/dist/dashboard/accordion.mjs +74 -39
- package/dist/dashboard/avatar.js +109 -3
- package/dist/dashboard/avatar.mjs +106 -4
- package/dist/dashboard/buttons-subscription.js +384 -0
- package/dist/dashboard/buttons-subscription.mjs +349 -0
- package/dist/dashboard/card-campaign-switch.js +277 -0
- package/dist/dashboard/card-campaign-switch.mjs +243 -0
- package/dist/dashboard/card-order.js +231 -29
- package/dist/dashboard/card-order.mjs +231 -29
- package/dist/dashboard/card-section.js +26 -2
- package/dist/dashboard/card-section.mjs +26 -2
- package/dist/dashboard/card-tile.js +6 -7
- package/dist/dashboard/card-tile.mjs +6 -7
- package/dist/dashboard/connection-workflows.js +205 -0
- package/dist/dashboard/connection-workflows.mjs +171 -0
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/form-admin-campaign.js +19 -50
- package/dist/dashboard/form-admin-campaign.mjs +20 -51
- package/dist/dashboard/form-ai.js +9 -6
- package/dist/dashboard/form-ai.mjs +9 -6
- package/dist/dashboard/form-auth.js +35 -25
- package/dist/dashboard/form-auth.mjs +36 -26
- package/dist/dashboard/form-file.js +10 -1
- package/dist/dashboard/form-file.mjs +10 -1
- package/dist/dashboard/form-filters-analytics.js +14 -1
- package/dist/dashboard/form-filters-analytics.mjs +15 -2
- package/dist/dashboard/form-organization-campaign-advertisement.js +15 -1
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +16 -2
- package/dist/dashboard/form-organization-campaign-agreement.js +215 -164
- package/dist/dashboard/form-organization-campaign-agreement.mjs +215 -164
- package/dist/dashboard/form-organization-campaign-field-email.js +0 -34
- package/dist/dashboard/form-organization-campaign-field-email.mjs +0 -34
- package/dist/dashboard/form-organization-campaign-field-list.js +466 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +437 -0
- package/dist/dashboard/form-organization-campaign-field-phone.js +0 -34
- package/dist/dashboard/form-organization-campaign-field-phone.mjs +0 -34
- package/dist/dashboard/form-organization-campaign-field-remove.js +66 -0
- package/dist/dashboard/form-organization-campaign-field-remove.mjs +33 -0
- package/dist/dashboard/form-organization-campaign-field-select.js +51 -5
- package/dist/dashboard/form-organization-campaign-field-select.mjs +51 -5
- package/dist/dashboard/form-organization-campaign-field-textarea.js +46 -8
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +46 -8
- package/dist/dashboard/form-organization-campaign-integration-age.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-integration-enable.js +52 -24
- package/dist/dashboard/form-organization-campaign-integration-enable.mjs +54 -26
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-integration-gtm.js +6 -12
- package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +6 -12
- package/dist/dashboard/form-organization-campaign-link.js +7 -1
- package/dist/dashboard/form-organization-campaign-link.mjs +7 -1
- package/dist/dashboard/form-organization-campaign-mission.js +291 -0
- package/dist/dashboard/form-organization-campaign-mission.mjs +258 -0
- package/dist/dashboard/form-organization-campaign-page-embed.js +13 -2
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +12 -1
- package/dist/dashboard/form-organization-campaign-page.js +20 -11
- package/dist/dashboard/form-organization-campaign-page.mjs +20 -11
- package/dist/dashboard/form-organization-campaign-prize-edit.js +12 -1
- package/dist/dashboard/form-organization-campaign-prize-edit.mjs +12 -1
- package/dist/dashboard/form-organization-campaign-section.js +243 -0
- package/dist/dashboard/form-organization-campaign-section.mjs +214 -0
- package/dist/dashboard/form-organization-campaign.js +114 -469
- package/dist/dashboard/form-organization-campaign.mjs +113 -467
- package/dist/dashboard/form-organization-export.js +4 -7
- package/dist/dashboard/form-organization-export.mjs +4 -7
- package/dist/dashboard/form-organization-identity.js +46 -51
- package/dist/dashboard/form-organization-identity.mjs +46 -51
- package/dist/dashboard/form-organization-workflow.js +708 -687
- package/dist/dashboard/form-organization-workflow.mjs +704 -683
- package/dist/dashboard/form-organization.js +82 -110
- package/dist/dashboard/form-organization.mjs +81 -109
- package/dist/dashboard/form-otc.js +4 -5
- package/dist/dashboard/form-otc.mjs +4 -5
- package/dist/dashboard/form-payment-methods.js +20 -9
- package/dist/dashboard/form-payment-methods.mjs +20 -9
- package/dist/dashboard/form-stripe.js +30 -0
- package/dist/dashboard/form-stripe.mjs +26 -0
- package/dist/dashboard/input-array.js +4 -2
- package/dist/dashboard/input-array.mjs +4 -2
- package/dist/dashboard/input-combobox.js +7 -3
- package/dist/dashboard/input-combobox.mjs +7 -3
- package/dist/dashboard/input-date.js +7 -0
- package/dist/dashboard/input-date.mjs +7 -0
- package/dist/dashboard/input-fields.js +80 -20
- package/dist/dashboard/input-fields.mjs +80 -20
- package/dist/dashboard/input-file.js +21 -1
- package/dist/dashboard/input-file.mjs +21 -1
- package/dist/dashboard/input-font.js +10 -1
- package/dist/dashboard/input-font.mjs +10 -1
- package/dist/dashboard/lib/item-list.js +57 -0
- package/dist/dashboard/lib/item-list.mjs +33 -0
- package/dist/dashboard/lib/menu.js +50 -0
- package/dist/dashboard/lib/menu.mjs +26 -0
- package/dist/dashboard/locked.js +82 -0
- package/dist/dashboard/locked.mjs +53 -0
- package/dist/dashboard/menu.js +72 -19
- package/dist/dashboard/menu.mjs +72 -19
- package/dist/dashboard/note-ai.js +69 -0
- package/dist/dashboard/note-ai.mjs +36 -0
- package/dist/dashboard/preview.js +419 -0
- package/dist/dashboard/preview.mjs +384 -0
- package/dist/dashboard/steps.js +39 -13
- package/dist/dashboard/steps.mjs +37 -12
- package/dist/dashboard/table-contacts.js +136 -0
- package/dist/dashboard/table-contacts.mjs +103 -0
- package/dist/dashboard/template-not-found.js +4 -2
- package/dist/dashboard/template-not-found.mjs +4 -2
- package/dist/dashboard/template-socket.js +20 -7
- package/dist/dashboard/template-socket.mjs +20 -7
- package/dist/icons/desktop.js +46 -0
- package/dist/icons/desktop.mjs +27 -0
- package/dist/icons/phone.js +46 -0
- package/dist/icons/phone.mjs +27 -0
- package/dist/icons/puzzle-piece.js +46 -0
- package/dist/icons/puzzle-piece.mjs +27 -0
- package/dist/icons/tablet.js +46 -0
- package/dist/icons/tablet.mjs +27 -0
- package/dist/icons/users.js +46 -0
- package/dist/icons/users.mjs +27 -0
- package/dist/input-checkbox.js +1 -0
- package/dist/input-checkbox.mjs +1 -0
- package/dist/input-code.js +83 -0
- package/dist/input-code.mjs +50 -0
- package/dist/input-text.js +2 -1
- package/dist/input-text.mjs +2 -1
- package/dist/shared/button.js +1 -1
- package/dist/shared/button.mjs +1 -1
- package/dist/shared/input-checkbox-list.js +0 -1
- package/dist/shared/input-checkbox-list.mjs +0 -1
- package/dist/shared/input-switch.js +6 -1
- package/dist/shared/input-switch.mjs +6 -1
- package/dist/shared/lib/campaign.js +123 -0
- package/dist/shared/lib/campaign.mjs +96 -0
- package/dist/shared/lib/helpers.js +14 -2
- package/dist/shared/lib/helpers.mjs +13 -2
- package/package.json +133 -13
- package/types/bridge/form-subdomain-header.d.ts +2 -0
- package/types/bridge/form-subdomain-missions.d.ts +38 -0
- package/types/bridge/form-subdomain.d.ts +23 -1
- package/types/bridge/lib/entry.d.ts +26 -0
- package/types/bridge/lib/location.d.ts +13 -0
- package/types/bridge/lib/order.d.ts +30 -0
- package/types/bridge/lib/url.d.ts +19 -0
- package/types/bridge/template-modal.d.ts +1 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-link.d.ts +2 -0
- package/types/dashboard/accordion.d.ts +2 -0
- package/types/dashboard/avatar.d.ts +18 -2
- package/types/dashboard/buttons-subscription.d.ts +22 -0
- package/types/dashboard/card-campaign-switch.d.ts +32 -0
- package/types/dashboard/card-order.d.ts +25 -1
- package/types/dashboard/card-section.d.ts +2 -0
- package/types/dashboard/connection-workflows.d.ts +33 -0
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/form-admin-campaign.d.ts +3 -2
- package/types/dashboard/form-ai.d.ts +2 -2
- package/types/dashboard/form-organization-campaign-agreement.d.ts +18 -12
- package/types/dashboard/form-organization-campaign-field-email.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-phone.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-field-remove.d.ts +22 -0
- package/types/dashboard/form-organization-campaign-field-select.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +3 -3
- package/types/dashboard/form-organization-campaign-integration-enable.d.ts +3 -3
- package/types/dashboard/form-organization-campaign-mission.d.ts +40 -0
- package/types/dashboard/form-organization-campaign-section.d.ts +29 -0
- package/types/dashboard/form-organization-campaign.d.ts +27 -17
- package/types/dashboard/form-organization-identity.d.ts +2 -0
- package/types/dashboard/form-organization-workflow.d.ts +56 -47
- package/types/dashboard/form-organization.d.ts +7 -2
- package/types/dashboard/form-stripe.d.ts +3 -0
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-fields.d.ts +3 -2
- package/types/dashboard/input-file.d.ts +4 -0
- package/types/dashboard/lib/item-list.d.ts +14 -0
- package/types/dashboard/lib/menu.d.ts +17 -0
- package/types/dashboard/locked.d.ts +10 -0
- package/types/dashboard/menu.d.ts +10 -2
- package/types/dashboard/note-ai.d.ts +15 -0
- package/types/dashboard/preview.d.ts +33 -0
- package/types/dashboard/steps.d.ts +19 -4
- package/types/dashboard/table-cell-title.d.ts +2 -2
- package/types/dashboard/table-contacts.d.ts +2 -0
- package/types/icons/desktop.d.ts +5 -0
- package/types/icons/phone.d.ts +5 -0
- package/types/icons/puzzle-piece.d.ts +5 -0
- package/types/icons/tablet.d.ts +5 -0
- package/types/icons/users.d.ts +5 -0
- package/types/input-code.d.ts +23 -0
- package/types/shared/input-switch.d.ts +2 -0
- package/types/shared/lib/campaign.d.ts +35 -0
- package/types/shared/lib/helpers.d.ts +3 -0
- package/dist/dashboard/card-integration.js +0 -187
- package/dist/dashboard/card-integration.mjs +0 -158
- package/dist/dashboard/iframe.js +0 -159
- package/dist/dashboard/iframe.mjs +0 -130
- package/types/dashboard/card-integration.d.ts +0 -24
- package/types/dashboard/iframe.d.ts +0 -18
|
@@ -46,6 +46,7 @@ __export(helpers_exports, {
|
|
|
46
46
|
hasConnection: () => hasConnection,
|
|
47
47
|
hasConnectionGroup: () => hasConnectionGroup,
|
|
48
48
|
hasRestriction: () => hasRestriction,
|
|
49
|
+
imageAlt: () => imageAlt,
|
|
49
50
|
isAdmin: () => isAdmin,
|
|
50
51
|
months: () => months,
|
|
51
52
|
organizationAlerts: () => organizationAlerts,
|
|
@@ -68,6 +69,7 @@ const advertisementPreview = (values, options) => {
|
|
|
68
69
|
button: ((_a = (options || []).find((option) => option.value === (values == null ? void 0 : values.action))) == null ? void 0 : _a.key) ?? null
|
|
69
70
|
};
|
|
70
71
|
};
|
|
72
|
+
const imageAlt = (file, description) => typeof description === "string" && description.trim() || (file == null ? void 0 : file.filename) || "";
|
|
71
73
|
const bust = (href, version) => href ? href + (href.includes("?") ? "&" : "?") + "query=" + encodeURIComponent(version) : null;
|
|
72
74
|
const clickSummary = (click) => {
|
|
73
75
|
const parts = Object.entries(click || {}).map(([key, value]) => key + ": " + value);
|
|
@@ -295,7 +297,6 @@ const running = {
|
|
|
295
297
|
const organizationStatuses = ["active", "canceled", "incomplete", "incomplete_expired", "locked", "past_due", "paused", "suspended", "trialing", "unpaid", "unsubscribed"];
|
|
296
298
|
const statuses = {
|
|
297
299
|
advertisement: published,
|
|
298
|
-
campaign: published,
|
|
299
300
|
connection: running,
|
|
300
301
|
draw: {
|
|
301
302
|
disqualified: { text: "Disqualified", type: "error" },
|
|
@@ -331,7 +332,17 @@ const statuses = {
|
|
|
331
332
|
canceled: { text: "Canceled", type: "error" },
|
|
332
333
|
suspended: { text: "Suspended", type: "error" }
|
|
333
334
|
},
|
|
334
|
-
|
|
335
|
+
// @story workflows/list
|
|
336
|
+
// Active in green or Inactive in yellow ( Darren, 2026-11-01 ): paused, a
|
|
337
|
+
// chain with no steps yet ( off ) and one waiting on its connection all run
|
|
338
|
+
// nothing. A broken chain keeps its red Error.
|
|
339
|
+
workflow: {
|
|
340
|
+
active: running.active,
|
|
341
|
+
error: running.error,
|
|
342
|
+
off: { text: "Inactive", type: "warning" },
|
|
343
|
+
paused: { text: "Inactive", type: "warning" },
|
|
344
|
+
pending: { text: "Inactive", type: "warning" }
|
|
345
|
+
}
|
|
335
346
|
};
|
|
336
347
|
const statusBadge = (kind, status) => {
|
|
337
348
|
var _a;
|
|
@@ -396,6 +407,7 @@ const years = ({
|
|
|
396
407
|
hasConnection,
|
|
397
408
|
hasConnectionGroup,
|
|
398
409
|
hasRestriction,
|
|
410
|
+
imageAlt,
|
|
399
411
|
isAdmin,
|
|
400
412
|
months,
|
|
401
413
|
organizationAlerts,
|
|
@@ -9,6 +9,7 @@ const advertisementPreview = (values, options) => {
|
|
|
9
9
|
button: ((_a = (options || []).find((option) => option.value === (values == null ? void 0 : values.action))) == null ? void 0 : _a.key) ?? null
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
const imageAlt = (file, description) => typeof description === "string" && description.trim() || (file == null ? void 0 : file.filename) || "";
|
|
12
13
|
const bust = (href, version) => href ? href + (href.includes("?") ? "&" : "?") + "query=" + encodeURIComponent(version) : null;
|
|
13
14
|
const clickSummary = (click) => {
|
|
14
15
|
const parts = Object.entries(click || {}).map(([key, value]) => key + ": " + value);
|
|
@@ -236,7 +237,6 @@ const running = {
|
|
|
236
237
|
const organizationStatuses = ["active", "canceled", "incomplete", "incomplete_expired", "locked", "past_due", "paused", "suspended", "trialing", "unpaid", "unsubscribed"];
|
|
237
238
|
const statuses = {
|
|
238
239
|
advertisement: published,
|
|
239
|
-
campaign: published,
|
|
240
240
|
connection: running,
|
|
241
241
|
draw: {
|
|
242
242
|
disqualified: { text: "Disqualified", type: "error" },
|
|
@@ -272,7 +272,17 @@ const statuses = {
|
|
|
272
272
|
canceled: { text: "Canceled", type: "error" },
|
|
273
273
|
suspended: { text: "Suspended", type: "error" }
|
|
274
274
|
},
|
|
275
|
-
|
|
275
|
+
// @story workflows/list
|
|
276
|
+
// Active in green or Inactive in yellow ( Darren, 2026-11-01 ): paused, a
|
|
277
|
+
// chain with no steps yet ( off ) and one waiting on its connection all run
|
|
278
|
+
// nothing. A broken chain keeps its red Error.
|
|
279
|
+
workflow: {
|
|
280
|
+
active: running.active,
|
|
281
|
+
error: running.error,
|
|
282
|
+
off: { text: "Inactive", type: "warning" },
|
|
283
|
+
paused: { text: "Inactive", type: "warning" },
|
|
284
|
+
pending: { text: "Inactive", type: "warning" }
|
|
285
|
+
}
|
|
276
286
|
};
|
|
277
287
|
const statusBadge = (kind, status) => {
|
|
278
288
|
var _a;
|
|
@@ -336,6 +346,7 @@ export {
|
|
|
336
346
|
hasConnection,
|
|
337
347
|
hasConnectionGroup,
|
|
338
348
|
hasRestriction,
|
|
349
|
+
imageAlt,
|
|
339
350
|
isAdmin,
|
|
340
351
|
months,
|
|
341
352
|
organizationAlerts,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drawbridge/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./advertisement": {
|
|
6
6
|
"types": "./types/advertisement.d.ts",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"import": "./dist/bridge/form-subdomain-issue.mjs",
|
|
38
38
|
"default": "./dist/bridge/form-subdomain-issue.js"
|
|
39
39
|
},
|
|
40
|
+
"./bridge/form-subdomain-missions": {
|
|
41
|
+
"types": "./types/bridge/form-subdomain-missions.d.ts",
|
|
42
|
+
"import": "./dist/bridge/form-subdomain-missions.mjs",
|
|
43
|
+
"default": "./dist/bridge/form-subdomain-missions.js"
|
|
44
|
+
},
|
|
40
45
|
"./bridge/form-subdomain-prize": {
|
|
41
46
|
"types": "./types/bridge/form-subdomain-prize.d.ts",
|
|
42
47
|
"import": "./dist/bridge/form-subdomain-prize.mjs",
|
|
@@ -77,6 +82,21 @@
|
|
|
77
82
|
"import": "./dist/bridge/lib/css.mjs",
|
|
78
83
|
"default": "./dist/bridge/lib/css.js"
|
|
79
84
|
},
|
|
85
|
+
"./bridge/lib/entry": {
|
|
86
|
+
"types": "./types/bridge/lib/entry.d.ts",
|
|
87
|
+
"import": "./dist/bridge/lib/entry.mjs",
|
|
88
|
+
"default": "./dist/bridge/lib/entry.js"
|
|
89
|
+
},
|
|
90
|
+
"./bridge/lib/location": {
|
|
91
|
+
"types": "./types/bridge/lib/location.d.ts",
|
|
92
|
+
"import": "./dist/bridge/lib/location.mjs",
|
|
93
|
+
"default": "./dist/bridge/lib/location.js"
|
|
94
|
+
},
|
|
95
|
+
"./bridge/lib/order": {
|
|
96
|
+
"types": "./types/bridge/lib/order.d.ts",
|
|
97
|
+
"import": "./dist/bridge/lib/order.mjs",
|
|
98
|
+
"default": "./dist/bridge/lib/order.js"
|
|
99
|
+
},
|
|
80
100
|
"./bridge/lib/recaptcha": {
|
|
81
101
|
"types": "./types/bridge/lib/recaptcha.d.ts",
|
|
82
102
|
"import": "./dist/bridge/lib/recaptcha.mjs",
|
|
@@ -127,6 +147,11 @@
|
|
|
127
147
|
"import": "./dist/bridge/template-not-found.mjs",
|
|
128
148
|
"default": "./dist/bridge/template-not-found.js"
|
|
129
149
|
},
|
|
150
|
+
"./bridge/template-preview": {
|
|
151
|
+
"types": "./types/bridge/template-preview.d.ts",
|
|
152
|
+
"import": "./dist/bridge/template-preview.mjs",
|
|
153
|
+
"default": "./dist/bridge/template-preview.js"
|
|
154
|
+
},
|
|
130
155
|
"./bridge/template-subdomain-gallery": {
|
|
131
156
|
"types": "./types/bridge/template-subdomain-gallery.d.ts",
|
|
132
157
|
"import": "./dist/bridge/template-subdomain-gallery.mjs",
|
|
@@ -152,11 +177,21 @@
|
|
|
152
177
|
"import": "./dist/dashboard/avatar.mjs",
|
|
153
178
|
"default": "./dist/dashboard/avatar.js"
|
|
154
179
|
},
|
|
180
|
+
"./dashboard/buttons-subscription": {
|
|
181
|
+
"types": "./types/dashboard/buttons-subscription.d.ts",
|
|
182
|
+
"import": "./dist/dashboard/buttons-subscription.mjs",
|
|
183
|
+
"default": "./dist/dashboard/buttons-subscription.js"
|
|
184
|
+
},
|
|
155
185
|
"./dashboard/card-affiliate": {
|
|
156
186
|
"types": "./types/dashboard/card-affiliate.d.ts",
|
|
157
187
|
"import": "./dist/dashboard/card-affiliate.mjs",
|
|
158
188
|
"default": "./dist/dashboard/card-affiliate.js"
|
|
159
189
|
},
|
|
190
|
+
"./dashboard/card-campaign-switch": {
|
|
191
|
+
"types": "./types/dashboard/card-campaign-switch.d.ts",
|
|
192
|
+
"import": "./dist/dashboard/card-campaign-switch.mjs",
|
|
193
|
+
"default": "./dist/dashboard/card-campaign-switch.js"
|
|
194
|
+
},
|
|
160
195
|
"./dashboard/card-connection": {
|
|
161
196
|
"types": "./types/dashboard/card-connection.d.ts",
|
|
162
197
|
"import": "./dist/dashboard/card-connection.mjs",
|
|
@@ -167,11 +202,6 @@
|
|
|
167
202
|
"import": "./dist/dashboard/card-data-item.mjs",
|
|
168
203
|
"default": "./dist/dashboard/card-data-item.js"
|
|
169
204
|
},
|
|
170
|
-
"./dashboard/card-integration": {
|
|
171
|
-
"types": "./types/dashboard/card-integration.d.ts",
|
|
172
|
-
"import": "./dist/dashboard/card-integration.mjs",
|
|
173
|
-
"default": "./dist/dashboard/card-integration.js"
|
|
174
|
-
},
|
|
175
205
|
"./dashboard/card-metric": {
|
|
176
206
|
"types": "./types/dashboard/card-metric.d.ts",
|
|
177
207
|
"import": "./dist/dashboard/card-metric.mjs",
|
|
@@ -252,6 +282,16 @@
|
|
|
252
282
|
"import": "./dist/dashboard/code-formatter.mjs",
|
|
253
283
|
"default": "./dist/dashboard/code-formatter.js"
|
|
254
284
|
},
|
|
285
|
+
"./dashboard/connection-workflows": {
|
|
286
|
+
"types": "./types/dashboard/connection-workflows.d.ts",
|
|
287
|
+
"import": "./dist/dashboard/connection-workflows.mjs",
|
|
288
|
+
"default": "./dist/dashboard/connection-workflows.js"
|
|
289
|
+
},
|
|
290
|
+
"./dashboard/device": {
|
|
291
|
+
"types": "./types/dashboard/device.d.ts",
|
|
292
|
+
"import": "./dist/dashboard/device.mjs",
|
|
293
|
+
"default": "./dist/dashboard/device.js"
|
|
294
|
+
},
|
|
255
295
|
"./dashboard/drawer-subscription": {
|
|
256
296
|
"types": "./types/dashboard/drawer-subscription.d.ts",
|
|
257
297
|
"import": "./dist/dashboard/drawer-subscription.mjs",
|
|
@@ -412,6 +452,11 @@
|
|
|
412
452
|
"import": "./dist/dashboard/form-organization-campaign-field-email.mjs",
|
|
413
453
|
"default": "./dist/dashboard/form-organization-campaign-field-email.js"
|
|
414
454
|
},
|
|
455
|
+
"./dashboard/form-organization-campaign-field-list": {
|
|
456
|
+
"types": "./types/dashboard/form-organization-campaign-field-list.d.ts",
|
|
457
|
+
"import": "./dist/dashboard/form-organization-campaign-field-list.mjs",
|
|
458
|
+
"default": "./dist/dashboard/form-organization-campaign-field-list.js"
|
|
459
|
+
},
|
|
415
460
|
"./dashboard/form-organization-campaign-field-name": {
|
|
416
461
|
"types": "./types/dashboard/form-organization-campaign-field-name.d.ts",
|
|
417
462
|
"import": "./dist/dashboard/form-organization-campaign-field-name.mjs",
|
|
@@ -427,6 +472,11 @@
|
|
|
427
472
|
"import": "./dist/dashboard/form-organization-campaign-field-phone.mjs",
|
|
428
473
|
"default": "./dist/dashboard/form-organization-campaign-field-phone.js"
|
|
429
474
|
},
|
|
475
|
+
"./dashboard/form-organization-campaign-field-remove": {
|
|
476
|
+
"types": "./types/dashboard/form-organization-campaign-field-remove.d.ts",
|
|
477
|
+
"import": "./dist/dashboard/form-organization-campaign-field-remove.mjs",
|
|
478
|
+
"default": "./dist/dashboard/form-organization-campaign-field-remove.js"
|
|
479
|
+
},
|
|
430
480
|
"./dashboard/form-organization-campaign-field-select": {
|
|
431
481
|
"types": "./types/dashboard/form-organization-campaign-field-select.d.ts",
|
|
432
482
|
"import": "./dist/dashboard/form-organization-campaign-field-select.mjs",
|
|
@@ -472,6 +522,11 @@
|
|
|
472
522
|
"import": "./dist/dashboard/form-organization-campaign-link.mjs",
|
|
473
523
|
"default": "./dist/dashboard/form-organization-campaign-link.js"
|
|
474
524
|
},
|
|
525
|
+
"./dashboard/form-organization-campaign-mission": {
|
|
526
|
+
"types": "./types/dashboard/form-organization-campaign-mission.d.ts",
|
|
527
|
+
"import": "./dist/dashboard/form-organization-campaign-mission.mjs",
|
|
528
|
+
"default": "./dist/dashboard/form-organization-campaign-mission.js"
|
|
529
|
+
},
|
|
475
530
|
"./dashboard/form-organization-campaign-page-affiliates": {
|
|
476
531
|
"types": "./types/dashboard/form-organization-campaign-page-affiliates.d.ts",
|
|
477
532
|
"import": "./dist/dashboard/form-organization-campaign-page-affiliates.mjs",
|
|
@@ -522,6 +577,11 @@
|
|
|
522
577
|
"import": "./dist/dashboard/form-organization-campaign-range.mjs",
|
|
523
578
|
"default": "./dist/dashboard/form-organization-campaign-range.js"
|
|
524
579
|
},
|
|
580
|
+
"./dashboard/form-organization-campaign-section": {
|
|
581
|
+
"types": "./types/dashboard/form-organization-campaign-section.d.ts",
|
|
582
|
+
"import": "./dist/dashboard/form-organization-campaign-section.mjs",
|
|
583
|
+
"default": "./dist/dashboard/form-organization-campaign-section.js"
|
|
584
|
+
},
|
|
525
585
|
"./dashboard/form-organization-campaign": {
|
|
526
586
|
"types": "./types/dashboard/form-organization-campaign.d.ts",
|
|
527
587
|
"import": "./dist/dashboard/form-organization-campaign.mjs",
|
|
@@ -617,11 +677,6 @@
|
|
|
617
677
|
"import": "./dist/dashboard/guide.mjs",
|
|
618
678
|
"default": "./dist/dashboard/guide.js"
|
|
619
679
|
},
|
|
620
|
-
"./dashboard/iframe": {
|
|
621
|
-
"types": "./types/dashboard/iframe.d.ts",
|
|
622
|
-
"import": "./dist/dashboard/iframe.mjs",
|
|
623
|
-
"default": "./dist/dashboard/iframe.js"
|
|
624
|
-
},
|
|
625
680
|
"./dashboard/input-address-saved": {
|
|
626
681
|
"types": "./types/dashboard/input-address-saved.d.ts",
|
|
627
682
|
"import": "./dist/dashboard/input-address-saved.mjs",
|
|
@@ -722,6 +777,16 @@
|
|
|
722
777
|
"import": "./dist/dashboard/lib/hooks.mjs",
|
|
723
778
|
"default": "./dist/dashboard/lib/hooks.js"
|
|
724
779
|
},
|
|
780
|
+
"./dashboard/lib/item-list": {
|
|
781
|
+
"types": "./types/dashboard/lib/item-list.d.ts",
|
|
782
|
+
"import": "./dist/dashboard/lib/item-list.mjs",
|
|
783
|
+
"default": "./dist/dashboard/lib/item-list.js"
|
|
784
|
+
},
|
|
785
|
+
"./dashboard/lib/menu": {
|
|
786
|
+
"types": "./types/dashboard/lib/menu.d.ts",
|
|
787
|
+
"import": "./dist/dashboard/lib/menu.mjs",
|
|
788
|
+
"default": "./dist/dashboard/lib/menu.js"
|
|
789
|
+
},
|
|
725
790
|
"./dashboard/lib/navigation": {
|
|
726
791
|
"types": "./types/dashboard/lib/navigation.d.ts",
|
|
727
792
|
"import": "./dist/dashboard/lib/navigation.mjs",
|
|
@@ -787,6 +852,11 @@
|
|
|
787
852
|
"import": "./dist/dashboard/list.mjs",
|
|
788
853
|
"default": "./dist/dashboard/list.js"
|
|
789
854
|
},
|
|
855
|
+
"./dashboard/locked": {
|
|
856
|
+
"types": "./types/dashboard/locked.d.ts",
|
|
857
|
+
"import": "./dist/dashboard/locked.mjs",
|
|
858
|
+
"default": "./dist/dashboard/locked.js"
|
|
859
|
+
},
|
|
790
860
|
"./dashboard/menu": {
|
|
791
861
|
"types": "./types/dashboard/menu.d.ts",
|
|
792
862
|
"import": "./dist/dashboard/menu.mjs",
|
|
@@ -797,6 +867,11 @@
|
|
|
797
867
|
"import": "./dist/dashboard/modal.mjs",
|
|
798
868
|
"default": "./dist/dashboard/modal.js"
|
|
799
869
|
},
|
|
870
|
+
"./dashboard/note-ai": {
|
|
871
|
+
"types": "./types/dashboard/note-ai.d.ts",
|
|
872
|
+
"import": "./dist/dashboard/note-ai.mjs",
|
|
873
|
+
"default": "./dist/dashboard/note-ai.js"
|
|
874
|
+
},
|
|
800
875
|
"./dashboard/notes": {
|
|
801
876
|
"types": "./types/dashboard/notes.d.ts",
|
|
802
877
|
"import": "./dist/dashboard/notes.mjs",
|
|
@@ -812,6 +887,11 @@
|
|
|
812
887
|
"import": "./dist/dashboard/paged.mjs",
|
|
813
888
|
"default": "./dist/dashboard/paged.js"
|
|
814
889
|
},
|
|
890
|
+
"./dashboard/preview": {
|
|
891
|
+
"types": "./types/dashboard/preview.d.ts",
|
|
892
|
+
"import": "./dist/dashboard/preview.mjs",
|
|
893
|
+
"default": "./dist/dashboard/preview.js"
|
|
894
|
+
},
|
|
815
895
|
"./dashboard/provider-resource": {
|
|
816
896
|
"types": "./types/dashboard/provider-resource.d.ts",
|
|
817
897
|
"import": "./dist/dashboard/provider-resource.mjs",
|
|
@@ -847,6 +927,11 @@
|
|
|
847
927
|
"import": "./dist/dashboard/table-cell-title.mjs",
|
|
848
928
|
"default": "./dist/dashboard/table-cell-title.js"
|
|
849
929
|
},
|
|
930
|
+
"./dashboard/table-contacts": {
|
|
931
|
+
"types": "./types/dashboard/table-contacts.d.ts",
|
|
932
|
+
"import": "./dist/dashboard/table-contacts.mjs",
|
|
933
|
+
"default": "./dist/dashboard/table-contacts.js"
|
|
934
|
+
},
|
|
850
935
|
"./dashboard/table": {
|
|
851
936
|
"types": "./types/dashboard/table.d.ts",
|
|
852
937
|
"import": "./dist/dashboard/table.mjs",
|
|
@@ -992,6 +1077,11 @@
|
|
|
992
1077
|
"import": "./dist/icons/copy.mjs",
|
|
993
1078
|
"default": "./dist/icons/copy.js"
|
|
994
1079
|
},
|
|
1080
|
+
"./icons/desktop": {
|
|
1081
|
+
"types": "./types/icons/desktop.d.ts",
|
|
1082
|
+
"import": "./dist/icons/desktop.mjs",
|
|
1083
|
+
"default": "./dist/icons/desktop.js"
|
|
1084
|
+
},
|
|
995
1085
|
"./icons/discord": {
|
|
996
1086
|
"types": "./types/icons/discord.d.ts",
|
|
997
1087
|
"import": "./dist/icons/discord.mjs",
|
|
@@ -1137,6 +1227,11 @@
|
|
|
1137
1227
|
"import": "./dist/icons/pencil.mjs",
|
|
1138
1228
|
"default": "./dist/icons/pencil.js"
|
|
1139
1229
|
},
|
|
1230
|
+
"./icons/phone": {
|
|
1231
|
+
"types": "./types/icons/phone.d.ts",
|
|
1232
|
+
"import": "./dist/icons/phone.mjs",
|
|
1233
|
+
"default": "./dist/icons/phone.js"
|
|
1234
|
+
},
|
|
1140
1235
|
"./icons/pinterest": {
|
|
1141
1236
|
"types": "./types/icons/pinterest.d.ts",
|
|
1142
1237
|
"import": "./dist/icons/pinterest.mjs",
|
|
@@ -1162,6 +1257,11 @@
|
|
|
1162
1257
|
"import": "./dist/icons/powered-by.mjs",
|
|
1163
1258
|
"default": "./dist/icons/powered-by.js"
|
|
1164
1259
|
},
|
|
1260
|
+
"./icons/puzzle-piece": {
|
|
1261
|
+
"types": "./types/icons/puzzle-piece.d.ts",
|
|
1262
|
+
"import": "./dist/icons/puzzle-piece.mjs",
|
|
1263
|
+
"default": "./dist/icons/puzzle-piece.js"
|
|
1264
|
+
},
|
|
1165
1265
|
"./icons/qr-code": {
|
|
1166
1266
|
"types": "./types/icons/qr-code.d.ts",
|
|
1167
1267
|
"import": "./dist/icons/qr-code.mjs",
|
|
@@ -1232,6 +1332,11 @@
|
|
|
1232
1332
|
"import": "./dist/icons/switch.mjs",
|
|
1233
1333
|
"default": "./dist/icons/switch.js"
|
|
1234
1334
|
},
|
|
1335
|
+
"./icons/tablet": {
|
|
1336
|
+
"types": "./types/icons/tablet.d.ts",
|
|
1337
|
+
"import": "./dist/icons/tablet.mjs",
|
|
1338
|
+
"default": "./dist/icons/tablet.js"
|
|
1339
|
+
},
|
|
1235
1340
|
"./icons/threads": {
|
|
1236
1341
|
"types": "./types/icons/threads.d.ts",
|
|
1237
1342
|
"import": "./dist/icons/threads.mjs",
|
|
@@ -1267,6 +1372,11 @@
|
|
|
1267
1372
|
"import": "./dist/icons/upload.mjs",
|
|
1268
1373
|
"default": "./dist/icons/upload.js"
|
|
1269
1374
|
},
|
|
1375
|
+
"./icons/users": {
|
|
1376
|
+
"types": "./types/icons/users.d.ts",
|
|
1377
|
+
"import": "./dist/icons/users.mjs",
|
|
1378
|
+
"default": "./dist/icons/users.js"
|
|
1379
|
+
},
|
|
1270
1380
|
"./icons/volume": {
|
|
1271
1381
|
"types": "./types/icons/volume.d.ts",
|
|
1272
1382
|
"import": "./dist/icons/volume.mjs",
|
|
@@ -1297,6 +1407,11 @@
|
|
|
1297
1407
|
"import": "./dist/input-checkbox.mjs",
|
|
1298
1408
|
"default": "./dist/input-checkbox.js"
|
|
1299
1409
|
},
|
|
1410
|
+
"./input-code": {
|
|
1411
|
+
"types": "./types/input-code.d.ts",
|
|
1412
|
+
"import": "./dist/input-code.mjs",
|
|
1413
|
+
"default": "./dist/input-code.js"
|
|
1414
|
+
},
|
|
1300
1415
|
"./input-group": {
|
|
1301
1416
|
"types": "./types/input-group.d.ts",
|
|
1302
1417
|
"import": "./dist/input-group.mjs",
|
|
@@ -1427,6 +1542,11 @@
|
|
|
1427
1542
|
"import": "./dist/shared/input-url.mjs",
|
|
1428
1543
|
"default": "./dist/shared/input-url.js"
|
|
1429
1544
|
},
|
|
1545
|
+
"./shared/lib/campaign": {
|
|
1546
|
+
"types": "./types/shared/lib/campaign.d.ts",
|
|
1547
|
+
"import": "./dist/shared/lib/campaign.mjs",
|
|
1548
|
+
"default": "./dist/shared/lib/campaign.js"
|
|
1549
|
+
},
|
|
1430
1550
|
"./shared/lib/form": {
|
|
1431
1551
|
"types": "./types/shared/lib/form.d.ts",
|
|
1432
1552
|
"import": "./dist/shared/lib/form.mjs",
|
|
@@ -1528,7 +1648,7 @@
|
|
|
1528
1648
|
"peerDependencies": {
|
|
1529
1649
|
"@analytics/google-tag-manager": ">=0.5.5",
|
|
1530
1650
|
"@drawbridge/drawbridge-telemetry": ">=0.0.19",
|
|
1531
|
-
"@drawbridge/drawbridge-utils": ">=0.0.
|
|
1651
|
+
"@drawbridge/drawbridge-utils": ">=0.0.225",
|
|
1532
1652
|
"@headlessui/react": ">=2.1.2",
|
|
1533
1653
|
"@hookform/resolvers": ">=3.1.1",
|
|
1534
1654
|
"@sentry/nextjs": ">=10.58.0",
|
|
@@ -1648,7 +1768,7 @@
|
|
|
1648
1768
|
"@analytics/google-tag-manager": "0.5.5",
|
|
1649
1769
|
"@drawbridge/drawbridge-agents": "0.1.98",
|
|
1650
1770
|
"@drawbridge/drawbridge-telemetry": "0.0.19",
|
|
1651
|
-
"@drawbridge/drawbridge-utils": "0.0.
|
|
1771
|
+
"@drawbridge/drawbridge-utils": "0.0.225",
|
|
1652
1772
|
"@headlessui/react": "2.2.9",
|
|
1653
1773
|
"@hookform/resolvers": "3.1.1",
|
|
1654
1774
|
"@sentry/nextjs": "10.58.0",
|
|
@@ -4,6 +4,8 @@ import { BrandStyle } from '../styles';
|
|
|
4
4
|
export interface FormSubdomainHeaderProps {
|
|
5
5
|
back?: { onClick?: () => void };
|
|
6
6
|
button?: ReactNode;
|
|
7
|
+
// Drawn under the title, at 60 % of the brand's text colour.
|
|
8
|
+
description?: ReactNode;
|
|
7
9
|
label?: ReactNode;
|
|
8
10
|
style?: BrandStyle;
|
|
9
11
|
title?: ReactNode;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { BrandStyle } from '../styles';
|
|
3
|
+
|
|
4
|
+
// One row of the api's missions list (drawbridge-api lib/missions.js).
|
|
5
|
+
export interface MissionItem {
|
|
6
|
+
completed?: boolean;
|
|
7
|
+
entries?: number;
|
|
8
|
+
// Verify phone, for a number that replied STOP to the organization.
|
|
9
|
+
refused?: boolean;
|
|
10
|
+
type: 'email' | 'form' | 'phone' | 'share' | string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FormSubdomainMissionsProps {
|
|
14
|
+
advertisements?: ReactNode;
|
|
15
|
+
button?: ReactNode;
|
|
16
|
+
contact?: { email?: string | null; phone?: string | null };
|
|
17
|
+
// The mission a lead link's `&mission=` opens at.
|
|
18
|
+
initial?: string | null;
|
|
19
|
+
message?: ReactNode;
|
|
20
|
+
missions?: MissionItem[];
|
|
21
|
+
shareLink?: string | null;
|
|
22
|
+
slug?: string;
|
|
23
|
+
style?: BrandStyle;
|
|
24
|
+
subdomain?: string;
|
|
25
|
+
title?: ReactNode;
|
|
26
|
+
// The lead's own token, the key of the code routes.
|
|
27
|
+
token?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare const screenFor: ( type: string ) => 'send' | 'share' | 'missions';
|
|
31
|
+
export declare const openingScreen: ( items?: MissionItem[], type?: string | null ) => 'missions' | 'send' | 'share' | 'start';
|
|
32
|
+
export declare const pillText: ( item: MissionItem, completed: boolean ) => string;
|
|
33
|
+
// Bonus entries available's pill: the open entries, "+" while Share is open; null when none.
|
|
34
|
+
export declare const bonusText: ( items?: MissionItem[], completed?: string[] ) => string | null;
|
|
35
|
+
|
|
36
|
+
export declare const FormSubdomainMissions: ComponentType<FormSubdomainMissionsProps>;
|
|
37
|
+
|
|
38
|
+
export default FormSubdomainMissions;
|
|
@@ -2,6 +2,7 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
2
2
|
import { BrandStyle } from '../styles';
|
|
3
3
|
import { Field } from './fields';
|
|
4
4
|
import { FormSubdomainHeader } from './form-subdomain-header';
|
|
5
|
+
import { FormSection } from './lib/order';
|
|
5
6
|
|
|
6
7
|
// What provider-analytics' useTracking returns; the templates hand it down.
|
|
7
8
|
export interface Tracking {
|
|
@@ -20,7 +21,11 @@ export interface FormSubdomainProps {
|
|
|
20
21
|
agreements?: { marketing?: Agreement; sms?: Agreement; terms?: Agreement };
|
|
21
22
|
button?: ReactNode;
|
|
22
23
|
disabled?: boolean;
|
|
23
|
-
|
|
24
|
+
// `sections` steps the form: Your information, then Your order. Without it,
|
|
25
|
+
// `lead` + `additional` are one Your information step, as before.
|
|
26
|
+
fields?: { additional?: Field[]; lead?: Field[]; primary?: Field; sections?: FormSection[] };
|
|
27
|
+
// A dashboard preview's agreement: the last step fades everything but it.
|
|
28
|
+
focus?: 'marketing' | 'sms' | 'terms';
|
|
24
29
|
integrations?: {
|
|
25
30
|
age?: { enabled?: boolean; settings?: { max?: number; min?: number } };
|
|
26
31
|
geocode?: { enabled?: boolean };
|
|
@@ -32,6 +37,8 @@ export interface FormSubdomainProps {
|
|
|
32
37
|
onSuccess?: ( response: any ) => void;
|
|
33
38
|
params?: { slug?: string; subdomain?: string };
|
|
34
39
|
preview?: boolean;
|
|
40
|
+
// The step the form opens at ( a dashboard preview ), 0 by default.
|
|
41
|
+
step?: number;
|
|
35
42
|
style?: BrandStyle;
|
|
36
43
|
tracking?: Tracking;
|
|
37
44
|
}
|
|
@@ -40,9 +47,24 @@ export interface FormSubdomainSubmissionProps {
|
|
|
40
47
|
affiliate?: string;
|
|
41
48
|
button?: ReactNode;
|
|
42
49
|
checkout?: ( body: any ) => Promise<unknown>;
|
|
50
|
+
// The giveaway on: the panel lists the missions while entries are being awarded; no entry total and no Copy your link.
|
|
51
|
+
giveaway?: boolean;
|
|
43
52
|
id?: string;
|
|
44
53
|
lead?: string;
|
|
45
54
|
message?: ReactNode;
|
|
55
|
+
// The submission POST's `result.panel`: the ads and missions, so the panel
|
|
56
|
+
// asks nothing more. Without it ( the ?submission= deep link ) it asks once.
|
|
57
|
+
panel?: {
|
|
58
|
+
advertisements?: unknown[];
|
|
59
|
+
affiliate?: string | null;
|
|
60
|
+
campaign?: string;
|
|
61
|
+
contact?: { email?: string | null; phone?: string | null };
|
|
62
|
+
missions?: { completed: boolean; entries: number; refused?: boolean; type: string }[];
|
|
63
|
+
organization?: string;
|
|
64
|
+
page?: string;
|
|
65
|
+
shareLink?: string | null;
|
|
66
|
+
token?: string;
|
|
67
|
+
};
|
|
46
68
|
preview?: boolean;
|
|
47
69
|
slug?: string;
|
|
48
70
|
style?: BrandStyle;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// The visitor copy for a `defaults` key of the public page payload, falling
|
|
2
|
+
// back to utils constants.campaign.form.copy (`purchase` reads `order`).
|
|
3
|
+
export declare const copy: (
|
|
4
|
+
data: { defaults?: Record<string, string | null | undefined> } | null | undefined,
|
|
5
|
+
key: 'active' | 'confirmation' | 'inactive' | 'purchase' | 'rejection'
|
|
6
|
+
) => string | undefined;
|
|
7
|
+
|
|
8
|
+
// "You have [n] entries" ("You have 1 entry").
|
|
9
|
+
export declare const entriesText: ( entries: number | null | undefined ) => string;
|
|
10
|
+
|
|
11
|
+
// The campaign's Form and Giveaway switches as the public page payload carries
|
|
12
|
+
// them. A payload without the key (an api older than Dulce) reads as on.
|
|
13
|
+
|
|
14
|
+
export declare const formOn: ( data: { form?: boolean } | null | undefined ) => boolean;
|
|
15
|
+
|
|
16
|
+
export declare const giveawayOn: ( data: { giveaway?: boolean } | null | undefined ) => boolean;
|
|
17
|
+
|
|
18
|
+
// The consent checkboxes' wording when an agreement has no label of its own.
|
|
19
|
+
export declare const agreementWording: { marketing: string; sms: string };
|
|
20
|
+
|
|
21
|
+
// The panel's title after a submission: the owner's Panel title, else
|
|
22
|
+
// "Entry submitted" while entries are being awarded and "Submitted" otherwise.
|
|
23
|
+
export declare const panelTitle: (
|
|
24
|
+
data: { awarding?: boolean; defaults?: Record<string, string | null | undefined>; giveaway?: boolean } | null | undefined,
|
|
25
|
+
awarding?: boolean
|
|
26
|
+
) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// How long the location step waits for a position, in milliseconds.
|
|
2
|
+
export declare const LOCATION_TIMEOUT: number;
|
|
3
|
+
|
|
4
|
+
// The location step's messages: asking, denied, missing (no position in time), unsupported.
|
|
5
|
+
export declare const locationCopy: {
|
|
6
|
+
asking: string;
|
|
7
|
+
denied: string;
|
|
8
|
+
missing: string;
|
|
9
|
+
unsupported: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// A GeolocationPositionError: code 1 is 'denied', anything else 'missing'.
|
|
13
|
+
export declare const locationStatus: ( error?: { code?: number } | null ) => 'denied' | 'missing';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Field } from '../fields';
|
|
2
|
+
|
|
3
|
+
// One section of the entry form, as the public payload's `fields.sections` sends it.
|
|
4
|
+
export interface FormSection {
|
|
5
|
+
description?: string | null;
|
|
6
|
+
fields?: Field[];
|
|
7
|
+
id: 'information' | 'order' | string;
|
|
8
|
+
// Order only: the organization's currency and Show prices.
|
|
9
|
+
settings?: { currency?: string; prices?: boolean };
|
|
10
|
+
title?: string;
|
|
11
|
+
type: 'information' | 'order' | string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// An item list's answers: { [ fieldId ]: { [ itemId ]: quantity } }.
|
|
15
|
+
export type OrderAnswers = Record<string, Record<string, number | null | undefined> | undefined> | null | undefined;
|
|
16
|
+
|
|
17
|
+
// The payload's sections, or one Your information section from `lead` + `additional` for an older api.
|
|
18
|
+
export declare const sectionsOf: ( fields?: { additional?: Field[]; lead?: Field[]; sections?: FormSection[] } | null ) => FormSection[];
|
|
19
|
+
|
|
20
|
+
// Price × quantity over the priced items of every list field, rounded to cents.
|
|
21
|
+
export declare const orderTotal: ( fields: Field[] | undefined, answers: OrderAnswers ) => number;
|
|
22
|
+
|
|
23
|
+
// Every quantity across the list fields.
|
|
24
|
+
export declare const itemCount: ( fields: Field[] | undefined, answers: OrderAnswers ) => number;
|
|
25
|
+
|
|
26
|
+
// Whether `id` is the last list field: the estimated total follows it.
|
|
27
|
+
export declare const isLastList: ( fields: Field[] | undefined, id?: string ) => boolean;
|
|
28
|
+
|
|
29
|
+
// "Up to N per order" once the quantity reaches the item's `attributes.max`, else null.
|
|
30
|
+
export declare const limitMessage: ( item: { attributes?: { max?: number | null } } | null | undefined, quantity: number | null | undefined ) => string | null;
|
|
@@ -19,3 +19,22 @@ export declare const submissionEndpoint: ( props: {
|
|
|
19
19
|
subdomain: string;
|
|
20
20
|
token?: string;
|
|
21
21
|
} ) => string | null;
|
|
22
|
+
|
|
23
|
+
// Where a lead's own link (`?lead=<token>`) asks for their entries, or null
|
|
24
|
+
// when `lead` is not a lead token. `token` is the owner's preview token.
|
|
25
|
+
export declare const leadEndpoint: ( props: {
|
|
26
|
+
lead: string | null | undefined;
|
|
27
|
+
slug: string;
|
|
28
|
+
subdomain: string;
|
|
29
|
+
token?: string | null;
|
|
30
|
+
} ) => string | null;
|
|
31
|
+
|
|
32
|
+
// Where the missions panel takes a mission's action: one route for every
|
|
33
|
+
// mission, the action one its completion declares (a code mission sends and
|
|
34
|
+
// confirms). The lead's own token goes in the request body, not the path.
|
|
35
|
+
export declare const missionEndpoint: ( props: {
|
|
36
|
+
action: string;
|
|
37
|
+
slug: string;
|
|
38
|
+
subdomain: string;
|
|
39
|
+
type: string;
|
|
40
|
+
} ) => string;
|
|
@@ -15,7 +15,7 @@ export interface TemplateButtons {
|
|
|
15
15
|
|
|
16
16
|
export interface TemplatePanel {
|
|
17
17
|
data?: Record<string, any>;
|
|
18
|
-
name: 'cart' | 'enter' | 'error' | 'menu' | 'prize' | 'prizes' | 'product' | 'purchase' | 'report' | 'share' | 'submission' | null;
|
|
18
|
+
name: 'cart' | 'enter' | 'error' | 'lead' | 'menu' | 'prize' | 'prizes' | 'product' | 'purchase' | 'report' | 'share' | 'submission' | null;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface TemplateModalProps {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
// The modal's round close button, drawn, not pressed.
|
|
4
|
+
export declare const Close: ComponentType<{ style?: Record<string, unknown> | null }>;
|
|
5
|
+
|
|
6
|
+
// The share page ( template-subdomain.js ) with the entry button it is given.
|
|
7
|
+
export declare const SharePage: ComponentType<{ button?: ReactNode; data?: Record<string, unknown>; style?: Record<string, unknown> | null }>;
|
|
8
|
+
|
|
9
|
+
// That page under the modal's tint with the modal's panel over it, holding its children.
|
|
10
|
+
export declare const ShareSheet: ComponentType<{ children?: ReactNode; data?: Record<string, unknown>; style?: Record<string, unknown> | null }>;
|
|
@@ -3,6 +3,8 @@ import { ComponentType, CSSProperties, ElementType, ReactNode } from 'react';
|
|
|
3
3
|
export interface TemplateSubdomainLinkProps {
|
|
4
4
|
buttonWithImageHeight?: boolean;
|
|
5
5
|
className?: string;
|
|
6
|
+
// The image's own description, its alt text; without it the alt text is `text`.
|
|
7
|
+
description?: string | null;
|
|
6
8
|
element?: ElementType;
|
|
7
9
|
icon?: ComponentType<{ className?: string }>;
|
|
8
10
|
image?: string;
|
|
@@ -2,6 +2,8 @@ import { ComponentType, ReactNode, SVGProps } from 'react';
|
|
|
2
2
|
import { BadgeProps } from '../shared/badge';
|
|
3
3
|
|
|
4
4
|
export interface AccordionProps {
|
|
5
|
+
// Given, the caller holds which one is open: the panel shows only while it is true.
|
|
6
|
+
active?: boolean;
|
|
5
7
|
badge?: { text?: ReactNode; type?: BadgeProps[ 'type' ] } | null;
|
|
6
8
|
children?: ReactNode;
|
|
7
9
|
className?: string;
|