@drawbridge/components 0.1.12 → 0.1.14
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 +538 -0
- package/dist/bridge/form-subdomain-missions.mjs +502 -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 +265 -0
- package/dist/dashboard/card-campaign-switch.mjs +231 -0
- package/dist/dashboard/card-order.js +28 -11
- package/dist/dashboard/card-order.mjs +28 -11
- 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 +196 -0
- package/dist/dashboard/connection-workflows.mjs +162 -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-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 +223 -0
- package/dist/dashboard/form-organization-campaign-section.mjs +194 -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 +518 -686
- package/dist/dashboard/form-organization-workflow.mjs +517 -682
- 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 +51 -7
- package/dist/dashboard/template-socket.mjs +51 -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 +101 -0
- package/dist/input-code.mjs +78 -0
- package/dist/input-text.js +2 -1
- package/dist/input-text.mjs +2 -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 +117 -0
- package/dist/shared/lib/campaign.mjs +91 -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 +36 -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 +11 -0
- 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 +27 -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 +43 -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
|
@@ -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;
|
|
@@ -3,8 +3,9 @@ import { ComponentType } from 'react';
|
|
|
3
3
|
export interface AvatarProps {
|
|
4
4
|
// Its first letter shows when there is no name.
|
|
5
5
|
email?: string | null;
|
|
6
|
-
// A file record: its 100x100 ( 200x200 when large ) shows, cache-busted by its
|
|
7
|
-
|
|
6
|
+
// A file record: its 100x100 ( 200x200 when large ) shows, cache-busted by its
|
|
7
|
+
// updatedAt. A plain url ( a vendor's logo ) is drawn as it is, on white.
|
|
8
|
+
image?: string | { sizes?: Record<string, string>; updatedAt?: string | number | Date } | null;
|
|
8
9
|
// A person's name: its first and last words' letters show with no image.
|
|
9
10
|
name?: string | null;
|
|
10
11
|
size?: 'small' | 'default' | 'large';
|
|
@@ -12,6 +13,21 @@ export interface AvatarProps {
|
|
|
12
13
|
title?: string | null;
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
// Overlapping small circles: up to `max` avatars, then one black circle counting the rest.
|
|
17
|
+
export interface AvatarsProps {
|
|
18
|
+
// Links every circle.
|
|
19
|
+
href?: string;
|
|
20
|
+
// Each item is Avatar's props; its `title` is the circle's hover name.
|
|
21
|
+
items?: Omit<AvatarProps, 'size'>[];
|
|
22
|
+
max?: number;
|
|
23
|
+
// The count of the rest when the caller has counted already ( the api sends only the first few ).
|
|
24
|
+
more?: number | null;
|
|
25
|
+
// With nothing more, draws a plus in the last circle instead.
|
|
26
|
+
plus?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const Avatars: ComponentType<AvatarsProps>;
|
|
30
|
+
|
|
15
31
|
declare const Avatar: ComponentType<AvatarProps>;
|
|
16
32
|
|
|
17
33
|
export default Avatar;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SubscriptionActions {
|
|
4
|
+
cancel: () => void;
|
|
5
|
+
confirm: ( options: { body?: Record<string, unknown>; children?: unknown; defaultValues?: Record<string, unknown>; endpoint: string; method?: string; title: string } ) => void;
|
|
6
|
+
// Opens Add payment method; the callback receives the saved method.
|
|
7
|
+
method: ( callback: ( method: unknown ) => void ) => void;
|
|
8
|
+
methods: ( subscription: unknown ) => void;
|
|
9
|
+
resume: () => void;
|
|
10
|
+
subscribe: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// The plan, with a pending downgrade or cancellation and its date.
|
|
14
|
+
export declare const SubscriptionBadge: ComponentType<{ plan?: { title?: string }; subscription?: Record<string, unknown> | null }>;
|
|
15
|
+
|
|
16
|
+
// The Billing page's and the Dashboard's subscription dialogs, off the ['organization', id] query.
|
|
17
|
+
export declare const useSubscriptionActions: ( params: { organization: string } ) => SubscriptionActions;
|
|
18
|
+
|
|
19
|
+
// Start or Change subscription, then Manage payment method.
|
|
20
|
+
export declare const SubscriptionButtons: ComponentType<{ actions: Pick<SubscriptionActions, 'methods' | 'subscribe'>; organization?: Record<string, unknown> }>;
|
|
21
|
+
|
|
22
|
+
export default SubscriptionButtons;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { CampaignSwitchesRecord } from '../shared/lib/campaign';
|
|
3
|
+
|
|
4
|
+
export interface CardCampaignSwitchCampaign extends CampaignSwitchesRecord {
|
|
5
|
+
id?: string;
|
|
6
|
+
organization?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CardLeadCaptureProps {
|
|
10
|
+
// The campaign as GET /organization/:o/campaign/:c returns it; the switches draw its state.
|
|
11
|
+
campaign?: CardCampaignSwitchCampaign | null;
|
|
12
|
+
// Without Manage on campaigns.settings: the switches are disabled with a lock.
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
// Called with the campaign PUT's answer or refusal once the confirmation is sent.
|
|
15
|
+
onError?: ( error: Error ) => void;
|
|
16
|
+
onSuccess?: ( response: unknown ) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface HeaderCampaignSwitchProps extends CardLeadCaptureProps {
|
|
20
|
+
// Without Manage on campaigns.settings: disabled, with a tooltip saying why ( no lock ).
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
// Which switch: the Form page's or the Giveaway page's.
|
|
23
|
+
which: 'form' | 'giveaway';
|
|
24
|
+
// Any other attribute ( a `data-guide` ) lands on the switch's wrapper.
|
|
25
|
+
[ attribute: string ]: unknown;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// The Form and Giveaway pages' switch, for the page header's controls.
|
|
29
|
+
export declare const HeaderCampaignSwitch: ComponentType<HeaderCampaignSwitchProps>;
|
|
30
|
+
|
|
31
|
+
// The Overview's Lead capture panel.
|
|
32
|
+
export declare const CardLeadCapture: ComponentType<CardLeadCaptureProps>;
|
|
@@ -7,6 +7,15 @@ export interface CardOrderLine {
|
|
|
7
7
|
variantTitle?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
export interface CardOrderProvider {
|
|
11
|
+
// The store's API id for the order.
|
|
12
|
+
id?: string;
|
|
13
|
+
// The store's order number as the merchant sees it, e.g. "#1001". Absent on
|
|
14
|
+
// orders recorded before it was stored.
|
|
15
|
+
name?: string | null;
|
|
16
|
+
slug?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
export interface CardOrderProps {
|
|
11
20
|
// ISO code, lower or upper case; defaults to usd.
|
|
12
21
|
currency?: string;
|
|
@@ -14,9 +23,11 @@ export interface CardOrderProps {
|
|
|
14
23
|
gross?: number;
|
|
15
24
|
lines?: CardOrderLine[];
|
|
16
25
|
net?: number;
|
|
26
|
+
provider?: CardOrderProvider;
|
|
17
27
|
purchasedAt?: string | number | Date;
|
|
18
28
|
// Fee rate in percent; not shown for a redemption.
|
|
19
29
|
rate?: number | null;
|
|
30
|
+
// Picks the attribution sentence; anything but 'redemption' reads as a campaign order.
|
|
20
31
|
type?: 'conversion' | 'redemption' | string;
|
|
21
32
|
}
|
|
22
33
|
|
|
@@ -3,6 +3,8 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
3
3
|
export interface CardSectionProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
className?: string | null;
|
|
6
|
+
// Each child a column, side by side from 1280 px; past the first, sticky. 1 by default.
|
|
7
|
+
columns?: 1 | 2;
|
|
6
8
|
cta?: ReactNode;
|
|
7
9
|
title?: ReactNode;
|
|
8
10
|
[ key: string ]: unknown;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// One row of GET /organization/:id/connection/:idOrSlug/workflows.
|
|
4
|
+
export interface ConnectionWorkflowRow {
|
|
5
|
+
campaign?: { id: string; title?: string } | null;
|
|
6
|
+
id: string;
|
|
7
|
+
// Drawbridge's own chain: no trigger page to open.
|
|
8
|
+
locked?: boolean;
|
|
9
|
+
status?: 'active' | 'error' | 'paused' | string;
|
|
10
|
+
// The labels of the steps that use this connection.
|
|
11
|
+
steps?: string[];
|
|
12
|
+
title?: string;
|
|
13
|
+
trigger?: { event?: string | null; title?: string | null; type?: string | null };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ConnectionWorkflowsProps {
|
|
17
|
+
// The connection's workflows endpoint.
|
|
18
|
+
endpoint: string;
|
|
19
|
+
organization: string;
|
|
20
|
+
queryKey: unknown[];
|
|
21
|
+
// False for a member who cannot read workflows: no View.
|
|
22
|
+
view?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// "When a lead enters · Send webhook, Send email".
|
|
26
|
+
export declare const workflowLine: ( row?: ConnectionWorkflowRow | null ) => string;
|
|
27
|
+
|
|
28
|
+
// The red card's title and message for the chains in Error, or null.
|
|
29
|
+
export declare const workflowsNotRunning: ( items?: ConnectionWorkflowRow[] ) => { message: string; title: string } | null;
|
|
30
|
+
|
|
31
|
+
declare const ConnectionWorkflows: ComponentType<ConnectionWorkflowsProps>;
|
|
32
|
+
|
|
33
|
+
export default ConnectionWorkflows;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DeviceProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
type?: 'desktop' | 'tablet' | 'phone';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export declare const DEVICE_TYPES: Record<'desktop' | 'tablet' | 'phone', { model: string; safe?: number; screen: { height: number; width: number }; viewport: number }>;
|
|
9
|
+
|
|
10
|
+
declare const Device: ComponentType<DeviceProps>;
|
|
11
|
+
|
|
12
|
+
export default Device;
|
|
@@ -5,11 +5,12 @@ export interface FormAdminCampaignProps {
|
|
|
5
5
|
onError: ( error: Error ) => void;
|
|
6
6
|
onSuccess: ( response: unknown ) => void;
|
|
7
7
|
values?: {
|
|
8
|
+
// The two switches, as the campaign carries them.
|
|
9
|
+
form?: { enabled?: boolean };
|
|
10
|
+
giveaway?: { enabled?: boolean };
|
|
8
11
|
id?: string;
|
|
9
12
|
organization?: string;
|
|
10
|
-
status?: string;
|
|
11
13
|
title?: string;
|
|
12
|
-
type?: { key?: string; value?: string };
|
|
13
14
|
[ key: string ]: unknown;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -13,8 +13,8 @@ export interface FormAiCampaignProps {
|
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
onError: ( error: ApiError ) => void;
|
|
15
15
|
onSuccess: ( response: unknown ) => void;
|
|
16
|
-
//
|
|
17
|
-
values?: { organization?: string; title?: string | null;
|
|
16
|
+
// form and giveaway are the two switches, both on by default.
|
|
17
|
+
values?: { form?: boolean; giveaway?: boolean; organization?: string; title?: string | null; url?: string; [ key: string ]: unknown };
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface FormAiImageProps {
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
link?: string | null;
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export interface Agreement {
|
|
4
|
+
// False: Drawbridge marks it inactive, and it can't be changed.
|
|
5
|
+
active?: boolean;
|
|
6
|
+
// Requires a link while enabled (the terms agreement); otherwise one is optional.
|
|
7
|
+
enforceLink?: boolean;
|
|
8
|
+
title: string;
|
|
9
|
+
values?: { enabled?: boolean; label?: string; link?: string | null };
|
|
10
|
+
// Shows the Required badge.
|
|
11
|
+
warning?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface FormOrganizationCampaignAgreementProps {
|
|
15
|
+
// The campaign's agreements, as GET .../campaign answers them, keyed terms, marketing, sms.
|
|
16
|
+
agreements: Record<string, Agreement>;
|
|
17
|
+
// The wording shown, disabled, in an agreement's Label while it is off.
|
|
18
|
+
defaultLabels?: Record<string, string>;
|
|
15
19
|
disabled?: boolean;
|
|
20
|
+
// What is typed, as it is typed: { [ id ] : { enabled, label, link } }.
|
|
21
|
+
onChange?: ( values: Record<string, Agreement[ 'values' ]> ) => void;
|
|
16
22
|
onError: ( error: Error ) => void;
|
|
23
|
+
// The agreement being edited.
|
|
24
|
+
onFocus?: ( id: string ) => void;
|
|
17
25
|
onSuccess: ( response: unknown ) => void;
|
|
18
|
-
|
|
19
|
-
enforceLink?: boolean;
|
|
20
|
-
values: FormOrganizationCampaignAgreementValues;
|
|
26
|
+
params: { campaign: string; organization: string };
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
declare const FormOrganizationCampaignAgreement: ComponentType<FormOrganizationCampaignAgreementProps>;
|
|
@@ -6,12 +6,11 @@ import { ComponentType } from 'react';
|
|
|
6
6
|
export interface FormOrganizationCampaignFieldEmailValues {
|
|
7
7
|
campaign: string;
|
|
8
8
|
id?: string;
|
|
9
|
-
inputs?: Array<'label' | '
|
|
9
|
+
inputs?: Array<'label' | 'settings'>;
|
|
10
10
|
organization: string;
|
|
11
11
|
slug?: string;
|
|
12
12
|
type?: 'lead' | 'additional';
|
|
13
13
|
label?: string;
|
|
14
|
-
primary?: boolean;
|
|
15
14
|
settings?: {
|
|
16
15
|
blacklist?: Array<{ domain: string }>;
|
|
17
16
|
whitelist?: Array<{ domain: string }>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// One item of an Item list field. `image` is the resolved file on read; the
|
|
4
|
+
// dialog sends its id.
|
|
5
|
+
export interface FormOrganizationCampaignFieldListItem {
|
|
6
|
+
attributes?: { max?: number | null };
|
|
7
|
+
description?: string | null;
|
|
8
|
+
id?: string;
|
|
9
|
+
image?: { filename?: string; id: string; mimetype?: string; sizes?: Record<string, string>; updatedAt?: string } | string | null;
|
|
10
|
+
name: string;
|
|
11
|
+
price?: number | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// What the Form page passes: the saved field when editing, the route ids,
|
|
15
|
+
// Your order's Show prices and the organization's currency.
|
|
16
|
+
export interface FormOrganizationCampaignFieldListValues {
|
|
17
|
+
campaign: string;
|
|
18
|
+
currency?: string;
|
|
19
|
+
id?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
organization: string;
|
|
22
|
+
prices?: boolean;
|
|
23
|
+
settings?: { items?: FormOrganizationCampaignFieldListItem[] };
|
|
24
|
+
[ key: string ]: unknown;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface FormOrganizationCampaignFieldListProps {
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
onError: ( error: Error ) => void;
|
|
30
|
+
onSuccess: ( response: unknown ) => void;
|
|
31
|
+
values: FormOrganizationCampaignFieldListValues;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const FormOrganizationCampaignFieldList: ComponentType<FormOrganizationCampaignFieldListProps>;
|
|
35
|
+
|
|
36
|
+
export default FormOrganizationCampaignFieldList;
|
|
@@ -6,12 +6,11 @@ import { ComponentType } from 'react';
|
|
|
6
6
|
export interface FormOrganizationCampaignFieldPhoneValues {
|
|
7
7
|
campaign: string;
|
|
8
8
|
id?: string;
|
|
9
|
-
inputs?: Array<'label' | '
|
|
9
|
+
inputs?: Array<'label' | 'settings'>;
|
|
10
10
|
organization: string;
|
|
11
11
|
slug?: string;
|
|
12
12
|
type?: 'lead' | 'additional';
|
|
13
13
|
label?: string;
|
|
14
|
-
primary?: boolean;
|
|
15
14
|
// Country codes from the [ 'countries' ] query (GET /app/countries).
|
|
16
15
|
settings?: { countries?: string[] };
|
|
17
16
|
[ key: string ]: unknown;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { FormActionProps } from './form-action';
|
|
3
|
+
|
|
4
|
+
// A field as the api's fields read returns it. `workflows` names each step of
|
|
5
|
+
// this campaign that sends to the field, by its chain's and its own title.
|
|
6
|
+
export interface FormOrganizationCampaignFieldRemoveField {
|
|
7
|
+
id?: string;
|
|
8
|
+
slug?: string;
|
|
9
|
+
workflows?: Array<{ chain: string; step: string }>;
|
|
10
|
+
[ key: string ]: unknown;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FormOrganizationCampaignFieldRemoveProps extends Omit<FormActionProps, 'children'> {
|
|
14
|
+
field?: FormOrganizationCampaignFieldRemoveField;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// "Send SMS in When a lead enters uses this field. It won't run until you add a phone field again.", one per step.
|
|
18
|
+
export declare const fieldRemoveWarnings: ( field?: FormOrganizationCampaignFieldRemoveField | null ) => string[];
|
|
19
|
+
|
|
20
|
+
declare const FormOrganizationCampaignFieldRemove: ComponentType<FormOrganizationCampaignFieldRemoveProps>;
|
|
21
|
+
|
|
22
|
+
export default FormOrganizationCampaignFieldRemove;
|
|
@@ -11,7 +11,8 @@ export interface FormOrganizationCampaignFieldSelectValues {
|
|
|
11
11
|
// Set for a prize question: posts to the prize's field route, without `type`.
|
|
12
12
|
prize?: string;
|
|
13
13
|
slug?: string;
|
|
14
|
-
|
|
14
|
+
// 'order' with slug 'pickup': a Pickup field on Your order.
|
|
15
|
+
type?: 'lead' | 'additional' | 'order';
|
|
15
16
|
label?: string;
|
|
16
17
|
settings?: { options?: Array<{ option: string }> };
|
|
17
18
|
[ key: string ]: unknown;
|
|
@@ -9,7 +9,8 @@ export interface FormOrganizationCampaignFieldTextareaValues {
|
|
|
9
9
|
inputs?: Array<'attributes' | 'label'>;
|
|
10
10
|
organization: string;
|
|
11
11
|
slug?: string;
|
|
12
|
-
|
|
12
|
+
// 'order' with slug 'note': an Order note field on Your order.
|
|
13
|
+
type?: 'lead' | 'additional' | 'order';
|
|
13
14
|
// Defaults to a max length of 300 (the ceiling) and 3 rows (1 to 6).
|
|
14
15
|
attributes?: { max?: number; rows?: number };
|
|
15
16
|
label?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
// What the
|
|
4
|
-
// route ids and its slug. Without `
|
|
3
|
+
// What the Form page passes: the campaign's saved age gate (if any) plus the
|
|
4
|
+
// route ids and its slug. Without `added` the button reads Add; either way it PUTs to /integration/:slug.
|
|
5
5
|
export interface FormOrganizationCampaignIntegrationAgeValues {
|
|
6
6
|
campaign: string;
|
|
7
7
|
enabled?: boolean;
|
|
8
|
-
|
|
8
|
+
added?: boolean;
|
|
9
9
|
organization: string;
|
|
10
10
|
settings?: { max?: number | null; min?: number };
|
|
11
11
|
slug: string;
|
|
@@ -3,11 +3,11 @@ import { ComponentType } from 'react';
|
|
|
3
3
|
export interface FormOrganizationCampaignIntegrationValues {
|
|
4
4
|
campaign: string;
|
|
5
5
|
enabled?: boolean;
|
|
6
|
-
//
|
|
7
|
-
|
|
6
|
+
// True once the tool is on the campaign: the button reads Save instead of Add.
|
|
7
|
+
added?: boolean;
|
|
8
8
|
organization: string;
|
|
9
9
|
settings?: object;
|
|
10
|
-
// The
|
|
10
|
+
// The tool's slug, e.g. 'recaptcha', 'gtm', 'geocode': the form PUTs to /integration/:slug.
|
|
11
11
|
slug: string;
|
|
12
12
|
[ key: string ]: unknown;
|
|
13
13
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// A mission as GET /organization/:o/campaign/:c/missions lists it, plus the route ids.
|
|
4
|
+
export interface FormOrganizationCampaignMissionValues {
|
|
5
|
+
campaign: string;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
// Entries per completion, 0 to 50.
|
|
8
|
+
entries?: number;
|
|
9
|
+
id: string;
|
|
10
|
+
// Maximum completions, 1 to 50, counted per the mission's own Count
|
|
11
|
+
// completions per (a mission without one counts per campaign). A once-only
|
|
12
|
+
// mission (Verify email, Verify phone) has none.
|
|
13
|
+
limit?: { count?: number; per?: 'campaign' | 'day' | 'range' };
|
|
14
|
+
// Why the mission can't be turned on ("Needs an active SMS number"): the
|
|
15
|
+
// dialog's Status is off and disabled, reading it. A row already on can
|
|
16
|
+
// still be turned off.
|
|
17
|
+
locked?: string;
|
|
18
|
+
organization: string;
|
|
19
|
+
// Why the mission is not offered as it stands, shown on its row.
|
|
20
|
+
reason?: string;
|
|
21
|
+
// Whether the mission repeats ( its manifest's ); a once-only mission has no limit.
|
|
22
|
+
repeats?: boolean;
|
|
23
|
+
type?: 'form' | 'email' | 'phone' | 'share';
|
|
24
|
+
[ key: string ]: unknown;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface FormOrganizationCampaignMissionProps {
|
|
28
|
+
// Without Manage on campaigns.missions.
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
onError: ( error: Error ) => void;
|
|
31
|
+
onSuccess: ( response: unknown ) => void;
|
|
32
|
+
values: FormOrganizationCampaignMissionValues;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Whether the mission repeats (its manifest): the dialog draws the limit only then.
|
|
36
|
+
export declare const repeats: ( values?: { type?: string } ) => boolean;
|
|
37
|
+
|
|
38
|
+
declare const FormOrganizationCampaignMission: ComponentType<FormOrganizationCampaignMissionProps>;
|
|
39
|
+
|
|
40
|
+
export default FormOrganizationCampaignMission;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// A section as GET .../sections returns it, plus the route ids.
|
|
4
|
+
export interface FormOrganizationCampaignSectionValues {
|
|
5
|
+
campaign: string;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
// Your order's Take orders.
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
id: 'information' | 'order';
|
|
10
|
+
organization: string;
|
|
11
|
+
// Your order's Show prices.
|
|
12
|
+
settings?: { prices?: boolean };
|
|
13
|
+
title?: string;
|
|
14
|
+
type: 'information' | 'order';
|
|
15
|
+
[ key: string ]: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FormOrganizationCampaignSectionProps {
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onError: ( error: Error ) => void;
|
|
21
|
+
onSuccess: ( response: unknown ) => void;
|
|
22
|
+
values: FormOrganizationCampaignSectionValues;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare const FormOrganizationCampaignSection: ComponentType<FormOrganizationCampaignSectionProps>;
|
|
26
|
+
|
|
27
|
+
export default FormOrganizationCampaignSection;
|
|
@@ -2,28 +2,26 @@ import { ComponentType } from 'react';
|
|
|
2
2
|
|
|
3
3
|
type OnError = ( error: Error & { status?: number; data?: unknown } ) => void;
|
|
4
4
|
|
|
5
|
+
export type FormOrganizationCampaignCopyKey = 'active' | 'button' | 'confirmation' | 'inactive' | 'order' | 'rejection' | 'title';
|
|
6
|
+
|
|
5
7
|
export interface FormOrganizationCampaignValues {
|
|
6
8
|
brand?: { id: string; title?: string; [ key: string ]: unknown } | null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
// Create: the two switches, both on by default. An existing campaign carries
|
|
10
|
+
// { enabled, copy }; a blank copy text is null and falls back to the default.
|
|
11
|
+
form?: boolean | { copy?: Partial<Record<FormOrganizationCampaignCopyKey, string | null>>; enabled?: boolean; [ key: string ]: unknown };
|
|
12
|
+
// An existing campaign's giveaway carries the winner's message, sent as giveaway.notifications.
|
|
13
|
+
giveaway?: boolean | {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
notifications?: { draw?: { message?: string; score?: Record<string, unknown> | null; subject?: string; text?: string } };
|
|
16
|
+
[ key: string ]: unknown;
|
|
13
17
|
};
|
|
14
18
|
id?: string;
|
|
15
19
|
industry?: string | null;
|
|
16
|
-
notifications?: {
|
|
17
|
-
draw?: { message?: string; score?: Record<string, unknown> | null; subject?: string; text?: string };
|
|
18
|
-
};
|
|
19
20
|
organization?: string;
|
|
20
|
-
settings?: { submissionEntryFilter?: 'campaign' | 'day' | 'range'; submissionEntryLimit?: number };
|
|
21
21
|
shop?: { productColumns?: 1 | 2 };
|
|
22
|
-
status?: string;
|
|
23
22
|
// A template id: the new campaign copies it and the industry is not asked.
|
|
24
23
|
template?: string | null;
|
|
25
24
|
title?: string | null;
|
|
26
|
-
type?: 'default' | 'giveaway' | string;
|
|
27
25
|
[ key: string ]: unknown;
|
|
28
26
|
}
|
|
29
27
|
|
|
@@ -34,16 +32,28 @@ export interface FormOrganizationCampaignFormProps {
|
|
|
34
32
|
values?: FormOrganizationCampaignValues;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
// Create. Reads the
|
|
35
|
+
// Create: title, the Form and Giveaway switches, industry and brand. Reads the industries from [ 'app' ] in the query cache.
|
|
38
36
|
export interface FormOrganizationCampaignProps extends FormOrganizationCampaignFormProps {
|
|
39
37
|
canManageBrands?: boolean;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
export declare const FormOrganizationCampaign: ComponentType<FormOrganizationCampaignProps>;
|
|
43
|
-
|
|
41
|
+
// The Content page's form: `sections` of texts under headings, one Save, sent as form.copy.
|
|
42
|
+
export interface FormOrganizationCampaignCopyProps extends FormOrganizationCampaignFormProps {
|
|
43
|
+
// Entries are being awarded right now: the Panel title's placeholder.
|
|
44
|
+
awarding?: boolean;
|
|
45
|
+
// What is typed, as it is typed.
|
|
46
|
+
onChange?: ( copy: Partial<Record<FormOrganizationCampaignCopyKey, string>> ) => void;
|
|
47
|
+
// The text being edited.
|
|
48
|
+
onFocus?: ( key: FormOrganizationCampaignCopyKey ) => void;
|
|
49
|
+
// [ [ heading, keys ] ].
|
|
50
|
+
sections: [ string, FormOrganizationCampaignCopyKey[] ][];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// A blank text's placeholder, its fallback; the Panel title's follows `awarding`.
|
|
54
|
+
export declare const copyPlaceholder: ( key: FormOrganizationCampaignCopyKey, awarding?: boolean ) => string | undefined;
|
|
55
|
+
|
|
56
|
+
export declare const FormOrganizationCampaignCopy: ComponentType<FormOrganizationCampaignCopyProps>;
|
|
44
57
|
export declare const FormOrganizationCampaignNotifications: ComponentType<FormOrganizationCampaignFormProps>;
|
|
45
58
|
export declare const FormOrganizationCampaignTitle: ComponentType<FormOrganizationCampaignFormProps>;
|
|
46
|
-
// Reads the status enum from [ 'app' ] in the query cache.
|
|
47
|
-
export declare const FormOrganizationCampaignStatus: ComponentType<FormOrganizationCampaignFormProps>;
|
|
48
59
|
export declare const FormOrganizationCampaignSettingsShop: ComponentType<FormOrganizationCampaignFormProps>;
|
|
49
|
-
export declare const FormOrganizationCampaignSettingsLimits: ComponentType<FormOrganizationCampaignFormProps>;
|
|
@@ -36,6 +36,8 @@ export interface FormOrganizationIdentityEmailProps {
|
|
|
36
36
|
values?: {
|
|
37
37
|
address?: { address?: string; [ key: string ]: unknown } | null;
|
|
38
38
|
domain?: string;
|
|
39
|
+
// The organization's business.website; a new sending domain is its domain.
|
|
40
|
+
website?: string | null;
|
|
39
41
|
errors?: { message?: string }[];
|
|
40
42
|
from?: string;
|
|
41
43
|
id?: string;
|