@drawbridge/components 0.1.35 → 0.1.37
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 +355 -68
- package/dist/advertisement.js +20 -15
- package/dist/advertisement.mjs +20 -15
- package/dist/bridge/advertisements.js +2 -4
- package/dist/bridge/advertisements.mjs +3 -5
- package/dist/bridge/fields.js +6 -89
- package/dist/bridge/fields.mjs +7 -89
- package/dist/bridge/form-subdomain-embed.js +1 -5
- package/dist/bridge/form-subdomain-embed.mjs +1 -5
- package/dist/bridge/form-subdomain-header.js +14 -21
- package/dist/bridge/form-subdomain-header.mjs +14 -20
- package/dist/bridge/form-subdomain-issue.js +8 -17
- package/dist/bridge/form-subdomain-issue.mjs +8 -17
- package/dist/bridge/form-subdomain-missions.js +52 -58
- package/dist/bridge/form-subdomain-missions.mjs +54 -60
- package/dist/bridge/form-subdomain.js +94 -223
- package/dist/bridge/form-subdomain.mjs +96 -222
- package/dist/bridge/lib/entry.js +6 -61
- package/dist/bridge/lib/entry.mjs +5 -51
- package/dist/bridge/lib/order.js +0 -23
- package/dist/bridge/lib/order.mjs +0 -20
- package/dist/bridge/template-layout.js +2 -5
- package/dist/bridge/template-layout.mjs +3 -6
- package/dist/bridge/template-modal.js +15 -82
- package/dist/bridge/template-modal.mjs +16 -83
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +75 -126
- package/dist/bridge/template-subdomain-gallery.mjs +75 -122
- package/dist/bridge/template-subdomain.js +14 -16
- package/dist/bridge/template-subdomain.mjs +15 -17
- package/dist/dashboard/avatar.js +0 -5
- package/dist/dashboard/avatar.mjs +0 -5
- package/dist/dashboard/card-affiliate.js +2 -3
- package/dist/dashboard/card-affiliate.mjs +2 -3
- package/dist/dashboard/card-campaign-switch.js +9 -34
- package/dist/dashboard/card-campaign-switch.mjs +8 -32
- package/dist/dashboard/card-connection.js +91 -51
- package/dist/dashboard/card-connection.mjs +89 -50
- package/dist/dashboard/card-order.js +14 -6
- package/dist/dashboard/card-order.mjs +14 -6
- package/dist/dashboard/card-section.js +26 -69
- package/dist/dashboard/card-section.mjs +26 -65
- package/dist/dashboard/card-tile.js +35 -3
- package/dist/dashboard/card-tile.mjs +34 -3
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/drawer-subscription.js +14 -52
- package/dist/dashboard/drawer-subscription.mjs +14 -52
- package/dist/dashboard/drawer.js +3 -20
- package/dist/dashboard/drawer.mjs +4 -21
- package/dist/dashboard/dropdown.js +2 -6
- package/dist/dashboard/dropdown.mjs +2 -6
- package/dist/dashboard/form-admin-subscription-custom.js +8 -72
- package/dist/dashboard/form-admin-subscription-custom.mjs +8 -72
- package/dist/dashboard/form-ai.js +148 -0
- package/dist/dashboard/form-ai.mjs +148 -1
- package/dist/dashboard/form-filters-analytics.js +62 -85
- package/dist/dashboard/form-filters-analytics.mjs +61 -85
- package/dist/dashboard/form-organization-brand.js +13 -30
- package/dist/dashboard/form-organization-brand.mjs +13 -30
- package/dist/dashboard/form-organization-campaign-advertisement.js +112 -38
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +112 -38
- package/dist/dashboard/form-organization-campaign-agreement.js +210 -414
- package/dist/dashboard/form-organization-campaign-agreement.mjs +212 -411
- package/dist/dashboard/form-organization-campaign-field-list.js +425 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +396 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +7 -48
- package/dist/dashboard/form-organization-campaign-field-number.mjs +7 -48
- package/dist/dashboard/form-organization-campaign-field-select.js +4 -15
- package/dist/dashboard/form-organization-campaign-field-select.mjs +4 -15
- package/dist/dashboard/form-organization-campaign-field-text.js +6 -46
- package/dist/dashboard/form-organization-campaign-field-text.mjs +6 -46
- package/dist/dashboard/form-organization-campaign-field-textarea.js +13 -22
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +13 -22
- package/dist/dashboard/form-organization-campaign-integration-age.js +35 -2
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +35 -2
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +1 -4
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +1 -4
- 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 +2 -1
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +2 -1
- 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 +3 -2
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +3 -2
- package/dist/dashboard/form-organization-campaign-page.js +265 -168
- package/dist/dashboard/form-organization-campaign-page.mjs +266 -170
- package/dist/dashboard/form-organization-campaign-section.js +107 -125
- package/dist/dashboard/form-organization-campaign-section.mjs +107 -121
- package/dist/dashboard/form-organization-campaign.js +9 -119
- package/dist/dashboard/form-organization-campaign.mjs +9 -118
- package/dist/dashboard/form-organization-file-frame.js +1 -7
- package/dist/dashboard/form-organization-file-frame.mjs +1 -7
- package/dist/dashboard/form-organization-workflow.js +545 -589
- package/dist/dashboard/form-organization-workflow.mjs +545 -590
- package/dist/dashboard/form-organization.js +0 -22
- package/dist/dashboard/form-organization.mjs +0 -22
- package/dist/dashboard/form-verify-prize.js +34 -114
- package/dist/dashboard/form-verify-prize.mjs +34 -111
- package/dist/dashboard/google.js +1 -8
- package/dist/dashboard/google.mjs +1 -8
- package/dist/dashboard/input-array.js +0 -2
- package/dist/dashboard/input-array.mjs +0 -2
- package/dist/dashboard/input-combobox.js +9 -0
- package/dist/dashboard/input-combobox.mjs +9 -0
- package/dist/dashboard/input-date.js +8 -3
- package/dist/dashboard/input-date.mjs +8 -3
- package/dist/dashboard/input-editor.js +6 -17
- package/dist/dashboard/input-editor.mjs +6 -17
- package/dist/dashboard/input-fields.js +437 -287
- package/dist/dashboard/input-fields.mjs +436 -287
- package/dist/dashboard/input-file.js +2 -70
- package/dist/dashboard/input-file.mjs +2 -70
- package/dist/dashboard/input-font.js +55 -64
- package/dist/dashboard/input-font.mjs +55 -64
- package/dist/dashboard/input-resource.js +1 -4
- package/dist/dashboard/input-resource.mjs +1 -4
- package/dist/dashboard/item-row.js +92 -0
- package/dist/dashboard/item-row.mjs +63 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/item-list.js +15 -0
- package/dist/dashboard/lib/item-list.mjs +14 -0
- package/dist/dashboard/lib/rail.js +17 -16
- package/dist/dashboard/lib/rail.mjs +16 -15
- package/dist/dashboard/lib/sms.js +2 -8
- package/dist/dashboard/lib/sms.mjs +1 -6
- package/dist/dashboard/list-resource.js +0 -2
- package/dist/dashboard/list-resource.mjs +0 -2
- package/dist/dashboard/menu.js +5 -54
- package/dist/dashboard/menu.mjs +5 -53
- package/dist/dashboard/modal.js +4 -19
- package/dist/dashboard/modal.mjs +5 -20
- package/dist/dashboard/order-sections.js +0 -4
- package/dist/dashboard/order-sections.mjs +0 -4
- package/dist/dashboard/preview.js +324 -838
- package/dist/dashboard/preview.mjs +324 -826
- package/dist/dashboard/provider-ui.js +12 -20
- package/dist/dashboard/provider-ui.mjs +13 -21
- package/dist/dashboard/recharts.js +28 -53
- package/dist/dashboard/recharts.mjs +28 -53
- package/dist/dashboard/swatch.js +0 -35
- package/dist/dashboard/swatch.mjs +0 -31
- package/dist/dashboard/table-contacts.js +10 -6
- package/dist/dashboard/table-contacts.mjs +10 -6
- package/dist/dashboard/table.js +3 -10
- package/dist/dashboard/table.mjs +3 -9
- package/dist/dashboard/template-dashboard.js +21 -13
- package/dist/dashboard/template-dashboard.mjs +21 -12
- package/dist/dashboard/template-rail.js +126 -198
- package/dist/dashboard/template-rail.mjs +125 -196
- package/dist/dashboard/template-socket.js +12 -0
- package/dist/dashboard/template-socket.mjs +12 -0
- package/dist/dashboard/template-ui.js +11 -20
- package/dist/dashboard/template-ui.mjs +13 -22
- package/dist/input-checkbox.js +1 -7
- package/dist/input-checkbox.mjs +1 -7
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +1 -3
- package/dist/input-select.mjs +1 -3
- package/dist/provider-font.js +3 -4
- package/dist/provider-font.mjs +3 -4
- package/dist/shared/badge.js +0 -15
- package/dist/shared/badge.mjs +0 -11
- package/dist/shared/carousel.js +7 -11
- package/dist/shared/carousel.mjs +7 -11
- package/dist/shared/lib/campaign.js +9 -3
- package/dist/shared/lib/campaign.mjs +9 -3
- package/dist/shared/lib/helpers.js +0 -24
- package/dist/shared/lib/helpers.mjs +0 -22
- package/dist/shared/lib/video.js +0 -6
- package/dist/shared/lib/video.mjs +0 -5
- package/dist/shared/sortable.js +10 -27
- package/dist/shared/sortable.mjs +10 -27
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +9 -127
- package/dist/video.mjs +11 -125
- package/package.json +20 -176
- package/types/bridge/fields.d.ts +1 -6
- package/types/bridge/form-subdomain-missions.d.ts +0 -2
- package/types/bridge/form-subdomain.d.ts +3 -62
- package/types/bridge/lib/entry.d.ts +7 -44
- package/types/bridge/lib/order.d.ts +2 -13
- package/types/bridge/subdomain-content.d.ts +0 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-gallery.d.ts +1 -13
- package/types/dashboard/card-campaign-switch.d.ts +1 -20
- package/types/dashboard/card-connection.d.ts +8 -0
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +1 -9
- package/types/dashboard/card-tile.d.ts +9 -4
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/drawer.d.ts +0 -3
- package/types/dashboard/form-ai.d.ts +17 -0
- package/types/dashboard/form-filters-analytics.d.ts +14 -0
- package/types/dashboard/form-organization-brand.d.ts +0 -3
- package/types/dashboard/form-organization-campaign-agreement.d.ts +10 -53
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-field-select.d.ts +1 -6
- package/types/dashboard/form-organization-campaign-field-text.d.ts +1 -5
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +0 -2
- package/types/dashboard/form-organization-campaign-page.d.ts +15 -9
- package/types/dashboard/form-organization-campaign-section.d.ts +8 -24
- package/types/dashboard/form-organization-campaign.d.ts +0 -3
- package/types/dashboard/form-organization-workflow.d.ts +4 -3
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-verify-prize.d.ts +3 -30
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-editor.d.ts +0 -9
- package/types/dashboard/input-fields.d.ts +5 -8
- package/types/dashboard/input-file.d.ts +0 -4
- package/types/dashboard/input-resource.d.ts +0 -1
- package/types/dashboard/item-row.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +5 -10
- package/types/dashboard/lib/rail.d.ts +1 -0
- package/types/dashboard/lib/sms.d.ts +0 -7
- package/types/dashboard/modal.d.ts +1 -3
- package/types/dashboard/preview.d.ts +10 -65
- package/types/dashboard/recharts.d.ts +0 -3
- package/types/dashboard/swatch.d.ts +0 -4
- package/types/dashboard/template-dashboard.d.ts +2 -3
- package/types/input-select.d.ts +0 -2
- package/types/shared/button.d.ts +1 -1
- package/types/shared/lib/helpers.d.ts +1 -22
- package/types/shared/lib/video.d.ts +0 -3
- package/types/shared/sortable.d.ts +0 -6
- package/types/video.d.ts +2 -18
- package/dist/bridge/form-subdomain-agreement.js +0 -165
- package/dist/bridge/form-subdomain-agreement.mjs +0 -132
- package/dist/dashboard/campaign-form.js +0 -1798
- package/dist/dashboard/campaign-form.mjs +0 -1769
- package/dist/dashboard/card-campaign-agreement.js +0 -172
- package/dist/dashboard/card-campaign-agreement.mjs +0 -139
- package/dist/dashboard/card-shortcut.js +0 -181
- package/dist/dashboard/card-shortcut.mjs +0 -152
- package/dist/dashboard/document-blocks.js +0 -305
- package/dist/dashboard/document-blocks.mjs +0 -270
- package/dist/dashboard/form-organization-campaign-advertisements.js +0 -374
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +0 -345
- package/dist/dashboard/form-organization-campaign-design.js +0 -258
- package/dist/dashboard/form-organization-campaign-design.mjs +0 -223
- package/dist/dashboard/form-organization-campaign-field-item.js +0 -585
- package/dist/dashboard/form-organization-campaign-field-item.mjs +0 -552
- package/dist/dashboard/form-organization-campaign-field-skill.js +0 -359
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +0 -330
- package/dist/dashboard/form-organization-campaign-footer.js +0 -178
- package/dist/dashboard/form-organization-campaign-footer.mjs +0 -149
- package/dist/dashboard/form-reposition.js +0 -396
- package/dist/dashboard/form-reposition.mjs +0 -359
- package/dist/dashboard/form-support.js +0 -189
- package/dist/dashboard/form-support.mjs +0 -160
- package/dist/dashboard/form-tests.js +0 -683
- package/dist/dashboard/form-tests.mjs +0 -646
- package/dist/dashboard/lib/ab-tests.js +0 -130
- package/dist/dashboard/lib/ab-tests.mjs +0 -94
- package/dist/dashboard/lib/focus.js +0 -93
- package/dist/dashboard/lib/focus.mjs +0 -69
- package/dist/dashboard/lib/form-page.js +0 -203
- package/dist/dashboard/lib/form-page.mjs +0 -155
- package/dist/dashboard/template-design.js +0 -564
- package/dist/dashboard/template-design.mjs +0 -531
- package/dist/dashboard/template-test-page.js +0 -436
- package/dist/dashboard/template-test-page.mjs +0 -407
- package/dist/dashboard/template-tests.js +0 -141
- package/dist/dashboard/template-tests.mjs +0 -112
- package/dist/dashboard/template-variant.js +0 -185
- package/dist/dashboard/template-variant.mjs +0 -156
- package/dist/icons/arrow-down-long.js +0 -47
- package/dist/icons/arrow-down-long.mjs +0 -28
- package/dist/icons/arrows-pointing-out.js +0 -46
- package/dist/icons/arrows-pointing-out.mjs +0 -27
- package/dist/icons/beaker.js +0 -46
- package/dist/icons/beaker.mjs +0 -27
- package/dist/icons/identification.js +0 -46
- package/dist/icons/identification.mjs +0 -27
- package/dist/icons/lifebuoy.js +0 -46
- package/dist/icons/lifebuoy.mjs +0 -27
- package/dist/icons/rectangle-group.js +0 -46
- package/dist/icons/rectangle-group.mjs +0 -27
- package/dist/icons/rectangle-stack.js +0 -46
- package/dist/icons/rectangle-stack.mjs +0 -27
- package/dist/icons/shopping-bag.js +0 -46
- package/dist/icons/shopping-bag.mjs +0 -27
- package/dist/icons/swatch.js +0 -46
- package/dist/icons/swatch.mjs +0 -27
- package/dist/icons/window.js +0 -46
- package/dist/icons/window.mjs +0 -27
- package/dist/icons/zoom-in.js +0 -46
- package/dist/icons/zoom-in.mjs +0 -27
- package/dist/input-answer.js +0 -60
- package/dist/input-answer.mjs +0 -27
- package/dist/shared/document-pieces.js +0 -295
- package/dist/shared/document-pieces.mjs +0 -260
- package/types/bridge/form-subdomain-agreement.d.ts +0 -27
- package/types/dashboard/campaign-form.d.ts +0 -42
- package/types/dashboard/card-campaign-agreement.d.ts +0 -26
- package/types/dashboard/card-shortcut.d.ts +0 -38
- package/types/dashboard/document-blocks.d.ts +0 -14
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +0 -15
- package/types/dashboard/form-organization-campaign-design.d.ts +0 -46
- package/types/dashboard/form-organization-campaign-field-item.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-footer.d.ts +0 -23
- package/types/dashboard/form-reposition.d.ts +0 -29
- package/types/dashboard/form-support.d.ts +0 -14
- package/types/dashboard/form-tests.d.ts +0 -78
- package/types/dashboard/lib/ab-tests.d.ts +0 -50
- package/types/dashboard/lib/escape.d.ts +0 -4
- package/types/dashboard/lib/focus.d.ts +0 -16
- package/types/dashboard/lib/form-page.d.ts +0 -25
- package/types/dashboard/template-design.d.ts +0 -30
- package/types/dashboard/template-test-page.d.ts +0 -69
- package/types/dashboard/template-tests.d.ts +0 -30
- package/types/dashboard/template-variant.d.ts +0 -18
- package/types/icons/arrow-down-long.d.ts +0 -5
- package/types/icons/arrows-pointing-out.d.ts +0 -5
- package/types/icons/beaker.d.ts +0 -5
- package/types/icons/identification.d.ts +0 -5
- package/types/icons/lifebuoy.d.ts +0 -5
- package/types/icons/rectangle-group.d.ts +0 -5
- package/types/icons/rectangle-stack.d.ts +0 -5
- package/types/icons/shopping-bag.d.ts +0 -5
- package/types/icons/swatch.d.ts +0 -5
- package/types/icons/window.d.ts +0 -5
- package/types/icons/zoom-in.d.ts +0 -5
- package/types/input-answer.d.ts +0 -15
- package/types/shared/document-pieces.d.ts +0 -34
- package/types/shared/lib/motion.d.ts +0 -2
|
@@ -13,7 +13,6 @@ 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.
|
|
17
16
|
gallery: unknown[];
|
|
18
17
|
headerClassName?: string;
|
|
19
18
|
linksSection?: ReactNode;
|
|
@@ -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 }>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { BrandStyle } from '../styles';
|
|
3
|
-
import { GalleryPosition } from '../shared/lib/helpers';
|
|
4
3
|
|
|
5
4
|
// An uploaded image or video: cdnSrc reads sizes[ size ] and needs updatedAt.
|
|
6
|
-
|
|
7
|
-
export interface GalleryFile {
|
|
5
|
+
export interface GalleryItem {
|
|
8
6
|
filename?: string;
|
|
9
7
|
frames?: { sizes?: Record<string, string> }[];
|
|
10
8
|
id: string;
|
|
@@ -13,16 +11,6 @@ export interface GalleryFile {
|
|
|
13
11
|
updatedAt?: string;
|
|
14
12
|
}
|
|
15
13
|
|
|
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
|
-
|
|
26
14
|
export interface TemplateSubdomainGalleryProps {
|
|
27
15
|
children: ( gallery: { controls: ReactNode; render: ReactNode } ) => ReactNode;
|
|
28
16
|
compact?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
2
|
import { CampaignSwitchesRecord } from '../shared/lib/campaign';
|
|
3
3
|
|
|
4
4
|
export interface CardCampaignSwitchCampaign extends CampaignSwitchesRecord {
|
|
@@ -11,11 +11,6 @@ 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
|
-
};
|
|
19
14
|
// Called with the campaign PUT's answer or refusal once the confirmation is sent.
|
|
20
15
|
onError?: ( error: Error ) => void;
|
|
21
16
|
onSuccess?: ( response: unknown ) => void;
|
|
@@ -35,17 +30,3 @@ export declare const HeaderCampaignSwitch: ComponentType<HeaderCampaignSwitchPro
|
|
|
35
30
|
|
|
36
31
|
// The Overview's Lead capture panel.
|
|
37
32
|
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>;
|
|
@@ -14,8 +14,16 @@ export interface CardConnectionProps extends CardConnectionHeaderProps {
|
|
|
14
14
|
// The connection document's own error entries; the first is shown.
|
|
15
15
|
errors?: { message?: string; [ key: string ]: unknown }[];
|
|
16
16
|
href?: string;
|
|
17
|
+
// The connection document's id: a connection already held never locks.
|
|
18
|
+
id?: string;
|
|
19
|
+
// The organization whose plan decides whether the card shows Upgrade.
|
|
20
|
+
organization?: { id?: string; plan?: unknown; [ key: string ]: unknown };
|
|
17
21
|
}
|
|
18
22
|
|
|
23
|
+
// The plan's reason when the organization's plan leaves this unconnected
|
|
24
|
+
// connection out, otherwise null.
|
|
25
|
+
export declare const connectionLock: ( organization?: CardConnectionProps[ 'organization' ], connection?: { id?: string; slug?: string } ) => string | null;
|
|
26
|
+
|
|
19
27
|
export declare const CardConnectionHeader: ComponentType<CardConnectionHeaderProps>;
|
|
20
28
|
|
|
21
29
|
declare const CardConnection: ComponentType<CardConnectionProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { Answer, AnswerField } from './answer-rows';
|
|
3
|
-
import {
|
|
3
|
+
import { ItemRowFile } from './item-row';
|
|
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?: ItemRowFile | string | null;
|
|
8
8
|
price?: number;
|
|
9
9
|
quantity?: number;
|
|
10
10
|
title?: string;
|
|
@@ -3,21 +3,13 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
3
3
|
export interface CardSectionProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
className?: string | null;
|
|
6
|
-
//
|
|
7
|
-
// page, outside the card, in view as the page scrolls ( Beside ). 1 by default.
|
|
6
|
+
// Each child a column, side by side from 1280 px; past the first, sticky. 1 by default.
|
|
8
7
|
columns?: 1 | 2;
|
|
9
8
|
cta?: ReactNode;
|
|
10
9
|
title?: ReactNode;
|
|
11
|
-
// 'gray' holds a part of a page that is not a section itself; 'white' by default.
|
|
12
|
-
variant?: 'gray' | 'white';
|
|
13
10
|
[ key: string ]: unknown;
|
|
14
11
|
}
|
|
15
12
|
|
|
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
|
-
|
|
21
13
|
declare const CardSection: ComponentType<CardSectionProps>;
|
|
22
14
|
|
|
23
15
|
export default CardSection;
|
|
@@ -9,10 +9,7 @@ export interface CardTileProps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface TileRecordPage {
|
|
12
|
-
|
|
13
|
-
gallery?: { file?: { sizes?: Record<string, string> }; [ key: string ]: unknown }[];
|
|
14
|
-
// What the page tile names the page by.
|
|
15
|
-
headline?: string;
|
|
12
|
+
gallery?: { sizes?: Record<string, string>; [ key: string ]: unknown }[];
|
|
16
13
|
id?: string;
|
|
17
14
|
images?: { preview?: { sizes?: Record<string, string> } };
|
|
18
15
|
process?: { ai?: { progress?: { completed?: number; total?: number }; status?: string } };
|
|
@@ -42,8 +39,16 @@ export interface TileCampaignProps {
|
|
|
42
39
|
updatedAt?: string | number | Date;
|
|
43
40
|
}
|
|
44
41
|
|
|
42
|
+
export interface TilePageProps {
|
|
43
|
+
campaign?: string;
|
|
44
|
+
organization?: string;
|
|
45
|
+
page?: TileRecordPage;
|
|
46
|
+
}
|
|
47
|
+
|
|
45
48
|
export declare const TileCampaign: ComponentType<TileCampaignProps>;
|
|
46
49
|
|
|
50
|
+
export declare const TilePage: ComponentType<TilePageProps>;
|
|
51
|
+
|
|
47
52
|
declare const CardTile: ComponentType<CardTileProps>;
|
|
48
53
|
|
|
49
54
|
export default CardTile;
|
|
@@ -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;
|
|
@@ -7,10 +7,7 @@ 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.
|
|
12
10
|
overlay?: boolean;
|
|
13
|
-
// Names the dialog.
|
|
14
11
|
title?: ReactNode;
|
|
15
12
|
}
|
|
16
13
|
|
|
@@ -28,6 +28,22 @@ 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
|
+
|
|
31
47
|
export interface FormAiTextContext {
|
|
32
48
|
callback: string;
|
|
33
49
|
instruction: string;
|
|
@@ -44,4 +60,5 @@ export interface FormAiTextProps {
|
|
|
44
60
|
export const FormAiBrand: ComponentType<FormAiBrandProps>;
|
|
45
61
|
export const FormAiCampaign: ComponentType<FormAiCampaignProps>;
|
|
46
62
|
export const FormAiImage: ComponentType<FormAiImageProps>;
|
|
63
|
+
export const FormAiPage: ComponentType<FormAiPageProps>;
|
|
47
64
|
export const FormAiText: ComponentType<FormAiTextProps>;
|
|
@@ -33,8 +33,22 @@ export interface FormFiltersAnalyticsProps {
|
|
|
33
33
|
onReset?: () => void;
|
|
34
34
|
// Resources reduced to ids, and only the active date mode's keys.
|
|
35
35
|
onSuccess: ( result: { filters: Record<string, unknown> } ) => void;
|
|
36
|
+
// The days a plan shows ( `organization.plan.analytics.show` ); null shows everything.
|
|
37
|
+
show?: number | null;
|
|
36
38
|
}
|
|
37
39
|
|
|
40
|
+
export interface AnalyticsFloor {
|
|
41
|
+
day: string;
|
|
42
|
+
month: string;
|
|
43
|
+
year: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// The first day a plan shows, or null when it shows everything it keeps.
|
|
47
|
+
export declare const analyticsFloor: ( show?: number | null, now?: Date ) => AnalyticsFloor | null;
|
|
48
|
+
|
|
49
|
+
// The Month / Year options a filter can pick, inside the plan's window and up to this month.
|
|
50
|
+
export declare const periodOptions: ( args: { floor?: AnalyticsFloor | null; key: string; now?: Date; options?: FormFiltersAnalyticsInput[ 'options' ]; year?: unknown } ) => FormFiltersAnalyticsInput[ 'options' ];
|
|
51
|
+
|
|
38
52
|
declare const FormFiltersAnalytics: ComponentType<FormFiltersAnalyticsProps>;
|
|
39
53
|
|
|
40
54
|
export default FormFiltersAnalytics;
|
|
@@ -11,9 +11,6 @@ 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;
|
|
17
14
|
disabled?: boolean;
|
|
18
15
|
onError: ( error: Error ) => void;
|
|
19
16
|
onSuccess: ( response: unknown ) => void;
|
|
@@ -1,74 +1,31 @@
|
|
|
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
|
-
}
|
|
18
2
|
|
|
19
3
|
export interface Agreement {
|
|
20
|
-
// False: Drawbridge marks it inactive, and
|
|
4
|
+
// False: Drawbridge marks it inactive, and it can't be changed.
|
|
21
5
|
active?: boolean;
|
|
22
|
-
//
|
|
23
|
-
description?: string;
|
|
24
|
-
// Our standard document: its name, the pieces Insert lists, its text.
|
|
25
|
-
document?: { name: string; pieces: string[]; standard: string };
|
|
6
|
+
// Requires a link while enabled (the terms agreement); otherwise one is optional.
|
|
26
7
|
enforceLink?: boolean;
|
|
27
8
|
title: string;
|
|
28
|
-
|
|
29
|
-
types?: ( 'document' | 'link' )[];
|
|
30
|
-
values?: AgreementValues;
|
|
9
|
+
values?: { enabled?: boolean; label?: string; link?: string | null };
|
|
31
10
|
// Shows the Required badge.
|
|
32
11
|
warning?: boolean;
|
|
33
12
|
}
|
|
34
13
|
|
|
35
14
|
export interface FormOrganizationCampaignAgreementProps {
|
|
36
|
-
|
|
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.
|
|
15
|
+
// The campaign's agreements, as GET .../campaign answers them, keyed terms, marketing, sms.
|
|
52
16
|
agreements: Record<string, Agreement>;
|
|
53
|
-
// The
|
|
54
|
-
data?: DocumentData;
|
|
17
|
+
// The wording shown, disabled, in an agreement's Label while it is off.
|
|
55
18
|
defaultLabels?: Record<string, string>;
|
|
56
|
-
// No Manage on Agreements: each drawer opens read only.
|
|
57
19
|
disabled?: boolean;
|
|
20
|
+
// What is typed, as it is typed: { [ id ] : { enabled, label, link } }.
|
|
21
|
+
onChange?: ( values: Record<string, Agreement[ 'values' ]> ) => void;
|
|
58
22
|
onError: ( error: Error ) => void;
|
|
59
|
-
// The agreement
|
|
23
|
+
// The agreement being edited.
|
|
60
24
|
onFocus?: ( id: string ) => void;
|
|
61
25
|
onSuccess: ( response: unknown ) => void;
|
|
62
26
|
params: { campaign: string; organization: string };
|
|
63
27
|
}
|
|
64
28
|
|
|
65
|
-
|
|
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>;
|
|
29
|
+
declare const FormOrganizationCampaignAgreement: ComponentType<FormOrganizationCampaignAgreementProps>;
|
|
73
30
|
|
|
74
|
-
export default
|
|
31
|
+
export default FormOrganizationCampaignAgreement;
|
|
@@ -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;
|
|
@@ -10,11 +10,8 @@ export interface FormOrganizationCampaignFieldNumberValues {
|
|
|
10
10
|
organization: string;
|
|
11
11
|
slug?: string;
|
|
12
12
|
type?: 'lead' | 'additional';
|
|
13
|
-
attributes?: { max?: number | null; min?: number | null
|
|
13
|
+
attributes?: { max?: number | null; min?: number | null };
|
|
14
14
|
label?: string;
|
|
15
|
-
// The custom section the question sits in, and the form's sections for its Section dropdown.
|
|
16
|
-
section?: string;
|
|
17
|
-
sections?: Array<{ label: string; value: string }>;
|
|
18
15
|
[ key: string ]: unknown;
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -6,20 +6,15 @@ import { ComponentType } from 'react';
|
|
|
6
6
|
export interface FormOrganizationCampaignFieldSelectValues {
|
|
7
7
|
campaign: string;
|
|
8
8
|
id?: string;
|
|
9
|
-
inputs?: Array<'
|
|
9
|
+
inputs?: Array<'label' | 'settings'>;
|
|
10
10
|
organization: string;
|
|
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
15
|
type?: 'lead' | 'additional' | 'order';
|
|
16
|
-
// The Required switch ( not on a prize question, which is always required ).
|
|
17
|
-
attributes?: { required?: boolean };
|
|
18
16
|
label?: string;
|
|
19
17
|
settings?: { options?: Array<{ option: string }> };
|
|
20
|
-
// The custom section the question sits in, and the form's sections for its Section dropdown.
|
|
21
|
-
section?: string;
|
|
22
|
-
sections?: Array<{ label: string; value: string }>;
|
|
23
18
|
[ key: string ]: unknown;
|
|
24
19
|
}
|
|
25
20
|
|
|
@@ -13,12 +13,8 @@ export interface FormOrganizationCampaignFieldTextValues {
|
|
|
13
13
|
slug?: string;
|
|
14
14
|
type?: 'lead' | 'additional';
|
|
15
15
|
// Defaults to a max length of 150, which is also the ceiling.
|
|
16
|
-
|
|
17
|
-
attributes?: { max?: number; required?: boolean };
|
|
16
|
+
attributes?: { max?: number };
|
|
18
17
|
label?: string;
|
|
19
|
-
// The custom section the question sits in, and the form's sections for its Section dropdown.
|
|
20
|
-
section?: string;
|
|
21
|
-
sections?: Array<{ label: string; value: string }>;
|
|
22
18
|
[ key: string ]: unknown;
|
|
23
19
|
}
|
|
24
20
|
|
|
@@ -12,11 +12,8 @@ export interface FormOrganizationCampaignFieldTextareaValues {
|
|
|
12
12
|
// 'order' with slug 'note': an Order note field on Your order.
|
|
13
13
|
type?: 'lead' | 'additional' | 'order';
|
|
14
14
|
// Defaults to a max length of 300 (the ceiling) and 3 rows (1 to 6).
|
|
15
|
-
attributes?: { max?: number;
|
|
15
|
+
attributes?: { max?: number; rows?: number };
|
|
16
16
|
label?: string;
|
|
17
|
-
// The custom section the question sits in, and the form's sections for its Section dropdown.
|
|
18
|
-
section?: string;
|
|
19
|
-
sections?: Array<{ label: string; value: string }>;
|
|
20
17
|
[ key: string ]: unknown;
|
|
21
18
|
}
|
|
22
19
|
|
|
@@ -7,8 +7,7 @@ export interface FormOrganizationCampaignIntegrationAgeValues {
|
|
|
7
7
|
enabled?: boolean;
|
|
8
8
|
added?: boolean;
|
|
9
9
|
organization: string;
|
|
10
|
-
|
|
11
|
-
settings?: { button?: string | null; description?: string | null; max?: number; min?: number; title?: string | null };
|
|
10
|
+
settings?: { max?: number | null; min?: number };
|
|
12
11
|
slug: string;
|
|
13
12
|
[ key: string ]: unknown;
|
|
14
13
|
}
|
|
@@ -4,8 +4,6 @@ import { FormOrganizationCampaignIntegrationValues } from './form-organization-c
|
|
|
4
4
|
export interface FormOrganizationCampaignIntegrationGeocodeSettings {
|
|
5
5
|
// [ longitude, latitude ].
|
|
6
6
|
coordinates?: [ number, number ];
|
|
7
|
-
// The searched place's formatted address, for "Within N km of <place>".
|
|
8
|
-
place?: string | null;
|
|
9
7
|
// Meters, up to 1,000,000.
|
|
10
8
|
radius?: number;
|
|
11
9
|
// Map zoom, UI only: stripped before the save.
|
|
@@ -3,25 +3,31 @@ import { Organization } from '../shared/lib/helpers';
|
|
|
3
3
|
import { CardAssetFile } from '../shared/card-asset';
|
|
4
4
|
import { CardTemplatePage } from './card-template';
|
|
5
5
|
|
|
6
|
+
export interface FormOrganizationCampaignPageProps {
|
|
7
|
+
// Shows the brand picker, and sends brand (or null) with the title.
|
|
8
|
+
canManageBrands?: boolean;
|
|
9
|
+
onError: ( error: Error ) => void;
|
|
10
|
+
onSuccess: ( response: unknown ) => void;
|
|
11
|
+
values: { campaign: string; organization: string; title?: string; [ key: string ]: unknown };
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
export interface FormOrganizationCampaignPageEditValues {
|
|
7
15
|
campaign: string;
|
|
8
16
|
description?: string | null;
|
|
9
|
-
|
|
10
|
-
gallery?: { description?: string; file: CardAssetFile; position?: { height: number; width: number; x: number; y: number } | null }[];
|
|
17
|
+
gallery?: CardAssetFile[];
|
|
11
18
|
headline?: string;
|
|
12
19
|
id: string;
|
|
13
20
|
images?: { logo?: CardAssetFile | null; preview?: CardAssetFile | null };
|
|
14
21
|
links?: unknown[];
|
|
15
22
|
organization: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
status?: 'drafted' | 'published';
|
|
16
25
|
style?: CardTemplatePage[ 'style' ] & { image?: { radius?: number }; input?: { radius?: number } };
|
|
17
|
-
|
|
18
|
-
variant?: boolean;
|
|
19
|
-
// The newest test holding the page; a variant's Title starts as its name.
|
|
20
|
-
test?: { id: string; name?: string; status?: string; title?: string } | null;
|
|
26
|
+
title?: string;
|
|
21
27
|
[ key: string ]: unknown;
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
// Reads app.fonts from the ['app'] query.
|
|
30
|
+
// Reads app.enums.page.status and app.fonts from the ['app'] query.
|
|
25
31
|
export interface FormOrganizationCampaignPageEditProps {
|
|
26
32
|
disabled?: boolean;
|
|
27
33
|
onError: ( error: Error ) => void;
|
|
@@ -29,9 +35,9 @@ export interface FormOrganizationCampaignPageEditProps {
|
|
|
29
35
|
// Called with the form values as they change, for the live preview.
|
|
30
36
|
onUpdate: ( values: unknown ) => void;
|
|
31
37
|
organization?: Organization;
|
|
32
|
-
// A page of a test: Content and Design tabs inside the form, one Save for both.
|
|
33
|
-
tabs?: boolean;
|
|
34
38
|
values?: FormOrganizationCampaignPageEditValues;
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
export declare const FormOrganizationCampaignPage: ComponentType<FormOrganizationCampaignPageProps>;
|
|
42
|
+
|
|
37
43
|
export declare const FormOrganizationCampaignPageEdit: ComponentType<FormOrganizationCampaignPageEditProps>;
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
// A section as GET .../sections returns it, plus the route ids.
|
|
4
|
-
// custom section ( POST .../section ). Type age: the age gate's step texts
|
|
5
|
-
// ( PUT .../section/age ).
|
|
3
|
+
// A section as GET .../sections returns it, plus the route ids.
|
|
6
4
|
export interface FormOrganizationCampaignSectionValues {
|
|
7
|
-
// The step's Next text; blank reads `fallback`, else Next.
|
|
8
|
-
button?: string | null;
|
|
9
5
|
campaign: string;
|
|
10
6
|
description?: string | null;
|
|
11
|
-
//
|
|
7
|
+
// Your order's Take orders.
|
|
12
8
|
enabled?: boolean;
|
|
13
|
-
//
|
|
14
|
-
fallback?: string;
|
|
15
|
-
// The campaign's giveaway is on: Enabled is locked off ( Your order ).
|
|
9
|
+
// Your order: whether the campaign's giveaway is on, which locks Take orders.
|
|
16
10
|
giveaway?: boolean;
|
|
17
|
-
id
|
|
11
|
+
id: 'information' | 'order';
|
|
18
12
|
organization: string;
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
// Your order's Show prices.
|
|
14
|
+
settings?: { prices?: boolean };
|
|
15
|
+
title?: string;
|
|
16
|
+
type: 'information' | 'order';
|
|
21
17
|
[ key: string ]: unknown;
|
|
22
18
|
}
|
|
23
19
|
|
|
@@ -28,18 +24,6 @@ export interface FormOrganizationCampaignSectionProps {
|
|
|
28
24
|
values: FormOrganizationCampaignSectionValues;
|
|
29
25
|
}
|
|
30
26
|
|
|
31
|
-
// A question's Move drawer: every custom section as a card, its own marked
|
|
32
|
-
// Current; pressing another asks first, then moves the question there.
|
|
33
|
-
export interface FormOrganizationCampaignFieldMoveProps {
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
onSuccess: ( response: unknown ) => void;
|
|
36
|
-
values: Record<string, unknown> & {
|
|
37
|
-
sections: Array<{ description?: string | null; label: string; questions: number; value: string }>;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export declare const FormOrganizationCampaignFieldMove: ComponentType<FormOrganizationCampaignFieldMoveProps>;
|
|
42
|
-
|
|
43
27
|
declare const FormOrganizationCampaignSection: ComponentType<FormOrganizationCampaignSectionProps>;
|
|
44
28
|
|
|
45
29
|
export default FormOrganizationCampaignSection;
|
|
@@ -56,7 +56,4 @@ export declare const copyPlaceholder: ( key: FormOrganizationCampaignCopyKey, aw
|
|
|
56
56
|
export declare const FormOrganizationCampaignCopy: ComponentType<FormOrganizationCampaignCopyProps>;
|
|
57
57
|
export declare const FormOrganizationCampaignNotifications: ComponentType<FormOrganizationCampaignFormProps>;
|
|
58
58
|
export declare const FormOrganizationCampaignTitle: ComponentType<FormOrganizationCampaignFormProps>;
|
|
59
|
-
|
|
60
|
-
// The Giveaway page's Winner claim window: days, 1 to 365, 7 to start.
|
|
61
|
-
export declare const FormOrganizationCampaignClaimWindow: ComponentType<FormOrganizationCampaignFormProps>;
|
|
62
59
|
export declare const FormOrganizationCampaignSettingsShop: ComponentType<FormOrganizationCampaignFormProps>;
|
|
@@ -141,6 +141,10 @@ export declare const stepReason: ( options: { entry?: WorkflowCatalogEntry | nul
|
|
|
141
141
|
|
|
142
142
|
// Whether a Step field's list holds a step to pick, beyond "Select a step";
|
|
143
143
|
// false disables the field.
|
|
144
|
+
// The option fields that lock a step the plan leaves out ( the catalog's
|
|
145
|
+
// `locked` ), or {} for a step the plan includes or the row already holds.
|
|
146
|
+
export declare const lockedStepOption: ( step?: { locked?: string; value?: string; [ key: string ]: unknown }, current?: string ) => Record<string, unknown>;
|
|
147
|
+
|
|
144
148
|
export declare const hasStepOptions: ( options?: Array<{ value?: string | null; [ key: string ]: unknown }> ) => boolean;
|
|
145
149
|
|
|
146
150
|
// The stored type of Auto response.
|
|
@@ -168,6 +172,3 @@ export declare const webhookSample: ( args: { campaign?: { id?: string; title?:
|
|
|
168
172
|
export declare const TextPreview: ComponentType<{ children?: import( 'react' ).ReactNode; from?: string | null }>;
|
|
169
173
|
// The team email's title and lines, for a new entry or an order.
|
|
170
174
|
export declare const teamSample: ( args: { campaign?: { title?: string } | null; event?: string; organization?: { title?: string } | null } ) => { lines: string[]; title: string };
|
|
171
|
-
|
|
172
|
-
// Whether the organization's members list can be read: the owner, on a plan with members or while members remain.
|
|
173
|
-
export declare const listsMembers: ( organization?: { capabilities?: Record<string, unknown>; plan?: unknown; totals?: { members?: number } } | null ) => boolean;
|
|
@@ -24,10 +24,10 @@ export interface FormOrganizationSubdomainProps extends Callbacks {
|
|
|
24
24
|
// One fact per form; each PUTs only its own field to /organization/:id/business.
|
|
25
25
|
export interface FormOrganizationBusinessFieldProps extends Callbacks {
|
|
26
26
|
// The fact this form edits.
|
|
27
|
-
name: 'email' | 'name' | '
|
|
27
|
+
name: 'email' | 'name' | 'website';
|
|
28
28
|
// The owner's address, the contact email's starting value while none is saved.
|
|
29
29
|
owner?: string;
|
|
30
|
-
values?: { business?: { email?: string; name?: string;
|
|
30
|
+
values?: { business?: { email?: string; name?: string; website?: string }; id?: string };
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Reads GET /app's currency options from the ['app'] query.
|