@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
|
@@ -1,20 +1,33 @@
|
|
|
1
|
+
import { API_MESSAGES } from '../../testSurface/copy/common.js';
|
|
1
2
|
export const BLOCK_COPY = {
|
|
2
3
|
testBlock: 'Test a block on this page',
|
|
3
4
|
pick: 'Choose a block',
|
|
4
|
-
empty: 'There are no blocks
|
|
5
|
+
empty: 'There are no saved blocks to test yet.',
|
|
5
6
|
blockChanged: 'This block changed while you were working. Nothing was replaced. Try again.',
|
|
6
7
|
replace: 'Replace',
|
|
8
|
+
replaceVersion: 'Replace a version in',
|
|
7
9
|
cancel: 'Cancel',
|
|
8
10
|
retry: 'Try again',
|
|
9
|
-
saveFirst: 'Save your changes
|
|
11
|
+
saveFirst: 'Save your changes to test this block.',
|
|
10
12
|
setup: 'Set up the test',
|
|
11
13
|
copy: 'Copy the Original into this version',
|
|
12
|
-
confirmCopy:
|
|
14
|
+
confirmCopy: "Replace this version's content with a copy of the Original? Edits you made to this version will be lost.",
|
|
13
15
|
unwrap: 'Unwrap',
|
|
16
|
+
removeAndUnwrap: 'Remove the test and unwrap',
|
|
17
|
+
deleteAndUnwrap: 'Delete and unwrap',
|
|
18
|
+
alreadyDeleted: API_MESSAGES.testAlreadyDeleted,
|
|
19
|
+
noLongerDraft: API_MESSAGES.testNoLongerDraft,
|
|
20
|
+
finishUnwrap: 'The test was removed; use Unwrap to finish.',
|
|
14
21
|
deleted: "This block's test was deleted; the page shows the Original.",
|
|
15
|
-
discarded: '
|
|
22
|
+
discarded: 'Winner discarded: this block shows the Original. Use Unwrap to replace it with the Original content.',
|
|
23
|
+
neverDecided: 'Archived without a winner: this block shows the Original. Use Unwrap to replace it with the Original content.',
|
|
16
24
|
running: "Running: visitors see different versions. Edit a version's tab to change it; the change is noted on the results.",
|
|
17
25
|
stopped: 'Stopped: visitors see the Original.',
|
|
26
|
+
archivedReplaceWhy: 'To keep the winner on this page without the test, replace the Test block.',
|
|
27
|
+
archivedReplaceSteps: [
|
|
28
|
+
'Copy the winning content into ordinary page blocks.',
|
|
29
|
+
'Remove the Test block.'
|
|
30
|
+
],
|
|
18
31
|
slotLabels: {
|
|
19
32
|
control: 'Original',
|
|
20
33
|
variantA: 'Variant A',
|
|
@@ -22,7 +35,7 @@ export const BLOCK_COPY = {
|
|
|
22
35
|
variantC: 'Variant C'
|
|
23
36
|
},
|
|
24
37
|
wrapRefusals: {
|
|
25
|
-
'wrap-target-missing': 'Reload
|
|
38
|
+
'wrap-target-missing': 'Reload to see the current page.',
|
|
26
39
|
'locked-placement': 'Another editor has this page open. Try again when it is unlocked.',
|
|
27
40
|
'invalid-status': 'This action is not available in the current status.',
|
|
28
41
|
'unknown-collection': "That page type isn't set up for tests.",
|
|
@@ -33,6 +46,27 @@ export const blockPosition = (label, position)=>`${label} (block ${position})`;
|
|
|
33
46
|
export const blockTestName = (title, label)=>`${title}: ${label}`;
|
|
34
47
|
export const blockDraftStatus = (name)=>`This block is being tested in the draft test ${name}. Visitors see the Original until it starts.`;
|
|
35
48
|
export const blockDecidedStatus = (winner, rollout)=>`Decided: visitors see ${winner}${rollout ? '; a holdout still sees the Original' : ''}.`;
|
|
36
|
-
export const
|
|
49
|
+
export const blockRunningUnwrap = {
|
|
50
|
+
before: 'Stop ',
|
|
51
|
+
link: 'the test',
|
|
52
|
+
after: ' to unwrap.'
|
|
53
|
+
};
|
|
54
|
+
export const blockDecidedUnwrap = {
|
|
55
|
+
before: 'To put the winner into this page, use "Make it the content" on ',
|
|
56
|
+
link: 'the test',
|
|
57
|
+
after: '.'
|
|
58
|
+
};
|
|
59
|
+
export const blockFinishedCopy = (winner, originalWon = false, emptyWinner = false)=>({
|
|
60
|
+
before: emptyWinner ? 'Archived: the winner has no content here, so visitors see the Original. Unwrap leaves the page as visitors see it now. View the results on ' : originalWon ? `Archived: the Original won. This block shows ${winner}. Use Unwrap to keep its content without the Test block. View the results on ` : `Archived: this block keeps serving ${winner}, with the Original as a fallback if it is empty. View the results on `,
|
|
61
|
+
link: 'the test',
|
|
62
|
+
after: '.'
|
|
63
|
+
});
|
|
64
|
+
export const blockFinishedStatus = (winner, originalWon = false)=>{
|
|
65
|
+
const copy = blockFinishedCopy(winner, originalWon);
|
|
66
|
+
return copy.before + copy.link + copy.after;
|
|
67
|
+
};
|
|
68
|
+
export const blockDeleteConfirmation = (name)=>`Delete the draft test ${name} and put the Original back in its place? Deleting the test can't be undone.`;
|
|
69
|
+
export const blockUnwrapConfirmation = (name)=>`The Original replaces this block when you save the page. The test ${name} and its results are kept.`;
|
|
70
|
+
export const blockUnwrapNotice = (drafts, deleted)=>`${deleted ? 'The draft test was deleted and the block unwrapped.' : 'The block was unwrapped.'} ${drafts ? 'Save draft' : 'Save'} to keep it.`;
|
|
37
71
|
export const blockSaveNotice = (drafts)=>drafts ? 'Save a draft of this page to add the test.' : 'Save this page to add the test.';
|
|
38
72
|
export const blockSyncNotice = (drafts)=>drafts ? 'Versions were updated to match the test. Save draft to keep them.' : 'Versions were updated to match the test. Save to keep them.';
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
export declare const GOALS_COPY: {
|
|
2
2
|
readonly slugRule: "Use 1–64 lowercase letters, numbers, underscores or hyphens, starting with a letter or number.";
|
|
3
3
|
readonly duplicateSlug: "Another goal already uses this short name. Change it under Advanced.";
|
|
4
|
+
readonly duplicateSlugMain: "Another goal already uses this short name. Choose another.";
|
|
4
5
|
readonly title: "Goals";
|
|
5
6
|
readonly goal: "Goal";
|
|
6
7
|
readonly newGoal: "New goal";
|
|
7
8
|
readonly name: "Name";
|
|
8
9
|
readonly source: "Measured by";
|
|
9
10
|
readonly directionColumn: "Better when";
|
|
11
|
+
readonly nameRequired: "Enter a name for this goal.";
|
|
10
12
|
readonly direction: "Better when it goes";
|
|
11
13
|
readonly increase: "More is better";
|
|
12
14
|
readonly decrease: "Less is better";
|
|
13
15
|
readonly usedBy: "Used by";
|
|
14
16
|
readonly status: "Status";
|
|
17
|
+
readonly showLess: "Show less";
|
|
15
18
|
readonly inUse: "In use";
|
|
16
19
|
readonly unused: "Not used yet";
|
|
17
20
|
readonly empty: "No goals yet. A goal is what a test tries to improve.";
|
|
@@ -23,18 +26,19 @@ export declare const GOALS_COPY: {
|
|
|
23
26
|
readonly slugLocked: "The short name stays the same once a test uses this goal.";
|
|
24
27
|
readonly sourceLocked: "What this goal measures stays the same once a test uses it.";
|
|
25
28
|
readonly chooseSource: "Choose an outcome";
|
|
26
|
-
readonly window: "Count results for (
|
|
29
|
+
readonly window: "Count results for (days)";
|
|
30
|
+
readonly windowError: "Enter a whole number of days, at least 1.";
|
|
27
31
|
readonly minimum: "Minimum completions before deciding";
|
|
32
|
+
readonly minimumError: "Enter a number of at least 1.";
|
|
28
33
|
readonly advanced: "Advanced";
|
|
29
34
|
readonly capping: "Limit very large values";
|
|
30
35
|
readonly capType: "Limit by";
|
|
31
|
-
readonly capValue: "
|
|
32
|
-
readonly noCap: "
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly capHelp: "For past amounts, enter a number such as 0.99 to limit only the largest 1%; or enter a fixed amount.";
|
|
36
|
+
readonly capValue: "Fixed amount";
|
|
37
|
+
readonly noCap: "Don't limit";
|
|
38
|
+
readonly absolute: "Limit to a fixed amount";
|
|
39
|
+
readonly fixedAmountError: "Enter an amount of zero or more.";
|
|
36
40
|
readonly threshold: "Warn when it gets worse by (%)";
|
|
37
|
-
readonly
|
|
41
|
+
readonly createGoal: "Create goal";
|
|
38
42
|
readonly saving: "Saving…";
|
|
39
43
|
readonly cancel: "Cancel";
|
|
40
44
|
readonly remove: "Delete goal";
|
|
@@ -47,15 +51,23 @@ export declare const GOALS_COPY: {
|
|
|
47
51
|
readonly notFound: "This goal no longer exists.";
|
|
48
52
|
readonly backToTest: "Back to the test";
|
|
49
53
|
readonly useGoal: "Use this goal";
|
|
50
|
-
readonly open: "Open";
|
|
51
54
|
readonly search: "Search goals";
|
|
52
55
|
readonly clearSearch: "Clear search";
|
|
56
|
+
readonly roles: {
|
|
57
|
+
readonly primary: "Main goal";
|
|
58
|
+
readonly secondary: "Also tracked";
|
|
59
|
+
readonly guardrails: "Must not get worse";
|
|
60
|
+
};
|
|
53
61
|
readonly fields: "Goal details";
|
|
54
62
|
readonly deleteTitle: "Delete this goal?";
|
|
55
63
|
readonly deleteBody: "This cannot be undone.";
|
|
56
64
|
readonly confirmDelete: "Delete";
|
|
65
|
+
readonly thoseTests: "those tests";
|
|
66
|
+
readonly deleteLockedEnd: " first.";
|
|
57
67
|
};
|
|
58
68
|
export declare function goalUsedBy(count: number): string;
|
|
59
69
|
export declare function goalInUse(count: number): string;
|
|
60
|
-
export declare function
|
|
70
|
+
export declare function goalDeleteLockedStart(count: number): string;
|
|
61
71
|
export declare function goalsNoMatches(search: string): string;
|
|
72
|
+
export declare function goalShowAll(count: number): string;
|
|
73
|
+
export declare function largestValues(quantile: string): string;
|
package/dist/admin/copy/goals.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { CLICK_GOAL_COPY } from '../../goals/picker/copy.js';
|
|
2
|
+
import { percentileTail } from '../../testSurface/copy/metrics.js';
|
|
2
3
|
export const GOALS_COPY = {
|
|
3
4
|
slugRule: CLICK_GOAL_COPY.slugRule,
|
|
4
5
|
duplicateSlug: CLICK_GOAL_COPY.duplicateSlug,
|
|
6
|
+
duplicateSlugMain: 'Another goal already uses this short name. Choose another.',
|
|
5
7
|
title: 'Goals',
|
|
6
8
|
goal: 'Goal',
|
|
7
9
|
newGoal: 'New goal',
|
|
8
10
|
name: 'Name',
|
|
9
11
|
source: 'Measured by',
|
|
10
12
|
directionColumn: 'Better when',
|
|
13
|
+
nameRequired: 'Enter a name for this goal.',
|
|
11
14
|
direction: 'Better when it goes',
|
|
12
15
|
increase: 'More is better',
|
|
13
16
|
decrease: 'Less is better',
|
|
14
17
|
usedBy: 'Used by',
|
|
15
18
|
status: 'Status',
|
|
19
|
+
showLess: 'Show less',
|
|
16
20
|
inUse: 'In use',
|
|
17
21
|
unused: 'Not used yet',
|
|
18
22
|
empty: 'No goals yet. A goal is what a test tries to improve.',
|
|
@@ -24,18 +28,19 @@ export const GOALS_COPY = {
|
|
|
24
28
|
slugLocked: 'The short name stays the same once a test uses this goal.',
|
|
25
29
|
sourceLocked: 'What this goal measures stays the same once a test uses it.',
|
|
26
30
|
chooseSource: 'Choose an outcome',
|
|
27
|
-
window: 'Count results for (
|
|
31
|
+
window: 'Count results for (days)',
|
|
32
|
+
windowError: 'Enter a whole number of days, at least 1.',
|
|
28
33
|
minimum: 'Minimum completions before deciding',
|
|
34
|
+
minimumError: 'Enter a number of at least 1.',
|
|
29
35
|
advanced: 'Advanced',
|
|
30
36
|
capping: 'Limit very large values',
|
|
31
37
|
capType: 'Limit by',
|
|
32
|
-
capValue: '
|
|
33
|
-
noCap: '
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
capHelp: 'For past amounts, enter a number such as 0.99 to limit only the largest 1%; or enter a fixed amount.',
|
|
38
|
+
capValue: 'Fixed amount',
|
|
39
|
+
noCap: "Don't limit",
|
|
40
|
+
absolute: 'Limit to a fixed amount',
|
|
41
|
+
fixedAmountError: 'Enter an amount of zero or more.',
|
|
37
42
|
threshold: 'Warn when it gets worse by (%)',
|
|
38
|
-
|
|
43
|
+
createGoal: 'Create goal',
|
|
39
44
|
saving: 'Saving…',
|
|
40
45
|
cancel: 'Cancel',
|
|
41
46
|
remove: 'Delete goal',
|
|
@@ -48,13 +53,19 @@ export const GOALS_COPY = {
|
|
|
48
53
|
notFound: 'This goal no longer exists.',
|
|
49
54
|
backToTest: 'Back to the test',
|
|
50
55
|
useGoal: 'Use this goal',
|
|
51
|
-
open: 'Open',
|
|
52
56
|
search: 'Search goals',
|
|
53
57
|
clearSearch: 'Clear search',
|
|
58
|
+
roles: {
|
|
59
|
+
primary: 'Main goal',
|
|
60
|
+
secondary: 'Also tracked',
|
|
61
|
+
guardrails: 'Must not get worse'
|
|
62
|
+
},
|
|
54
63
|
fields: 'Goal details',
|
|
55
64
|
deleteTitle: 'Delete this goal?',
|
|
56
65
|
deleteBody: 'This cannot be undone.',
|
|
57
|
-
confirmDelete: 'Delete'
|
|
66
|
+
confirmDelete: 'Delete',
|
|
67
|
+
thoseTests: 'those tests',
|
|
68
|
+
deleteLockedEnd: ' first.'
|
|
58
69
|
};
|
|
59
70
|
export function goalUsedBy(count) {
|
|
60
71
|
return `Used by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
@@ -62,9 +73,15 @@ export function goalUsedBy(count) {
|
|
|
62
73
|
export function goalInUse(count) {
|
|
63
74
|
return `In use by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
64
75
|
}
|
|
65
|
-
export function
|
|
66
|
-
return `${goalUsedBy(count)}. Remove it from
|
|
76
|
+
export function goalDeleteLockedStart(count) {
|
|
77
|
+
return `${goalUsedBy(count)}. Remove it from `;
|
|
67
78
|
}
|
|
68
79
|
export function goalsNoMatches(search) {
|
|
69
80
|
return `No goals match “${search}”.`;
|
|
70
81
|
}
|
|
82
|
+
export function goalShowAll(count) {
|
|
83
|
+
return `Show all ${count}`;
|
|
84
|
+
}
|
|
85
|
+
export function largestValues(quantile) {
|
|
86
|
+
return `Limit the largest ${percentileTail(Number(quantile))}%`;
|
|
87
|
+
}
|
|
@@ -4,21 +4,20 @@ export declare const NEW_TEST_COPY: {
|
|
|
4
4
|
readonly setting: "A setting";
|
|
5
5
|
readonly page: "A whole page";
|
|
6
6
|
readonly pageMeaning: "Show different versions of a whole page at the same address, and see which one works better.";
|
|
7
|
-
readonly collection: "
|
|
7
|
+
readonly collection: "Which type of page?";
|
|
8
8
|
readonly original: "Original";
|
|
9
9
|
readonly originalHelp: "Choose the page visitors see today.";
|
|
10
10
|
readonly review: "Review";
|
|
11
11
|
readonly backToTest: "Back to the test";
|
|
12
12
|
readonly finishSetup: "Finish setup";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
readonly blocksHandoff: "In the page editor, choose 'Test a block on this page' to pick the block to test.";
|
|
14
|
+
readonly pageType: "Page type";
|
|
15
|
+
readonly choosePageType: "Choose a page type";
|
|
15
16
|
readonly blockMeaning: "Compare different versions of content on a page.";
|
|
16
17
|
readonly settingMeaning: "Compare different choices for a setting on your site.";
|
|
17
18
|
readonly unavailable: "A developer needs to set up pages or settings before you can create a test.";
|
|
18
|
-
readonly handoff: "Open the page
|
|
19
|
-
readonly
|
|
20
|
-
readonly recentPages: "Showing the 50 most recently edited.";
|
|
21
|
-
readonly open: "Open";
|
|
19
|
+
readonly handoff: "Open the page you want to test, then follow these steps in the editor.";
|
|
20
|
+
readonly handoffSteps: readonly ["Add a Test block to the page.", "Choose Set up test in the sidebar."];
|
|
22
21
|
readonly chooseSetting: "Which setting do you want to test?";
|
|
23
22
|
readonly people: "Count people as:";
|
|
24
23
|
readonly visitors: "Visitors";
|
|
@@ -35,6 +34,7 @@ export declare const NEW_TEST_COPY: {
|
|
|
35
34
|
readonly name: "Name";
|
|
36
35
|
readonly hypothesis: "Why are you testing this? (optional)";
|
|
37
36
|
readonly back: "Back";
|
|
37
|
+
readonly change: "Change";
|
|
38
38
|
readonly next: "Next";
|
|
39
39
|
readonly createTest: "Create";
|
|
40
40
|
readonly creating: "Creating…";
|
|
@@ -4,21 +4,23 @@ export const NEW_TEST_COPY = {
|
|
|
4
4
|
setting: 'A setting',
|
|
5
5
|
page: 'A whole page',
|
|
6
6
|
pageMeaning: 'Show different versions of a whole page at the same address, and see which one works better.',
|
|
7
|
-
collection: '
|
|
7
|
+
collection: 'Which type of page?',
|
|
8
8
|
original: 'Original',
|
|
9
9
|
originalHelp: 'Choose the page visitors see today.',
|
|
10
10
|
review: 'Review',
|
|
11
11
|
backToTest: 'Back to the test',
|
|
12
12
|
finishSetup: 'Finish setup',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
blocksHandoff: "In the page editor, choose 'Test a block on this page' to pick the block to test.",
|
|
14
|
+
pageType: 'Page type',
|
|
15
|
+
choosePageType: 'Choose a page type',
|
|
15
16
|
blockMeaning: 'Compare different versions of content on a page.',
|
|
16
17
|
settingMeaning: 'Compare different choices for a setting on your site.',
|
|
17
18
|
unavailable: 'A developer needs to set up pages or settings before you can create a test.',
|
|
18
|
-
handoff: 'Open the page
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
handoff: 'Open the page you want to test, then follow these steps in the editor.',
|
|
20
|
+
handoffSteps: [
|
|
21
|
+
'Add a Test block to the page.',
|
|
22
|
+
'Choose Set up test in the sidebar.'
|
|
23
|
+
],
|
|
22
24
|
chooseSetting: 'Which setting do you want to test?',
|
|
23
25
|
people: 'Count people as:',
|
|
24
26
|
visitors: 'Visitors',
|
|
@@ -35,6 +37,7 @@ export const NEW_TEST_COPY = {
|
|
|
35
37
|
name: 'Name',
|
|
36
38
|
hypothesis: 'Why are you testing this? (optional)',
|
|
37
39
|
back: 'Back',
|
|
40
|
+
change: 'Change',
|
|
38
41
|
next: 'Next',
|
|
39
42
|
createTest: 'Create',
|
|
40
43
|
creating: 'Creating…',
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Button, FieldError, FieldLabel,
|
|
3
|
+
import { Button, FieldDescription, FieldError, FieldLabel, SelectInput, useAuth, useConfig, useField } from '@payloadcms/ui';
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import { useClickGoalPicker } from '../../goals/picker/useClickGoalPicker.js';
|
|
6
|
+
import { clickGoalOptions } from '../../goals/picker/clickGoalPicker.model.js';
|
|
6
7
|
import { CLICK_GOAL_COPY as C } from '../../goals/picker/copy.js';
|
|
8
|
+
import '../theme.css';
|
|
9
|
+
import './xpGoalField.css';
|
|
10
|
+
// Payload 3's declaration requires `name`, though SelectInput only consumes `path`.
|
|
11
|
+
const GoalSelectInput = SelectInput;
|
|
7
12
|
export function XpGoalField({ path, field, readOnly }) {
|
|
8
13
|
const { value, setValue, showError } = useField({
|
|
9
14
|
path
|
|
@@ -13,9 +18,11 @@ export function XpGoalField({ path, field, readOnly }) {
|
|
|
13
18
|
const access = permissions?.collections?.['xp-experiments'];
|
|
14
19
|
const locked = Boolean(readOnly || field.admin?.readOnly);
|
|
15
20
|
const picker = useClickGoalPicker(config.routes.api, {
|
|
16
|
-
enabled: access?.update === true,
|
|
21
|
+
enabled: access?.update === true && !locked,
|
|
17
22
|
onSelect: setValue
|
|
18
23
|
});
|
|
24
|
+
const { options, missing } = clickGoalOptions(picker.status, picker.goals, value ?? '');
|
|
25
|
+
const readonly = locked || picker.status === 'not-manager';
|
|
19
26
|
const id = useId(), namePath = `${id}-name`, slugPath = `${id}-slug`;
|
|
20
27
|
const stopEnter = (event)=>{
|
|
21
28
|
if (event.key === 'Enter') {
|
|
@@ -24,128 +31,163 @@ export function XpGoalField({ path, field, readOnly }) {
|
|
|
24
31
|
}
|
|
25
32
|
};
|
|
26
33
|
return /*#__PURE__*/ _jsxs("div", {
|
|
34
|
+
className: "field-type xp-goal-field",
|
|
27
35
|
children: [
|
|
28
|
-
/*#__PURE__*/
|
|
29
|
-
path: path,
|
|
30
|
-
label: field.label ?? C.label,
|
|
31
|
-
description: field.admin?.description,
|
|
32
|
-
required: field.required,
|
|
33
|
-
readOnly: locked,
|
|
34
|
-
value: value ?? '',
|
|
35
|
-
showError: showError,
|
|
36
|
-
Error: /*#__PURE__*/ _jsx(FieldError, {
|
|
37
|
-
path: path,
|
|
38
|
-
showError: showError
|
|
39
|
-
}),
|
|
40
|
-
onChange: (event)=>{
|
|
41
|
-
if (!locked) setValue(event.currentTarget.value);
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
picker.canManage && !locked ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
36
|
+
readonly ? /*#__PURE__*/ _jsxs("div", {
|
|
45
37
|
children: [
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
/*#__PURE__*/ _jsxs("select", {
|
|
51
|
-
id: `${id}-picker`,
|
|
52
|
-
value: picker.goals.some((goal)=>goal.slug === value) ? value : '',
|
|
53
|
-
onChange: (event)=>{
|
|
54
|
-
if (event.currentTarget.value) setValue(event.currentTarget.value);
|
|
55
|
-
},
|
|
38
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
39
|
+
className: "field-label",
|
|
40
|
+
id: `${id}-label`,
|
|
56
41
|
children: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
value: goal.slug,
|
|
63
|
-
children: goal.name
|
|
64
|
-
}, goal.id))
|
|
42
|
+
C.label,
|
|
43
|
+
field.required ? /*#__PURE__*/ _jsx("span", {
|
|
44
|
+
className: "required",
|
|
45
|
+
children: "*"
|
|
46
|
+
}) : null
|
|
65
47
|
]
|
|
66
48
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
children: C.
|
|
70
|
-
})
|
|
71
|
-
|
|
49
|
+
/*#__PURE__*/ _jsx("p", {
|
|
50
|
+
"aria-labelledby": `${id}-label`,
|
|
51
|
+
children: value || C.none
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}) : /*#__PURE__*/ _jsxs("div", {
|
|
55
|
+
className: "xp-goal-field__row",
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ _jsx(GoalSelectInput, {
|
|
58
|
+
path: path,
|
|
59
|
+
className: "xp-goal-field__select",
|
|
60
|
+
value: value ?? '',
|
|
61
|
+
options: options,
|
|
62
|
+
label: C.label,
|
|
63
|
+
required: field.required,
|
|
64
|
+
readOnly: picker.status !== 'ready',
|
|
65
|
+
isClearable: false,
|
|
66
|
+
placeholder: C.none,
|
|
67
|
+
showError: showError,
|
|
68
|
+
onChange: (option)=>{
|
|
69
|
+
if (picker.status === 'ready' && option && !Array.isArray(option)) setValue(String(option.value));
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
picker.canManage && !picker.panel.open ? /*#__PURE__*/ _jsx(Button, {
|
|
72
73
|
type: "button",
|
|
74
|
+
margin: false,
|
|
75
|
+
buttonStyle: "secondary",
|
|
73
76
|
onClick: picker.open,
|
|
74
77
|
children: C.newGoal
|
|
75
|
-
}) :
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}),
|
|
98
|
-
/*#__PURE__*/ _jsxs("details", {
|
|
99
|
-
open: picker.panel.advanced,
|
|
100
|
-
onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
|
|
101
|
-
children: [
|
|
102
|
-
/*#__PURE__*/ _jsx("summary", {
|
|
103
|
-
children: C.advanced
|
|
104
|
-
}),
|
|
105
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
106
|
-
className: "field-type text",
|
|
107
|
-
children: [
|
|
108
|
-
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
109
|
-
path: slugPath,
|
|
110
|
-
label: C.slug
|
|
111
|
-
}),
|
|
112
|
-
/*#__PURE__*/ _jsx("input", {
|
|
113
|
-
id: `field-${slugPath}`,
|
|
114
|
-
value: picker.panel.slug,
|
|
115
|
-
disabled: picker.panel.pending,
|
|
116
|
-
onKeyDown: stopEnter,
|
|
117
|
-
"aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
|
|
118
|
-
"aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
|
|
119
|
-
onChange: (event)=>picker.setSlug(event.currentTarget.value)
|
|
120
|
-
}),
|
|
121
|
-
picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
|
|
122
|
-
id: `${id}-slug-error`,
|
|
123
|
-
role: "alert",
|
|
124
|
-
children: picker.panel.errors.slug
|
|
125
|
-
}) : null
|
|
126
|
-
]
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}),
|
|
130
|
-
picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
|
|
131
|
-
role: "alert",
|
|
132
|
-
children: picker.panel.errors.general
|
|
133
|
-
}) : null,
|
|
134
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
135
|
-
type: "button",
|
|
136
|
-
disabled: picker.panel.pending || !picker.panel.name.trim(),
|
|
137
|
-
onClick: ()=>void picker.create(),
|
|
138
|
-
children: C.createGoal
|
|
139
|
-
}),
|
|
140
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
141
|
-
type: "button",
|
|
142
|
-
disabled: picker.panel.pending,
|
|
143
|
-
onClick: picker.cancel,
|
|
144
|
-
children: C.cancel
|
|
145
|
-
})
|
|
146
|
-
]
|
|
78
|
+
}) : null
|
|
79
|
+
]
|
|
80
|
+
}),
|
|
81
|
+
readonly ? /*#__PURE__*/ _jsx(FieldError, {
|
|
82
|
+
path: path,
|
|
83
|
+
showError: showError
|
|
84
|
+
}) : null,
|
|
85
|
+
/*#__PURE__*/ _jsx(FieldDescription, {
|
|
86
|
+
path: path,
|
|
87
|
+
description: field.admin?.description
|
|
88
|
+
}),
|
|
89
|
+
!readonly && picker.status === 'error' ? /*#__PURE__*/ _jsxs("div", {
|
|
90
|
+
children: [
|
|
91
|
+
/*#__PURE__*/ _jsx("p", {
|
|
92
|
+
children: C.loadError
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
95
|
+
type: "button",
|
|
96
|
+
margin: false,
|
|
97
|
+
buttonStyle: "secondary",
|
|
98
|
+
onClick: picker.retry,
|
|
99
|
+
children: C.retry
|
|
147
100
|
})
|
|
148
101
|
]
|
|
102
|
+
}) : null,
|
|
103
|
+
missing && !readonly && !showError ? /*#__PURE__*/ _jsx("p", {
|
|
104
|
+
role: "status",
|
|
105
|
+
children: C.undefinedKey
|
|
106
|
+
}) : null,
|
|
107
|
+
picker.canManage && !locked ? /*#__PURE__*/ _jsx(_Fragment, {
|
|
108
|
+
children: picker.panel.open ? /*#__PURE__*/ _jsxs("section", {
|
|
109
|
+
className: "xp-goal-field__panel",
|
|
110
|
+
"aria-labelledby": `${id}-title`,
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
113
|
+
id: `${id}-title`,
|
|
114
|
+
children: C.title
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
117
|
+
className: "field-type text",
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
120
|
+
path: namePath,
|
|
121
|
+
label: C.name
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ _jsx("input", {
|
|
124
|
+
id: `field-${namePath}`,
|
|
125
|
+
value: picker.panel.name,
|
|
126
|
+
disabled: picker.panel.pending,
|
|
127
|
+
onKeyDown: stopEnter,
|
|
128
|
+
onChange: (event)=>picker.setName(event.currentTarget.value)
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ _jsxs("details", {
|
|
133
|
+
open: picker.panel.advanced,
|
|
134
|
+
onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ _jsx("summary", {
|
|
137
|
+
children: C.advanced
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
140
|
+
className: "field-type text",
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
143
|
+
path: slugPath,
|
|
144
|
+
label: C.slug
|
|
145
|
+
}),
|
|
146
|
+
/*#__PURE__*/ _jsx("input", {
|
|
147
|
+
id: `field-${slugPath}`,
|
|
148
|
+
value: picker.panel.slug,
|
|
149
|
+
disabled: picker.panel.pending,
|
|
150
|
+
onKeyDown: stopEnter,
|
|
151
|
+
"aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
|
|
152
|
+
"aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
|
|
153
|
+
onChange: (event)=>picker.setSlug(event.currentTarget.value)
|
|
154
|
+
}),
|
|
155
|
+
picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
|
|
156
|
+
id: `${id}-slug-error`,
|
|
157
|
+
role: "alert",
|
|
158
|
+
children: picker.panel.errors.slug
|
|
159
|
+
}) : null
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}),
|
|
164
|
+
picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
|
|
165
|
+
role: "alert",
|
|
166
|
+
children: picker.panel.errors.general
|
|
167
|
+
}) : null,
|
|
168
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
169
|
+
className: "xp-goal-field__actions",
|
|
170
|
+
children: [
|
|
171
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
172
|
+
type: "button",
|
|
173
|
+
margin: false,
|
|
174
|
+
buttonStyle: "primary",
|
|
175
|
+
disabled: picker.panel.pending || !picker.panel.name.trim(),
|
|
176
|
+
onClick: ()=>void picker.create(),
|
|
177
|
+
children: C.createGoal
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
180
|
+
type: "button",
|
|
181
|
+
margin: false,
|
|
182
|
+
buttonStyle: "secondary",
|
|
183
|
+
disabled: picker.panel.pending,
|
|
184
|
+
onClick: picker.cancel,
|
|
185
|
+
children: C.cancel
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
}) : null
|
|
149
191
|
}) : null
|
|
150
192
|
]
|
|
151
193
|
});
|