@sjcrh/proteinpaint-types 2.137.2-0 → 2.137.2-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.
@@ -2,7 +2,7 @@ import {
2
2
  CorrelationVolcanoPayload,
3
3
  validCorrelationVolcanoRequest,
4
4
  validCorrelationVolcanoResponse
5
- } from "./chunk-M7HKDHB3.js";
5
+ } from "./chunk-PAQX4HYF.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  CorrelationVolcanoPayload,
package/dist/index.js CHANGED
@@ -7,17 +7,17 @@ import {
7
7
  termdbTopTermsByTypePayload,
8
8
  validTermdbTopTermsByTypeRequest,
9
9
  validTermdbTopTermsByTypeResponse
10
- } from "./chunk-C32XALTH.js";
10
+ } from "./chunk-SUL2XLYM.js";
11
11
  import {
12
12
  termdbTopVariablyExpressedGenesPayload,
13
13
  validTermdbTopVariablyExpressedGenesRequest,
14
14
  validTermdbTopVariablyExpressedGenesResponse
15
- } from "./chunk-UG7RYMCA.js";
15
+ } from "./chunk-6H6TQ3MA.js";
16
16
  import {
17
17
  validViolinRequest,
18
18
  validViolinResponse,
19
19
  violinPayload
20
- } from "./chunk-G5SBQR25.js";
20
+ } from "./chunk-YGOZU46P.js";
21
21
  import {
22
22
  tilePayload,
23
23
  validTileRequest,
@@ -72,22 +72,22 @@ import {
72
72
  termsByIdsPayload,
73
73
  validTermsByIdsRequest,
74
74
  validTermsByIdsResponse
75
- } from "./chunk-AKJWBIUV.js";
75
+ } from "./chunk-7YFANJ2A.js";
76
76
  import {
77
77
  boxplotPayload,
78
78
  validBoxPlotRequest,
79
79
  validBoxPlotResponse
80
- } from "./chunk-MLAGM7F5.js";
80
+ } from "./chunk-MDPMNCMV.js";
81
81
  import {
82
82
  termdbCategoriesPayload,
83
83
  validCategoriesRequest,
84
84
  validCategoriesResponse
85
- } from "./chunk-HF2D3UVQ.js";
85
+ } from "./chunk-CBPDONEQ.js";
86
86
  import {
87
87
  termdbClusterPayload,
88
88
  validTermdbClusterRequest,
89
89
  validTermdbClusterResponse
90
- } from "./chunk-OQVYIYZL.js";
90
+ } from "./chunk-657TS66W.js";
91
91
  import {
92
92
  termdbCohortSummaryPayload,
93
93
  validTermdbCohortSummaryRequest,
@@ -102,17 +102,17 @@ import {
102
102
  descrStatsPayload,
103
103
  validDescrStatsRequest,
104
104
  validDescrStatsResponse
105
- } from "./chunk-3P6M5ZNJ.js";
105
+ } from "./chunk-IE3MSHTB.js";
106
106
  import {
107
107
  numericCategoriesPayload,
108
108
  validNumericCategoriesRequest,
109
109
  validNumericCategoriesResponse
110
- } from "./chunk-B2FSTXLW.js";
110
+ } from "./chunk-FMSTAFII.js";
111
111
  import {
112
112
  percentilePayload,
113
113
  validPercentileRequest,
114
114
  validPercentileResponse
115
- } from "./chunk-DA6B77HN.js";
115
+ } from "./chunk-6LRQCE3E.js";
116
116
  import {
117
117
  ntseqPayload,
118
118
  validNtseqRequest,
@@ -235,7 +235,7 @@ import {
235
235
  brainImagingPayload,
236
236
  validBrainImagingRequest,
237
237
  validBrainImagingResponse
238
- } from "./chunk-BS7BYTYZ.js";
238
+ } from "./chunk-QCGBPQ7S.js";
239
239
  import {
240
240
  brainImagingSamplesPayload,
241
241
  validBrainImagingSamplesRequest,
@@ -257,7 +257,7 @@ import {
257
257
  CorrelationVolcanoPayload,
258
258
  validCorrelationVolcanoRequest,
259
259
  validCorrelationVolcanoResponse
260
- } from "./chunk-M7HKDHB3.js";
260
+ } from "./chunk-PAQX4HYF.js";
261
261
  import {
262
262
  datasetPayload,
263
263
  validDatasetRequest,
@@ -2,7 +2,7 @@ import {
2
2
  boxplotPayload,
3
3
  validBoxPlotRequest,
4
4
  validBoxPlotResponse
5
- } from "./chunk-MLAGM7F5.js";
5
+ } from "./chunk-MDPMNCMV.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  boxplotPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbCategoriesPayload,
3
3
  validCategoriesRequest,
