@delmaredigital/payload-experiments 0.4.0-rc.3 → 0.4.0-rc.5

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 (340) hide show
  1. package/dist/admin/LayerUsage.js +1 -1
  2. package/dist/admin/MetricSourceSelect.js +2 -2
  3. package/dist/admin/PlacementStatus.js +1 -1
  4. package/dist/admin/TestsDashboardCards.js +2 -2
  5. package/dist/admin/TestsNavLink.js +2 -2
  6. package/dist/admin/blocks/BlockPanel.js +3 -3
  7. package/dist/admin/blocks/TestBlockField.js +3 -3
  8. package/dist/admin/blocks/formApi.js +1 -1
  9. package/dist/admin/blocks/model.js +1 -1
  10. package/dist/admin/blocks/statusCache.js +1 -1
  11. package/dist/admin/components/RootViewMessage.js +1 -1
  12. package/dist/admin/copy/blocks.d.ts +2 -2
  13. package/dist/admin/copy/blocks.js +3 -2
  14. package/dist/admin/copy/goals.d.ts +5 -1
  15. package/dist/admin/copy/goals.js +9 -3
  16. package/dist/admin/goals/XpGoalField.js +155 -129
  17. package/dist/admin/goals/xpGoalField.css +2 -3
  18. package/dist/admin/status.model.js +1 -1
  19. package/dist/admin/surface/ResultsRoute.d.ts +2 -1
  20. package/dist/admin/surface/ResultsRoute.js +6 -13
  21. package/dist/admin/surface/SurfaceShell.js +2 -2
  22. package/dist/admin/surface/TestsHome.d.ts +1 -1
  23. package/dist/admin/surface/TestsHome.js +3 -3
  24. package/dist/admin/surface/TestsSurface.js +2 -2
  25. package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
  26. package/dist/admin/surface/goals/GoalForm.js +55 -7
  27. package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
  28. package/dist/admin/surface/goals/GoalsList.js +4 -4
  29. package/dist/admin/surface/goals/data.js +2 -2
  30. package/dist/admin/surface/goals/goals.css +7 -0
  31. package/dist/admin/surface/goals/goals.model.d.ts +11 -1
  32. package/dist/admin/surface/goals/goals.model.js +43 -0
  33. package/dist/admin/surface/home.model.d.ts +1 -1
  34. package/dist/admin/surface/home.model.js +5 -5
  35. package/dist/admin/surface/newTest/NewTest.d.ts +1 -1
  36. package/dist/admin/surface/newTest/NewTest.js +1 -1
  37. package/dist/admin/surface/newTest/PageWizard.d.ts +1 -1
  38. package/dist/admin/surface/newTest/PageWizard.js +23 -25
  39. package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
  40. package/dist/admin/surface/results/ResultsHeader.js +22 -15
  41. package/dist/admin/surface/test/TestPage.d.ts +1 -2
  42. package/dist/admin/surface/test/TestPage.js +45 -156
  43. package/dist/admin/views/ExperimentsRootView.js +1 -1
  44. package/dist/admin/views/TestsNavLinkServer.js +1 -1
  45. package/dist/admin/views/renderCollectionList.js +1 -1
  46. package/dist/admin/views/renderTestsSurface.js +1 -1
  47. package/dist/blocks/placementLocale.d.ts +21 -0
  48. package/dist/blocks/placementLocale.js +115 -0
  49. package/dist/collections/experiments/config.js +1 -1
  50. package/dist/collections/metrics.js +1 -1
  51. package/dist/db/bulkPlacementRemoval.d.ts +30 -0
  52. package/dist/db/bulkPlacementRemoval.js +107 -0
  53. package/dist/db/placements.d.ts +2 -0
  54. package/dist/db/placements.js +8 -0
  55. package/dist/endpoints/editorSurface.d.ts +3 -0
  56. package/dist/endpoints/editorSurface.js +31 -0
  57. package/dist/endpoints/index.js +28 -1
  58. package/dist/errors.d.ts +1 -0
  59. package/dist/errors.js +2 -0
  60. package/dist/fields/xpGoal.js +1 -1
  61. package/dist/goals/fairness.d.ts +1 -1
  62. package/dist/goals/fairness.js +1 -1
  63. package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
  64. package/dist/goals/picker/clickGoalPicker.model.js +20 -2
  65. package/dist/goals/picker/copy.d.ts +4 -2
  66. package/dist/goals/picker/copy.js +4 -2
  67. package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
  68. package/dist/goals/picker/useClickGoalPicker.js +4 -2
  69. package/dist/hooks/blockRemovalRule.d.ts +29 -0
  70. package/dist/hooks/blockRemovalRule.js +141 -0
  71. package/dist/hooks/pageGuard.d.ts +24 -2
  72. package/dist/hooks/pageGuard.js +178 -24
  73. package/dist/lib/placementPages.d.ts +9 -0
  74. package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +1 -4
  75. package/dist/onInit.js +22 -0
  76. package/dist/plugin.js +2 -1
  77. package/dist/puck/ExperimentPicker.js +25 -10
  78. package/dist/puck/copy.d.ts +4 -1
  79. package/dist/puck/copy.js +4 -1
  80. package/dist/puck/editor/ConfigureTestDrawer.d.ts +21 -0
  81. package/dist/puck/editor/ConfigureTestDrawer.js +147 -0
  82. package/dist/puck/editor/CreateExperimentDrawer.d.ts +11 -2
  83. package/dist/puck/editor/CreateExperimentDrawer.js +73 -9
  84. package/dist/puck/editor/EditorControls.d.ts +14 -0
  85. package/dist/puck/editor/EditorControls.js +99 -0
  86. package/dist/puck/editor/ExperimentSlotEditor.js +690 -79
  87. package/dist/puck/editor/LeftoverVersions.d.ts +13 -0
  88. package/dist/puck/editor/LeftoverVersions.js +115 -0
  89. package/dist/puck/editor/PlacementNotice.d.ts +8 -0
  90. package/dist/puck/editor/PlacementNotice.js +22 -0
  91. package/dist/puck/editor/QuickTestActions.d.ts +3 -0
  92. package/dist/puck/editor/QuickTestActions.js +50 -0
  93. package/dist/puck/editor/ResultsReadout.js +8 -5
  94. package/dist/puck/editor/VersionBuilder.d.ts +20 -6
  95. package/dist/puck/editor/VersionBuilder.js +80 -50
  96. package/dist/puck/editor/armWrites.d.ts +3 -1
  97. package/dist/puck/editor/armWrites.js +2 -1
  98. package/dist/puck/editor/armsCache.d.ts +3 -1
  99. package/dist/puck/editor/armsCache.js +20 -3
  100. package/dist/puck/editor/cloneSlot.d.ts +2 -0
  101. package/dist/puck/editor/cloneSlot.js +7 -0
  102. package/dist/puck/editor/copy.d.ts +42 -5
  103. package/dist/puck/editor/copy.js +43 -6
  104. package/dist/puck/editor/editor.chrome.css +44 -0
  105. package/dist/puck/editor/editor.css +68 -0
  106. package/dist/puck/editor/editor.model.d.ts +14 -0
  107. package/dist/puck/editor/editor.model.js +58 -1
  108. package/dist/puck/editor/editorSurface.d.ts +10 -0
  109. package/dist/puck/editor/editorSurface.js +65 -0
  110. package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
  111. package/dist/puck/editor/localPlacements.d.ts +2 -0
  112. package/dist/puck/editor/localPlacements.js +29 -0
  113. package/dist/puck/editor/outlineVersion.d.ts +5 -0
  114. package/dist/puck/editor/outlineVersion.js +36 -0
  115. package/dist/puck/editor/placementsCache.d.ts +50 -0
  116. package/dist/puck/editor/placementsCache.js +258 -0
  117. package/dist/puck/editor/sidebar.d.ts +12 -0
  118. package/dist/puck/editor/sidebar.js +77 -0
  119. package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
  120. package/dist/puck/editor/usePlacementNotice.js +14 -0
  121. package/dist/puck/editor/xpGoalPuckEditorField.js +109 -98
  122. package/dist/puck/experimentSlotField.d.ts +3 -0
  123. package/dist/puck/experimentSlotField.js +15 -4
  124. package/dist/{admin → testSurface}/actions/DecideDialog.d.ts +2 -1
  125. package/dist/{admin → testSurface}/actions/DecideDialog.js +6 -4
  126. package/dist/{admin → testSurface}/api.js +5 -6
  127. package/dist/{admin → testSurface}/copy/common.d.ts +3 -1
  128. package/dist/{admin → testSurface}/copy/common.js +5 -1
  129. package/dist/{admin → testSurface}/copy/readiness.d.ts +20 -1
  130. package/dist/{admin → testSurface}/copy/readiness.js +25 -1
  131. package/dist/{admin → testSurface}/copy/testPage.d.ts +4 -0
  132. package/dist/{admin → testSurface}/copy/testPage.js +8 -2
  133. package/dist/testSurface/format/adminURL.d.ts +7 -0
  134. package/dist/testSurface/format/adminURL.js +9 -0
  135. package/dist/{admin → testSurface}/placements/placementLabels.js +1 -1
  136. package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
  137. package/dist/testSurface/previewLinks.model.js +4 -0
  138. package/dist/testSurface/readPreflight.d.ts +9 -0
  139. package/dist/testSurface/readPreflight.js +38 -0
  140. package/dist/testSurface/readinessRead.d.ts +50 -0
  141. package/dist/testSurface/readinessRead.js +46 -0
  142. package/dist/testSurface/results/results.css +64 -0
  143. package/dist/{admin → testSurface}/surface/contracts.d.ts +7 -2
  144. package/dist/testSurface/surface/editorPlacement.d.ts +21 -0
  145. package/dist/testSurface/surface/editorPlacement.js +60 -0
  146. package/dist/{admin → testSurface}/surface/pageBlock/parts.js +19 -9
  147. package/dist/testSurface/surface/pagePicker/pagePicker.css +10 -0
  148. package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.js +37 -7
  149. package/dist/testSurface/surface/readiness/Banner.d.ts +2 -0
  150. package/dist/{admin → testSurface}/surface/readiness/Banner.js +106 -68
  151. package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
  152. package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
  153. package/dist/testSurface/surface/readiness/SaveStatus.d.ts +9 -0
  154. package/dist/testSurface/surface/readiness/SaveStatus.js +66 -0
  155. package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
  156. package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +13 -0
  157. package/dist/{admin → testSurface}/surface/readiness/readiness.model.js +51 -36
  158. package/dist/{admin → testSurface}/surface/readiness/useTransition.d.ts +5 -2
  159. package/dist/testSurface/surface/readiness/useTransition.js +98 -0
  160. package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +2 -2
  161. package/dist/{admin → testSurface}/surface/results/ResultsBody.js +18 -11
  162. package/dist/testSurface/surface/setting/setting.css +17 -0
  163. package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +1 -0
  164. package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
  165. package/dist/{admin → testSurface}/surface/test/GoalSection.js +4 -2
  166. package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
  167. package/dist/{admin → testSurface}/surface/test/LengthSection.js +2 -1
  168. package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
  169. package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +1 -2
  170. package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
  171. package/dist/testSurface/surface/test/Section.js +80 -0
  172. package/dist/{admin → testSurface}/surface/test/TargetingSection.js +5 -0
  173. package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
  174. package/dist/testSurface/surface/test/TestSurface.js +213 -0
  175. package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
  176. package/dist/{admin → testSurface}/surface/test/VersionsSection.js +13 -6
  177. package/dist/testSurface/surface/test/testPage.css +104 -0
  178. package/dist/{admin → testSurface}/surface/useTestDocument.d.ts +9 -2
  179. package/dist/{admin → testSurface}/surface/useTestDocument.js +92 -46
  180. package/dist/{admin → testSurface}/surfaceUrls.js +1 -1
  181. package/dist/testSurface/useReadinessPolling.d.ts +3 -0
  182. package/dist/testSurface/useReadinessPolling.js +24 -0
  183. package/dist/transitions/placementInteractions.js +1 -1
  184. package/dist/transitions/placements.d.ts +27 -8
  185. package/dist/transitions/placements.js +77 -6
  186. package/dist/transitions/preflightData.js +1 -1
  187. package/dist/transitions/start.js +2 -2
  188. package/dist/types/endpoints.d.ts +1 -1
  189. package/dist/ui/Card.d.ts +2 -1
  190. package/dist/ui/Card.js +4 -4
  191. package/dist/ui/Dialog.d.ts +4 -1
  192. package/dist/ui/Dialog.js +41 -3
  193. package/dist/ui/Drawer.d.ts +10 -0
  194. package/dist/ui/Drawer.js +29 -0
  195. package/dist/ui/Tabs.d.ts +4 -3
  196. package/dist/ui/Tabs.js +47 -32
  197. package/dist/ui/ui.css +24 -0
  198. package/package.json +1 -1
  199. package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
  200. package/dist/admin/actions/ConfirmDialog.js +0 -149
  201. package/dist/admin/results/results.css +0 -64
  202. package/dist/admin/styles.css +0 -10
  203. package/dist/admin/styles.d.ts +0 -2
  204. package/dist/admin/styles.js +0 -3
  205. package/dist/admin/surface/pagePicker/pagePicker.css +0 -10
  206. package/dist/admin/surface/readiness/Banner.d.ts +0 -5
  207. package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
  208. package/dist/admin/surface/readiness/SaveStatus.js +0 -53
  209. package/dist/admin/surface/readiness/useTransition.js +0 -35
  210. package/dist/admin/surface/setting/setting.css +0 -17
  211. package/dist/admin/surface/test/GoalSection.d.ts +0 -2
  212. package/dist/admin/surface/test/LengthSection.d.ts +0 -2
  213. package/dist/admin/surface/test/Section.js +0 -48
  214. package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
  215. package/dist/admin/surface/test/testPage.css +0 -92
  216. /package/dist/{admin → testSurface}/PreviewLinks.d.ts +0 -0
  217. /package/dist/{admin → testSurface}/PreviewLinks.js +0 -0
  218. /package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +0 -0
  219. /package/dist/{admin → testSurface}/actions/MakeContentResult.js +0 -0
  220. /package/dist/{admin → testSurface}/actions/actions.model.d.ts +0 -0
  221. /package/dist/{admin → testSurface}/actions/actions.model.js +0 -0
  222. /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
  223. /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
  224. /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
  225. /package/dist/{admin → testSurface}/allocation.model.js +0 -0
  226. /package/dist/{admin → testSurface}/api.d.ts +0 -0
  227. /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
  228. /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
  229. /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
  230. /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
  231. /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
  232. /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
  233. /package/dist/{admin → testSurface}/copy/actions.d.ts +0 -0
  234. /package/dist/{admin → testSurface}/copy/actions.js +0 -0
  235. /package/dist/{admin → testSurface}/copy/advanced.d.ts +0 -0
  236. /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
  237. /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
  238. /package/dist/{admin → testSurface}/copy/arms.js +0 -0
  239. /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
  240. /package/dist/{admin → testSurface}/copy/audience.js +0 -0
  241. /package/dist/{admin → testSurface}/copy/metrics.d.ts +0 -0
  242. /package/dist/{admin → testSurface}/copy/metrics.js +0 -0
  243. /package/dist/{admin → testSurface}/copy/pages.d.ts +0 -0
  244. /package/dist/{admin → testSurface}/copy/pages.js +0 -0
  245. /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
  246. /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
  247. /package/dist/{admin → testSurface}/copy/results.d.ts +0 -0
  248. /package/dist/{admin → testSurface}/copy/results.js +0 -0
  249. /package/dist/{admin → testSurface}/copy/review.d.ts +0 -0
  250. /package/dist/{admin → testSurface}/copy/review.js +0 -0
  251. /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
  252. /package/dist/{admin → testSurface}/copy/setting.js +0 -0
  253. /package/dist/{admin → testSurface}/copy/surface.d.ts +0 -0
  254. /package/dist/{admin → testSurface}/copy/surface.js +0 -0
  255. /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
  256. /package/dist/{admin → testSurface}/format/date.js +0 -0
  257. /package/dist/{admin → testSurface}/labels.d.ts +0 -0
  258. /package/dist/{admin → testSurface}/labels.js +0 -0
  259. /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
  260. /package/dist/{admin → testSurface}/lockedNotice.model.js +0 -0
  261. /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
  262. /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
  263. /package/dist/{admin → testSurface}/placements/placementLabels.d.ts +0 -0
  264. /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
  265. /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
  266. /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
  267. /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
  268. /package/dist/{admin → testSurface}/reload.d.ts +0 -0
  269. /package/dist/{admin → testSurface}/reload.js +0 -0
  270. /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
  271. /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
  272. /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
  273. /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
  274. /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
  275. /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
  276. /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
  277. /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
  278. /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
  279. /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
  280. /package/dist/{admin → testSurface}/results/VerdictHero.d.ts +0 -0
  281. /package/dist/{admin → testSurface}/results/VerdictHero.js +0 -0
  282. /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
  283. /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
  284. /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
  285. /package/dist/{admin → testSurface}/results/format.js +0 -0
  286. /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
  287. /package/dist/{admin → testSurface}/results/legacy.js +0 -0
  288. /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
  289. /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
  290. /package/dist/{admin → testSurface}/results/results.model.d.ts +0 -0
  291. /package/dist/{admin → testSurface}/results/results.model.js +0 -0
  292. /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
  293. /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
  294. /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
  295. /package/dist/{admin → testSurface}/review/review.model.js +0 -0
  296. /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
  297. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
  298. /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.js +0 -0
  299. /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
  300. /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.d.ts +0 -0
  301. /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.js +0 -0
  302. /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.d.ts +0 -0
  303. /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.js +0 -0
  304. /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +0 -0
  305. /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +0 -0
  306. /package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +0 -0
  307. /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
  308. /package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +0 -0
  309. /package/dist/{admin → testSurface}/surface/results/ReleasePages.js +0 -0
  310. /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
  311. /package/dist/{admin → testSurface}/surface/results/recommendation.model.js +0 -0
  312. /package/dist/{admin → testSurface}/surface/results/useResults.d.ts +0 -0
  313. /package/dist/{admin → testSurface}/surface/results/useResults.js +0 -0
  314. /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
  315. /package/dist/{admin → testSurface}/surface/setting/parts.js +0 -0
  316. /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
  317. /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
  318. /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
  319. /package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +0 -0
  320. /package/dist/{admin → testSurface}/surface/test/PageHoldout.js +0 -0
  321. /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
  322. /package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +0 -0
  323. /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
  324. /package/dist/{admin → testSurface}/surface/test/fields.d.ts +0 -0
  325. /package/dist/{admin → testSurface}/surface/test/fields.js +0 -0
  326. /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
  327. /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
  328. /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
  329. /package/dist/{admin → testSurface}/surface/test/pageParts.js +0 -0
  330. /package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +0 -0
  331. /package/dist/{admin → testSurface}/surface/test/testPage.model.js +0 -0
  332. /package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +0 -0
  333. /package/dist/{admin → testSurface}/surface/testDocument.model.js +0 -0
  334. /package/dist/{admin → testSurface}/surfaceUrls.d.ts +0 -0
  335. /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
  336. /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
  337. /package/dist/{admin → testSurface}/theme.d.ts +0 -0
  338. /package/dist/{admin → testSurface}/theme.js +0 -0
  339. /package/dist/{admin → testSurface}/useApi.d.ts +0 -0
  340. /package/dist/{admin → testSurface}/useApi.js +0 -0
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { FieldDescription, FieldLabel, useDocumentInfo } from '@payloadcms/ui';
4
4
  import { useLayerExperiments } from './useLayerUsage.js';
