@delmaredigital/payload-experiments 0.4.0-rc.3 → 0.4.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +5 -1
- package/dist/admin/copy/goals.js +9 -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 +6 -13
- 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 +55 -7
- 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 +23 -25
- package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
- package/dist/admin/surface/results/ResultsHeader.js +22 -15
- 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/fairness.d.ts +1 -1
- package/dist/goals/fairness.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 +4 -2
- package/dist/goals/picker/copy.js +4 -2
- package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
- package/dist/goals/picker/useClickGoalPicker.js +4 -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/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 +73 -9
- package/dist/puck/editor/EditorControls.d.ts +14 -0
- package/dist/puck/editor/EditorControls.js +99 -0
- package/dist/puck/editor/ExperimentSlotEditor.js +690 -79
- package/dist/puck/editor/LeftoverVersions.d.ts +13 -0
- package/dist/puck/editor/LeftoverVersions.js +115 -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 +3 -0
- package/dist/puck/editor/QuickTestActions.js +50 -0
- package/dist/puck/editor/ResultsReadout.js +8 -5
- package/dist/puck/editor/VersionBuilder.d.ts +20 -6
- package/dist/puck/editor/VersionBuilder.js +80 -50
- package/dist/puck/editor/armWrites.d.ts +3 -1
- package/dist/puck/editor/armWrites.js +2 -1
- package/dist/puck/editor/armsCache.d.ts +3 -1
- package/dist/puck/editor/armsCache.js +20 -3
- package/dist/puck/editor/cloneSlot.d.ts +2 -0
- package/dist/puck/editor/cloneSlot.js +7 -0
- package/dist/puck/editor/copy.d.ts +42 -5
- package/dist/puck/editor/copy.js +43 -6
- package/dist/puck/editor/editor.chrome.css +44 -0
- package/dist/puck/editor/editor.css +68 -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/experimentOutlinePlugin.js +96 -28
- package/dist/puck/editor/localPlacements.d.ts +2 -0
- package/dist/puck/editor/localPlacements.js +29 -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 +50 -0
- package/dist/puck/editor/placementsCache.js +258 -0
- package/dist/puck/editor/sidebar.d.ts +12 -0
- package/dist/puck/editor/sidebar.js +77 -0
- package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
- package/dist/puck/editor/usePlacementNotice.js +14 -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 +5 -6
- package/dist/{admin → testSurface}/copy/common.d.ts +3 -1
- package/dist/{admin → testSurface}/copy/common.js +5 -1
- package/dist/{admin → testSurface}/copy/readiness.d.ts +20 -1
- package/dist/{admin → testSurface}/copy/readiness.js +25 -1
- package/dist/{admin → testSurface}/copy/testPage.d.ts +4 -0
- package/dist/{admin → testSurface}/copy/testPage.js +8 -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/readPreflight.d.ts +9 -0
- package/dist/testSurface/readPreflight.js +38 -0
- package/dist/testSurface/readinessRead.d.ts +50 -0
- package/dist/testSurface/readinessRead.js +46 -0
- package/dist/testSurface/results/results.css +64 -0
- package/dist/{admin → testSurface}/surface/contracts.d.ts +7 -2
- package/dist/testSurface/surface/editorPlacement.d.ts +21 -0
- package/dist/testSurface/surface/editorPlacement.js +60 -0
- package/dist/{admin → testSurface}/surface/pageBlock/parts.js +19 -9
- package/dist/testSurface/surface/pagePicker/pagePicker.css +10 -0
- package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.js +37 -7
- package/dist/testSurface/surface/readiness/Banner.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.js +106 -68
- 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 +9 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +66 -0
- package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
- package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +13 -0
- package/dist/{admin → testSurface}/surface/readiness/readiness.model.js +51 -36
- package/dist/{admin → testSurface}/surface/readiness/useTransition.d.ts +5 -2
- package/dist/testSurface/surface/readiness/useTransition.js +98 -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/{admin → testSurface}/surface/test/AdvancedSection.js +1 -0
- package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
- package/dist/{admin → testSurface}/surface/test/GoalSection.js +4 -2
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +2 -1
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +1 -2
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +80 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +5 -0
- package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
- package/dist/testSurface/surface/test/TestSurface.js +213 -0
- package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
- package/dist/{admin → testSurface}/surface/test/VersionsSection.js +13 -6
- package/dist/testSurface/surface/test/testPage.css +104 -0
- package/dist/{admin → testSurface}/surface/useTestDocument.d.ts +9 -2
- package/dist/{admin → testSurface}/surface/useTestDocument.js +92 -46
- package/dist/{admin → testSurface}/surfaceUrls.js +1 -1
- package/dist/testSurface/useReadinessPolling.d.ts +3 -0
- package/dist/testSurface/useReadinessPolling.js +24 -0
- 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/preflightData.js +1 -1
- package/dist/transitions/start.js +2 -2
- package/dist/types/endpoints.d.ts +1 -1
- package/dist/ui/Card.d.ts +2 -1
- package/dist/ui/Card.js +4 -4
- 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 +4 -3
- package/dist/ui/Tabs.js +47 -32
- package/dist/ui/ui.css +24 -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/readiness/Banner.d.ts +0 -5
- package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
- package/dist/admin/surface/readiness/SaveStatus.js +0 -53
- 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 -48
- 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/parts.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/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/ReadinessBar.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +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,53 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
4
|
-
import { Button } from '../../../ui/Button.js';
|
|
5
|
-
import { READINESS_COPY as C } from '../../copy/readiness.js';
|
|
6
|
-
export function saveStatusMessage(test) {
|
|
7
|
-
return test.saving === 'saving' ? C.saving : test.saving === 'saved' || test.saving === 'idle' ? C.saved : test.saving === 'error' && !test.stale ? C.saveError : null;
|
|
8
|
-
}
|
|
9
|
-
export function SaveStatus({ test }) {
|
|
10
|
-
const inFlight = useRef(false);
|
|
11
|
-
const [retrying, setRetrying] = useState(false);
|
|
12
|
-
async function retry() {
|
|
13
|
-
if (inFlight.current || test.preflightPending || test.hasUnsaved || test.saving === 'saving') return;
|
|
14
|
-
inFlight.current = true;
|
|
15
|
-
setRetrying(true);
|
|
16
|
-
try {
|
|
17
|
-
await test.refreshPreflight();
|
|
18
|
-
} finally{
|
|
19
|
-
inFlight.current = false;
|
|
20
|
-
setRetrying(false);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const message = saveStatusMessage(test);
|
|
24
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
25
|
-
className: "xp-save-status",
|
|
26
|
-
"aria-live": "polite",
|
|
27
|
-
children: [
|
|
28
|
-
message ? /*#__PURE__*/ _jsx("span", {
|
|
29
|
-
role: test.saving === 'error' ? 'alert' : 'status',
|
|
30
|
-
children: message
|
|
31
|
-
}) : null,
|
|
32
|
-
test.preflightError ? /*#__PURE__*/ _jsxs("div", {
|
|
33
|
-
children: [
|
|
34
|
-
/*#__PURE__*/ _jsx("span", {
|
|
35
|
-
role: "alert",
|
|
36
|
-
children: test.preflightError
|
|
37
|
-
}),
|
|
38
|
-
' ',
|
|
39
|
-
/*#__PURE__*/ _jsx("span", {
|
|
40
|
-
title: test.hasUnsaved || test.saving === 'saving' ? C.saveFirst : undefined,
|
|
41
|
-
children: /*#__PURE__*/ _jsx(Button, {
|
|
42
|
-
disabled: retrying || test.preflightPending || test.hasUnsaved || test.saving === 'saving',
|
|
43
|
-
onClick: ()=>{
|
|
44
|
-
void retry();
|
|
45
|
-
},
|
|
46
|
-
children: C.retry
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
}) : null
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useRef, useState } from 'react';
|
|
3
|
-
import { API_MESSAGES } from '../../copy/common.js';
|
|
4
|
-
/** The ref closes the gap before React renders the disabled button. */ export function useTransition(test, onSuccess) {
|
|
5
|
-
const inFlight = useRef(false);
|
|
6
|
-
const [busy, setBusy] = useState(false);
|
|
7
|
-
const [error, setError] = useState(null);
|
|
8
|
-
async function run(request, { reloadOnSuccess = true } = {}) {
|
|
9
|
-
if (inFlight.current || test.hasUnsaved || test.saving === 'saving') return;
|
|
10
|
-
inFlight.current = true;
|
|
11
|
-
setBusy(true);
|
|
12
|
-
setError(null);
|
|
13
|
-
try {
|
|
14
|
-
const result = await request();
|
|
15
|
-
if (result.ok) {
|
|
16
|
-
if (reloadOnSuccess) {
|
|
17
|
-
await test.reload();
|
|
18
|
-
onSuccess?.();
|
|
19
|
-
// Keep the successful action locked until the reloaded document replaces this view.
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
} else setError(result.message);
|
|
23
|
-
} catch {
|
|
24
|
-
setError(API_MESSAGES.network);
|
|
25
|
-
}
|
|
26
|
-
inFlight.current = false;
|
|
27
|
-
setBusy(false);
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
busy,
|
|
31
|
-
error,
|
|
32
|
-
run,
|
|
33
|
-
clearError: ()=>setError(null)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.xp-setting-values { display: grid; gap: var(--xp-space-3); }
|
|
2
|
-
.xp-setting-value { white-space: pre-wrap; }
|
|
3
|
-
.xp-setting-lock { color: var(--xp-text-muted); }
|
|
4
|
-
.xp-setting-parameter fieldset { border: 0; padding: 0; margin: 0; }
|
|
5
|
-
.xp-setting-segments { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
|
|
6
|
-
.xp-setting-segments label { position: relative; }
|
|
7
|
-
.xp-setting-segments input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
|
|
8
|
-
.xp-setting-segments span {
|
|
9
|
-
display: block;
|
|
10
|
-
padding: 0.5rem 0.8rem;
|
|
11
|
-
border: 1px solid var(--xp-border);
|
|
12
|
-
border-radius: var(--xp-radius);
|
|
13
|
-
background: var(--xp-input-bg);
|
|
14
|
-
color: var(--xp-text);
|
|
15
|
-
}
|
|
16
|
-
.xp-setting-segments input:checked + span { background: var(--xp-accent-subtle); border-color: var(--xp-accent); }
|
|
17
|
-
.xp-setting-segments input:focus-visible + span { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { readinessParts } from '../readiness/parts.js';
|
|
5
|
-
import { SectionCard } from '../../../ui/SectionCard.js';
|
|
6
|
-
import { SECTION_ORDER } from '../contracts.js';
|
|
7
|
-
import { TEST_PAGE as C } from '../../copy/testPage.js';
|
|
8
|
-
export function Section({ test, sectionId, children }) {
|
|
9
|
-
const hasAdvancedError = Object.keys(test.errors).some((path)=>path.startsWith('analysis.') && ![
|
|
10
|
-
'analysis.reachPerDay',
|
|
11
|
-
'analysis.plannedDurationDays'
|
|
12
|
-
].includes(path) || path === 'exposurePolicy');
|
|
13
|
-
const [open, setOpen] = useState(hasAdvancedError);
|
|
14
|
-
const [prevHasAdvancedError, setPrevHasAdvancedError] = useState(hasAdvancedError);
|
|
15
|
-
if (hasAdvancedError !== prevHasAdvancedError) {
|
|
16
|
-
setPrevHasAdvancedError(hasAdvancedError);
|
|
17
|
-
if (hasAdvancedError) setOpen(true);
|
|
18
|
-
}
|
|
19
|
-
const done = readinessParts.sectionDone(test)[sectionId];
|
|
20
|
-
if (sectionId === 'advanced') return /*#__PURE__*/ _jsxs("details", {
|
|
21
|
-
open: open,
|
|
22
|
-
onToggle: (event)=>setOpen(event.currentTarget.open),
|
|
23
|
-
className: "xp-test-advanced",
|
|
24
|
-
id: "section-advanced",
|
|
25
|
-
children: [
|
|
26
|
-
/*#__PURE__*/ _jsx("summary", {
|
|
27
|
-
children: /*#__PURE__*/ _jsx("h2", {
|
|
28
|
-
id: "title-advanced",
|
|
29
|
-
tabIndex: -1,
|
|
30
|
-
children: C.sections.advanced
|
|
31
|
-
})
|
|
32
|
-
}),
|
|
33
|
-
/*#__PURE__*/ _jsx("div", {
|
|
34
|
-
className: "xp-ui-section-body",
|
|
35
|
-
children: children
|
|
36
|
-
})
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
return /*#__PURE__*/ _jsx(SectionCard, {
|
|
40
|
-
number: SECTION_ORDER.indexOf(sectionId) + 1,
|
|
41
|
-
title: C.sections[sectionId],
|
|
42
|
-
complete: done,
|
|
43
|
-
id: `section-${sectionId}`,
|
|
44
|
-
headingId: `title-${sectionId}`,
|
|
45
|
-
className: "xp-test-section",
|
|
46
|
-
children: children
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
.xp-test-page { color: var(--xp-text); background: var(--xp-bg); max-width: 90rem; margin: 0 auto; padding: 1.5rem; }
|
|
2
|
-
.xp-test-page--setup { min-width: 0; padding: 0 0 160px; }
|
|
3
|
-
.xp-test-header { position: sticky; top: 0; z-index: 10; background: var(--xp-bg); padding: 1rem 0; border-bottom: 1px solid var(--xp-border); }
|
|
4
|
-
.xp-header-meta, .xp-section-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-block: 1rem; }
|
|
5
|
-
.xp-kind-chip, .xp-status-pill { border: 1px solid var(--xp-border-strong); border-radius: 1rem; padding: .25rem .75rem; }
|
|
6
|
-
.xp-status-pill--success, .xp-content-ready, .xp-section-check--done { color: var(--xp-success-text); }
|
|
7
|
-
.xp-content-empty, .xp-status-pill--warning { color: var(--xp-warning-text); }
|
|
8
|
-
.xp-test-section, .xp-test-advanced { scroll-margin-top: var(--xp-space-6); }
|
|
9
|
-
.xp-version-rows { display: grid; grid-template-columns: minmax(0, 1.3fr) var(--xp-version-share-width) minmax(var(--xp-version-state-width), 1fr) var(--xp-version-remove-width); gap: var(--xp-space-3); align-items: center; }
|
|
10
|
-
.xp-version-row, .xp-version-grid-head { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; gap: var(--xp-space-3); align-items: center; }
|
|
11
|
-
.xp-version-grid-head { margin-bottom: var(--xp-space-2); font: var(--xp-text-small); color: var(--xp-text-2); }
|
|
12
|
-
.xp-version-row > .xp-field-error, .xp-version-row > [role=alert] { grid-column: 1 / -1; }
|
|
13
|
-
.xp-version-remove { grid-column: 4; }
|
|
14
|
-
.xp-grid-field .xp-ui-field { margin: 0; }
|
|
15
|
-
.xp-grid-field .xp-ui-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
16
|
-
.xp-version-content { display: flex; flex-wrap: nowrap; gap: var(--xp-space-2); align-items: center; min-width: 0; }
|
|
17
|
-
.xp-version-content .xp-ui-button { white-space: nowrap; }
|
|
18
|
-
.xp-version-content--page { flex-direction: column; align-items: stretch; gap: var(--xp-space-3); }
|
|
19
|
-
.xp-copy-route ol { list-style: decimal; padding-inline-start: var(--xp-space-6); }
|
|
20
|
-
.xp-content-chip { flex-shrink: 0; display: inline-flex; width: fit-content; border-radius: var(--xp-radius-chip); padding: var(--xp-space-half) var(--xp-space-2); font: var(--xp-text-small); background: var(--xp-surface-2); color: var(--xp-text-2); }
|
|
21
|
-
.xp-content-chip.xp-content-ready { background: var(--xp-success-bg); color: var(--xp-success); }
|
|
22
|
-
.xp-content-chip.xp-content-empty { background: var(--xp-warning-bg); color: var(--xp-warning); }
|
|
23
|
-
.xp-traffic-bar { display: flex; height: var(--xp-space-2); gap: var(--xp-space-half); margin-block: var(--xp-space-5) var(--xp-space-3); overflow: hidden; border-radius: var(--xp-space-1); }
|
|
24
|
-
.xp-traffic-bar > span { display: block; }
|
|
25
|
-
.xp-split-legend { display: flex; flex-wrap: wrap; gap: var(--xp-space-4); font: var(--xp-text-small); color: var(--xp-text-2); }
|
|
26
|
-
.xp-split-legend i { display: inline-block; width: var(--xp-legend-key-size); height: var(--xp-legend-key-size); border-radius: var(--xp-legend-key-radius); margin-right: var(--xp-space-one-half); }
|
|
27
|
-
.xp-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--xp-space-4); }
|
|
28
|
-
.xp-test-advanced .xp-field-grid { padding-top: var(--xp-space-4); }
|
|
29
|
-
.xp-field-grid > div { min-width: 0; }
|
|
30
|
-
.xp-field-grid p, .xp-page-binding p { color: var(--xp-text-2); font: var(--xp-text-small); }
|
|
31
|
-
.xp-read-only code { font-family: var(--xp-mono); overflow-wrap: anywhere; }
|
|
32
|
-
.xp-ui-checkbox-list { display: flex; flex-wrap: wrap; gap: var(--xp-space-2) var(--xp-space-4); }
|
|
33
|
-
.xp-duration-suggestion { align-items: center; margin-top: var(--xp-space-4); }
|
|
34
|
-
.xp-read-only { padding-block: .5rem; }
|
|
35
|
-
.xp-read-only p { margin-block: .5rem; }
|
|
36
|
-
.xp-field-error { color: var(--xp-error-text); }
|
|
37
|
-
|
|
38
|
-
.xp-targeting-row { display: grid; grid-template-columns: var(--xp-targeting-attribute-width) var(--xp-targeting-comparison-width) minmax(0, 1fr); align-items: start; gap: var(--xp-space-3); border: 1px solid var(--xp-border); border-radius: var(--xp-radius-control); padding: var(--xp-space-4); margin-bottom: var(--xp-space-4); }
|
|
39
|
-
.xp-targeting-row > .xp-ui-button-group, .xp-targeting-row > p { grid-column: 1 / -1; }
|
|
40
|
-
@media (max-width: 720px) {
|
|
41
|
-
.xp-version-rows { grid-template-columns: minmax(0, 1fr) var(--xp-version-share-width-mobile); }
|
|
42
|
-
.xp-version-content { flex-wrap: wrap; }
|
|
43
|
-
.xp-version-remove:empty { display: none; }
|
|
44
|
-
.xp-version-content, .xp-setting-values, .xp-version-remove { grid-column: 1 / -1; }
|
|
45
|
-
.xp-version-grid-head > :nth-child(n+3) { display: none; }
|
|
46
|
-
.xp-targeting-row, .xp-field-grid { grid-template-columns: 1fr; }
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.xp-test-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: var(--xp-space-8); }
|
|
50
|
-
.xp-test-content { display: grid; gap: var(--xp-space-8); min-width: 0; max-width: 760px; }
|
|
51
|
-
.xp-test-rail { position: sticky; top: var(--xp-space-6); min-width: 0; }
|
|
52
|
-
.xp-test-rail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--xp-space-1); }
|
|
53
|
-
.xp-test-rail-item { display: flex; align-items: center; gap: var(--xp-space-2); padding: var(--xp-space-2); border-radius: var(--xp-radius-control); color: var(--xp-text-2); text-decoration: none; font: var(--xp-text-small); }
|
|
54
|
-
.xp-test-rail-item:hover, .xp-test-rail-item.is-active { background: var(--xp-surface-2); color: var(--xp-text); }
|
|
55
|
-
.xp-test-rail-item.is-active { font-weight: 600; }
|
|
56
|
-
.xp-test-rail-item--advanced { margin-top: var(--xp-space-3); color: var(--xp-text-3); }
|
|
57
|
-
.xp-test-rail-mark { flex: none; color: var(--xp-text-3); }
|
|
58
|
-
.xp-test-rail-mark--done { color: var(--xp-success); }
|
|
59
|
-
.xp-test-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
60
|
-
.xp-test-rail-item:focus-visible, .xp-test-advanced > summary:focus-visible, .xp-test-content h2:focus { outline: 2px solid var(--xp-focus); outline-offset: 2px; }
|
|
61
|
-
.xp-test-advanced { border: 1px solid var(--xp-border); border-radius: var(--xp-radius-card); background: var(--xp-surface); }
|
|
62
|
-
.xp-test-advanced > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--xp-space-3); padding: var(--xp-space-4) var(--xp-space-5); color: var(--xp-text-2); }
|
|
63
|
-
.xp-test-advanced > summary h2 { margin: 0; font: var(--xp-text-body); }
|
|
64
|
-
.xp-test-advanced[open] > summary { border-bottom: 1px solid var(--xp-border); }
|
|
65
|
-
.xp-test-readiness-bar { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; background: var(--xp-surface); border-top: 1px solid var(--xp-border); }
|
|
66
|
-
.xp-readiness { color: var(--xp-text); background: var(--xp-surface); padding: var(--xp-space-4); border: 1px solid var(--xp-border-strong); border-radius: var(--xp-radius-control); }
|
|
67
|
-
.xp-readiness--ready:not(.xp-readiness--bar) { background: var(--xp-success-bg); }
|
|
68
|
-
.xp-readiness--bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--xp-space-2) var(--xp-space-4); padding-block: var(--xp-space-3); min-height: 64px; border: 0; border-radius: 0; }
|
|
69
|
-
.xp-readiness__state { display: flex; align-items: center; flex-wrap: wrap; gap: var(--xp-space-2); min-width: 0; }
|
|
70
|
-
.xp-readiness__state p, .xp-readiness--bar > p { margin: 0; }
|
|
71
|
-
.xp-readiness__state > p { font-weight: 500; white-space: pre-line; }
|
|
72
|
-
.xp-readiness--bar .xp-save-status, .xp-readiness__separator { color: var(--xp-text-3); font: var(--xp-text-small); }
|
|
73
|
-
.xp-readiness__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--xp-space-2); }
|
|
74
|
-
.xp-readiness--bar > .xp-readiness__actions { grid-column: 2; grid-row: 1 / span 3; justify-content: flex-end; }
|
|
75
|
-
@media (max-width: 960px) {
|
|
76
|
-
.xp-test-layout { grid-template-columns: minmax(0, 1fr); gap: var(--xp-space-5); }
|
|
77
|
-
.xp-test-rail { top: 0; z-index: 2; background: var(--xp-bg); padding-block: var(--xp-space-2); border-bottom: 1px solid var(--xp-border); }
|
|
78
|
-
.xp-test-rail-list { flex-direction: row; overflow-x: auto; }
|
|
79
|
-
.xp-test-rail-item { white-space: nowrap; }
|
|
80
|
-
.xp-test-rail-item--advanced { margin-top: 0; }
|
|
81
|
-
.xp-test-content { max-width: none; }
|
|
82
|
-
.xp-test-section, .xp-test-advanced { scroll-margin-top: 64px; }
|
|
83
|
-
}
|
|
84
|
-
@media (max-width: 720px) {
|
|
85
|
-
.xp-readiness--bar { grid-template-columns: minmax(0, 1fr); }
|
|
86
|
-
/* The sentence wraps under the save state here, so a trailing separator would dangle. */
|
|
87
|
-
.xp-readiness--bar .xp-readiness__separator { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
88
|
-
.xp-readiness--bar > .xp-readiness__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.xp-ui-checkbox-list > .xp-ui-field:has(input[type="search"]) { flex-basis: 100%; }
|
|
92
|
-
.xp-targeting-row .xp-ui-chips { margin-block: 0; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|