gps-global-types 1.0.27 → 1.0.30
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/cluster.types.d.ts +11 -0
- package/dist/cluster.types.d.ts.map +1 -0
- package/{cluster.types.tsx → dist/cluster.types.tsx} +3 -1
- package/dist/global.types.d.ts +15 -0
- package/dist/global.types.d.ts.map +1 -0
- package/dist/isolate.types.d.ts +130 -0
- package/dist/isolate.types.d.ts.map +1 -0
- package/dist/link.types.d.ts +8 -0
- package/dist/link.types.d.ts.map +1 -0
- package/dist/mst.types.d.ts +105 -0
- package/dist/mst.types.d.ts.map +1 -0
- package/dist/pie.types.d.ts +69 -0
- package/dist/pie.types.d.ts.map +1 -0
- package/package.json +8 -4
- package/tsconfig.json +0 -41
- /package/{global.types.tsx → dist/global.types.tsx} +0 -0
- /package/{index.tsx → dist/index.js} +0 -0
- /package/{isolate.types.tsx → dist/isolate.types.tsx} +0 -0
- /package/{link.types.tsx → dist/link.types.tsx} +0 -0
- /package/{mst.types.tsx → dist/mst.types.tsx} +0 -0
- /package/{pie.types.tsx → dist/pie.types.tsx} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ClusterFields: {
|
|
2
|
+
threshold: NumberConstructor;
|
|
3
|
+
scheme: StringConstructor;
|
|
4
|
+
clusterNickName: StringConstructor;
|
|
5
|
+
isActive: BooleanConstructor;
|
|
6
|
+
dateCreated: DateConstructor;
|
|
7
|
+
lastModified: DateConstructor;
|
|
8
|
+
minimumPatientCount: NumberConstructor;
|
|
9
|
+
distances: MapConstructor;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=cluster.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster.types.d.ts","sourceRoot":"","sources":["cluster.types.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;CAWzB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type StringDictionary = {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export type RegexMatchedString<Pattern extends string> = `${string & {
|
|
5
|
+
__brand: Pattern;
|
|
6
|
+
}}`;
|
|
7
|
+
export type armordAccessionNumber = string;
|
|
8
|
+
export type ObjectId = RegexMatchedString<'[a-zA-Z0-9]{12}'>;
|
|
9
|
+
export type armordMrsnId = string;
|
|
10
|
+
export type mrsnId = string;
|
|
11
|
+
export type armordPatientId = RegexMatchedString<'M\d+'>;
|
|
12
|
+
export type Hex = RegexMatchedString<'#\d{6}'>;
|
|
13
|
+
export type Rgb = RegexMatchedString<'rgb\([1-256],[1-256],[1-256]\)'>;
|
|
14
|
+
export type Color = Hex | Rgb | string;
|
|
15
|
+
//# sourceMappingURL=global.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.types.d.ts","sourceRoot":"","sources":["global.types.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,MAAM,IACnD,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC;AAIrC,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAC1C,MAAM,MAAM,QAAQ,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAC5D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AACjC,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAC3B,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;AACxD,MAAM,MAAM,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;AAC9C,MAAM,MAAM,GAAG,GAAG,kBAAkB,CAAC,gCAAgC,CAAC,CAAA;AACtE,MAAM,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export declare const KlebFields: {
|
|
2
|
+
Yersiniabactin: StringConstructor;
|
|
3
|
+
Colibactin: StringConstructor;
|
|
4
|
+
Aerobactin: StringConstructor;
|
|
5
|
+
Salmochelin: StringConstructor;
|
|
6
|
+
RmpADC: StringConstructor;
|
|
7
|
+
rmpA2: StringConstructor;
|
|
8
|
+
K_locus: StringConstructor;
|
|
9
|
+
O_locus: StringConstructor;
|
|
10
|
+
O_type: StringConstructor;
|
|
11
|
+
SHV_mutations: StringConstructor;
|
|
12
|
+
Omp_mutations: StringConstructor;
|
|
13
|
+
Col_mutations: StringConstructor;
|
|
14
|
+
Flq_mutations: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
export declare const IsolateFields: {
|
|
17
|
+
_id: StringConstructor;
|
|
18
|
+
mrsnId: StringConstructor;
|
|
19
|
+
qcCallFinal: StringConstructor;
|
|
20
|
+
rawOrganismId: StringConstructor;
|
|
21
|
+
genus: StringConstructor;
|
|
22
|
+
species: StringConstructor;
|
|
23
|
+
wgsId: StringConstructor;
|
|
24
|
+
topHits: StringConstructor;
|
|
25
|
+
wgsIdMethod: StringConstructor;
|
|
26
|
+
dbBuild: StringConstructor;
|
|
27
|
+
isContaminated: BooleanConstructor;
|
|
28
|
+
projects: ArrayConstructor;
|
|
29
|
+
libraryPlate: StringConstructor;
|
|
30
|
+
sequencingRun: StringConstructor;
|
|
31
|
+
numberOfContigsRaw: NumberConstructor;
|
|
32
|
+
numberOfContigsFilteredForLength: NumberConstructor;
|
|
33
|
+
totalLengthOfContigsFilteredForLength: NumberConstructor;
|
|
34
|
+
numberOfContigsFilteredForLowCoverage: NumberConstructor;
|
|
35
|
+
totalLengthOfContigsFilteredForLowCoverage: StringConstructor;
|
|
36
|
+
numberOfGoodContigs: NumberConstructor;
|
|
37
|
+
averageReadDepthOfGoodContigs: NumberConstructor;
|
|
38
|
+
totalLengthOfGoodContigs: NumberConstructor;
|
|
39
|
+
medianInsertSize: StringConstructor;
|
|
40
|
+
assembler: StringConstructor;
|
|
41
|
+
qcCallAssembly: StringConstructor;
|
|
42
|
+
scheme: StringConstructor;
|
|
43
|
+
mlst: StringConstructor;
|
|
44
|
+
gene1: StringConstructor;
|
|
45
|
+
gene2: StringConstructor;
|
|
46
|
+
gene3: StringConstructor;
|
|
47
|
+
gene4: StringConstructor;
|
|
48
|
+
gene5: StringConstructor;
|
|
49
|
+
gene6: StringConstructor;
|
|
50
|
+
gene7: StringConstructor;
|
|
51
|
+
gene8: StringConstructor;
|
|
52
|
+
qcCallMlst: StringConstructor;
|
|
53
|
+
uploadProcessed: StringConstructor;
|
|
54
|
+
uploadUser: StringConstructor;
|
|
55
|
+
sequencingRunDate: DateConstructor;
|
|
56
|
+
qcCallId: StringConstructor;
|
|
57
|
+
manuallyEnteredWgsId: BooleanConstructor;
|
|
58
|
+
accessionNumber: StringConstructor;
|
|
59
|
+
deprecatedSequencedIsolatesCollectionId: StringConstructor;
|
|
60
|
+
amr: ArrayConstructor;
|
|
61
|
+
armordAccessionNumber: StringConstructor;
|
|
62
|
+
armordBed: StringConstructor;
|
|
63
|
+
armordCultureDate: DateConstructor;
|
|
64
|
+
armordCultureSite: StringConstructor;
|
|
65
|
+
armordFacility: StringConstructor;
|
|
66
|
+
armordFacilityCode: StringConstructor;
|
|
67
|
+
armordFile: StringConstructor;
|
|
68
|
+
armordIsolateNumber: StringConstructor;
|
|
69
|
+
armordIsolateType: StringConstructor;
|
|
70
|
+
armordMrsnId: StringConstructor;
|
|
71
|
+
armordPatientId: StringConstructor;
|
|
72
|
+
armordRawOrganismId: StringConstructor;
|
|
73
|
+
armordUnit: StringConstructor;
|
|
74
|
+
submittedOrganismId: StringConstructor;
|
|
75
|
+
isManuallyEntered: BooleanConstructor;
|
|
76
|
+
sampleType: StringConstructor;
|
|
77
|
+
qcPoc: StringConstructor;
|
|
78
|
+
qcReviewer: StringConstructor;
|
|
79
|
+
facilityCode: StringConstructor;
|
|
80
|
+
facilityName: StringConstructor;
|
|
81
|
+
collectionDate: StringConstructor;
|
|
82
|
+
index1: StringConstructor;
|
|
83
|
+
index2: StringConstructor;
|
|
84
|
+
r1FileNameRaw: StringConstructor;
|
|
85
|
+
r1FileNameRenamed: StringConstructor;
|
|
86
|
+
r1ReadCount: NumberConstructor;
|
|
87
|
+
r1ReadsWithWarningsCount: NumberConstructor;
|
|
88
|
+
r2FileNameRaw: StringConstructor;
|
|
89
|
+
r2FileNameRenamed: StringConstructor;
|
|
90
|
+
r2ReadCount: NumberConstructor;
|
|
91
|
+
r2ReadsWithWarningsCount: NumberConstructor;
|
|
92
|
+
qcCallFastQc: StringConstructor;
|
|
93
|
+
inputReads: NumberConstructor;
|
|
94
|
+
inputBases: NumberConstructor;
|
|
95
|
+
qtrimmedReadsCount: NumberConstructor;
|
|
96
|
+
qtrimmedReadsPercent: NumberConstructor;
|
|
97
|
+
qtrimmedBasesCount: NumberConstructor;
|
|
98
|
+
qtrimmedBasesPercent: NumberConstructor;
|
|
99
|
+
ktrimmedReadsCount: NumberConstructor;
|
|
100
|
+
ktrimmedReadsPercent: NumberConstructor;
|
|
101
|
+
ktrimmedBasesCount: NumberConstructor;
|
|
102
|
+
ktrimmedBasesPercent: NumberConstructor;
|
|
103
|
+
totalRemovedReadsCount: NumberConstructor;
|
|
104
|
+
totalRemovedReadsPercent: NumberConstructor;
|
|
105
|
+
totalRemovedBasesCount: NumberConstructor;
|
|
106
|
+
totalRemovedBasesPercent: NumberConstructor;
|
|
107
|
+
resultReadsCount: NumberConstructor;
|
|
108
|
+
resultReadsPercent: NumberConstructor;
|
|
109
|
+
resultBasesCount: NumberConstructor;
|
|
110
|
+
resultBasesPercent: NumberConstructor;
|
|
111
|
+
qcCallTrim: StringConstructor;
|
|
112
|
+
assemblyFile: StringConstructor;
|
|
113
|
+
assemblerVersion: StringConstructor;
|
|
114
|
+
assemblerStatus: BooleanConstructor;
|
|
115
|
+
schemeSelection: StringConstructor;
|
|
116
|
+
source: StringConstructor;
|
|
117
|
+
mlstUtility: StringConstructor;
|
|
118
|
+
mlstUtilityVersion: StringConstructor;
|
|
119
|
+
mlstDatabaseVersion: DateConstructor;
|
|
120
|
+
isRepresentative: BooleanConstructor;
|
|
121
|
+
username: StringConstructor;
|
|
122
|
+
uploadDate: DateConstructor;
|
|
123
|
+
tier: NumberConstructor;
|
|
124
|
+
allele: StringConstructor;
|
|
125
|
+
alleles: ArrayConstructor;
|
|
126
|
+
projectCode: ArrayConstructor;
|
|
127
|
+
mrsnSuperFamily: StringConstructor;
|
|
128
|
+
expectedPhenotype: StringConstructor;
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=isolate.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolate.types.d.ts","sourceRoot":"","sources":["isolate.types.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAetB,CAAA;AAGD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.types.d.ts","sourceRoot":"","sources":["link.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAuB,MAAM,IAAI,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,WAAW,QAAS,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAC3D,MAAM,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,QAAQ,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ClusterFields } from "./cluster.types.tsx";
|
|
2
|
+
import { Color, ObjectId } from "./global.types.tsx";
|
|
3
|
+
import { IsolateFields } from "./isolate.types.tsx";
|
|
4
|
+
import { EdgeType } from "./link.types.tsx";
|
|
5
|
+
export interface mstGlobalTypes {
|
|
6
|
+
charge: number;
|
|
7
|
+
radius: number;
|
|
8
|
+
cluster: number;
|
|
9
|
+
distance: number;
|
|
10
|
+
linkLabelSize: number;
|
|
11
|
+
center: [number, number];
|
|
12
|
+
fuzzyThreshold: number;
|
|
13
|
+
neighbor: number;
|
|
14
|
+
slim?: boolean;
|
|
15
|
+
checkedNodes: ObjectId[];
|
|
16
|
+
highlightedNodes: ObjectId[];
|
|
17
|
+
graph?: MSTGraph;
|
|
18
|
+
}
|
|
19
|
+
export declare const colorFields: readonly ["armordPatientId", "mlst", "sampleType", "armordFacility", "country", "custom color"];
|
|
20
|
+
export declare const dateFields: readonly ["armordCultureDate", "month", "quarter", "year"];
|
|
21
|
+
export declare const labelFields: readonly ["armordMrsnIdLBL", "mrsnIdLBL", "armordAccessionNumberLBL", "armordPatientIdLBL", "custom label"];
|
|
22
|
+
export type colorKey = typeof colorFields[number];
|
|
23
|
+
export type dateKey = typeof dateFields[number];
|
|
24
|
+
export type labelKey = typeof labelFields[number];
|
|
25
|
+
type CustomDictEntry = Partial<Record<colorKey & dateKey, Color>> | Partial<Record<labelKey, string>>;
|
|
26
|
+
export type CustomDict = Record<ObjectId, CustomDictEntry>;
|
|
27
|
+
export interface LatestNodes {
|
|
28
|
+
armordCultureDate: Date | string;
|
|
29
|
+
isos: any[];
|
|
30
|
+
_id: ObjectId[];
|
|
31
|
+
}
|
|
32
|
+
export interface MSTGraph {
|
|
33
|
+
name?: string;
|
|
34
|
+
colorCalendar: Partial<Record<dateKey, Record<string, Color>>>;
|
|
35
|
+
snapshotData?: SnapshotType;
|
|
36
|
+
nodes: any;
|
|
37
|
+
links: EdgeType[];
|
|
38
|
+
latest: LatestNodes;
|
|
39
|
+
custom: CustomDict;
|
|
40
|
+
legend: MSTLegend;
|
|
41
|
+
missing: Record<string, any>[];
|
|
42
|
+
}
|
|
43
|
+
export interface LegendBullet {
|
|
44
|
+
color: Color;
|
|
45
|
+
label: string;
|
|
46
|
+
}
|
|
47
|
+
export type MSTLegend = Partial<Record<colorKey | 'beforeAndAfter' | 'custom color', LegendBullet[]>> & Partial<Record<dateKey, 'date'>>;
|
|
48
|
+
export interface SnapshotType {
|
|
49
|
+
_id: ObjectId;
|
|
50
|
+
form: mstGlobalTypes;
|
|
51
|
+
legend: LegendBullet[];
|
|
52
|
+
nodes: Record<ObjectId, LegendBullet>;
|
|
53
|
+
scheme: string;
|
|
54
|
+
transforms: Record<ObjectId, {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
/** /mst route RESULT
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @typedef D3treeProps
|
|
63
|
+
* @property {MSTGraph} data except it only requires links,nodes,legend, and custom
|
|
64
|
+
* @property {ForceObject} form
|
|
65
|
+
* @property {String|null} _id cluster _id
|
|
66
|
+
* @property {function(Snapshot)} setSnapshot
|
|
67
|
+
* @property {function(MSTGraph)} setData trigger parent data state which affects variables in parent
|
|
68
|
+
* @property {function([[import('../../typedefs/MSTree').mrsnId[],Boolean ]])} setSelected connects nodes to table rows on click
|
|
69
|
+
*/
|
|
70
|
+
/**force
|
|
71
|
+
* @typedef d3Data
|
|
72
|
+
* @property {EdgeType[]} links
|
|
73
|
+
* @property {NodeType[]} pies
|
|
74
|
+
*/
|
|
75
|
+
/**string
|
|
76
|
+
* @typedef ItolProps
|
|
77
|
+
* @property {string} scheme
|
|
78
|
+
* @property {ObjectId[]} isolates targets centered for analysis
|
|
79
|
+
* @property {int} neighbors min # of nearest samples to include (beyond targets)
|
|
80
|
+
* @property {int} threshold max allelic distance from the targets to include
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* @typedef MstFields
|
|
84
|
+
* @property {String[]} clusterNickName
|
|
85
|
+
* @property {String[]} scheme
|
|
86
|
+
* @property {Date} lastModified
|
|
87
|
+
* @property {Date} dateModified
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
*
|
|
91
|
+
*
|
|
92
|
+
*
|
|
93
|
+
*
|
|
94
|
+
* @typedef {{...SplashReq,...MstFields}} MSTreeReq
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
export type QueryFields = keyof typeof IsolateFields | 'cluster' | `cluster.${keyof typeof ClusterFields}` | keyof typeof ClusterFields;
|
|
98
|
+
export interface getAClusterBody {
|
|
99
|
+
query?: Partial<Record<QueryFields, Object>>;
|
|
100
|
+
fuzzy?: number;
|
|
101
|
+
neighbors?: number;
|
|
102
|
+
snapshotData?: SnapshotType;
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
105
|
+
//# sourceMappingURL=mst.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mst.types.d.ts","sourceRoot":"","sources":["mst.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAyB,KAAK,EAAU,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,WAAW,cAAc;IAE3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAE,CAAA;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IAGd,YAAY,EAAC,QAAQ,EAA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AA4CD,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAC,gBAAgB,GAAC,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAKrI,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACzD;AACD;;;;;;;;;;GAUG;AACH;;;;GAIG;AACH;;;;;;GAMG;AAEH;;;;;;;;;;;;;;EAcE;AAIF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,aAAa,GAAG,SAAS,GAAG,WAAW,MAAM,OAAO,aAAa,EAAE,GAAG,MAAM,OAAO,aAAa,CAAA;AAGvI,MAAM,WAAW,eAAe;IAG5B,KAAK,CAAC,EAAC,OAAO,CAAC,MAAM,CAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7C,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,YAAY,CAAC,EAAC,YAAY,CAAA;CAE3B"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { BaseType, Selection, SimulationNodeDatum } from "d3";
|
|
2
|
+
import { ObjectId, Color, RegexMatchedString, mrsnId } from "./global.types.tsx";
|
|
3
|
+
import { colorKey, dateKey, labelKey } from "./mst.types.tsx";
|
|
4
|
+
export interface ColorField {
|
|
5
|
+
color: string;
|
|
6
|
+
value: number;
|
|
7
|
+
latest?: string;
|
|
8
|
+
}
|
|
9
|
+
export type LabelField = string;
|
|
10
|
+
export interface ColorType {
|
|
11
|
+
color: Color;
|
|
12
|
+
value: number;
|
|
13
|
+
latest?: 'latest';
|
|
14
|
+
}
|
|
15
|
+
export type LabelType = RegexMatchedString<'(\w&)*'>;
|
|
16
|
+
type DateType = string | Date;
|
|
17
|
+
export interface ExtraNodeTypeFields extends SimulationNodeDatum {
|
|
18
|
+
id: ObjectId;
|
|
19
|
+
beforeAndAfter?: ColorType[];
|
|
20
|
+
dateArr: DateType[];
|
|
21
|
+
hover?: string;
|
|
22
|
+
nodeids: ObjectId[];
|
|
23
|
+
mrsnIds: mrsnId[];
|
|
24
|
+
x?: number;
|
|
25
|
+
y?: number;
|
|
26
|
+
fx?: number | null;
|
|
27
|
+
fy?: number | null;
|
|
28
|
+
}
|
|
29
|
+
export type NodeType = ExtraNodeTypeFields & {
|
|
30
|
+
[K in colorKey | dateKey]: ColorType[];
|
|
31
|
+
} & {
|
|
32
|
+
[K in labelKey]: LabelType[];
|
|
33
|
+
};
|
|
34
|
+
export type ParentSelection = Selection<SVGGElement, NodeType, BaseType, unknown>;
|
|
35
|
+
export type PieSelection = Selection<SVGCircleElement, NodeType, BaseType, NodeType[]>;
|
|
36
|
+
export type PieTextSelection = Selection<SVGTextElement, NodeType, SVGGElement, NodeType>;
|
|
37
|
+
export interface PieType {
|
|
38
|
+
g: ParentSelection;
|
|
39
|
+
data: NodeType[];
|
|
40
|
+
labelField: keyof NodeType;
|
|
41
|
+
}
|
|
42
|
+
export interface SelectionObj {
|
|
43
|
+
mrsnIds: string[];
|
|
44
|
+
active: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface NodeColorProps {
|
|
47
|
+
colorField: keyof NodeType;
|
|
48
|
+
svg: ParentSelection;
|
|
49
|
+
formRadius: number;
|
|
50
|
+
}
|
|
51
|
+
export interface newLabelProps {
|
|
52
|
+
labelField: keyof NodeType;
|
|
53
|
+
svg: ParentSelection;
|
|
54
|
+
slim: boolean;
|
|
55
|
+
}
|
|
56
|
+
type ColorCountTemp = Record<Color, number>;
|
|
57
|
+
type ExcludeB4A<T> = Omit<T, 'beforeAndAfter'>;
|
|
58
|
+
export type PreNodeInterface = ExcludeB4A<ExtraNodeTypeFields> & {
|
|
59
|
+
[K in colorKey | dateKey]: ColorCountTemp;
|
|
60
|
+
} & {
|
|
61
|
+
[K in labelKey]: LabelType;
|
|
62
|
+
} & {
|
|
63
|
+
populate: (field: colorKey | dateKey, value: Color) => void;
|
|
64
|
+
} & {
|
|
65
|
+
tier1: Set<string>;
|
|
66
|
+
beforeAndAfter: any;
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=pie.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pie.types.d.ts","sourceRoot":"","sources":["pie.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,IAAI,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE9D,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAC,QAAQ,CAAA;CACnB;AACD,MAAM,MAAM,SAAS,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;AACpD,KA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AAQ,CAAC;IAC3B,GAAG,EAAE,eAAe,CAAC;IACrB,UAAU,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,MAAM,QAAQ,CAAC;IAC3B,GAAG,EAAE,eAAe,CAAC;IACrB,IAAI,EAAE,OAAO,CAAA;CAChB;AAED,KAAK,cAAc,GAAG,MAAM,CAAC,KAAK,EAAC,MAAM,CAAC,CAAC;AAE3C,KAAK,UAAU,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAI,UAAU,CAAC,mBAAmB,CAAC,GAAG;KAC7D,CAAC,IAAI,QAAQ,GAAG,OAAO,GAAI,cAAc;CAC7C,GAAG;KACC,CAAC,IAAI,QAAQ,GAAG,SAAS;CAC7B,GAAG;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAC,QAAQ,GAAC,OAAO,EAAE,KAAK,EAAC,KAAK,KAAI,IAAI,CAAA;CAAC,GAAG;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAA,cAAc,EAAC,GAAG,CAAA;CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gps-global-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"description": "types shared between front-end and back-end",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
6
9
|
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"prepublishOnly": "npm run build"
|
|
8
13
|
},
|
|
9
14
|
"author": "lizz",
|
|
10
|
-
"type": "module",
|
|
11
15
|
"license": "ISC",
|
|
12
16
|
"dependencies": {
|
|
13
17
|
"d3": "^7.9.0",
|
package/tsconfig.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
// File Layout
|
|
5
|
-
// "rootDir": "./src",
|
|
6
|
-
// "outDir": "./dist",
|
|
7
|
-
// Environment Settings
|
|
8
|
-
// See also https://aka.ms/tsconfig/module
|
|
9
|
-
"module": "nodenext",
|
|
10
|
-
"target": "esnext",
|
|
11
|
-
"types": [],
|
|
12
|
-
// For nodejs:
|
|
13
|
-
// "lib": ["esnext"],
|
|
14
|
-
// "types": ["node"],
|
|
15
|
-
// and npm install -D @types/node
|
|
16
|
-
// Other Outputs
|
|
17
|
-
"sourceMap": true,
|
|
18
|
-
"declaration": true,
|
|
19
|
-
"declarationMap": true,
|
|
20
|
-
"emitDeclarationOnly": true,
|
|
21
|
-
"allowImportingTsExtensions": true,
|
|
22
|
-
// Stricter Typechecking Options
|
|
23
|
-
"noUncheckedIndexedAccess": true,
|
|
24
|
-
"exactOptionalPropertyTypes": true,
|
|
25
|
-
// Style Options
|
|
26
|
-
// "noImplicitReturns": true,
|
|
27
|
-
// "noImplicitOverride": true,
|
|
28
|
-
// "noUnusedLocals": true,
|
|
29
|
-
// "noUnusedParameters": true,
|
|
30
|
-
// "noFallthroughCasesInSwitch": true,
|
|
31
|
-
// "noPropertyAccessFromIndexSignature": true,
|
|
32
|
-
// Recommended Options
|
|
33
|
-
"strict": true,
|
|
34
|
-
"jsx": "react-jsx",
|
|
35
|
-
"verbatimModuleSyntax": false,
|
|
36
|
-
"isolatedModules": true,
|
|
37
|
-
"noUncheckedSideEffectImports": true,
|
|
38
|
-
"moduleDetection": "force",
|
|
39
|
-
"skipLibCheck": true,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|