@drawbridge/components 0.1.37 → 0.1.39

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.
Files changed (329) hide show
  1. package/components/styles.css +68 -355
  2. package/dist/advertisement.js +15 -20
  3. package/dist/advertisement.mjs +15 -20
  4. package/dist/bridge/advertisements.js +4 -2
  5. package/dist/bridge/advertisements.mjs +5 -3
  6. package/dist/bridge/fields.js +89 -6
  7. package/dist/bridge/fields.mjs +89 -7
  8. package/dist/bridge/form-subdomain-agreement.js +165 -0
  9. package/dist/bridge/form-subdomain-agreement.mjs +132 -0
  10. package/dist/bridge/form-subdomain-embed.js +5 -1
  11. package/dist/bridge/form-subdomain-embed.mjs +5 -1
  12. package/dist/bridge/form-subdomain-header.js +21 -14
  13. package/dist/bridge/form-subdomain-header.mjs +20 -14
  14. package/dist/bridge/form-subdomain-issue.js +17 -8
  15. package/dist/bridge/form-subdomain-issue.mjs +17 -8
  16. package/dist/bridge/form-subdomain-missions.js +58 -52
  17. package/dist/bridge/form-subdomain-missions.mjs +60 -54
  18. package/dist/bridge/form-subdomain.js +226 -95
  19. package/dist/bridge/form-subdomain.mjs +225 -97
  20. package/dist/bridge/lib/entry.js +71 -6
  21. package/dist/bridge/lib/entry.mjs +60 -5
  22. package/dist/bridge/lib/order.js +23 -0
  23. package/dist/bridge/lib/order.mjs +20 -0
  24. package/dist/bridge/template-layout.js +5 -2
  25. package/dist/bridge/template-layout.mjs +6 -3
  26. package/dist/bridge/template-modal.js +82 -15
  27. package/dist/bridge/template-modal.mjs +83 -16
  28. package/dist/bridge/template-subdomain-gallery.js +126 -75
  29. package/dist/bridge/template-subdomain-gallery.mjs +122 -75
  30. package/dist/bridge/template-subdomain.js +16 -14
  31. package/dist/bridge/template-subdomain.mjs +17 -15
  32. package/dist/dashboard/avatar.js +5 -0
  33. package/dist/dashboard/avatar.mjs +5 -0
  34. package/dist/dashboard/campaign-form.js +1815 -0
  35. package/dist/dashboard/campaign-form.mjs +1786 -0
  36. package/dist/dashboard/card-affiliate.js +3 -2
  37. package/dist/dashboard/card-affiliate.mjs +3 -2
  38. package/dist/dashboard/card-campaign-agreement.js +172 -0
  39. package/dist/dashboard/card-campaign-agreement.mjs +139 -0
  40. package/dist/dashboard/card-campaign-switch.js +25 -10
  41. package/dist/dashboard/card-campaign-switch.mjs +24 -10
  42. package/dist/dashboard/card-order.js +6 -14
  43. package/dist/dashboard/card-order.mjs +6 -14
  44. package/dist/dashboard/card-section.js +69 -26
  45. package/dist/dashboard/card-section.mjs +65 -26
  46. package/dist/dashboard/card-shortcut.js +183 -0
  47. package/dist/dashboard/card-shortcut.mjs +154 -0
  48. package/dist/dashboard/card-tile.js +3 -35
  49. package/dist/dashboard/card-tile.mjs +3 -34
  50. package/dist/dashboard/document-blocks.js +305 -0
  51. package/dist/dashboard/document-blocks.mjs +270 -0
  52. package/dist/dashboard/drawer-subscription.js +52 -14
  53. package/dist/dashboard/drawer-subscription.mjs +52 -14
  54. package/dist/dashboard/drawer.js +20 -3
  55. package/dist/dashboard/drawer.mjs +21 -4
  56. package/dist/dashboard/dropdown.js +6 -2
  57. package/dist/dashboard/dropdown.mjs +6 -2
  58. package/dist/dashboard/form-admin-subscription-custom.js +72 -8
  59. package/dist/dashboard/form-admin-subscription-custom.mjs +72 -8
  60. package/dist/dashboard/form-ai.js +0 -148
  61. package/dist/dashboard/form-ai.mjs +1 -148
  62. package/dist/dashboard/form-filters-analytics.js +86 -38
  63. package/dist/dashboard/form-filters-analytics.mjs +85 -38
  64. package/dist/dashboard/form-organization-brand.js +30 -13
  65. package/dist/dashboard/form-organization-brand.mjs +30 -13
  66. package/dist/dashboard/form-organization-campaign-advertisement.js +38 -112
  67. package/dist/dashboard/form-organization-campaign-advertisement.mjs +38 -112
  68. package/dist/dashboard/form-organization-campaign-advertisements.js +374 -0
  69. package/dist/dashboard/form-organization-campaign-advertisements.mjs +345 -0
  70. package/dist/dashboard/form-organization-campaign-agreement.js +402 -210
  71. package/dist/dashboard/form-organization-campaign-agreement.mjs +398 -211
  72. package/dist/dashboard/form-organization-campaign-design.js +258 -0
  73. package/dist/dashboard/form-organization-campaign-design.mjs +223 -0
  74. package/dist/dashboard/form-organization-campaign-field-item.js +585 -0
  75. package/dist/dashboard/form-organization-campaign-field-item.mjs +552 -0
  76. package/dist/dashboard/form-organization-campaign-field-number.js +48 -7
  77. package/dist/dashboard/form-organization-campaign-field-number.mjs +48 -7
  78. package/dist/dashboard/form-organization-campaign-field-select.js +15 -4
  79. package/dist/dashboard/form-organization-campaign-field-select.mjs +15 -4
  80. package/dist/dashboard/form-organization-campaign-field-skill.js +359 -0
  81. package/dist/dashboard/form-organization-campaign-field-skill.mjs +330 -0
  82. package/dist/dashboard/form-organization-campaign-field-text.js +46 -6
  83. package/dist/dashboard/form-organization-campaign-field-text.mjs +46 -6
  84. package/dist/dashboard/form-organization-campaign-field-textarea.js +22 -13
  85. package/dist/dashboard/form-organization-campaign-field-textarea.mjs +22 -13
  86. package/dist/dashboard/form-organization-campaign-footer.js +178 -0
  87. package/dist/dashboard/form-organization-campaign-footer.mjs +149 -0
  88. package/dist/dashboard/form-organization-campaign-integration-age.js +2 -35
  89. package/dist/dashboard/form-organization-campaign-integration-age.mjs +2 -35
  90. package/dist/dashboard/form-organization-campaign-integration-geocode.js +4 -1
  91. package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +4 -1
  92. package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
  93. package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
  94. package/dist/dashboard/form-organization-campaign-page-preview.js +1 -2
  95. package/dist/dashboard/form-organization-campaign-page-preview.mjs +1 -2
  96. package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
  97. package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
  98. package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
  99. package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
  100. package/dist/dashboard/form-organization-campaign-page-slug.js +2 -3
  101. package/dist/dashboard/form-organization-campaign-page-slug.mjs +2 -3
  102. package/dist/dashboard/form-organization-campaign-page.js +168 -265
  103. package/dist/dashboard/form-organization-campaign-page.mjs +170 -266
  104. package/dist/dashboard/form-organization-campaign-section.js +125 -107
  105. package/dist/dashboard/form-organization-campaign-section.mjs +121 -107
  106. package/dist/dashboard/form-organization-campaign.js +119 -9
  107. package/dist/dashboard/form-organization-campaign.mjs +118 -9
  108. package/dist/dashboard/form-organization-file-frame.js +7 -1
  109. package/dist/dashboard/form-organization-file-frame.mjs +7 -1
  110. package/dist/dashboard/form-organization-workflow.js +587 -530
  111. package/dist/dashboard/form-organization-workflow.mjs +588 -531
  112. package/dist/dashboard/form-organization.js +22 -0
  113. package/dist/dashboard/form-organization.mjs +22 -0
  114. package/dist/dashboard/form-reposition.js +396 -0
  115. package/dist/dashboard/form-reposition.mjs +359 -0
  116. package/dist/dashboard/form-support.js +189 -0
  117. package/dist/dashboard/form-support.mjs +160 -0
  118. package/dist/dashboard/form-tests.js +683 -0
  119. package/dist/dashboard/form-tests.mjs +646 -0
  120. package/dist/dashboard/form-verify-prize.js +114 -34
  121. package/dist/dashboard/form-verify-prize.mjs +111 -34
  122. package/dist/dashboard/google.js +8 -1
  123. package/dist/dashboard/google.mjs +8 -1
  124. package/dist/dashboard/input-array.js +2 -0
  125. package/dist/dashboard/input-array.mjs +2 -0
  126. package/dist/dashboard/input-editor.js +17 -6
  127. package/dist/dashboard/input-editor.mjs +17 -6
  128. package/dist/dashboard/input-fields.js +287 -437
  129. package/dist/dashboard/input-fields.mjs +287 -436
  130. package/dist/dashboard/input-file.js +70 -2
  131. package/dist/dashboard/input-file.mjs +70 -2
  132. package/dist/dashboard/input-font.js +64 -55
  133. package/dist/dashboard/input-font.mjs +64 -55
  134. package/dist/dashboard/input-resource.js +4 -1
  135. package/dist/dashboard/input-resource.mjs +4 -1
  136. package/dist/dashboard/lib/ab-tests.js +130 -0
  137. package/dist/dashboard/lib/ab-tests.mjs +94 -0
  138. package/dist/dashboard/lib/features.js +1 -1
  139. package/dist/dashboard/lib/features.mjs +1 -1
  140. package/dist/dashboard/lib/focus.js +93 -0
  141. package/dist/dashboard/lib/focus.mjs +69 -0
  142. package/dist/dashboard/lib/form-page.js +209 -0
  143. package/dist/dashboard/lib/form-page.mjs +161 -0
  144. package/dist/dashboard/lib/item-list.js +0 -15
  145. package/dist/dashboard/lib/item-list.mjs +0 -14
  146. package/dist/dashboard/lib/rail.js +16 -17
  147. package/dist/dashboard/lib/rail.mjs +15 -16
  148. package/dist/dashboard/lib/sms.js +8 -2
  149. package/dist/dashboard/lib/sms.mjs +6 -1
  150. package/dist/dashboard/list-resource.js +2 -0
  151. package/dist/dashboard/list-resource.mjs +2 -0
  152. package/dist/dashboard/menu.js +54 -5
  153. package/dist/dashboard/menu.mjs +53 -5
  154. package/dist/dashboard/modal.js +19 -4
  155. package/dist/dashboard/modal.mjs +20 -5
  156. package/dist/dashboard/order-sections.js +4 -0
  157. package/dist/dashboard/order-sections.mjs +4 -0
  158. package/dist/dashboard/preview.js +838 -324
  159. package/dist/dashboard/preview.mjs +826 -324
  160. package/dist/dashboard/provider-ui.js +20 -12
  161. package/dist/dashboard/provider-ui.mjs +21 -13
  162. package/dist/dashboard/recharts.js +53 -28
  163. package/dist/dashboard/recharts.mjs +53 -28
  164. package/dist/dashboard/swatch.js +35 -0
  165. package/dist/dashboard/swatch.mjs +31 -0
  166. package/dist/dashboard/table-contacts.js +6 -10
  167. package/dist/dashboard/table-contacts.mjs +6 -10
  168. package/dist/dashboard/table.js +10 -3
  169. package/dist/dashboard/table.mjs +9 -3
  170. package/dist/dashboard/template-dashboard.js +12 -7
  171. package/dist/dashboard/template-dashboard.mjs +11 -7
  172. package/dist/dashboard/template-design.js +564 -0
  173. package/dist/dashboard/template-design.mjs +531 -0
  174. package/dist/dashboard/template-rail.js +192 -126
  175. package/dist/dashboard/template-rail.mjs +190 -125
  176. package/dist/dashboard/template-socket.js +0 -3
  177. package/dist/dashboard/template-socket.mjs +0 -3
  178. package/dist/dashboard/template-test-page.js +436 -0
  179. package/dist/dashboard/template-test-page.mjs +407 -0
  180. package/dist/dashboard/template-tests.js +141 -0
  181. package/dist/dashboard/template-tests.mjs +112 -0
  182. package/dist/dashboard/template-ui.js +20 -11
  183. package/dist/dashboard/template-ui.mjs +22 -13
  184. package/dist/dashboard/template-variant.js +185 -0
  185. package/dist/dashboard/template-variant.mjs +156 -0
  186. package/dist/icons/arrow-down-long.js +47 -0
  187. package/dist/icons/arrow-down-long.mjs +28 -0
  188. package/dist/icons/arrows-pointing-out.js +46 -0
  189. package/dist/icons/arrows-pointing-out.mjs +27 -0
  190. package/dist/icons/beaker.js +46 -0
  191. package/dist/icons/beaker.mjs +27 -0
  192. package/dist/icons/identification.js +46 -0
  193. package/dist/icons/identification.mjs +27 -0
  194. package/dist/icons/lifebuoy.js +46 -0
  195. package/dist/icons/lifebuoy.mjs +27 -0
  196. package/dist/icons/rectangle-group.js +46 -0
  197. package/dist/icons/rectangle-group.mjs +27 -0
  198. package/dist/icons/rectangle-stack.js +46 -0
  199. package/dist/icons/rectangle-stack.mjs +27 -0
  200. package/dist/icons/shopping-bag.js +46 -0
  201. package/dist/icons/shopping-bag.mjs +27 -0
  202. package/dist/icons/swatch.js +46 -0
  203. package/dist/icons/swatch.mjs +27 -0
  204. package/dist/icons/window.js +46 -0
  205. package/dist/icons/window.mjs +27 -0
  206. package/dist/icons/zoom-in.js +46 -0
  207. package/dist/icons/zoom-in.mjs +27 -0
  208. package/dist/input-answer.js +60 -0
  209. package/dist/input-answer.mjs +27 -0
  210. package/dist/input-checkbox.js +7 -1
  211. package/dist/input-checkbox.mjs +7 -1
  212. package/dist/input-name.js +3 -3
  213. package/dist/input-name.mjs +3 -3
  214. package/dist/input-select.js +3 -1
  215. package/dist/input-select.mjs +3 -1
  216. package/dist/provider-font.js +4 -3
  217. package/dist/provider-font.mjs +4 -3
  218. package/dist/shared/badge.js +15 -0
  219. package/dist/shared/badge.mjs +11 -0
  220. package/dist/shared/carousel.js +11 -7
  221. package/dist/shared/carousel.mjs +11 -7
  222. package/dist/shared/document-pieces.js +295 -0
  223. package/dist/shared/document-pieces.mjs +260 -0
  224. package/dist/shared/lib/campaign.js +18 -9
  225. package/dist/shared/lib/campaign.mjs +17 -9
  226. package/dist/shared/lib/helpers.js +24 -0
  227. package/dist/shared/lib/helpers.mjs +22 -0
  228. package/dist/shared/lib/video.js +6 -0
  229. package/dist/shared/lib/video.mjs +5 -0
  230. package/dist/shared/sortable.js +27 -10
  231. package/dist/shared/sortable.mjs +27 -10
  232. package/dist/shared/tabs.js +1 -1
  233. package/dist/shared/tabs.mjs +1 -1
  234. package/dist/video.js +127 -9
  235. package/dist/video.mjs +125 -11
  236. package/package.json +176 -20
  237. package/types/bridge/fields.d.ts +6 -1
  238. package/types/bridge/form-subdomain-agreement.d.ts +27 -0
  239. package/types/bridge/form-subdomain-missions.d.ts +2 -0
  240. package/types/bridge/form-subdomain.d.ts +62 -3
  241. package/types/bridge/lib/entry.d.ts +46 -7
  242. package/types/bridge/lib/order.d.ts +13 -2
  243. package/types/bridge/subdomain-content.d.ts +1 -0
  244. package/types/bridge/template-subdomain-gallery.d.ts +13 -1
  245. package/types/dashboard/campaign-form.d.ts +42 -0
  246. package/types/dashboard/card-campaign-agreement.d.ts +26 -0
  247. package/types/dashboard/card-campaign-switch.d.ts +13 -1
  248. package/types/dashboard/card-order.d.ts +2 -2
  249. package/types/dashboard/card-section.d.ts +9 -1
  250. package/types/dashboard/card-shortcut.d.ts +40 -0
  251. package/types/dashboard/card-tile.d.ts +4 -9
  252. package/types/dashboard/document-blocks.d.ts +14 -0
  253. package/types/dashboard/drawer.d.ts +3 -0
  254. package/types/dashboard/form-ai.d.ts +0 -17
  255. package/types/dashboard/form-organization-brand.d.ts +3 -0
  256. package/types/dashboard/form-organization-campaign-advertisements.d.ts +15 -0
  257. package/types/dashboard/form-organization-campaign-agreement.d.ts +53 -10
  258. package/types/dashboard/form-organization-campaign-design.d.ts +46 -0
  259. package/types/dashboard/form-organization-campaign-field-item.d.ts +36 -0
  260. package/types/dashboard/form-organization-campaign-field-number.d.ts +4 -1
  261. package/types/dashboard/form-organization-campaign-field-select.d.ts +6 -1
  262. package/types/dashboard/form-organization-campaign-field-skill.d.ts +36 -0
  263. package/types/dashboard/form-organization-campaign-field-text.d.ts +5 -1
  264. package/types/dashboard/form-organization-campaign-field-textarea.d.ts +4 -1
  265. package/types/dashboard/form-organization-campaign-footer.d.ts +23 -0
  266. package/types/dashboard/form-organization-campaign-integration-age.d.ts +2 -1
  267. package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +2 -0
  268. package/types/dashboard/form-organization-campaign-page.d.ts +9 -15
  269. package/types/dashboard/form-organization-campaign-section.d.ts +24 -8
  270. package/types/dashboard/form-organization-campaign.d.ts +3 -0
  271. package/types/dashboard/form-organization-workflow.d.ts +3 -0
  272. package/types/dashboard/form-organization.d.ts +2 -2
  273. package/types/dashboard/form-reposition.d.ts +29 -0
  274. package/types/dashboard/form-support.d.ts +14 -0
  275. package/types/dashboard/form-tests.d.ts +78 -0
  276. package/types/dashboard/form-verify-prize.d.ts +30 -3
  277. package/types/dashboard/input-editor.d.ts +9 -0
  278. package/types/dashboard/input-fields.d.ts +8 -5
  279. package/types/dashboard/input-file.d.ts +4 -0
  280. package/types/dashboard/input-resource.d.ts +1 -0
  281. package/types/dashboard/lib/ab-tests.d.ts +50 -0
  282. package/types/dashboard/lib/escape.d.ts +4 -0
  283. package/types/dashboard/lib/focus.d.ts +16 -0
  284. package/types/dashboard/lib/form-page.d.ts +25 -0
  285. package/types/dashboard/lib/item-list.d.ts +10 -5
  286. package/types/dashboard/lib/rail.d.ts +0 -1
  287. package/types/dashboard/lib/sms.d.ts +7 -0
  288. package/types/dashboard/modal.d.ts +3 -1
  289. package/types/dashboard/preview.d.ts +65 -10
  290. package/types/dashboard/recharts.d.ts +3 -0
  291. package/types/dashboard/swatch.d.ts +4 -0
  292. package/types/dashboard/template-dashboard.d.ts +3 -0
  293. package/types/dashboard/template-design.d.ts +30 -0
  294. package/types/dashboard/template-test-page.d.ts +69 -0
  295. package/types/dashboard/template-tests.d.ts +30 -0
  296. package/types/dashboard/template-variant.d.ts +18 -0
  297. package/types/icons/arrow-down-long.d.ts +5 -0
  298. package/types/icons/arrows-pointing-out.d.ts +5 -0
  299. package/types/icons/beaker.d.ts +5 -0
  300. package/types/icons/identification.d.ts +5 -0
  301. package/types/icons/lifebuoy.d.ts +5 -0
  302. package/types/icons/rectangle-group.d.ts +5 -0
  303. package/types/icons/rectangle-stack.d.ts +5 -0
  304. package/types/icons/shopping-bag.d.ts +5 -0
  305. package/types/icons/swatch.d.ts +5 -0
  306. package/types/icons/window.d.ts +5 -0
  307. package/types/icons/zoom-in.d.ts +5 -0
  308. package/types/input-answer.d.ts +15 -0
  309. package/types/input-select.d.ts +2 -0
  310. package/types/shared/button.d.ts +1 -1
  311. package/types/shared/document-pieces.d.ts +34 -0
  312. package/types/shared/lib/campaign.d.ts +11 -0
  313. package/types/shared/lib/helpers.d.ts +22 -1
  314. package/types/shared/lib/motion.d.ts +2 -0
  315. package/types/shared/lib/video.d.ts +3 -0
  316. package/types/shared/sortable.d.ts +6 -0
  317. package/types/video.d.ts +18 -2
  318. package/dist/bridge/template-preview.js +0 -208
  319. package/dist/bridge/template-preview.mjs +0 -173
  320. package/dist/dashboard/device.js +0 -95
  321. package/dist/dashboard/device.mjs +0 -72
  322. package/dist/dashboard/form-organization-campaign-field-list.js +0 -425
  323. package/dist/dashboard/form-organization-campaign-field-list.mjs +0 -396
  324. package/dist/dashboard/item-row.js +0 -92
  325. package/dist/dashboard/item-row.mjs +0 -63
  326. package/types/bridge/template-preview.d.ts +0 -10
  327. package/types/dashboard/device.d.ts +0 -12
  328. package/types/dashboard/form-organization-campaign-field-list.d.ts +0 -36
  329. package/types/dashboard/item-row.d.ts +0 -25
