@drawbridge/components 0.1.45 → 0.1.47
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/dist/bridge/form-subdomain-shop.js +4 -1
- package/dist/bridge/form-subdomain-shop.mjs +4 -1
- package/dist/bridge/form-subdomain.js +23 -5
- package/dist/bridge/form-subdomain.mjs +23 -5
- package/dist/bridge/lib/entry.js +41 -0
- package/dist/bridge/lib/entry.mjs +40 -0
- package/dist/bridge/product-tile.js +4 -0
- package/dist/bridge/product-tile.mjs +4 -0
- package/dist/bridge/template-layout.js +27 -8
- package/dist/bridge/template-layout.mjs +28 -9
- package/dist/bridge/template-modal.js +11 -1
- package/dist/bridge/template-modal.mjs +11 -1
- package/dist/dashboard/avatar.js +2 -3
- package/dist/dashboard/avatar.mjs +2 -3
- package/dist/dashboard/campaign-form.js +172 -153
- package/dist/dashboard/campaign-form.mjs +172 -153
- package/dist/dashboard/campaign-share.js +347 -0
- package/dist/dashboard/campaign-share.mjs +314 -0
- package/dist/dashboard/card-affiliate.js +1 -1
- package/dist/dashboard/card-affiliate.mjs +1 -1
- package/dist/dashboard/card-campaign-switch.js +4 -1
- package/dist/dashboard/card-campaign-switch.mjs +4 -1
- package/dist/dashboard/form-organization-campaign-field-item.js +4 -1
- package/dist/dashboard/form-organization-campaign-field-item.mjs +4 -1
- package/dist/dashboard/form-organization-campaign-page.js +73 -39
- package/dist/dashboard/form-organization-campaign-page.mjs +73 -39
- package/dist/dashboard/input-combobox.js +6 -0
- package/dist/dashboard/input-combobox.mjs +6 -0
- package/dist/dashboard/input-fields.js +26 -3
- package/dist/dashboard/input-fields.mjs +26 -3
- package/dist/dashboard/input-font.js +2 -0
- package/dist/dashboard/input-font.mjs +2 -0
- package/dist/dashboard/input-group-ai.js +15 -3
- package/dist/dashboard/input-group-ai.mjs +15 -3
- package/dist/dashboard/lib/ab-tests.js +2 -2
- package/dist/dashboard/lib/ab-tests.mjs +2 -2
- package/dist/dashboard/lib/menu.js +19 -0
- package/dist/dashboard/lib/menu.mjs +18 -0
- package/dist/dashboard/menu.js +13 -2
- package/dist/dashboard/menu.mjs +13 -2
- package/dist/dashboard/preview.js +119 -52
- package/dist/dashboard/preview.mjs +119 -52
- package/dist/dashboard/recharts.js +10 -4
- package/dist/dashboard/recharts.mjs +10 -4
- package/dist/dashboard/template-dashboard.js +11 -1
- package/dist/dashboard/template-dashboard.mjs +11 -1
- package/dist/dashboard/template-design.js +209 -130
- package/dist/dashboard/template-design.mjs +210 -131
- package/dist/dashboard/template-ui.js +157 -55
- package/dist/dashboard/template-ui.mjs +158 -56
- package/dist/icons/flags.js +134 -0
- package/dist/icons/flags.mjs +115 -0
- package/dist/shared/carousel.js +14 -5
- package/dist/shared/carousel.mjs +14 -5
- package/package.json +11 -1
- package/types/bridge/form-subdomain.d.ts +13 -0
- package/types/bridge/lib/entry.d.ts +5 -0
- package/types/bridge/product-tile.d.ts +2 -0
- package/types/dashboard/campaign-share.d.ts +16 -0
- package/types/dashboard/form-organization-campaign-page.d.ts +8 -1
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/preview.d.ts +11 -3
- package/types/icons/flags.d.ts +5 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var flags_exports = {};
|
|
19
|
+
__export(flags_exports, {
|
|
20
|
+
default: () => flags_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(flags_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_react = require("react");
|
|
25
|
+
const POLE = "M3 3v1.5M3 21v-6M3 15V4.5";
|
|
26
|
+
const CLOTH = "M3 15l2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5Z";
|
|
27
|
+
const SCALE = 0.78;
|
|
28
|
+
const BACK = "translate(5.3 -1.2) scale(" + SCALE + ")";
|
|
29
|
+
const FRONT = "translate(-0.6 5.2) scale(" + SCALE + ")";
|
|
30
|
+
const Flags = (props) => {
|
|
31
|
+
const mask = (0, import_react.useId)();
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
33
|
+
"svg",
|
|
34
|
+
{
|
|
35
|
+
...{
|
|
36
|
+
fill: "none",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
...props
|
|
40
|
+
},
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
43
|
+
"mask",
|
|
44
|
+
{
|
|
45
|
+
...{
|
|
46
|
+
height: 24,
|
|
47
|
+
id: mask,
|
|
48
|
+
maskUnits: "userSpaceOnUse",
|
|
49
|
+
width: 24,
|
|
50
|
+
x: 0,
|
|
51
|
+
y: 0
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
"rect",
|
|
56
|
+
{
|
|
57
|
+
...{
|
|
58
|
+
fill: "white",
|
|
59
|
+
height: 24,
|
|
60
|
+
width: 24
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
65
|
+
"g",
|
|
66
|
+
{
|
|
67
|
+
...{
|
|
68
|
+
stroke: "black",
|
|
69
|
+
strokeLinecap: "round",
|
|
70
|
+
strokeLinejoin: "round",
|
|
71
|
+
strokeWidth: 4.5 / SCALE,
|
|
72
|
+
transform: FRONT
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
"path",
|
|
77
|
+
{
|
|
78
|
+
...{
|
|
79
|
+
d: CLOTH,
|
|
80
|
+
fill: "black"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
"path",
|
|
86
|
+
{
|
|
87
|
+
...{
|
|
88
|
+
d: POLE
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
) }),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
+
"g",
|
|
100
|
+
{
|
|
101
|
+
...{
|
|
102
|
+
mask: "url(#" + mask + ")"
|
|
103
|
+
},
|
|
104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
+
"path",
|
|
106
|
+
{
|
|
107
|
+
...{
|
|
108
|
+
d: POLE + CLOTH,
|
|
109
|
+
strokeLinecap: "round",
|
|
110
|
+
strokeLinejoin: "round",
|
|
111
|
+
strokeWidth: 1.5 / SCALE,
|
|
112
|
+
transform: BACK
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
|
+
"path",
|
|
120
|
+
{
|
|
121
|
+
...{
|
|
122
|
+
d: POLE + CLOTH,
|
|
123
|
+
strokeLinecap: "round",
|
|
124
|
+
strokeLinejoin: "round",
|
|
125
|
+
strokeWidth: 1.5 / SCALE,
|
|
126
|
+
transform: FRONT
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
var flags_default = Flags;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
const POLE = "M3 3v1.5M3 21v-6M3 15V4.5";
|
|
4
|
+
const CLOTH = "M3 15l2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5Z";
|
|
5
|
+
const SCALE = 0.78;
|
|
6
|
+
const BACK = "translate(5.3 -1.2) scale(" + SCALE + ")";
|
|
7
|
+
const FRONT = "translate(-0.6 5.2) scale(" + SCALE + ")";
|
|
8
|
+
const Flags = (props) => {
|
|
9
|
+
const mask = useId();
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
|
+
"svg",
|
|
12
|
+
{
|
|
13
|
+
...{
|
|
14
|
+
fill: "none",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
...props
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
21
|
+
"mask",
|
|
22
|
+
{
|
|
23
|
+
...{
|
|
24
|
+
height: 24,
|
|
25
|
+
id: mask,
|
|
26
|
+
maskUnits: "userSpaceOnUse",
|
|
27
|
+
width: 24,
|
|
28
|
+
x: 0,
|
|
29
|
+
y: 0
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"rect",
|
|
34
|
+
{
|
|
35
|
+
...{
|
|
36
|
+
fill: "white",
|
|
37
|
+
height: 24,
|
|
38
|
+
width: 24
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsxs(
|
|
43
|
+
"g",
|
|
44
|
+
{
|
|
45
|
+
...{
|
|
46
|
+
stroke: "black",
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round",
|
|
49
|
+
strokeWidth: 4.5 / SCALE,
|
|
50
|
+
transform: FRONT
|
|
51
|
+
},
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
...{
|
|
57
|
+
d: CLOTH,
|
|
58
|
+
fill: "black"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"path",
|
|
64
|
+
{
|
|
65
|
+
...{
|
|
66
|
+
d: POLE
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
"g",
|
|
78
|
+
{
|
|
79
|
+
...{
|
|
80
|
+
mask: "url(#" + mask + ")"
|
|
81
|
+
},
|
|
82
|
+
children: /* @__PURE__ */ jsx(
|
|
83
|
+
"path",
|
|
84
|
+
{
|
|
85
|
+
...{
|
|
86
|
+
d: POLE + CLOTH,
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
strokeWidth: 1.5 / SCALE,
|
|
90
|
+
transform: BACK
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
"path",
|
|
98
|
+
{
|
|
99
|
+
...{
|
|
100
|
+
d: POLE + CLOTH,
|
|
101
|
+
strokeLinecap: "round",
|
|
102
|
+
strokeLinejoin: "round",
|
|
103
|
+
strokeWidth: 1.5 / SCALE,
|
|
104
|
+
transform: FRONT
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
var flags_default = Flags;
|
|
113
|
+
export {
|
|
114
|
+
flags_default as default
|
|
115
|
+
};
|
package/dist/shared/carousel.js
CHANGED
|
@@ -140,7 +140,8 @@ const Carousel = ({
|
|
|
140
140
|
{
|
|
141
141
|
...{
|
|
142
142
|
className: [
|
|
143
|
-
|
|
143
|
+
// Each dot sits in a 24 px target, edge to edge ( WCAG 2.5.8; Darren, 2026-11-21 ).
|
|
144
|
+
"flex items-center",
|
|
144
145
|
justifies[dots.justify] || justifies.center,
|
|
145
146
|
dots.overlay ? "absolute inset-x-3 bottom-3" : "mt-4 py-3"
|
|
146
147
|
].join(" ")
|
|
@@ -160,11 +161,19 @@ const Carousel = ({
|
|
|
160
161
|
"span",
|
|
161
162
|
{
|
|
162
163
|
...{
|
|
163
|
-
className: "
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
className: "flex items-center justify-center w-6 h-6"
|
|
165
|
+
},
|
|
166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
167
|
+
"span",
|
|
168
|
+
{
|
|
169
|
+
...{
|
|
170
|
+
className: "block w-3 h-3 rounded-full border" + (style ? "" : " bg-black border-white"),
|
|
171
|
+
...style && {
|
|
172
|
+
style: (0, import_styles.dotStyle)(style, index === key)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
166
175
|
}
|
|
167
|
-
|
|
176
|
+
)
|
|
168
177
|
}
|
|
169
178
|
)
|
|
170
179
|
},
|
package/dist/shared/carousel.mjs
CHANGED
|
@@ -108,7 +108,8 @@ const Carousel = ({
|
|
|
108
108
|
{
|
|
109
109
|
...{
|
|
110
110
|
className: [
|
|
111
|
-
|
|
111
|
+
// Each dot sits in a 24 px target, edge to edge ( WCAG 2.5.8; Darren, 2026-11-21 ).
|
|
112
|
+
"flex items-center",
|
|
112
113
|
justifies[dots.justify] || justifies.center,
|
|
113
114
|
dots.overlay ? "absolute inset-x-3 bottom-3" : "mt-4 py-3"
|
|
114
115
|
].join(" ")
|
|
@@ -128,11 +129,19 @@ const Carousel = ({
|
|
|
128
129
|
"span",
|
|
129
130
|
{
|
|
130
131
|
...{
|
|
131
|
-
className: "
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
className: "flex items-center justify-center w-6 h-6"
|
|
133
|
+
},
|
|
134
|
+
children: /* @__PURE__ */ jsx(
|
|
135
|
+
"span",
|
|
136
|
+
{
|
|
137
|
+
...{
|
|
138
|
+
className: "block w-3 h-3 rounded-full border" + (style ? "" : " bg-black border-white"),
|
|
139
|
+
...style && {
|
|
140
|
+
style: dotStyle(style, index === key)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
134
143
|
}
|
|
135
|
-
|
|
144
|
+
)
|
|
136
145
|
}
|
|
137
146
|
)
|
|
138
147
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drawbridge/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./advertisement": {
|
|
6
6
|
"types": "./types/advertisement.d.ts",
|
|
@@ -192,6 +192,11 @@
|
|
|
192
192
|
"import": "./dist/dashboard/campaign-form.mjs",
|
|
193
193
|
"default": "./dist/dashboard/campaign-form.js"
|
|
194
194
|
},
|
|
195
|
+
"./dashboard/campaign-share": {
|
|
196
|
+
"types": "./types/dashboard/campaign-share.d.ts",
|
|
197
|
+
"import": "./dist/dashboard/campaign-share.mjs",
|
|
198
|
+
"default": "./dist/dashboard/campaign-share.js"
|
|
199
|
+
},
|
|
195
200
|
"./dashboard/card-affiliate": {
|
|
196
201
|
"types": "./types/dashboard/card-affiliate.d.ts",
|
|
197
202
|
"import": "./dist/dashboard/card-affiliate.mjs",
|
|
@@ -1267,6 +1272,11 @@
|
|
|
1267
1272
|
"import": "./dist/icons/flag.mjs",
|
|
1268
1273
|
"default": "./dist/icons/flag.js"
|
|
1269
1274
|
},
|
|
1275
|
+
"./icons/flags": {
|
|
1276
|
+
"types": "./types/icons/flags.d.ts",
|
|
1277
|
+
"import": "./dist/icons/flags.mjs",
|
|
1278
|
+
"default": "./dist/icons/flags.js"
|
|
1279
|
+
},
|
|
1270
1280
|
"./icons/github": {
|
|
1271
1281
|
"types": "./types/icons/github.d.ts",
|
|
1272
1282
|
"import": "./dist/icons/github.mjs",
|
|
@@ -46,12 +46,17 @@ export interface FormSubdomainProps {
|
|
|
46
46
|
onSuccess?: ( response: any ) => void;
|
|
47
47
|
params?: { slug?: string; subdomain?: string };
|
|
48
48
|
preview?: boolean;
|
|
49
|
+
// The dashboard's own previews: no Preview mode line.
|
|
50
|
+
quiet?: boolean;
|
|
49
51
|
// False while the campaign's giveaway is off: the Terms line about winning is left out.
|
|
50
52
|
giveaway?: boolean;
|
|
51
53
|
// False while texts are off on the platform: no SMS consent.
|
|
52
54
|
sms?: boolean;
|
|
53
55
|
// The step the form opens at ( a dashboard preview ), 0 by default.
|
|
54
56
|
step?: number;
|
|
57
|
+
// An agreement open over the form, and the location step drawn still ( the Form page's preview ).
|
|
58
|
+
read?: string | null;
|
|
59
|
+
still?: boolean;
|
|
55
60
|
style?: BrandStyle;
|
|
56
61
|
// The last step's button text, "Submit" when blank.
|
|
57
62
|
submit?: string | null;
|
|
@@ -71,6 +76,8 @@ export interface FormSubdomainAgeProps {
|
|
|
71
76
|
callback?: ( answer: { age: number; birthday: string } ) => void;
|
|
72
77
|
disabled?: boolean;
|
|
73
78
|
preview?: boolean;
|
|
79
|
+
// The dashboard's own previews: no Preview mode line.
|
|
80
|
+
quiet?: boolean;
|
|
74
81
|
style?: BrandStyle;
|
|
75
82
|
values?: AgeSettings;
|
|
76
83
|
}
|
|
@@ -111,6 +118,8 @@ export interface FormSubdomainSubmissionProps {
|
|
|
111
118
|
token?: string;
|
|
112
119
|
};
|
|
113
120
|
preview?: boolean;
|
|
121
|
+
// The dashboard's own previews: no Preview mode line.
|
|
122
|
+
quiet?: boolean;
|
|
114
123
|
slug?: string;
|
|
115
124
|
style?: BrandStyle;
|
|
116
125
|
subdomain?: string;
|
|
@@ -122,6 +131,8 @@ export interface FormSubdomainMessageProps {
|
|
|
122
131
|
button?: ReactNode;
|
|
123
132
|
message?: ReactNode;
|
|
124
133
|
preview?: boolean;
|
|
134
|
+
// The dashboard's own previews: no Preview mode line.
|
|
135
|
+
quiet?: boolean;
|
|
125
136
|
style?: BrandStyle;
|
|
126
137
|
svg?: ComponentType<{ className?: string; 'aria-hidden'?: boolean }>;
|
|
127
138
|
title?: ReactNode;
|
|
@@ -133,6 +144,8 @@ export interface FormSubdomainGeocodeProps {
|
|
|
133
144
|
callback?: ( response: unknown ) => void;
|
|
134
145
|
disabled?: boolean;
|
|
135
146
|
preview?: boolean;
|
|
147
|
+
// The dashboard's own previews: no Preview mode line.
|
|
148
|
+
quiet?: boolean;
|
|
136
149
|
// Draws the step as the browser asks, asking nothing ( the dashboard's Form page preview ).
|
|
137
150
|
still?: boolean;
|
|
138
151
|
style?: Record<string, unknown> | null;
|
|
@@ -37,6 +37,11 @@ export declare const AFTER: Array<'message' | 'missions' | 'advertisements'>;
|
|
|
37
37
|
export declare const afterOrder: ( data?: { after?: string[]; form?: { after?: string[] } | boolean } | null ) => string[];
|
|
38
38
|
|
|
39
39
|
// The missions a panel lists; `repeat` (the entry limit was reached) drops the Lead form row.
|
|
40
|
+
// The Form page's preview: the step and state it picked, as the page shows them.
|
|
41
|
+
export declare const previewStep: (
|
|
42
|
+
data: Record<string, any> | null | undefined,
|
|
43
|
+
open?: { panel?: Record<string, unknown>; state?: string; step?: string }
|
|
44
|
+
) => { face: string | null; modal: boolean; panel?: { name: string; data?: Record<string, unknown>; read?: string; step?: number } };
|
|
40
45
|
export declare const panelMissions: <T extends { type?: string }>( missions?: T[] | null, repeat?: boolean ) => T[] | null;
|
|
41
46
|
|
|
42
47
|
// The consent checkboxes' wording when an agreement has no label of its own.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CampaignShareButton {
|
|
4
|
+
'data-guide': string;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
svg: ComponentType<SVGProps<SVGSVGElement>>;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Share for a campaign's Overview: the header's Share button
|
|
12
|
+
// and the opener of Share your campaign.
|
|
13
|
+
export declare const useCampaignShare: ( options: { params: { campaign: string; organization: string } } ) => {
|
|
14
|
+
button: CampaignShareButton;
|
|
15
|
+
share: ( values?: object ) => void;
|
|
16
|
+
};
|
|
@@ -29,8 +29,15 @@ export interface FormOrganizationCampaignPageEditProps {
|
|
|
29
29
|
// Called with the form values as they change, for the live preview.
|
|
30
30
|
onUpdate: ( values: unknown ) => void;
|
|
31
31
|
organization?: Organization;
|
|
32
|
-
// A page of a test: Content and
|
|
32
|
+
// A page of a test: Content and Style tabs inside the form, one Save for both.
|
|
33
|
+
// With `images`, the Design page's main page: Style saves to the campaign's design.
|
|
33
34
|
tabs?: boolean;
|
|
35
|
+
// The Design page's linked brand: it sets the logo, preview image and style.
|
|
36
|
+
brand?: { id: string; title?: string } | null;
|
|
37
|
+
// The main page's Logo and Preview image, saved to the campaign's design.
|
|
38
|
+
images?: boolean;
|
|
39
|
+
// Drawn in the Style tab while `brand` is linked.
|
|
40
|
+
linked?: import( 'react' ).ReactNode;
|
|
34
41
|
values?: FormOrganizationCampaignPageEditValues;
|
|
35
42
|
}
|
|
36
43
|
|
|
@@ -18,6 +18,8 @@ export interface InputComboboxOption {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface InputComboboxProps {
|
|
21
|
+
// The name a reader hears when no visible label names it.
|
|
22
|
+
'aria-label'?: string;
|
|
21
23
|
disabled?: boolean;
|
|
22
24
|
onChange: ( value: unknown ) => void;
|
|
23
25
|
options: InputComboboxOption[];
|
|
@@ -23,6 +23,8 @@ export interface PreviewProps {
|
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
// Inside a SliderLayout, the slide it draws into.
|
|
25
25
|
id?: string;
|
|
26
|
+
// What the real page needs to draw the step beyond its state.
|
|
27
|
+
page?: Record<string, unknown>;
|
|
26
28
|
// The step's own states, nested under it in the panel's one picker.
|
|
27
29
|
states?: PreviewStates;
|
|
28
30
|
}
|
|
@@ -31,14 +33,18 @@ export interface PreviewPageProps {
|
|
|
31
33
|
// True by default: beside a form it runs to the page's foot. False: a fixed
|
|
32
34
|
// 520 px from 1280 px, inside a section with more under it ( the Overview ).
|
|
33
35
|
fill?: boolean;
|
|
34
|
-
// An email: a whole document, at
|
|
36
|
+
// An email: a whole document, at a phone's width or 600 px. Without `url`.
|
|
35
37
|
html?: string;
|
|
36
38
|
// A picker of the caller's own, in the chip at the top left.
|
|
37
39
|
left?: ReactNode;
|
|
38
|
-
//
|
|
40
|
+
// The Form page's step and its state: the page opens them ( `panel`, the After entry's missions and advertisements ).
|
|
41
|
+
open?: { panel?: Record<string, unknown>; state?: string; step?: string };
|
|
42
|
+
// Posted to the page as { open, update } whenever it changes.
|
|
39
43
|
update?: Record<string, unknown>;
|
|
40
44
|
// A page: the share page's absolute address, in preview mode.
|
|
41
45
|
url?: string;
|
|
46
|
+
// A new value loads the page again ( a save ).
|
|
47
|
+
version?: string;
|
|
42
48
|
// The list the zoom offers; ZOOMS by default.
|
|
43
49
|
zooms?: PreviewZoom[];
|
|
44
50
|
}
|
|
@@ -54,6 +60,8 @@ export interface SliderLayoutProps {
|
|
|
54
60
|
children?: ReactNode;
|
|
55
61
|
// The slide a press on the Form page's Footer shows.
|
|
56
62
|
last?: string | null;
|
|
63
|
+
// Every step shown in the campaign's real page, loaded again when `version` changes.
|
|
64
|
+
page?: { url: string; version?: string };
|
|
57
65
|
// The preview's gray behind the panel, in place of the brand's background.
|
|
58
66
|
plain?: boolean;
|
|
59
67
|
slides: Slide[];
|
|
@@ -72,7 +80,7 @@ export declare const fitZoom: ( room: number, natural: number ) => number;
|
|
|
72
80
|
// A preview beside a form: from its top down to the scroller's foot, less the scroller's bottom padding.
|
|
73
81
|
export declare const fillHeight: ( args: { foot: number; gap: number; top: number } ) => number;
|
|
74
82
|
// 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;
|
|
83
|
+
export declare const useFill: ( box: RefObject<HTMLElement | null>, open?: boolean, inset?: number, property?: 'height' | 'minHeight' ) => void;
|
|
76
84
|
export declare const pressScrolls: ( target: unknown, card: unknown ) => boolean;
|
|
77
85
|
export declare const scrollTarget: ( positions: { node: number; page: number; scrollTop: number } ) => number;
|
|
78
86
|
export declare const States: ComponentType<PreviewStates & { align?: 'start' | 'end' }>;
|