@morscherlab/mint-sdk 1.3.0-beta.9 → 1.3.1
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/__tests__/components/AutoGroupModal.anatomy.test.d.ts +1 -0
- package/dist/__tests__/components/AutoGroupModal.wiring.test.d.ts +1 -0
- package/dist/__tests__/composables/autoGroup/fieldEdits.test.d.ts +1 -0
- package/dist/__tests__/composables/autoGroup/golden.test.d.ts +1 -0
- package/dist/components/AutoGroupModal.adapter.d.ts +27 -4
- package/dist/components/SmartGroup.types.d.ts +22 -0
- package/dist/components/SmartGroupFieldRecipe.groups.d.ts +10 -2
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +3 -0
- package/dist/components/index.js +1 -1
- package/dist/{components-GDDvof8D.js → components-bbanLd1u.js} +510 -287
- package/dist/components-bbanLd1u.js.map +1 -0
- package/dist/composables/autoGroup/classify.d.ts +7 -1
- package/dist/composables/autoGroup/columns.d.ts +16 -1
- package/dist/composables/autoGroup/index.d.ts +5 -7
- package/dist/composables/autoGroup/tokenize.d.ts +36 -1
- package/dist/composables/index.js +2 -2
- package/dist/composables/useAutoGroup.d.ts +13 -2
- package/dist/{composables-D6uqp0UF.js → composables-BbHozlA7.js} +2 -2
- package/dist/{composables-D6uqp0UF.js.map → composables-BbHozlA7.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/install.js +1 -1
- package/dist/permissions.js +2 -2
- package/dist/permissions.js.map +1 -1
- package/dist/styles.css +129 -96
- package/dist/types/auto-group.d.ts +1 -1
- package/dist/{validation-Dmp9Q5W0.js → validation-CukfLjy-.js} +323 -187
- package/dist/validation-CukfLjy-.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/components/AppTopBarPageSelector.test.ts +4 -4
- package/src/__tests__/components/AutoGroupModal.anatomy.test.ts +86 -0
- package/src/__tests__/components/AutoGroupModal.wiring.test.ts +53 -0
- package/src/__tests__/components/SampleSelector.test.ts +14 -16
- package/src/__tests__/components/SmartGroupFieldRecipe.groups.test.ts +23 -0
- package/src/__tests__/components/SmartGroupFieldRecipe.test.ts +176 -0
- package/src/__tests__/composables/autoGroup/columns.test.ts +100 -11
- package/src/__tests__/composables/autoGroup/fieldEdits.test.ts +74 -0
- package/src/__tests__/composables/autoGroup/fingerprint.test.ts +9 -0
- package/src/__tests__/composables/autoGroup/golden.test.ts +187 -0
- package/src/__tests__/composables/autoGroup/groupByOrder.test.ts +7 -7
- package/src/__tests__/composables/autoGroup/tokenLength.test.ts +7 -0
- package/src/__tests__/composables/autoGroup/tokenize.test.ts +78 -1
- package/src/__tests__/composables/useAutoGroup.test.ts +2 -1
- package/src/__tests__/fixtures/auto-group/share-exp021.txt +103 -0
- package/src/__tests__/fixtures/auto-group/share-exp031.txt +39 -0
- package/src/__tests__/fixtures/auto-group/share-exp114.txt +123 -0
- package/src/__tests__/fixtures/auto-group/share-exp214.txt +63 -0
- package/src/__tests__/utils/permissions.test.ts +15 -0
- package/src/components/AutoGroupModal.adapter.ts +80 -9
- package/src/components/AutoGroupModal.vue +41 -8
- package/src/components/SmartGroup.types.ts +23 -0
- package/src/components/SmartGroupFieldRecipe.groups.ts +14 -2
- package/src/components/SmartGroupFieldRecipe.vue +289 -169
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +3 -6
- package/src/composables/autoGroup/classify.ts +26 -7
- package/src/composables/autoGroup/columns.ts +144 -36
- package/src/composables/autoGroup/compose.ts +8 -10
- package/src/composables/autoGroup/fingerprint.ts +1 -1
- package/src/composables/autoGroup/index.ts +5 -12
- package/src/composables/autoGroup/tokenLength.ts +8 -0
- package/src/composables/autoGroup/tokenize.ts +148 -1
- package/src/composables/autoGroup/vocab.json +5 -11
- package/src/composables/useAutoGroup.ts +92 -79
- package/src/permissions.ts +3 -2
- package/src/styles/components/app-page-selector.css +58 -14
- package/src/styles/components/smart-group.css +71 -82
- package/src/types/auto-group.ts +1 -0
- package/dist/components-GDDvof8D.js.map +0 -1
- package/dist/composables/autoGroup/replicatePreGroup.d.ts +0 -36
- package/dist/validation-Dmp9Q5W0.js.map +0 -1
- package/src/composables/autoGroup/replicatePreGroup.ts +0 -124
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,36 @@
|
|
|
1
|
-
import { AutoGroupResult, ClassSchema, ColumnInfo, ColumnRole } from '../types/auto-group';
|
|
1
|
+
import { AutoGroupResult, ClassSchema, ColumnInfo, ColumnRole, SampleClass } from '../types/auto-group';
|
|
2
2
|
import { SampleGroup } from '../types';
|
|
3
3
|
import { FieldRecipeGroup, QcRoute, SmartGroupField } from './SmartGroupFieldRecipe.groups';
|
|
4
4
|
import { ManualSample } from './SmartGroupManual.cohorts';
|
|
5
|
-
import { SmartGroupSeed } from './SmartGroup.types';
|
|
5
|
+
import { FieldRecipeAnatomyToken, FieldRecipeQcChip, SmartGroupSeed } from './SmartGroup.types';
|
|
6
|
+
import { ExperimentHeader } from '../composables/autoGroup';
|
|
7
|
+
/** Value preview of a field card: the first three values, then the count of the rest. */
|
|
8
|
+
export declare function previewValues(values: string[]): string;
|
|
9
|
+
/** Experiment line of the modal header: `exp157 · 2025-10-13 · LT`. */
|
|
10
|
+
export declare function experimentLabel(header: ExperimentHeader): string;
|
|
11
|
+
/**
|
|
12
|
+
* Names of all columns of the experimental classes. A field cannot take one
|
|
13
|
+
* of them: the engine merges fields by name.
|
|
14
|
+
*/
|
|
15
|
+
export declare function engineColumnNames(schemas: Record<string, ClassSchema>): string[];
|
|
16
|
+
/** One chip for each QC-type class, with its sample count. */
|
|
17
|
+
export declare function engineQcChips(classes: SampleClass[]): FieldRecipeQcChip[];
|
|
18
|
+
/**
|
|
19
|
+
* The tokens of one study sample with the role the engine gave each of them,
|
|
20
|
+
* so the user sees how the names were read. The sample is the first member of
|
|
21
|
+
* the largest experimental class. `cards` supplies the on/off state and the
|
|
22
|
+
* layer of the tokens that are grouping fields.
|
|
23
|
+
*/
|
|
24
|
+
export declare function engineAnatomy(classes: SampleClass[], schemas: Record<string, ClassSchema>, tokenized: string[][], cards: {
|
|
25
|
+
fields: SmartGroupField[];
|
|
26
|
+
layers: (number | null)[];
|
|
27
|
+
}): FieldRecipeAnatomyToken[];
|
|
6
28
|
/** Human label for a column role; defaults to `Factor` when unset. */
|
|
7
29
|
export declare function roleLabel(role?: ColumnRole): string;
|
|
8
30
|
/**
|
|
9
|
-
* Columns worth offering as grouping toggles: factors
|
|
10
|
-
*
|
|
31
|
+
* Columns worth offering as grouping toggles: factors, numerics, replicates and
|
|
32
|
+
* sample IDs (the last two are off by default), plus any column already enabled
|
|
33
|
+
* in `groupBy` (so a manual group-by choice still shows).
|
|
11
34
|
* Preserves the engine's column order. `groupBy` is the schema's ORDERED layer
|
|
12
35
|
* list — entry N is hierarchy layer N of the composed group names.
|
|
13
36
|
*/
|
|
@@ -20,6 +20,15 @@ export interface FieldRecipeQcChip {
|
|
|
20
20
|
name: string;
|
|
21
21
|
count: number;
|
|
22
22
|
}
|
|
23
|
+
/** One token of the example sample name, with the role it was read as. */
|
|
24
|
+
export interface FieldRecipeAnatomyToken {
|
|
25
|
+
/** The token as written in the sample name. */
|
|
26
|
+
text: string;
|
|
27
|
+
/** The layer number for a grouped field; the field name or role for any other token. */
|
|
28
|
+
caption: string;
|
|
29
|
+
/** `on`: a grouped field. `off`: a field that is switched off. `fixed`: not a grouping field. */
|
|
30
|
+
state: 'on' | 'off' | 'fixed';
|
|
31
|
+
}
|
|
23
32
|
export interface SmartGroupFieldRecipeProps {
|
|
24
33
|
/** Sample records behind the experiment (one row per real sample). */
|
|
25
34
|
samples?: SmartGroupSampleRecord[];
|
|
@@ -56,6 +65,19 @@ export interface SmartGroupFieldRecipeProps {
|
|
|
56
65
|
canDownloadTemplate?: boolean;
|
|
57
66
|
/** Show a loading state in the main body (e.g. while experiment data loads). */
|
|
58
67
|
loading?: boolean;
|
|
68
|
+
/** Tokens of one example sample name; shown above the fields when not empty. */
|
|
69
|
+
anatomy?: FieldRecipeAnatomyToken[];
|
|
70
|
+
/**
|
|
71
|
+
* Per-card hint for a field that is on, for example the groups that remain
|
|
72
|
+
* when the user switches it off. `null` shows no hint for that card.
|
|
73
|
+
*/
|
|
74
|
+
hints?: (string | null)[];
|
|
75
|
+
/** One chip for each QC class; when set it replaces the single `qcChip`. */
|
|
76
|
+
qcChips?: FieldRecipeQcChip[];
|
|
77
|
+
/** Show the rename control on each field; a new name emits `rename`. */
|
|
78
|
+
renamable?: boolean;
|
|
79
|
+
/** Names that a rename must refuse, in addition to the names of the other fields. */
|
|
80
|
+
reservedNames?: string[];
|
|
59
81
|
}
|
|
60
82
|
export interface FieldRecipeApplyPayload {
|
|
61
83
|
groups: FieldRecipeGroup[];
|
|
@@ -28,8 +28,11 @@ export interface FieldRecipeGroup {
|
|
|
28
28
|
export declare const QC_POOL_NAME = "QC_Pool";
|
|
29
29
|
/** How QC samples are routed relative to the biological groups. */
|
|
30
30
|
export type QcRoute = 'Overlay only' | 'Exclude' | 'Mix into groups';
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Kind of inline summary callout to render. `warn`: a replicate field is on.
|
|
33
|
+
* `singletons`: no replicate field is on, but half or more of the groups have one sample.
|
|
34
|
+
*/
|
|
35
|
+
export type FieldRecipeSummaryKind = 'mute' | 'warn' | 'singletons' | 'info';
|
|
33
36
|
export interface FieldRecipeSummary {
|
|
34
37
|
kind: FieldRecipeSummaryKind;
|
|
35
38
|
/** Number of base (non-QC) groups the current toggles produce. */
|
|
@@ -48,6 +51,11 @@ export declare function computeFieldGroups(samples: SmartGroupSampleRecord[], fi
|
|
|
48
51
|
export declare function appendQcGroup(groups: FieldRecipeGroup[], route: QcRoute, qcColor: string, qcCount?: number): FieldRecipeGroup[];
|
|
49
52
|
/** Total samples the grouping applies to: QC is dropped only when excluded. */
|
|
50
53
|
export declare function sampleTotalFor(route: QcRoute, realCount?: number, qcCount?: number): number;
|
|
54
|
+
/**
|
|
55
|
+
* True when half or more of the groups have one sample: the design has no
|
|
56
|
+
* replicate in the names, or a field that is on is not part of the condition.
|
|
57
|
+
*/
|
|
58
|
+
export declare function mostlySingletons(groups: FieldRecipeGroup[]): boolean;
|
|
51
59
|
/** Decide which inline summary callout the Field Recipe should show. */
|
|
52
60
|
export declare function fieldRecipeSummary(input: {
|
|
53
61
|
activeFactors: string[];
|
|
@@ -9,6 +9,7 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
|
|
|
9
9
|
move: (index: number, direction: "up" | "down") => any;
|
|
10
10
|
apply: (payload: FieldRecipeApplyPayload) => any;
|
|
11
11
|
manual: () => any;
|
|
12
|
+
rename: (index: number, name: string) => any;
|
|
12
13
|
"update:route": (route: QcRoute) => any;
|
|
13
14
|
"csv-file": (file: File) => any;
|
|
14
15
|
"download-template": () => any;
|
|
@@ -20,6 +21,7 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
|
|
|
20
21
|
onMove?: ((index: number, direction: "up" | "down") => any) | undefined;
|
|
21
22
|
onApply?: ((payload: FieldRecipeApplyPayload) => any) | undefined;
|
|
22
23
|
onManual?: (() => any) | undefined;
|
|
24
|
+
onRename?: ((index: number, name: string) => any) | undefined;
|
|
23
25
|
"onUpdate:route"?: ((route: QcRoute) => any) | undefined;
|
|
24
26
|
"onCsv-file"?: ((file: File) => any) | undefined;
|
|
25
27
|
"onDownload-template"?: (() => any) | undefined;
|
|
@@ -34,4 +36,5 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
|
|
|
34
36
|
initialRoute: QcRoute;
|
|
35
37
|
qcColor: string;
|
|
36
38
|
canDownloadTemplate: boolean;
|
|
39
|
+
renamable: boolean;
|
|
37
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as PlateEditor_default, A as SampleLegend_default, At as AppToastContainer_default, B as StatusIndicator_default, C as ChemicalFormula_default, Ct as AppAvatarMenu_default, D as ReagentEditor_default, Dt as ActionMenu_default, E as SampleHierarchyTree_default, Et as ThemeToggle_default, F as SettingsModal_default, Ft as Calendar_default, G as ControlWorkspaceView_default, H as LayoutResizeHandle_default, I as AdductText_default, It as BasePill_default, J as SampleSelector_default, K as ComponentBindingRenderer_default, L as Breadcrumb_default, Lt as SegmentedControl_default, M as BioTemplatePackWorkspaceView_default, Mt as FormField_default, N as BioTemplateExperimentWorkspaceView_default, Nt as DataFrame_default, O as SmartGroupModal_default, Ot as IconButton_default, P as BioTemplateRenderer_default, Pt as LoadingSpinner_default, Q as ReagentList_default, R as Avatar_default, Rt as BaseTabs_default, St as AppTopBar_default, T as ProtocolStepEditor_default, Tt as CollapsibleCard_default, U as AppContainer_default, V as Divider_default, W as DoseDesignWorkspaceView_default, X as SmartGroupManual_default, Y as AutoGroupModal_default, Z as SmartGroupFieldRecipe_default, _t as AppLayout_default, a as ArtifactSaveDialog_default, at as GeneratedPluginView_default, bt as FormActions_default, c as SectionCard_default, ct as GeneratedPlotlyResult_default, d as ExperimentCodeBadge_default, dt as ChartContainer_default, et as ConfirmDialog_default, f as ExperimentDataViewer_default, g as SequenceProgressBar_default, gt as MobileSupportGate_default, h as InstrumentStateBadge_default, ht as PluginWorkspaceView_default, i as ExperimentPopover_default, it as DoseCalculator_default, j as BioTemplatePresetWorkspaceView_default, jt as AlertBox_default, k as GroupAssigner_default, kt as RuntimeUpdateNotice_default, l as ResourceCard_default, lt as PlotlyChart_default, m as AuditTrail_default, n as FilePicker_default, o as ArtifactSelectorModal_default, ot as JobsStatusTray_default, p as BatchProgressList_default, q as ScheduleCalendar_default, r as FitPanel_default, rt as ExperimentTimeline_default, s as ExperimentSelectorModal_default, st as GeneratedResultRenderer_default, tt as WellPlate_default, u as TimeRangeInput_default, vt as AppSidebar_default, w as ScientificNumber_default, wt as PluginIcon_default, xt as StepWizard_default, yt as FormBuilder_default, z as ProgressBar_default, zt as SearchableSelect_default } from "../components-
|
|
1
|
+
import { $ as PlateEditor_default, A as SampleLegend_default, At as AppToastContainer_default, B as StatusIndicator_default, C as ChemicalFormula_default, Ct as AppAvatarMenu_default, D as ReagentEditor_default, Dt as ActionMenu_default, E as SampleHierarchyTree_default, Et as ThemeToggle_default, F as SettingsModal_default, Ft as Calendar_default, G as ControlWorkspaceView_default, H as LayoutResizeHandle_default, I as AdductText_default, It as BasePill_default, J as SampleSelector_default, K as ComponentBindingRenderer_default, L as Breadcrumb_default, Lt as SegmentedControl_default, M as BioTemplatePackWorkspaceView_default, Mt as FormField_default, N as BioTemplateExperimentWorkspaceView_default, Nt as DataFrame_default, O as SmartGroupModal_default, Ot as IconButton_default, P as BioTemplateRenderer_default, Pt as LoadingSpinner_default, Q as ReagentList_default, R as Avatar_default, Rt as BaseTabs_default, St as AppTopBar_default, T as ProtocolStepEditor_default, Tt as CollapsibleCard_default, U as AppContainer_default, V as Divider_default, W as DoseDesignWorkspaceView_default, X as SmartGroupManual_default, Y as AutoGroupModal_default, Z as SmartGroupFieldRecipe_default, _t as AppLayout_default, a as ArtifactSaveDialog_default, at as GeneratedPluginView_default, bt as FormActions_default, c as SectionCard_default, ct as GeneratedPlotlyResult_default, d as ExperimentCodeBadge_default, dt as ChartContainer_default, et as ConfirmDialog_default, f as ExperimentDataViewer_default, g as SequenceProgressBar_default, gt as MobileSupportGate_default, h as InstrumentStateBadge_default, ht as PluginWorkspaceView_default, i as ExperimentPopover_default, it as DoseCalculator_default, j as BioTemplatePresetWorkspaceView_default, jt as AlertBox_default, k as GroupAssigner_default, kt as RuntimeUpdateNotice_default, l as ResourceCard_default, lt as PlotlyChart_default, m as AuditTrail_default, n as FilePicker_default, o as ArtifactSelectorModal_default, ot as JobsStatusTray_default, p as BatchProgressList_default, q as ScheduleCalendar_default, r as FitPanel_default, rt as ExperimentTimeline_default, s as ExperimentSelectorModal_default, st as GeneratedResultRenderer_default, tt as WellPlate_default, u as TimeRangeInput_default, vt as AppSidebar_default, w as ScientificNumber_default, wt as PluginIcon_default, xt as StepWizard_default, yt as FormBuilder_default, z as ProgressBar_default, zt as SearchableSelect_default } from "../components-bbanLd1u.js";
|
|
2
2
|
import { f as BaseModal_default, h as BaseButton_default } from "../experiment-utils-DTANyVKV.js";
|
|
3
3
|
import { i as BaseSelect_default, n as Skeleton_default, o as BaseInput_default, r as EmptyState_default } from "../ResourcePickerListInternal-CFAw4vTZ.js";
|
|
4
4
|
import { $n as FormulaInput_default, Cr as FileUploader_default, Jn as UnitInput_default, Rr as TagsInput_default, Tr as SecretInput_default, Xn as MoleculeInput_default, Zn as SequenceInput_default, ci as BaseRadioGroup_default, di as Tooltip_default, fi as BaseTextarea_default, ii as MultiSelect_default, li as BaseToggle_default, ni as DatePicker_default, nr as GeneratedPathInput_default, qn as ConcentrationInput_default, si as BaseSlider_default, ui as BaseCheckbox_default, wr as NumberInput_default, yr as DateTimePicker_default, zr as TimePicker_default } from "../templates-BU1pet28.js";
|