@@ -0,0 +1,46 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ export interface Design {
4
+ descriptions?: { logo?: string | null; preview?: string | null; [ key: string ]: unknown };
5
+ images?: {
6
+ logo?: { id: string; [ key: string ]: unknown } | null;
7
+ preview?: { id: string; [ key: string ]: unknown } | null;
8
+ };
9
+ style?: Record<string, unknown>;
10
+ [ key: string ]: unknown;
11
+ }
12
+
13
+ // A design as the api takes it: the images by their file's id, null for none.
14
+ export declare const designBody: ( design?: Design ) => {
15
+ descriptions: { logo?: string | null; preview?: string | null };
16
+ images: { logo: string | null; preview: string | null };
17
+ style?: Record<string, unknown>;
18
+ };
19
+
20
+ // The campaign's design: Logo, Preview image and the nine style fields, then Save.
21
+ export interface FormOrganizationCampaignDesignProps {
22
+ // Read on the campaign: every field is disabled.
23
+ disabled?: boolean;
24
+ onError: ( error: Error ) => void;
25
+ onSuccess: ( response: unknown ) => void;
26
+ // Told what the form holds on every change, for the preview.
27
+ onUpdate?: ( values: Record<string, unknown> ) => void;
28
+ // The organization record, handed to the file pickers.
29
+ organization?: { id: string; [ key: string ]: unknown };
30
+ // The campaign's main page as the api answers it, with the campaign's and the organization's ids.
31
+ values?: Design & { campaign: string; organization: string };
32
+ }
33
+
34
+ // Create brand from design, in the global modal: a Title.
35
+ export interface FormOrganizationCampaignDesignBrandProps {
36
+ // What the Design form holds, unsaved changes included.
37
+ design?: Design;
38
+ onError: ( error: Error ) => void;
39
+ onSuccess: ( response: unknown ) => void;
40
+ values?: { campaign: string; organization: string };
41
+ }
42
+
43
+ // The module has no default export.
44
+ export declare const FormOrganizationCampaignDesign: ComponentType<FormOrganizationCampaignDesignProps>;
45
+
46
+ export declare const FormOrganizationCampaignDesignBrand: ComponentType<FormOrganizationCampaignDesignBrandProps>;
@@ -0,0 +1,36 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ // One order item: an Item list ( slug list, type order ) holding exactly one item.
4
+ export interface FormOrganizationCampaignFieldItemValues {
5
+ campaign: string;
6
+ // The organization's currency, for the Price label.
7
+ currency?: string;
8
+ // The field's id when editing: PUT, else POST.
9
+ id?: string;
10
+ // The item's name.
11
+ label?: string;
12
+ organization: string;
13
+ settings?: {
14
+ items?: Array<{
15
+ attributes?: { max?: number | null };
16
+ description?: string | null;
17
+ id?: string;
18
+ image?: unknown;
19
+ name?: string;
20
+ // Absent or null: not priced.
21
+ price?: number | null;
22
+ }>;
23
+ };
24
+ [ key: string ]: unknown;
25
+ }
26
+
27
+ export interface FormOrganizationCampaignFieldItemProps {
28
+ disabled?: boolean;
29
+ onError: ( error: Error ) => void;
30
+ onSuccess: ( response: unknown ) => void;
31
+ values: FormOrganizationCampaignFieldItemValues;
32
+ }
33
+
34
+ declare const FormOrganizationCampaignFieldItem: ComponentType<FormOrganizationCampaignFieldItemProps>;
35
+
36
+ export default FormOrganizationCampaignFieldItem;
@@ -10,8 +10,11 @@ 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; required?: boolean };
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 }>;
15
18
  [ key: string ]: unknown;