4
4
  validCategoriesResponse
5
- } from "./chunk-HF2D3UVQ.js";
5
+ } from "./chunk-CBPDONEQ.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbClusterPayload,
3
3
  validTermdbClusterRequest,
4
4
  validTermdbClusterResponse
5
- } from "./chunk-OQVYIYZL.js";
5
+ } from "./chunk-657TS66W.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbClusterPayload,
@@ -2,7 +2,7 @@ import {
2
2
  descrStatsPayload,
3
3
  validDescrStatsRequest,
4
4
  validDescrStatsResponse
5
- } from "./chunk-3P6M5ZNJ.js";
5
+ } from "./chunk-IE3MSHTB.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  descrStatsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  numericCategoriesPayload,
3
3
  validNumericCategoriesRequest,
4
4
  validNumericCategoriesResponse
5
- } from "./chunk-B2FSTXLW.js";
5
+ } from "./chunk-FMSTAFII.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  numericCategoriesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  percentilePayload,
3
3
  validPercentileRequest,
4
4
  validPercentileResponse
5
- } from "./chunk-DA6B77HN.js";
5
+ } from "./chunk-6LRQCE3E.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  percentilePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termsByIdsPayload,
3
3
  validTermsByIdsRequest,
4
4
  validTermsByIdsResponse
5
- } from "./chunk-AKJWBIUV.js";
5
+ } from "./chunk-7YFANJ2A.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termsByIdsPayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopTermsByTypePayload,
3
3
  validTermdbTopTermsByTypeRequest,
4
4
  validTermdbTopTermsByTypeResponse
5
- } from "./chunk-C32XALTH.js";
5
+ } from "./chunk-SUL2XLYM.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopTermsByTypePayload,
@@ -2,7 +2,7 @@ import {
2
2
  termdbTopVariablyExpressedGenesPayload,
3
3
  validTermdbTopVariablyExpressedGenesRequest,
4
4
  validTermdbTopVariablyExpressedGenesResponse
5
- } from "./chunk-UG7RYMCA.js";
5
+ } from "./chunk-6H6TQ3MA.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  termdbTopVariablyExpressedGenesPayload,
@@ -2,7 +2,7 @@ import {
2
2
  validViolinRequest,
3
3
  validViolinResponse,
4
4
  violinPayload
5
- } from "./chunk-G5SBQR25.js";
5
+ } from "./chunk-YGOZU46P.js";
6
6
  import "./chunk-CNSSF43V.js";
7
7
  export {
8
8
  validViolinRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.137.2-0",
3
+ "version": "2.137.2-1",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
@@ -1,4 +1,4 @@
1
- import type { MinBaseQ, BaseTerm, TermGroupSetting, BaseTW, TermValues, BaseGroupSet } from '../index.ts'
1
+ import type { MinBaseQ, BaseTerm, TermGroupSetting, BaseTW, TermValues, BaseGroupSet, FilterGroup } from '../index.ts'
2
2
  import type { TermSettingInstance } from '../termsetting.ts'
3
3
 
4
4
  // q types
@@ -10,18 +10,16 @@ export type GvBaseQ = MinBaseQ & {
10
10
  }
11
11
 
12
12
  type RawGvValuesQ = GvBaseQ & { type?: 'values' }
13
+ type RawGvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx?: number }
13
14
  type RawGvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset?: BaseGroupSet }
14
15
 
15
16
  export type GvValuesQ = GvBaseQ & { type: 'values' }
17
+ export type GvPredefinedGsQ = GvBaseQ & { type: 'predefined-groupset'; predefined_groupset_idx: number }
16
18
  export type GvCustomGsQ = GvBaseQ & { type: 'custom-groupset'; customset: BaseGroupSet }
17
19
 
18
- export type GvQ = GvValuesQ | GvCustomGsQ
20
+ export type GvQ = GvValuesQ | GvPredefinedGsQ | GvCustomGsQ
19
21
 
20
22
  // term types
