@drawbridge/components 0.1.37 → 0.1.38
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 +68 -355
- package/dist/advertisement.js +15 -20
- package/dist/advertisement.mjs +15 -20
- package/dist/bridge/advertisements.js +4 -2
- package/dist/bridge/advertisements.mjs +5 -3
- package/dist/bridge/fields.js +89 -6
- package/dist/bridge/fields.mjs +89 -7
- package/dist/bridge/form-subdomain-agreement.js +165 -0
- package/dist/bridge/form-subdomain-agreement.mjs +132 -0
- package/dist/bridge/form-subdomain-embed.js +5 -1
- package/dist/bridge/form-subdomain-embed.mjs +5 -1
- package/dist/bridge/form-subdomain-header.js +21 -14
- package/dist/bridge/form-subdomain-header.mjs +20 -14
- package/dist/bridge/form-subdomain-issue.js +17 -8
- package/dist/bridge/form-subdomain-issue.mjs +17 -8
- package/dist/bridge/form-subdomain-missions.js +58 -52
- package/dist/bridge/form-subdomain-missions.mjs +60 -54
- package/dist/bridge/form-subdomain.js +223 -94
- package/dist/bridge/form-subdomain.mjs +222 -96
- package/dist/bridge/lib/entry.js +61 -6
- package/dist/bridge/lib/entry.mjs +51 -5
- package/dist/bridge/lib/order.js +23 -0
- package/dist/bridge/lib/order.mjs +20 -0
- package/dist/bridge/template-layout.js +5 -2
- package/dist/bridge/template-layout.mjs +6 -3
- package/dist/bridge/template-modal.js +82 -15
- package/dist/bridge/template-modal.mjs +83 -16
- package/dist/bridge/template-subdomain-gallery.js +126 -75
- package/dist/bridge/template-subdomain-gallery.mjs +122 -75
- package/dist/bridge/template-subdomain.js +16 -14
- package/dist/bridge/template-subdomain.mjs +17 -15
- package/dist/dashboard/avatar.js +5 -0
- package/dist/dashboard/avatar.mjs +5 -0
- package/dist/dashboard/campaign-form.js +1798 -0
- package/dist/dashboard/campaign-form.mjs +1769 -0
- package/dist/dashboard/card-affiliate.js +3 -2
- package/dist/dashboard/card-affiliate.mjs +3 -2
- package/dist/dashboard/card-campaign-agreement.js +172 -0
- package/dist/dashboard/card-campaign-agreement.mjs +139 -0
- package/dist/dashboard/card-campaign-switch.js +34 -9
- package/dist/dashboard/card-campaign-switch.mjs +32 -8
- package/dist/dashboard/card-order.js +6 -14
- package/dist/dashboard/card-order.mjs +6 -14
- package/dist/dashboard/card-section.js +69 -26
- package/dist/dashboard/card-section.mjs +65 -26
- package/dist/dashboard/card-shortcut.js +181 -0
- package/dist/dashboard/card-shortcut.mjs +152 -0
- package/dist/dashboard/card-tile.js +3 -35
- package/dist/dashboard/card-tile.mjs +3 -34
- package/dist/dashboard/document-blocks.js +305 -0
- package/dist/dashboard/document-blocks.mjs +270 -0
- package/dist/dashboard/drawer-subscription.js +52 -14
- package/dist/dashboard/drawer-subscription.mjs +52 -14
- package/dist/dashboard/drawer.js +20 -3
- package/dist/dashboard/drawer.mjs +21 -4
- package/dist/dashboard/dropdown.js +6 -2
- package/dist/dashboard/dropdown.mjs +6 -2
- package/dist/dashboard/form-admin-subscription-custom.js +72 -8
- package/dist/dashboard/form-admin-subscription-custom.mjs +72 -8
- package/dist/dashboard/form-ai.js +0 -148
- package/dist/dashboard/form-ai.mjs +1 -148
- package/dist/dashboard/form-filters-analytics.js +86 -38
- package/dist/dashboard/form-filters-analytics.mjs +85 -38
- package/dist/dashboard/form-organization-brand.js +30 -13
- package/dist/dashboard/form-organization-brand.mjs +30 -13
- package/dist/dashboard/form-organization-campaign-advertisement.js +38 -112
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +38 -112
- package/dist/dashboard/form-organization-campaign-advertisements.js +374 -0
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +345 -0
- package/dist/dashboard/form-organization-campaign-agreement.js +402 -210
- package/dist/dashboard/form-organization-campaign-agreement.mjs +398 -211
- package/dist/dashboard/form-organization-campaign-design.js +258 -0
- package/dist/dashboard/form-organization-campaign-design.mjs +223 -0
- package/dist/dashboard/form-organization-campaign-field-item.js +585 -0
- package/dist/dashboard/form-organization-campaign-field-item.mjs +552 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +48 -7
- package/dist/dashboard/form-organization-campaign-field-number.mjs +48 -7
- package/dist/dashboard/form-organization-campaign-field-select.js +15 -4
- package/dist/dashboard/form-organization-campaign-field-select.mjs +15 -4
- package/dist/dashboard/form-organization-campaign-field-skill.js +359 -0
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +330 -0
- package/dist/dashboard/form-organization-campaign-field-text.js +46 -6
- package/dist/dashboard/form-organization-campaign-field-text.mjs +46 -6
- package/dist/dashboard/form-organization-campaign-field-textarea.js +22 -13
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +22 -13
- package/dist/dashboard/form-organization-campaign-footer.js +178 -0
- package/dist/dashboard/form-organization-campaign-footer.mjs +149 -0
- package/dist/dashboard/form-organization-campaign-integration-age.js +2 -35
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +2 -35
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +4 -1
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +4 -1
- package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
- package/dist/dashboard/form-organization-campaign-page-preview.js +1 -2
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +1 -2
- package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
- package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
- package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
- package/dist/dashboard/form-organization-campaign-page-slug.js +2 -3
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +2 -3
- package/dist/dashboard/form-organization-campaign-page.js +168 -265
- package/dist/dashboard/form-organization-campaign-page.mjs +170 -266
- package/dist/dashboard/form-organization-campaign-section.js +125 -107
- package/dist/dashboard/form-organization-campaign-section.mjs +121 -107
- package/dist/dashboard/form-organization-campaign.js +119 -9
- package/dist/dashboard/form-organization-campaign.mjs +118 -9
- package/dist/dashboard/form-organization-file-frame.js +7 -1
- package/dist/dashboard/form-organization-file-frame.mjs +7 -1
- package/dist/dashboard/form-organization-workflow.js +587 -530
- package/dist/dashboard/form-organization-workflow.mjs +588 -531
- package/dist/dashboard/form-organization.js +22 -0
- package/dist/dashboard/form-organization.mjs +22 -0
- package/dist/dashboard/form-reposition.js +396 -0
- package/dist/dashboard/form-reposition.mjs +359 -0
- package/dist/dashboard/form-support.js +189 -0
- package/dist/dashboard/form-support.mjs +160 -0
- package/dist/dashboard/form-tests.js +683 -0
- package/dist/dashboard/form-tests.mjs +646 -0
- package/dist/dashboard/form-verify-prize.js +114 -34
- package/dist/dashboard/form-verify-prize.mjs +111 -34
- package/dist/dashboard/google.js +8 -1
- package/dist/dashboard/google.mjs +8 -1
- package/dist/dashboard/input-array.js +2 -0
- package/dist/dashboard/input-array.mjs +2 -0
- package/dist/dashboard/input-editor.js +17 -6
- package/dist/dashboard/input-editor.mjs +17 -6
- package/dist/dashboard/input-fields.js +287 -437
- package/dist/dashboard/input-fields.mjs +287 -436
- package/dist/dashboard/input-file.js +70 -2
- package/dist/dashboard/input-file.mjs +70 -2
- package/dist/dashboard/input-font.js +64 -55
- package/dist/dashboard/input-font.mjs +64 -55
- package/dist/dashboard/input-resource.js +4 -1
- package/dist/dashboard/input-resource.mjs +4 -1
- package/dist/dashboard/lib/ab-tests.js +130 -0
- package/dist/dashboard/lib/ab-tests.mjs +94 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/focus.js +93 -0
- package/dist/dashboard/lib/focus.mjs +69 -0
- package/dist/dashboard/lib/form-page.js +203 -0
- package/dist/dashboard/lib/form-page.mjs +155 -0
- package/dist/dashboard/lib/item-list.js +0 -15
- package/dist/dashboard/lib/item-list.mjs +0 -14
- package/dist/dashboard/lib/rail.js +16 -17
- package/dist/dashboard/lib/rail.mjs +15 -16
- package/dist/dashboard/lib/sms.js +8 -2
- package/dist/dashboard/lib/sms.mjs +6 -1
- package/dist/dashboard/list-resource.js +2 -0
- package/dist/dashboard/list-resource.mjs +2 -0
- package/dist/dashboard/menu.js +54 -5
- package/dist/dashboard/menu.mjs +53 -5
- package/dist/dashboard/modal.js +19 -4
- package/dist/dashboard/modal.mjs +20 -5
- package/dist/dashboard/order-sections.js +4 -0
- package/dist/dashboard/order-sections.mjs +4 -0
- package/dist/dashboard/preview.js +838 -324
- package/dist/dashboard/preview.mjs +826 -324
- package/dist/dashboard/provider-ui.js +20 -12
- package/dist/dashboard/provider-ui.mjs +21 -13
- package/dist/dashboard/recharts.js +53 -28
- package/dist/dashboard/recharts.mjs +53 -28
- package/dist/dashboard/swatch.js +35 -0
- package/dist/dashboard/swatch.mjs +31 -0
- package/dist/dashboard/table-contacts.js +6 -10
- package/dist/dashboard/table-contacts.mjs +6 -10
- package/dist/dashboard/table.js +10 -3
- package/dist/dashboard/table.mjs +9 -3
- package/dist/dashboard/template-dashboard.js +12 -7
- package/dist/dashboard/template-dashboard.mjs +11 -7
- package/dist/dashboard/template-design.js +564 -0
- package/dist/dashboard/template-design.mjs +531 -0
- package/dist/dashboard/template-rail.js +198 -126
- package/dist/dashboard/template-rail.mjs +196 -125
- package/dist/dashboard/template-socket.js +0 -3
- package/dist/dashboard/template-socket.mjs +0 -3
- package/dist/dashboard/template-test-page.js +436 -0
- package/dist/dashboard/template-test-page.mjs +407 -0
- package/dist/dashboard/template-tests.js +141 -0
- package/dist/dashboard/template-tests.mjs +112 -0
- package/dist/dashboard/template-ui.js +20 -11
- package/dist/dashboard/template-ui.mjs +22 -13
- package/dist/dashboard/template-variant.js +185 -0
- package/dist/dashboard/template-variant.mjs +156 -0
- package/dist/icons/arrow-down-long.js +47 -0
- package/dist/icons/arrow-down-long.mjs +28 -0
- package/dist/icons/arrows-pointing-out.js +46 -0
- package/dist/icons/arrows-pointing-out.mjs +27 -0
- package/dist/icons/beaker.js +46 -0
- package/dist/icons/beaker.mjs +27 -0
- package/dist/icons/identification.js +46 -0
- package/dist/icons/identification.mjs +27 -0
- package/dist/icons/lifebuoy.js +46 -0
- package/dist/icons/lifebuoy.mjs +27 -0
- package/dist/icons/rectangle-group.js +46 -0
- package/dist/icons/rectangle-group.mjs +27 -0
- package/dist/icons/rectangle-stack.js +46 -0
- package/dist/icons/rectangle-stack.mjs +27 -0
- package/dist/icons/shopping-bag.js +46 -0
- package/dist/icons/shopping-bag.mjs +27 -0
- package/dist/icons/swatch.js +46 -0
- package/dist/icons/swatch.mjs +27 -0
- package/dist/icons/window.js +46 -0
- package/dist/icons/window.mjs +27 -0
- package/dist/icons/zoom-in.js +46 -0
- package/dist/icons/zoom-in.mjs +27 -0
- package/dist/input-answer.js +60 -0
- package/dist/input-answer.mjs +27 -0
- package/dist/input-checkbox.js +7 -1
- package/dist/input-checkbox.mjs +7 -1
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +3 -1
- package/dist/input-select.mjs +3 -1
- package/dist/provider-font.js +4 -3
- package/dist/provider-font.mjs +4 -3
- package/dist/shared/badge.js +15 -0
- package/dist/shared/badge.mjs +11 -0
- package/dist/shared/carousel.js +11 -7
- package/dist/shared/carousel.mjs +11 -7
- package/dist/shared/document-pieces.js +295 -0
- package/dist/shared/document-pieces.mjs +260 -0
- package/dist/shared/lib/campaign.js +3 -9
- package/dist/shared/lib/campaign.mjs +3 -9
- package/dist/shared/lib/helpers.js +24 -0
- package/dist/shared/lib/helpers.mjs +22 -0
- package/dist/shared/lib/video.js +6 -0
- package/dist/shared/lib/video.mjs +5 -0
- package/dist/shared/sortable.js +27 -10
- package/dist/shared/sortable.mjs +27 -10
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +127 -9
- package/dist/video.mjs +125 -11
- package/package.json +176 -20
- package/types/bridge/fields.d.ts +6 -1
- package/types/bridge/form-subdomain-agreement.d.ts +27 -0
- package/types/bridge/form-subdomain-missions.d.ts +2 -0
- package/types/bridge/form-subdomain.d.ts +62 -3
- package/types/bridge/lib/entry.d.ts +44 -7
- package/types/bridge/lib/order.d.ts +13 -2
- package/types/bridge/subdomain-content.d.ts +1 -0
- package/types/bridge/template-subdomain-gallery.d.ts +13 -1
- package/types/dashboard/campaign-form.d.ts +42 -0
- package/types/dashboard/card-campaign-agreement.d.ts +26 -0
- package/types/dashboard/card-campaign-switch.d.ts +20 -1
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +9 -1
- package/types/dashboard/card-shortcut.d.ts +38 -0
- package/types/dashboard/card-tile.d.ts +4 -9
- package/types/dashboard/document-blocks.d.ts +14 -0
- package/types/dashboard/drawer.d.ts +3 -0
- package/types/dashboard/form-ai.d.ts +0 -17
- package/types/dashboard/form-organization-brand.d.ts +3 -0
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +15 -0
- package/types/dashboard/form-organization-campaign-agreement.d.ts +53 -10
- package/types/dashboard/form-organization-campaign-design.d.ts +46 -0
- package/types/dashboard/form-organization-campaign-field-item.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +4 -1
- package/types/dashboard/form-organization-campaign-field-select.d.ts +6 -1
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-text.d.ts +5 -1
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +4 -1
- package/types/dashboard/form-organization-campaign-footer.d.ts +23 -0
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +2 -1
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +2 -0
- package/types/dashboard/form-organization-campaign-page.d.ts +9 -15
- package/types/dashboard/form-organization-campaign-section.d.ts +24 -8
- package/types/dashboard/form-organization-campaign.d.ts +3 -0
- package/types/dashboard/form-organization-workflow.d.ts +3 -0
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-reposition.d.ts +29 -0
- package/types/dashboard/form-support.d.ts +14 -0
- package/types/dashboard/form-tests.d.ts +78 -0
- package/types/dashboard/form-verify-prize.d.ts +30 -3
- package/types/dashboard/input-editor.d.ts +9 -0
- package/types/dashboard/input-fields.d.ts +8 -5
- package/types/dashboard/input-file.d.ts +4 -0
- package/types/dashboard/input-resource.d.ts +1 -0
- package/types/dashboard/lib/ab-tests.d.ts +50 -0
- package/types/dashboard/lib/escape.d.ts +4 -0
- package/types/dashboard/lib/focus.d.ts +16 -0
- package/types/dashboard/lib/form-page.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +10 -5
- package/types/dashboard/lib/rail.d.ts +0 -1
- package/types/dashboard/lib/sms.d.ts +7 -0
- package/types/dashboard/modal.d.ts +3 -1
- package/types/dashboard/preview.d.ts +65 -10
- package/types/dashboard/recharts.d.ts +3 -0
- package/types/dashboard/swatch.d.ts +4 -0
- package/types/dashboard/template-dashboard.d.ts +3 -0
- package/types/dashboard/template-design.d.ts +30 -0
- package/types/dashboard/template-test-page.d.ts +69 -0
- package/types/dashboard/template-tests.d.ts +30 -0
- package/types/dashboard/template-variant.d.ts +18 -0
- package/types/icons/arrow-down-long.d.ts +5 -0
- package/types/icons/arrows-pointing-out.d.ts +5 -0
- package/types/icons/beaker.d.ts +5 -0
- package/types/icons/identification.d.ts +5 -0
- package/types/icons/lifebuoy.d.ts +5 -0
- package/types/icons/rectangle-group.d.ts +5 -0
- package/types/icons/rectangle-stack.d.ts +5 -0
- package/types/icons/shopping-bag.d.ts +5 -0
- package/types/icons/swatch.d.ts +5 -0
- package/types/icons/window.d.ts +5 -0
- package/types/icons/zoom-in.d.ts +5 -0
- package/types/input-answer.d.ts +15 -0
- package/types/input-select.d.ts +2 -0
- package/types/shared/button.d.ts +1 -1
- package/types/shared/document-pieces.d.ts +34 -0
- package/types/shared/lib/helpers.d.ts +22 -1
- package/types/shared/lib/motion.d.ts +2 -0
- package/types/shared/lib/video.d.ts +3 -0
- package/types/shared/sortable.d.ts +6 -0
- package/types/video.d.ts +18 -2
- package/dist/bridge/template-preview.js +0 -208
- package/dist/bridge/template-preview.mjs +0 -173
- package/dist/dashboard/device.js +0 -95
- package/dist/dashboard/device.mjs +0 -72
- package/dist/dashboard/form-organization-campaign-field-list.js +0 -425
- package/dist/dashboard/form-organization-campaign-field-list.mjs +0 -396
- package/dist/dashboard/item-row.js +0 -92
- package/dist/dashboard/item-row.mjs +0 -63
- package/types/bridge/template-preview.d.ts +0 -10
- package/types/dashboard/device.d.ts +0 -12
- package/types/dashboard/form-organization-campaign-field-list.d.ts +0 -36
- package/types/dashboard/item-row.d.ts +0 -25
|
@@ -12,6 +12,8 @@ export interface MissionItem {
|
|
|
12
12
|
|
|
13
13
|
export interface FormSubdomainMissionsProps {
|
|
14
14
|
advertisements?: ReactNode;
|
|
15
|
+
// The opening screen's order ( bridge/lib/entry.js afterOrder ).
|
|
16
|
+
after?: Array<'message' | 'missions' | 'advertisements' | string>;
|
|
15
17
|
button?: ReactNode;
|
|
16
18
|
contact?: { email?: string | null; phone?: string | null };
|
|
17
19
|
// The mission a lead link's `&open=` opens at.
|
|
@@ -11,23 +11,32 @@ export interface Tracking {
|
|
|
11
11
|
track: ( event: { name: string; data?: unknown }, type?: string, options?: Record<string, unknown> ) => void;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
// The page payload's agreement with the locale endpoint's content over it.
|
|
14
15
|
export interface Agreement {
|
|
16
|
+
// False: never confirmed, so no checkbox and no menu row.
|
|
17
|
+
confirmed?: boolean;
|
|
18
|
+
// Our document's html, opened in the modal with Back.
|
|
19
|
+
document?: string;
|
|
15
20
|
enabled?: boolean;
|
|
16
21
|
label?: string;
|
|
17
22
|
link?: string;
|
|
23
|
+
type?: 'document' | 'link';
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
export interface FormSubdomainProps {
|
|
21
|
-
agreements?: { marketing?: Agreement; sms?: Agreement; terms?: Agreement };
|
|
27
|
+
agreements?: { marketing?: Agreement; privacy?: Agreement; sms?: Agreement; terms?: Agreement };
|
|
22
28
|
button?: ReactNode;
|
|
23
29
|
disabled?: boolean;
|
|
30
|
+
// What a document's pieces draw: the page payload's `documents`.
|
|
31
|
+
documents?: import( '../shared/document-pieces' ).DocumentData;
|
|
24
32
|
// `sections` steps the form: Your information, then Your order. Without it,
|
|
25
33
|
// `lead` + `additional` are one Your information step, as before.
|
|
26
34
|
fields?: { additional?: Field[]; lead?: Field[]; primary?: Field; sections?: FormSection[] };
|
|
27
35
|
// A dashboard preview's agreement: the last step fades everything but it.
|
|
28
|
-
focus?: 'marketing' | 'sms' | 'terms';
|
|
36
|
+
focus?: 'marketing' | 'privacy' | 'sms' | 'terms';
|
|
29
37
|
integrations?: {
|
|
30
|
-
age
|
|
38
|
+
// The age step's texts: title ( "Confirm your age" ), description, button ( "Next" ).
|
|
39
|
+
age?: { enabled?: boolean; settings?: AgeSettings };
|
|
31
40
|
geocode?: { enabled?: boolean };
|
|
32
41
|
recaptcha?: { enabled?: boolean };
|
|
33
42
|
[ key: string ]: unknown;
|
|
@@ -37,14 +46,50 @@ export interface FormSubdomainProps {
|
|
|
37
46
|
onSuccess?: ( response: any ) => void;
|
|
38
47
|
params?: { slug?: string; subdomain?: string };
|
|
39
48
|
preview?: boolean;
|
|
49
|
+
// False while the campaign's giveaway is off: the Terms line about winning is left out.
|
|
50
|
+
giveaway?: boolean;
|
|
51
|
+
// False while texts are off on the platform: no SMS consent.
|
|
52
|
+
sms?: boolean;
|
|
40
53
|
// The step the form opens at ( a dashboard preview ), 0 by default.
|
|
41
54
|
step?: number;
|
|
42
55
|
style?: BrandStyle;
|
|
56
|
+
// The last step's button text, "Submit" when blank.
|
|
57
|
+
submit?: string | null;
|
|
43
58
|
tracking?: Tracking;
|
|
44
59
|
}
|
|
45
60
|
|
|
61
|
+
export interface AgeSettings {
|
|
62
|
+
button?: string | null;
|
|
63
|
+
description?: string | null;
|
|
64
|
+
max?: number;
|
|
65
|
+
min?: number;
|
|
66
|
+
title?: string | null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface FormSubdomainAgeProps {
|
|
70
|
+
button?: ReactNode;
|
|
71
|
+
callback?: ( answer: { age: number; birthday: string } ) => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
preview?: boolean;
|
|
74
|
+
style?: BrandStyle;
|
|
75
|
+
values?: AgeSettings;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface FormSubdomainItemListProps {
|
|
79
|
+
currency?: string;
|
|
80
|
+
// A list field; one holding a single item draws no label heading.
|
|
81
|
+
field?: Field;
|
|
82
|
+
onChange?: ( value: Record<string, number> ) => void;
|
|
83
|
+
// False hides every price; each item otherwise shows its own when it has one.
|
|
84
|
+
prices?: boolean;
|
|
85
|
+
style?: BrandStyle;
|
|
86
|
+
value?: Record<string, number | null | undefined> | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
46
89
|
export interface FormSubdomainSubmissionProps {
|
|
47
90
|
affiliate?: string;
|
|
91
|
+
// The panel's parts in order ( bridge/lib/entry.js afterOrder ).
|
|
92
|
+
after?: Array<'message' | 'missions' | 'advertisements' | string>;
|
|
48
93
|
button?: ReactNode;
|
|
49
94
|
checkout?: ( body: any ) => Promise<unknown>;
|
|
50
95
|
// The giveaway on: the panel lists the missions while entries are being awarded; no entry total and no Copy your link.
|
|
@@ -83,6 +128,20 @@ export interface FormSubdomainMessageProps {
|
|
|
83
128
|
}
|
|
84
129
|
|
|
85
130
|
export declare const FormSubdomainSubmission: ComponentType<FormSubdomainSubmissionProps>;
|
|
131
|
+
export interface FormSubdomainGeocodeProps {
|
|
132
|
+
button?: string;
|
|
133
|
+
callback?: ( response: unknown ) => void;
|
|
134
|
+
disabled?: boolean;
|
|
135
|
+
preview?: boolean;
|
|
136
|
+
// Draws the step as the browser asks, asking nothing ( the dashboard's Form page preview ).
|
|
137
|
+
still?: boolean;
|
|
138
|
+
style?: Record<string, unknown> | null;
|
|
139
|
+
values?: Record<string, unknown>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export declare const FormSubdomainAge: ComponentType<FormSubdomainAgeProps>;
|
|
143
|
+
export declare const FormSubdomainGeocode: ComponentType<FormSubdomainGeocodeProps>;
|
|
144
|
+
export declare const FormSubdomainItemList: ComponentType<FormSubdomainItemListProps>;
|
|
86
145
|
export declare const FormSubdomainMessage: ComponentType<FormSubdomainMessageProps>;
|
|
87
146
|
export { FormSubdomainHeader };
|
|
88
147
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// back to utils constants.campaign.form.copy (`purchase` reads `order`).
|
|
3
3
|
export declare const copy: (
|
|
4
4
|
data: { defaults?: Record<string, string | null | undefined> } | null | undefined,
|
|
5
|
-
key: 'active' | 'confirmation' | 'inactive' | 'purchase' | 'rejection'
|
|
5
|
+
key: 'active' | 'confirmation' | 'inactive' | 'purchase' | 'rejection' | 'submit'
|
|
6
6
|
) => string | undefined;
|
|
7
7
|
|
|
8
8
|
// "You have [n] entries" ("You have 1 entry").
|
|
@@ -15,12 +15,49 @@ export declare const formOn: ( data: { form?: boolean } | null | undefined ) =>
|
|
|
15
15
|
|
|
16
16
|
export declare const giveawayOn: ( data: { giveaway?: boolean } | null | undefined ) => boolean;
|
|
17
17
|
|
|
18
|
+
// Entries are being awarded: the giveaway is on and `awarding` is not false.
|
|
19
|
+
export declare const awardingOn: ( data: { awarding?: boolean; giveaway?: boolean } | null | undefined ) => boolean;
|
|
20
|
+
|
|
21
|
+
// The entry button's state: `inactive` while closed, `button` while not awarding, else `active`.
|
|
22
|
+
export declare const buttonState: (
|
|
23
|
+
data: { awarding?: boolean } | null | undefined,
|
|
24
|
+
open?: boolean
|
|
25
|
+
) => 'active' | 'button' | 'inactive';
|
|
26
|
+
|
|
27
|
+
// The entry button's text in that state.
|
|
28
|
+
export declare const buttonText: (
|
|
29
|
+
data: { awarding?: boolean; defaults?: Record<string, string | null | undefined> } | null | undefined,
|
|
30
|
+
open?: boolean
|
|
31
|
+
) => string | undefined;
|
|
32
|
+
|
|
33
|
+
// The parts of the panel after a submission, in their default order.
|
|
34
|
+
export declare const AFTER: Array<'message' | 'missions' | 'advertisements'>;
|
|
35
|
+
|
|
36
|
+
// The panel's parts in the organizer's order ( the payload's `after` ), else AFTER.
|
|
37
|
+
export declare const afterOrder: ( data?: { after?: string[]; form?: { after?: string[] } | boolean } | null ) => string[];
|
|
38
|
+
|
|
39
|
+
// The missions a panel lists; `repeat` (the entry limit was reached) drops the Lead form row.
|
|
40
|
+
export declare const panelMissions: <T extends { type?: string }>( missions?: T[] | null, repeat?: boolean ) => T[] | null;
|
|
41
|
+
|
|
18
42
|
// The consent checkboxes' wording when an agreement has no label of its own.
|
|
19
43
|
export declare const agreementWording: { marketing: string; sms: string };
|
|
20
44
|
|
|
21
|
-
// The
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
// The menu's short names for the agreements, in the menu's order.
|
|
46
|
+
export declare const agreementTitles: { terms: string; privacy: string; marketing: string; sms: string };
|
|
47
|
+
|
|
48
|
+
// What an agreement opens, or null while nothing is confirmed.
|
|
49
|
+
export declare const agreementContent: ( agreement?: { confirmed?: boolean; document?: string; link?: string; type?: string } ) => 'document' | 'link' | null;
|
|
50
|
+
|
|
51
|
+
// Whether its checkbox shows: confirmed content, or a confirmed link with no address ( its label alone ).
|
|
52
|
+
export declare const agreementShown: ( agreement?: { confirmed?: boolean; document?: string; link?: string | null; type?: string } ) => boolean;
|
|
53
|
+
|
|
54
|
+
export declare const asksForPhone: ( fields?: { additional?: { slug?: string }[]; lead?: { slug?: string }[]; sections?: { fields?: { slug?: string }[] }[] } ) => boolean;
|
|
55
|
+
|
|
56
|
+
// The agreement ids the page menu lists. `sms : false` (texts off) leaves out SMS terms.
|
|
57
|
+
export declare const menuAgreements: ( data?: { agreements?: Record<string, any>; fields?: any; sms?: boolean } ) => string[];
|
|
58
|
+
|
|
59
|
+
// The payload's agreements with the locale endpoint's content over them.
|
|
60
|
+
export declare const withLocale: ( agreements?: Record<string, any>, locale?: Record<string, any> ) => Record<string, any>;
|
|
61
|
+
|
|
62
|
+
// The line under a linked Terms checkbox; null while the giveaway is off.
|
|
63
|
+
export declare const termsOptOut: ( values?: { giveaway?: boolean; sms?: boolean } ) => string | null;
|
|
@@ -5,7 +5,9 @@ export interface FormSection {
|
|
|
5
5
|
description?: string | null;
|
|
6
6
|
fields?: Field[];
|
|
7
7
|
id: 'information' | 'order' | string;
|
|
8
|
-
//
|
|
8
|
+
// The step's Next text; the last step reads the form's Submit text instead.
|
|
9
|
+
button?: string | null;
|
|
10
|
+
// Order only: the organization's currency ( `prices` is retired ).
|
|
9
11
|
settings?: { currency?: string; prices?: boolean };
|
|
10
12
|
title?: string;
|
|
11
13
|
type: 'information' | 'order' | string;
|
|
@@ -23,8 +25,17 @@ export declare const orderTotal: ( fields: Field[] | undefined, answers: OrderAn
|
|
|
23
25
|
// Every quantity across the list fields.
|
|
24
26
|
export declare const itemCount: ( fields: Field[] | undefined, answers: OrderAnswers ) => number;
|
|
25
27
|
|
|
26
|
-
// Whether
|
|
28
|
+
// Whether any item of the list fields has a price: the total shows then.
|
|
29
|
+
export declare const priced: ( fields: Field[] | undefined ) => boolean;
|
|
30
|
+
|
|
31
|
+
// The fields in runs: consecutive lists of one item each are one run, read as one list.
|
|
32
|
+
export declare const itemRuns: ( fields?: Field[] ) => Array<{ fields: Field[]; single: boolean }>;
|
|
33
|
+
|
|
34
|
+
// Whether `id` is the last list field: the total follows it.
|
|
27
35
|
export declare const isLastList: ( fields: Field[] | undefined, id?: string ) => boolean;
|
|
28
36
|
|
|
29
37
|
// "Up to N per order" once the quantity reaches the item's `attributes.max`, else null.
|
|
30
38
|
export declare const limitMessage: ( item: { attributes?: { max?: number | null } } | null | undefined, quantity: number | null | undefined ) => string | null;
|
|
39
|
+
|
|
40
|
+
// The index of the first section asking a field the api refused (`refused`, by field id), else -1.
|
|
41
|
+
export declare const refusedSection: ( sections?: FormSection[], refused?: Record<string, unknown> | null ) => number;
|
|
@@ -13,6 +13,7 @@ export interface SubdomainContentProps {
|
|
|
13
13
|
embed?: boolean;
|
|
14
14
|
// ProviderFont's render-prop output.
|
|
15
15
|
fonts: { body?: CSSProperties; heading?: CSSProperties };
|
|
16
|
+
// Gallery items; only their count is read.
|
|
16
17
|
gallery: unknown[];
|
|
17
18
|
headerClassName?: string;
|
|
18
19
|
linksSection?: ReactNode;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { BrandStyle } from '../styles';
|
|
3
|
+
import { GalleryPosition } from '../shared/lib/helpers';
|
|
3
4
|
|
|
4
5
|
// An uploaded image or video: cdnSrc reads sizes[ size ] and needs updatedAt.
|
|
5
|
-
|
|
6
|
+
// sizes.gallery is the uncut size a saved crop is drawn from.
|
|
7
|
+
export interface GalleryFile {
|
|
6
8
|
filename?: string;
|
|
7
9
|
frames?: { sizes?: Record<string, string> }[];
|
|
8
10
|
id: string;
|
|
@@ -11,6 +13,16 @@ export interface GalleryItem {
|
|
|
11
13
|
updatedAt?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
// One gallery item: its file, its description ( alt text ) and its saved crop.
|
|
17
|
+
export interface GalleryItem {
|
|
18
|
+
description?: string;
|
|
19
|
+
file: GalleryFile;
|
|
20
|
+
position?: GalleryPosition | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** The crop's box inside the 9:16 frame, in percent. */
|
|
24
|
+
export declare const cropBox: ( position: GalleryPosition ) => { height: string; left: string; top: string; width: string };
|
|
25
|
+
|
|
14
26
|
export interface TemplateSubdomainGalleryProps {
|
|
15
27
|
children: ( gallery: { controls: ReactNode; render: ReactNode } ) => ReactNode;
|
|
16
28
|
compact?: boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BrandStyle } from '../styles';
|
|
3
|
+
|
|
4
|
+
// What the page does: every request, drawer and save is the page's own.
|
|
5
|
+
export interface CampaignFormActions {
|
|
6
|
+
addAge: () => void;
|
|
7
|
+
addOrder: () => void;
|
|
8
|
+
// `before`: the custom section id the new one goes in front of; none adds it last.
|
|
9
|
+
addSection: ( before?: string ) => void;
|
|
10
|
+
advertisements: () => void;
|
|
11
|
+
copy: ( keys: string[], title: string ) => void;
|
|
12
|
+
delete: ( field: Record<string, unknown>, section: Record<string, unknown> ) => void;
|
|
13
|
+
footer: ( options: { phone: boolean; texts: boolean } ) => void;
|
|
14
|
+
integration: ( field: Record<string, unknown> ) => void;
|
|
15
|
+
manage: ( field: Record<string, unknown> ) => void;
|
|
16
|
+
missions: () => void;
|
|
17
|
+
removeSection: ( section: Record<string, unknown> ) => void;
|
|
18
|
+
reorder: ( options: { items: Record<string, unknown>[]; section: Record<string, unknown> } ) => void;
|
|
19
|
+
reorderAfter: ( order: string[] ) => void;
|
|
20
|
+
reorderSections: ( ids: string[] ) => void;
|
|
21
|
+
section: ( section: Record<string, unknown> ) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CampaignFormProps {
|
|
25
|
+
actions: CampaignFormActions;
|
|
26
|
+
// GET /organization/:o/campaign/:c: its copy, agreements, integrations and page payload ( `preview` ).
|
|
27
|
+
campaign?: Record<string, unknown> | null;
|
|
28
|
+
// Manage on Fields; every Manage still opens its drawer, read only without it.
|
|
29
|
+
canManage?: boolean;
|
|
30
|
+
// Advertisements' own capability and the plan; After entry's Add. Defaults to canManage.
|
|
31
|
+
canManageAds?: boolean;
|
|
32
|
+
organization?: Record<string, unknown> | null;
|
|
33
|
+
params: { campaign: string; organization: string };
|
|
34
|
+
// GET /organization/:o/campaign/:c/sections.
|
|
35
|
+
sections?: Record<string, unknown>[];
|
|
36
|
+
// The campaign's brand, as its share page draws it.
|
|
37
|
+
style?: BrandStyle | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare const CampaignForm: ComponentType<CampaignFormProps>;
|
|
41
|
+
|
|
42
|
+
export default CampaignForm;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentType, ReactNode, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardCampaignAgreementChildProps {
|
|
4
|
+
// On, Off or Required, beside Manage.
|
|
5
|
+
badge?: { text: string; type?: string };
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
// The Document or Link icon.
|
|
8
|
+
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
9
|
+
// The content's one line ("Saved Nov 10, 2026", "northside.coffee/terms"); none reads "Not set up".
|
|
10
|
+
line?: string | null;
|
|
11
|
+
onManage?: () => void;
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CardCampaignAgreementProps {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
'data-guide'?: string;
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
title?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare const CardCampaignAgreementChild: ComponentType<CardCampaignAgreementChildProps>;
|
|
23
|
+
|
|
24
|
+
declare const CardCampaignAgreement: ComponentType<CardCampaignAgreementProps>;
|
|
25
|
+
|
|
26
|
+
export default CardCampaignAgreement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { CampaignSwitchesRecord } from '../shared/lib/campaign';
|
|
3
3
|
|
|
4
4
|
export interface CardCampaignSwitchCampaign extends CampaignSwitchesRecord {
|
|
@@ -11,6 +11,11 @@ export interface CardLeadCaptureProps {
|
|
|
11
11
|
campaign?: CardCampaignSwitchCampaign | null;
|
|
12
12
|
// Without Manage on campaigns.settings: the switches are disabled with a lock.
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
// Each row with one has Manage before its switch, opening that page.
|
|
15
|
+
hrefs?: {
|
|
16
|
+
form?: string;
|
|
17
|
+
giveaway?: string;
|
|
18
|
+
};
|
|
14
19
|
// Called with the campaign PUT's answer or refusal once the confirmation is sent.
|
|
15
20
|
onError?: ( error: Error ) => void;
|
|
16
21
|
onSuccess?: ( response: unknown ) => void;
|
|
@@ -30,3 +35,17 @@ export declare const HeaderCampaignSwitch: ComponentType<HeaderCampaignSwitchPro
|
|
|
30
35
|
|
|
31
36
|
// The Overview's Lead capture panel.
|
|
32
37
|
export declare const CardLeadCapture: ComponentType<CardLeadCaptureProps>;
|
|
38
|
+
|
|
39
|
+
export interface SwitchRowProps {
|
|
40
|
+
description?: ReactNode;
|
|
41
|
+
// A small Manage before the switch, opening the row's page.
|
|
42
|
+
href?: string;
|
|
43
|
+
// The reason the switch is disabled, shown on hover; null leaves it enabled.
|
|
44
|
+
lock?: string | null;
|
|
45
|
+
onChange?: ( value: boolean ) => void;
|
|
46
|
+
title?: ReactNode;
|
|
47
|
+
value?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// One row of the Lead capture panel: a title, a grey line under it, the switch on the right.
|
|
51
|
+
export declare const SwitchRow: ComponentType<SwitchRowProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { Answer, AnswerField } from './answer-rows';
|
|
3
|
-
import {
|
|
3
|
+
import { CardShortcutFile } from './card-shortcut';
|
|
4
4
|
|
|
5
5
|
export interface CardOrderLine {
|
|
6
6
|
// A form line's item file, or a store line's product image url.
|
|
7
|
-
image?:
|
|
7
|
+
image?: CardShortcutFile | string | null;
|
|
8
8
|
price?: number;
|
|
9
9
|
quantity?: number;
|
|
10
10
|
title?: string;
|
|
@@ -3,13 +3,21 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
3
3
|
export interface CardSectionProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
className?: string | null;
|
|
6
|
-
//
|
|
6
|
+
// 2: the card holds the first child alone and the others sit beside it on the
|
|
7
|
+
// page, outside the card, in view as the page scrolls ( Beside ). 1 by default.
|
|
7
8
|
columns?: 1 | 2;
|
|
8
9
|
cta?: ReactNode;
|
|
9
10
|
title?: ReactNode;
|
|
11
|
+
// 'gray' holds a part of a page that is not a section itself; 'white' by default.
|
|
12
|
+
variant?: 'gray' | 'white';
|
|
10
13
|
[ key: string ]: unknown;
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
// A preview beside what it previews, on the page: two equal columns from
|
|
17
|
+
// 1280 px, `preview` in view as the children scroll; under it one column,
|
|
18
|
+
// `preview` first.
|
|
19
|
+
export declare const Beside: ComponentType<{ children?: ReactNode; preview?: ReactNode }>;
|
|
20
|
+
|
|
13
21
|
declare const CardSection: ComponentType<CardSectionProps>;
|
|
14
22
|
|
|
15
23
|
export default CardSection;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentType, ReactNode, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
// An uploaded file, as the tile draws it.
|
|
4
|
+
export interface CardShortcutFile {
|
|
5
|
+
filename?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
mimetype?: string;
|
|
8
|
+
sizes?: Record<string, string>;
|
|
9
|
+
updatedAt?: string | number | Date;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// A way into a page, or a row in a list: its icon in a green tile ( or, with no
|
|
13
|
+
// icon, its image ), its name and one line. The whole card a link or a button,
|
|
14
|
+
// or, with a handle or controls, a box whose image and words press.
|
|
15
|
+
export interface CardShortcutProps {
|
|
16
|
+
// The image's alt text; falls back to the file's name, then the title.
|
|
17
|
+
alt?: string | null;
|
|
18
|
+
badge?: ReactNode;
|
|
19
|
+
// Buttons of its own at its right ( a row's dots menu ).
|
|
20
|
+
controls?: ReactNode;
|
|
21
|
+
// The place you are: drawn at full strength, not pressable, marked current.
|
|
22
|
+
current?: boolean;
|
|
23
|
+
description?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
// A drag handle at its left.
|
|
26
|
+
handle?: ReactNode;
|
|
27
|
+
href?: string;
|
|
28
|
+
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
29
|
+
// With no icon: the file drawn in the tile, a grey square while there is none.
|
|
30
|
+
image?: CardShortcutFile | string | null;
|
|
31
|
+
// In place of `href`: the card is a button. With neither, a line only shown.
|
|
32
|
+
onClick?: () => void;
|
|
33
|
+
title: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare const CardShortcut: ComponentType<CardShortcutProps>;
|
|
37
|
+
|
|
38
|
+
export default CardShortcut;
|
|
@@ -9,7 +9,10 @@ export interface CardTileProps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface TileRecordPage {
|
|
12
|
-
|
|
12
|
+
// Gallery items, each with its file ( a list of files before Pistachio reads too ).
|
|
13
|
+
gallery?: { file?: { sizes?: Record<string, string> }; [ key: string ]: unknown }[];
|
|
14
|
+
// What the page tile names the page by.
|
|
15
|
+
headline?: string;
|
|
13
16
|
id?: string;
|
|
14
17
|
images?: { preview?: { sizes?: Record<string, string> } };
|
|
15
18
|
process?: { ai?: { progress?: { completed?: number; total?: number }; status?: string } };
|
|
@@ -39,16 +42,8 @@ export interface TileCampaignProps {
|
|
|
39
42
|
updatedAt?: string | number | Date;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
export interface TilePageProps {
|
|
43
|
-
campaign?: string;
|
|
44
|
-
organization?: string;
|
|
45
|
-
page?: TileRecordPage;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
45
|
export declare const TileCampaign: ComponentType<TileCampaignProps>;
|
|
49
46
|
|
|
50
|
-
export declare const TilePage: ComponentType<TilePageProps>;
|
|
51
|
-
|
|
52
47
|
declare const CardTile: ComponentType<CardTileProps>;
|
|
53
48
|
|
|
54
49
|
export default CardTile;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
import { DocumentData } from '../shared/document-pieces';
|
|
3
|
+
import { InputEditorBlocks } from './input-editor';
|
|
4
|
+
|
|
5
|
+
export declare const documentNodes: ( options: { data?: DocumentData; onClaim?: ( days: number ) => void } ) => Node[];
|
|
6
|
+
|
|
7
|
+
export declare const present: ( editor: any ) => Set<string>;
|
|
8
|
+
|
|
9
|
+
export declare const insertPiece: ( editor: any, key: string ) => void;
|
|
10
|
+
|
|
11
|
+
// What InputEditor takes as `blocks`: the grey blocks, H1 to H3, List and Insert.
|
|
12
|
+
declare const documentBlocks: ( options: { data?: DocumentData; insertable?: string[]; onClaim?: ( days: number ) => void } ) => InputEditorBlocks;
|
|
13
|
+
|
|
14
|
+
export default documentBlocks;
|
|
@@ -7,7 +7,10 @@ export interface DrawerProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
// The overlay, the close button and GuardNavigation all call this.
|
|
9
9
|
onClose?: () => void;
|
|
10
|
+
// With it the drawer is a modal dialog: focus moves in, Tab stays in, and
|
|
11
|
+
// closing hands focus back. Without it the page behind stays in reach.
|
|
10
12
|
overlay?: boolean;
|
|
13
|
+
// Names the dialog.
|
|
11
14
|
title?: ReactNode;
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -28,22 +28,6 @@ export interface FormAiImageProps {
|
|
|
28
28
|
values?: { organization?: string; prompt?: string; [ key: string ]: unknown };
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export interface FormAiPageProps {
|
|
32
|
-
// Shows the brand picker.
|
|
33
|
-
canManageBrands?: boolean;
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
onError: ( error: ApiError ) => void;
|
|
36
|
-
onSuccess: ( response: unknown ) => void;
|
|
37
|
-
values?: {
|
|
38
|
-
brand?: { id: string; title?: string; [ key: string ]: unknown } | null;
|
|
39
|
-
campaign?: string;
|
|
40
|
-
organization?: string;
|
|
41
|
-
title?: string;
|
|
42
|
-
url?: string;
|
|
43
|
-
[ key: string ]: unknown;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
31
|
export interface FormAiTextContext {
|
|
48
32
|
callback: string;
|
|
49
33
|
instruction: string;
|
|
@@ -60,5 +44,4 @@ export interface FormAiTextProps {
|
|
|
60
44
|
export const FormAiBrand: ComponentType<FormAiBrandProps>;
|
|
61
45
|
export const FormAiCampaign: ComponentType<FormAiCampaignProps>;
|
|
62
46
|
export const FormAiImage: ComponentType<FormAiImageProps>;
|
|
63
|
-
export const FormAiPage: ComponentType<FormAiPageProps>;
|
|
64
47
|
export const FormAiText: ComponentType<FormAiTextProps>;
|
|
@@ -11,6 +11,9 @@ export interface FormOrganizationBrandProps {
|
|
|
11
11
|
// Managing: title, images and style. The style section reads the font
|
|
12
12
|
// catalog from the [ 'app' ] query.
|
|
13
13
|
export interface FormOrganizationBrandEditProps {
|
|
14
|
+
// How many campaigns are linked to the brand: above Save, the form says an
|
|
15
|
+
// edit updates them. 0 by default, which says nothing.
|
|
16
|
+
connected?: number;
|
|
14
17
|
disabled?: boolean;
|
|
15
18
|
onError: ( error: Error ) => void;
|
|
16
19
|
onSuccess: ( response: unknown ) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FormOrganizationCampaignAdvertisementsProps {
|
|
4
|
+
// The organization's commerce connection, for the Store tab.
|
|
5
|
+
commerce?: { slug?: string; title?: string } | null;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onError?: ( error: Error ) => void;
|
|
8
|
+
onSuccess?: ( response: unknown ) => unknown;
|
|
9
|
+
organization?: Record<string, unknown> | null;
|
|
10
|
+
params: { campaign: string; organization: string };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const FormOrganizationCampaignAdvertisements: ComponentType<FormOrganizationCampaignAdvertisementsProps>;
|
|
14
|
+
|
|
15
|
+
export default FormOrganizationCampaignAdvertisements;
|
|
@@ -1,31 +1,74 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
+
import { DocumentData } from '../shared/document-pieces';
|
|
3
|
+
|
|
4
|
+
export interface AgreementValues {
|
|
5
|
+
// Someone at the organization ticked it as correct; a link from before Pistachio reads true.
|
|
6
|
+
confirmed?: boolean;
|
|
7
|
+
// The saved html, or our standard text while none is saved.
|
|
8
|
+
document?: string;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
label?: string | null;
|
|
11
|
+
// A link from before Pistachio, still on the campaign.
|
|
12
|
+
legacy?: boolean;
|
|
13
|
+
link?: string | null;
|
|
14
|
+
// When it was last saved.
|
|
15
|
+
saved?: string | null;
|
|
16
|
+
type?: 'document' | 'link';
|
|
17
|
+
}
|
|
2
18
|
|
|
3
19
|
export interface Agreement {
|
|
4
|
-
// False: Drawbridge marks it inactive, and
|
|
20
|
+
// False: Drawbridge marks it inactive, and Manage is disabled.
|
|
5
21
|
active?: boolean;
|
|
6
|
-
//
|
|
22
|
+
// The one line under its title.
|
|
23
|
+
description?: string;
|
|
24
|
+
// Our standard document: its name, the pieces Insert lists, its text.
|
|
25
|
+
document?: { name: string; pieces: string[]; standard: string };
|
|
7
26
|
enforceLink?: boolean;
|
|
8
27
|
title: string;
|
|
9
|
-
|
|
28
|
+
// What it may be saved as: Document and Link, or Link alone while documents are switched off.
|
|
29
|
+
types?: ( 'document' | 'link' )[];
|
|
30
|
+
values?: AgreementValues;
|
|
10
31
|
// Shows the Required badge.
|
|
11
32
|
warning?: boolean;
|
|
12
33
|
}
|
|
13
34
|
|
|
14
35
|
export interface FormOrganizationCampaignAgreementProps {
|
|
15
|
-
|
|
36
|
+
agreement: Agreement;
|
|
37
|
+
data?: DocumentData;
|
|
38
|
+
// The wording entrants see while the agreement has no label ( SMS consent ).
|
|
39
|
+
defaultLabel?: string;
|
|
40
|
+
// Locks Enabled and says why ( SMS consent with no phone field ).
|
|
41
|
+
enabledLock?: string | null;
|
|
42
|
+
id: 'terms' | 'marketing' | 'sms' | 'privacy';
|
|
43
|
+
onError: ( error: Error ) => void;
|
|
44
|
+
onSuccess: ( response: unknown ) => void;
|
|
45
|
+
params: { campaign: string; organization: string };
|
|
46
|
+
// Read on Agreements: every field disabled, no tick and no Save.
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface FormOrganizationCampaignAgreementsProps {
|
|
51
|
+
// The campaign's agreements, as GET .../campaign answers them.
|
|
16
52
|
agreements: Record<string, Agreement>;
|
|
17
|
-
// The
|
|
53
|
+
// The values a document's pieces draw: the page payload's `documents`.
|
|
54
|
+
data?: DocumentData;
|
|
18
55
|
defaultLabels?: Record<string, string>;
|
|
56
|
+
// No Manage on Agreements: each drawer opens read only.
|
|
19
57
|
disabled?: boolean;
|
|
20
|
-
// What is typed, as it is typed: { [ id ] : { enabled, label, link } }.
|
|
21
|
-
onChange?: ( values: Record<string, Agreement[ 'values' ]> ) => void;
|
|
22
58
|
onError: ( error: Error ) => void;
|
|
23
|
-
// The agreement
|
|
59
|
+
// The agreement whose Manage was clicked.
|
|
24
60
|
onFocus?: ( id: string ) => void;
|
|
25
61
|
onSuccess: ( response: unknown ) => void;
|
|
26
62
|
params: { campaign: string; organization: string };
|
|
27
63
|
}
|
|
28
64
|
|
|
29
|
-
|
|
65
|
+
// The card's line: the link without https://, or "Saved Nov 10, 2026"; null reads "Not set up".
|
|
66
|
+
export declare const describe: ( values?: AgreementValues ) => string | null;
|
|
67
|
+
|
|
68
|
+
// One agreement's form, in its modal.
|
|
69
|
+
export declare const FormOrganizationCampaignAgreement: ComponentType<FormOrganizationCampaignAgreementProps>;
|
|
70
|
+
|
|
71
|
+
// The Agreements page's cards, each opening its drawer.
|
|
72
|
+
declare const FormOrganizationCampaignAgreements: ComponentType<FormOrganizationCampaignAgreementsProps>;
|
|
30
73
|
|
|
31
|
-
export default
|
|
74
|
+
export default FormOrganizationCampaignAgreements;
|