16
19
  }
17
20
 
@@ -6,15 +6,20 @@ import { ComponentType } from 'react';
6
6
  export interface FormOrganizationCampaignFieldSelectValues {
7
7
  campaign: string;
8
8
  id?: string;
9
- inputs?: Array<'label' | 'settings'>;
9
+ inputs?: Array<'attributes' | '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 };
16
18
  label?: string;
17
19
  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 }>;
18
23
  [ key: string ]: unknown;
19
24
  }
20
25
 
@@ -0,0 +1,36 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ // One step of a skill testing question: an operator and a number.
4
+ export interface SkillStep {
5
+ number: number | string;
6
+ operator: '+' | '-' | '*' | '/';
7
+ }
8
+
9
+ // What the fields page or the prize page passes: the route ids, and the saved
10
+ // question when editing. The answer is never part of it: the api works it out.
11
+ export interface FormOrganizationCampaignFieldSkillValues {
12
+ campaign: string;
13
+ id?: string;
14
+ inputs?: Array<'label' | 'settings'>;
15
+ organization: string;
16
+ // Set for a prize question: posts to the prize's field route, without `type`.
17
+ prize?: string;
18
+ slug?: 'skill';
19
+ type?: 'additional';
20
+ label?: string;
21
+ settings?: { first?: number | string; steps?: SkillStep[] };
22
+ // The custom section it sits in ( no Section dropdown here ).
23
+ section?: string;
24
+ [ key: string ]: unknown;
25
+ }
26
+
27
+ export interface FormOrganizationCampaignFieldSkillProps {
28
+ disabled?: boolean;
29
+ onError: ( error: Error ) => void;
30
+ onSuccess: ( response: unknown ) => void;
31
+ values: FormOrganizationCampaignFieldSkillValues;
32
+ }
33
+
34
+ declare const FormOrganizationCampaignFieldSkill: ComponentType<FormOrganizationCampaignFieldSkillProps>;
35
+
36
+ export default FormOrganizationCampaignFieldSkill;
@@ -13,8 +13,12 @@ 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
- attributes?: { max?: number };
16
+ // The Required switch is attributes.required ( not on a prize question ).
17
+ attributes?: { max?: number; required?: boolean };
17
18
  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 }>;
