@delmaredigital/payload-experiments 0.4.0-rc.9 → 0.4.1

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 (254) hide show
  1. package/README.md +3 -7
  2. package/dist/admin/MetricSourceSelect.js +10 -3
  3. package/dist/admin/armSelect/armSelect.model.d.ts +1 -1
  4. package/dist/admin/blocks/BlockPanel.d.ts +1 -0
  5. package/dist/admin/blocks/BlockPanel.js +75 -29
  6. package/dist/admin/blocks/model.js +5 -4
  7. package/dist/admin/copy/blocks.d.ts +14 -11
  8. package/dist/admin/copy/blocks.js +33 -22
  9. package/dist/admin/copy/goals.d.ts +15 -8
  10. package/dist/admin/copy/goals.js +18 -8
  11. package/dist/admin/copy/newTest.d.ts +10 -7
  12. package/dist/admin/copy/newTest.js +14 -7
  13. package/dist/admin/copy/status.d.ts +1 -1
  14. package/dist/admin/copy/status.js +2 -1
  15. package/dist/admin/pageCollections.d.ts +1 -0
  16. package/dist/admin/pageCollections.js +3 -0
  17. package/dist/admin/placementStatus.model.js +5 -3
  18. package/dist/admin/status.model.d.ts +1 -0
  19. package/dist/admin/status.model.js +2 -1
  20. package/dist/admin/surface/ResultsRoute.js +4 -8
  21. package/dist/admin/surface/SurfaceShell.d.ts +4 -2
  22. package/dist/admin/surface/SurfaceShell.js +28 -3
  23. package/dist/admin/surface/TestRowMenu.d.ts +13 -0
  24. package/dist/admin/surface/TestRowMenu.js +163 -0
  25. package/dist/admin/surface/TestsHome.d.ts +4 -3
  26. package/dist/admin/surface/TestsHome.js +186 -47
  27. package/dist/admin/surface/TestsSurface.js +2 -1
  28. package/dist/admin/surface/goals/DeleteGoalDialog.d.ts +7 -0
  29. package/dist/admin/surface/goals/DeleteGoalDialog.js +42 -0
  30. package/dist/admin/surface/goals/GoalForm.d.ts +1 -0
  31. package/dist/admin/surface/goals/GoalForm.js +280 -198
  32. package/dist/admin/surface/goals/GoalsList.js +102 -33
  33. package/dist/admin/surface/goals/data.d.ts +2 -0
  34. package/dist/admin/surface/goals/data.js +9 -0
  35. package/dist/admin/surface/goals/goals.css +3 -2
  36. package/dist/admin/surface/goals/goals.model.d.ts +2 -2
  37. package/dist/admin/surface/goals/goals.model.js +7 -12
  38. package/dist/admin/surface/home.model.d.ts +15 -8
  39. package/dist/admin/surface/home.model.js +22 -18
  40. package/dist/admin/surface/newTest/NewTest.d.ts +3 -3
  41. package/dist/admin/surface/newTest/NewTest.js +156 -96
  42. package/dist/admin/surface/newTest/PageWizard.d.ts +4 -1
  43. package/dist/admin/surface/newTest/PageWizard.js +93 -68
  44. package/dist/admin/surface/newTest/newTest.css +28 -11
  45. package/dist/admin/surface/results/ResultsHeader.d.ts +1 -1
  46. package/dist/admin/surface/results/ResultsHeader.js +90 -63
  47. package/dist/admin/surface/surface.css +29 -0
  48. package/dist/admin/surface/test/TestPage.js +46 -38
  49. package/dist/admin/surface/useXpStepNav.d.ts +11 -0
  50. package/dist/admin/surface/useXpStepNav.js +14 -0
  51. package/dist/admin/views/TestsSurfaceClient.js +27 -3
  52. package/dist/admin/views/buildSurfaceProps.js +18 -66
  53. package/dist/arms/copy.d.ts +13 -3
  54. package/dist/arms/copy.js +5 -4
  55. package/dist/blocks/createExperimentBlock.js +1 -1
  56. package/dist/blocks/formState.js +1 -1
  57. package/dist/collections/experiments/armInvariants.js +8 -5
  58. package/dist/collections/metrics.js +12 -5
  59. package/dist/collections/serialize.js +3 -2
  60. package/dist/db/pageCopies.d.ts +5 -0
  61. package/dist/db/pageCopies.js +31 -0
  62. package/dist/db/snapshots.d.ts +1 -0
  63. package/dist/endpoints/duplicateOriginal.d.ts +38 -0
  64. package/dist/endpoints/duplicateOriginal.js +414 -0
  65. package/dist/endpoints/editorSurface.js +1 -1
  66. package/dist/endpoints/index.js +20 -0
  67. package/dist/endpoints/pages.js +245 -66
  68. package/dist/endpoints/placementStatus.js +1 -0
  69. package/dist/endpoints/results.js +3 -0
  70. package/dist/endpoints/testVersion.d.ts +2 -0
  71. package/dist/endpoints/testVersion.js +38 -0
  72. package/dist/endpoints/transitions.js +4 -5
  73. package/dist/exports/index.d.ts +1 -1
  74. package/dist/goals/picker/copy.js +1 -1
  75. package/dist/goals/sourceLabel.d.ts +2 -0
  76. package/dist/goals/sourceLabel.js +4 -0
  77. package/dist/hooks/trackPageCopies.d.ts +11 -0
  78. package/dist/hooks/trackPageCopies.js +7 -0
  79. package/dist/labels/arms.d.ts +3 -0
  80. package/dist/labels/arms.js +8 -0
  81. package/dist/options.d.ts +2 -0
  82. package/dist/options.js +18 -2
  83. package/dist/plugin.js +56 -2
  84. package/dist/puck/editor/ConfigureTestDrawer.d.ts +7 -7
  85. package/dist/puck/editor/ConfigureTestDrawer.js +36 -26
  86. package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
  87. package/dist/puck/editor/ExperimentSlotEditor.js +219 -106
  88. package/dist/puck/editor/LeftoverVersions.js +17 -32
  89. package/dist/puck/editor/QuickTestActions.d.ts +2 -2
  90. package/dist/puck/editor/QuickTestActions.js +44 -34
  91. package/dist/puck/editor/ResultsReadout.d.ts +3 -1
  92. package/dist/puck/editor/ResultsReadout.js +28 -16
  93. package/dist/puck/editor/VersionBuilder.d.ts +4 -2
  94. package/dist/puck/editor/VersionBuilder.js +42 -63
  95. package/dist/puck/editor/armWrites.js +1 -1
  96. package/dist/puck/editor/copy.d.ts +10 -6
  97. package/dist/puck/editor/copy.js +22 -12
  98. package/dist/puck/editor/editor.chrome.css +9 -8
  99. package/dist/puck/editor/editor.css +14 -9
  100. package/dist/puck/editor/placementsCache.d.ts +1 -1
  101. package/dist/puck/editor/placementsCache.js +9 -17
  102. package/dist/puck/editor/usePageSaveReadiness.d.ts +1 -4
  103. package/dist/puck/editor/usePageSaveReadiness.js +18 -21
  104. package/dist/puck/editor/usePlacementNotice.d.ts +2 -2
  105. package/dist/puck/editor/usePlacementNotice.js +4 -5
  106. package/dist/puck/nestedTestCopy.js +2 -2
  107. package/dist/puck/slotConfig.d.ts +1 -1
  108. package/dist/puck/slotConfig.js +1 -1
  109. package/dist/results/analyse.d.ts +2 -0
  110. package/dist/results/analyse.js +2 -2
  111. package/dist/results/verdict.d.ts +4 -4
  112. package/dist/results/verdict.js +13 -10
  113. package/dist/server/runResults.js +2 -1
  114. package/dist/testSurface/PreviewLinks.d.ts +2 -1
  115. package/dist/testSurface/PreviewLinks.js +3 -3
  116. package/dist/testSurface/actions/DecideDialog.d.ts +7 -4
  117. package/dist/testSurface/actions/DecideDialog.js +71 -59
  118. package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
  119. package/dist/testSurface/actions/LifecycleAction.js +107 -0
  120. package/dist/testSurface/actions/MakeContentResult.js +1 -1
  121. package/dist/testSurface/actions/actions.model.d.ts +13 -5
  122. package/dist/testSurface/actions/actions.model.js +75 -22
  123. package/dist/testSurface/actions/decide.model.d.ts +1 -0
  124. package/dist/testSurface/actions/decide.model.js +1 -0
  125. package/dist/testSurface/allocation.model.js +6 -3
  126. package/dist/testSurface/api.d.ts +4 -1
  127. package/dist/testSurface/api.js +22 -14
  128. package/dist/testSurface/copy/actions.d.ts +36 -14
  129. package/dist/testSurface/copy/actions.js +39 -17
  130. package/dist/testSurface/copy/advanced.d.ts +10 -0
  131. package/dist/testSurface/copy/advanced.js +10 -0
  132. package/dist/testSurface/copy/arms.d.ts +1 -1
  133. package/dist/testSurface/copy/arms.js +1 -1
  134. package/dist/testSurface/copy/audience.d.ts +4 -3
  135. package/dist/testSurface/copy/audience.js +5 -4
  136. package/dist/testSurface/copy/common.d.ts +6 -6
  137. package/dist/testSurface/copy/common.js +6 -6
  138. package/dist/testSurface/copy/metrics.d.ts +6 -0
  139. package/dist/testSurface/copy/metrics.js +8 -0
  140. package/dist/testSurface/copy/pages.d.ts +67 -7
  141. package/dist/testSurface/copy/pages.js +74 -7
  142. package/dist/testSurface/copy/readiness.d.ts +8 -6
  143. package/dist/testSurface/copy/readiness.js +19 -10
  144. package/dist/testSurface/copy/recommendation.d.ts +1 -22
  145. package/dist/testSurface/copy/recommendation.js +2 -22
  146. package/dist/testSurface/copy/results.d.ts +16 -10
  147. package/dist/testSurface/copy/results.js +19 -11
  148. package/dist/testSurface/copy/review.d.ts +13 -10
  149. package/dist/testSurface/copy/review.js +14 -10
  150. package/dist/testSurface/copy/setting.d.ts +1 -2
  151. package/dist/testSurface/copy/setting.js +1 -2
  152. package/dist/testSurface/copy/surface.d.ts +11 -2
  153. package/dist/testSurface/copy/surface.js +14 -11
  154. package/dist/testSurface/copy/testPage.d.ts +16 -10
  155. package/dist/testSurface/copy/testPage.js +24 -18
  156. package/dist/testSurface/format/date.d.ts +5 -2
  157. package/dist/testSurface/format/date.js +24 -8
  158. package/dist/testSurface/format/roundProgress.d.ts +6 -0
  159. package/dist/testSurface/format/roundProgress.js +15 -0
  160. package/dist/testSurface/format/useDateFormatter.d.ts +3 -0
  161. package/dist/testSurface/format/useDateFormatter.js +8 -0
  162. package/dist/testSurface/labels.d.ts +1 -2
  163. package/dist/testSurface/labels.js +2 -3
  164. package/dist/testSurface/lockedNotice.model.d.ts +2 -0
  165. package/dist/testSurface/lockedNotice.model.js +31 -0
  166. package/dist/testSurface/readPreflight.d.ts +0 -1
  167. package/dist/testSurface/readPreflight.js +0 -1
  168. package/dist/testSurface/results/CiChart.js +2 -1
  169. package/dist/testSurface/results/DataTable.d.ts +1 -1
  170. package/dist/testSurface/results/DataTable.js +4 -3
  171. package/dist/testSurface/results/VerdictHero.d.ts +1 -1
  172. package/dist/testSurface/results/legacy.d.ts +0 -5
  173. package/dist/testSurface/results/legacy.js +0 -14
  174. package/dist/testSurface/results/results.css +2 -2
  175. package/dist/testSurface/results/results.model.d.ts +8 -3
  176. package/dist/testSurface/results/results.model.js +25 -21
  177. package/dist/testSurface/results/snapshot.d.ts +2 -0
  178. package/dist/testSurface/results/snapshot.js +3 -0
  179. package/dist/testSurface/surface/contracts.d.ts +6 -1
  180. package/dist/testSurface/surface/editorPlacement.d.ts +1 -1
  181. package/dist/testSurface/surface/editorPlacement.js +1 -1
  182. package/dist/testSurface/surface/pageBlock/pageBlock.model.js +1 -1
  183. package/dist/testSurface/surface/pageBlock/parts.js +25 -12
  184. package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +8 -1
  185. package/dist/testSurface/surface/pagePicker/CopyRoute.js +243 -22
  186. package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +15 -4
  187. package/dist/testSurface/surface/pagePicker/PageCombobox.js +298 -209
  188. package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -10
  189. package/dist/testSurface/surface/pagePicker/pagePicker.model.d.ts +5 -3
  190. package/dist/testSurface/surface/pagePicker/pagePicker.model.js +17 -2
  191. package/dist/testSurface/surface/readiness/ActionDialogs.d.ts +5 -3
  192. package/dist/testSurface/surface/readiness/ActionDialogs.js +213 -207
  193. package/dist/testSurface/surface/readiness/Banner.d.ts +5 -1
  194. package/dist/testSurface/surface/readiness/Banner.js +109 -148
  195. package/dist/testSurface/surface/readiness/SaveStatus.d.ts +5 -2
  196. package/dist/testSurface/surface/readiness/SaveStatus.js +8 -7
  197. package/dist/testSurface/surface/readiness/readiness.model.d.ts +14 -5
  198. package/dist/testSurface/surface/readiness/readiness.model.js +62 -12
  199. package/dist/testSurface/surface/readiness/useTransition.d.ts +3 -1
  200. package/dist/testSurface/surface/readiness/useTransition.js +49 -8
  201. package/dist/testSurface/surface/results/ReleasePages.d.ts +4 -3
  202. package/dist/testSurface/surface/results/ReleasePages.js +41 -41
  203. package/dist/testSurface/surface/results/ResultsBody.d.ts +7 -2
  204. package/dist/testSurface/surface/results/ResultsBody.js +170 -110
  205. package/dist/testSurface/surface/results/recommendation.model.d.ts +6 -9
  206. package/dist/testSurface/surface/results/recommendation.model.js +15 -59
  207. package/dist/testSurface/surface/results/useResults.d.ts +6 -2
  208. package/dist/testSurface/surface/setting/parts.js +31 -28
  209. package/dist/testSurface/surface/setting/setting.css +2 -1
  210. package/dist/testSurface/surface/test/AdvancedSection.js +10 -4
  211. package/dist/testSurface/surface/test/DeleteTest.d.ts +5 -1
  212. package/dist/testSurface/surface/test/DeleteTest.js +63 -55
  213. package/dist/testSurface/surface/test/GoalSection.js +11 -11
  214. package/dist/testSurface/surface/test/LengthSection.js +21 -13
  215. package/dist/testSurface/surface/test/PageHoldout.d.ts +1 -1
  216. package/dist/testSurface/surface/test/PageHoldout.js +7 -7
  217. package/dist/testSurface/surface/test/ReadinessBar.d.ts +2 -1
  218. package/dist/testSurface/surface/test/ReadinessBar.js +4 -10
  219. package/dist/testSurface/surface/test/Section.js +8 -0
  220. package/dist/testSurface/surface/test/TargetingSection.js +7 -2
  221. package/dist/testSurface/surface/test/TestSurface.js +17 -43
  222. package/dist/testSurface/surface/test/VersionsSection.js +93 -70
  223. package/dist/testSurface/surface/test/fields.d.ts +4 -3
  224. package/dist/testSurface/surface/test/fields.js +10 -16
  225. package/dist/testSurface/surface/test/pageParts.js +13 -7
  226. package/dist/testSurface/surface/test/testPage.css +9 -2
  227. package/dist/testSurface/surface/useTestDocument.d.ts +1 -3
  228. package/dist/testSurface/surface/useTestDocument.js +110 -52
  229. package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
  230. package/dist/testSurface/surface/watchTestDocument.js +181 -0
  231. package/dist/testSurface/surfaceUrls.d.ts +1 -0
  232. package/dist/testSurface/surfaceUrls.js +4 -0
  233. package/dist/testSurface/useApi.d.ts +3 -0
  234. package/dist/transitions/addMetric.d.ts +1 -1
  235. package/dist/transitions/addMetric.js +5 -1
  236. package/dist/transitions/kernel.d.ts +2 -0
  237. package/dist/transitions/kernel.js +1 -1
  238. package/dist/transitions/pageAddress.d.ts +6 -0
  239. package/dist/transitions/pageAddress.js +71 -0
  240. package/dist/transitions/pageVersions.d.ts +1 -1
  241. package/dist/transitions/preflightData.js +10 -2
  242. package/dist/transitions/start.d.ts +1 -1
  243. package/dist/transitions/start.js +8 -5
  244. package/dist/types/armKey.d.ts +2 -0
  245. package/dist/types/armKey.js +1 -0
  246. package/dist/types/contracts.d.ts +11 -1
  247. package/dist/types/endpoints.d.ts +38 -9
  248. package/dist/types/endpoints.js +1 -1
  249. package/dist/types/surface.d.ts +7 -9
  250. package/dist/ui/Dialog.d.ts +21 -2
  251. package/dist/ui/Dialog.js +101 -4
  252. package/dist/ui/Inputs.js +0 -1
  253. package/dist/ui/ui.css +5 -1
  254. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { canStartTest, hasBrowserWritablePrimary, readyToStart } from '../../readinessRead.js';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { canStartTest, readyToStart } from '../../readinessRead.js';
