@delmaredigital/payload-experiments 0.4.0-rc.5 → 0.4.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/blocks/BlockPanel.js +6 -4
- package/dist/admin/blocks/inject.js +1 -0
- package/dist/admin/blocks/model.d.ts +3 -2
- package/dist/admin/blocks/model.js +8 -4
- package/dist/admin/copy/blocks.d.ts +3 -2
- package/dist/admin/copy/blocks.js +7 -6
- package/dist/admin/copy/newTest.d.ts +1 -1
- package/dist/admin/copy/newTest.js +1 -1
- package/dist/admin/surface/ResultsRoute.js +2 -1
- package/dist/admin/surface/TestsHome.d.ts +2 -1
- package/dist/admin/surface/TestsHome.js +91 -37
- package/dist/admin/surface/TestsSurface.js +3 -0
- package/dist/admin/surface/home.model.d.ts +2 -0
- package/dist/admin/surface/newTest/NewTest.js +16 -18
- package/dist/admin/surface/newTest/PageWizard.js +1 -0
- package/dist/admin/surface/newTest/newTest.css +3 -1
- package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
- package/dist/admin/views/TestsSurfaceClient.js +11 -0
- package/dist/admin/views/buildSurfaceProps.js +10 -3
- package/dist/blocks/bindings.js +8 -14
- package/dist/blocks/placementLanguages.d.ts +7 -0
- package/dist/blocks/placementLanguages.js +27 -0
- package/dist/blocks/placementLocale.d.ts +23 -7
- package/dist/blocks/placementLocale.js +221 -66
- package/dist/db/appends.d.ts +13 -0
- package/dist/db/appends.js +49 -0
- package/dist/db/bulkPlacementRemoval.js +8 -4
- 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 +206 -0
- package/dist/endpoints/index.js +7 -0
- package/dist/endpoints/pages.js +7 -3
- package/dist/endpoints/placementStatus.js +6 -1
- package/dist/endpoints/preflight.d.ts +1 -1
- package/dist/endpoints/preflight.js +17 -2
- package/dist/exports/adminClient.d.ts +1 -1
- package/dist/exports/adminClient.js +1 -1
- package/dist/exports/index.d.ts +1 -1
- package/dist/goals/fairness.js +43 -34
- package/dist/hooks/blockRemovalRule.d.ts +4 -3
- package/dist/hooks/blockRemovalRule.js +33 -9
- package/dist/hooks/pageGuard.d.ts +3 -0
- package/dist/hooks/pageGuard.js +34 -24
- package/dist/hooks/puckNestedTests.d.ts +8 -0
- package/dist/hooks/puckNestedTests.js +36 -0
- package/dist/lib/placementPages.d.ts +2 -1
- package/dist/lib/placementPages.js +10 -2
- package/dist/manifest/compile.d.ts +2 -1
- package/dist/manifest/compile.js +5 -1
- package/dist/puck/ExperimentPicker.d.ts +2 -1
- package/dist/puck/ExperimentPicker.js +37 -30
- package/dist/puck/ExperimentSlot.js +3 -1
- package/dist/puck/copy.d.ts +1 -0
- package/dist/puck/copy.js +1 -0
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +8 -4
- package/dist/puck/editor/ConfigureTestDrawer.js +4 -2
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +2 -1
- package/dist/puck/editor/CreateExperimentDrawer.js +24 -20
- package/dist/puck/editor/EditorControls.d.ts +1 -1
- package/dist/puck/editor/EditorControls.js +1 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +405 -394
- package/dist/puck/editor/LeftoverVersions.d.ts +4 -2
- package/dist/puck/editor/LeftoverVersions.js +23 -44
- package/dist/puck/editor/QuickTestActions.js +2 -2
- package/dist/puck/editor/VersionBuilder.d.ts +41 -13
- package/dist/puck/editor/VersionBuilder.js +461 -224
- package/dist/puck/editor/armWrites.d.ts +9 -2
- package/dist/puck/editor/armWrites.js +40 -2
- package/dist/puck/editor/armsCache.d.ts +1 -1
- package/dist/puck/editor/armsCache.js +2 -1
- package/dist/puck/editor/blockClipboard.d.ts +16 -0
- package/dist/puck/editor/blockClipboard.js +20 -0
- package/dist/puck/editor/copy.d.ts +27 -26
- package/dist/puck/editor/copy.js +28 -26
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +138 -17
- package/dist/puck/editor/editor.css +156 -22
- package/dist/puck/editor/editor.model.d.ts +2 -1
- package/dist/puck/editor/editor.model.js +3 -3
- package/dist/puck/editor/experimentOutlinePlugin.js +1 -1
- package/dist/puck/editor/localPlacements.d.ts +5 -2
- package/dist/puck/editor/localPlacements.js +32 -18
- package/dist/puck/editor/placementsCache.d.ts +18 -12
- package/dist/puck/editor/placementsCache.js +52 -47
- package/dist/puck/editor/sidebar.d.ts +2 -6
- package/dist/puck/editor/sidebar.js +3 -6
- package/dist/puck/editor/usePlacementNotice.d.ts +1 -1
- package/dist/puck/editor/usePlacementNotice.js +4 -3
- 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 +1 -1
- package/dist/puck/slotConfig.js +17 -4
- package/dist/puck/visibility.d.ts +20 -0
- package/dist/puck/visibility.js +81 -0
- package/dist/server/recordContentChange.js +37 -20
- package/dist/server/resolveExperimentData.js +6 -3
- package/dist/testSurface/PreviewLinks.js +6 -2
- package/dist/testSurface/api.d.ts +6 -3
- package/dist/testSurface/api.js +10 -6
- package/dist/testSurface/contentLocaleURL.d.ts +2 -0
- package/dist/testSurface/contentLocaleURL.js +3 -0
- package/dist/testSurface/copy/common.d.ts +4 -0
- package/dist/testSurface/copy/common.js +8 -4
- package/dist/testSurface/copy/languages.d.ts +11 -0
- package/dist/testSurface/copy/languages.js +7 -0
- package/dist/testSurface/copy/readiness.d.ts +2 -1
- package/dist/testSurface/copy/readiness.js +2 -1
- package/dist/testSurface/copy/testPage.d.ts +28 -6
- package/dist/testSurface/copy/testPage.js +28 -6
- package/dist/testSurface/placementLabel.d.ts +8 -0
- package/dist/testSurface/placementLabel.js +24 -0
- package/dist/testSurface/placements/placementLabels.d.ts +2 -0
- package/dist/testSurface/placements/placementLabels.js +2 -1
- package/dist/testSurface/results/results.css +1 -1
- package/dist/testSurface/results/results.model.d.ts +1 -1
- package/dist/testSurface/surface/contracts.d.ts +2 -0
- package/dist/testSurface/surface/editorPlacement.d.ts +5 -0
- package/dist/testSurface/surface/editorPlacement.js +18 -0
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +2 -1
- package/dist/testSurface/surface/pageBlock/parts.js +24 -6
- package/dist/testSurface/surface/readiness/ActionDialogs.js +28 -34
- package/dist/testSurface/surface/readiness/readiness.model.js +9 -2
- package/dist/testSurface/surface/results/useResults.d.ts +4 -1
- package/dist/testSurface/surface/test/DeleteTest.d.ts +15 -0
- package/dist/testSurface/surface/test/DeleteTest.js +171 -0
- package/dist/testSurface/surface/test/GoalSection.js +101 -74
- package/dist/testSurface/surface/test/TestSurface.js +29 -9
- package/dist/testSurface/surface/test/fields.d.ts +1 -3
- package/dist/testSurface/surface/test/fields.js +5 -35
- package/dist/testSurface/surface/useTestDocument.d.ts +2 -1
- package/dist/testSurface/surface/useTestDocument.js +20 -4
- package/dist/testSurface/useApi.d.ts +4 -1
- package/dist/transitions/checkStart.d.ts +4 -1
- package/dist/transitions/checkStart.js +117 -14
- package/dist/transitions/contentFields.js +9 -5
- package/dist/transitions/makeContent.js +29 -9
- package/dist/transitions/nestedPlacementNames.d.ts +5 -0
- package/dist/transitions/nestedPlacementNames.js +33 -0
- package/dist/transitions/pageVersions.js +3 -1
- package/dist/transitions/placementInteractions.js +7 -4
- package/dist/transitions/placements.d.ts +26 -1
- package/dist/transitions/placements.js +239 -87
- package/dist/transitions/preflightData.d.ts +2 -1
- package/dist/transitions/preflightData.js +66 -3
- package/dist/transitions/start.js +4 -1
- package/dist/types/endpoints.d.ts +35 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/puck.d.ts +1 -0
- package/dist/types/surface.d.ts +2 -0
- package/dist/ui/Button.js +2 -2
- package/dist/ui/Inputs.d.ts +4 -3
- package/dist/ui/Inputs.js +7 -4
- package/dist/ui/SelectControl.d.ts +33 -0
- package/dist/ui/SelectControl.js +504 -0
- package/dist/ui/Tabs.d.ts +0 -1
- package/dist/ui/Tabs.js +28 -40
- package/dist/ui/ui.css +18 -5
- package/package.json +3 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { nestedPlacementNames, nameNestedPlacements } from './nestedPlacementNames.js';
|
|
2
|
+
import { nestedTestCopy } from '../puck/nestedTestCopy.js';
|
|
1
3
|
import { goalContent } from '../goals/fairness.js';
|
|
2
4
|
import { detached } from './placementInteractions.js';
|
|
3
5
|
import { lockAndRescanPlacements, placementInteractions } from './placementInteractions.js';
|
|
@@ -35,6 +37,7 @@ export async function readExperiment(req, id) {
|
|
|
35
37
|
}
|
|
36
38
|
export function refuse(code, detail) {
|
|
37
39
|
const messages = {
|
|
40
|
+
'nested-tests': nestedTestCopy.readiness(detail),
|
|
38
41
|
'goal-in-some-versions': asymmetricGoalsCopy(detail),
|
|
39
42
|
'placements-changed': "This test's pages changed while it was starting. Try again.",
|
|
40
43
|
'page-busy': "One of this test's pages is being saved right now. Try again in a moment.",
|
|
@@ -137,7 +140,7 @@ export async function start(req, { experimentId, options }) {
|
|
|
137
140
|
const failure = checkStart({
|
|
138
141
|
...input,
|
|
139
142
|
experiment: current,
|
|
140
|
-
placements: rescan.placements
|
|
143
|
+
placements: nameNestedPlacements(rescan.placements, await nestedPlacementNames(req, rescan.placements))
|
|
141
144
|
}).find((check)=>!check.ok);
|
|
142
145
|
if (failure && failure.code !== 'page-targets-unchecked' && failure.code !== 'make-content-unsupported') refuse(failure.code, failure.detail);
|
|
143
146
|
}
|
|
@@ -7,7 +7,7 @@ import type { Snapshot, VerdictCode } from './snapshot.js';
|
|
|
7
7
|
export type ArmIssueCode = 'weights-total' | 'control-count' | 'control-first' | 'holdout-last' | 'holdout-count' | 'variant-count' | 'duplicate-key' | 'duplicate-slot' | 'slot-required' | 'invalid-key';
|
|
8
8
|
/** Content-report dismiss/restore refusals (CORE-44). */
|
|
9
9
|
export type ContentEntryRefusal = 'not-decided' | 'entry-not-found' | 'entry-ok' | 'entry-dismissed' | 'entry-not-dismissed';
|
|
10
|
-
export type RefusalCode = ArmIssueCode | 'goal-in-some-versions' | 'placement-unchecked' | 'placement-unpublished' | 'duplicate-version-row' | 'interacting-tests' | 'placements-changed' | 'page-busy' | 'wrap-target-missing' | 'version-identical' | 'version-same-address' | 'unknown-collection' | 'not-found' | ContentEntryRefusal | 'no-planned-duration' | 'no-primary-metric' | 'no-placements' | 'placement-removed' | 'empty-slot' | 'page-in-use' | 'page-no-targets' | 'page-target-unpublished' | 'page-user-unit' | 'version-page-unavailable' | 'version-page-unchecked' | 'flag-no-point' | 'flag-params-invalid' | 'flag-point-busy' | 'flag-placement-missing' | 'layer-full' | 'layer-unit-mismatch' | 'unknown-metric-source' | 'unit-source-mismatch' | 'no-reach-per-day' | 'invalid-status' | 'stale-draft' | 'stale-edit' | 'commit-unverified' | 'allocation-lower' | 'confirmation-required' | 'invalid-winner' | 'slices-taken' | 'locked-placement' | 'not-implemented' | 'forbidden' | 'unauthenticated' | 'body-too-large' | 'invalid-body' | 'too-many-ids' | 'invalid-phase' | 'invalid-ids' | 'recompute-failed' | 'analysis-failed' | 'undeclared-targeting-key' | 'invalid-targeting-rule' | 'block-path-rule' | 'duplicate-metric';
|
|
10
|
+
export type RefusalCode = ArmIssueCode | 'nested-tests' | 'goal-in-some-versions' | 'placement-unchecked' | 'placement-unpublished' | 'duplicate-version-row' | 'interacting-tests' | 'placements-changed' | 'page-busy' | 'wrap-target-missing' | 'version-identical' | 'version-same-address' | 'unknown-collection' | 'not-found' | ContentEntryRefusal | 'no-planned-duration' | 'no-primary-metric' | 'no-placements' | 'placement-removed' | 'empty-slot' | 'page-in-use' | 'page-no-targets' | 'page-target-unpublished' | 'page-user-unit' | 'version-page-unavailable' | 'version-page-unchecked' | 'flag-no-point' | 'flag-params-invalid' | 'flag-point-busy' | 'flag-placement-missing' | 'layer-full' | 'layer-unit-mismatch' | 'unknown-metric-source' | 'unit-source-mismatch' | 'no-reach-per-day' | 'invalid-status' | 'stale-draft' | 'stale-edit' | 'commit-unverified' | 'allocation-lower' | 'confirmation-required' | 'invalid-winner' | 'slices-taken' | 'locked-placement' | 'not-implemented' | 'forbidden' | 'unauthenticated' | 'body-too-large' | 'invalid-body' | 'too-many-ids' | 'invalid-phase' | 'invalid-ids' | 'recompute-failed' | 'analysis-failed' | 'undeclared-targeting-key' | 'invalid-targeting-rule' | 'block-path-rule' | 'duplicate-metric';
|
|
11
11
|
export type ErrorEnvelope = {
|
|
12
12
|
errors: Array<{
|
|
13
13
|
code: RefusalCode;
|
|
@@ -89,6 +89,9 @@ export type PreflightResult = {
|
|
|
89
89
|
collection: string;
|
|
90
90
|
id: DocId;
|
|
91
91
|
title: string;
|
|
92
|
+
locales?: string[];
|
|
93
|
+
allLocales?: true;
|
|
94
|
+
slotCount?: number;
|
|
92
95
|
url?: string;
|
|
93
96
|
editorUrl?: string;
|
|
94
97
|
slots?: Record<ArmSlot, number>;
|
|
@@ -251,6 +254,7 @@ export type PlacementStatusResult = {
|
|
|
251
254
|
slot?: string;
|
|
252
255
|
}>;
|
|
253
256
|
winnerArm?: string;
|
|
257
|
+
discarded?: boolean;
|
|
254
258
|
rollout: boolean;
|
|
255
259
|
}>;
|
|
256
260
|
};
|
|
@@ -261,3 +265,33 @@ export type WrapBlockBody = {
|
|
|
261
265
|
blockId: string;
|
|
262
266
|
experiment: string;
|
|
263
267
|
};
|
|
268
|
+
/** Current visitor effect of deleting a draft or archived test; independent of its stored content report. */
|
|
269
|
+
export type DeleteImpactResult = {
|
|
270
|
+
effect: 'none';
|
|
271
|
+
} | {
|
|
272
|
+
effect: 'block';
|
|
273
|
+
controlLabel: string;
|
|
274
|
+
unreadablePages: number;
|
|
275
|
+
pageCount: number;
|
|
276
|
+
placements: Array<{
|
|
277
|
+
collection: string;
|
|
278
|
+
id: DocId;
|
|
279
|
+
title: string;
|
|
280
|
+
path: string | null;
|
|
281
|
+
locales?: string[];
|
|
282
|
+
allLocales?: true;
|
|
283
|
+
before: {
|
|
284
|
+
key: string;
|
|
285
|
+
label: string;
|
|
286
|
+
};
|
|
287
|
+
after: {
|
|
288
|
+
key: string;
|
|
289
|
+
label: string;
|
|
290
|
+
};
|
|
291
|
+
}>;
|
|
292
|
+
} | {
|
|
293
|
+
effect: 'page';
|
|
294
|
+
winnerPath: string;
|
|
295
|
+
addresses: string[];
|
|
296
|
+
afterPaths?: Record<string, string>;
|
|
297
|
+
};
|
package/dist/types/endpoints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { };
|
|
1
|
+
/** Current visitor effect of deleting a draft or archived test; independent of its stored content report. */ export { };
|
package/dist/types/puck.d.ts
CHANGED
package/dist/types/surface.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface TestsSurfaceProps {
|
|
|
7
7
|
returnToTest?: string;
|
|
8
8
|
adminRoute: string;
|
|
9
9
|
apiRoute: string;
|
|
10
|
+
contentLanguageLabels?: string[];
|
|
11
|
+
contentLocale?: string;
|
|
10
12
|
collectionTitles?: Record<string, string>;
|
|
11
13
|
userId?: string | number;
|
|
12
14
|
userCollection?: string;
|
package/dist/ui/Button.js
CHANGED
|
@@ -12,7 +12,7 @@ export function Button({ variant = 'secondary', size = 'md', disabled, busy, cla
|
|
|
12
12
|
href: blocked ? undefined : href,
|
|
13
13
|
role: blocked ? 'link' : undefined,
|
|
14
14
|
"aria-disabled": blocked || undefined,
|
|
15
|
-
"aria-busy": busy || undefined,
|
|
15
|
+
"aria-busy": busy || props['aria-busy'] || undefined,
|
|
16
16
|
tabIndex: blocked ? -1 : rest.tabIndex,
|
|
17
17
|
onClick: (event)=>{
|
|
18
18
|
if (blocked) event.preventDefault();
|
|
@@ -26,7 +26,7 @@ export function Button({ variant = 'secondary', size = 'md', disabled, busy, cla
|
|
|
26
26
|
type: props.type ?? 'button',
|
|
27
27
|
className: classes,
|
|
28
28
|
disabled: blocked,
|
|
29
|
-
"aria-busy": busy || undefined,
|
|
29
|
+
"aria-busy": busy || props['aria-busy'] || undefined,
|
|
30
30
|
children: children
|
|
31
31
|
});
|
|
32
32
|
}
|
package/dist/ui/Inputs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { InputHTMLAttributes,
|
|
1
|
+
import type { InputHTMLAttributes, TextareaHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { SelectControlProps } from './SelectControl.js';
|
|
2
3
|
import './ui.css';
|
|
3
4
|
export interface FieldProps {
|
|
4
5
|
id: string;
|
|
@@ -12,8 +13,8 @@ export declare function NumberInput(props: TextInputProps): import("react").JSX.
|
|
|
12
13
|
export declare function SearchInput(props: TextInputProps): import("react").JSX.Element;
|
|
13
14
|
export type SelectProps = FieldProps & {
|
|
14
15
|
labelAction?: ReactNode;
|
|
15
|
-
} & Omit<
|
|
16
|
-
export declare function Select({ label, labelAction, help, error,
|
|
16
|
+
} & Omit<SelectControlProps, 'id'>;
|
|
17
|
+
export declare function Select({ label, labelAction, help, error, ...props }: SelectProps): import("react").JSX.Element;
|
|
17
18
|
export declare function Toggle({ label, help, error, className, ...props }: Omit<TextInputProps, 'type'>): import("react").JSX.Element;
|
|
18
19
|
export type TextareaProps = FieldProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'id'>;
|
|
19
20
|
export declare function Textarea({ label, help, error, className, ...props }: TextareaProps): import("react").JSX.Element;
|
package/dist/ui/Inputs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SelectControl } from './SelectControl.js';
|
|
3
4
|
import './ui.css';
|
|
4
5
|
function described(props, extra) {
|
|
5
6
|
return [
|
|
@@ -16,12 +17,14 @@ function Field({ id, label, labelAction, help, error, children }) {
|
|
|
16
17
|
className: "xp-ui-field-label",
|
|
17
18
|
children: [
|
|
18
19
|
/*#__PURE__*/ _jsx("label", {
|
|
20
|
+
id: `${id}-label`,
|
|
19
21
|
htmlFor: id,
|
|
20
22
|
children: label
|
|
21
23
|
}),
|
|
22
24
|
labelAction
|
|
23
25
|
]
|
|
24
26
|
}) : /*#__PURE__*/ _jsx("label", {
|
|
27
|
+
id: `${id}-label`,
|
|
25
28
|
htmlFor: id,
|
|
26
29
|
children: label
|
|
27
30
|
}),
|
|
@@ -70,7 +73,7 @@ export function SearchInput(props) {
|
|
|
70
73
|
type: "search"
|
|
71
74
|
});
|
|
72
75
|
}
|
|
73
|
-
export function Select({ label, labelAction, help, error,
|
|
76
|
+
export function Select({ label, labelAction, help, error, ...props }) {
|
|
74
77
|
const field = {
|
|
75
78
|
id: props.id,
|
|
76
79
|
label,
|
|
@@ -80,10 +83,10 @@ export function Select({ label, labelAction, help, error, className = '', ...pro
|
|
|
80
83
|
return /*#__PURE__*/ _jsx(Field, {
|
|
81
84
|
...field,
|
|
82
85
|
labelAction: labelAction,
|
|
83
|
-
children: /*#__PURE__*/ _jsx(
|
|
86
|
+
children: /*#__PURE__*/ _jsx(SelectControl, {
|
|
84
87
|
...props,
|
|
85
|
-
|
|
86
|
-
"aria-invalid": Boolean(error) || undefined,
|
|
88
|
+
"aria-labelledby": props['aria-labelledby'] ?? (props['aria-label'] ? undefined : `${props.id}-label`),
|
|
89
|
+
"aria-invalid": Boolean(error) || props['aria-invalid'] || undefined,
|
|
87
90
|
"aria-describedby": described(field, props['aria-describedby'])
|
|
88
91
|
})
|
|
89
92
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
group?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectChange {
|
|
9
|
+
target: {
|
|
10
|
+
value: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
};
|
|
13
|
+
currentTarget: {
|
|
14
|
+
value: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface SelectControlProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value' | 'defaultValue' | 'children'> {
|
|
19
|
+
id: string;
|
|
20
|
+
value?: string | number | readonly string[];
|
|
21
|
+
defaultValue?: string | number | readonly string[];
|
|
22
|
+
options?: readonly SelectOption[];
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
onChange?: (event: SelectChange) => void;
|
|
25
|
+
name?: string;
|
|
26
|
+
form?: string;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** Select-only combobox: DOM focus stays on the button while active-descendant
|
|
30
|
+
* focus explores the list. The manual popover lives in the trigger's document
|
|
31
|
+
* and inherits its theme; the browser's top layer escapes scroll/iframe drawers.
|
|
32
|
+
*/
|
|
33
|
+
export declare function SelectControl({ id, value, defaultValue, options: supplied, children, onChange, name, form, required, disabled, className, onKeyDown, onBlur, ...props }: SelectControlProps): import("react").JSX.Element;
|