18
22
  [ key: string ]: unknown;
19
23
  }
20
24
 
@@ -12,8 +12,11 @@ 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; rows?: number };
15
+ attributes?: { max?: number; required?: boolean; 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 }>;
17
20
  [ key: string ]: unknown;
18
21
  }
19
22
 
@@ -0,0 +1,23 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ export interface FormOrganizationCampaignFooterProps {
4
+ // GET /organization/:o/campaign/:c; the page's cached copy wins once it is there.
5
+ campaign?: Record<string, unknown> | null;
6
+ // Opens each agreement read only ( the Agreements capability ); defaults to `disabled`.
7
+ agreementsDisabled?: boolean;
8
+ disabled?: boolean;
9
+ // Manage: opens an agreement's form, with Enabled locked and why ( SMS consent with no phone
10
+ // field ) and whether it opens read only.
11
+ onAgreement: ( id: string, options: { enabledLock: string | null; readOnly: boolean } ) => void;
12
+ onError?: ( error: Error ) => void;
13
+ onSuccess?: ( response: unknown ) => void;
14
+ params: { campaign: string; organization: string };
15
+ // Whether the form asks for a phone number ( SMS consent's Enabled is locked without one ).
16
+ phone?: boolean;
17
+ // Whether the platform texts at all ( SMS consent leaves the list otherwise ).
18
+ texts?: boolean;
19
+ }
20
+
21
+ declare const FormOrganizationCampaignFooter: ComponentType<FormOrganizationCampaignFooterProps>;
22
+
23
+ export default FormOrganizationCampaignFooter;
@@ -7,7 +7,8 @@ export interface FormOrganizationCampaignIntegrationAgeValues {
7
7
  enabled?: boolean;
8
8
  added?: boolean;
9
9
  organization: string;
10
- settings?: { max?: number | null; min?: number };
10
+ // Both required; the age step's texts ( title, description, button ) are saved by the section editor.
11
+ settings?: { button?: string | null; description?: string | null; max?: number; min?: number; title?: string | null };
11
12
  slug: string;
12
13
  [ key: string ]: unknown;
13
14
  }