21
- type GvBaseTerm = BaseTerm & {
22
- type: 'geneVariant'
23
- }
24
-
25
23
  export type GvGene = {
26
24
  kind: 'gene'
27
25
  gene: string
@@ -40,17 +38,17 @@ export type GvCoord = {
40
38
  stop: number
41
39
  }
42
40
 
43
- export type RawGvTerm = GvBaseTerm &
44
- (GvGene | GvCoord) & {
45
- groupsetting?: TermGroupSetting
46
- childTerms?: DtTerm[]
47
- }
41
+ type GvBaseTerm = BaseTerm & { type: 'geneVariant' } & (GvGene | GvCoord)
42
+
43
+ export type RawGvTerm = GvBaseTerm & {
44
+ groupsetting?: TermGroupSetting
45
+ childTerms?: DtTerm[]
46
+ }
48
47
 
49
- export type GvTerm = GvBaseTerm &
50
- (GvGene | GvCoord) & {
51
- groupsetting: TermGroupSetting
52
- childTerms: DtTerm[]
53
- }
48
+ export type GvTerm = GvBaseTerm & {
49
+ groupsetting: TermGroupSetting
50
+ childTerms: DtTerm[]
51
+ }
54
52
 
55
53
  // tw types
56
54
  export type RawGvValuesTW = BaseTW & {
@@ -59,6 +57,12 @@ export type RawGvValuesTW = BaseTW & {
59
57
  q: RawGvValuesQ
60
58
  }
61
59
 
60
+ export type RawGvPredefinedGsTW = BaseTW & {
61
+ type?: 'GvPredefinedGsTW'
62
+ term: RawGvTerm
63
+ q: RawGvPredefinedGsQ
64
+ }
65
+
62
66
  export type RawGvCustomGsTW = BaseTW & {
63
67
  type?: 'GvCustomGsTW'
64
68
  term: RawGvTerm
@@ -71,21 +75,27 @@ export type GvValuesTW = BaseTW & {
71
75
  q: GvValuesQ
72
76
  }
73
77
 
78
+ export type GvPredefinedGsTW = BaseTW & {
79
+ type: 'GvPredefinedGsTW'
80
+ term: GvTerm
81
+ q: GvPredefinedGsQ
82
+ }
83
+
74
84
  export type GvCustomGsTW = BaseTW & {
75
85
  type: 'GvCustomGsTW'
76
86
  term: GvTerm
77
87
  q: GvCustomGsQ
78
88
  }
79
89
 
80
- export type RawGvTW = RawGvValuesTW | RawGvCustomGsTW
81
- export type GvTW = GvValuesTW | GvCustomGsTW
90
+ export type RawGvTW = RawGvValuesTW | RawGvPredefinedGsTW | RawGvCustomGsTW
91
+ export type GvTW = GvValuesTW | GvPredefinedGsTW | GvCustomGsTW
82
92
 
83
93
  // termsetting types
84
94
  export type GeneVariantTermSettingInstance = TermSettingInstance & {
85
95
  q: GvQ
86
96
  term: GvTerm
87
97
  category2samplecount: any
88
- groupSettingInstance?: any
98
+ groups: FilterGroup[] // will store groups created in edit UI
89
99
  }
90
100
 
91
101
  // miscellaneous types
package/src/terms/term.ts CHANGED
@@ -136,22 +136,14 @@ type Groupset = {
136
136
  name: string
137
137
  is_grade?: boolean
138
138
  is_subcondition?: boolean
139
- id?: string // to identify groupset, used by geneVariant term
139
+ dt?: number // dt of groupset, used by geneVariant term
140
140
  } & BaseGroupSet
141
141
 
142
- export type EnabledTermGroupSetting = {
143
- disabled?: false | boolean // can remove boolean fallback once common.js is converted to .ts and can declare `disabled: false as const`
144
- lst: Groupset[]
142
+ export type TermGroupSetting = {
143
+ disabled: boolean // true when term has <= 2 values, otherwise false
144
+ lst?: Groupset[] // array of predefined groupsets
145
145
  }
146
146
 
147
- export type TermGroupSetting =
148
- | EnabledTermGroupSetting
149
- | {
150
- /** disabled=false when groupsetting is not applicable for term (e.g., when term has only two categories) */
151
- disabled: true | boolean // can remove boolean fallback once common.js is converted to .ts and can declare `disabled: true as const`
152
- lst?: []
153
- }
154
-
155
147
  /*** types supporting termwrapper ***/
156
148
 
157
149
  export type BaseTW = {