@elaraai/e3-ui-components 1.0.22 → 1.0.24
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/diff/index.d.ts.map +1 -1
- package/dist/experiment/derive.d.ts +5 -3
- package/dist/experiment/derive.d.ts.map +1 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/index.cjs +153 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +154 -83
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
package/dist/diff/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,OAAO,EAUH,KAAK,WAAW,EAQnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AAwBhE,KAAK,SAAS,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,OAAO,EAUH,KAAK,WAAW,EAQnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AAwBhE,KAAK,SAAS,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AA61B3D,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,2DA2asC,CAAC;AAM3D,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ValueTypeOf, option } from '@elaraai/east';
|
|
2
|
-
import { Experiment } from '@elaraai/e3-ui';
|
|
2
|
+
import { Experiment } from '@elaraai/e3-ui/internal';
|
|
3
3
|
import { HelpId } from './help.js';
|
|
4
4
|
/** The complete, honest experiment result. */
|
|
5
5
|
export type ResultValue = ValueTypeOf<typeof Experiment.Types.Result>;
|
|
6
6
|
/** The staged experiment config. */
|
|
7
7
|
export type ConfigValue = ValueTypeOf<typeof Experiment.Types.Config>;
|
|
8
|
-
/** A
|
|
9
|
-
export type
|
|
8
|
+
/** A named configuration — a vetted question + scope + optional precomputed answer. */
|
|
9
|
+
export type ConfigurationValue = ValueTypeOf<typeof Experiment.Types.Configuration>;
|
|
10
10
|
/** A confidence interval. */
|
|
11
11
|
export type Ci = ValueTypeOf<typeof Experiment.Types.Ci>;
|
|
12
12
|
/** The adjusted (like-for-like) effect + CI. */
|
|
@@ -180,6 +180,8 @@ export interface ExperimentView {
|
|
|
180
180
|
* and the (possibly absent) single experiment result.
|
|
181
181
|
*
|
|
182
182
|
* @param config - The staged {@link ConfigValue}.
|
|
183
|
+
* @param ranConfig - The config that produced `result` (the result deck reads this so its
|
|
184
|
+
* strings never drift ahead of the numbers on a live edit before the next Run).
|
|
183
185
|
* @param cols - The bound dataset's columns (name + type family).
|
|
184
186
|
* @param result - The experiment result, or `null` until the first Run settles.
|
|
185
187
|
* @param journal - Committed rows, or `null`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../src/experiment/derive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../src/experiment/derive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAy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CAoEpI;AAGD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experiment/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAAuF,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAyCrD,KAAK,iBAAiB,GAAG,WAAW,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experiment/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAAuF,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAyCrD,KAAK,iBAAiB,GAAG,WAAW,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AA+KzE,MAAM,WAAW,yBAAyB;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,QAAA,MAAM,oBAAoB,iEAgkB6E,CAAC;AAwWxG,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,6 @@ const React = require("react");
|
|
|
30
30
|
const react = require("@chakra-ui/react");
|
|
31
31
|
const eastUiComponents = require("@elaraai/east-ui-components");
|
|
32
32
|
const reactDom = require("react-dom");
|
|
33
|
-
require("@elaraai/e3-ui");
|
|
34
33
|
const internal$2 = require("@elaraai/east-ui/internal");
|
|
35
34
|
const reactQuery = require("@tanstack/react-query");
|
|
36
35
|
const reactVirtual = require("@tanstack/react-virtual");
|
|
@@ -8390,6 +8389,7 @@ function useDatasetKeyVersions(workspace, paths) {
|
|
|
8390
8389
|
);
|
|
8391
8390
|
return React.useSyncExternalStore(subscribe, getSnapshot);
|
|
8392
8391
|
}
|
|
8392
|
+
const warnedDirectNoPatch = /* @__PURE__ */ new Set();
|
|
8393
8393
|
function pickCommitKind(mode, patchPath) {
|
|
8394
8394
|
if (mode === "staged" && !patchPath) return "apply-buffer-to-source";
|
|
8395
8395
|
if (mode === "staged" && patchPath) return "publish-buffer-to-patch";
|
|
@@ -8407,7 +8407,16 @@ function deriveBindings(workspace, bindings) {
|
|
|
8407
8407
|
const types = getBindingTypes(workspace, sourcePath);
|
|
8408
8408
|
if (!types) continue;
|
|
8409
8409
|
const commitKind = pickCommitKind(mode, patchPath);
|
|
8410
|
-
if (!commitKind)
|
|
8410
|
+
if (!commitKind) {
|
|
8411
|
+
const key = datasetPathToString(sourcePath);
|
|
8412
|
+
if (!warnedDirectNoPatch.has(key)) {
|
|
8413
|
+
warnedDirectNoPatch.add(key);
|
|
8414
|
+
console.warn(
|
|
8415
|
+
`[Diff] binding "${key}" is mode="direct" with no patch dataset — it writes through immediately, so the Diff has nothing to review. Pass { mode: "staged" } to Data.bind (or give it a patch dataset) to surface its edits here.`
|
|
8416
|
+
);
|
|
8417
|
+
}
|
|
8418
|
+
continue;
|
|
8419
|
+
}
|
|
8411
8420
|
const sourceType = types.sourceType;
|
|
8412
8421
|
const patchType = types.patchType;
|
|
8413
8422
|
const label = formatBindingLabel(sourcePath);
|
|
@@ -60727,9 +60736,28 @@ function DeckSkeleton({ tab }) {
|
|
|
60727
60736
|
] })
|
|
60728
60737
|
] });
|
|
60729
60738
|
}
|
|
60739
|
+
function LoadingSkeleton() {
|
|
60740
|
+
const sk = react.useRecipe({ key: "skeleton" });
|
|
60741
|
+
const line2 = (w2, h2) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: sk({ variant: "line" }), width: w2, height: h2 });
|
|
60742
|
+
const block = (h2) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: sk({ variant: "block" }), width: "100%", minHeight: h2 });
|
|
60743
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { layerStyle: "frame", overflow: "visible", children: [
|
|
60744
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { layerStyle: "header.bar", display: "flex", alignItems: "center", gap: "3.5", children: [
|
|
60745
|
+
line2("260px", "20px"),
|
|
60746
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: "1" }),
|
|
60747
|
+
line2("72px", "16px")
|
|
60748
|
+
] }),
|
|
60749
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "grid", gridTemplateColumns: "304px minmax(0,1fr)", alignItems: "start", children: [
|
|
60750
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { borderRightWidth: "1px", borderColor: "border.subtle", p: "4.5", display: "flex", flexDirection: "column", gap: "5", children: [0, 1, 2, 3].map((n2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "flex", flexDirection: "column", gap: "2", children: [
|
|
60751
|
+
line2("150px", "12px"),
|
|
60752
|
+
block("40px")
|
|
60753
|
+
] }, n2)) }),
|
|
60754
|
+
/* @__PURE__ */ jsxRuntime.jsx(DeckSkeleton, { tab: "answer" })
|
|
60755
|
+
] })
|
|
60756
|
+
] });
|
|
60757
|
+
}
|
|
60730
60758
|
const experimentValueEqual = east.equalFor(internal.Experiment.Component.schema);
|
|
60731
60759
|
const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }) {
|
|
60732
|
-
var _a2, _b2, _c2
|
|
60760
|
+
var _a2, _b2, _c2;
|
|
60733
60761
|
const v3 = value;
|
|
60734
60762
|
const button = react.useRecipe({ key: "button" });
|
|
60735
60763
|
const chip = react.useRecipe({ key: "chip" });
|
|
@@ -60739,27 +60767,48 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60739
60767
|
const es = react.useSlotRecipe({ key: "eyebrowRow" })({});
|
|
60740
60768
|
const workspace = getReactiveDatasetCache().getConfig().workspace ?? "";
|
|
60741
60769
|
const data4 = useBindingValue(v3.data);
|
|
60742
|
-
const configBind = useBindingValue(v3.config);
|
|
60743
60770
|
const journalBind = useBindingValue(v3.journal.type === "some" ? v3.journal.value : null);
|
|
60744
|
-
const populationBind = useBindingValue(v3.population.type === "some" ? v3.population.value : null);
|
|
60745
60771
|
const meta3 = eastUiComponents.getSomeorUndefined(v3.columnMeta);
|
|
60746
60772
|
const readonly = eastUiComponents.getSomeorUndefined(v3.readonly) ?? false;
|
|
60747
|
-
const
|
|
60748
|
-
const
|
|
60749
|
-
const
|
|
60773
|
+
const configsBind = useBindingValue(v3.configs);
|
|
60774
|
+
const configs = React.useMemo(() => configsBind.value ?? [], [configsBind.value]);
|
|
60775
|
+
const [currentConfigId, setCurrentConfigId] = React.useState(void 0);
|
|
60776
|
+
const selectedEntry = React.useMemo(
|
|
60777
|
+
() => configs.find((c2) => c2.id === currentConfigId) ?? configs[0],
|
|
60778
|
+
[configs, currentConfigId]
|
|
60779
|
+
);
|
|
60780
|
+
React.useEffect(() => {
|
|
60781
|
+
const first2 = configs[0];
|
|
60782
|
+
if (currentConfigId === void 0 && first2 !== void 0) setCurrentConfigId(first2.id);
|
|
60783
|
+
}, [configs, currentConfigId]);
|
|
60784
|
+
const configGroups = React.useMemo(() => {
|
|
60750
60785
|
const buckets = /* @__PURE__ */ new Map();
|
|
60751
|
-
for (const
|
|
60752
|
-
const label = eastUiComponents.getSomeorUndefined(
|
|
60786
|
+
for (const c2 of configs) {
|
|
60787
|
+
const label = eastUiComponents.getSomeorUndefined(c2.group) ?? "Questions";
|
|
60753
60788
|
const bucket = buckets.get(label);
|
|
60754
|
-
if (bucket) bucket.push(
|
|
60755
|
-
else buckets.set(label, [
|
|
60789
|
+
if (bucket) bucket.push(c2);
|
|
60790
|
+
else buckets.set(label, [c2]);
|
|
60756
60791
|
}
|
|
60757
60792
|
return [...buckets].map(([label, items]) => ({ label, items }));
|
|
60758
|
-
}, [
|
|
60793
|
+
}, [configs]);
|
|
60759
60794
|
const { columns, rowArrayType } = useColumns(workspace, v3.data.source);
|
|
60760
|
-
const
|
|
60795
|
+
const [workingConfig, setWorkingConfig] = React.useState(void 0);
|
|
60761
60796
|
const [localPop, setLocalPop] = React.useState([]);
|
|
60762
|
-
const
|
|
60797
|
+
const [stale, setStale] = React.useState(false);
|
|
60798
|
+
const seededIdRef = React.useRef(void 0);
|
|
60799
|
+
React.useEffect(() => {
|
|
60800
|
+
const id3 = selectedEntry == null ? void 0 : selectedEntry.id;
|
|
60801
|
+
if (id3 === seededIdRef.current) return;
|
|
60802
|
+
const switching = seededIdRef.current !== void 0;
|
|
60803
|
+
seededIdRef.current = id3;
|
|
60804
|
+
setWorkingConfig(selectedEntry == null ? void 0 : selectedEntry.spec);
|
|
60805
|
+
setLocalPop(eastUiComponents.getSomeorUndefined(selectedEntry == null ? void 0 : selectedEntry.population) ?? []);
|
|
60806
|
+
const precomputed = (selectedEntry == null ? void 0 : selectedEntry.result.type) === "some";
|
|
60807
|
+
const hasEstimator = v3.experiment.type === "some";
|
|
60808
|
+
setStale(switching && hasEstimator && !precomputed);
|
|
60809
|
+
}, [selectedEntry, v3.experiment.type]);
|
|
60810
|
+
const config2 = workingConfig;
|
|
60811
|
+
const population = localPop;
|
|
60763
60812
|
const filteredRows = React.useMemo(() => {
|
|
60764
60813
|
if (!data4.value) return null;
|
|
60765
60814
|
return population.length ? data4.value.filter((r2) => rowMatchesAll(r2, population)) : data4.value;
|
|
@@ -60776,7 +60825,9 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60776
60825
|
[columns, meta3]
|
|
60777
60826
|
);
|
|
60778
60827
|
const estInputs = React.useMemo(() => rowArrayType ? [rowArrayType, internal.Experiment.Types.Config] : null, [rowArrayType]);
|
|
60779
|
-
const experiment = useFuncCall(v3.experiment.name, estInputs, internal.Experiment.Types.Result);
|
|
60828
|
+
const experiment = useFuncCall(v3.experiment.type === "some" ? v3.experiment.value.name : null, estInputs, internal.Experiment.Types.Result);
|
|
60829
|
+
const hasExperiment = v3.experiment.type === "some";
|
|
60830
|
+
const shownResult = experiment.result ?? eastUiComponents.getSomeorUndefined(selectedEntry == null ? void 0 : selectedEntry.result) ?? null;
|
|
60780
60831
|
const hasDesign = v3.design.type === "some";
|
|
60781
60832
|
const designInputs = React.useMemo(
|
|
60782
60833
|
() => rowArrayType ? [rowArrayType, internal.Experiment.Types.Config, internal.Experiment.Types.Result, internal.Experiment.Types.DesignConfig] : null,
|
|
@@ -60791,8 +60842,13 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60791
60842
|
experiment.call(filteredRows, config2);
|
|
60792
60843
|
}, [filteredRows, config2, experiment]);
|
|
60793
60844
|
const autoRan = React.useRef(false);
|
|
60845
|
+
const hasPrecomputed = selectedEntry !== void 0 && selectedEntry.result.type === "some";
|
|
60794
60846
|
React.useEffect(() => {
|
|
60795
60847
|
if (autoRan.current) return;
|
|
60848
|
+
if (hasPrecomputed || !hasExperiment) {
|
|
60849
|
+
autoRan.current = true;
|
|
60850
|
+
return;
|
|
60851
|
+
}
|
|
60796
60852
|
if (!filteredRows || !config2 || !rowArrayType) return;
|
|
60797
60853
|
if (experiment.result !== null || experiment.status === "running") {
|
|
60798
60854
|
autoRan.current = true;
|
|
@@ -60802,29 +60858,23 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60802
60858
|
autoRan.current = true;
|
|
60803
60859
|
if (filteredRows.length > AUTORUN_MAX_ROWS) return;
|
|
60804
60860
|
runAll();
|
|
60805
|
-
}, [filteredRows, config2, rowArrayType, experiment.result, experiment.status, runAll]);
|
|
60861
|
+
}, [hasPrecomputed, hasExperiment, filteredRows, config2, rowArrayType, experiment.result, experiment.status, runAll]);
|
|
60806
60862
|
React.useEffect(() => {
|
|
60807
60863
|
if (experiment.result !== null) setRanConfig(pendingConfigRef.current);
|
|
60808
60864
|
}, [experiment.result]);
|
|
60809
|
-
const
|
|
60810
|
-
const editConfig = React.useCallback((next2, fromPreset) => {
|
|
60811
|
-
if (readonly) return;
|
|
60812
|
-
setStale(true);
|
|
60813
|
-
setCurrentPreset(fromPreset);
|
|
60814
|
-
queueMicrotask(() => configBind.mutate(next2));
|
|
60815
|
-
}, [readonly, configBind]);
|
|
60816
|
-
const editPopulation = React.useCallback((next2, fromPreset) => {
|
|
60865
|
+
const editConfig = React.useCallback((next2) => {
|
|
60817
60866
|
if (readonly) return;
|
|
60818
|
-
setStale(true);
|
|
60819
|
-
|
|
60820
|
-
|
|
60821
|
-
|
|
60822
|
-
}, [readonly, v3.population.type, populationBind]);
|
|
60823
|
-
const selectPreset = React.useCallback((p2) => {
|
|
60867
|
+
if (v3.experiment.type === "some") setStale(true);
|
|
60868
|
+
setWorkingConfig(next2);
|
|
60869
|
+
}, [readonly, v3.experiment.type]);
|
|
60870
|
+
const editPopulation = React.useCallback((next2) => {
|
|
60824
60871
|
if (readonly) return;
|
|
60825
|
-
|
|
60826
|
-
|
|
60827
|
-
}, [readonly,
|
|
60872
|
+
if (v3.experiment.type === "some") setStale(true);
|
|
60873
|
+
setLocalPop(next2);
|
|
60874
|
+
}, [readonly, v3.experiment.type]);
|
|
60875
|
+
const selectEntry = React.useCallback((c2) => {
|
|
60876
|
+
setCurrentConfigId(c2.id);
|
|
60877
|
+
}, []);
|
|
60828
60878
|
const onRun = React.useCallback(() => {
|
|
60829
60879
|
runAll();
|
|
60830
60880
|
setStale(false);
|
|
@@ -60839,18 +60889,16 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60839
60889
|
adjusted: r2.adjusted.type === "some" ? east.some(r2.adjusted.value.effect) : east.none,
|
|
60840
60890
|
committed_at: /* @__PURE__ */ new Date(),
|
|
60841
60891
|
committed_by: "you",
|
|
60842
|
-
// Record which
|
|
60843
|
-
preset:
|
|
60892
|
+
// Record which question framed this experiment.
|
|
60893
|
+
preset: currentConfigId !== void 0 ? east.some(currentConfigId) : east.none
|
|
60844
60894
|
};
|
|
60845
60895
|
journalBind.mutate([row, ...journalBind.value ?? []]);
|
|
60846
60896
|
try {
|
|
60847
60897
|
await journalBind.commit();
|
|
60848
|
-
await configBind.commit();
|
|
60849
|
-
if (v3.population.type === "some") await populationBind.commit();
|
|
60850
60898
|
setStale(false);
|
|
60851
60899
|
} catch {
|
|
60852
60900
|
}
|
|
60853
|
-
}, [config2, experiment.result, journalBind,
|
|
60901
|
+
}, [config2, experiment.result, journalBind, currentConfigId]);
|
|
60854
60902
|
const [tab, setTab] = React.useState(((_a2 = eastUiComponents.getSomeorUndefined(v3.defaultTab)) == null ? void 0 : _a2.type) ?? "answer");
|
|
60855
60903
|
const [guidance, setGuidance] = React.useState(true);
|
|
60856
60904
|
const now2 = React.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
@@ -60865,39 +60913,44 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60865
60913
|
}, [ranConfig, config2, meta3]);
|
|
60866
60914
|
const view = React.useMemo(() => {
|
|
60867
60915
|
if (!config2) return null;
|
|
60868
|
-
return deriveView(config2, ranConfig ?? config2, columns,
|
|
60869
|
-
}, [config2, ranConfig, columns,
|
|
60916
|
+
return deriveView(config2, ranConfig ?? config2, columns, shownResult, journalBind.value, meta3, nRows, now2);
|
|
60917
|
+
}, [config2, ranConfig, columns, shownResult, journalBind.value, meta3, nRows, now2]);
|
|
60870
60918
|
const designConfigValue = React.useMemo(() => ({
|
|
60871
60919
|
alpha: east.none,
|
|
60872
60920
|
target_power: east.none,
|
|
60873
60921
|
materiality: east.none,
|
|
60874
60922
|
treated_shares: east.some([0.5, 0.3])
|
|
60875
60923
|
}), []);
|
|
60924
|
+
const precomputedDesign = eastUiComponents.getSomeorUndefined(selectedEntry == null ? void 0 : selectedEntry.design) ?? null;
|
|
60876
60925
|
const designSnapRef = React.useRef(null);
|
|
60877
60926
|
React.useEffect(() => {
|
|
60878
60927
|
var _a3;
|
|
60879
|
-
if (tab !== "validate" || !hasDesign || design.pending) return;
|
|
60880
|
-
if (!filteredRows || !config2 || !
|
|
60881
|
-
if (((_a3 = designSnapRef.current) == null ? void 0 : _a3.result) ===
|
|
60882
|
-
designSnapRef.current = { result:
|
|
60883
|
-
design.call(filteredRows, ranConfig ?? config2,
|
|
60884
|
-
}, [tab, hasDesign, filteredRows, config2, ranConfig,
|
|
60885
|
-
const vmDesign = React.useMemo(
|
|
60886
|
-
(
|
|
60887
|
-
|
|
60888
|
-
);
|
|
60889
|
-
const designFresh = design.result !== null && ((_b2 = designSnapRef.current) == null ? void 0 : _b2.result) ===
|
|
60928
|
+
if (tab !== "validate" || !hasDesign || design.pending || precomputedDesign !== null) return;
|
|
60929
|
+
if (!filteredRows || !config2 || !shownResult) return;
|
|
60930
|
+
if (((_a3 = designSnapRef.current) == null ? void 0 : _a3.result) === shownResult) return;
|
|
60931
|
+
designSnapRef.current = { result: shownResult, config: ranConfig ?? config2 };
|
|
60932
|
+
design.call(filteredRows, ranConfig ?? config2, shownResult, designConfigValue);
|
|
60933
|
+
}, [tab, hasDesign, precomputedDesign, filteredRows, config2, ranConfig, shownResult, design, designConfigValue]);
|
|
60934
|
+
const vmDesign = React.useMemo(() => {
|
|
60935
|
+
if (precomputedDesign !== null && shownResult !== null && config2) return deriveDesign(precomputedDesign, shownResult, ranConfig ?? config2, meta3);
|
|
60936
|
+
return design.result && designSnapRef.current ? deriveDesign(design.result, designSnapRef.current.result, designSnapRef.current.config, meta3) : null;
|
|
60937
|
+
}, [precomputedDesign, shownResult, config2, ranConfig, design.result, meta3]);
|
|
60938
|
+
const designFresh = precomputedDesign !== null && shownResult !== null || design.result !== null && ((_b2 = designSnapRef.current) == null ? void 0 : _b2.result) === shownResult && !design.pending;
|
|
60890
60939
|
if (!config2 || !view) {
|
|
60891
60940
|
const failed2 = experiment.status === "failed";
|
|
60892
|
-
const
|
|
60893
|
-
const
|
|
60941
|
+
const noConfigs = !configsBind.error && configs.length === 0;
|
|
60942
|
+
const which = data4.error ? "dataset" : configsBind.error ? "configs" : journalBind.error ? "journal" : null;
|
|
60943
|
+
const bindError = data4.error ?? configsBind.error ?? journalBind.error;
|
|
60894
60944
|
const bindMsg = bindError instanceof Error ? bindError.message : bindError != null ? String(bindError) : null;
|
|
60895
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { layerStyle: "frame", p: "6", children:
|
|
60945
|
+
if (bindMsg) return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { layerStyle: "frame", p: "6", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { textStyle: "body.sm", color: "fg.danger", children: [
|
|
60896
60946
|
"Couldn’t load the experiment ",
|
|
60897
60947
|
which,
|
|
60898
60948
|
": ",
|
|
60899
60949
|
bindMsg
|
|
60900
|
-
] })
|
|
60950
|
+
] }) });
|
|
60951
|
+
if (noConfigs) return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { layerStyle: "frame", p: "6", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "body.sm", color: "fg.muted", children: "No questions to show — bind a non-empty configs list." }) });
|
|
60952
|
+
if (failed2 && experiment.error) return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { layerStyle: "frame", p: "6", children: /* @__PURE__ */ jsxRuntime.jsx(RunError, { error: experiment.error }) });
|
|
60953
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
|
|
60901
60954
|
}
|
|
60902
60955
|
const { spec: vs, answer: a2, refusal: ref, overlap: ov, refute: vr, dose: vd, journal, verdict } = view;
|
|
60903
60956
|
const higherBetter = eastUiComponents.getSomeorUndefined((_c2 = meta3 == null ? void 0 : meta3.get(vs.outcome)) == null ? void 0 : _c2.higherIsBetter);
|
|
@@ -60907,18 +60960,19 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60907
60960
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: bs.track, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: bs.fill, width: `${Math.round(r2.frac * 100)}%`, bg: toneToken(r2.tone) }) }),
|
|
60908
60961
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { css: bs.value, children: r2.value })
|
|
60909
60962
|
] }, i)) });
|
|
60910
|
-
const specStaged = configBind.mode === "staged";
|
|
60911
60963
|
const hasJournal = v3.journal.type === "some";
|
|
60912
|
-
const canRun = !readonly;
|
|
60913
|
-
const canCommit = !readonly &&
|
|
60964
|
+
const canRun = !readonly && hasExperiment;
|
|
60965
|
+
const canCommit = !readonly && hasExperiment && hasJournal;
|
|
60914
60966
|
const runDisabled = !data4.value || experiment.pending;
|
|
60915
60967
|
const commitDisabled = experiment.status !== "succeeded" || experiment.pending || stale;
|
|
60916
60968
|
const failed = experiment.status === "failed" && experiment.error;
|
|
60917
|
-
const showResult =
|
|
60918
|
-
const
|
|
60969
|
+
const showResult = shownResult !== null && !experiment.pending && !failed;
|
|
60970
|
+
const anyPrecomputedDesign = configs.some((c2) => c2.design.type === "some");
|
|
60971
|
+
const showValidate = hasDesign || anyPrecomputedDesign;
|
|
60972
|
+
const tabKeys = [...["answer", "trust", "dose"], ...showValidate ? ["validate"] : []];
|
|
60919
60973
|
return /* @__PURE__ */ jsxRuntime.jsx(GuidanceProvider, { on: guidance, vars: helpVars, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { layerStyle: "frame", overflow: "visible", children: [
|
|
60920
60974
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { layerStyle: "header.bar", display: "flex", alignItems: "center", gap: "3.5", children: [
|
|
60921
|
-
|
|
60975
|
+
configs.length > 1 ? /* @__PURE__ */ jsxRuntime.jsxs(react.Menu.Root, { children: [
|
|
60922
60976
|
/* @__PURE__ */ jsxRuntime.jsx(react.Menu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "button", bg: "transparent", border: "0", p: "0", cursor: "pointer", display: "inline-flex", alignItems: "center", gap: "2", textAlign: "start", children: [
|
|
60923
60977
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { textStyle: "title.card", color: "fg.muted", children: [
|
|
60924
60978
|
"Does ",
|
|
@@ -60929,12 +60983,12 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60929
60983
|
] }),
|
|
60930
60984
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", color: "fg.subtle", fontSize: "11px", lineHeight: "1", children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faChevronDown }) })
|
|
60931
60985
|
] }) }),
|
|
60932
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Content, { minW: "280px", children:
|
|
60933
|
-
g2.label !== "
|
|
60934
|
-
g2.items.map((
|
|
60935
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", width: "14px", flexShrink: "0", color: "brand.fg", children:
|
|
60936
|
-
|
|
60937
|
-
] },
|
|
60986
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Content, { minW: "280px", children: configGroups.map((g2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Menu.ItemGroup, { children: [
|
|
60987
|
+
g2.label !== "Questions" && /* @__PURE__ */ jsxRuntime.jsx(react.Menu.ItemGroupLabel, { textStyle: "caption.eyebrow", fontSize: "9px", children: g2.label }),
|
|
60988
|
+
g2.items.map((c2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Menu.Item, { value: c2.id, onClick: () => selectEntry(c2), gap: "2", children: [
|
|
60989
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", width: "14px", flexShrink: "0", color: "brand.fg", children: c2.id === (selectedEntry == null ? void 0 : selectedEntry.id) && /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faCheck, style: { fontSize: "10px" } }) }),
|
|
60990
|
+
c2.label
|
|
60991
|
+
] }, c2.id))
|
|
60938
60992
|
] }, g2.label)) }) }) })
|
|
60939
60993
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "title.card", color: "fg.muted", children: /* @__PURE__ */ jsxRuntime.jsxs(Help, { id: "header", children: [
|
|
60940
60994
|
"Does ",
|
|
@@ -60944,6 +60998,7 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60944
60998
|
"?"
|
|
60945
60999
|
] }) }),
|
|
60946
61000
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { flex: "1" }),
|
|
61001
|
+
readonly && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: badge({ variant: "plain", size: "sm" }), textTransform: "none", letterSpacing: "normal", children: "View only" }),
|
|
60947
61002
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "span", css: dataStatus.root, children: [
|
|
60948
61003
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: dataStatus.indicator }),
|
|
60949
61004
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: dataStatus.label, children: stale ? `${nRows} rows` : vs.dataLabel })
|
|
@@ -60955,15 +61010,15 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60955
61010
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "grid", gridTemplateColumns: "304px minmax(0,1fr)", alignItems: "start", children: [
|
|
60956
61011
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { borderRightWidth: "1px", borderColor: "border.subtle", children: [
|
|
60957
61012
|
/* @__PURE__ */ jsxRuntime.jsxs(Step, { n: 1, title: "What did you change?", help: "step_treatment", children: [
|
|
60958
|
-
/* @__PURE__ */ jsxRuntime.jsx(ColumnPick, { column: vs.treatment, kind: vs.treatmentKind, badge, button, choices: columns.filter((c2) => c2.kind === "boolean" || c2.kind === "integer").map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, treatment: c2 }) }),
|
|
61013
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColumnPick, { column: vs.treatment, kind: vs.treatmentKind, badge, button, readonly, choices: columns.filter((c2) => c2.kind === "boolean" || c2.kind === "integer").map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, treatment: c2 }) }),
|
|
60959
61014
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { textStyle: "caption", mt: "1.5", children: [
|
|
60960
61015
|
"Treated = ",
|
|
60961
61016
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "fg.default", fontWeight: "semibold", children: vs.comparison })
|
|
60962
61017
|
] })
|
|
60963
61018
|
] }),
|
|
60964
|
-
/* @__PURE__ */ jsxRuntime.jsx(Step, { n: 2, title: "What did you want it to improve?", help: "step_outcome", children: /* @__PURE__ */ jsxRuntime.jsx(ColumnPick, { column: vs.outcome, kind: vs.outcomeKind, badge, button, choices: columns.filter((c2) => c2.kind === "float" || c2.kind === "integer").map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, outcome: c2 }) }) }),
|
|
61019
|
+
/* @__PURE__ */ jsxRuntime.jsx(Step, { n: 2, title: "What did you want it to improve?", help: "step_outcome", children: /* @__PURE__ */ jsxRuntime.jsx(ColumnPick, { column: vs.outcome, kind: vs.outcomeKind, badge, button, readonly, choices: columns.filter((c2) => c2.kind === "float" || c2.kind === "integer").map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, outcome: c2 }) }) }),
|
|
60965
61020
|
/* @__PURE__ */ jsxRuntime.jsx(Step, { n: 3, title: "What else was different?", help: "step_confounders", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { layerStyle: "frame.flat", children: [
|
|
60966
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { maxH: "216px", overflowY: "auto", children: vs.confounders.map((c2, i) => /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "grid", gridTemplateColumns: "1fr 78px 16px", gap: "2.5", alignItems: "center", px: "2.5", py: "2.5", borderTopWidth: i ? "1px" : "0", borderColor: "border.subtle", children: [
|
|
61021
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { maxH: "216px", overflowY: "auto", children: vs.confounders.map((c2, i) => /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "grid", gridTemplateColumns: readonly ? "1fr 78px" : "1fr 78px 16px", gap: "2.5", alignItems: "center", px: "2.5", py: "2.5", borderTopWidth: i ? "1px" : "0", borderColor: "border.subtle", children: [
|
|
60967
61022
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
60968
61023
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "mono.sm", fontWeight: "semibold", color: "fg.default", children: c2.col }),
|
|
60969
61024
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "caption", lineHeight: "1.35", mt: "px", children: c2.reason })
|
|
@@ -60972,14 +61027,14 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
60972
61027
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: bs.track, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: bs.fill, width: `${Math.round(c2.imbalance * 100)}%`, bg: toneToken(c2.tone) }) }),
|
|
60973
61028
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "caption.eyebrow", fontSize: "9px", textAlign: "center", mt: "1.5", children: /* @__PURE__ */ jsxRuntime.jsx(Help, { id: "confounder_imbalance", children: c2.level }) })
|
|
60974
61029
|
] }),
|
|
60975
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "button", css: button({ variant: "ghost", size: "xs" }), px: "0", minW: "16px", display: "inline-flex", alignItems: "center", justifyContent: "center", "aria-label": `Remove ${c2.col}`, onClick: () => editConfig({ ...config2, common_causes: config2.common_causes.filter((x2) => x2 !== c2.col), categorical: config2.categorical.type === "some" ? east.some(config2.categorical.value.filter((x2) => x2 !== c2.col)) : east.none }), children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faXmark, style: { fontSize: "11px" } }) })
|
|
61030
|
+
!readonly && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "button", css: button({ variant: "ghost", size: "xs" }), px: "0", minW: "16px", display: "inline-flex", alignItems: "center", justifyContent: "center", "aria-label": `Remove ${c2.col}`, onClick: () => editConfig({ ...config2, common_causes: config2.common_causes.filter((x2) => x2 !== c2.col), categorical: config2.categorical.type === "some" ? east.some(config2.categorical.value.filter((x2) => x2 !== c2.col)) : east.none }), children: /* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faXmark, style: { fontSize: "11px" } }) })
|
|
60976
61031
|
] }, i)) }),
|
|
60977
|
-
vs.suggestion && /* @__PURE__ */ jsxRuntime.jsx(ColumnMenu, { choices: columns.filter((c2) => !(/* @__PURE__ */ new Set([config2.treatment, config2.outcome, ...config2.common_causes])).has(c2.name)).map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, common_causes: [...config2.common_causes, c2] }), children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "button", css: button({ variant: "ghost", size: "sm" }), justifyContent: "flex-start", width: "100%", color: "brand.fg", fontFamily: "mono", display: "inline-flex", alignItems: "center", gap: "2", children: [
|
|
61032
|
+
!readonly && vs.suggestion && /* @__PURE__ */ jsxRuntime.jsx(ColumnMenu, { choices: columns.filter((c2) => !(/* @__PURE__ */ new Set([config2.treatment, config2.outcome, ...config2.common_causes])).has(c2.name)).map((c2) => c2.name), onPick: (c2) => editConfig({ ...config2, common_causes: [...config2.common_causes, c2] }), children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "button", css: button({ variant: "ghost", size: "sm" }), justifyContent: "flex-start", width: "100%", color: "brand.fg", fontFamily: "mono", display: "inline-flex", alignItems: "center", gap: "2", children: [
|
|
60978
61033
|
/* @__PURE__ */ jsxRuntime.jsx(FontAwesomeIcon, { icon: faPlus, style: { fontSize: "9px" } }),
|
|
60979
61034
|
"add another"
|
|
60980
61035
|
] }) })
|
|
60981
61036
|
] }) }),
|
|
60982
|
-
/* @__PURE__ */ jsxRuntime.jsx(Step, { n: 4, title: `Which ${SUBJECT_MANY}?`, help: "step_population", children: /* @__PURE__ */ jsxRuntime.jsx(FilterRail, { fields, population, onChange: editPopulation, chip, button }) }),
|
|
61037
|
+
/* @__PURE__ */ jsxRuntime.jsx(Step, { n: 4, title: `Which ${SUBJECT_MANY}?`, help: "step_population", children: /* @__PURE__ */ jsxRuntime.jsx(FilterRail, { fields, population, onChange: editPopulation, chip, button, readonly }) }),
|
|
60983
61038
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "details", borderTopWidth: "1px", borderColor: "border.subtle", children: [
|
|
60984
61039
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
60985
61040
|
react.Box,
|
|
@@ -61012,8 +61067,8 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
61012
61067
|
}
|
|
61013
61068
|
),
|
|
61014
61069
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { px: "4.5", pb: "3.5", pt: "0.5", children: [
|
|
61015
|
-
/* @__PURE__ */ jsxRuntime.jsx(Segmented, { label: "How to compare", help: "adv_method", left: "regression", right: "reweighting", active: vs.method === "reweighting" ? "right" : "left", onPick: (s2) => editConfig({ ...config2, method: east.some(s2 === "right" ? east.variant("propensity_score_weighting", { weighting_scheme: east.none }) : east.variant("linear_regression", null)) }) }),
|
|
61016
|
-
/* @__PURE__ */ jsxRuntime.jsx(Segmented, { label: "Answer for", help: "adv_estimand", left: "all", right: "only treated", active: vs.target === "treated" ? "right" : "left", onPick: (s2) => editConfig({ ...config2, estimand: east.some(east.variant(s2 === "right" ? "att" : "ate", null)) }), last: true })
|
|
61070
|
+
/* @__PURE__ */ jsxRuntime.jsx(Segmented, { label: "How to compare", help: "adv_method", left: "regression", right: "reweighting", active: vs.method === "reweighting" ? "right" : "left", readonly, onPick: (s2) => editConfig({ ...config2, method: east.some(s2 === "right" ? east.variant("propensity_score_weighting", { weighting_scheme: east.none }) : east.variant("linear_regression", null)) }) }),
|
|
61071
|
+
/* @__PURE__ */ jsxRuntime.jsx(Segmented, { label: "Answer for", help: "adv_estimand", left: "all", right: "only treated", active: vs.target === "treated" ? "right" : "left", readonly, onPick: (s2) => editConfig({ ...config2, estimand: east.some(east.variant(s2 === "right" ? "att" : "ate", null)) }), last: true })
|
|
61017
61072
|
] })
|
|
61018
61073
|
] })
|
|
61019
61074
|
] }),
|
|
@@ -61087,7 +61142,7 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
61087
61142
|
] })
|
|
61088
61143
|
] }),
|
|
61089
61144
|
tab === "answer" && a2 && /* @__PURE__ */ jsxRuntime.jsx(AnswerNumeric, { a: a2, verdict, higherBetter, badge, barList }),
|
|
61090
|
-
tab === "answer" && !a2 && ref && /* @__PURE__ */ jsxRuntime.jsx(RefusalZone, { refusal: ref, overlap: ov, naiveValue: (
|
|
61145
|
+
tab === "answer" && !a2 && ref && /* @__PURE__ */ jsxRuntime.jsx(RefusalZone, { refusal: ref, overlap: ov, naiveValue: (shownResult == null ? void 0 : shownResult.naive) ?? 0, outcome: vs.outcome }),
|
|
61091
61146
|
tab === "trust" && vr && /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { p: "4.5", children: [
|
|
61092
61147
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "body.sm", color: "fg.muted", mb: "3.5", children: /* @__PURE__ */ jsxRuntime.jsx(Help, { id: "trust_intro", children: "Before trusting the answer we tried to break it — colour shows pass / caution." }) }),
|
|
61093
61148
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { layerStyle: "frame.flat", children: vr.checks.map((c2, i) => {
|
|
@@ -61189,7 +61244,7 @@ const EastChakraExperiment = React.memo(function EastChakraExperiment2({ value }
|
|
|
61189
61244
|
var _a3;
|
|
61190
61245
|
const id3 = eastUiComponents.getSomeorUndefined(r2.preset);
|
|
61191
61246
|
if (id3 === void 0) return null;
|
|
61192
|
-
const label = ((_a3 =
|
|
61247
|
+
const label = ((_a3 = configs.find((c2) => c2.id === id3)) == null ? void 0 : _a3.label) ?? id3;
|
|
61193
61248
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
61194
61249
|
" ",
|
|
61195
61250
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "span", css: chip({ tone: "brand", size: "sm" }), children: [
|
|
@@ -61389,11 +61444,17 @@ function ValidatePanel({ vm, barList }) {
|
|
|
61389
61444
|
] }, i)) })
|
|
61390
61445
|
] });
|
|
61391
61446
|
}
|
|
61392
|
-
function FilterRail({ fields, population, onChange: onChange2, chip, button }) {
|
|
61447
|
+
function FilterRail({ fields, population, onChange: onChange2, chip, button, readonly }) {
|
|
61393
61448
|
const [open, setOpen] = React.useState(null);
|
|
61394
61449
|
const replaceAt = (i, p2) => onChange2(population.map((f2, j2) => j2 === i ? p2 : f2));
|
|
61395
61450
|
const removeAt = (i) => onChange2(population.filter((_2, j2) => j2 !== i));
|
|
61396
61451
|
const done = /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "button", css: button({ variant: "outline", size: "xs" }), onClick: () => setOpen(null), children: "Done" });
|
|
61452
|
+
if (readonly) {
|
|
61453
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { display: "flex", flexWrap: "wrap", gap: "1.5", alignItems: "center", children: population.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: chip({ tone: "plain", numeric: true, shape: "rounded" }), children: [
|
|
61454
|
+
"all ",
|
|
61455
|
+
SUBJECT_MANY
|
|
61456
|
+
] }) : population.map((pred, i) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: chip({ tone: "brand", numeric: true, shape: "rounded" }), flexShrink: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", whiteSpace: "nowrap", children: eastUiComponents.formatPredicate(pred) }) }, i)) });
|
|
61457
|
+
}
|
|
61397
61458
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "flex", flexWrap: "wrap", gap: "1.5", alignItems: "center", children: [
|
|
61398
61459
|
population.map((pred, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
61399
61460
|
eastUiComponents.SliceEditPopover,
|
|
@@ -61454,7 +61515,13 @@ function ColumnMenu({ choices, onPick, children: children2 }) {
|
|
|
61454
61515
|
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Content, { children: choices.map((c2) => /* @__PURE__ */ jsxRuntime.jsx(react.Menu.Item, { value: c2, onClick: () => onPick(c2), children: c2 }, c2)) }) }) })
|
|
61455
61516
|
] });
|
|
61456
61517
|
}
|
|
61457
|
-
function ColumnPick({ column: column2, kind, choices, onPick, badge, button }) {
|
|
61518
|
+
function ColumnPick({ column: column2, kind, choices, onPick, badge, button, readonly }) {
|
|
61519
|
+
if (readonly) {
|
|
61520
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: button({ variant: "outline", size: "sm" }), gap: "1.5", cursor: "default", children: [
|
|
61521
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontFamily: "mono", fontWeight: "semibold", children: column2 }),
|
|
61522
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: badge({ variant: "plain", size: "sm" }), textTransform: "none", letterSpacing: "normal", children: kind })
|
|
61523
|
+
] });
|
|
61524
|
+
}
|
|
61458
61525
|
return /* @__PURE__ */ jsxRuntime.jsx(ColumnMenu, { choices, onPick, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "button", css: button({ variant: "outline", size: "sm" }), gap: "1.5", children: [
|
|
61459
61526
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontFamily: "mono", fontWeight: "semibold", children: column2 }),
|
|
61460
61527
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: badge({ variant: "plain", size: "sm" }), textTransform: "none", letterSpacing: "normal", children: kind }),
|
|
@@ -61497,10 +61564,14 @@ function SegmentSelect({ options: options2, active, onPick, fill, size: size3 =
|
|
|
61497
61564
|
}
|
|
61498
61565
|
);
|
|
61499
61566
|
}
|
|
61500
|
-
function
|
|
61567
|
+
function SegmentStatic({ value, size: size3 = "xs" }) {
|
|
61568
|
+
const s2 = react.useSlotRecipe({ key: "segmentGroup" })({ size: size3 });
|
|
61569
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: s2.root, alignSelf: "flex-start", children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: s2.item, "data-state": "checked", children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", css: s2.itemText, children: value }) }) });
|
|
61570
|
+
}
|
|
61571
|
+
function Segmented({ label, left, right, active, onPick, last: last2, help, readonly }) {
|
|
61501
61572
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: "flex", flexDirection: "column", alignItems: "stretch", gap: "1.5", py: "2", borderBottomWidth: last2 ? "0" : "1px", borderColor: "border.subtle", children: [
|
|
61502
61573
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { textStyle: "caption.eyebrow", textTransform: "none", letterSpacing: "normal", color: "fg.default", children: help ? /* @__PURE__ */ jsxRuntime.jsx(Help, { id: help, children: label }) : label }),
|
|
61503
|
-
/* @__PURE__ */ jsxRuntime.jsx(SegmentSelect, { options: [left, right], active: active === "left" ? 0 : 1, onPick: (i) => onPick(i === 0 ? "left" : "right"), fill: true, size: "xs" })
|
|
61574
|
+
readonly ? /* @__PURE__ */ jsxRuntime.jsx(SegmentStatic, { value: active === "left" ? left : right }) : /* @__PURE__ */ jsxRuntime.jsx(SegmentSelect, { options: [left, right], active: active === "left" ? 0 : 1, onPick: (i) => onPick(i === 0 ? "left" : "right"), fill: true, size: "xs" })
|
|
61504
61575
|
] });
|
|
61505
61576
|
}
|
|
61506
61577
|
eastUiComponents.implementUIComponent(internal.Experiment.Component, EastChakraExperiment);
|