@@ -4,6 +4,8 @@ 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;
7
9
  // Meters, up to 1,000,000.
8
10
  radius?: number;
9
11
  // Map zoom, UI only: stripped before the save.
@@ -3,31 +3,25 @@ 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
-
14
6
  export interface FormOrganizationCampaignPageEditValues {
15
7
  campaign: string;
16
8
  description?: string | null;
17
- gallery?: CardAssetFile[];
9
+ // Gallery items: the file, its description and its saved crop.
10
+ gallery?: { description?: string; file: CardAssetFile; position?: { height: number; width: number; x: number; y: number } | null }[];
18
11
  headline?: string;
19
12
  id: string;
20
13
  images?: { logo?: CardAssetFile | null; preview?: CardAssetFile | null };
21
14
  links?: unknown[];
22
15
  organization: string;
23
- slug: string;
24
- status?: 'drafted' | 'published';
25
16
  style?: CardTemplatePage[ 'style' ] & { image?: { radius?: number }; input?: { radius?: number } };
26
- title?: string;
17
+ // A variant of a test: the form shows a Title, which renames it in its test.
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;
27
21
  [ key: string ]: unknown;
28
22
  }
29
23
 
30
- // Reads app.enums.page.status and app.fonts from the ['app'] query.
24
+ // Reads app.fonts from the ['app'] query.
31
25
  export interface FormOrganizationCampaignPageEditProps {
32
26
  disabled?: boolean;
33
27
  onError: ( error: Error ) => void;
@@ -35,9 +29,9 @@ export interface FormOrganizationCampaignPageEditProps {
35
29
  // Called with the form values as they change, for the live preview.
36
30
  onUpdate: ( values: unknown ) => void;
37
31
  organization?: Organization;
32
+ // A page of a test: Content and Design tabs inside the form, one Save for both.
33
+ tabs?: boolean;
38
34
  values?: FormOrganizationCampaignPageEditValues;
39
35
  }
40
36
 
41
- export declare const FormOrganizationCampaignPage: ComponentType<FormOrganizationCampaignPageProps>;
42
-
43
37
  export declare const FormOrganizationCampaignPageEdit: ComponentType<FormOrganizationCampaignPageEditProps>;
@@ -1,19 +1,23 @@
1
1
  import { ComponentType } from 'react';
2
2
 
3
- // A section as GET .../sections returns it, plus the route ids.
3
+ // A section as GET .../sections returns it, plus the route ids. No id: a new
4
+ // custom section ( POST .../section ). Type age: the age gate's step texts
5
+ // ( PUT .../section/age ).
4
6
  export interface FormOrganizationCampaignSectionValues {
7
+ // The step's Next text; blank reads `fallback`, else Next.
8
+ button?: string | null;
5
9
  campaign: string;
6
10
  description?: string | null;
7
- // Your order's Take orders.
11
+ // Off: the entry form skips the section. Not on Your information.
8
12
  enabled?: boolean;
9
- // Your order: whether the campaign's giveaway is on, which locks Take orders.
13
+ // Button text's placeholder.
14
+ fallback?: string;
15
+ // The campaign's giveaway is on: Enabled is locked off ( Your order ).
10
16
  giveaway?: boolean;
11
- id: 'information' | 'order';
17
+ id?: 'information' | 'order' | 'age' | string;
12
18
  organization: string;
13
- // Your order's Show prices.
14
- settings?: { prices?: boolean };
15
- title?: string;
16
- type: 'information' | 'order';
19
+ title?: string | null;
20
+ type: 'information' | 'order' | 'section' | 'age';
17
21
  [ key: string ]: unknown;
18
22
  }
19
23
 
@@ -24,6 +28,18 @@ export interface FormOrganizationCampaignSectionProps {
24
28
  values: FormOrganizationCampaignSectionValues;
25
29
  }
26
30
 
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
+
27
43
  declare const FormOrganizationCampaignSection: ComponentType<FormOrganizationCampaignSectionProps>;
28
44
 
29
45
  export default FormOrganizationCampaignSection;
@@ -56,4 +56,7 @@ 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>;
59
62
  export declare const FormOrganizationCampaignSettingsShop: ComponentType<FormOrganizationCampaignFormProps>;
@@ -172,3 +172,6 @@ export declare const webhookSample: ( args: { campaign?: { id?: string; title?:
172
172
  export declare const TextPreview: ComponentType<{ children?: import( 'react' ).ReactNode; from?: string | null }>;
173
173
  // The team email's title and lines, for a new entry or an order.
174
174
  export declare const teamSample: ( args: { campaign?: { title?: string } | null; event?: string; organization?: { title?: string } | null } ) => { lines: string[]; title: string };
175
+
176
+ // Whether the organization's members list can be read: the owner, on a plan with members or while members remain.
177
+ 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' | 'website';
27
+ name: 'email' | 'name' | 'timezone' | '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; website?: string }; id?: string };
30
+ values?: { business?: { email?: string; name?: string; timezone?: string; website?: string }; id?: string };
31
31
  }
32
32
 
33
33
  // Reads GET /app's currency options from the ['app'] query.
@@ -0,0 +1,29 @@
1
+ import { ComponentType } from 'react';
2
+ import { GalleryPosition } from '../shared/lib/helpers';
3
+
4
+ export interface FormRepositionProps {
5
+ /** The gallery item's file: sizes.original ( and frames for a video ) feed the frame. */
6
+ file: {
7
+ frames?: Array<{ sizes?: Record<string, string> } | null>;
8
+ mimetype?: string;
9
+ sizes?: Record<string, string>;
10
+ updatedAt?: string | number | Date;
11
+ [ key: string ]: unknown;
12
+ };
13
+ /** The crop on Done, or null after Reset or when nothing moved. */
14
+ onDone: ( position: GalleryPosition | null ) => void;
15
+ /** The page form's values, drawn over the frame as a phone shows the page. */
16
+ page?: Record<string, any>;
17
+ /** The saved crop the frame opens on. */
18
+ position?: GalleryPosition | null;
19
+ }
20
+
21
+ export declare const PHONE: number;
22
+ export declare const MAX_ZOOM: number;
23
+ export declare const SHARP: number;
24
+ export declare const toPosition: ( area?: GalleryPosition | null ) => GalleryPosition | null;
25
+ export declare const zoomKey: ( key: string, zoom: number ) => number | null;
26
+
27
+ declare const FormReposition: ComponentType<FormRepositionProps>;
28
+
29
+ export default FormReposition;
@@ -0,0 +1,14 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ // The rail's Support panel: From, Subject, Message and Send.
4
+ export interface FormSupportProps {
5
+ // The signed-in account: its address is From.
6
+ account?: { [ key: string ]: unknown };
7
+ organization?: { id: string; [ key: string ]: unknown };
8
+ // The page the message is sent from.
9
+ path?: string;
10
+ }
11
+
12
+ declare const FormSupport: ComponentType<FormSupportProps>;
13
+
14
+ export default FormSupport;
@@ -0,0 +1,78 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { CardTaskProps } from './card-task';
3
+ import { DropdownItem } from './dropdown';
4
+ import { Shares } from './lib/ab-tests';
5
+
6
+ export interface TestDates {
7
+ endsAt?: string | null;
8
+ startsAt?: string | null;
9
+ }
10
+
11
+ // A title, for Create test and an ended test's Edit test. A thrown error's message shows at the top.
12
+ export interface FormTestProps {
13
+ disabled?: boolean;
14
+ onSuccess: ( values: { title: string } ) => Promise<unknown> | unknown;
15
+ // The button's label; 'Submit' by default.
16
+ submit?: ReactNode;
17
+ values?: { title?: string };
18
+ }
19
+
20
+ // Add variant: a Title, and Start from once the test holds a variant ( more than one page ).
21
+ export interface FormVariantProps {
22
+ disabled?: boolean;
23
+ onSuccess: ( values: { from?: string; title: string } ) => Promise<unknown> | unknown;
24
+ // The test's pages, Current first: { label : name, value : page id }.
25
+ pages: { label: string; value: string }[];
26
+ }
27
+
28
+ // The Dates drawer: Start date and End date with their times, then Done. The end is at least seven days after the start.
29
+ export interface FormDatesProps {
30
+ onSuccess: ( values: TestDates ) => void;
31
+ // The test has started: its start is kept.
32
+ started?: boolean;
33
+ values?: TestDates;
34
+ }
35
+
36
+ export interface RowVariantProps {
37
+ // "28.7% conversion · +19% vs Current", once the test has visitors.
38
+ conversion?: ReactNode;
39
+ items?: DropdownItem[];
40
+ label: ReactNode;
41
+ locked?: boolean;
42
+ onShare: ( value: number ) => void;
43
+ share?: number;
44
+ }
45
+
46
+ export interface FormTestRailPage {
47
+ conversion?: ReactNode;
48
+ // The page id.
49
+ id: string;
50
+ items?: DropdownItem[];
51
+ label: string;
52
+ }
53
+
54
+ // The test's one form: Title, Dates, Variants with a slider each, Split evenly and Save ( Schedule on a draft that can run ).
55
+ export interface FormTestRailProps {
56
+ // Why the + is disabled, said when it is pointed at.
57
+ addReason?: string | null;
58
+ disabled?: boolean;
59
+ // The one card at the top: what the test needs next.
60
+ notice?: CardTaskProps | null;
61
+ onAdd?: () => void;
62
+ // Opens the Dates drawer; `apply` puts the picked dates in the form.
63
+ onDates?: ( values: TestDates, apply: ( picked: TestDates ) => void ) => void;
64
+ // Saves; a thrown error's message shows at the top of the form, scrolled into view.
65
+ onSubmit: ( values: TestDates & { shares: Shares; title: string } ) => Promise<unknown> | unknown;
66
+ pages?: FormTestRailPage[];
67
+ // The split, + and Delete are locked.
68
+ running?: boolean;
69
+ // True when the button reads Schedule.
70
+ schedules?: ( dates: TestDates ) => boolean;
71
+ values?: TestDates & { shares?: Shares; title?: string };
72
+ }
73
+
74
+ export declare const FormTest: ComponentType<FormTestProps>;
75
+ export declare const FormVariant: ComponentType<FormVariantProps>;
76
+ export declare const FormDates: ComponentType<FormDatesProps>;
77
+ export declare const RowVariant: ComponentType<RowVariantProps>;
78
+ export declare const FormTestRail: ComponentType<FormTestRailProps>;
@@ -3,8 +3,11 @@ import { ComponentType, ReactNode } from 'react';
3
3
  // A question on the prize, as GET /otc/:id returns prize.fields.
4
4
  export interface FormVerifyPrizeField {
5
5
  attributes?: { max?: number | string };
6
- // 'campaign:field:select' renders a select of settings.options; anything else a text input.
6
+ // 'campaign:field:select' renders a select of settings.options; slug 'skill'
7
+ // a number input; anything else a text input.
7
8
  feature?: string;
9
+ // Each question's answer is keyed by its id ( Pistachio ).
10
+ id?: string;
8
11
  label: string;
9
12
  settings?: { options?: { option: string }[] };
10
13
  slug: string;
@@ -13,8 +16,9 @@ export interface FormVerifyPrizeField {
13
16
  export interface FormVerifyPrizeProps {
14
17
  // The review modal's final button; defaults to 'Accept'.
15
18
  action?: ReactNode;
16
- // The review links campaign.agreements.terms.link when there is one.
17
- campaign?: { agreements?: { terms?: { link?: string | null } } } | null;
19
+ // The review links campaign.agreements.terms.link when there is one; terms
20
+ // of type 'document' open over the page, their pieces drawn from documents.
21
+ campaign?: { agreements?: { terms?: { document?: string; link?: string | null; type?: 'document' | 'link' } }; documents?: Record<string, unknown> } | null;
18
22
  children?: ReactNode;
19
23
  // The page button that opens the review; defaults to 'Continue'.
20
24
  confirm?: ReactNode;
@@ -31,10 +35,33 @@ export interface FormVerifyPrizeProps {
31
35
 
32
36
  export interface PrizeTermsProps {
33
37
  link?: string | null;
38
+ // Terms set up as a document: "terms and conditions" opens it.
39
+ onRead?: ( () => void ) | null;
34
40
  }
35
41
 
36
42
  export declare const PrizeTerms: ComponentType<PrizeTermsProps>;
37
43
 
44
+ export interface PrizeDocumentProps {
45
+ // Back to the confirmation.
46
+ back?: () => void;
47
+ // What the document's pieces draw ( the claim's campaign.documents ).
48
+ data?: Record<string, unknown>;
49
+ // The document's html.
50
+ value?: string;
51
+ }
52
+
53
+ export declare const PrizeDocument: ComponentType<PrizeDocumentProps>;
54
+
55
+ // The form's name for a question's answer: 'question-' + its id, else its slug.
56
+ export declare const answerKey: ( field?: Partial<FormVerifyPrizeField> ) => string | undefined;
57
+
58
+ // The answers as the api reads them ( { id, slug, value } per question ) and
59
+ // the shipping address.
60
+ export declare const splitValues: ( values: Record<string, unknown>, fields?: FormVerifyPrizeField[] ) => {
61
+ address: Record<string, unknown>;
62
+ fields: Array<{ id?: string; slug: string; value: unknown }>;
63
+ };
64
+
38
65
  declare const FormVerifyPrize: ComponentType<FormVerifyPrizeProps>;
39
66
 
40
67
  export default FormVerifyPrize;
@@ -7,7 +7,16 @@ export interface InputEditorVariable {
7
7
  label: string;
8
8
  }
9
9
 
10
+ // The document editor's nodes and tools ( dashboard/document-blocks.js ).
11
+ export interface InputEditorBlocks {
12
+ after?: ( context: any ) => ReactNode;
13
+ before?: ( context: any ) => ReactNode;
14
+ extensions?: Node[];
15
+ insert?: ( context: any ) => ReactNode;
16
+ }
17
+
10
18
  export interface InputEditorProps {
19
+ blocks?: InputEditorBlocks;
11
20
  disabled?: boolean;
12
21
  // Sits under what is typed, outside the document, so it cannot be removed.
13
22
  locked?: ReactNode;
@@ -23,8 +23,9 @@ export const schemas: {
23
23
  // cached [ 'countries' ] query.
24
24
  export const InputFieldsAddress: ComponentType<{ showAutocomplete?: boolean }>;
25
25
 
26
- // style.heading/body fonts, colours and radii.
27
- export const InputFieldsStyle: ComponentType<{ disabled?: boolean; onUpdate?: OnUpdate }>;
26
+ // Style as one list: the two fonts, the four colours, the three corners. The
27
+ // parent form wraps it in its own Fieldset to disable it.
28
+ export const InputFieldsStyle: ComponentType<{ onUpdate?: OnUpdate }>;
28
29
 
29
30
  // title, and the Form and Giveaway switches ( one flip keeps the pair consistent ).
30
31
  export const InputFieldsCampaign: ComponentType<{ onUpdate?: ( title: string ) => void }>;
@@ -32,12 +33,13 @@ export const InputFieldsCampaign: ComponentType<{ onUpdate?: ( title: string ) =
32
33
  // currency ( options from the cached [ 'app' ] enums ).
33
34
  export const InputFieldsCurrency: ComponentType<{ label?: string }>;
34
35
 
35
- export const InputFieldsPage: ComponentType<{ onUpdate?: ( title: string ) => void }>;
36
36
 
37
37
  // headline and description, each with the AI drawer.
38
38
  export const InputFieldsDetails: ComponentType<{ onUpdate?: OnUpdate; organization?: Organization }>;
39
39
 
40
40
  interface InputFieldsImagesProps {
41
+ // Gives each image its own Description, kept in the form's `descriptions`.
42
+ described?: boolean;
41
43
  onUpdate?: OnUpdate;
42
44
  organization?: Organization;
43
45
  values?: { images?: { logo?: InputFileValue | null; preview?: InputFileValue | null }; organization?: string; [ key: string ]: unknown };
@@ -46,5 +48,6 @@ interface InputFieldsImagesProps {
46
48
  // images.logo and images.preview.
47
49
  export const InputFieldsImages: ComponentType<InputFieldsImagesProps>;
48
50
 
49
- // A sortable gallery above InputFieldsImages.
50
- export const InputFieldsMedia: ComponentType<InputFieldsImagesProps>;
51
+ // A page's Media: a sortable gallery of { file, description, position }; each
52
+ // item's thumbnail opens Reposition.
53
+ export const InputFieldsMedia: ComponentType<{ onUpdate?: OnUpdate; organization?: Organization; values?: { organization?: string; [ key: string ]: unknown } }>;
@@ -16,6 +16,8 @@ export interface InputFileProps {
16
16
  // This placement's description of the image (its alt text), up to 150 characters.
17
17
  description?: string;
18
18
  disabled?: boolean;
19
+ // With onEdit: a green ring on the thumbnail, the file has been edited ( a gallery crop ).
20
+ edited?: boolean;
19
21
  // Base for the picker's library and upload ( /organization/:id ).
20
22
  endpoint?: string;
21
23
  filters?: Record<string, unknown>;
@@ -24,6 +26,8 @@ export interface InputFileProps {
24
26
  onChange: ( file: InputFileValue | null ) => void;
25
27
  // With it, the row's name becomes an editable Description, the file's name as its placeholder.
26
28
  onDescription?: ( description: string ) => void;
29
+ // With it, the thumbnail is a button ( pencil on hover, tooltip "Reposition" ) that calls it with the file.
30
+ onEdit?: ( file: InputFileValue ) => void;
27
31
  organization?: { id: string; [ key: string ]: unknown } | string;
28
32
  type?: 'image' | 'media' | 'video' | 'all' | string;
29
33
  value?: InputFileValue | null | '';
@@ -21,6 +21,7 @@ export interface InputResourceSingleProps extends InputResourceBase {
21
21
  export interface InputResourceMultipleProps extends InputResourceBase {
22
22
  // Disabled chips above the list, never offered by the picker.
23
23
  fixed?: ListResourceItem[];
24
+ picker?: boolean;
24
25
  multiple: true;
25
26
  onChange: ( items: ListResourceItem[] ) => void;
26
27
  value?: ListResourceItem[];