4
4
  import { useEffect, useState } from 'react';
5
5
  import { Button } from '../../../ui/Button.js';
6
6
  import { actionWaitMessage, SaveStatus, saveStatusMessage } from './SaveStatus.js';
@@ -9,33 +9,30 @@ import { actionGroupLabel, availableActions } from '../../actions/actions.model.
9
9
  import { createApi } from '../../api.js';
10
10
  import { TEST_PAGE } from '../../copy/testPage.js';
11
11
  import { READINESS_COPY as C, decidedCopy, fixFieldsNext, runningCopy, stoppedCopy } from '../../copy/readiness.js';
12
- import { METRICS_COPY } from '../../copy/metrics.js';
13
- import { READINESS, daysRemaining, displayDate, blockingSteps, pageReadinessContext, errorSection } from './readiness.model.js';
14
- import { AddMetricAction, AllocateAction, ConfirmAction } from './ActionDialogs.js';
12
+ import { useDateFormatter } from '../../format/useDateFormatter.js';
13
+ import { daysRemaining, displayDate, blockingSteps, pageReadinessContext, errorSection, readinessCaveats } from './readiness.model.js';
14
+ import { LifecycleButton, LifecycleDialog } from '../../actions/LifecycleAction.js';
15
15
  import { preflightPlacementLabel } from '../../placements/placementLabels.js';
