@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,337 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { DocsResponseError, fetchAllDocs } from '../../../lib/fetchAllDocs.js';
|
|
4
|
-
import { usePlacementLabels, placementDetailKey } from '../../placements/usePlacementLabels.js';
|
|
5
|
-
import { placementUncheckedCopy } from '../../copy/readiness.js';
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
-
import { Button } from '../../../ui/Button.js';
|
|
8
|
-
import { TextInput } from '../../../ui/Inputs.js';
|
|
9
|
-
import { Dialog } from '../../../ui/Dialog.js';
|
|
10
|
-
import { MakeContentResult } from '../../actions/MakeContentResult.js';
|
|
11
|
-
import { expectedConfirm, matchesConfirm } from '../../../transitions/confirmPhrases.js';
|
|
12
|
-
import { ACTIONS_COPY as A, addMetricWarningCopy } from '../../copy/actions.js';
|
|
13
|
-
import { REVIEW_COPY as R } from '../../copy/review.js';
|
|
14
|
-
import { READINESS_COPY as C } from '../../copy/readiness.js';
|
|
15
|
-
import { API_MESSAGES, refusalMessage } from '../../copy/common.js';
|
|
16
|
-
import { createApi } from '../../api.js';
|
|
17
|
-
import { useTransition } from './useTransition.js';
|
|
18
|
-
/** Prop-driven ConfirmDialog adapter: same model/copy, section reload instead of a page reload. */ export function ConfirmAction({ test, surface, action, winnerLabel, onClose }) {
|
|
19
|
-
const api = createApi(surface.apiRoute);
|
|
20
|
-
const [typed, setTyped] = useState('');
|
|
21
|
-
const [content, setContent] = useState(null);
|
|
22
|
-
const [reportBusy, setReportBusy] = useState(false);
|
|
23
|
-
const transition = useTransition(test, onClose);
|
|
24
|
-
const phrase = action.confirm.phrase ? expectedConfirm(action.confirm.phrase.action, winnerLabel) : null;
|
|
25
|
-
const ready = action.id !== 'start' || Boolean(test.preflight && !test.preflightPending && !test.preflightError && test.preflight.checks.every((check)=>check.ok));
|
|
26
|
-
const enabled = ready && !transition.busy && !test.hasUnsaved && test.saving !== 'saving' && (!phrase || matchesConfirm(phrase, typed));
|
|
27
|
-
async function submit(finish = false) {
|
|
28
|
-
if (!enabled || !test.doc) return;
|
|
29
|
-
const id = test.doc.id;
|
|
30
|
-
await transition.run(async ()=>{
|
|
31
|
-
if (finish) return api.archive(id, {
|
|
32
|
-
mode: 'after-content'
|
|
33
|
-
});
|
|
34
|
-
if (action.archive) return api.archive(id, {
|
|
35
|
-
...action.archive,
|
|
36
|
-
...phrase ? {
|
|
37
|
-
confirmation: typed.trim()
|
|
38
|
-
} : {}
|
|
39
|
-
});
|
|
40
|
-
if (action.id === 'start') return api.start(id);
|
|
41
|
-
if (action.id === 'stop') return api.stop(id);
|
|
42
|
-
if (action.id === 'release-holdout') return api.releaseHoldout(id);
|
|
43
|
-
const result = await api.makeContent(id);
|
|
44
|
-
if (result.ok && result.data) {
|
|
45
|
-
setContent(result.data);
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
return result.ok ? {
|
|
49
|
-
ok: false,
|
|
50
|
-
status: 0,
|
|
51
|
-
retryable: true,
|
|
52
|
-
message: API_MESSAGES.unreadable
|
|
53
|
-
} : result;
|
|
54
|
-
}, {
|
|
55
|
-
reloadOnSuccess: finish || action.id !== 'make-content'
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function close() {
|
|
59
|
-
if (transition.busy || reportBusy) return;
|
|
60
|
-
if (content) void test.reload();
|
|
61
|
-
onClose();
|
|
62
|
-
}
|
|
63
|
-
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
64
|
-
open: true,
|
|
65
|
-
initialFocus: action.id === 'start' ? undefined : 'cancel',
|
|
66
|
-
dismissible: !transition.busy && !reportBusy,
|
|
67
|
-
title: action.confirm.title,
|
|
68
|
-
onClose: close,
|
|
69
|
-
children: [
|
|
70
|
-
content ? /*#__PURE__*/ _jsx(MakeContentResult, {
|
|
71
|
-
result: content,
|
|
72
|
-
id: test.doc?.id,
|
|
73
|
-
api: api,
|
|
74
|
-
canManage: surface.canManage,
|
|
75
|
-
isDecided: (content.doc?.status ?? test.doc?.status) === 'decided',
|
|
76
|
-
onRetry: ()=>submit(),
|
|
77
|
-
onFinish: ()=>submit(true),
|
|
78
|
-
busy: transition.busy,
|
|
79
|
-
onBusyChange: setReportBusy,
|
|
80
|
-
onActionStart: transition.clearError
|
|
81
|
-
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
82
|
-
children: [
|
|
83
|
-
/*#__PURE__*/ _jsx("p", {
|
|
84
|
-
children: action.confirm.body
|
|
85
|
-
}),
|
|
86
|
-
phrase ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
87
|
-
children: [
|
|
88
|
-
/*#__PURE__*/ _jsxs("p", {
|
|
89
|
-
children: [
|
|
90
|
-
A.typePhrase,
|
|
91
|
-
" ",
|
|
92
|
-
/*#__PURE__*/ _jsx("strong", {
|
|
93
|
-
children: phrase
|
|
94
|
-
})
|
|
95
|
-
]
|
|
96
|
-
}),
|
|
97
|
-
/*#__PURE__*/ _jsx(TextInput, {
|
|
98
|
-
id: "xp-confirmation",
|
|
99
|
-
label: A.confirmation,
|
|
100
|
-
value: typed,
|
|
101
|
-
readOnly: transition.busy,
|
|
102
|
-
onChange: (event)=>setTyped(event.target.value)
|
|
103
|
-
})
|
|
104
|
-
]
|
|
105
|
-
}) : null
|
|
106
|
-
]
|
|
107
|
-
}),
|
|
108
|
-
transition.error ? /*#__PURE__*/ _jsx("p", {
|
|
109
|
-
role: "alert",
|
|
110
|
-
children: transition.error
|
|
111
|
-
}) : null,
|
|
112
|
-
!content ? /*#__PURE__*/ _jsx(Button, {
|
|
113
|
-
disabled: !enabled,
|
|
114
|
-
onClick: ()=>{
|
|
115
|
-
void submit();
|
|
116
|
-
},
|
|
117
|
-
children: action.label
|
|
118
|
-
}) : null,
|
|
119
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
120
|
-
"data-dialog-cancel": true,
|
|
121
|
-
disabled: transition.busy || reportBusy,
|
|
122
|
-
onClick: close,
|
|
123
|
-
children: content ? A.done : A.cancel
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
/** AllocateDialog's validation and copy, with data supplied by the test document. */ export function AllocateAction({ test, surface, onClose }) {
|
|
129
|
-
const current = test.doc?.allocation ?? 100;
|
|
130
|
-
const [value, setValue] = useState(String(Math.min(100, current + 1)));
|
|
131
|
-
const transition = useTransition(test, onClose);
|
|
132
|
-
const allocation = Number(value);
|
|
133
|
-
const valid = value.trim() !== '' && Number.isInteger(allocation) && allocation > current && allocation <= 100;
|
|
134
|
-
const disabled = transition.busy || test.hasUnsaved || test.saving === 'saving';
|
|
135
|
-
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
136
|
-
open: true,
|
|
137
|
-
dismissible: !transition.busy,
|
|
138
|
-
title: C.allocate,
|
|
139
|
-
onClose: ()=>{
|
|
140
|
-
if (!transition.busy) onClose();
|
|
141
|
-
},
|
|
142
|
-
children: [
|
|
143
|
-
/*#__PURE__*/ _jsx("p", {
|
|
144
|
-
children: R.allocationBody
|
|
145
|
-
}),
|
|
146
|
-
/*#__PURE__*/ _jsxs("label", {
|
|
147
|
-
children: [
|
|
148
|
-
C.participation,
|
|
149
|
-
/*#__PURE__*/ _jsx("input", {
|
|
150
|
-
type: "number",
|
|
151
|
-
min: current + 1,
|
|
152
|
-
max: 100,
|
|
153
|
-
step: 1,
|
|
154
|
-
value: value,
|
|
155
|
-
disabled: disabled,
|
|
156
|
-
onChange: (event)=>setValue(event.target.value)
|
|
157
|
-
})
|
|
158
|
-
]
|
|
159
|
-
}),
|
|
160
|
-
!valid ? /*#__PURE__*/ _jsx("p", {
|
|
161
|
-
children: R.allocationInvalid
|
|
162
|
-
}) : null,
|
|
163
|
-
transition.error ? /*#__PURE__*/ _jsx("p", {
|
|
164
|
-
role: "alert",
|
|
165
|
-
children: transition.error
|
|
166
|
-
}) : null,
|
|
167
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
168
|
-
disabled: disabled || !valid,
|
|
169
|
-
onClick: ()=>{
|
|
170
|
-
// Not-found can also mean the experiment is missing; use round copy for the missing phase record.
|
|
171
|
-
if (valid && test.doc) void transition.run(()=>createApi(surface.apiRoute).allocate(test.doc.id, {
|
|
172
|
-
allocation
|
|
173
|
-
}, {
|
|
174
|
-
notFound: API_MESSAGES.roundChanged
|
|
175
|
-
}));
|
|
176
|
-
},
|
|
177
|
-
children: C.allocate
|
|
178
|
-
}),
|
|
179
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
180
|
-
disabled: transition.busy,
|
|
181
|
-
onClick: onClose,
|
|
182
|
-
children: A.cancel
|
|
183
|
-
})
|
|
184
|
-
]
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
/** AddMetricDialog adapter; the primary goal is deliberately absent from the role picker. */ export function AddMetricAction({ test, surface, onClose }) {
|
|
188
|
-
const [metrics, setMetrics] = useState([]);
|
|
189
|
-
const [loading, setLoading] = useState(true);
|
|
190
|
-
const [loadError, setLoadError] = useState(null);
|
|
191
|
-
const [metric, setMetric] = useState('');
|
|
192
|
-
const [warnings, setWarnings] = useState(null);
|
|
193
|
-
const placementLabels = usePlacementLabels({
|
|
194
|
-
details: (warnings ?? []).filter((warning)=>warning.code === 'placement-unchecked').map((warning)=>warning.detail),
|
|
195
|
-
preflight: test.preflight,
|
|
196
|
-
...surface
|
|
197
|
-
});
|
|
198
|
-
const [role, setRole] = useState('secondary');
|
|
199
|
-
const transition = useTransition(test, onClose);
|
|
200
|
-
useEffect(()=>{
|
|
201
|
-
const controller = new AbortController();
|
|
202
|
-
void (async ()=>{
|
|
203
|
-
try {
|
|
204
|
-
const response = await fetchAllDocs(`${surface.apiRoute.replace(/\/$/, '')}/xp-metrics?depth=0`, {
|
|
205
|
-
credentials: 'include',
|
|
206
|
-
signal: controller.signal
|
|
207
|
-
});
|
|
208
|
-
if (!response.ok) throw new Error(refusalMessage(undefined, response.status));
|
|
209
|
-
if (!controller.signal.aborted) setMetrics(response.docs);
|
|
210
|
-
} catch (cause) {
|
|
211
|
-
if (!controller.signal.aborted) setLoadError(cause instanceof DocsResponseError ? API_MESSAGES.unreadable : cause instanceof Error ? cause.message : API_MESSAGES.network);
|
|
212
|
-
} finally{
|
|
213
|
-
if (!controller.signal.aborted) setLoading(false);
|
|
214
|
-
}
|
|
215
|
-
})();
|
|
216
|
-
return ()=>controller.abort();
|
|
217
|
-
}, [
|
|
218
|
-
surface.apiRoute
|
|
219
|
-
]);
|
|
220
|
-
const attached = new Set([
|
|
221
|
-
test.doc?.metrics?.primary,
|
|
222
|
-
...test.doc?.metrics?.secondary ?? [],
|
|
223
|
-
...test.doc?.metrics?.guardrails ?? []
|
|
224
|
-
].filter((id)=>id != null).map(String));
|
|
225
|
-
const available = metrics.filter((item)=>!attached.has(String(item.id)));
|
|
226
|
-
const selected = available.find((item)=>String(item.id) === metric);
|
|
227
|
-
const disabled = transition.busy || test.hasUnsaved || test.saving === 'saving';
|
|
228
|
-
function close() {
|
|
229
|
-
if (transition.busy) return;
|
|
230
|
-
if (warnings) void test.reload();
|
|
231
|
-
onClose();
|
|
232
|
-
}
|
|
233
|
-
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
234
|
-
open: true,
|
|
235
|
-
dismissible: !transition.busy,
|
|
236
|
-
title: C.addGoal,
|
|
237
|
-
onClose: close,
|
|
238
|
-
children: [
|
|
239
|
-
warnings ? warnings.map((warning, index)=>{
|
|
240
|
-
const placement = warning.code === 'placement-unchecked' ? placementLabels.get(placementDetailKey(warning.detail)) : undefined;
|
|
241
|
-
return /*#__PURE__*/ _jsx("p", {
|
|
242
|
-
children: placement ? placement.href ? /*#__PURE__*/ _jsx("a", {
|
|
243
|
-
href: placement.href,
|
|
244
|
-
children: placementUncheckedCopy(placement.title)
|
|
245
|
-
}) : placementUncheckedCopy(placement.title) : addMetricWarningCopy(warning)
|
|
246
|
-
}, index);
|
|
247
|
-
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
248
|
-
children: [
|
|
249
|
-
/*#__PURE__*/ _jsx("p", {
|
|
250
|
-
children: C.addMetric
|
|
251
|
-
}),
|
|
252
|
-
loading ? /*#__PURE__*/ _jsx("p", {
|
|
253
|
-
role: "status",
|
|
254
|
-
children: R.loadingMetrics
|
|
255
|
-
}) : null,
|
|
256
|
-
/*#__PURE__*/ _jsxs("label", {
|
|
257
|
-
children: [
|
|
258
|
-
R.role,
|
|
259
|
-
/*#__PURE__*/ _jsxs("select", {
|
|
260
|
-
value: role,
|
|
261
|
-
disabled: disabled,
|
|
262
|
-
onChange: (event)=>setRole(event.target.value),
|
|
263
|
-
children: [
|
|
264
|
-
/*#__PURE__*/ _jsx("option", {
|
|
265
|
-
value: "secondary",
|
|
266
|
-
children: R.supporting
|
|
267
|
-
}),
|
|
268
|
-
/*#__PURE__*/ _jsx("option", {
|
|
269
|
-
value: "guardrail",
|
|
270
|
-
children: R.guardrail
|
|
271
|
-
})
|
|
272
|
-
]
|
|
273
|
-
})
|
|
274
|
-
]
|
|
275
|
-
}),
|
|
276
|
-
/*#__PURE__*/ _jsxs("label", {
|
|
277
|
-
children: [
|
|
278
|
-
R.metric,
|
|
279
|
-
/*#__PURE__*/ _jsxs("select", {
|
|
280
|
-
value: metric,
|
|
281
|
-
disabled: disabled || loading,
|
|
282
|
-
onChange: (event)=>setMetric(event.target.value),
|
|
283
|
-
children: [
|
|
284
|
-
/*#__PURE__*/ _jsx("option", {
|
|
285
|
-
value: "",
|
|
286
|
-
children: R.chooseMetric
|
|
287
|
-
}),
|
|
288
|
-
available.map((item)=>/*#__PURE__*/ _jsx("option", {
|
|
289
|
-
value: String(item.id),
|
|
290
|
-
children: item.name
|
|
291
|
-
}, item.id))
|
|
292
|
-
]
|
|
293
|
-
})
|
|
294
|
-
]
|
|
295
|
-
}),
|
|
296
|
-
!loading && !loadError && !available.length ? /*#__PURE__*/ _jsx("p", {
|
|
297
|
-
children: R.noMetrics
|
|
298
|
-
}) : null,
|
|
299
|
-
loadError || transition.error ? /*#__PURE__*/ _jsx("p", {
|
|
300
|
-
role: "alert",
|
|
301
|
-
children: loadError ?? transition.error
|
|
302
|
-
}) : null,
|
|
303
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
304
|
-
disabled: disabled || loading || !!loadError || !selected,
|
|
305
|
-
onClick: ()=>{
|
|
306
|
-
// Goal and phase lookups share not-found; prefer the more likely missing goal without reading server text.
|
|
307
|
-
if (selected && test.doc) void transition.run(async ()=>{
|
|
308
|
-
const result = await createApi(surface.apiRoute).addMetric(test.doc.id, {
|
|
309
|
-
metric: selected.id,
|
|
310
|
-
role
|
|
311
|
-
}, {
|
|
312
|
-
notFound: API_MESSAGES.goalNotFound
|
|
313
|
-
});
|
|
314
|
-
if (result.ok) {
|
|
315
|
-
if (result.data?.warnings?.length) setWarnings(result.data.warnings);
|
|
316
|
-
else {
|
|
317
|
-
await test.reload();
|
|
318
|
-
onClose();
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
return result;
|
|
322
|
-
}, {
|
|
323
|
-
reloadOnSuccess: false
|
|
324
|
-
});
|
|
325
|
-
},
|
|
326
|
-
children: C.addGoal
|
|
327
|
-
})
|
|
328
|
-
]
|
|
329
|
-
}),
|
|
330
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
331
|
-
disabled: transition.busy,
|
|
332
|
-
onClick: close,
|
|
333
|
-
children: warnings ? A.done : A.cancel
|
|
334
|
-
})
|
|
335
|
-
]
|
|
336
|
-
});
|
|
337
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
|
-
import { Button } from '../../../ui/Button.js';
|
|
5
|
-
import { SaveStatus, saveStatusMessage } from './SaveStatus.js';
|
|
6
|
-
import { jumpToSection } from '../test/jumpToSection.js';
|
|
7
|
-
import { actionGroupLabel, availableActions } from '../../actions/actions.model.js';
|
|
8
|
-
import { createApi } from '../../api.js';
|
|
9
|
-
import { READINESS_COPY as C, decidedCopy, nextCopy, runningCopy, stoppedCopy } from '../../copy/readiness.js';
|
|
10
|
-
import { READINESS, daysRemaining, displayDate, nextStep, pageReadinessContext } from './readiness.model.js';
|
|
11
|
-
import { AddMetricAction, AllocateAction, ConfirmAction } from './ActionDialogs.js';
|
|
12
|
-
import { preflightPlacementLabel } from '../../placements/placementLabels.js';
|
|
13
|
-
import { placementUncheckedCopy } from '../../copy/readiness.js';
|
|
14
|
-
import { useTransition } from './useTransition.js';
|
|
15
|
-
const RUNNING_ACTIONS = [
|
|
16
|
-
'stop',
|
|
17
|
-
'add-metric',
|
|
18
|
-
'allocate'
|
|
19
|
-
];
|
|
20
|
-
export function Banner(props) {
|
|
21
|
-
return props.test.doc ? /*#__PURE__*/ _jsx(ReadinessContent, {
|
|
22
|
-
...props
|
|
23
|
-
}, `${props.test.doc.id}/${props.test.doc.status}`) : null;
|
|
24
|
-
}
|
|
25
|
-
export function ReadinessContent({ test, surface, resultsVersion, bar = false }) {
|
|
26
|
-
const [selected, setSelected] = useState(null);
|
|
27
|
-
const [people, setPeople] = useState(null);
|
|
28
|
-
const transition = useTransition(test);
|
|
29
|
-
const doc = test.doc;
|
|
30
|
-
useEffect(()=>{
|
|
31
|
-
let active = true;
|
|
32
|
-
// The id/status key resets the count; refreshes retain it while loading.
|
|
33
|
-
if (surface.canReadResults && doc.status === 'running') {
|
|
34
|
-
void Promise.resolve().then(()=>active ? createApi(surface.apiRoute).summary([
|
|
35
|
-
doc.id
|
|
36
|
-
]) : undefined).then((result)=>{
|
|
37
|
-
if (!result?.ok) return;
|
|
38
|
-
const count = result.data?.[doc.id]?.exposures;
|
|
39
|
-
if (active) setPeople(typeof count === 'number' && Number.isFinite(count) ? count : null);
|
|
40
|
-
}).catch(()=>{});
|
|
41
|
-
}
|
|
42
|
-
return ()=>{
|
|
43
|
-
active = false;
|
|
44
|
-
};
|
|
45
|
-
}, [
|
|
46
|
-
doc.id,
|
|
47
|
-
doc.status,
|
|
48
|
-
surface.apiRoute,
|
|
49
|
-
surface.canReadResults,
|
|
50
|
-
resultsVersion
|
|
51
|
-
]);
|
|
52
|
-
const decision = doc.decision;
|
|
53
|
-
const winner = actionGroupLabel(decision?.winnerArm ?? 'control', doc.arms.find((item)=>item.key === decision?.winnerArm)?.label);
|
|
54
|
-
const labelledPreflight = test.preflight ? {
|
|
55
|
-
...test.preflight,
|
|
56
|
-
checks: test.preflight.checks.map((check)=>check.code === 'placement-unchecked' ? {
|
|
57
|
-
...check,
|
|
58
|
-
detail: {
|
|
59
|
-
...check.detail,
|
|
60
|
-
title: preflightPlacementLabel(check.detail, test.preflight, surface.adminRoute).title
|
|
61
|
-
}
|
|
62
|
-
} : check)
|
|
63
|
-
} : null;
|
|
64
|
-
const next = nextStep(labelledPreflight, pageReadinessContext(doc, test.preflight, surface));
|
|
65
|
-
const setup = doc.status === 'draft' || doc.status === 'stopped';
|
|
66
|
-
const ready = Boolean(test.preflight && !test.preflightPending && !test.preflightError && test.preflight.checks.every((check)=>check.ok));
|
|
67
|
-
const unsaved = test.hasUnsaved || test.saving === 'saving';
|
|
68
|
-
const startReason = unsaved ? C.saveFirst : next?.sentence ?? (!ready ? test.preflightError ? C.checkError : C.checking : undefined);
|
|
69
|
-
const actions = availableActions({
|
|
70
|
-
status: doc.status,
|
|
71
|
-
kind: doc.kind,
|
|
72
|
-
arms: doc.arms,
|
|
73
|
-
decision,
|
|
74
|
-
canManage: surface.canManage
|
|
75
|
-
}).filter((action)=>setup ? action.id === 'start' : doc.status === 'running' ? RUNNING_ACTIONS.includes(action.id) : true).sort((a, b)=>doc.status === 'running' ? RUNNING_ACTIONS.indexOf(a.id) - RUNNING_ACTIONS.indexOf(b.id) : 0).map((action)=>action.id === 'add-metric' ? {
|
|
76
|
-
...action,
|
|
77
|
-
label: C.addGoal
|
|
78
|
-
} : action.id === 'allocate' ? {
|
|
79
|
-
...action,
|
|
80
|
-
label: C.allocate
|
|
81
|
-
} : action);
|
|
82
|
-
const action = actions.find((item)=>item.id === selected);
|
|
83
|
-
const sentence = setup ? bar && test.preflightError ? null : ready ? C.ready : next ? nextCopy(next.sentence) : test.preflightError ? C.checkError : C.checking : doc.status === 'running' ? runningCopy(displayDate(doc.startedAt), people, daysRemaining(doc, Date.now())) : doc.status === 'decided' ? decidedCopy(displayDate(doc.decidedAt), winner) : C.archived;
|
|
84
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
85
|
-
className: `xp-readiness xp-readiness--${setup && ready ? 'ready' : 'neutral'}${bar ? ' xp-readiness--bar xp-tests-container' : ''}`,
|
|
86
|
-
children: [
|
|
87
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
88
|
-
className: "xp-readiness__state",
|
|
89
|
-
children: [
|
|
90
|
-
bar ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
91
|
-
children: [
|
|
92
|
-
/*#__PURE__*/ _jsx(SaveStatus, {
|
|
93
|
-
test: test
|
|
94
|
-
}),
|
|
95
|
-
sentence && (saveStatusMessage(test) || test.preflightError) ? /*#__PURE__*/ _jsx("span", {
|
|
96
|
-
className: "xp-readiness__separator",
|
|
97
|
-
"aria-hidden": "true",
|
|
98
|
-
children: "·"
|
|
99
|
-
}) : null
|
|
100
|
-
]
|
|
101
|
-
}) : null,
|
|
102
|
-
sentence ? /*#__PURE__*/ _jsx("p", {
|
|
103
|
-
role: "status",
|
|
104
|
-
children: setup && next && !ready && next.section !== 'header' ? /*#__PURE__*/ _jsxs("a", {
|
|
105
|
-
href: `#section-${next.section}`,
|
|
106
|
-
onClick: (event)=>{
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
if (next.section !== 'header') jumpToSection(next.section, next.arm);
|
|
109
|
-
},
|
|
110
|
-
children: [
|
|
111
|
-
sentence,
|
|
112
|
-
next.nextStep ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
113
|
-
children: [
|
|
114
|
-
/*#__PURE__*/ _jsx("br", {}),
|
|
115
|
-
/*#__PURE__*/ _jsx("span", {
|
|
116
|
-
children: next.nextStep
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
}) : null
|
|
120
|
-
]
|
|
121
|
-
}) : sentence
|
|
122
|
-
}) : null
|
|
123
|
-
]
|
|
124
|
-
}),
|
|
125
|
-
setup && test.preflight?.checks.some((check)=>check.code === 'page-targets-unchecked' && check.warning) ? /*#__PURE__*/ _jsx("p", {
|
|
126
|
-
children: C.uncheckedPages
|
|
127
|
-
}) : null,
|
|
128
|
-
test.preflight?.checks.filter((check)=>check.code === 'make-content-unsupported' && check.warning).map((check)=>/*#__PURE__*/ _jsx("p", {
|
|
129
|
-
children: READINESS[check.code].next(check.detail, doc)
|
|
130
|
-
}, check.code)),
|
|
131
|
-
test.preflight?.checks.filter((check)=>check.warning && [
|
|
132
|
-
'goal-in-some-versions',
|
|
133
|
-
'placement-unchecked'
|
|
134
|
-
].includes(check.code)).map((check, index)=>{
|
|
135
|
-
const placement = check.code === 'placement-unchecked' ? preflightPlacementLabel(check.detail, test.preflight, surface.adminRoute) : undefined;
|
|
136
|
-
return /*#__PURE__*/ _jsx("p", {
|
|
137
|
-
children: placement ? placement.href ? /*#__PURE__*/ _jsx("a", {
|
|
138
|
-
href: placement.href,
|
|
139
|
-
children: placementUncheckedCopy(placement.title)
|
|
140
|
-
}) : placementUncheckedCopy(placement.title) : READINESS[check.code].next(check.detail, doc)
|
|
141
|
-
}, `${check.code}:${index}`);
|
|
142
|
-
}),
|
|
143
|
-
test.preflight?.goalNotes?.map((note)=>/*#__PURE__*/ _jsx("p", {
|
|
144
|
-
children: note.message
|
|
145
|
-
}, note.metricId)),
|
|
146
|
-
doc.status === 'stopped' ? /*#__PURE__*/ _jsx("p", {
|
|
147
|
-
children: stoppedCopy(displayDate(doc.stoppedAt))
|
|
148
|
-
}) : null,
|
|
149
|
-
/*#__PURE__*/ _jsx("div", {
|
|
150
|
-
className: "xp-readiness__actions",
|
|
151
|
-
children: actions.map((item)=>{
|
|
152
|
-
const reason = item.id === 'start' ? startReason : unsaved ? C.saveFirst : item.id === 'allocate' && doc.allocation >= 100 ? C.everyone : undefined;
|
|
153
|
-
const disabled = transition.busy || !!selected || !!reason;
|
|
154
|
-
return /*#__PURE__*/ _jsx("span", {
|
|
155
|
-
title: reason,
|
|
156
|
-
children: /*#__PURE__*/ _jsx(Button, {
|
|
157
|
-
variant: item.tone === 'primary' || bar && item.id === 'stop' ? 'primary' : 'secondary',
|
|
158
|
-
disabled: disabled,
|
|
159
|
-
onClick: ()=>{
|
|
160
|
-
if (disabled) return;
|
|
161
|
-
if (item.id === 'start' && doc.status === 'draft') void transition.run(()=>createApi(surface.apiRoute).start(doc.id));
|
|
162
|
-
else setSelected(item.id);
|
|
163
|
-
},
|
|
164
|
-
children: item.label
|
|
165
|
-
})
|
|
166
|
-
}, item.id);
|
|
167
|
-
})
|
|
168
|
-
}),
|
|
169
|
-
transition.error ? /*#__PURE__*/ _jsx("p", {
|
|
170
|
-
role: "alert",
|
|
171
|
-
children: transition.error
|
|
172
|
-
}) : null,
|
|
173
|
-
action?.id === 'allocate' ? /*#__PURE__*/ _jsx(AllocateAction, {
|
|
174
|
-
test: test,
|
|
175
|
-
surface: surface,
|
|
176
|
-
onClose: ()=>setSelected(null)
|
|
177
|
-
}) : action?.id === 'add-metric' ? /*#__PURE__*/ _jsx(AddMetricAction, {
|
|
178
|
-
test: test,
|
|
179
|
-
surface: surface,
|
|
180
|
-
onClose: ()=>setSelected(null)
|
|
181
|
-
}) : action ? /*#__PURE__*/ _jsx(ConfirmAction, {
|
|
182
|
-
test: test,
|
|
183
|
-
surface: surface,
|
|
184
|
-
action: action,
|
|
185
|
-
winnerLabel: winner,
|
|
186
|
-
onClose: ()=>setSelected(null)
|
|
187
|
-
}) : null
|
|
188
|
-
]
|
|
189
|
-
});
|
|
190
|
-
}
|
|
@@ -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
|
-
}
|