5
- import { statusLabel } from './labels.js';
5
+ import { statusLabel } from '../testSurface/labels.js';
6
6
  import { HISTORY_COPY, layerRow, layerSummary } from './copy/history.js';
7
7
  export function LayerUsage({ field, path }) {
8
8
  const { id } = useDocumentInfo();
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { SelectInput, useField } from '@payloadcms/ui';
4
- import { metricSourceHint, metricSourceOptions, sourceFor } from './metricSource.model.js';
5
- import { METRICS_COPY } from './copy/metrics.js';
4
+ import { metricSourceHint, metricSourceOptions, sourceFor } from '../testSurface/metricSource.model.js';
5
+ import { METRICS_COPY } from '../testSurface/copy/metrics.js';
6
6
  export function MetricSourceSelect({ path, field, readOnly }) {
7
7
  const { value, setValue } = useField({
8
8
  path
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useConfig, useDocumentInfo } from '@payloadcms/ui';
4
4
  import { useEffect, useMemo, useState } from 'react';
5
5
  import { formatAdminURL } from 'payload/shared';
6
- import { createApi } from './api.js';
6
+ import { createApi } from '../testSurface/api.js';
7
7
  import { pageStatusCopy } from './placementStatus.model.js';
8
8
  /** Manage-only endpoint: access-filtered editors see no status or error text. */ export function PlacementStatus(_props) {
9
9
  const { id, collectionSlug } = useDocumentInfo();
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { surfaceUrls } from './surfaceUrls.js';
3
+ import { surfaceUrls } from '../testSurface/surfaceUrls.js';
4
4
  import './theme.css';
5
5
  import './dashboard.css';
6
6
  import { Card, useAuth, useConfig } from '@payloadcms/ui';
7
- import { SURFACE_COPY } from './copy/surface.js';
7
+ import { SURFACE_COPY } from '../testSurface/copy/surface.js';
8
8
  /** @deprecated Retained for existing import maps until 0.5.0. */ export function TestsDashboardCards() {
9
9
  const { config } = useConfig();
10
10
  const { permissions } = useAuth();
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { surfaceUrls } from './surfaceUrls.js';
3
+ import { surfaceUrls } from '../testSurface/surfaceUrls.js';
4
4
  import './theme.css';
5
5
  import { Link, NavGroup, useAuth, useConfig } from '@payloadcms/ui';
6
6
  import { usePathname } from 'next/navigation.js';
7
- import { SURFACE_COPY } from './copy/surface.js';
7
+ import { SURFACE_COPY } from '../testSurface/copy/surface.js';
8
8
  /** @deprecated Retained for existing import maps until 0.5.0. */ function TestsNav({ isOpen = true }) {
9
9
  const { config } = useConfig();
10
10
  const { permissions } = useAuth();
@@ -4,10 +4,10 @@ import { Banner, Button, ConfirmationModal, toast, useModal, useFormInitializing
4
4
  import { formatAdminURL } from 'payload/shared';
5
5
  import { useEffect, useId, useRef, useState } from 'react';
6
6
  import { copyOriginalIntoVersion, syncExperimentSlots, unwrapExperimentBlock } from '../../blocks/formState.js';
7
- import { BLOCK_COPY, blockSyncNotice, blockUnwrapNotice, blockDeleteConfirmation, blockUnwrapConfirmation, blockRunningUnwrap, blockDecidedUnwrap, blockFinishedCopy } from '../copy/blocks.js';
8
- import { API_MESSAGES } from '../copy/common.js';
7
+ import { BLOCK_COPY, blockSyncNotice, blockUnwrapNotice, blockDeleteConfirmation, blockUnwrapConfirmation, blockRunningUnwrap, blockDecidedUnwrap, blockFinishedCopy } from '../../admin/copy/blocks.js';
8
+ import { API_MESSAGES } from '../../testSurface/copy/common.js';
9
9
  import { isOrphan, liveStatus, slotLabel, statusSentence } from './model.js';
10
- import { createApi } from '../api.js';
10
+ import { createApi } from '../../testSurface/api.js';
11
11
  import { useBlockStatus, setBlockStatus } from './statusCache.js';
12
12
  import { useBlockForm } from './useBlockForm.js';
13
13
  import { BlockChangedError, RefusalError } from './formApi.js';
@@ -6,9 +6,9 @@ import { useMemo, useRef, useState } from 'react';
6
6
  import { hostBlocks } from '../../blocks/model.js';
7
7
  import { wrapExperimentBlock } from '../../blocks/formState.js';
8
8
  import { CreateRefused, createTest } from '../../puck/editor/createTest.js';
9
- import { createApi } from '../api.js';
10
- import { BLOCK_COPY, blockSaveNotice, blockTestName } from '../copy/blocks.js';
11
- import { API_MESSAGES } from '../copy/common.js';
9
+ import { createApi } from '../../testSurface/api.js';
10
+ import { BLOCK_COPY, blockSaveNotice, blockTestName } from '../../admin/copy/blocks.js';
11
+ import { API_MESSAGES } from '../../testSurface/copy/common.js';
12
12
  import { adaptClientBlocksField, BlockChangedError, dataAt, experimentBlockSlug, findClientBlocksField, replaceBlockRow, wrapMode } from './formApi.js';
13
13
  import { blockChoices, labelText } from './model.js';
14
14
  export function TestBlockField(props) {
@@ -1,5 +1,5 @@
1
1
  import { EXPERIMENT_BLOCK_SLUG, hostBlocks } from '../../blocks/model.js';
2
- import { BLOCK_COPY } from '../copy/blocks.js';
2
+ import { BLOCK_COPY } from '../../admin/copy/blocks.js';
3
3
  /** The only form-state failure with block-specific editor copy. */ export class BlockChangedError extends Error {
4
4
  constructor(){
5
5
  super(BLOCK_COPY.blockChanged);
@@ -1,5 +1,5 @@
1
1
  import { hostBlocks } from '../../blocks/model.js';
2
- import { BLOCK_COPY, blockDecidedStatus, blockDraftStatus, blockFinishedStatus, blockPosition } from '../copy/blocks.js';
2
+ import { BLOCK_COPY, blockDecidedStatus, blockDraftStatus, blockFinishedStatus, blockPosition } from '../../admin/copy/blocks.js';
3
3
  export function liveStatus(status) {
4
4
  return !!status && 'status' in status;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useRef, useSyncExternalStore } from 'react';
2
- import { createApi } from '../api.js';
2
+ import { createApi } from '../../testSurface/api.js';
3
3
  const cache = new Map();
4
4
  // Subscribers do not create status entries: a label alone owns no cached data.
5
5
  const listeners = new Map();
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import '../theme.css';
4
- import { theme } from '../theme.js';
4
+ import { theme } from '../../testSurface/theme.js';
5
5
  export function RootViewMessage({ children, alert = false }) {
6
6
  return /*#__PURE__*/ _jsx("div", {
7
7
  role: alert ? 'alert' : undefined,
@@ -13,8 +13,8 @@ export declare const BLOCK_COPY: {
13
13
  unwrap: string;
14
14
  removeAndUnwrap: string;
15
15
  deleteAndUnwrap: string;
16
- alreadyDeleted: string;
17
- noLongerDraft: string;
16
+ alreadyDeleted: "This test was already deleted. Reload the page.";
17
+ noLongerDraft: "This test is no longer a draft. Reload the page.";
18
18
  finishUnwrap: string;
19
19
  deleted: string;
20
20
  discarded: string;
@@ -1,3 +1,4 @@
1
+ import { API_MESSAGES } from '../../testSurface/copy/common.js';
1
2
  export const BLOCK_COPY = {
2
3
  testBlock: 'Test a block on this page',
3
4
  pick: 'Choose a block',
@@ -13,8 +14,8 @@ export const BLOCK_COPY = {
13
14
  unwrap: 'Unwrap',
14
15
  removeAndUnwrap: 'Remove the test and unwrap',
15
16
  deleteAndUnwrap: 'Delete and unwrap',
16
- alreadyDeleted: 'This test was already deleted. Reload the page.',
17
- noLongerDraft: 'This test is no longer a draft. Reload the page.',
17
+ alreadyDeleted: API_MESSAGES.testAlreadyDeleted,
18
+ noLongerDraft: API_MESSAGES.testNoLongerDraft,
18
19
  finishUnwrap: 'The test was removed; use Unwrap to finish.',
19
20
  deleted: "This block's test was deleted; the page shows the Original.",
20
21
  discarded: 'This test has ended; the page shows the Original.',
@@ -13,6 +13,7 @@ export declare const GOALS_COPY: {
13
13
  readonly decrease: "Less is better";
14
14
  readonly usedBy: "Used by";
15
15
  readonly status: "Status";
16
+ readonly showLess: "Show less";
16
17
  readonly inUse: "In use";
17
18
  readonly unused: "Not used yet";
18
19
  readonly empty: "No goals yet. A goal is what a test tries to improve.";
@@ -55,8 +56,11 @@ export declare const GOALS_COPY: {
55
56
  readonly deleteTitle: "Delete this goal?";
56
57
  readonly deleteBody: "This cannot be undone.";
57
58
  readonly confirmDelete: "Delete";
59
+ readonly thoseTests: "those tests";
60
+ readonly deleteLockedEnd: " first.";
58
61
  };
59
62
  export declare function goalUsedBy(count: number): string;
60
63
  export declare function goalInUse(count: number): string;
61
- export declare function goalDeleteLocked(count: number): string;
64
+ export declare function goalDeleteLockedStart(count: number): string;
62
65
  export declare function goalsNoMatches(search: string): string;
66
+ export declare function goalShowAll(count: number): string;
@@ -14,6 +14,7 @@ export const GOALS_COPY = {
14
14
  decrease: 'Less is better',
15
15
  usedBy: 'Used by',
16
16
  status: 'Status',
17
+ showLess: 'Show less',
17
18
  inUse: 'In use',
18
19
  unused: 'Not used yet',
19
20
  empty: 'No goals yet. A goal is what a test tries to improve.',
@@ -55,7 +56,9 @@ export const GOALS_COPY = {
55
56
  fields: 'Goal details',
56
57
  deleteTitle: 'Delete this goal?',
57
58
  deleteBody: 'This cannot be undone.',
58
- confirmDelete: 'Delete'
59
+ confirmDelete: 'Delete',
60
+ thoseTests: 'those tests',
61
+ deleteLockedEnd: ' first.'
59
62
  };
60
63
  export function goalUsedBy(count) {
61
64
  return `Used by ${count} ${count === 1 ? 'test' : 'tests'}`;
@@ -63,9 +66,12 @@ export function goalUsedBy(count) {
63
66
  export function goalInUse(count) {
64
67
  return `In use by ${count} ${count === 1 ? 'test' : 'tests'}`;
65
68
  }
66
- export function goalDeleteLocked(count) {
67
- return `${goalUsedBy(count)}. Remove it from those tests first.`;
69
+ export function goalDeleteLockedStart(count) {
70
+ return `${goalUsedBy(count)}. Remove it from `;
68
71
  }
69
72
  export function goalsNoMatches(search) {
70
73
  return `No goals match “${search}”.`;
71
74
  }
75
+ export function goalShowAll(count) {
76
+ return `Show all ${count}`;
77
+ }
@@ -1,11 +1,14 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Button, FieldError, FieldLabel, SelectInput, TextInput, useAuth, useConfig, useField } from '@payloadcms/ui';
3
+ import { Button, FieldDescription, FieldError, FieldLabel, SelectInput, useAuth, useConfig, useField } from '@payloadcms/ui';
4
4
  import { useId } from 'react';
5
5
  import { useClickGoalPicker } from '../../goals/picker/useClickGoalPicker.js';
6
+ import { clickGoalOptions } from '../../goals/picker/clickGoalPicker.model.js';
6
7
  import { CLICK_GOAL_COPY as C } from '../../goals/picker/copy.js';
7
8
  import '../theme.css';
8
9
  import './xpGoalField.css';
10
+ // Payload 3's declaration requires `name`, though SelectInput only consumes `path`.
11
+ const GoalSelectInput = SelectInput;
9
12
  export function XpGoalField({ path, field, readOnly }) {
10
13
  const { value, setValue, showError } = useField({
11
14
  path
@@ -15,9 +18,11 @@ export function XpGoalField({ path, field, readOnly }) {
15
18
  const access = permissions?.collections?.['xp-experiments'];
16
19
  const locked = Boolean(readOnly || field.admin?.readOnly);
17
20
  const picker = useClickGoalPicker(config.routes.api, {
18
- enabled: access?.update === true,
21
+ enabled: access?.update === true && !locked,
19
22
  onSelect: setValue
20
23
  });
24
+ const { options, missing } = clickGoalOptions(picker.status, picker.goals, value ?? '');
25
+ const readonly = locked || picker.status === 'not-manager';
21
26
  const id = useId(), namePath = `${id}-name`, slugPath = `${id}-slug`;
22
27
  const stopEnter = (event)=>{
23
28
  if (event.key === 'Enter') {
@@ -28,140 +33,161 @@ export function XpGoalField({ path, field, readOnly }) {
28
33
  return /*#__PURE__*/ _jsxs("div", {
29
34
  className: "field-type xp-goal-field",
30
35
  children: [
31
- /*#__PURE__*/ _jsx(TextInput, {
32
- path: path,
33
- label: field.label ?? C.label,
34
- description: field.admin?.description,
35
- required: field.required,
36
- readOnly: locked,
37
- value: value ?? '',
38
- showError: showError,
39
- Error: /*#__PURE__*/ _jsx(FieldError, {
40
- path: path,
41
- showError: showError
42
- }),
43
- onChange: (event)=>{
44
- if (!locked) setValue(event.currentTarget.value);
45
- }
46
- }),
47
- picker.canManage && !locked ? /*#__PURE__*/ _jsxs(_Fragment, {
36
+ readonly ? /*#__PURE__*/ _jsxs("div", {
48
37
  children: [
49
- /*#__PURE__*/ _jsxs("div", {
50
- className: "xp-goal-field__row",
38
+ /*#__PURE__*/ _jsxs("span", {
39
+ className: "field-label",
40
+ id: `${id}-label`,
51
41
  children: [
52
- /*#__PURE__*/ _jsx(SelectInput, {
53
- name: `${path}__xpGoalPicker`,
54
- path: `${path}__xpGoalPicker`,
55
- className: "xp-goal-field__select",
56
- value: picker.goals.some((goal)=>goal.slug === value) ? value : undefined,
57
- options: picker.goals.map((goal)=>({
58
- value: goal.slug,
59
- label: goal.name
60
- })),
61
- placeholder: C.choose,
62
- isClearable: false,
63
- label: C.choose,
64
- onChange: (option)=>{
65
- if (option && !Array.isArray(option)) setValue(String(option.value));
66
- }
67
- }),
68
- !picker.panel.open ? /*#__PURE__*/ _jsx(Button, {
69
- type: "button",
70
- margin: false,
71
- buttonStyle: "secondary",
72
- onClick: picker.open,
73
- children: C.newGoal
42
+ C.label,
43
+ field.required ? /*#__PURE__*/ _jsx("span", {
44
+ className: "required",
45
+ children: "*"
74
46
  }) : null
75
47
  ]
76
48
  }),
77
- picker.undefinedKey(value ?? '') ? /*#__PURE__*/ _jsx("p", {
78
- role: "status",
79
- children: C.undefinedKey
80
- }) : null,
81
- picker.panel.open ? /*#__PURE__*/ _jsxs("section", {
82
- className: "xp-goal-field__panel",
83
- "aria-labelledby": `${id}-title`,
84
- children: [
85
- /*#__PURE__*/ _jsx("h3", {
86
- id: `${id}-title`,
87
- children: C.title
88
- }),
89
- /*#__PURE__*/ _jsxs("div", {
90
- className: "field-type text",
91
- children: [
92
- /*#__PURE__*/ _jsx(FieldLabel, {
93
- path: namePath,
94
- label: C.name
95
- }),
96
- /*#__PURE__*/ _jsx("input", {
97
- id: `field-${namePath}`,
98
- value: picker.panel.name,
99
- disabled: picker.panel.pending,
100
- onKeyDown: stopEnter,
101
- onChange: (event)=>picker.setName(event.currentTarget.value)
102
- })
103
- ]
104
- }),
105
- /*#__PURE__*/ _jsxs("details", {
106
- open: picker.panel.advanced,
107
- onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
108
- children: [
109
- /*#__PURE__*/ _jsx("summary", {
110
- children: C.advanced
111
- }),
112
- /*#__PURE__*/ _jsxs("div", {
113
- className: "field-type text",
114
- children: [
115
- /*#__PURE__*/ _jsx(FieldLabel, {
116
- path: slugPath,
117
- label: C.slug
118
- }),
119
- /*#__PURE__*/ _jsx("input", {
120
- id: `field-${slugPath}`,
121
- value: picker.panel.slug,
122
- disabled: picker.panel.pending,
123
- onKeyDown: stopEnter,
124
- "aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
125
- "aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
126
- onChange: (event)=>picker.setSlug(event.currentTarget.value)
127
- }),
128
- picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
129
- id: `${id}-slug-error`,
130
- role: "alert",
131
- children: picker.panel.errors.slug
132
- }) : null
133
- ]
134
- })
135
- ]
136
- }),
137
- picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
138
- role: "alert",
139
- children: picker.panel.errors.general
140
- }) : null,
141
- /*#__PURE__*/ _jsxs("div", {
142
- className: "xp-goal-field__actions",
143
- children: [
144
- /*#__PURE__*/ _jsx(Button, {
145
- type: "button",
146
- margin: false,
147
- buttonStyle: "primary",
148
- disabled: picker.panel.pending || !picker.panel.name.trim(),
149
- onClick: ()=>void picker.create(),
150
- children: C.createGoal
151
- }),
152
- /*#__PURE__*/ _jsx(Button, {
153
- type: "button",
154
- margin: false,
155
- buttonStyle: "secondary",
156
- disabled: picker.panel.pending,
157
- onClick: picker.cancel,
158
- children: C.cancel
159
- })
160
- ]
161
- })
162
- ]
49
+ /*#__PURE__*/ _jsx("p", {
50
+ "aria-labelledby": `${id}-label`,
51
+ children: value || C.none
52
+ })
53
+ ]
54
+ }) : /*#__PURE__*/ _jsxs("div", {
55
+ className: "xp-goal-field__row",
56
+ children: [
57
+ /*#__PURE__*/ _jsx(GoalSelectInput, {
58
+ path: path,
59
+ className: "xp-goal-field__select",
60
+ value: value ?? '',
61
+ options: options,
62
+ label: C.label,
63
+ required: field.required,
64
+ readOnly: picker.status !== 'ready',
65
+ isClearable: false,
66
+ placeholder: C.none,
67
+ showError: showError,
68
+ onChange: (option)=>{
69
+ if (picker.status === 'ready' && option && !Array.isArray(option)) setValue(String(option.value));
70
+ }
71
+ }),
72
+ picker.canManage && !picker.panel.open ? /*#__PURE__*/ _jsx(Button, {
73
+ type: "button",
74
+ margin: false,
75
+ buttonStyle: "secondary",
76
+ onClick: picker.open,
77
+ children: C.newGoal
163
78
  }) : null
164
79
  ]
80
+ }),
81
+ readonly ? /*#__PURE__*/ _jsx(FieldError, {
82
+ path: path,
83
+ showError: showError
84
+ }) : null,
85
+ /*#__PURE__*/ _jsx(FieldDescription, {
86
+ path: path,
87
+ description: field.admin?.description
88
+ }),
89
+ !readonly && picker.status === 'error' ? /*#__PURE__*/ _jsxs("div", {
90
+ children: [
91
+ /*#__PURE__*/ _jsx("p", {
92
+ children: C.loadError
93
+ }),
94
+ /*#__PURE__*/ _jsx(Button, {
95
+ type: "button",
96
+ margin: false,
97
+ buttonStyle: "secondary",
98
+ onClick: picker.retry,
99
+ children: C.retry
100
+ })
101
+ ]
102
+ }) : null,
103
+ missing && !readonly && !showError ? /*#__PURE__*/ _jsx("p", {
104
+ role: "status",
105
+ children: C.undefinedKey
106
+ }) : null,
107
+ picker.canManage && !locked ? /*#__PURE__*/ _jsx(_Fragment, {
108
+ children: picker.panel.open ? /*#__PURE__*/ _jsxs("section", {
109
+ className: "xp-goal-field__panel",
110
+ "aria-labelledby": `${id}-title`,
111
+ children: [
112
+ /*#__PURE__*/ _jsx("h3", {
113
+ id: `${id}-title`,
114
+ children: C.title
115
+ }),
116
+ /*#__PURE__*/ _jsxs("div", {
117
+ className: "field-type text",
118
+ children: [
119
+ /*#__PURE__*/ _jsx(FieldLabel, {
120
+ path: namePath,
121
+ label: C.name
122
+ }),
123
+ /*#__PURE__*/ _jsx("input", {
124
+ id: `field-${namePath}`,
125
+ value: picker.panel.name,
126
+ disabled: picker.panel.pending,
127
+ onKeyDown: stopEnter,
128
+ onChange: (event)=>picker.setName(event.currentTarget.value)
129
+ })
130
+ ]
131
+ }),
132
+ /*#__PURE__*/ _jsxs("details", {
133
+ open: picker.panel.advanced,
134
+ onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
135
+ children: [
136
+ /*#__PURE__*/ _jsx("summary", {
137
+ children: C.advanced
138
+ }),
139
+ /*#__PURE__*/ _jsxs("div", {
140
+ className: "field-type text",
141
+ children: [
142
+ /*#__PURE__*/ _jsx(FieldLabel, {
143
+ path: slugPath,
144
+ label: C.slug
145
+ }),
146
+ /*#__PURE__*/ _jsx("input", {
147
+ id: `field-${slugPath}`,
148
+ value: picker.panel.slug,
149
+ disabled: picker.panel.pending,
150
+ onKeyDown: stopEnter,
151
+ "aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
152
+ "aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
153
+ onChange: (event)=>picker.setSlug(event.currentTarget.value)
154
+ }),
155
+ picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
156
+ id: `${id}-slug-error`,
157
+ role: "alert",
158
+ children: picker.panel.errors.slug
159
+ }) : null
160
+ ]
161
+ })
162
+ ]
163
+ }),
164
+ picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
165
+ role: "alert",
166
+ children: picker.panel.errors.general
167
+ }) : null,
168
+ /*#__PURE__*/ _jsxs("div", {
169
+ className: "xp-goal-field__actions",
170
+ children: [
171
+ /*#__PURE__*/ _jsx(Button, {
172
+ type: "button",
173
+ margin: false,
174
+ buttonStyle: "primary",
175
+ disabled: picker.panel.pending || !picker.panel.name.trim(),
176
+ onClick: ()=>void picker.create(),
177
+ children: C.createGoal
178
+ }),
179
+ /*#__PURE__*/ _jsx(Button, {
180
+ type: "button",
181
+ margin: false,
182
+ buttonStyle: "secondary",
183
+ disabled: picker.panel.pending,
184
+ onClick: picker.cancel,
185
+ children: C.cancel
186
+ })
187
+ ]
188
+ })
189
+ ]
190
+ }) : null
165
191
  }) : null
166
192
  ]
167
193
  });
@@ -23,9 +23,8 @@
23
23
  padding: var(--xp-space-4);
24
24
  }
25
25
 
26
- .xp-goal-field > p,
27
- .xp-goal-field__panel > h3,
28
- .xp-goal-field__panel > p {
26
+ .xp-goal-field p,
27
+ .xp-goal-field__panel > h3 {
29
28
  margin: 0;
30
29
  }
31
30
 
@@ -1,4 +1,4 @@
1
- import { statusLabel } from './labels.js';
1
+ import { statusLabel } from '../testSurface/labels.js';
2
2
  import { STATUS_TOOLTIPS } from './copy/status.js';
3
3
  const TONES = {
4
4
  draft: 'neutral',
@@ -1,5 +1,6 @@
1
1
  import type { DocId } from '../../types/contracts.js';
2
- import type { SurfaceProps } from './contracts.js';
2
+ import type { SurfaceProps } from '../../testSurface/surface/contracts.js';
3
+ import '../../testSurface/surface/test/testPage.css';
3
4
  export declare function ResultsRoute(props: {
4
5
  id: DocId;
5
6
  surface: SurfaceProps;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import { useTestDocument } from './useTestDocument.js';
4
+ import { useTestDocument } from '../../testSurface/surface/useTestDocument.js';
5
5
  import { ResultsHeader, ReaderResultsShell } from './results/ResultsHeader.js';
6
- import { ResultsBody } from './results/ResultsBody.js';
7
- import { TEST_PAGE as C } from '../copy/testPage.js';
6
+ import { ResultsBody } from '../../testSurface/surface/results/ResultsBody.js';
7
+ import { TEST_PAGE as C } from '../../testSurface/copy/testPage.js';
8
8
  import { Button } from '../../ui/Button.js';
9
+ import '../../testSurface/surface/test/testPage.css';
9
10
  export function ResultsRoute(props) {
10
11
  // Results-only readers cannot load the manager-only experiment or preflight.
11
12
  return props.surface.canManage ? /*#__PURE__*/ _jsx(ManagedResults, {
@@ -59,20 +60,12 @@ function ManagedResults({ id, surface, onTitleChange }) {
59
60
  children: [
60
61
  /*#__PURE__*/ _jsx("p", {
61
62
  role: "status",
62
- children: test.loadState === 'forbidden' ? C.forbidden : test.loadState === 'missing' ? C.missing : test.loadState === 'error' ? C.error : C.loading
63
+ children: test.preflightRead?.message ?? (test.loadState === 'loading' ? C.loading : C.error)
63
64
  }),
64
- test.loadState === 'error' ? /*#__PURE__*/ _jsx(Button, {
65
+ test.preflightRead?.retry ? /*#__PURE__*/ _jsx(Button, {
65
66
  onClick: ()=>void test.reload(),
66
67
  children: C.retry
67
68
  }) : null,
68
- test.errors._section ? /*#__PURE__*/ _jsx("p", {
69
- role: "alert",
70
- children: test.errors._section
71
- }) : null,
72
- test.preflightError ? /*#__PURE__*/ _jsx("p", {
73
- role: "alert",
74
- children: test.preflightError
75
- }) : null,
76
69
  test.loadState !== 'loading' && test.loadState !== 'missing' && test.loadState !== 'forbidden' ? /*#__PURE__*/ _jsx(ResultsBody, {
77
70
  id: id,
78
71
  surface: surface,
@@ -4,7 +4,7 @@ import '../theme.css';
4
4
  import { formatAdminURL } from 'payload/shared';
5
5
  import { Breadcrumb } from '../../ui/Breadcrumb.js';
6
6
  import { Button } from '../../ui/Button.js';
7
- import { SURFACE_COPY } from '../copy/surface.js';
7
+ import { SURFACE_COPY } from '../../testSurface/copy/surface.js';
8
8
  import './surface.css';
9
9
  export function SurfaceShell({ adminRoute, children, crumbs = [
10
10
  {
@@ -12,7 +12,7 @@ export function SurfaceShell({ adminRoute, children, crumbs = [
12
12
  }
13
13
  ], title = SURFACE_COPY.title, status, actions, subtitle }) {
14
14
  return /*#__PURE__*/ _jsxs("div", {
15
- className: "xp-tests-surface",
15
+ className: "xp-tests-surface xp-test-surface",
16
16
  children: [
17
17
  /*#__PURE__*/ _jsxs("header", {
18
18
  className: "xp-tests-shell-header",
@@ -1,5 +1,5 @@
1
1
  import type { SurfaceShellProps } from './SurfaceShell.js';
2
- import type { ReadinessContext } from './readiness/readiness.model.js';
2
+ import type { ReadinessContext } from '../../testSurface/surface/readiness/readiness.model.js';
3
3
  export declare function TestsHome({ adminRoute, apiRoute, canManage, crumbs, flagPoints }: {
4
4
  adminRoute: string;
5
5
  apiRoute: string;