16
- import { placementUncheckedCopy } from '../../copy/readiness.js';
17
- import { useTransition } from './useTransition.js';
18
16
  import { BlockerList } from './BlockerList.js';
19
- const RUNNING_ACTIONS = [
20
- 'stop',
21
- 'add-metric',
22
- 'allocate'
23
- ];
24
- export function ReadinessContent({ test, surface, resultsVersion }) {
17
+ export function ReadinessContent({ test, surface, resultsVersion, embedded = false, barRef }) {
18
+ const formatDate = useDateFormatter();
25
19
  const [selected, setSelected] = useState(null);
26
- const [people, setPeople] = useState(null);
27
- const transition = useTransition(test, undefined, surface);
20
+ const [audience, setAudience] = useState();
28
21
  const doc = test.doc;
22
+ const people = audience?.phase === doc.phase ? audience?.people ?? null : null;
29
23
  useEffect(()=>{
30
24
  let active = true;
31
- // The id/status key resets the count; refreshes retain it while loading.
25
+ // Refreshes retain the last count for this round while loading.
32
26
  if (surface.canReadResults && doc.status === 'running') {
33
27
  void Promise.resolve().then(()=>active ? createApi(surface.apiRoute).summary([
34
28
  doc.id
35
29
  ]) : undefined).then((result)=>{
36
30
  if (!result?.ok) return;
37
31
  const count = result.data?.[doc.id]?.exposures;
38
- if (active) setPeople(typeof count === 'number' && Number.isFinite(count) ? count : null);
32
+ if (active && typeof count === 'number' && Number.isFinite(count)) setAudience({
33
+ phase: doc.phase,
34
+ people: count
35
+ });
39
36
  }).catch(()=>{});
40
37
  }
41
38
  return ()=>{
@@ -44,6 +41,7 @@ export function ReadinessContent({ test, surface, resultsVersion }) {
44
41
  }, [
45
42
  doc.id,
46
43
  doc.status,
44
+ doc.phase,
47
45
  surface.apiRoute,
48
46
  surface.canReadResults,
49
47
  resultsVersion
@@ -63,7 +61,7 @@ export function ReadinessContent({ test, surface, resultsVersion }) {
63
61
  const readinessBlockers = blockingSteps(labelledPreflight, pageReadinessContext(doc, test.preflight, surface));
64
62
  const setup = doc.status === 'draft' || doc.status === 'stopped';
65
63
  const ready = readyToStart(test, surface.editorPlacementMessage);
66
- const startEnabled = !transition.checking && canStartTest(test, surface.editorPlacementMessage);
64
+ const startEnabled = canStartTest(test, surface.editorPlacementMessage);
67
65
  const wait = setup ? actionWaitMessage(test) : undefined;
68
66
  const blockers = [
69
67
  ...readinessBlockers
@@ -93,145 +91,108 @@ export function ReadinessContent({ test, surface, resultsVersion }) {
93
91
  });
94
92
  const startReason = wait ?? blockers[0]?.sentence ?? test.preflightError ?? (!ready ? C.checking : undefined);
95
93
  const actions = availableActions({
96
- status: doc.status,
97
- kind: doc.kind,
98
- arms: doc.arms,
94
+ ...doc,
99
95
  decision,
100
- canManage: surface.canManage
101
- }).filter((action)=>setup ? action.id === 'start' : doc.status === 'running' ? RUNNING_ACTIONS.includes(action.id) : true).sort((a, b)=>doc.status === 'running' ? RUNNING_ACTIONS.indexOf(a.id) - RUNNING_ACTIONS.indexOf(b.id) : 0).map((action)=>action.id === 'add-metric' ? {
102
- ...action,
103
- label: C.addGoal
104
- } : action.id === 'allocate' ? {
105
- ...action,
106
- label: C.allocate
107
- } : action);
108
- const action = actions.find((item)=>item.id === selected);
109
- const sentence = test.statusReadPending ? C.checking : transition.busy ? C.changing : setup ? ready && !blockers.length ? C.ready : null : doc.status === 'running' ? runningCopy(displayDate(doc.startedAt), people, daysRemaining(doc, Date.now())) : doc.status === 'decided' ? decidedCopy(displayDate(doc.decidedAt), winner) : C.archived;
110
- return /*#__PURE__*/ _jsxs("div", {
111
- className: `xp-readiness xp-readiness--${setup && ready && !blockers.length && !transition.busy ? 'ready' : 'neutral'} xp-readiness--bar xp-tests-container`,
96
+ canManage: surface.canManage,
97
+ canReadResults: surface.canReadResults
98
+ }).filter((action)=>action.id !== 'delete' && (!embedded || ![
99
+ 'decide',
100
+ 'release-pages'
101
+ ].includes(action.id)));
102
+ const sentence = test.statusReadPending ? C.checking : setup ? ready && !blockers.length ? C.ready : null : doc.status === 'running' ? runningCopy(displayDate(doc.startedAt, formatDate), people, daysRemaining(doc, Date.now())) : doc.status === 'decided' ? decidedCopy(displayDate(doc.decidedAt, formatDate), winner) : C.archived;
103
+ return /*#__PURE__*/ _jsxs(_Fragment, {
112
104
  children: [
113
- setup && test.preflight?.checks.some((check)=>check.code === 'page-targets-unchecked' && check.warning) ? /*#__PURE__*/ _jsx("p", {
114
- children: C.uncheckedPages
115
- }) : null,
116
- !test.statusReadPending && setup && hasBrowserWritablePrimary(test.preflight, doc.metrics?.primary) ? /*#__PURE__*/ _jsxs("p", {
117
- className: "xp-readiness__warning",
118
- children: [
119
- /*#__PURE__*/ _jsx("span", {
120
- "aria-hidden": "true",
121
- children: "⚠ "
122
- }),
123
- METRICS_COPY.browserWritablePrimary
124
- ]
125
- }) : null,
126
- test.preflight?.checks.filter((check)=>check.code === 'make-content-unsupported' && check.warning).map((check)=>/*#__PURE__*/ _jsx("p", {
127
- children: READINESS[check.code].next(check.detail, doc)
128
- }, check.code)),
129
- test.preflight?.checks.filter((check)=>check.warning && [
130
- 'goal-in-some-versions',
131
- 'placement-unchecked'
132
- ].includes(check.code)).map((check, index)=>{
133
- const placement = check.code === 'placement-unchecked' ? preflightPlacementLabel(check.detail, test.preflight, surface.adminRoute) : undefined;
134
- return /*#__PURE__*/ _jsx("p", {
135
- children: placement ? placement.href ? /*#__PURE__*/ _jsx("a", {
136
- href: placement.href,
137
- children: placementUncheckedCopy(placement.title)
138
- }) : placementUncheckedCopy(placement.title) : READINESS[check.code].next(check.detail, doc)
139
- }, `${check.code}:${index}`);
140
- }),
141
- [
142
- ...new Map(test.preflight?.goalNotes?.map((note)=>[
143
- String(note.metricId),
144
- note
145
- ])).values()
146
- ].map((note)=>/*#__PURE__*/ _jsxs("p", {
147
- className: "xp-readiness__warning",
105
+ /*#__PURE__*/ _jsx("div", {
106
+ ref: barRef,
107
+ className: "xp-test-readiness-bar",
108
+ role: "region",
109
+ "aria-label": C.label,
110
+ "data-dialog-background": true,
111
+ children: /*#__PURE__*/ _jsxs("div", {
112
+ className: `xp-readiness xp-readiness--${setup && ready && !blockers.length ? 'ready' : 'neutral'} xp-readiness--bar xp-tests-container`,
148
113
  children: [
149
- /*#__PURE__*/ _jsx("span", {
150
- "aria-hidden": "true",
151
- children: "⚠ "
114
+ readinessCaveats(test, surface.adminRoute).map(({ key, sentence, href, emphasized })=>/*#__PURE__*/ _jsxs("p", {
115
+ className: emphasized ? 'xp-readiness__warning' : undefined,
116
+ children: [
117
+ emphasized ? /*#__PURE__*/ _jsx("span", {
118
+ "aria-hidden": "true",
119
+ children: "⚠ "
120
+ }) : null,
121
+ href ? /*#__PURE__*/ _jsx("a", {
122
+ href: href,
123
+ children: sentence
124
+ }) : sentence
125
+ ]
126
+ }, key)),
127
+ !test.statusReadPending && doc.status === 'stopped' ? /*#__PURE__*/ _jsx("p", {
128
+ children: stoppedCopy(displayDate(doc.stoppedAt, formatDate))
129
+ }) : null,
130
+ /*#__PURE__*/ _jsxs("div", {
131
+ className: "xp-readiness__state",
132
+ children: [
133
+ /*#__PURE__*/ _jsx(SaveStatus, {
134
+ test: test,
135
+ messageInBlockerList: setup && !!test.preflight && !test.preflightError
136
+ }),
137
+ sentence && (saveStatusMessage(test) || test.preflightError) ? /*#__PURE__*/ _jsx("span", {
138
+ className: "xp-readiness__separator",
139
+ "aria-hidden": "true",
140
+ children: "·"
141
+ }) : null,
142
+ sentence ? /*#__PURE__*/ _jsx("p", {
143
+ role: "status",
144
+ children: sentence
145
+ }) : null,
146
+ setup ? /*#__PURE__*/ _jsx(BlockerList, {
147
+ steps: blockers,
148
+ renderSentence: (_, index)=>{
149
+ const step = blockers[index];
150
+ return step.section === 'header' ? step.sentence : /*#__PURE__*/ _jsx("a", {
151
+ href: `#section-${step.section}`,
152
+ onClick: (event)=>{
153
+ event.preventDefault();
154
+ if (step.section !== 'header') jumpToSection(step.section, step.arm);
155
+ },
156
+ children: step.sentence
157
+ });
158
+ }
159
+ }) : null
160
+ ]
152
161
  }),
153
- note.message
162
+ /*#__PURE__*/ _jsxs("div", {
163
+ className: "xp-readiness__actions",
164
+ children: [
165
+ setup && readinessBlockers.length > 0 && !test.preflightRead?.message && !test.statusReadPending ? /*#__PURE__*/ _jsx(Button, {
166
+ variant: "quiet",
167
+ disabled: test.preflightPending || !!selected,
168
+ onClick: ()=>{
169
+ void test.refreshPreflight(true);
170
+ },
171
+ children: C.refresh
172
+ }) : null,
173
+ actions.map((item)=>{
174
+ if (test.statusReadPending) return null;
175
+ const reason = item.id === 'start' ? startReason : item.unavailable;
176
+ return /*#__PURE__*/ _jsx(LifecycleButton, {
177
+ action: embedded && item.hint ? {
178
+ ...item,
179
+ hint: undefined
180
+ } : item,
181
+ reason: reason,
182
+ showReason: item.id !== 'start',
183
+ disabled: item.id === 'start' && !startEnabled,
184
+ onClick: ()=>setSelected(item)
185
+ }, item.id);
186
+ })
187
+ ]
188
+ })
154
189
  ]
155
- }, note.metricId)),
156
- !test.statusReadPending && doc.status === 'stopped' ? /*#__PURE__*/ _jsx("p", {
157
- children: stoppedCopy(displayDate(doc.stoppedAt))
158
- }) : null,
159
- /*#__PURE__*/ _jsxs("div", {
160
- className: "xp-readiness__state",
161
- children: [
162
- /*#__PURE__*/ _jsx(SaveStatus, {
163
- test: test,
164
- messageInBlockerList: setup && !!test.preflight && !test.preflightError
165
- }),
166
- sentence && (saveStatusMessage(test) || test.preflightError) ? /*#__PURE__*/ _jsx("span", {
167
- className: "xp-readiness__separator",
168
- "aria-hidden": "true",
169
- children: "·"
170
- }) : null,
171
- sentence ? /*#__PURE__*/ _jsx("p", {
172
- role: "status",
173
- children: sentence
174
- }) : null,
175
- setup ? /*#__PURE__*/ _jsx(BlockerList, {
176
- steps: blockers,
177
- renderSentence: (_, index)=>{
178
- const step = blockers[index];
179
- return step.section === 'header' ? step.sentence : /*#__PURE__*/ _jsx("a", {
180
- href: `#section-${step.section}`,
181
- onClick: (event)=>{
182
- event.preventDefault();
183
- if (step.section !== 'header') jumpToSection(step.section, step.arm);
184
- },
185
- children: step.sentence
186
- });
187
- }
188
- }) : null
189
- ]
190
- }),
191
- /*#__PURE__*/ _jsx("div", {
192
- className: "xp-readiness__actions",
193
- children: !test.statusReadPending && actions.map((item)=>{
194
- const reason = item.id === 'start' ? startReason : item.id === 'allocate' && doc.allocation >= 100 ? C.everyone : undefined;
195
- const disabled = transition.busy || !!selected || !!reason || item.id === 'start' && !startEnabled;
196
- return /*#__PURE__*/ _jsxs("span", {
197
- title: reason,
198
- children: [
199
- reason && reason !== wait && item.id !== 'start' ? /*#__PURE__*/ _jsx("span", {
200
- className: "xp-readiness-action-reason",
201
- children: reason
202
- }) : null,
203
- /*#__PURE__*/ _jsx(Button, {
204
- busy: transition.busy,
205
- variant: item.tone === 'primary' || item.id === 'stop' ? 'primary' : 'secondary',
206
- disabled: disabled,
207
- onClick: ()=>{
208
- if (disabled) return;
209
- if (item.id === 'start' && doc.status === 'draft') void transition.run('start', ()=>createApi(surface.apiRoute).start(doc.id, doc.phase));
210
- else setSelected(item.id);
211
- },
212
- children: item.label
213
- })
214
- ]
215
- }, item.id);
216
190
  })
217
191
  }),
218
- transition.error ? /*#__PURE__*/ _jsx("p", {
219
- role: "alert",
220
- children: transition.error
221
- }) : null,
222
- action?.id === 'allocate' ? /*#__PURE__*/ _jsx(AllocateAction, {
223
- test: test,
224
- surface: surface,
225
- onClose: ()=>setSelected(null)
226
- }) : action?.id === 'add-metric' ? /*#__PURE__*/ _jsx(AddMetricAction, {
227
- test: test,
228
- surface: surface,
229
- onClose: ()=>setSelected(null)
230
- }) : action ? /*#__PURE__*/ _jsx(ConfirmAction, {
192
+ selected ? /*#__PURE__*/ _jsx(LifecycleDialog, {
231
193
  test: test,
232
194
  surface: surface,
233
- action: action,
234
- winnerLabel: winner,
195
+ action: selected,
235
196
  onClose: ()=>setSelected(null)
236
197
  }) : null
237
198
  ]
@@ -1,10 +1,13 @@
1
1
  import type { ActionTestApi } from '../contracts.js';
2
2
  export declare function actionWaitMessage(test: Pick<ActionTestApi, 'stale' | 'hasUnsaved' | 'saving' | 'fieldDrafts'>): string | undefined;
3
- export declare function saveStatusMessage(test: ActionTestApi): string | null;
3
+ type SaveState = Pick<ActionTestApi, 'saving' | 'hasUnsaved' | 'stale' | 'errors'>;
4
+ export declare function saveStatusMessage(test: SaveState): string | null;
4
5
  type Props = {
5
6
  test: ActionTestApi;
6
7
  messageInBlockerList?: boolean;
7
8
  };
8
9
  export declare function ReadinessReadStatus({ test, messageInBlockerList }: Props): import("react").JSX.Element;
9
- export declare function SaveStatus({ test, messageInBlockerList }: Props): import("react").JSX.Element;
10
+ export declare function SaveStatus(props: Props | {
11
+ save: SaveState;
12
+ }): import("react").JSX.Element;
10
13
  export {};
@@ -47,20 +47,21 @@ export function ReadinessReadStatus({ test, messageInBlockerList = false }) {
47
47
  }) : null
48
48
  });
49
49
  }
50
- export function SaveStatus({ test, messageInBlockerList }) {
51
- const message = saveStatusMessage(test);
50
+ export function SaveStatus(props) {
51
+ const state = 'test' in props ? props.test : props.save;
52
+ const message = saveStatusMessage(state);
52
53
  return /*#__PURE__*/ _jsxs("div", {
53
54
  className: "xp-save-status",
54
55
  "aria-live": "polite",
55
56
  children: [
56
57
  message ? /*#__PURE__*/ _jsx("span", {
57
- role: test.saving === 'error' ? 'alert' : 'status',
58
+ role: state.saving === 'error' ? 'alert' : 'status',
58
59
  children: message
59
60
  }) : null,
60
- /*#__PURE__*/ _jsx(ReadinessReadStatus, {
61
- test: test,
62
- messageInBlockerList: messageInBlockerList
63
- })
61
+ 'test' in props ? /*#__PURE__*/ _jsx(ReadinessReadStatus, {
62
+ test: props.test,
63
+ messageInBlockerList: props.messageInBlockerList
64
+ }) : null
64
65
  ]
65
66
  });
66
67
  }
@@ -1,7 +1,8 @@
1
1
  import type { ReadinessCode, PreflightResult } from '../../../types/endpoints.js';
2
2
  import type { SerializedFlagPoint } from '../../../types/admin.js';
3
3
  import type { TestDocument } from '../testDocument.model.js';
4
- import type { SurfaceProps } from '../contracts.js';
4
+ import type { DateFormatter } from '../../format/date.js';
5
+ import type { ActionTestApi, SurfaceProps } from '../contracts.js';
5
6
  import { type SectionId } from '../contracts.js';
6
7
  export type ReadinessContext = Pick<TestDocument, 'arms' | 'unitType' | 'flagPoint'> & {
7
8
  editorPage?: SurfaceProps['editorPage'];
@@ -20,15 +21,22 @@ export declare const READINESS: Record<ReadinessCode, {
20
21
  next(detail: unknown, ctx: ReadinessContext): string | null;
21
22
  nextStep?: string | ((detail: unknown, ctx: ReadinessContext) => string | undefined);
22
23
  }>;
24
+ type ReadinessCaveat = {
25
+ key: string;
26
+ sentence: string;
27
+ href?: string;
28
+ emphasized?: boolean;
29
+ };
30
+ export declare function readinessCaveats({ doc, preflight, statusReadPending }: Pick<ActionTestApi, 'doc' | 'preflight' | 'statusReadPending'>, adminRoute: string): ReadinessCaveat[];
23
31
  export declare function blockingSteps(preflight: PreflightResult | null, ctx: ReadinessContext): {
24
- arm?: import("../../../types/contracts.js").ArmKey | undefined;
32
+ arm?: import("../../../types/armKey.js").ArmKey | undefined;
25
33
  section: "header" | SectionId;
26
34
  sentence: string;
27
35
  code: ReadinessCode;
28
36
  }[];
29
37
  export declare function nextStep(preflight: PreflightResult | null, ctx: ReadinessContext): {
30
38
  nextStep?: string | undefined;
31
- arm?: import("../../../types/contracts.js").ArmKey | undefined;
39
+ arm?: import("../../../types/armKey.js").ArmKey | undefined;
32
40
  section: "header" | SectionId;
33
41
  sentence: string;
34
42
  code: ReadinessCode;
@@ -42,8 +50,9 @@ export declare function sectionDone(test: {
42
50
  preflight: PreflightResult | null;
43
51
  doc?: Pick<TestDocument, 'targeting'> | null;
44
52
  }): Record<SectionId, boolean>;
45
- export declare function displayDate(value: unknown): string | null;
53
+ export declare function displayDate(value: unknown, formatDate: DateFormatter): string | null;
46
54
  export declare function daysRemaining(doc: TestDocument, now: number): number | null;
47
55
  export declare function pageReadinessContext(doc: TestDocument, preflight: PreflightResult | null, surface: SurfaceProps): ReadinessContext;
48
56
  /** First affected row in arm order; shared by the wizard and the test-page jump. */
49
- export declare function readinessArm(code: ReadinessCode, detail: unknown, ctx: ReadinessContext): import("../../../types/contracts.js").ArmKey | undefined;
57
+ export declare function readinessArm(code: ReadinessCode, detail: unknown, ctx: ReadinessContext): import("../../../types/armKey.js").ArmKey | undefined;
58
+ export {};
@@ -1,9 +1,12 @@
1
1
  import { nestedTestCopy } from '../../../puck/nestedTestCopy.js';
2
2
  import { SURFACE_COPY } from '../../copy/surface.js';
3
- import { formatDate } from '../../format/date.js';
3
+ import { roundProgress } from '../../format/roundProgress.js';
4
4
  import { actionGroupLabel } from '../../actions/actions.model.js';
5
- import { unpublishedPlacementsCopy, asymmetricGoalsCopy, placementUncheckedCopy, interactingTestsCopy, sameAddressCopy, identicalVersionCopy, unsupportedContentCopy, versionPageUnavailableCopy, versionPageUncheckedCopy, placementFailureCopy, pageInUseCopy, unpublishedPageCopy, READINESS_COPY as C, attributeNext, contentNext, draftContentNext, unsavedContentNext, partialContentNext, summaryContentNext, goalPeopleNext, parameterNext, placementNext, ruleNext, versionsNext } from '../../copy/readiness.js';
5
+ import { duplicateVersionCopy, unpublishedPlacementsCopy, asymmetricGoalsCopy, placementUncheckedCopy, interactingTestsCopy, sameAddressCopy, identicalVersionCopy, unsupportedContentCopy, versionPageUnavailableCopy, versionPageUncheckedCopy, placementFailureCopy, pageInUseCopy, unpublishedPageCopy, READINESS_COPY as C, attributeNext, contentNext, draftContentNext, unsavedContentNext, partialContentNext, summaryContentNext, goalPeopleNext, parameterNext, placementNext, ruleNext, versionsNext } from '../../copy/readiness.js';
6
6
  import { PLACEMENT_LANGUAGES, placementLanguageSuffix } from '../../copy/languages.js';
7
+ import { METRICS_COPY } from '../../copy/metrics.js';
8
+ import { preflightPlacementLabel } from '../../placements/placementLabels.js';
9
+ import { hasBrowserWritablePrimary } from '../../readinessRead.js';
7
10
  import { normalisePath } from '../../../runtime/normalisePath.js';
8
11
  import { testPageCollection } from '../pagePicker/pagePicker.model.js';
9
12
  import { SECTION_ORDER } from '../contracts.js';
@@ -24,7 +27,7 @@ const row = (section, next)=>({
24
27
  next
25
28
  });
26
29
  const versions = row('versions', (detail)=>versionsNext(detailText(detail, C.versionFallback)));
27
- const samePage = (detail, page)=>detail.collection === page.collection && String(detail.id) === String(page.id);
30
+ const samePage = (detail, page)=>page.id !== undefined && detail.collection === page.collection && String(detail.id) === String(page.id);
28
31
  const strings = (value)=>Array.isArray(value) ? value.filter((item)=>typeof item === 'string') : [];
29
32
  function emptyContentGuidance(detail, ctx) {
30
33
  const placements = Array.isArray(detail) ? detail.map(object) : [];
@@ -140,7 +143,7 @@ function emptyContentGuidance(detail, ctx) {
140
143
  nextStep: C.publishPage
141
144
  },
142
145
  'duplicate-version-row': {
143
- ...row('versions', (detail)=>detailRows(detail).map((value)=>`The Experiment block on ${text(object(value).title, 'this page')} has the same version twice. Remove one of them, then save.`).join('\n')),
146
+ ...row('versions', (detail)=>detailRows(detail).map((value)=>duplicateVersionCopy(text(object(value).title, 'this page'))).join('\n')),
144
147
  nextStep: (detail)=>detailRows(detail).map((value)=>`Edit ${text(object(value).title, 'this page')}`).join('\n')
145
148
  },
146
149
  'nested-tests': row('versions', (detail)=>nestedTestCopy.readiness(detail)),
@@ -178,7 +181,7 @@ function emptyContentGuidance(detail, ctx) {
178
181
  ...row('versions', (detail, ctx)=>{
179
182
  const paths = object(detail).paths;
180
183
  const path = text(Array.isArray(paths) ? paths[0] : undefined, 'this page');
181
- return pageInUseCopy(path, pageArm(path, ctx)?.kind === 'variant');
184
+ return pageInUseCopy(path, pageArm(path, ctx)?.kind === 'variant', ctx.arms.find((arm)=>arm.kind === 'control')?.label);
182
185
  }),
183
186
  nextStep: C.choosePages
184
187
  },
@@ -188,11 +191,11 @@ function emptyContentGuidance(detail, ctx) {
188
191
  },
189
192
  'unknown-collection': row('versions', ()=>"That page type isn't set up for tests."),
190
193
  'version-identical': {
191
- ...row('versions', (detail, ctx)=>identicalVersionCopy(text(object(detail).path, object(detail).title ? `${group(object(detail).arm, ctx)} on ${text(object(detail).title, 'this page')}` : group(object(detail).arm, ctx)))),
194
+ ...row('versions', (detail, ctx)=>identicalVersionCopy(text(object(detail).path, object(detail).title ? `${group(object(detail).arm, ctx)} on ${text(object(detail).title, 'this page')}` : group(object(detail).arm, ctx)), group('control', ctx))),
192
195
  nextStep: (detail, ctx)=>`Edit ${text(object(detail).path, group(object(detail).arm, ctx))}`
193
196
  },
194
197
  'version-same-address': {
195
- ...row('versions', (detail, ctx)=>sameAddressCopy(group(object(detail).arm, ctx), group(object(detail).otherArm, ctx), text(object(detail).path, 'this address'), ctx.collectionLabel)),
198
+ ...row('versions', (detail, ctx)=>sameAddressCopy(group(object(detail).arm, ctx), group(object(detail).otherArm, ctx), text(object(detail).path, 'this address'))),
196
199
  nextStep: 'Choose pages'
197
200
  },
198
201
  'page-target-unpublished': {
@@ -204,7 +207,7 @@ function emptyContentGuidance(detail, ctx) {
204
207
  original: arm?.kind === 'control',
205
208
  found: placement?.id != null && placement.published === false,
206
209
  collection: ctx.collectionLabel
207
- } : undefined);
210
+ } : undefined, arm?.label);
208
211
  }),
209
212
  nextStep: C.choosePages
210
213
  },
@@ -235,6 +238,55 @@ function emptyContentGuidance(detail, ctx) {
235
238
  'slot-required': versions,
236
239
  'duplicate-slot': versions
237
240
  };
241
+ export function readinessCaveats({ doc, preflight, statusReadPending }, adminRoute) {
242
+ if (!doc || !preflight) return [];
243
+ const caveats = [];
244
+ const setup = doc.status === 'draft' || doc.status === 'stopped';
245
+ if (setup) {
246
+ if (preflight.checks.some((check)=>check.code === 'page-targets-unchecked' && check.warning)) {
247
+ caveats.push({
248
+ key: 'page-targets-unchecked',
249
+ sentence: C.uncheckedPages
250
+ });
251
+ }
252
+ if (!statusReadPending && hasBrowserWritablePrimary(preflight, doc.metrics?.primary)) {
253
+ caveats.push({
254
+ key: 'browser-writable-primary',
255
+ sentence: METRICS_COPY.browserWritablePrimary,
256
+ emphasized: true
257
+ });
258
+ }
259
+ }
260
+ for (const [index, check] of preflight.checks.entries()){
261
+ if (!check.warning) continue;
262
+ const key = `${check.code}:${index}`;
263
+ if (check.code === 'placement-unchecked') {
264
+ const { title, href } = preflightPlacementLabel(check.detail, preflight, adminRoute);
265
+ caveats.push({
266
+ key,
267
+ sentence: placementUncheckedCopy(title),
268
+ href
269
+ });
270
+ } else if (check.code === 'goal-in-some-versions' || check.code === 'make-content-unsupported' || setup && check.code === 'version-identical') {
271
+ const sentence = READINESS[check.code].next(check.detail, doc);
272
+ if (sentence) caveats.push({
273
+ key,
274
+ sentence
275
+ });
276
+ }
277
+ }
278
+ for (const [metricId, note] of new Map(preflight.goalNotes?.map((note)=>[
279
+ String(note.metricId),
280
+ note
281
+ ]))){
282
+ caveats.push({
283
+ key: `goal-note:${metricId}`,
284
+ sentence: note.message,
285
+ emphasized: true
286
+ });
287
+ }
288
+ return caveats;
289
+ }
238
290
  export function blockingSteps(preflight, ctx) {
239
291
  return [
240
292
  'header',
@@ -291,14 +343,12 @@ export function sectionDone(test) {
291
343
  section === 'who' && test.doc && !test.doc.targeting?.length ? false : test.preflight ? !test.preflight.checks.some((check)=>!check.ok && (Object.hasOwn(READINESS, check.code) ? READINESS[check.code].section : SECTION_ORDER[0]) === section) : section === 'advanced'
292
344
  ]));
293
345
  }
294
- export function displayDate(value) {
346
+ export function displayDate(value, formatDate) {
295
347
  if (typeof value !== 'string' || !Number.isFinite(Date.parse(value))) return null;
296
348
  return formatDate(value);
297
349
  }
298
350
  export function daysRemaining(doc, now) {
299
- const days = doc.analysis?.plannedDurationDays;
300
- const start = typeof doc.startedAt === 'string' ? Date.parse(doc.startedAt) : NaN;
301
- return typeof days === 'number' && days > 0 && Number.isFinite(start) ? Math.max(0, Math.ceil(days - (now - start) / 86_400_000)) : null;
351
+ return roundProgress(doc.startedAt, doc.analysis?.plannedDurationDays, now).daysToGo;
302
352
  }
303
353
  function pageArm(path, ctx) {
304
354
  return ctx.arms.find((arm)=>arm.pageTarget && normalisePath(arm.pageTarget) === normalisePath(path));
@@ -3,7 +3,7 @@ import type { ActionTestApi } from '../contracts.js';
3
3
  import type { SurfaceProps } from '../contracts.js';
4
4
  import type { ActionId } from '../../actions/actions.model.js';
5
5
  /** The ref closes the gap before React renders the disabled button. */
6
- export declare function useTransition(test: ActionTestApi, onSuccess?: () => void, surface?: SurfaceProps): {
6
+ export declare function useTransition(test: ActionTestApi, onSuccess?: () => void, surface?: SurfaceProps, keepRefusal?: boolean): {
7
7
  busy: boolean;
8
8
  checking: boolean;
9
9
  error: string | null;
@@ -11,4 +11,6 @@ export declare function useTransition(test: ActionTestApi, onSuccess?: () => voi
11
11
  closeOnSuccess?: boolean | undefined;
12
12
  }) => Promise<void>;
13
13
  clearError: () => void;
14
+ reloadRequired: boolean;
15
+ refreshAfterDismissal: () => void;
14
16
  };