@delmaredigital/payload-experiments 0.4.0-rc.1 → 0.4.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +284 -772
- package/dist/admin/LayerUsage.js +1 -1
- package/dist/admin/MetricSourceSelect.js +12 -5
- package/dist/admin/PlacementStatus.js +1 -1
- package/dist/admin/TestsDashboardCards.d.ts +1 -0
- package/dist/admin/TestsDashboardCards.js +5 -9
- package/dist/admin/TestsNavLink.d.ts +1 -0
- package/dist/admin/TestsNavLink.js +5 -11
- package/dist/admin/blocks/BlockPanel.d.ts +1 -0
- package/dist/admin/blocks/BlockPanel.js +129 -37
- package/dist/admin/blocks/TestBlockField.js +3 -3
- package/dist/admin/blocks/formApi.d.ts +3 -0
- package/dist/admin/blocks/formApi.js +10 -4
- package/dist/admin/blocks/inject.js +1 -0
- package/dist/admin/blocks/model.d.ts +3 -2
- package/dist/admin/blocks/model.js +10 -6
- package/dist/admin/blocks/statusCache.d.ts +2 -0
- package/dist/admin/blocks/statusCache.js +12 -3
- package/dist/admin/components/RootViewMessage.js +1 -1
- package/dist/admin/copy/blocks.d.ts +21 -1
- package/dist/admin/copy/blocks.js +40 -6
- package/dist/admin/copy/goals.d.ts +21 -9
- package/dist/admin/copy/goals.js +28 -11
- package/dist/admin/copy/newTest.d.ts +7 -7
- package/dist/admin/copy/newTest.js +10 -7
- package/dist/admin/goals/XpGoalField.d.ts +2 -0
- package/dist/admin/goals/XpGoalField.js +156 -114
- package/dist/admin/goals/xpGoalField.css +47 -0
- package/dist/admin/pageCollections.d.ts +1 -0
- package/dist/admin/pageCollections.js +3 -0
- package/dist/admin/paths.d.ts +3 -0
- package/dist/admin/paths.js +3 -0
- package/dist/admin/placementStatus.model.js +1 -1
- package/dist/admin/status.model.js +1 -1
- package/dist/admin/surface/ResultsRoute.d.ts +2 -1
- package/dist/admin/surface/ResultsRoute.js +20 -24
- package/dist/admin/surface/SurfaceShell.d.ts +4 -2
- package/dist/admin/surface/SurfaceShell.js +29 -4
- package/dist/admin/surface/TestRowMenu.d.ts +13 -0
- package/dist/admin/surface/TestRowMenu.js +163 -0
- package/dist/admin/surface/TestsHome.d.ts +5 -3
- package/dist/admin/surface/TestsHome.js +273 -58
- package/dist/admin/surface/TestsSurface.js +8 -7
- package/dist/admin/surface/goals/DeleteGoalDialog.d.ts +7 -0
- package/dist/admin/surface/goals/DeleteGoalDialog.js +42 -0
- package/dist/admin/surface/goals/GoalForm.d.ts +2 -1
- package/dist/admin/surface/goals/GoalForm.js +342 -212
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +107 -37
- package/dist/admin/surface/goals/data.d.ts +2 -0
- package/dist/admin/surface/goals/data.js +11 -2
- package/dist/admin/surface/goals/goals.css +9 -1
- package/dist/admin/surface/goals/goals.model.d.ts +12 -2
- package/dist/admin/surface/goals/goals.model.js +39 -1
- package/dist/admin/surface/home.model.d.ts +10 -8
- package/dist/admin/surface/home.model.js +27 -22
- package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
- package/dist/admin/surface/newTest/NewTest.js +149 -118
- package/dist/admin/surface/newTest/PageWizard.d.ts +5 -2
- package/dist/admin/surface/newTest/PageWizard.js +115 -80
- package/dist/admin/surface/newTest/newTest.css +28 -9
- package/dist/admin/surface/results/ResultsHeader.d.ts +3 -3
- package/dist/admin/surface/results/ResultsHeader.js +115 -83
- package/dist/admin/surface/surface.css +29 -0
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +44 -152
- package/dist/admin/surface/useXpStepNav.d.ts +11 -0
- package/dist/admin/surface/useXpStepNav.js +14 -0
- package/dist/admin/theme.css +2 -0
- package/dist/admin/views/CollectionListRedirect.d.ts +1 -0
- package/dist/admin/views/CollectionListRedirect.js +1 -1
- package/dist/admin/views/ExperimentsRootView.js +18 -165
- package/dist/admin/views/GoalEditRedirect.d.ts +4 -0
- package/dist/admin/views/GoalEditRedirect.js +14 -0
- package/dist/admin/views/GoalsCollectionListView.d.ts +2 -0
- package/dist/admin/views/GoalsCollectionListView.js +4 -0
- package/dist/admin/views/TestsCollectionListView.d.ts +2 -0
- package/dist/admin/views/TestsCollectionListView.js +4 -0
- package/dist/admin/views/TestsNavLinkServer.d.ts +1 -0
- package/dist/admin/views/TestsNavLinkServer.js +2 -2
- package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
- package/dist/admin/views/TestsSurfaceClient.js +35 -0
- package/dist/admin/views/buildSurfaceProps.d.ts +8 -0
- package/dist/admin/views/buildSurfaceProps.js +102 -0
- package/dist/admin/views/renderCollectionList.d.ts +2 -0
- package/dist/admin/views/renderCollectionList.js +34 -0
- package/dist/admin/views/renderTestsSurface.d.ts +3 -0
- package/dist/admin/views/renderTestsSurface.js +34 -0
- package/dist/blocks/bindings.js +8 -14
- package/dist/blocks/createExperimentBlock.js +1 -1
- package/dist/blocks/formState.js +2 -2
- package/dist/blocks/placementLanguages.d.ts +7 -0
- package/dist/blocks/placementLanguages.js +27 -0
- package/dist/blocks/placementLocale.d.ts +37 -0
- package/dist/blocks/placementLocale.js +270 -0
- package/dist/collections/experiments/config.js +17 -8
- package/dist/collections/experiments/deleteGuard.js +2 -2
- package/dist/collections/experiments/lockHook.js +21 -2
- package/dist/collections/experiments/pickSlug.js +2 -0
- package/dist/collections/metrics.js +28 -9
- package/dist/collections/metricsGuards.js +2 -0
- package/dist/collections/serialize.js +8 -6
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/db/adapter.d.ts +9 -1
- package/dist/db/adapter.js +77 -1
- package/dist/db/appends.d.ts +13 -0
- package/dist/db/appends.js +49 -0
- package/dist/db/bulkPlacementRemoval.d.ts +30 -0
- package/dist/db/bulkPlacementRemoval.js +111 -0
- package/dist/db/delete.d.ts +1 -1
- package/dist/db/delete.js +2 -4
- package/dist/db/events.d.ts +9 -0
- package/dist/db/events.js +42 -8
- package/dist/db/executor.d.ts +7 -1
- package/dist/db/executor.js +7 -3
- package/dist/db/pageCopies.d.ts +5 -0
- package/dist/db/pageCopies.js +31 -0
- package/dist/db/placements.d.ts +2 -0
- package/dist/db/placements.js +8 -0
- package/dist/db/results.d.ts +5 -1
- package/dist/db/results.js +21 -5
- package/dist/db/snapshots.d.ts +2 -0
- package/dist/endpoints/contentLocale.d.ts +6 -0
- package/dist/endpoints/contentLocale.js +15 -0
- package/dist/endpoints/deleteImpact.d.ts +6 -0
- package/dist/endpoints/deleteImpact.js +207 -0
- package/dist/endpoints/duplicateOriginal.d.ts +38 -0
- package/dist/endpoints/duplicateOriginal.js +407 -0
- package/dist/endpoints/editorSurface.d.ts +3 -0
- package/dist/endpoints/editorSurface.js +31 -0
- package/dist/endpoints/events.js +103 -39
- package/dist/endpoints/index.js +57 -9
- package/dist/endpoints/pages.js +247 -64
- package/dist/endpoints/placementStatus.js +13 -5
- package/dist/endpoints/preflight.d.ts +1 -1
- package/dist/endpoints/preflight.js +17 -2
- package/dist/endpoints/results.d.ts +1 -1
- package/dist/endpoints/results.js +6 -2
- package/dist/endpoints/routeId.d.ts +2 -2
- package/dist/endpoints/routeId.js +11 -5
- package/dist/endpoints/summary.js +46 -12
- package/dist/endpoints/testVersion.d.ts +2 -0
- package/dist/endpoints/testVersion.js +38 -0
- package/dist/endpoints/transitions.js +41 -29
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +8 -0
- package/dist/events/request.d.ts +6 -2
- package/dist/events/request.js +35 -8
- package/dist/events/rows.d.ts +1 -1
- package/dist/events/rows.js +24 -8
- package/dist/events/writable.d.ts +9 -0
- package/dist/events/writable.js +13 -0
- package/dist/exports/adminClient.d.ts +1 -1
- package/dist/exports/adminClient.js +1 -1
- package/dist/exports/adminRsc.d.ts +3 -0
- package/dist/exports/adminRsc.js +3 -0
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/rsc.d.ts +1 -0
- package/dist/exports/rsc.js +1 -0
- package/dist/fields/xpGoal.js +3 -15
- package/dist/goals/fairness.d.ts +1 -1
- package/dist/goals/fairness.js +44 -35
- package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
- package/dist/goals/picker/clickGoalPicker.model.js +20 -2
- package/dist/goals/picker/copy.d.ts +6 -2
- package/dist/goals/picker/copy.js +11 -2
- package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
- package/dist/goals/picker/useClickGoalPicker.js +4 -2
- package/dist/goals/sourceLabel.d.ts +2 -0
- package/dist/goals/sourceLabel.js +4 -0
- package/dist/goals/validate.d.ts +3 -0
- package/dist/goals/validate.js +15 -0
- package/dist/hooks/blockRemovalRule.d.ts +30 -0
- package/dist/hooks/blockRemovalRule.js +165 -0
- package/dist/hooks/hostHook.js +6 -2
- package/dist/hooks/pageGuard.d.ts +27 -2
- package/dist/hooks/pageGuard.js +213 -45
- package/dist/hooks/puckGoals.d.ts +5 -0
- package/dist/hooks/puckGoals.js +62 -0
- package/dist/hooks/puckNestedTests.d.ts +8 -0
- package/dist/hooks/puckNestedTests.js +36 -0
- package/dist/hooks/trackPageCopies.d.ts +11 -0
- package/dist/hooks/trackPageCopies.js +7 -0
- package/dist/lib/fetchAllDocs.d.ts +1 -1
- package/dist/lib/placementPages.d.ts +10 -0
- package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +10 -5
- package/dist/manifest/compile.d.ts +2 -1
- package/dist/manifest/compile.js +13 -6
- package/dist/onInit.js +36 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +23 -2
- package/dist/plugin.js +70 -21
- package/dist/proxy/pageNavigation.d.ts +4 -0
- package/dist/proxy/pageNavigation.js +28 -0
- package/dist/proxy/resolve.js +52 -25
- package/dist/puck/ExperimentPicker.d.ts +2 -1
- package/dist/puck/ExperimentPicker.js +62 -40
- package/dist/puck/ExperimentSlot.js +3 -1
- package/dist/puck/copy.d.ts +5 -1
- package/dist/puck/copy.js +5 -1
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +25 -0
- package/dist/puck/editor/ConfigureTestDrawer.js +150 -0
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +12 -2
- package/dist/puck/editor/CreateExperimentDrawer.js +89 -21
- package/dist/puck/editor/EditorControls.d.ts +14 -0
- package/dist/puck/editor/EditorControls.js +99 -0
- package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +1007 -182
- package/dist/puck/editor/LeftoverVersions.d.ts +15 -0
- package/dist/puck/editor/LeftoverVersions.js +79 -0
- package/dist/puck/editor/PlacementNotice.d.ts +8 -0
- package/dist/puck/editor/PlacementNotice.js +22 -0
- package/dist/puck/editor/QuickTestActions.d.ts +6 -0
- package/dist/puck/editor/QuickTestActions.js +72 -0
- package/dist/puck/editor/ResultsReadout.d.ts +4 -1
- package/dist/puck/editor/ResultsReadout.js +35 -19
- package/dist/puck/editor/VersionBuilder.d.ts +67 -12
- package/dist/puck/editor/VersionBuilder.js +560 -231
- package/dist/puck/editor/armWrites.d.ts +11 -2
- package/dist/puck/editor/armWrites.js +43 -4
- package/dist/puck/editor/armsCache.d.ts +3 -1
- package/dist/puck/editor/armsCache.js +20 -4
- package/dist/puck/editor/blockClipboard.d.ts +16 -0
- package/dist/puck/editor/blockClipboard.js +20 -0
- package/dist/puck/editor/cloneSlot.d.ts +2 -0
- package/dist/puck/editor/cloneSlot.js +7 -0
- package/dist/puck/editor/copy.d.ts +65 -20
- package/dist/puck/editor/copy.js +73 -21
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +200 -20
- package/dist/puck/editor/editor.css +338 -25
- package/dist/puck/editor/editor.model.d.ts +17 -1
- package/dist/puck/editor/editor.model.js +61 -4
- package/dist/puck/editor/editorSurface.d.ts +10 -0
- package/dist/puck/editor/editorSurface.js +65 -0
- package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
- package/dist/puck/editor/localPlacements.d.ts +5 -0
- package/dist/puck/editor/localPlacements.js +43 -0
- package/dist/puck/editor/outlineVersion.d.ts +5 -0
- package/dist/puck/editor/outlineVersion.js +36 -0
- package/dist/puck/editor/placementsCache.d.ts +60 -0
- package/dist/puck/editor/placementsCache.js +263 -0
- package/dist/puck/editor/sidebar.d.ts +8 -0
- package/dist/puck/editor/sidebar.js +74 -0
- package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
- package/dist/puck/editor/usePageSaveReadiness.js +31 -0
- package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
- package/dist/puck/editor/usePlacementNotice.js +15 -0
- package/dist/puck/editor/xpGoalPuckEditorField.js +105 -86
- package/dist/puck/experimentSlotField.d.ts +3 -0
- package/dist/puck/experimentSlotField.js +15 -4
- package/dist/puck/experimentSlug.d.ts +2 -0
- package/dist/puck/experimentSlug.js +3 -0
- package/dist/puck/nestedTestCopy.d.ts +8 -0
- package/dist/puck/nestedTestCopy.js +22 -0
- package/dist/puck/nestedTests.d.ts +17 -0
- package/dist/puck/nestedTests.js +30 -0
- package/dist/puck/slotConfig.d.ts +2 -2
- package/dist/puck/slotConfig.js +18 -5
- package/dist/puck/visibility.d.ts +20 -0
- package/dist/puck/visibility.js +81 -0
- package/dist/results/aggregate.d.ts +6 -3
- package/dist/results/aggregate.js +9 -9
- package/dist/results/analyse.d.ts +2 -0
- package/dist/results/analyse.js +2 -2
- package/dist/results/health.d.ts +8 -0
- package/dist/results/health.js +28 -0
- package/dist/results/identityCredit.d.ts +1 -0
- package/dist/results/identityCredit.js +4 -1
- package/dist/results/verdict.d.ts +1 -1
- package/dist/results/verdict.js +9 -7
- package/dist/runtime/cookie.d.ts +10 -2
- package/dist/runtime/cookie.js +38 -6
- package/dist/runtime/cookieOptions.d.ts +6 -0
- package/dist/runtime/cookieOptions.js +14 -0
- package/dist/runtime/proxyRuntime.d.ts +1 -0
- package/dist/runtime/proxyRuntime.js +18 -8
- package/dist/runtime/signing.d.ts +1 -0
- package/dist/runtime/signing.js +5 -0
- package/dist/sanitizeReadinessDetail.d.ts +2 -2
- package/dist/sanitizeReadinessDetail.js +22 -2
- package/dist/server/getAssignments.js +11 -10
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +48 -22
- package/dist/server/resolveExperimentBlocks.js +2 -4
- package/dist/server/resolveExperimentData.js +8 -8
- package/dist/server/runResults.js +54 -15
- package/dist/server/startExperiment.d.ts +20 -0
- package/dist/server/startExperiment.js +70 -0
- package/dist/server/trackConversion.js +10 -13
- package/dist/{admin → testSurface}/PreviewLinks.d.ts +2 -1
- package/dist/{admin → testSurface}/PreviewLinks.js +9 -5
- package/dist/testSurface/actions/DecideDialog.d.ts +17 -0
- package/dist/testSurface/actions/DecideDialog.js +222 -0
- package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
- package/dist/testSurface/actions/LifecycleAction.js +107 -0
- package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +4 -3
- package/dist/{admin → testSurface}/actions/MakeContentResult.js +10 -2
- package/dist/{admin → testSurface}/actions/actions.model.d.ts +13 -5
- package/dist/testSurface/actions/actions.model.js +123 -0
- package/dist/{admin → testSurface}/actions/decide.model.d.ts +1 -0
- package/dist/{admin → testSurface}/actions/decide.model.js +1 -0
- package/dist/{admin → testSurface}/allocation.model.js +6 -3
- package/dist/{admin → testSurface}/api.d.ts +20 -7
- package/dist/{admin → testSurface}/api.js +72 -22
- package/dist/testSurface/contentLocaleURL.d.ts +2 -0
- package/dist/testSurface/contentLocaleURL.js +3 -0
- package/dist/{admin → testSurface}/copy/actions.d.ts +37 -14
- package/dist/{admin → testSurface}/copy/actions.js +40 -17
- package/dist/{admin → testSurface}/copy/advanced.d.ts +10 -0
- package/dist/{admin → testSurface}/copy/advanced.js +10 -0
- package/dist/{admin → testSurface}/copy/arms.d.ts +1 -1
- package/dist/{admin → testSurface}/copy/arms.js +1 -1
- package/dist/{admin → testSurface}/copy/audience.d.ts +4 -3
- package/dist/{admin → testSurface}/copy/audience.js +5 -4
- package/dist/{admin → testSurface}/copy/common.d.ts +15 -6
- package/dist/{admin → testSurface}/copy/common.js +20 -10
- package/dist/testSurface/copy/languages.d.ts +12 -0
- package/dist/testSurface/copy/languages.js +8 -0
- package/dist/{admin → testSurface}/copy/metrics.d.ts +7 -0
- package/dist/testSurface/copy/metrics.js +18 -0
- package/dist/testSurface/copy/pages.d.ts +84 -0
- package/dist/testSurface/copy/pages.js +90 -0
- package/dist/{admin → testSurface}/copy/readiness.d.ts +40 -6
- package/dist/{admin → testSurface}/copy/readiness.js +54 -9
- package/dist/{admin → testSurface}/copy/recommendation.d.ts +4 -4
- package/dist/{admin → testSurface}/copy/recommendation.js +4 -4
- package/dist/{admin → testSurface}/copy/results.d.ts +19 -12
- package/dist/{admin → testSurface}/copy/results.js +21 -12
- package/dist/testSurface/copy/review.d.ts +20 -0
- package/dist/testSurface/copy/review.js +21 -0
- package/dist/{admin → testSurface}/copy/setting.d.ts +1 -2
- package/dist/{admin → testSurface}/copy/setting.js +1 -2
- package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
- package/dist/{admin → testSurface}/copy/surface.js +14 -11
- package/dist/{admin → testSurface}/copy/testPage.d.ts +61 -12
- package/dist/testSurface/copy/testPage.js +168 -0
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -0
- package/dist/{admin → testSurface}/format/date.d.ts +1 -0
- package/dist/testSurface/format/date.js +21 -0
- package/dist/{admin → testSurface}/labels.d.ts +1 -2
- package/dist/{admin → testSurface}/labels.js +2 -3
- package/dist/{admin → testSurface}/lockedNotice.model.d.ts +2 -0
- package/dist/{admin → testSurface}/lockedNotice.model.js +31 -0
- package/dist/testSurface/placementLabel.d.ts +8 -0
- package/dist/testSurface/placementLabel.js +24 -0
- package/dist/{admin → testSurface}/placements/placementLabels.d.ts +2 -0
- package/dist/{admin → testSurface}/placements/placementLabels.js +3 -2
- package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
- package/dist/testSurface/previewLinks.model.js +4 -0
- package/dist/testSurface/readPreflight.d.ts +13 -0
- package/dist/testSurface/readPreflight.js +44 -0
- package/dist/testSurface/readinessRead.d.ts +53 -0
- package/dist/testSurface/readinessRead.js +50 -0
- package/dist/{admin → testSurface}/results/VerdictHero.d.ts +2 -1
- package/dist/{admin → testSurface}/results/VerdictHero.js +5 -1
- package/dist/testSurface/results/results.css +64 -0
- package/dist/{admin → testSurface}/results/results.model.d.ts +3 -2
- package/dist/{admin → testSurface}/results/results.model.js +16 -11
- package/dist/{admin → testSurface}/surface/contracts.d.ts +17 -3
- package/dist/testSurface/surface/editorPlacement.d.ts +26 -0
- package/dist/testSurface/surface/editorPlacement.js +78 -0
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +9 -0
- package/dist/testSurface/surface/pageBlock/parts.js +107 -0
- package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +13 -0
- package/dist/testSurface/surface/pagePicker/CopyRoute.js +273 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +21 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.js +498 -0
- package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -0
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +7 -3
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +17 -2
- package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +9 -5
- package/dist/testSurface/surface/readiness/ActionDialogs.js +372 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +4 -3
- package/dist/testSurface/surface/readiness/Banner.js +198 -0
- package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
- package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
- package/dist/testSurface/surface/readiness/SaveStatus.d.ts +13 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +67 -0
- package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
- package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +28 -2
- package/dist/testSurface/surface/readiness/readiness.model.js +377 -0
- package/dist/testSurface/surface/readiness/useTransition.d.ts +16 -0
- package/dist/testSurface/surface/readiness/useTransition.js +141 -0
- package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +6 -3
- package/dist/{admin → testSurface}/surface/results/ReleasePages.js +40 -40
- package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +11 -4
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +207 -104
- package/dist/{admin → testSurface}/surface/results/recommendation.model.js +3 -3
- package/dist/{admin → testSurface}/surface/results/useResults.d.ts +26 -8
- package/dist/{admin → testSurface}/surface/results/useResults.js +3 -2
- package/dist/{admin → testSurface}/surface/setting/parts.js +89 -46
- package/dist/testSurface/surface/setting/setting.css +18 -0
- package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +12 -4
- package/dist/testSurface/surface/test/DeleteTest.d.ts +23 -0
- package/dist/testSurface/surface/test/DeleteTest.js +270 -0
- package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
- package/dist/{admin → testSurface}/surface/test/GoalSection.js +119 -89
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +25 -14
- package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +1 -1
- package/dist/{admin → testSurface}/surface/test/PageHoldout.js +11 -8
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +2 -1
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +4 -11
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +88 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +87 -12
- package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
- package/dist/testSurface/surface/test/TestSurface.js +265 -0
- package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
- package/dist/testSurface/surface/test/VersionsSection.js +301 -0
- package/dist/{admin → testSurface}/surface/test/fields.d.ts +33 -9
- package/dist/testSurface/surface/test/fields.js +300 -0
- package/dist/{admin → testSurface}/surface/test/pageParts.js +30 -44
- package/dist/testSurface/surface/test/testPage.css +111 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.js +6 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +3 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.js +4 -1
- package/dist/testSurface/surface/useTestDocument.d.ts +60 -0
- package/dist/testSurface/surface/useTestDocument.js +782 -0
- package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
- package/dist/testSurface/surface/watchTestDocument.js +181 -0
- package/dist/testSurface/surfaceUrls.d.ts +8 -0
- package/dist/testSurface/surfaceUrls.js +23 -0
- package/dist/{admin → testSurface}/useApi.d.ts +21 -5
- package/dist/testSurface/useOnTestReturn.d.ts +2 -0
- package/dist/testSurface/useOnTestReturn.js +27 -0
- package/dist/testSurface/useReadinessPolling.d.ts +3 -0
- package/dist/testSurface/useReadinessPolling.js +26 -0
- package/dist/transitions/addMetric.d.ts +2 -5
- package/dist/transitions/addMetric.js +5 -1
- package/dist/transitions/allocate.d.ts +2 -2
- package/dist/transitions/allocate.js +3 -1
- package/dist/transitions/archive.d.ts +1 -1
- package/dist/transitions/archive.js +3 -2
- package/dist/transitions/checkStart.d.ts +6 -1
- package/dist/transitions/checkStart.js +133 -17
- package/dist/transitions/contentFields.js +9 -5
- package/dist/transitions/decide.d.ts +1 -1
- package/dist/transitions/decide.js +6 -3
- package/dist/transitions/deleteExperiment.d.ts +2 -2
- package/dist/transitions/deleteExperiment.js +17 -7
- package/dist/transitions/kernel.d.ts +4 -0
- package/dist/transitions/kernel.js +9 -4
- package/dist/transitions/makeContent.d.ts +2 -1
- package/dist/transitions/makeContent.js +41 -17
- package/dist/transitions/nestedPlacementNames.d.ts +5 -0
- package/dist/transitions/nestedPlacementNames.js +32 -0
- package/dist/transitions/pageAddress.d.ts +6 -0
- package/dist/transitions/pageAddress.js +71 -0
- package/dist/transitions/pageVersions.js +3 -1
- package/dist/transitions/phaseRecord.d.ts +2 -0
- package/dist/transitions/phaseRecord.js +5 -0
- package/dist/transitions/placementInteractions.d.ts +3 -3
- package/dist/transitions/placementInteractions.js +16 -12
- package/dist/transitions/placements.d.ts +54 -8
- package/dist/transitions/placements.js +304 -81
- package/dist/transitions/preflightData.d.ts +5 -3
- package/dist/transitions/preflightData.js +137 -40
- package/dist/transitions/releaseHoldout.d.ts +2 -1
- package/dist/transitions/releaseHoldout.js +3 -1
- package/dist/transitions/releasePages.d.ts +2 -1
- package/dist/transitions/releasePages.js +3 -1
- package/dist/transitions/resolveCaps.d.ts +2 -4
- package/dist/transitions/start.d.ts +6 -8
- package/dist/transitions/start.js +72 -35
- package/dist/transitions/startReads.d.ts +7 -0
- package/dist/transitions/startReads.js +28 -0
- package/dist/transitions/stop.d.ts +2 -1
- package/dist/transitions/stop.js +3 -2
- package/dist/types/contracts.d.ts +15 -3
- package/dist/types/endpoints.d.ts +121 -17
- package/dist/types/puck.d.ts +1 -0
- package/dist/types/runtime.d.ts +15 -9
- package/dist/types/snapshot.d.ts +2 -0
- package/dist/types/surface.d.ts +9 -9
- package/dist/ui/Button.js +2 -2
- package/dist/ui/Card.d.ts +2 -1
- package/dist/ui/Card.js +4 -4
- package/dist/ui/ChipsInput.d.ts +8 -1
- package/dist/ui/ChipsInput.js +17 -4
- package/dist/ui/Dialog.d.ts +24 -2
- package/dist/ui/Dialog.js +141 -6
- package/dist/ui/Drawer.d.ts +10 -0
- package/dist/ui/Drawer.js +29 -0
- package/dist/ui/Inputs.d.ts +4 -3
- package/dist/ui/Inputs.js +6 -4
- package/dist/ui/SelectControl.d.ts +33 -0
- package/dist/ui/SelectControl.js +504 -0
- package/dist/ui/Tabs.d.ts +4 -4
- package/dist/ui/Tabs.js +35 -32
- package/dist/ui/ui.css +50 -5
- package/package.json +3 -2
- package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
- package/dist/admin/actions/ConfirmDialog.js +0 -149
- package/dist/admin/actions/DecideDialog.d.ts +0 -10
- package/dist/admin/actions/DecideDialog.js +0 -190
- package/dist/admin/actions/actions.model.js +0 -70
- package/dist/admin/copy/metrics.js +0 -9
- package/dist/admin/copy/pages.d.ts +0 -26
- package/dist/admin/copy/pages.js +0 -26
- package/dist/admin/copy/review.d.ts +0 -17
- package/dist/admin/copy/review.js +0 -17
- package/dist/admin/copy/testPage.js +0 -104
- package/dist/admin/format/date.js +0 -10
- package/dist/admin/results/results.css +0 -64
- package/dist/admin/styles.css +0 -10
- package/dist/admin/styles.d.ts +0 -2
- package/dist/admin/styles.js +0 -3
- package/dist/admin/surface/pageBlock/pageBlock.model.js +0 -8
- package/dist/admin/surface/pageBlock/parts.js +0 -69
- package/dist/admin/surface/pagePicker/CopyRoute.d.ts +0 -6
- package/dist/admin/surface/pagePicker/CopyRoute.js +0 -53
- package/dist/admin/surface/pagePicker/PagePicker.d.ts +0 -10
- package/dist/admin/surface/pagePicker/PagePicker.js +0 -172
- package/dist/admin/surface/readiness/ActionDialogs.js +0 -337
- package/dist/admin/surface/readiness/Banner.js +0 -190
- package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
- package/dist/admin/surface/readiness/SaveStatus.js +0 -53
- package/dist/admin/surface/readiness/readiness.model.js +0 -205
- package/dist/admin/surface/readiness/useTransition.d.ts +0 -11
- package/dist/admin/surface/readiness/useTransition.js +0 -35
- package/dist/admin/surface/setting/setting.css +0 -17
- package/dist/admin/surface/test/GoalSection.d.ts +0 -2
- package/dist/admin/surface/test/LengthSection.d.ts +0 -2
- package/dist/admin/surface/test/Section.js +0 -47
- package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
- package/dist/admin/surface/test/VersionsSection.js +0 -247
- package/dist/admin/surface/test/fields.js +0 -216
- package/dist/admin/surface/test/testPage.css +0 -97
- package/dist/admin/surface/useTestDocument.d.ts +0 -32
- package/dist/admin/surface/useTestDocument.js +0 -415
- /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
- /package/dist/{admin → testSurface}/reload.d.ts +0 -0
- /package/dist/{admin → testSurface}/reload.js +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
- /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/format.js +0 -0
- /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/legacy.js +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
- /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/review/review.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
- /package/dist/{admin → testSurface}/theme.d.ts +0 -0
- /package/dist/{admin → testSurface}/theme.js +0 -0
- /package/dist/{admin → testSurface}/useApi.js +0 -0
|
@@ -32,6 +32,17 @@
|
|
|
32
32
|
.xp-tests-kind { display: inline-flex; align-items: center; height: 22px; padding-inline: var(--xp-space-2); border: 1px solid var(--xp-border); border-radius: var(--xp-radius-chip); color: var(--xp-text-2); font: 500 12px/18px var(--xp-font); white-space: nowrap; }
|
|
33
33
|
.xp-tests-row-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--xp-space-1) 14px; margin-top: var(--xp-space-1); color: var(--xp-text-2); font: 400 14px/20px var(--xp-font); }
|
|
34
34
|
.xp-tests-row-action { justify-self: end; }
|
|
35
|
+
.xp-tests-row-actions { position: relative; align-items: center; }
|
|
36
|
+
.xp-tests-row-menu-trigger { width: 36px; padding-inline: 0; }
|
|
37
|
+
.xp-tests-row-menu-items { position: absolute; inset-inline-end: 0; top: calc(100% + var(--xp-space-1)); z-index: 2; display: grid; width: min(16rem, calc(100vw - 2rem)); padding: var(--xp-space-1); border: 1px solid var(--xp-border-strong); border-radius: var(--xp-radius-control); background: var(--xp-surface); }
|
|
38
|
+
.xp-tests-menu-item { display: grid; min-height: 36px; padding: var(--xp-space-2); text-align: start; font: var(--xp-text-body); color: var(--xp-text); background: transparent; border: 0; border-radius: var(--xp-radius-control); cursor: pointer; }
|
|
39
|
+
.xp-tests-menu-item--primary { color: var(--xp-accent-fg); background: var(--xp-accent); }
|
|
40
|
+
.xp-tests-menu-item--primary:hover, .xp-tests-menu-item--primary:focus-visible { background: var(--xp-accent-hover); }
|
|
41
|
+
.xp-tests-menu-item--danger { color: var(--xp-error); }
|
|
42
|
+
.xp-tests-menu-item[aria-disabled='true'] { cursor: not-allowed; }
|
|
43
|
+
.xp-tests-menu-item:not(.xp-tests-menu-item--primary):is(:hover, :focus-visible) { background: var(--xp-surface-2); }
|
|
44
|
+
.xp-tests-menu-item:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: -2px; }
|
|
45
|
+
.xp-tests-menu-item > .xp-ui-help { margin: 0; }
|
|
35
46
|
.xp-tests-health { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/18px var(--xp-font); }
|
|
36
47
|
.xp-tests-health::before { content: ''; width: var(--xp-space-2); height: var(--xp-space-2); border-radius: 50%; flex: none; }
|
|
37
48
|
.xp-tests-health--red::before { background: var(--xp-error); }
|
|
@@ -52,6 +63,7 @@
|
|
|
52
63
|
.xp-tests-search { width: 100%; }
|
|
53
64
|
.xp-tests-row { grid-template-columns: minmax(0, 1fr); }
|
|
54
65
|
.xp-tests-row-action { justify-self: start; }
|
|
66
|
+
.xp-tests-row-menu-items { inset-inline: 0 auto; }
|
|
55
67
|
}
|
|
56
68
|
/* Existing screens retain their controls until their design-system lanes. */
|
|
57
69
|
.xp-tests-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--xp-space-4); margin-bottom: var(--xp-space-6); }
|
|
@@ -62,3 +74,20 @@
|
|
|
62
74
|
.xp-tests-shell-heading { min-width: 0; }
|
|
63
75
|
.xp-tests-shell-subtitle { margin-top: var(--xp-space-2); color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
64
76
|
.xp-tests-shell-subtitle p { margin: 0; }
|
|
77
|
+
|
|
78
|
+
.xp-results-header-actions { align-items: flex-start; }
|
|
79
|
+
.xp-results-refresh { display: flex; align-items: center; gap: var(--xp-space-2); }
|
|
80
|
+
.xp-results-refresh > .xp-ui-help { margin: 0; white-space: nowrap; }
|
|
81
|
+
@media (min-width: 900px) {
|
|
82
|
+
.xp-results-shell .xp-tests-shell-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--xp-space-2) var(--xp-space-4); }
|
|
83
|
+
.xp-results-shell .xp-tests-shell-heading { display: contents; }
|
|
84
|
+
.xp-results-shell .xp-tests-shell-title { grid-row: 1; grid-column: 1; }
|
|
85
|
+
.xp-results-shell .xp-tests-shell-actions { grid-row: 1; grid-column: 2; }
|
|
86
|
+
.xp-results-shell .xp-tests-shell-subtitle { grid-row: 2; grid-column: 1 / -1; margin: 0; }
|
|
87
|
+
.xp-results-header-actions { flex-wrap: nowrap; }
|
|
88
|
+
.xp-results-header-actions .xp-ui-button { white-space: nowrap; }
|
|
89
|
+
}
|
|
90
|
+
@media (max-width: 899px) {
|
|
91
|
+
.xp-results-shell .xp-tests-shell-main { flex-direction: column; gap: var(--xp-space-3); }
|
|
92
|
+
.xp-results-shell .xp-tests-shell-actions { justify-content: flex-start; }
|
|
93
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DocId } from '../../../types/contracts.js';
|
|
2
|
-
import type { SurfaceProps } from '
|
|
3
|
-
import './testPage.css';
|
|
2
|
+
import type { SurfaceProps } from '../../../testSurface/surface/contracts.js';
|
|
4
3
|
export declare function TestPage({ id, surface, onTitleChange }: {
|
|
5
4
|
id: DocId;
|
|
6
5
|
surface: SurfaceProps;
|
|
@@ -1,172 +1,64 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { pageBlockParts } from '../pageBlock/parts.js';
|
|
8
|
-
import { settingParts } from '../setting/parts.js';
|
|
9
|
-
import { pageParts } from './pageParts.js';
|
|
10
|
-
import { Section } from './Section.js';
|
|
11
|
-
import { Hypothesis, TestName } from './fields.js';
|
|
12
|
-
import { VersionsSection } from './VersionsSection.js';
|
|
13
|
-
import { GoalSection } from './GoalSection.js';
|
|
14
|
-
import { TargetingSection } from './TargetingSection.js';
|
|
15
|
-
import { LengthSection } from './LengthSection.js';
|
|
16
|
-
import { AdvancedSection } from './AdvancedSection.js';
|
|
17
|
-
import { SurfaceShell } from '../SurfaceShell.js';
|
|
3
|
+
import { TestSurface } from '../../../testSurface/surface/test/TestSurface.js';
|
|
4
|
+
import { TEST_PAGE as C } from '../../../testSurface/copy/testPage.js';
|
|
5
|
+
import { formatAdminURL } from '../../../testSurface/format/adminURL.js';
|
|
6
|
+
import { surfaceUrls } from '../../../testSurface/surfaceUrls.js';
|
|
18
7
|
import { Button } from '../../../ui/Button.js';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import './testPage.css';
|
|
8
|
+
import { StatusChip } from '../../../ui/StatusChip.js';
|
|
9
|
+
import { useXpStepNav } from '../useXpStepNav.js';
|
|
10
|
+
import { SurfaceShell } from '../SurfaceShell.js';
|
|
23
11
|
export function TestPage({ id, surface, onTitleChange }) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onTitleChange
|
|
34
|
-
]);
|
|
35
|
-
if (test.loadState !== 'ready' || !test.doc) return /*#__PURE__*/ _jsx(SurfaceShell, {
|
|
36
|
-
adminRoute: surface.adminRoute,
|
|
37
|
-
title: C.test,
|
|
38
|
-
crumbs: [
|
|
39
|
-
{
|
|
40
|
-
label: C.tests,
|
|
41
|
-
href: formatAdminURL({
|
|
42
|
-
adminRoute: surface.adminRoute,
|
|
43
|
-
path: '/experiments'
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: C.test
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
children: /*#__PURE__*/ _jsxs("div", {
|
|
51
|
-
className: "xp-test-page",
|
|
52
|
-
role: test.loadState === 'error' ? 'alert' : 'status',
|
|
53
|
-
children: [
|
|
54
|
-
/*#__PURE__*/ _jsx("p", {
|
|
55
|
-
children: test.loadState === 'forbidden' ? C.forbidden : test.loadState === 'missing' ? C.missing : test.loadState === 'error' ? C.error : C.loading
|
|
56
|
-
}),
|
|
57
|
-
test.loadState === 'error' ? /*#__PURE__*/ _jsx(Button, {
|
|
58
|
-
onClick: ()=>void test.reload(),
|
|
59
|
-
children: C.retry
|
|
60
|
-
}) : null
|
|
61
|
-
]
|
|
62
|
-
})
|
|
12
|
+
return /*#__PURE__*/ _jsx(TestSurface, {
|
|
13
|
+
id: id,
|
|
14
|
+
surface: surface,
|
|
15
|
+
onTitleChange: onTitleChange,
|
|
16
|
+
renderFrame: ({ test, children })=>/*#__PURE__*/ _jsx(TestPageFrame, {
|
|
17
|
+
test: test,
|
|
18
|
+
surface: surface,
|
|
19
|
+
children: children
|
|
20
|
+
})
|
|
63
21
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
22
|
+
}
|
|
23
|
+
function TestPageFrame({ test, surface, children }) {
|
|
24
|
+
const doc = test.doc;
|
|
25
|
+
const crumbs = [
|
|
26
|
+
{
|
|
27
|
+
label: C.tests,
|
|
28
|
+
url: surfaceUrls.home(surface.adminRoute)
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: doc?.name ?? C.test
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
useXpStepNav(crumbs);
|
|
69
35
|
return /*#__PURE__*/ _jsx(SurfaceShell, {
|
|
70
36
|
adminRoute: surface.adminRoute,
|
|
71
|
-
title:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
label
|
|
75
|
-
href:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
label: test.doc.name
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
status: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
37
|
+
title: doc?.name ?? C.test,
|
|
38
|
+
dynamicTitle: Boolean(doc?.name),
|
|
39
|
+
crumbs: crumbs.map(({ label, url })=>({
|
|
40
|
+
label,
|
|
41
|
+
href: url
|
|
42
|
+
})),
|
|
43
|
+
status: doc ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
85
44
|
children: [
|
|
86
45
|
/*#__PURE__*/ _jsx("span", {
|
|
87
46
|
className: "xp-tests-kind",
|
|
88
|
-
children: C.kinds[
|
|
47
|
+
children: C.kinds[doc.kind]
|
|
89
48
|
}),
|
|
90
|
-
/*#__PURE__*/ _jsx(StatusChip, {
|
|
91
|
-
status:
|
|
92
|
-
})
|
|
49
|
+
!test.statusReadPending ? /*#__PURE__*/ _jsx(StatusChip, {
|
|
50
|
+
status: doc.status
|
|
51
|
+
}) : null
|
|
93
52
|
]
|
|
94
|
-
}),
|
|
95
|
-
actions: surface.canReadResults &&
|
|
96
|
-
'running',
|
|
97
|
-
'stopped',
|
|
98
|
-
'decided'
|
|
99
|
-
].includes(test.doc.status) ? /*#__PURE__*/ _jsx(Button, {
|
|
53
|
+
}) : undefined,
|
|
54
|
+
actions: doc && !test.statusReadPending && surface.canReadResults && doc.status !== 'draft' ? /*#__PURE__*/ _jsx(Button, {
|
|
100
55
|
variant: "secondary",
|
|
101
56
|
href: formatAdminURL({
|
|
102
57
|
adminRoute: surface.adminRoute,
|
|
103
|
-
path: `/experiments/${encodeURIComponent(String(
|
|
58
|
+
path: `/experiments/${encodeURIComponent(String(doc.id))}/results`
|
|
104
59
|
}),
|
|
105
60
|
children: C.results
|
|
106
61
|
}) : undefined,
|
|
107
|
-
children:
|
|
108
|
-
className: "xp-test-page xp-test-page--setup",
|
|
109
|
-
style: {
|
|
110
|
-
paddingBottom: barHeight === undefined ? undefined : `${barHeight}px`
|
|
111
|
-
},
|
|
112
|
-
children: [
|
|
113
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
114
|
-
className: "xp-test-layout",
|
|
115
|
-
children: [
|
|
116
|
-
/*#__PURE__*/ _jsx(Rail, {
|
|
117
|
-
test: test
|
|
118
|
-
}),
|
|
119
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
120
|
-
className: "xp-test-content",
|
|
121
|
-
children: [
|
|
122
|
-
test.errors._section ? /*#__PURE__*/ _jsx(Banner, {
|
|
123
|
-
tone: "error",
|
|
124
|
-
action: test.stale ? /*#__PURE__*/ _jsx(Button, {
|
|
125
|
-
onClick: ()=>void test.reload(),
|
|
126
|
-
children: C.reload
|
|
127
|
-
}) : undefined,
|
|
128
|
-
children: test.errors._section
|
|
129
|
-
}) : null,
|
|
130
|
-
/*#__PURE__*/ _jsxs(Section, {
|
|
131
|
-
test: test,
|
|
132
|
-
sectionId: "what",
|
|
133
|
-
children: [
|
|
134
|
-
/*#__PURE__*/ _jsx(TestName, {
|
|
135
|
-
...props
|
|
136
|
-
}),
|
|
137
|
-
/*#__PURE__*/ _jsx(parts.Binding, {
|
|
138
|
-
...props
|
|
139
|
-
}),
|
|
140
|
-
/*#__PURE__*/ _jsx(Hypothesis, {
|
|
141
|
-
...props
|
|
142
|
-
})
|
|
143
|
-
]
|
|
144
|
-
}),
|
|
145
|
-
/*#__PURE__*/ _jsx(VersionsSection, {
|
|
146
|
-
...props,
|
|
147
|
-
parts: parts
|
|
148
|
-
}),
|
|
149
|
-
/*#__PURE__*/ _jsx(GoalSection, {
|
|
150
|
-
...props
|
|
151
|
-
}),
|
|
152
|
-
/*#__PURE__*/ _jsx(TargetingSection, {
|
|
153
|
-
...props
|
|
154
|
-
}),
|
|
155
|
-
/*#__PURE__*/ _jsx(LengthSection, {
|
|
156
|
-
...props
|
|
157
|
-
}),
|
|
158
|
-
/*#__PURE__*/ _jsx(AdvancedSection, {
|
|
159
|
-
...props
|
|
160
|
-
})
|
|
161
|
-
]
|
|
162
|
-
})
|
|
163
|
-
]
|
|
164
|
-
}),
|
|
165
|
-
/*#__PURE__*/ _jsx(ReadinessBar, {
|
|
166
|
-
...props,
|
|
167
|
-
onHeightChange: setBarHeight
|
|
168
|
-
})
|
|
169
|
-
]
|
|
170
|
-
})
|
|
62
|
+
children: children
|
|
171
63
|
});
|
|
172
64
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TestsRoute } from '../../types/surface.js';
|
|
2
|
+
export type StepNavItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const XpStepNavContext: import("react").Context<{
|
|
7
|
+
route: TestsRoute;
|
|
8
|
+
items: StepNavItem[];
|
|
9
|
+
setStepNav: (items: StepNavItem[]) => void;
|
|
10
|
+
} | undefined>;
|
|
11
|
+
export declare function useXpStepNav(items: StepNavItem[]): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext, useContext, useEffect } from 'react';
|
|
3
|
+
export const XpStepNavContext = createContext(undefined);
|
|
4
|
+
export function useXpStepNav(items) {
|
|
5
|
+
const setStepNav = useContext(XpStepNavContext)?.setStepNav;
|
|
6
|
+
// Callers can pass inline crumbs without resetting Payload's provider on every render.
|
|
7
|
+
const crumbs = JSON.stringify(items);
|
|
8
|
+
useEffect(()=>{
|
|
9
|
+
setStepNav?.(JSON.parse(crumbs));
|
|
10
|
+
}, [
|
|
11
|
+
crumbs,
|
|
12
|
+
setStepNav
|
|
13
|
+
]);
|
|
14
|
+
}
|
package/dist/admin/theme.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatAdminURL } from 'payload/shared';
|
|
2
2
|
import { redirect } from 'next/navigation.js';
|
|
3
|
-
export function CollectionListRedirect({ payload }) {
|
|
3
|
+
/** @deprecated Retained for existing import maps until 0.5.0. */ export function CollectionListRedirect({ payload }) {
|
|
4
4
|
redirect(formatAdminURL({
|
|
5
5
|
adminRoute: payload.config.routes.admin,
|
|
6
6
|
path: '/experiments'
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { accentStyles } from '../../ui/accent.js';
|
|
3
|
-
import { flattenTopLevelFields, formatAdminURL } from 'payload/shared';
|
|
1
|
+
import { formatAdminURL } from 'payload/shared';
|
|
4
2
|
import { notFound, redirect } from 'next/navigation.js';
|
|
5
|
-
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
|
|
6
|
-
import { serializeAttributeKeys, serializeFlagPoints, serializeMetricSources } from '../../collections/serialize.js';
|
|
7
|
-
import { serializePageCollections } from '../pageCollections.js';
|
|
8
|
-
import { collectionLabel as resolveLabel } from '../../collections/labels.js';
|
|
9
|
-
import { documentEditor, puckCollections } from '../../options.js';
|
|
10
3
|
import { xpOptionsFromReq } from '../../options/fromReq.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import { surfaceUrls } from '../../testSurface/surfaceUrls.js';
|
|
5
|
+
import { buildSurfaceProps } from './buildSurfaceProps.js';
|
|
6
|
+
import { renderTestsSurface } from './renderTestsSurface.js';
|
|
14
7
|
export async function ExperimentsRootView({ initPageResult, params, searchParams }) {
|
|
15
8
|
const { req } = initPageResult;
|
|
16
9
|
const adminRoute = req.payload.config.routes.admin;
|
|
@@ -51,32 +44,23 @@ export async function ExperimentsRootView({ initPageResult, params, searchParams
|
|
|
51
44
|
path: `${login}?redirect=${encodeURIComponent(currentPath)}`
|
|
52
45
|
}));
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const options = xpOptionsFromReq(req);
|
|
57
|
-
async function permits(access) {
|
|
47
|
+
if (route === 'home' || route === 'goals') {
|
|
48
|
+
let canManage = false;
|
|
58
49
|
try {
|
|
59
|
-
|
|
50
|
+
canManage = await xpOptionsFromReq(req).access.manage({
|
|
60
51
|
req
|
|
61
52
|
}) === true;
|
|
62
|
-
} catch {
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
} catch {}
|
|
54
|
+
if (!canManage) return renderTestsSurface(req, null);
|
|
55
|
+
return redirect(route === 'home' ? surfaceUrls.home(adminRoute, await searchParams) : surfaceUrls.goals(adminRoute, await searchParams));
|
|
65
56
|
}
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
const canReadResults = options.access.readResults ? await permits(options.access.readResults) : canManage;
|
|
69
|
-
if (routeAccess({
|
|
57
|
+
const clientProps = await buildSurfaceProps({
|
|
58
|
+
req,
|
|
70
59
|
route,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return /*#__PURE__*/ _jsx(RootViewMessage, {
|
|
76
|
-
children: SURFACE_COPY.noAccess
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
if (canManage && id && tail[0] === 'by-slug') {
|
|
60
|
+
id,
|
|
61
|
+
searchParams
|
|
62
|
+
});
|
|
63
|
+
if (clientProps?.canManage && id && tail[0] === 'by-slug') {
|
|
80
64
|
const result = await req.payload.find({
|
|
81
65
|
collection: 'xp-experiments',
|
|
82
66
|
req,
|
|
@@ -90,138 +74,7 @@ export async function ExperimentsRootView({ initPageResult, params, searchParams
|
|
|
90
74
|
}
|
|
91
75
|
});
|
|
92
76
|
if (!result.docs[0]) return notFound();
|
|
93
|
-
id = String(result.docs[0].id);
|
|
77
|
+
clientProps.id = String(result.docs[0].id);
|
|
94
78
|
}
|
|
95
|
-
|
|
96
|
-
// xp-state is manager-readable only. Results-only readers do not edit settings.
|
|
97
|
-
if (canManage && flagPoints.length) {
|
|
98
|
-
const state = await req.payload.findGlobal({
|
|
99
|
-
slug: 'xp-state',
|
|
100
|
-
req,
|
|
101
|
-
overrideAccess: false,
|
|
102
|
-
depth: 0
|
|
103
|
-
});
|
|
104
|
-
const defaults = state.flagDefaults;
|
|
105
|
-
for (const point of flagPoints)point.effectiveDefaults = defaults?.[point.id]?.params ?? point.defaultParams;
|
|
106
|
-
}
|
|
107
|
-
const registrations = [
|
|
108
|
-
...new Set([
|
|
109
|
-
...options.puck?.enabled ? puckCollections(options) : [],
|
|
110
|
-
...options.blocks?.collections ?? []
|
|
111
|
-
].map((entry)=>entry.slug))
|
|
112
|
-
];
|
|
113
|
-
const pages = route === 'new' && canManage && registrations.length ? (await Promise.all(registrations.map(async (collection)=>{
|
|
114
|
-
try {
|
|
115
|
-
const config = req.payload.config.collections.find((item)=>item.slug === collection);
|
|
116
|
-
const useAsTitle = config?.admin.useAsTitle ?? 'id';
|
|
117
|
-
const collectionLabel = resolveLabel(config?.labels.plural, collection, req);
|
|
118
|
-
// appliesTo may inspect any stored field; ordinary Puck lists keep their title-only projection.
|
|
119
|
-
const predicateFields = options.blocks?.collections.some((entry)=>entry.slug === collection) ? Object.fromEntries(flattenTopLevelFields(config?.fields ?? []).map((field)=>[
|
|
120
|
-
field.name,
|
|
121
|
-
true
|
|
122
|
-
])) : {};
|
|
123
|
-
const result = await req.payload.find({
|
|
124
|
-
collection,
|
|
125
|
-
req,
|
|
126
|
-
overrideAccess: false,
|
|
127
|
-
depth: 0,
|
|
128
|
-
limit: 50,
|
|
129
|
-
sort: '-updatedAt',
|
|
130
|
-
draft: true,
|
|
131
|
-
select: {
|
|
132
|
-
[useAsTitle]: true,
|
|
133
|
-
...predicateFields
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
// The new-test list uses the latest draft's editing intent, as the "Test a block" field condition does (§4.1).
|
|
137
|
-
return result.docs.map((doc)=>{
|
|
138
|
-
const editor = documentEditor(options, collection, doc);
|
|
139
|
-
if (editor !== 'puck' && editor !== 'blocks') return null;
|
|
140
|
-
const id = doc.id;
|
|
141
|
-
const customUrl = options.admin?.editorUrl?.({
|
|
142
|
-
collection,
|
|
143
|
-
id,
|
|
144
|
-
draft: true,
|
|
145
|
-
editor,
|
|
146
|
-
doc
|
|
147
|
-
});
|
|
148
|
-
const title = doc[useAsTitle];
|
|
149
|
-
return {
|
|
150
|
-
collection,
|
|
151
|
-
collectionLabel,
|
|
152
|
-
id,
|
|
153
|
-
editor,
|
|
154
|
-
title: typeof title === 'string' || typeof title === 'number' ? String(title) : String(id),
|
|
155
|
-
editorUrl: typeof customUrl === 'string' ? customUrl : formatAdminURL({
|
|
156
|
-
adminRoute,
|
|
157
|
-
path: `/collections/${collection}/${encodeURIComponent(String(id))}`
|
|
158
|
-
})
|
|
159
|
-
};
|
|
160
|
-
}).filter((page)=>page !== null);
|
|
161
|
-
} catch {
|
|
162
|
-
return [];
|
|
163
|
-
}
|
|
164
|
-
}))).flat() : undefined;
|
|
165
|
-
const descriptions = options.admin?.descriptions;
|
|
166
|
-
const returnToTest = (await searchParams)?.return;
|
|
167
|
-
const clientProps = {
|
|
168
|
-
...typeof returnToTest === 'string' && /^[\w-]+$/.test(returnToTest) ? {
|
|
169
|
-
returnToTest
|
|
170
|
-
} : {},
|
|
171
|
-
route,
|
|
172
|
-
...id === undefined ? {} : {
|
|
173
|
-
id
|
|
174
|
-
},
|
|
175
|
-
adminRoute,
|
|
176
|
-
apiRoute: req.payload.config.routes.api,
|
|
177
|
-
canManage,
|
|
178
|
-
canReadResults,
|
|
179
|
-
isAdmin,
|
|
180
|
-
flagPoints,
|
|
181
|
-
...pages === undefined ? {} : {
|
|
182
|
-
pages
|
|
183
|
-
},
|
|
184
|
-
pageCollections: serializePageCollections(options.pages?.collections ?? [], req),
|
|
185
|
-
collectionTitles: Object.fromEntries(req.payload.config.collections.flatMap((collection)=>{
|
|
186
|
-
const title = collection.admin.useAsTitle;
|
|
187
|
-
return title && title !== 'id' ? [
|
|
188
|
-
[
|
|
189
|
-
collection.slug,
|
|
190
|
-
title
|
|
191
|
-
]
|
|
192
|
-
] : [];
|
|
193
|
-
})),
|
|
194
|
-
userId: req.user.id,
|
|
195
|
-
userCollection: req.payload.config.admin.user,
|
|
196
|
-
attributeKeys: serializeAttributeKeys(options),
|
|
197
|
-
metricSources: serializeMetricSources(options),
|
|
198
|
-
...descriptions ? {
|
|
199
|
-
admin: {
|
|
200
|
-
descriptions: {
|
|
201
|
-
...descriptions
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
} : {}
|
|
205
|
-
};
|
|
206
|
-
function TestsSurfaceFallback() {
|
|
207
|
-
return /*#__PURE__*/ _jsx(RootViewMessage, {
|
|
208
|
-
alert: true,
|
|
209
|
-
children: SURFACE_COPY.notInstalled
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
const css = accentStyles(options.theme?.accent);
|
|
213
|
-
const surface = RenderServerComponent({
|
|
214
|
-
Component: XP_TESTS_SURFACE,
|
|
215
|
-
Fallback: TestsSurfaceFallback,
|
|
216
|
-
importMap: req.payload.importMap,
|
|
217
|
-
clientProps
|
|
218
|
-
});
|
|
219
|
-
return css ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
220
|
-
children: [
|
|
221
|
-
/*#__PURE__*/ _jsx("style", {
|
|
222
|
-
children: css
|
|
223
|
-
}),
|
|
224
|
-
surface
|
|
225
|
-
]
|
|
226
|
-
}) : surface;
|
|
79
|
+
return renderTestsSurface(req, clientProps);
|
|
227
80
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { formatAdminURL } from 'payload/shared';
|
|
2
|
+
import { redirect } from 'next/navigation.js';
|
|
3
|
+
export async function GoalEditRedirect({ initPageResult, params, routeSegments }) {
|
|
4
|
+
const resolved = await params;
|
|
5
|
+
const segments = routeSegments ?? (Array.isArray(resolved?.segments) ? resolved.segments : []);
|
|
6
|
+
const collectionIndex = segments.indexOf('xp-metrics');
|
|
7
|
+
const tail = collectionIndex >= 0 ? segments.slice(collectionIndex + 1) : segments;
|
|
8
|
+
const id = tail[0] ?? resolved?.id ?? initPageResult.docID;
|
|
9
|
+
const path = id === undefined || id === 'create' ? '/experiments/goals/new' : `/experiments/goals/${encodeURIComponent(String(id))}`;
|
|
10
|
+
return redirect(formatAdminURL({
|
|
11
|
+
adminRoute: initPageResult.req.payload.config.routes.admin,
|
|
12
|
+
path
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { ServerProps } from 'payload';
|
|
2
|
+
/** @deprecated Retained for existing import maps until 0.5.0. */
|
|
2
3
|
export declare function TestsNavLinkServer({ payload, user, permissions }: Pick<ServerProps, 'payload' | 'user' | 'permissions'>): Promise<string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
|
|
2
|
-
import { SURFACE_COPY } from '
|
|
2
|
+
import { SURFACE_COPY } from '../../testSurface/copy/surface.js';
|
|
3
3
|
import { XP_TESTS_NAV_CLIENT } from '../paths.js';
|
|
4
|
-
export async function TestsNavLinkServer({ payload, user, permissions }) {
|
|
4
|
+
/** @deprecated Retained for existing import maps until 0.5.0. */ export async function TestsNavLinkServer({ payload, user, permissions }) {
|
|
5
5
|
const testPermissions = permissions?.collections?.['xp-experiments'];
|
|
6
6
|
if (!user?.collection || testPermissions?.update !== true) return null;
|
|
7
7
|
const result = await payload.find({
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useLocale, useStepNav } from '@payloadcms/ui';
|
|
4
|
+
import { useCallback, useState } from 'react';
|
|
5
|
+
import { TestsSurface as Surface } from '../surface/TestsSurface.js';
|
|
6
|
+
import { XpStepNavContext } from '../surface/useXpStepNav.js';
|
|
7
|
+
/** Payload context stays at the admin entry; the mountable surface stays neutral. */ export function TestsSurface(props) {
|
|
8
|
+
const locale = useLocale();
|
|
9
|
+
const { setStepNav } = useStepNav();
|
|
10
|
+
// Each screen starts with its own shell crumbs until it publishes step nav.
|
|
11
|
+
return /*#__PURE__*/ _jsx(ScreenStepNav, {
|
|
12
|
+
...props,
|
|
13
|
+
contentLocale: locale?.code,
|
|
14
|
+
publishToPayload: setStepNav
|
|
15
|
+
}, `${props.route}/${props.id ?? ''}`);
|
|
16
|
+
}
|
|
17
|
+
function ScreenStepNav({ publishToPayload, ...props }) {
|
|
18
|
+
const [items, setItems] = useState([]);
|
|
19
|
+
const setStepNav = useCallback((next)=>{
|
|
20
|
+
setItems(next);
|
|
21
|
+
publishToPayload(next);
|
|
22
|
+
}, [
|
|
23
|
+
publishToPayload
|
|
24
|
+
]);
|
|
25
|
+
return /*#__PURE__*/ _jsx(XpStepNavContext, {
|
|
26
|
+
value: {
|
|
27
|
+
route: props.route,
|
|
28
|
+
items,
|
|
29
|
+
setStepNav
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/ _jsx(Surface, {
|
|
32
|
+
...props
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminViewServerProps, PayloadRequest } from 'payload';
|
|
2
|
+
import type { TestsRoute, TestsSurfaceProps } from '../../types/surface.js';
|
|
3
|
+
export declare function buildSurfaceProps({ req, route, id, searchParams }: {
|
|
4
|
+
req: PayloadRequest;
|
|
5
|
+
route: TestsRoute;
|
|
6
|
+
id?: string;
|
|
7
|
+
searchParams: AdminViewServerProps['searchParams'];
|
|
8
|
+
}): Promise<TestsSurfaceProps | null>;
|