@drawbridge/components 0.1.33 → 0.1.35
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 +88 -37
- 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 +414 -210
- package/dist/dashboard/form-organization-campaign-agreement.mjs +411 -212
- 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 +589 -532
- package/dist/dashboard/form-organization-workflow.mjs +590 -533
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ChartDataset } from '../recharts';
|
|
2
|
+
|
|
3
|
+
// A page id to its whole-percent share of visitors; the shares add up to 100.
|
|
4
|
+
export type Shares = Record<string, number>;
|
|
5
|
+
|
|
6
|
+
// Shares in proportion to `shares`, as whole numbers adding up to `total` ( 100 ), each at least 1.
|
|
7
|
+
export declare const scale: ( shares: Shares | undefined, ids: string[], total?: number ) => Shares;
|
|
8
|
+
|
|
9
|
+
// Every page an even share: 34, 33 and 33 for three.
|
|
10
|
+
export declare const even: ( ids: string[] ) => Shares;
|
|
11
|
+
|
|
12
|
+
// One slider moved to `value`: the other pages share the rest in proportion.
|
|
13
|
+
export declare const move: ( shares: Shares, ids: string[], id: string, value: number ) => Shares;
|
|
14
|
+
|
|
15
|
+
// "Nov 9 – Nov 23", or null without both dates.
|
|
16
|
+
export declare const span: ( dates?: { endsAt?: string | Date | null; startsAt?: string | Date | null } ) => string | null;
|
|
17
|
+
|
|
18
|
+
// Whole days until `endsAt`, at least 0.
|
|
19
|
+
export declare const daysLeft: ( endsAt: string | Date, now?: number ) => number;
|
|
20
|
+
|
|
21
|
+
// Seven days, in milliseconds: the shortest a test runs.
|
|
22
|
+
export declare const WEEK: number;
|
|
23
|
+
|
|
24
|
+
// A lift as a row says it ( "+19%", "−5%" ), null with nothing to compare.
|
|
25
|
+
export declare const signed: ( lift: number | null | undefined ) => string | null;
|
|
26
|
+
|
|
27
|
+
// The ChartLine dataset keys for `total` pages, one shade each.
|
|
28
|
+
export declare const lines: ( total: number ) => ChartDataset[];
|
|
29
|
+
|
|
30
|
+
// A page's address in the builder: the Page row's for the live page ( `main` ) or
|
|
31
|
+
// one with no test, else under its test, so A/B Tests stays open in the menu.
|
|
32
|
+
export declare const variantHref: ( args: { campaign: string; main?: boolean; organization: string; test?: string | null; variant: string } ) => string;
|
|
33
|
+
|
|
34
|
+
// What the builder's page frame says: its back link ( a test's page only ), its
|
|
35
|
+
// request, its task bar ( a kept page's notice first ) and its title.
|
|
36
|
+
export declare const variantPage: ( args: { campaign: string; organization: string; test?: string; variant: string } ) => {
|
|
37
|
+
back?: string;
|
|
38
|
+
endpoint: string;
|
|
39
|
+
tasks: ( data: any ) => any;
|
|
40
|
+
title: ( data: any ) => string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// The query key the Page builder and the Design page both read a page under.
|
|
44
|
+
export declare const variantKey: ( args: { campaign: string; organization: string; variant: string } ) => unknown[];
|
|
45
|
+
|
|
46
|
+
// What a save of the page or of the design leaves out of date: the campaign and both menus.
|
|
47
|
+
export declare const variantSaved: ( args: { campaign: string; organization: string } ) => { queryKey: unknown[] }[];
|
|
48
|
+
|
|
49
|
+
// The campaign's address in preview mode, for a preview's frame.
|
|
50
|
+
export declare const variantPreview: ( campaign?: { share?: { url?: string }; tokens?: { admin?: { text?: string } } } | null ) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
// Where Tab goes inside a layer that covers the page; null leaves it to the browser.
|
|
4
|
+
export function tabTarget<Item>( args: { active: unknown; items: Item[]; shift: boolean } ): Item | null;
|
|
5
|
+
|
|
6
|
+
// Holds Tab inside `node` while `active`, moves focus in and hands it back on close.
|
|
7
|
+
export function useTrap(
|
|
8
|
+
active: boolean,
|
|
9
|
+
node: Element | RefObject<Element | null> | null,
|
|
10
|
+
options?: {
|
|
11
|
+
// false leaves moving focus in and back to the caller.
|
|
12
|
+
enter?: boolean;
|
|
13
|
+
// Asked at each Tab: whether the layer covers the page now.
|
|
14
|
+
when?: () => boolean;
|
|
15
|
+
}
|
|
16
|
+
): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Row = Record<string, any>;
|
|
2
|
+
|
|
3
|
+
export declare const MAX_SECTIONS: number;
|
|
4
|
+
export declare const MAX_ADS: number;
|
|
5
|
+
export declare const AFTER: string[];
|
|
6
|
+
export declare const advertisementsKey: ( params: { campaign: string; organization: string } ) => unknown[];
|
|
7
|
+
export declare const addedOnce: ( slug: string, keys?: string[] ) => boolean;
|
|
8
|
+
export declare const planLocked: ( section: Row ) => boolean;
|
|
9
|
+
export declare const giveawayLocked: ( section: Row ) => boolean;
|
|
10
|
+
export declare const sectionOn: ( section: Row ) => boolean;
|
|
11
|
+
export declare const formParts: ( sections?: Row[] | null ) => { after: Row | null; age: Row | null; customs: Row[]; information: Row | null; location: Row | null; order: Row | null };
|
|
12
|
+
export declare const lastStepId: ( steps?: Row[] ) => string | null;
|
|
13
|
+
export declare const asksPhone: ( sections?: Row[] ) => boolean;
|
|
14
|
+
export declare const ageRange: ( settings?: Row ) => string;
|
|
15
|
+
export declare const locationText: ( item: Row ) => string;
|
|
16
|
+
export declare const showsTotal: ( items?: Row[] ) => boolean;
|
|
17
|
+
export declare const footerAgreements: ( options: { agreements?: Row; phone?: boolean; texts?: boolean } ) => { key: string; label: string }[];
|
|
18
|
+
export declare const footerRows: ( agreements?: Row, texts?: boolean ) => string[];
|
|
19
|
+
export declare const privacyLink: ( agreements?: Row ) => string | null;
|
|
20
|
+
export declare const afterRows: ( order?: string[], response?: string ) => string[];
|
|
21
|
+
export declare const rowLabel: ( field: Record<string, unknown> ) => string;
|
|
22
|
+
export declare const itemPrice: ( field: Record<string, unknown> ) => number | null;
|
|
23
|
+
export declare const itemGroup: ( field: Record<string, unknown> ) => boolean;
|
|
24
|
+
export declare const counted: ( number?: number, total?: number ) => string;
|
|
25
|
+
export declare const formSlides: ( parts?: Record<string, unknown> ) => { id: string; title: string }[];
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// An item as the Item field's form holds it.
|
|
2
|
+
export interface ItemListItem {
|
|
3
|
+
attributes?: { max?: number | null };
|
|
4
|
+
description?: string | null;
|
|
5
|
+
id?: string;
|
|
6
|
+
image?: { filename?: string; id: string; mimetype?: string; sizes?: Record<string, string>; updatedAt?: string } | string | null;
|
|
7
|
+
name: string;
|
|
8
|
+
price?: number | null;
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
// The items as the field routes take them: image ids, explicit nulls.
|
|
7
|
-
export declare const itemsBody: ( items?: Partial<
|
|
12
|
+
export declare const itemsBody: ( items?: Partial<ItemListItem>[] ) => Array<{
|
|
8
13
|
attributes: { max: number | null };
|
|
9
14
|
description: string | null;
|
|
10
15
|
id?: string;
|
|
@@ -29,4 +29,3 @@ export function railLead( count: number ): string;
|
|
|
29
29
|
export function railView( args: { guide?: unknown; panel?: string | null } ): string | null;
|
|
30
30
|
export function railOverlap( a: DOMRectReadOnly, b: DOMRectReadOnly ): boolean;
|
|
31
31
|
export function railOnScreen( rect: DOMRectReadOnly, viewport: { height: number; width: number } ): boolean;
|
|
32
|
-
export function railTabTarget( args: { active: unknown; items: unknown[]; shift: boolean } ): unknown;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// Whether the platform texts at all: the api's `identityDefaults.sms`, false
|
|
2
|
+
// while Twilio is switched off on the platform.
|
|
3
|
+
export declare const textsOn: ( organization?: {
|
|
4
|
+
identityDefaults?: { sms?: boolean; [ key: string ]: unknown };
|
|
5
|
+
[ key: string ]: unknown;
|
|
6
|
+
} | null ) => boolean;
|
|
7
|
+
|
|
1
8
|
// Whether the organization's SMS number reads Active: an `sms` identity row on
|
|
2
9
|
// `identityItems` with `status : 'verified'`. Pending and Rejected cannot send.
|
|
3
10
|
export declare const smsNumberActive: ( organization?: {
|
|
@@ -11,8 +11,10 @@ export interface ModalProps {
|
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
// Needed for the shared close when onClose is not given.
|
|
13
13
|
queryClient: QueryClient;
|
|
14
|
-
// Without a title there is no header or close button.
|
|
14
|
+
// Names the dialog. Without a title there is no header or close button.
|
|
15
15
|
title?: ReactNode;
|
|
16
|
+
// 48rem in place of 28rem, for an agreement's document editor.
|
|
17
|
+
wide?: boolean;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
declare const Modal: ComponentType<ModalProps>;
|
|
@@ -1,31 +1,86 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from 'react';
|
|
1
|
+
import { ComponentType, Context, ReactNode, RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface PreviewOption {
|
|
4
|
+
key: string;
|
|
5
|
+
// Its own options: the row drills in, and the picker's value is the path.
|
|
6
|
+
options?: PreviewOption[];
|
|
7
|
+
value: unknown;
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
export interface PreviewStates {
|
|
11
|
+
// Handed the value picked, or the path, [ option, its option ], when nested.
|
|
4
12
|
onChange: ( value: unknown ) => void;
|
|
5
|
-
options:
|
|
13
|
+
options: PreviewOption[];
|
|
6
14
|
value: unknown;
|
|
7
15
|
}
|
|
8
16
|
|
|
17
|
+
export interface PreviewZoom {
|
|
18
|
+
key: string;
|
|
19
|
+
value: number | 'fit';
|
|
20
|
+
}
|
|
21
|
+
|
|
9
22
|
export interface PreviewProps {
|
|
10
23
|
children?: ReactNode;
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// The states
|
|
24
|
+
// Inside a SliderLayout, the slide it draws into.
|
|
25
|
+
id?: string;
|
|
26
|
+
// The step's own states, nested under it in the panel's one picker.
|
|
14
27
|
states?: PreviewStates;
|
|
15
|
-
// The brand the iframe's body is painted in ( background and text colours ).
|
|
16
|
-
style?: Record<string, unknown> | null;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
export interface PreviewPageProps {
|
|
20
|
-
|
|
31
|
+
// True by default: beside a form it runs to the page's foot. False: a fixed
|
|
32
|
+
// 520 px from 1280 px, inside a section with more under it ( the Overview ).
|
|
33
|
+
fill?: boolean;
|
|
34
|
+
// An email: a whole document, at 600 px wide, with no size buttons. Without `url`.
|
|
35
|
+
html?: string;
|
|
36
|
+
// A picker of the caller's own, in the chip at the top left.
|
|
37
|
+
left?: ReactNode;
|
|
21
38
|
// Posted to the page as { update } whenever it changes.
|
|
22
39
|
update?: Record<string, unknown>;
|
|
23
|
-
//
|
|
40
|
+
// A page: the share page's absolute address, in preview mode.
|
|
24
41
|
url?: string;
|
|
42
|
+
// The list the zoom offers; ZOOMS by default.
|
|
43
|
+
zooms?: PreviewZoom[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Slide {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SliderLayoutProps {
|
|
52
|
+
// No preview available in place of the step ( a section being dragged ).
|
|
53
|
+
blank?: boolean;
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
// The slide a press on the Form page's Footer shows.
|
|
56
|
+
last?: string | null;
|
|
57
|
+
// The preview's gray behind the panel, in place of the brand's background.
|
|
58
|
+
plain?: boolean;
|
|
59
|
+
slides: Slide[];
|
|
60
|
+
// The brand: its background behind the panel and its text colour.
|
|
61
|
+
style?: Record<string, unknown> | null;
|
|
62
|
+
// The list the zoom offers; ZOOMS by default.
|
|
63
|
+
zooms?: PreviewZoom[];
|
|
25
64
|
}
|
|
26
65
|
|
|
27
|
-
export declare const
|
|
66
|
+
export declare const ZOOMS: PreviewZoom[];
|
|
67
|
+
export declare const SIZES: { height: number; icon: ComponentType; key: string; label: string; width: number }[];
|
|
68
|
+
// The classes of the white chip every control over a preview sits on.
|
|
69
|
+
export declare const CHIP: string;
|
|
28
70
|
export declare const fitScale: ( space: { height: number; width: number }, size: { height: number; width: number } ) => number;
|
|
71
|
+
export declare const fitZoom: ( room: number, natural: number ) => number;
|
|
72
|
+
// A preview beside a form: from its top down to the scroller's foot, less the scroller's bottom padding.
|
|
73
|
+
export declare const fillHeight: ( args: { foot: number; gap: number; top: number } ) => number;
|
|
74
|
+
// Sizes `box` that way from 1280 px, as the page scrolls; nothing while `open` over the page.
|
|
75
|
+
export declare const useFill: ( box: RefObject<HTMLElement | null>, open?: boolean ) => void;
|
|
76
|
+
export declare const pressScrolls: ( target: unknown, card: unknown ) => boolean;
|
|
77
|
+
export declare const scrollTarget: ( positions: { node: number; page: number; scrollTop: number } ) => number;
|
|
78
|
+
export declare const States: ComponentType<PreviewStates & { align?: 'start' | 'end' }>;
|
|
79
|
+
export declare const NoPreview: ComponentType<{ children?: ReactNode }>;
|
|
80
|
+
export declare const Slider: Context<unknown>;
|
|
81
|
+
export declare const useCard: ( id: string ) => { className: string; props: Record<string, unknown> };
|
|
82
|
+
export declare const SliderLayout: ComponentType<SliderLayoutProps>;
|
|
83
|
+
export declare const Mail: ComponentType<{ html?: string; title?: string }>;
|
|
29
84
|
export declare const PreviewPage: ComponentType<PreviewPageProps>;
|
|
30
85
|
|
|
31
86
|
declare const Preview: ComponentType<PreviewProps>;
|
|
@@ -26,6 +26,9 @@ export interface ChartLineProps {
|
|
|
26
26
|
// Formats each value in the hover tooltip; a money chart passes one so a
|
|
27
27
|
// summed amount reads "$12.50". Defaults to the raw value.
|
|
28
28
|
format?: ( value: number ) => ReactNode;
|
|
29
|
+
// A name for each line, by its dataset key ( a test names its pages ). Defaults to
|
|
30
|
+
// the key's own label. Above three lines each line is filled lightly.
|
|
31
|
+
labels?: Partial<Record<ChartDataset, ReactNode>>;
|
|
29
32
|
// Clicking an entry toggles its series.
|
|
30
33
|
legend?: boolean;
|
|
31
34
|
}
|
|
@@ -9,6 +9,10 @@ export interface SwatchProps {
|
|
|
9
9
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
// A look's four colours ( background, text, button, button text ) as plain
|
|
13
|
+
// squares, each named for a reader.
|
|
14
|
+
export declare const Swatches: ComponentType<{ style?: Record<string, any> | null }>;
|
|
15
|
+
|
|
12
16
|
declare const Swatch: ComponentType<SwatchProps>;
|
|
13
17
|
|
|
14
18
|
export default Swatch;
|
|
@@ -110,6 +110,9 @@ export interface TemplateDashboardResourceProps<TData = any> extends TemplateDas
|
|
|
110
110
|
// Only a 404 is "Nothing found"; any other refusal shows the api's sentence.
|
|
111
111
|
export declare const isNotFound: ( error: unknown ) => boolean;
|
|
112
112
|
export declare const Refetch: ComponentType<RefetchProps>;
|
|
113
|
+
// The page's first next step in a bar. `flush` drops the page's gutter, for a
|
|
114
|
+
// bar drawn inside a column of the page.
|
|
115
|
+
export declare const TemplateDashboardTasks: ComponentType<{ flush?: boolean; items?: TemplateDashboardTask[] }>;
|
|
113
116
|
export declare const TemplateDashboardError: ComponentType<TemplateDashboardErrorProps>;
|
|
114
117
|
export declare function TemplateDashboardResource<TData = any>( props: TemplateDashboardResourceProps<TData> ): ReactNode;
|
|
115
118
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
// The campaign's Design page: its logo, preview image and style, the brand it
|
|
4
|
+
// is linked to, and a preview of its page or of an email about it. It reads the
|
|
5
|
+
// campaign ( its main page's id and its brand ) from the [ 'campaign', id ] query.
|
|
6
|
+
export interface TemplateDesignProps {
|
|
7
|
+
// The campaign's id.
|
|
8
|
+
campaign: string;
|
|
9
|
+
// The organization's id.
|
|
10
|
+
organization: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// What the design covers: the campaign's page, or an email about it in the
|
|
14
|
+
// design given, picked in the chip at the preview's top left.
|
|
15
|
+
export interface DesignPreviewProps {
|
|
16
|
+
// The campaign as GET /organization/:o/campaign/:c returns it.
|
|
17
|
+
campaign?: Record<string, unknown> | null;
|
|
18
|
+
// The design: the main page's logo and style ( or what a form holds ).
|
|
19
|
+
design?: Record<string, unknown> | null;
|
|
20
|
+
// As PreviewPage's: false keeps a fixed height inside a section.
|
|
21
|
+
fill?: boolean;
|
|
22
|
+
// In the same chip, after the picker ( the Overview's Edit ).
|
|
23
|
+
left?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare const DesignPreview: ComponentType<DesignPreviewProps>;
|
|
27
|
+
|
|
28
|
+
declare const TemplateDesign: ComponentType<TemplateDesignProps>;
|
|
29
|
+
|
|
30
|
+
export default TemplateDesign;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { Shares } from './lib/ab-tests';
|
|
3
|
+
import { TestDates } from './form-tests';
|
|
4
|
+
|
|
5
|
+
export type TestStatus = 'drafted' | 'scheduled' | 'running' | 'paused' | 'ended';
|
|
6
|
+
|
|
7
|
+
// One page of a test, as GET .../test/:id answers it.
|
|
8
|
+
export interface TestPage {
|
|
9
|
+
conversion: number;
|
|
10
|
+
entries: number;
|
|
11
|
+
headline?: string;
|
|
12
|
+
leads: number;
|
|
13
|
+
// Whole percent vs the first page; null with nothing to compare.
|
|
14
|
+
lift: number | null;
|
|
15
|
+
// The campaign's main page now.
|
|
16
|
+
main?: boolean;
|
|
17
|
+
// 'Current', 'Previous' or the variant's title.
|
|
18
|
+
name: string;
|
|
19
|
+
page: string;
|
|
20
|
+
share: number;
|
|
21
|
+
title?: string;
|
|
22
|
+
visitors: number;
|
|
23
|
+
weight?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// GET /organization/:o/campaign/:c/test/:id.
|
|
27
|
+
export interface Test {
|
|
28
|
+
createdAt?: string;
|
|
29
|
+
endsAt?: string | null;
|
|
30
|
+
id: string;
|
|
31
|
+
main?: string;
|
|
32
|
+
pages: TestPage[];
|
|
33
|
+
paused?: boolean;
|
|
34
|
+
startsAt?: string | null;
|
|
35
|
+
status: TestStatus;
|
|
36
|
+
title: string;
|
|
37
|
+
// One row per day: { date : 'YYYY/MM/DD', [ page id ] : conversion to date }.
|
|
38
|
+
trend?: ( { date: string } & Record<string, number | string> )[];
|
|
39
|
+
// The variant the test started from, its first page ( Current, or Previous once a promote replaced it ).
|
|
40
|
+
variant?: string;
|
|
41
|
+
winner?: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface TemplateTestProps {
|
|
45
|
+
// The A/B Tests list.
|
|
46
|
+
back?: string;
|
|
47
|
+
// Read access: every control disabled.
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
// The page builder's address for a page of the test.
|
|
50
|
+
hrefOf?: ( page: TestPage ) => string;
|
|
51
|
+
// Now, for the days left; Date.now() by default.
|
|
52
|
+
now?: number;
|
|
53
|
+
onAdd?: () => void;
|
|
54
|
+
onDates?: ( values: TestDates, apply: ( picked: TestDates ) => void ) => void;
|
|
55
|
+
onDelete?: () => void;
|
|
56
|
+
onDeleteVariant?: ( page: TestPage ) => void;
|
|
57
|
+
// An ended test's Edit test drawer.
|
|
58
|
+
onEdit?: () => void;
|
|
59
|
+
onPause?: () => void;
|
|
60
|
+
onPromote?: ( page: TestPage ) => void;
|
|
61
|
+
onResume?: () => void;
|
|
62
|
+
// The form's Save; throw to show the api's refusal at the top of the form.
|
|
63
|
+
onSubmit?: ( values: TestDates & { shares: Shares; title: string } ) => Promise<unknown> | unknown;
|
|
64
|
+
test: Test;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare const TemplateTest: ComponentType<TemplateTestProps>;
|
|
68
|
+
|
|
69
|
+
export default TemplateTest;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { QueryKey } from '@tanstack/react-query';
|
|
3
|
+
import { TestStatus } from './template-test-page';
|
|
4
|
+
|
|
5
|
+
// A row of GET /organization/:o/campaign/:c/tests.
|
|
6
|
+
export interface TestRow {
|
|
7
|
+
createdAt?: string;
|
|
8
|
+
endsAt?: string | null;
|
|
9
|
+
id: string;
|
|
10
|
+
startsAt?: string | null;
|
|
11
|
+
status: TestStatus;
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// A campaign's tests, newest first, with New. The api's locked answer shows with Upgrade.
|
|
16
|
+
export interface TemplateTestsProps {
|
|
17
|
+
// Read access: New disabled.
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
// GET /organization/:o/campaign/:c/tests.
|
|
20
|
+
endpoint: string;
|
|
21
|
+
// The test's address.
|
|
22
|
+
hrefOf: ( row: TestRow ) => string;
|
|
23
|
+
// Opens the Create test drawer.
|
|
24
|
+
onCreate?: () => void;
|
|
25
|
+
queryKey: QueryKey;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare const TemplateTests: ComponentType<TemplateTestsProps>;
|
|
29
|
+
|
|
30
|
+
export default TemplateTests;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// The page builder at either of its addresses: the campaign's Page row ( no
|
|
4
|
+
// `test` ) or a test's variant ( `test`, which gives the back link and the title ).
|
|
5
|
+
export interface TemplateVariantProps {
|
|
6
|
+
// The campaign's id.
|
|
7
|
+
campaign: string;
|
|
8
|
+
// The organization's id.
|
|
9
|
+
organization: string;
|
|
10
|
+
// The test the page is opened from: back to it, titled with the page's name there.
|
|
11
|
+
test?: string;
|
|
12
|
+
// The page's ( variant's ) id.
|
|
13
|
+
variant: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const TemplateVariant: ComponentType<TemplateVariantProps>;
|
|
17
|
+
|
|
18
|
+
export default TemplateVariant;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BrandStyle } from './styles';
|
|
3
|
+
|
|
4
|
+
export interface InputAnswerProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
onChange: ( value: number | null ) => void;
|
|
7
|
+
style?: BrandStyle;
|
|
8
|
+
value?: number | string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare const accepts: ( text: string ) => boolean;
|
|
12
|
+
|
|
13
|
+
declare const InputAnswer: ComponentType<InputAnswerProps>;
|
|
14
|
+
|
|
15
|
+
export default InputAnswer;
|
package/types/input-select.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface InputSelectOption {
|
|
|
10
10
|
export interface InputSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'onChange' | 'style' | 'value'> {
|
|
11
11
|
onChange: ( value: string ) => void;
|
|
12
12
|
options?: InputSelectOption[];
|
|
13
|
+
// The disabled first option, read while nothing is chosen; "Select" by default.
|
|
14
|
+
placeholder?: string;
|
|
13
15
|
style?: BrandStyle;
|
|
14
16
|
value?: string;
|
|
15
17
|
}
|
package/types/shared/button.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface ButtonProps {
|
|
|
20
20
|
// The brand object: passing it brands the button (the variant is ignored).
|
|
21
21
|
style?: BrandStyle | null;
|
|
22
22
|
type?: 'button' | 'reset' | 'submit';
|
|
23
|
-
variant?: 'ai' | 'error' | 'link' | 'primary' | 'secondary' | 'success';
|
|
23
|
+
variant?: 'ai' | 'card' | 'error' | 'link' | 'primary' | 'round' | 'secondary' | 'success';
|
|
24
24
|
[ key: string ]: unknown;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
// What a document's pieces draw: drawbridge-api lib/documents.js, the payload's `documents`.
|
|
4
|
+
export interface DocumentData {
|
|
5
|
+
age?: number | null;
|
|
6
|
+
claim?: number;
|
|
7
|
+
draws?: DocumentRow[];
|
|
8
|
+
missions?: DocumentRow[];
|
|
9
|
+
organizer?: string;
|
|
10
|
+
prizes?: object[];
|
|
11
|
+
prizeTotal?: string | null;
|
|
12
|
+
ranges?: DocumentRow[];
|
|
13
|
+
skill?: boolean;
|
|
14
|
+
timezone?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DocumentRow {
|
|
18
|
+
badge?: { text: string; type?: string };
|
|
19
|
+
text?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface DocumentPiece {
|
|
24
|
+
// [ block key, block heading ]
|
|
25
|
+
block: [ string, string ];
|
|
26
|
+
label: string;
|
|
27
|
+
render: ComponentType<any>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare const pieces: Record<string, DocumentPiece>;
|
|
31
|
+
|
|
32
|
+
export declare const DocumentRows: ComponentType<{ items?: DocumentRow[]; style?: object; view?: boolean }>;
|
|
33
|
+
|
|
34
|
+
export declare const DocumentPiece: ComponentType<{ data?: DocumentData; name: string; onClaim?: ( days: number ) => void; style?: object; view?: boolean }>;
|
|
@@ -127,7 +127,7 @@ export declare const usageBadge: ( allowance: Allowance | null | undefined ) =>
|
|
|
127
127
|
// @story admin/organizations-list
|
|
128
128
|
export declare const acceptingBadge: ( accepting: Accepting | null | undefined ) => Badge | null;
|
|
129
129
|
|
|
130
|
-
export type StatusKind = 'advertisement' | 'campaign' | 'connection' | 'draw' | 'invoice' | 'member' | 'order' | 'organization' | 'page' | 'prize' | 'range' | 'subscription' | 'workflow';
|
|
130
|
+
export type StatusKind = 'advertisement' | 'campaign' | 'connection' | 'draw' | 'invoice' | 'member' | 'order' | 'organization' | 'page' | 'prize' | 'range' | 'subscription' | 'test' | 'workflow';
|
|
131
131
|
|
|
132
132
|
// The badge beside a table title: each kind says which of its statuses get one; null for the rest.
|
|
133
133
|
export declare const statusBadge: ( kind: StatusKind, status: string | null | undefined ) => Badge | null;
|
|
@@ -146,3 +146,24 @@ export declare const years: ( props: { current: number | string; length?: number
|
|
|
146
146
|
|
|
147
147
|
// An image's alt text: this placement's description, else the file's name.
|
|
148
148
|
export declare const imageAlt: ( file?: { filename?: string } | null, description?: string | null ) => string;
|
|
149
|
+
|
|
150
|
+
/** A gallery item's crop, in percent of the original; zoom is 100 / width. */
|
|
151
|
+
export interface GalleryPosition {
|
|
152
|
+
height: number;
|
|
153
|
+
width: number;
|
|
154
|
+
x: number;
|
|
155
|
+
y: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** One item of a page's gallery, its file resolved. */
|
|
159
|
+
export interface GalleryItem<File = { id?: string; filename?: string; mimetype?: string; sizes?: Record<string, string>; updatedAt?: string }> {
|
|
160
|
+
description?: string;
|
|
161
|
+
file: File;
|
|
162
|
+
position?: GalleryPosition;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** A page's gallery as items; a cached gallery of file documents reads as items too. */
|
|
166
|
+
export declare const galleryItems: ( gallery?: Array<GalleryItem | Record<string, unknown>> | null, described?: Record<string, string> | null ) => GalleryItem[];
|
|
167
|
+
|
|
168
|
+
/** A gallery item as the page save sends it. */
|
|
169
|
+
export declare const galleryValue: ( item: GalleryItem ) => { description?: string; file?: string; position?: GalleryPosition };
|
|
@@ -7,3 +7,6 @@ export declare const videoErrorAction: ( options: { data?: { fatal?: boolean };
|
|
|
7
7
|
export declare const videoOverlay: ( options: { failed?: boolean; poster?: string; videoPaintable?: boolean } ) => 'poster' | 'loader' | 'warning' | null;
|
|
8
8
|
|
|
9
9
|
export declare const startSeek: ( options: { reset?: boolean; wasReset?: boolean } ) => number | null;
|
|
10
|
+
|
|
11
|
+
/** The player bar's time, minutes and seconds: 0:07, 12:30. */
|
|
12
|
+
export declare const videoClock: ( seconds: number ) => string;
|
|
@@ -3,7 +3,13 @@ import { ElementType, JSX, ReactNode } from 'react';
|
|
|
3
3
|
export interface SortableProps<T> {
|
|
4
4
|
classNameSortableItem?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
// The handle's own classes, in place of the icon-wide default.
|
|
7
|
+
handleClassName?: string;
|
|
8
|
+
// Names each drag handle for what it moves ( "Move Email" ).
|
|
9
|
+
handleLabel?: ( item: T ) => string;
|
|
6
10
|
items?: T[];
|
|
11
|
+
// True when a drag starts, false when it ends or is cancelled.
|
|
12
|
+
onDragging?: ( dragging: boolean ) => void;
|
|
7
13
|
onSort?: ( sorted: T[], move: { from: number; to: number } ) => void;
|
|
8
14
|
renderItem: ( item: T, index: number, handle: ReactNode ) => ReactNode;
|
|
9
15
|
sortableElement?: ElementType;
|