@delmaredigital/payload-experiments 0.4.0-rc.2 → 0.4.0-rc.4
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 +283 -775
- package/dist/admin/LayerUsage.js +1 -1
- package/dist/admin/MetricSourceSelect.js +2 -2
- package/dist/admin/PlacementStatus.js +1 -1
- package/dist/admin/TestsDashboardCards.js +2 -2
- package/dist/admin/TestsNavLink.js +2 -2
- package/dist/admin/blocks/BlockPanel.js +3 -3
- package/dist/admin/blocks/TestBlockField.js +3 -3
- package/dist/admin/blocks/formApi.js +1 -1
- package/dist/admin/blocks/model.js +1 -1
- package/dist/admin/blocks/statusCache.js +1 -1
- package/dist/admin/components/RootViewMessage.js +1 -1
- package/dist/admin/copy/blocks.d.ts +2 -2
- package/dist/admin/copy/blocks.js +3 -2
- package/dist/admin/copy/goals.d.ts +6 -1
- package/dist/admin/copy/goals.js +10 -3
- package/dist/admin/goals/XpGoalField.js +155 -129
- package/dist/admin/goals/xpGoalField.css +2 -3
- package/dist/admin/status.model.js +1 -1
- package/dist/admin/surface/ResultsRoute.d.ts +2 -1
- package/dist/admin/surface/ResultsRoute.js +4 -3
- package/dist/admin/surface/SurfaceShell.js +2 -2
- package/dist/admin/surface/TestsHome.d.ts +1 -1
- package/dist/admin/surface/TestsHome.js +3 -3
- package/dist/admin/surface/TestsSurface.js +2 -2
- package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
- package/dist/admin/surface/goals/GoalForm.js +69 -15
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +4 -4
- package/dist/admin/surface/goals/data.js +2 -2
- package/dist/admin/surface/goals/goals.css +7 -0
- package/dist/admin/surface/goals/goals.model.d.ts +11 -1
- package/dist/admin/surface/goals/goals.model.js +43 -0
- package/dist/admin/surface/home.model.d.ts +1 -1
- package/dist/admin/surface/home.model.js +5 -5
- package/dist/admin/surface/newTest/NewTest.d.ts +1 -1
- package/dist/admin/surface/newTest/NewTest.js +1 -1
- package/dist/admin/surface/newTest/PageWizard.d.ts +1 -1
- package/dist/admin/surface/newTest/PageWizard.js +13 -13
- package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
- package/dist/admin/surface/results/ResultsHeader.js +8 -8
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +45 -156
- package/dist/admin/views/ExperimentsRootView.js +1 -1
- package/dist/admin/views/TestsNavLinkServer.js +1 -1
- package/dist/admin/views/renderCollectionList.js +1 -1
- package/dist/admin/views/renderTestsSurface.js +1 -1
- package/dist/blocks/placementLocale.d.ts +21 -0
- package/dist/blocks/placementLocale.js +115 -0
- package/dist/collections/experiments/config.js +1 -1
- package/dist/collections/metrics.js +1 -1
- package/dist/db/bulkPlacementRemoval.d.ts +30 -0
- package/dist/db/bulkPlacementRemoval.js +107 -0
- package/dist/db/placements.d.ts +2 -0
- package/dist/db/placements.js +8 -0
- package/dist/endpoints/editorSurface.d.ts +3 -0
- package/dist/endpoints/editorSurface.js +31 -0
- package/dist/endpoints/index.js +28 -1
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +2 -0
- package/dist/fields/xpGoal.js +1 -1
- 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/validate.js +3 -2
- package/dist/hooks/blockRemovalRule.d.ts +29 -0
- package/dist/hooks/blockRemovalRule.js +141 -0
- package/dist/hooks/pageGuard.d.ts +24 -2
- package/dist/hooks/pageGuard.js +178 -24
- package/dist/hooks/puckGoals.d.ts +2 -0
- package/dist/hooks/puckGoals.js +34 -10
- package/dist/lib/placementPages.d.ts +9 -0
- package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +1 -4
- package/dist/onInit.js +22 -0
- package/dist/plugin.js +2 -1
- package/dist/puck/ExperimentPicker.js +25 -10
- package/dist/puck/copy.d.ts +4 -1
- package/dist/puck/copy.js +4 -1
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +21 -0
- package/dist/puck/editor/ConfigureTestDrawer.js +147 -0
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +11 -2
- package/dist/puck/editor/CreateExperimentDrawer.js +69 -9
- package/dist/puck/editor/EditorControls.d.ts +14 -0
- package/dist/puck/editor/EditorControls.js +99 -0
- package/dist/puck/editor/ExperimentSlotEditor.js +317 -51
- package/dist/puck/editor/ResultsReadout.js +3 -5
- package/dist/puck/editor/VersionBuilder.js +2 -2
- package/dist/puck/editor/armsCache.d.ts +3 -1
- package/dist/puck/editor/armsCache.js +20 -3
- package/dist/puck/editor/copy.d.ts +18 -2
- package/dist/puck/editor/copy.js +19 -3
- package/dist/puck/editor/editor.chrome.css +33 -0
- package/dist/puck/editor/editor.css +39 -0
- package/dist/puck/editor/editor.model.d.ts +14 -0
- package/dist/puck/editor/editor.model.js +58 -1
- package/dist/puck/editor/editorSurface.d.ts +10 -0
- package/dist/puck/editor/editorSurface.js +65 -0
- package/dist/puck/editor/localPlacements.d.ts +2 -0
- package/dist/puck/editor/localPlacements.js +29 -0
- package/dist/puck/editor/placementsCache.d.ts +19 -0
- package/dist/puck/editor/placementsCache.js +83 -0
- package/dist/puck/editor/xpGoalPuckEditorField.js +109 -98
- package/dist/puck/experimentSlotField.d.ts +3 -0
- package/dist/puck/experimentSlotField.js +15 -4
- package/dist/{admin → testSurface}/actions/DecideDialog.d.ts +2 -1
- package/dist/{admin → testSurface}/actions/DecideDialog.js +6 -4
- package/dist/{admin → testSurface}/api.js +4 -5
- package/dist/{admin → testSurface}/copy/common.d.ts +2 -0
- package/dist/{admin → testSurface}/copy/common.js +2 -0
- package/dist/{admin → testSurface}/copy/readiness.d.ts +3 -0
- package/dist/{admin → testSurface}/copy/readiness.js +3 -0
- package/dist/{admin → testSurface}/copy/testPage.d.ts +3 -0
- package/dist/{admin → testSurface}/copy/testPage.js +7 -2
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -0
- package/dist/{admin → testSurface}/placements/placementLabels.js +1 -1
- package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
- package/dist/testSurface/previewLinks.model.js +4 -0
- package/dist/testSurface/results/results.css +64 -0
- package/dist/{admin → testSurface}/surface/contracts.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/pageBlock/parts.js +6 -6
- package/dist/testSurface/surface/pagePicker/pagePicker.css +10 -0
- package/dist/{admin → testSurface}/surface/readiness/useTransition.js +1 -0
- package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +2 -2
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +18 -11
- package/dist/testSurface/surface/setting/setting.css +17 -0
- package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
- package/dist/{admin → testSurface}/surface/test/GoalSection.js +3 -2
- package/dist/{admin → testSurface}/surface/test/Section.js +9 -8
- package/dist/testSurface/surface/test/TestSurface.d.ts +18 -0
- package/dist/testSurface/surface/test/TestSurface.js +152 -0
- package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
- package/dist/{admin → testSurface}/surface/test/VersionsSection.js +12 -6
- package/dist/testSurface/surface/test/testPage.css +92 -0
- package/dist/{admin → testSurface}/surface/useTestDocument.d.ts +5 -1
- package/dist/{admin → testSurface}/surface/useTestDocument.js +34 -3
- package/dist/{admin → testSurface}/surfaceUrls.js +1 -1
- package/dist/transitions/placementInteractions.js +1 -1
- package/dist/transitions/placements.d.ts +27 -8
- package/dist/transitions/placements.js +77 -6
- package/dist/transitions/start.js +2 -2
- package/dist/types/endpoints.d.ts +1 -1
- package/dist/ui/Dialog.d.ts +4 -1
- package/dist/ui/Dialog.js +41 -3
- package/dist/ui/Drawer.d.ts +10 -0
- package/dist/ui/Drawer.js +29 -0
- package/dist/ui/Tabs.d.ts +3 -3
- package/dist/ui/Tabs.js +35 -33
- package/dist/ui/ui.css +6 -0
- package/package.json +1 -1
- package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
- package/dist/admin/actions/ConfirmDialog.js +0 -149
- 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/pagePicker/pagePicker.css +0 -10
- package/dist/admin/surface/setting/setting.css +0 -17
- package/dist/admin/surface/test/GoalSection.d.ts +0 -2
- package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
- package/dist/admin/surface/test/testPage.css +0 -92
- /package/dist/{admin → testSurface}/PreviewLinks.d.ts +0 -0
- /package/dist/{admin → testSurface}/PreviewLinks.js +0 -0
- /package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/MakeContentResult.js +0 -0
- /package/dist/{admin → testSurface}/actions/actions.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/actions.model.js +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
- /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/allocation.model.js +0 -0
- /package/dist/{admin → testSurface}/api.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}/copy/actions.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/actions.js +0 -0
- /package/dist/{admin → testSurface}/copy/advanced.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
- /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/arms.js +0 -0
- /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/audience.js +0 -0
- /package/dist/{admin → testSurface}/copy/metrics.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/metrics.js +0 -0
- /package/dist/{admin → testSurface}/copy/pages.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/pages.js +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
- /package/dist/{admin → testSurface}/copy/results.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/results.js +0 -0
- /package/dist/{admin → testSurface}/copy/review.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/review.js +0 -0
- /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/setting.js +0 -0
- /package/dist/{admin → testSurface}/copy/surface.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/surface.js +0 -0
- /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
- /package/dist/{admin → testSurface}/format/date.js +0 -0
- /package/dist/{admin → testSurface}/labels.d.ts +0 -0
- /package/dist/{admin → testSurface}/labels.js +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.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.d.ts +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/VerdictHero.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/VerdictHero.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/results.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/results.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/pageBlock.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/CopyRoute.js +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/PageCombobox.js +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/Banner.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/SaveStatus.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/SaveStatus.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/readiness.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/useTransition.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/ReleasePages.js +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/results/useResults.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/useResults.js +0 -0
- /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/parts.js +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/AdvancedSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/LengthSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/LengthSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/PageHoldout.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/Rail.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/Section.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/fields.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/fields.js +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}/surface/test/pageParts.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/testPage.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/testDocument.model.js +0 -0
- /package/dist/{admin → testSurface}/surfaceUrls.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.d.ts +0 -0
- /package/dist/{admin → testSurface}/useApi.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { surfaceUrls } from '
|
|
3
|
+
import { surfaceUrls } from '../../testSurface/surfaceUrls.js';
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import { SURFACE_COPY } from '
|
|
5
|
+
import { SURFACE_COPY } from '../../testSurface/copy/surface.js';
|
|
6
6
|
import { NewTest } from './newTest/NewTest.js';
|
|
7
7
|
import { TestPage } from './test/TestPage.js';
|
|
8
8
|
import { ResultsRoute } from './ResultsRoute.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { surfaceUrls } from '
|
|
3
|
+
import { surfaceUrls } from '../../../testSurface/surfaceUrls.js';
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { useRouter } from 'next/navigation.js';
|
|
6
6
|
import { formatAdminURL } from 'payload/shared';
|
|
7
|
-
import { GOALS_COPY as C,
|
|
8
|
-
import { metricSourceHint, metricSourceOptions, sourceFor } from '
|
|
7
|
+
import { GOALS_COPY as C, goalDeleteLockedStart, goalInUse, goalShowAll } from '../../copy/goals.js';
|
|
8
|
+
import { metricSourceHint, metricSourceOptions, sourceFor } from '../../../testSurface/metricSource.model.js';
|
|
9
9
|
import { validateCappingType, validateCappingValue } from '../../../collections/metricValidation.js';
|
|
10
10
|
import { CLICK_KEY } from '../../../goals/key.js';
|
|
11
11
|
import { clickGoalSlug } from '../../../goals/picker/clickGoalPicker.model.js';
|
|
12
|
-
import { goalSlug, goalUsage } from './goals.model.js';
|
|
12
|
+
import { goalSlug, goalUsage, goalUsageRows, visibleGoalUsage } from './goals.model.js';
|
|
13
13
|
import { GoalResponseError, goalPages, goalResponse } from './data.js';
|
|
14
|
-
import { SURFACE_COPY } from '
|
|
14
|
+
import { SURFACE_COPY } from '../../../testSurface/copy/surface.js';
|
|
15
15
|
import { SurfaceShell } from '../SurfaceShell.js';
|
|
16
16
|
import { Button } from '../../../ui/Button.js';
|
|
17
17
|
import { TextInput, NumberInput, Select } from '../../../ui/Inputs.js';
|
|
@@ -46,22 +46,20 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
46
46
|
const base = surface.apiRoute.replace(/\/$/, '');
|
|
47
47
|
const [draft, setDraft] = useState(empty);
|
|
48
48
|
const [goal, setGoal] = useState();
|
|
49
|
+
const [usageTests, setUsageTests] = useState([]);
|
|
50
|
+
const [showAllUsage, setShowAllUsage] = useState(false);
|
|
49
51
|
const [usedBy, setUsedBy] = useState(0);
|
|
50
52
|
const [ready, setReady] = useState(false);
|
|
51
53
|
const [loadError, setLoadError] = useState('');
|
|
52
54
|
const [error, setError] = useState('');
|
|
53
55
|
const [fieldErrors, setFieldErrors] = useState({});
|
|
56
|
+
const [seenFieldErrors, setSeenFieldErrors] = useState(fieldErrors);
|
|
57
|
+
const [advancedOpen, setAdvancedOpen] = useState(false);
|
|
54
58
|
const [pending, setPending] = useState(null);
|
|
55
59
|
const [slugEdited, setSlugEdited] = useState(false);
|
|
56
60
|
const [attempt, setAttempt] = useState(0);
|
|
57
61
|
const inFlight = useRef(false);
|
|
58
|
-
const advanced = useRef(null);
|
|
59
62
|
const [confirmDelete, setConfirmDelete] = useState(false);
|
|
60
|
-
useEffect(()=>{
|
|
61
|
-
if (advanced.current && (fieldErrors.slug || fieldErrors.capType || fieldErrors.capValue || fieldErrors.warningPercent)) advanced.current.open = true;
|
|
62
|
-
}, [
|
|
63
|
-
fieldErrors
|
|
64
|
-
]);
|
|
65
63
|
const listUrl = surfaceUrls.goals(surface.adminRoute, returnToTest ? {
|
|
66
64
|
return: returnToTest
|
|
67
65
|
} : undefined);
|
|
@@ -85,6 +83,8 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
85
83
|
if (controller.signal.aborted) return;
|
|
86
84
|
const defaultCap = sourceFor(loaded.source, surface.metricSources)?.kind === 'revenue' && loaded.capping?.type == null && loaded.capping?.value == null;
|
|
87
85
|
setGoal(loaded);
|
|
86
|
+
setUsageTests(tests);
|
|
87
|
+
setShowAllUsage(false);
|
|
88
88
|
setUsedBy(goalUsage(tests).get(loaded.id) ?? 0);
|
|
89
89
|
setDraft({
|
|
90
90
|
...empty(),
|
|
@@ -108,6 +108,11 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
108
108
|
]);
|
|
109
109
|
const source = sourceFor(draft.source, surface.metricSources);
|
|
110
110
|
const click = draft.source.startsWith('click:');
|
|
111
|
+
// Keep the disclosure and its new field errors in the same commit.
|
|
112
|
+
if (fieldErrors !== seenFieldErrors) {
|
|
113
|
+
setSeenFieldErrors(fieldErrors);
|
|
114
|
+
if (click && fieldErrors.slug || fieldErrors.capType || fieldErrors.capValue || fieldErrors.warningPercent) setAdvancedOpen(true);
|
|
115
|
+
}
|
|
111
116
|
const hint = metricSourceHint(source);
|
|
112
117
|
const options = metricSourceOptions(surface.metricSources);
|
|
113
118
|
const set = (key, value)=>setDraft((current)=>({
|
|
@@ -177,7 +182,7 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
177
182
|
if (cause instanceof GoalResponseError) setFieldErrors(Object.fromEntries(Object.entries(cause.fields).flatMap(([path, message])=>fieldNames[path] ? [
|
|
178
183
|
[
|
|
179
184
|
fieldNames[path],
|
|
180
|
-
path === 'slug' ? C.duplicateSlug : message
|
|
185
|
+
path === 'slug' ? click ? C.duplicateSlug : C.duplicateSlugMain : message
|
|
181
186
|
]
|
|
182
187
|
] : [])));
|
|
183
188
|
inFlight.current = false;
|
|
@@ -205,6 +210,7 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
205
210
|
setPending(null);
|
|
206
211
|
}
|
|
207
212
|
}
|
|
213
|
+
const usage = goal ? goalUsageRows(usageTests, goal.id) : [];
|
|
208
214
|
const title = goal?.name ?? (id === undefined ? C.newGoal : C.goal);
|
|
209
215
|
return /*#__PURE__*/ _jsx(SurfaceShell, {
|
|
210
216
|
adminRoute: surface.adminRoute,
|
|
@@ -247,6 +253,42 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
247
253
|
void submit();
|
|
248
254
|
},
|
|
249
255
|
children: [
|
|
256
|
+
usage.length ? /*#__PURE__*/ _jsxs(Card, {
|
|
257
|
+
className: "xp-goal-usage",
|
|
258
|
+
id: "xp-goal-usage",
|
|
259
|
+
children: [
|
|
260
|
+
/*#__PURE__*/ _jsx("h2", {
|
|
261
|
+
children: C.usedBy
|
|
262
|
+
}),
|
|
263
|
+
/*#__PURE__*/ _jsx("ul", {
|
|
264
|
+
children: visibleGoalUsage(usage, showAllUsage).map((test)=>/*#__PURE__*/ _jsxs("li", {
|
|
265
|
+
children: [
|
|
266
|
+
/*#__PURE__*/ _jsx("a", {
|
|
267
|
+
href: formatAdminURL({
|
|
268
|
+
adminRoute: surface.adminRoute,
|
|
269
|
+
path: `/experiments/${encodeURIComponent(String(test.id))}`
|
|
270
|
+
}),
|
|
271
|
+
children: test.name
|
|
272
|
+
}),
|
|
273
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
274
|
+
children: [
|
|
275
|
+
test.roles.join(' · '),
|
|
276
|
+
test.status ? ` · ${test.status}` : ''
|
|
277
|
+
]
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
}, test.id))
|
|
281
|
+
}),
|
|
282
|
+
usage.length > 5 ? /*#__PURE__*/ _jsx(Button, {
|
|
283
|
+
type: "button",
|
|
284
|
+
variant: "link",
|
|
285
|
+
"aria-expanded": showAllUsage,
|
|
286
|
+
"aria-controls": "xp-goal-usage",
|
|
287
|
+
onClick: ()=>setShowAllUsage((value)=>!value),
|
|
288
|
+
children: showAllUsage ? C.showLess : goalShowAll(usage.length)
|
|
289
|
+
}) : null
|
|
290
|
+
]
|
|
291
|
+
}) : null,
|
|
250
292
|
error ? /*#__PURE__*/ _jsx(Banner, {
|
|
251
293
|
tone: "error",
|
|
252
294
|
children: error
|
|
@@ -320,6 +362,10 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
320
362
|
...current,
|
|
321
363
|
slug: clickGoalSlug(draft.name) ? undefined : C.slugRule
|
|
322
364
|
}));
|
|
365
|
+
else if (sourceId === 'click:' !== click) setFieldErrors((current)=>({
|
|
366
|
+
...current,
|
|
367
|
+
slug: undefined
|
|
368
|
+
}));
|
|
323
369
|
},
|
|
324
370
|
children: [
|
|
325
371
|
/*#__PURE__*/ _jsx("option", {
|
|
@@ -375,7 +421,8 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
375
421
|
}),
|
|
376
422
|
/*#__PURE__*/ _jsxs("details", {
|
|
377
423
|
className: "xp-goal-advanced",
|
|
378
|
-
|
|
424
|
+
open: advancedOpen,
|
|
425
|
+
onToggle: (event)=>setAdvancedOpen(event.currentTarget.open),
|
|
379
426
|
children: [
|
|
380
427
|
/*#__PURE__*/ _jsx("summary", {
|
|
381
428
|
children: C.advanced
|
|
@@ -487,10 +534,17 @@ export function GoalForm({ surface, id, returnToTest }) {
|
|
|
487
534
|
})
|
|
488
535
|
]
|
|
489
536
|
}),
|
|
490
|
-
id !== undefined && usedBy ? /*#__PURE__*/
|
|
537
|
+
id !== undefined && usedBy ? /*#__PURE__*/ _jsxs("p", {
|
|
491
538
|
className: "xp-ui-help",
|
|
492
539
|
id: "xp-goal-used",
|
|
493
|
-
children:
|
|
540
|
+
children: [
|
|
541
|
+
goalDeleteLockedStart(usedBy),
|
|
542
|
+
/*#__PURE__*/ _jsx("a", {
|
|
543
|
+
href: "#xp-goal-usage",
|
|
544
|
+
children: C.thoseTests
|
|
545
|
+
}),
|
|
546
|
+
C.deleteLockedEnd
|
|
547
|
+
]
|
|
494
548
|
}) : null
|
|
495
549
|
]
|
|
496
550
|
})
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { surfaceUrls } from '
|
|
4
|
-
import { sourceFor } from '
|
|
3
|
+
import { surfaceUrls } from '../../../testSurface/surfaceUrls.js';
|
|
4
|
+
import { sourceFor } from '../../../testSurface/metricSource.model.js';
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
import { formatAdminURL } from 'payload/shared';
|
|
7
7
|
import { Banner, EmptyState } from '../../../ui/Feedback.js';
|
|
8
8
|
import { Button } from '../../../ui/Button.js';
|
|
9
9
|
import { SearchInput } from '../../../ui/Inputs.js';
|
|
10
10
|
import { SurfaceShell } from '../SurfaceShell.js';
|
|
11
|
-
import { SURFACE_COPY } from '
|
|
11
|
+
import { SURFACE_COPY } from '../../../testSurface/copy/surface.js';
|
|
12
12
|
import { GOALS_COPY as C, goalsNoMatches, goalUsedBy } from '../../copy/goals.js';
|
|
13
|
-
import { METRIC_KIND_LABELS } from '
|
|
13
|
+
import { METRIC_KIND_LABELS } from '../../../testSurface/copy/metrics.js';
|
|
14
14
|
import { goalUsage } from './goals.model.js';
|
|
15
15
|
import { goalPages } from './data.js';
|
|
16
16
|
import './goals.css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocsResponseError, fetchAllDocs } from '../../../lib/fetchAllDocs.js';
|
|
2
|
-
import { refusalMessage } from '
|
|
2
|
+
import { refusalMessage } from '../../../testSurface/copy/common.js';
|
|
3
3
|
import { GOALS_COPY as C } from '../../copy/goals.js';
|
|
4
|
-
import { payloadFieldErrors } from '
|
|
4
|
+
import { payloadFieldErrors } from '../../../testSurface/surface/testDocument.model.js';
|
|
5
5
|
export class GoalResponseError extends Error {
|
|
6
6
|
fields;
|
|
7
7
|
constructor(message, fields){
|
|
@@ -10,3 +10,10 @@
|
|
|
10
10
|
.xp-goal-advanced > summary { padding: var(--xp-space-4); cursor: pointer; font: var(--xp-text-body); }
|
|
11
11
|
.xp-goal-advanced > summary:focus-visible { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
|
|
12
12
|
.xp-goal-advanced-fields { display: grid; gap: var(--xp-space-4); padding: 0 var(--xp-space-4) var(--xp-space-4); }
|
|
13
|
+
|
|
14
|
+
.xp-goal-usage { display: grid; gap: var(--xp-space-3); }
|
|
15
|
+
.xp-goal-usage > h2, .xp-goal-usage > ul { margin: 0; }
|
|
16
|
+
.xp-goal-usage > h2 { font: var(--xp-text-title); }
|
|
17
|
+
.xp-goal-usage > ul { display: grid; gap: var(--xp-space-3); padding-inline-start: var(--xp-space-5); }
|
|
18
|
+
.xp-goal-usage li > span { display: block; color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
19
|
+
.xp-goal-usage > .xp-ui-button { justify-self: start; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DocId } from '../../../types/contracts.js';
|
|
1
|
+
import type { DocId, Status } from '../../../types/contracts.js';
|
|
2
2
|
export interface Goal {
|
|
3
3
|
id: DocId;
|
|
4
4
|
name: string;
|
|
@@ -18,6 +18,8 @@ type Reference = DocId | {
|
|
|
18
18
|
} | null;
|
|
19
19
|
export interface GoalUsageTest {
|
|
20
20
|
id: DocId;
|
|
21
|
+
name: string;
|
|
22
|
+
status?: Status | null;
|
|
21
23
|
metrics?: {
|
|
22
24
|
primary?: Reference;
|
|
23
25
|
secondary?: Reference[] | null;
|
|
@@ -27,3 +29,11 @@ export interface GoalUsageTest {
|
|
|
27
29
|
/** Count each experiment once per goal, retaining the API's id types. */
|
|
28
30
|
export declare function goalUsage(tests: readonly GoalUsageTest[]): Map<DocId, number>;
|
|
29
31
|
export { goalSlug } from '../../../goals/picker/clickGoalPicker.model.js';
|
|
32
|
+
/** One row per readable test returned by the API, retaining every role. */
|
|
33
|
+
export declare function goalUsageRows(tests: readonly GoalUsageTest[], goalId: DocId): {
|
|
34
|
+
id: DocId;
|
|
35
|
+
name: string;
|
|
36
|
+
roles: string[];
|
|
37
|
+
status?: string;
|
|
38
|
+
}[];
|
|
39
|
+
export declare function visibleGoalUsage<T>(rows: readonly T[], expanded: boolean): readonly T[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TEST_PAGE } from '../../../testSurface/copy/testPage.js';
|
|
2
|
+
import { statusLabel } from '../../../testSurface/labels.js';
|
|
1
3
|
/** Count each experiment once per goal, retaining the API's id types. */ export function goalUsage(tests) {
|
|
2
4
|
const byGoal = new Map();
|
|
3
5
|
for (const test of tests){
|
|
@@ -22,3 +24,44 @@
|
|
|
22
24
|
]));
|
|
23
25
|
}
|
|
24
26
|
export { goalSlug } from '../../../goals/picker/clickGoalPicker.model.js';
|
|
27
|
+
const referenceId = (reference)=>reference && typeof reference === 'object' ? reference.id : reference;
|
|
28
|
+
const usageLabels = {
|
|
29
|
+
primary: TEST_PAGE.goal,
|
|
30
|
+
guardrails: TEST_PAGE.guardrailsShort,
|
|
31
|
+
secondary: TEST_PAGE.secondaryShort
|
|
32
|
+
};
|
|
33
|
+
/** One row per readable test returned by the API, retaining every role. */ export function goalUsageRows(tests, goalId) {
|
|
34
|
+
const rows = new Map();
|
|
35
|
+
for (const test of tests){
|
|
36
|
+
const roles = [
|
|
37
|
+
...referenceId(test.metrics?.primary) === goalId ? [
|
|
38
|
+
usageLabels.primary
|
|
39
|
+
] : [],
|
|
40
|
+
...test.metrics?.guardrails?.some((reference)=>referenceId(reference) === goalId) ? [
|
|
41
|
+
usageLabels.guardrails
|
|
42
|
+
] : [],
|
|
43
|
+
...test.metrics?.secondary?.some((reference)=>referenceId(reference) === goalId) ? [
|
|
44
|
+
usageLabels.secondary
|
|
45
|
+
] : []
|
|
46
|
+
];
|
|
47
|
+
if (!roles.length) continue;
|
|
48
|
+
const previous = rows.get(test.id);
|
|
49
|
+
rows.set(test.id, {
|
|
50
|
+
id: test.id,
|
|
51
|
+
name: test.name,
|
|
52
|
+
roles: [
|
|
53
|
+
...new Set([
|
|
54
|
+
...previous?.roles ?? [],
|
|
55
|
+
...roles
|
|
56
|
+
])
|
|
57
|
+
],
|
|
58
|
+
status: test.status ? statusLabel(test.status) : undefined
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return [
|
|
62
|
+
...rows.values()
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
export function visibleGoalUsage(rows, expanded) {
|
|
66
|
+
return expanded ? rows : rows.slice(0, 5);
|
|
67
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Arm, DocId, ExperimentKind, Status, UnitType } from '../../types/contracts.js';
|
|
2
2
|
import type { SummaryResponse } from '../../types/endpoints.js';
|
|
3
|
-
import type { ReadinessContext } from '
|
|
3
|
+
import type { ReadinessContext } from '../../testSurface/surface/readiness/readiness.model.js';
|
|
4
4
|
export interface HomeTest {
|
|
5
5
|
id: DocId;
|
|
6
6
|
name: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { formatAdminURL } from 'payload/shared';
|
|
2
|
-
import { formatDate } from '
|
|
3
|
-
import { armLabel } from '
|
|
2
|
+
import { formatDate } from '../../testSurface/format/date.js';
|
|
3
|
+
import { armLabel } from '../../testSurface/labels.js';
|
|
4
4
|
import { statusPill } from '../status.model.js';
|
|
5
|
-
import { decidedLine, runningLine, SURFACE_COPY } from '
|
|
6
|
-
import { asymmetricGoalsCopy, nextCopy, READINESS_COPY } from '
|
|
7
|
-
import { READINESS } from '
|
|
5
|
+
import { decidedLine, runningLine, SURFACE_COPY } from '../../testSurface/copy/surface.js';
|
|
6
|
+
import { asymmetricGoalsCopy, nextCopy, READINESS_COPY } from '../../testSurface/copy/readiness.js';
|
|
7
|
+
import { READINESS } from '../../testSurface/surface/readiness/readiness.model.js';
|
|
8
8
|
import { sanitizeReadinessDetail } from '../../sanitizeReadinessDetail.js';
|
|
9
9
|
export function healthDot(test, summary) {
|
|
10
10
|
const code = summary?.verdict?.code;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TestsSurfaceProps } from '../../../types/surface.js';
|
|
2
|
-
import type { SurfaceProps } from '
|
|
2
|
+
import type { SurfaceProps } from '../../../testSurface/surface/contracts.js';
|
|
3
3
|
import './newTest.css';
|
|
4
4
|
export declare function NewTest({ surface, pages }: {
|
|
5
5
|
surface: SurfaceProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { surfaceUrls } from '
|
|
3
|
+
import { surfaceUrls } from '../../../testSurface/surfaceUrls.js';
|
|
4
4
|
import { fetchAllDocs } from '../../../lib/fetchAllDocs.js';
|
|
5
5
|
import { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useRouter } from 'next/navigation.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocId } from '../../../types/contracts.js';
|
|
2
|
-
import type { SurfaceProps } from '
|
|
2
|
+
import type { SurfaceProps } from '../../../testSurface/surface/contracts.js';
|
|
3
3
|
/** One session stays mounted across Collection, all page steps and Review. */
|
|
4
4
|
export declare function PageWizard({ id, surface }: {
|
|
5
5
|
id: DocId;
|
|
@@ -3,20 +3,20 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
import { useRouter } from 'next/navigation.js';
|
|
5
5
|
import { formatAdminURL } from 'payload/shared';
|
|
6
|
-
import { useTestDocument } from '
|
|
7
|
-
import { CopyRoute } from '
|
|
8
|
-
import { PageCombobox } from '
|
|
9
|
-
import { testPageCollection, controlFirst } from '
|
|
6
|
+
import { useTestDocument } from '../../../testSurface/surface/useTestDocument.js';
|
|
7
|
+
import { CopyRoute } from '../../../testSurface/surface/pagePicker/CopyRoute.js';
|
|
8
|
+
import { PageCombobox } from '../../../testSurface/surface/pagePicker/PageCombobox.js';
|
|
9
|
+
import { testPageCollection, controlFirst } from '../../../testSurface/surface/pagePicker/pagePicker.model.js';
|
|
10
10
|
import { NEW_TEST_COPY as C } from '../../copy/newTest.js';
|
|
11
|
-
import { READINESS_COPY } from '
|
|
12
|
-
import { TEST_PAGE } from '
|
|
13
|
-
import { SURFACE_COPY } from '
|
|
14
|
-
import { pageStepCopy } from '
|
|
15
|
-
import { READINESS, nextStep, pageReadinessContext, readinessArm } from '
|
|
16
|
-
import { FieldErrors } from '
|
|
17
|
-
import { SaveStatus } from '
|
|
18
|
-
import { createApi } from '
|
|
19
|
-
import { useTransition } from '
|
|
11
|
+
import { READINESS_COPY } from '../../../testSurface/copy/readiness.js';
|
|
12
|
+
import { TEST_PAGE } from '../../../testSurface/copy/testPage.js';
|
|
13
|
+
import { SURFACE_COPY } from '../../../testSurface/copy/surface.js';
|
|
14
|
+
import { pageStepCopy } from '../../../testSurface/copy/pages.js';
|
|
15
|
+
import { READINESS, nextStep, pageReadinessContext, readinessArm } from '../../../testSurface/surface/readiness/readiness.model.js';
|
|
16
|
+
import { FieldErrors } from '../../../testSurface/surface/test/fields.js';
|
|
17
|
+
import { SaveStatus } from '../../../testSurface/surface/readiness/SaveStatus.js';
|
|
18
|
+
import { createApi } from '../../../testSurface/api.js';
|
|
19
|
+
import { useTransition } from '../../../testSurface/surface/readiness/useTransition.js';
|
|
20
20
|
/** One session stays mounted across Collection, all page steps and Review. */ export function PageWizard({ id, surface }) {
|
|
21
21
|
const router = useRouter();
|
|
22
22
|
const collections = surface.pageCollections ?? [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ResultsResponse } from '../../../types/endpoints.js';
|
|
3
|
-
import type { SectionProps } from '
|
|
4
|
-
import type { ResultsPageParts } from '
|
|
3
|
+
import type { SectionProps } from '../../../testSurface/surface/contracts.js';
|
|
4
|
+
import type { ResultsPageParts } from '../../../testSurface/surface/results/ResultsBody.js';
|
|
5
5
|
export declare function ResultsHeader({ test, surface, resultsVersion, children, actions, released }: SectionProps & ResultsPageParts): import("react").JSX.Element;
|
|
6
6
|
export declare function ReaderResultsShell({ surface, children, data }: {
|
|
7
7
|
surface: SectionProps['surface'];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { surfaceUrls } from '
|
|
3
|
+
import { surfaceUrls } from '../../../testSurface/surfaceUrls.js';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
5
|
import { formatAdminURL } from 'payload/shared';
|
|
6
6
|
import { SurfaceShell } from '../SurfaceShell.js';
|
|
7
7
|
import { Button } from '../../../ui/Button.js';
|
|
8
8
|
import { Banner, StatusChip } from '../../../ui/Feedback.js';
|
|
9
|
-
import { createApi } from '
|
|
10
|
-
import { availableActions, actionGroupLabel } from '
|
|
11
|
-
import { AllocateAction, ConfirmAction } from '
|
|
12
|
-
import { READINESS, daysRemaining, displayDate, nextStep, pageReadinessContext } from '
|
|
13
|
-
import { READINESS_COPY as R, runningCopy, stoppedCopy, decidedCopy } from '
|
|
14
|
-
import { RESULTS_COPY as C } from '
|
|
15
|
-
import { TEST_PAGE } from '
|
|
9
|
+
import { createApi } from '../../../testSurface/api.js';
|
|
10
|
+
import { availableActions, actionGroupLabel } from '../../../testSurface/actions/actions.model.js';
|
|
11
|
+
import { AllocateAction, ConfirmAction } from '../../../testSurface/surface/readiness/ActionDialogs.js';
|
|
12
|
+
import { READINESS, daysRemaining, displayDate, nextStep, pageReadinessContext } from '../../../testSurface/surface/readiness/readiness.model.js';
|
|
13
|
+
import { READINESS_COPY as R, runningCopy, stoppedCopy, decidedCopy } from '../../../testSurface/copy/readiness.js';
|
|
14
|
+
import { RESULTS_COPY as C } from '../../../testSurface/copy/results.js';
|
|
15
|
+
import { TEST_PAGE } from '../../../testSurface/copy/testPage.js';
|
|
16
16
|
export function ResultsHeader({ test, surface, resultsVersion, children, actions, released }) {
|
|
17
17
|
const doc = test.doc;
|
|
18
18
|
const [selected, setSelected] = useState(null);
|
|
@@ -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;
|