@sjcrh/proteinpaint-shared 2.174.1 → 2.175.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-shared",
3
- "version": "2.174.1",
3
+ "version": "2.175.0",
4
4
  "description": "ProteinPaint code that is shared between server and client-side workspaces",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,6 +1,6 @@
1
1
  import { format } from 'd3-format'
2
2
  import { getColors } from './common.js'
3
- import { isStrictNumeric, convertUnits } from './helpers.js'
3
+ import { isNumeric, isStrictNumeric, convertUnits } from './helpers.js'
4
4
 
5
5
  export default function validate_bins(binconfig) {
6
6
  // Number.isFinite('1') returns false, which is desired
@@ -126,6 +126,7 @@ summaryfxn (percentiles)=> return {min, max, pX, pY, ...}
126
126
  }
127
127
  */
128
128
  const bc = binconfig
129
+
129
130
  validate_bins(bc)
130
131
  if (bc.lst) {
131
132
  const k2c = getColors(bc.lst.length) //to color bins
@@ -139,7 +140,6 @@ summaryfxn (percentiles)=> return {min, max, pX, pY, ...}
139
140
  bc.results = { summary }
140
141
  if (!bc.binLabelFormatter) bc.binLabelFormatter = getNumDecimalsFormatter(bc)
141
142
 
142
- const orderedLabels = []
143
143
  // round the min and max values for use as bin start and stop
144
144
  // in the first and last bins, respectively
145
145
  const minFloor = Math.floor(summary.min * 100) / 100
@@ -112,23 +112,6 @@ export function isUsableTerm(term, _usecase, termdbConfig, ds) {
112
112
  if (!term.isleaf) uses.add('branch')
113
113
  }
114
114
  return uses
115
- case 'runChart':
116
- if (usecase.detail == 'date') {
117
- if (term.type == 'date') {
118
- uses.add('plot')
119
- }
120
- if (child_types.includes('date')) uses.add('branch')
121
- } else if (usecase.detail == 'numeric') {
122
- if (isNumericTerm(term) && term.type != 'date') {
123
- uses.add('plot')
124
- }
125
- if (hasNumericChild(child_types)) uses.add('branch')
126
- } else {
127
- if (graphableTypes.has(term.type)) uses.add('plot')
128
- if (!term.isleaf) uses.add('branch')
129
- }
130
- return uses
131
- //TODO: Will replace runChart when runChart2 is fully implemented
132
115
  case 'runChart2':
133
116
  if (usecase.detail == 'date') {
134
117
  if (term.type == 'date') {