gps-global-types 1.0.4 → 1.0.8

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/global.types.tsx CHANGED
@@ -14,5 +14,5 @@ export type mrsnId = string // ###### ('MRSN' + 6 or 7 digit number) typically,
14
14
  export type armordPatientId = RegexMatchedString<'M\d+'> // M###### ('M'+6 digit number), but the bi-db is a cesspool
15
15
  export type Hex = RegexMatchedString<'#\d{6}'> // 6 digit String hexadecimal w/ '#' prepended
16
16
  export type Rgb = RegexMatchedString<'rgb\([1-256],[1-256],[1-256]\)'> // format rgb(\d[1-256],\d[1-256],\d[1-256])
17
- export type Color = Hex | Rgb | String
17
+ export type Color = Hex | Rgb | string
18
18
 
package/mst.types.tsx CHANGED
@@ -19,7 +19,7 @@ export interface mstGlobalTypes {
19
19
  // highlightedNodes:mrsnId[] ????
20
20
  }
21
21
 
22
- export const colorFields = ['armordPatientId', 'mlst', 'sampleType', 'armordFacility', 'armordCountry', 'custom color'] as const; //no :string[] ! removes 'const'
22
+ export const colorFields = ['armordPatientId', 'mlst', 'sampleType', 'armordFacility', 'country', 'custom color'] as const; //no :string[] ! removes 'const'
23
23
  export const dateFields = ['armordCultureDate', 'month', 'quarter', 'year'] as const;
24
24
  export const labelFields = ['armordMrsnIdLBL', 'mrsnIdLBL', 'armordAccessionNumberLBL', 'armordPatientIdLBL', 'custom label'] as const;
25
25
 
@@ -36,7 +36,7 @@ type CustomDictEntry = Record<colorKey | dateKey, Color> | Record<labelKey, stri
36
36
  export type CustomDict = Record<ObjectId, CustomDictEntry>
37
37
 
38
38
 
39
- export interface LatestNodes { armordCultureDate: Date | string, isos: NodeType[], _id: ObjectId[] }
39
+ export interface LatestNodes { armordCultureDate: Date | string, isos: any[], _id: ObjectId[] }
40
40
  export interface MSTGraph {
41
41
  name?:string,
42
42
  snapshotData?:SnapshotType
@@ -95,7 +95,7 @@ interface LegendBullet { //or custom upload data
95
95
  label: string
96
96
  }
97
97
 
98
- export type MSTLegend = Record<colorKey, LegendBullet[]> | Record<dateKey, 'date'> | { 'beforeAndAfter': [{ color: '#666666', label: 'Before ' }, { color: '#4a64aa', label: 'After ' }] }
98
+ export type MSTLegend = Record<colorKey, LegendBullet[]> & Record<dateKey, 'date'> & { 'beforeAndAfter': [{ color: '#666666', label: 'Before ' }, { color: '#4a64aa', label: 'After ' }] }
99
99
 
100
100
 
101
101
 
@@ -147,4 +147,5 @@ export interface SnapshotType {
147
147
  *
148
148
  */
149
149
  // module.exports = { MSTGraph, MSTLegend, NodeType,EdgeType,Hex, ColorField,LabelField}
150
- // exports.unused = {};
150
+ // exports.unused = {};
151
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gps-global-types",
3
- "version": "1.0.4",
3
+ "version": "1.0.8",
4
4
  "description": "types shared between front-end and back-end",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pie.types.tsx CHANGED
@@ -13,11 +13,11 @@ export interface ColorType {
13
13
  color: Color, //unique hex of parameter
14
14
  value: number //count of how many times value will be represented in the pie
15
15
  }
16
- type LabelType = RegexMatchedString<'(\w&)*'> // if many, seperated by '&' qhich are interpreted as newlines in front-end. var names ends with 'LBL'.
16
+ export type LabelType = RegexMatchedString<'(\w&)*'> // if many, seperated by '&' qhich are interpreted as newlines in front-end. var names ends with 'LBL'.
17
17
  type DateType = string | Date; // must be able to be interpreted as date type by Date js object
18
18
 
19
19
 
20
- interface ExtraNodeTypeFields extends SimulationNodeDatum {
20
+ export interface ExtraNodeTypeFields extends SimulationNodeDatum {
21
21
  id: ObjectId,//unique identifier referenced by Graph.links and d3 Force. String but it's a string of a mongo id
22
22
  beforeAndAfter?: ColorType[], //[=[{color:'#fff',value:1}]] so it doesnt break on recalculation
23
23
  dateArr: DateType[], // array of armordCultureDates used for beforeAndAfter coloring