@vitessce/constants 3.5.6 → 3.5.7
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/index.js
CHANGED
|
@@ -18,7 +18,8 @@ const ViewType$2 = {
|
|
|
18
18
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
19
19
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
20
20
|
LINK_CONTROLLER: "linkController",
|
|
21
|
-
DUAL_SCATTERPLOT: "dualScatterplot"
|
|
21
|
+
DUAL_SCATTERPLOT: "dualScatterplot",
|
|
22
|
+
TREEMAP: "treemap"
|
|
22
23
|
};
|
|
23
24
|
const DataType$2 = {
|
|
24
25
|
OBS_LABELS: "obsLabels",
|
|
@@ -72,6 +73,7 @@ const FileType$2 = {
|
|
|
72
73
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
73
74
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
74
75
|
SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
|
|
76
|
+
SAMPLE_SETS_ANNDATA_ZARR: "sampleSets.anndata.zarr",
|
|
75
77
|
// AnnData - zipped
|
|
76
78
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
|
|
77
79
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
|
|
@@ -84,6 +86,7 @@ const FileType$2 = {
|
|
|
84
86
|
OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
|
|
85
87
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
|
|
86
88
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
|
|
89
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: "sampleSets.anndata.zarr.zip",
|
|
87
90
|
// AnnData - h5ad via reference spec
|
|
88
91
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
|
|
89
92
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
|
|
@@ -96,6 +99,7 @@ const FileType$2 = {
|
|
|
96
99
|
OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
|
|
97
100
|
FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
|
|
98
101
|
SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
|
|
102
|
+
SAMPLE_SETS_ANNDATA_H5AD: "sampleSets.anndata.h5ad",
|
|
99
103
|
// SpatialData
|
|
100
104
|
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
101
105
|
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
@@ -287,13 +291,272 @@ const CoordinationType$2 = {
|
|
|
287
291
|
SAMPLE_SET_FILTER: "sampleSetFilter",
|
|
288
292
|
SAMPLE_FILTER_MODE: "sampleFilterMode",
|
|
289
293
|
SAMPLE_SET_COLOR: "sampleSetColor",
|
|
294
|
+
SAMPLE_HIGHLIGHT: "sampleHighlight",
|
|
290
295
|
EMBEDDING_POINTS_VISIBLE: "embeddingPointsVisible",
|
|
291
296
|
EMBEDDING_CONTOURS_VISIBLE: "embeddingContoursVisible",
|
|
292
297
|
EMBEDDING_CONTOURS_FILLED: "embeddingContoursFilled",
|
|
293
298
|
EMBEDDING_CONTOUR_PERCENTILES: "embeddingContourPercentiles",
|
|
294
299
|
CONTOUR_COLOR_ENCODING: "contourColorEncoding",
|
|
295
|
-
CONTOUR_COLOR: "contourColor"
|
|
300
|
+
CONTOUR_COLOR: "contourColor",
|
|
301
|
+
// Treemap
|
|
302
|
+
HIERARCHY_LEVELS: "hierarchyLevels"
|
|
296
303
|
};
|
|
304
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
305
|
+
function getDefaultExportFromCjs(x) {
|
|
306
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
307
|
+
}
|
|
308
|
+
var loglevel = { exports: {} };
|
|
309
|
+
(function(module) {
|
|
310
|
+
(function(root, definition) {
|
|
311
|
+
if (module.exports) {
|
|
312
|
+
module.exports = definition();
|
|
313
|
+
} else {
|
|
314
|
+
root.log = definition();
|
|
315
|
+
}
|
|
316
|
+
})(commonjsGlobal, function() {
|
|
317
|
+
var noop = function() {
|
|
318
|
+
};
|
|
319
|
+
var undefinedType = "undefined";
|
|
320
|
+
var isIE = typeof window !== undefinedType && typeof window.navigator !== undefinedType && /Trident\/|MSIE /.test(window.navigator.userAgent);
|
|
321
|
+
var logMethods = [
|
|
322
|
+
"trace",
|
|
323
|
+
"debug",
|
|
324
|
+
"info",
|
|
325
|
+
"warn",
|
|
326
|
+
"error"
|
|
327
|
+
];
|
|
328
|
+
var _loggersByName = {};
|
|
329
|
+
var defaultLogger = null;
|
|
330
|
+
function bindMethod(obj, methodName) {
|
|
331
|
+
var method = obj[methodName];
|
|
332
|
+
if (typeof method.bind === "function") {
|
|
333
|
+
return method.bind(obj);
|
|
334
|
+
} else {
|
|
335
|
+
try {
|
|
336
|
+
return Function.prototype.bind.call(method, obj);
|
|
337
|
+
} catch (e) {
|
|
338
|
+
return function() {
|
|
339
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function traceForIE() {
|
|
345
|
+
if (console.log) {
|
|
346
|
+
if (console.log.apply) {
|
|
347
|
+
console.log.apply(console, arguments);
|
|
348
|
+
} else {
|
|
349
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (console.trace)
|
|
353
|
+
console.trace();
|
|
354
|
+
}
|
|
355
|
+
function realMethod(methodName) {
|
|
356
|
+
if (methodName === "debug") {
|
|
357
|
+
methodName = "log";
|
|
358
|
+
}
|
|
359
|
+
if (typeof console === undefinedType) {
|
|
360
|
+
return false;
|
|
361
|
+
} else if (methodName === "trace" && isIE) {
|
|
362
|
+
return traceForIE;
|
|
363
|
+
} else if (console[methodName] !== void 0) {
|
|
364
|
+
return bindMethod(console, methodName);
|
|
365
|
+
} else if (console.log !== void 0) {
|
|
366
|
+
return bindMethod(console, "log");
|
|
367
|
+
} else {
|
|
368
|
+
return noop;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function replaceLoggingMethods() {
|
|
372
|
+
var level = this.getLevel();
|
|
373
|
+
for (var i = 0; i < logMethods.length; i++) {
|
|
374
|
+
var methodName = logMethods[i];
|
|
375
|
+
this[methodName] = i < level ? noop : this.methodFactory(methodName, level, this.name);
|
|
376
|
+
}
|
|
377
|
+
this.log = this.debug;
|
|
378
|
+
if (typeof console === undefinedType && level < this.levels.SILENT) {
|
|
379
|
+
return "No console available for logging";
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
383
|
+
return function() {
|
|
384
|
+
if (typeof console !== undefinedType) {
|
|
385
|
+
replaceLoggingMethods.call(this);
|
|
386
|
+
this[methodName].apply(this, arguments);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
391
|
+
return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
392
|
+
}
|
|
393
|
+
function Logger(name, factory) {
|
|
394
|
+
var self2 = this;
|
|
395
|
+
var inheritedLevel;
|
|
396
|
+
var defaultLevel;
|
|
397
|
+
var userLevel;
|
|
398
|
+
var storageKey = "loglevel";
|
|
399
|
+
if (typeof name === "string") {
|
|
400
|
+
storageKey += ":" + name;
|
|
401
|
+
} else if (typeof name === "symbol") {
|
|
402
|
+
storageKey = void 0;
|
|
403
|
+
}
|
|
404
|
+
function persistLevelIfPossible(levelNum) {
|
|
405
|
+
var levelName = (logMethods[levelNum] || "silent").toUpperCase();
|
|
406
|
+
if (typeof window === undefinedType || !storageKey)
|
|
407
|
+
return;
|
|
408
|
+
try {
|
|
409
|
+
window.localStorage[storageKey] = levelName;
|
|
410
|
+
return;
|
|
411
|
+
} catch (ignore) {
|
|
412
|
+
}
|
|
413
|
+
try {
|
|
414
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
415
|
+
} catch (ignore) {
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function getPersistedLevel() {
|
|
419
|
+
var storedLevel;
|
|
420
|
+
if (typeof window === undefinedType || !storageKey)
|
|
421
|
+
return;
|
|
422
|
+
try {
|
|
423
|
+
storedLevel = window.localStorage[storageKey];
|
|
424
|
+
} catch (ignore) {
|
|
425
|
+
}
|
|
426
|
+
if (typeof storedLevel === undefinedType) {
|
|
427
|
+
try {
|
|
428
|
+
var cookie = window.document.cookie;
|
|
429
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
430
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
431
|
+
if (location !== -1) {
|
|
432
|
+
storedLevel = /^([^;]+)/.exec(
|
|
433
|
+
cookie.slice(location + cookieName.length + 1)
|
|
434
|
+
)[1];
|
|
435
|
+
}
|
|
436
|
+
} catch (ignore) {
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (self2.levels[storedLevel] === void 0) {
|
|
440
|
+
storedLevel = void 0;
|
|
441
|
+
}
|
|
442
|
+
return storedLevel;
|
|
443
|
+
}
|
|
444
|
+
function clearPersistedLevel() {
|
|
445
|
+
if (typeof window === undefinedType || !storageKey)
|
|
446
|
+
return;
|
|
447
|
+
try {
|
|
448
|
+
window.localStorage.removeItem(storageKey);
|
|
449
|
+
} catch (ignore) {
|
|
450
|
+
}
|
|
451
|
+
try {
|
|
452
|
+
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
453
|
+
} catch (ignore) {
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function normalizeLevel(input) {
|
|
457
|
+
var level = input;
|
|
458
|
+
if (typeof level === "string" && self2.levels[level.toUpperCase()] !== void 0) {
|
|
459
|
+
level = self2.levels[level.toUpperCase()];
|
|
460
|
+
}
|
|
461
|
+
if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) {
|
|
462
|
+
return level;
|
|
463
|
+
} else {
|
|
464
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
self2.name = name;
|
|
468
|
+
self2.levels = {
|
|
469
|
+
"TRACE": 0,
|
|
470
|
+
"DEBUG": 1,
|
|
471
|
+
"INFO": 2,
|
|
472
|
+
"WARN": 3,
|
|
473
|
+
"ERROR": 4,
|
|
474
|
+
"SILENT": 5
|
|
475
|
+
};
|
|
476
|
+
self2.methodFactory = factory || defaultMethodFactory;
|
|
477
|
+
self2.getLevel = function() {
|
|
478
|
+
if (userLevel != null) {
|
|
479
|
+
return userLevel;
|
|
480
|
+
} else if (defaultLevel != null) {
|
|
481
|
+
return defaultLevel;
|
|
482
|
+
} else {
|
|
483
|
+
return inheritedLevel;
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
self2.setLevel = function(level, persist) {
|
|
487
|
+
userLevel = normalizeLevel(level);
|
|
488
|
+
if (persist !== false) {
|
|
489
|
+
persistLevelIfPossible(userLevel);
|
|
490
|
+
}
|
|
491
|
+
return replaceLoggingMethods.call(self2);
|
|
492
|
+
};
|
|
493
|
+
self2.setDefaultLevel = function(level) {
|
|
494
|
+
defaultLevel = normalizeLevel(level);
|
|
495
|
+
if (!getPersistedLevel()) {
|
|
496
|
+
self2.setLevel(level, false);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
self2.resetLevel = function() {
|
|
500
|
+
userLevel = null;
|
|
501
|
+
clearPersistedLevel();
|
|
502
|
+
replaceLoggingMethods.call(self2);
|
|
503
|
+
};
|
|
504
|
+
self2.enableAll = function(persist) {
|
|
505
|
+
self2.setLevel(self2.levels.TRACE, persist);
|
|
506
|
+
};
|
|
507
|
+
self2.disableAll = function(persist) {
|
|
508
|
+
self2.setLevel(self2.levels.SILENT, persist);
|
|
509
|
+
};
|
|
510
|
+
self2.rebuild = function() {
|
|
511
|
+
if (defaultLogger !== self2) {
|
|
512
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
513
|
+
}
|
|
514
|
+
replaceLoggingMethods.call(self2);
|
|
515
|
+
if (defaultLogger === self2) {
|
|
516
|
+
for (var childName in _loggersByName) {
|
|
517
|
+
_loggersByName[childName].rebuild();
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
inheritedLevel = normalizeLevel(
|
|
522
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
523
|
+
);
|
|
524
|
+
var initialLevel = getPersistedLevel();
|
|
525
|
+
if (initialLevel != null) {
|
|
526
|
+
userLevel = normalizeLevel(initialLevel);
|
|
527
|
+
}
|
|
528
|
+
replaceLoggingMethods.call(self2);
|
|
529
|
+
}
|
|
530
|
+
defaultLogger = new Logger();
|
|
531
|
+
defaultLogger.getLogger = function getLogger(name) {
|
|
532
|
+
if (typeof name !== "symbol" && typeof name !== "string" || name === "") {
|
|
533
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
534
|
+
}
|
|
535
|
+
var logger = _loggersByName[name];
|
|
536
|
+
if (!logger) {
|
|
537
|
+
logger = _loggersByName[name] = new Logger(
|
|
538
|
+
name,
|
|
539
|
+
defaultLogger.methodFactory
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
return logger;
|
|
543
|
+
};
|
|
544
|
+
var _log = typeof window !== undefinedType ? window.log : void 0;
|
|
545
|
+
defaultLogger.noConflict = function() {
|
|
546
|
+
if (typeof window !== undefinedType && window.log === defaultLogger) {
|
|
547
|
+
window.log = _log;
|
|
548
|
+
}
|
|
549
|
+
return defaultLogger;
|
|
550
|
+
};
|
|
551
|
+
defaultLogger.getLoggers = function getLoggers() {
|
|
552
|
+
return _loggersByName;
|
|
553
|
+
};
|
|
554
|
+
defaultLogger["default"] = defaultLogger;
|
|
555
|
+
return defaultLogger;
|
|
556
|
+
});
|
|
557
|
+
})(loglevel);
|
|
558
|
+
var loglevelExports = loglevel.exports;
|
|
559
|
+
const log = /* @__PURE__ */ getDefaultExportFromCjs(loglevelExports);
|
|
297
560
|
const ViewType$1 = {
|
|
298
561
|
GENES: [
|
|
299
562
|
"genes",
|
|
@@ -460,7 +723,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
460
723
|
const oldKeys = Object.keys(oldObj);
|
|
461
724
|
const propKey = String(prop);
|
|
462
725
|
if (oldKeys.includes(propKey)) {
|
|
463
|
-
|
|
726
|
+
log.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
|
|
464
727
|
${oldObj[propKey][1]}`);
|
|
465
728
|
return oldObj[propKey];
|
|
466
729
|
}
|
|
@@ -19,6 +19,7 @@ export const ViewType: {
|
|
|
19
19
|
BIOMARKER_SELECT: string;
|
|
20
20
|
LINK_CONTROLLER: string;
|
|
21
21
|
DUAL_SCATTERPLOT: string;
|
|
22
|
+
TREEMAP: string;
|
|
22
23
|
};
|
|
23
24
|
export const DataType: {
|
|
24
25
|
OBS_LABELS: string;
|
|
@@ -67,6 +68,7 @@ export const FileType: {
|
|
|
67
68
|
OBS_LABELS_ANNDATA_ZARR: string;
|
|
68
69
|
FEATURE_LABELS_ANNDATA_ZARR: string;
|
|
69
70
|
SAMPLE_EDGES_ANNDATA_ZARR: string;
|
|
71
|
+
SAMPLE_SETS_ANNDATA_ZARR: string;
|
|
70
72
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: string;
|
|
71
73
|
OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: string;
|
|
72
74
|
OBS_SETS_ANNDATA_ZARR_ZIP: string;
|
|
@@ -78,6 +80,7 @@ export const FileType: {
|
|
|
78
80
|
OBS_LABELS_ANNDATA_ZARR_ZIP: string;
|
|
79
81
|
FEATURE_LABELS_ANNDATA_ZARR_ZIP: string;
|
|
80
82
|
SAMPLE_EDGES_ANNDATA_ZARR_ZIP: string;
|
|
83
|
+
SAMPLE_SETS_ANNDATA_ZARR_ZIP: string;
|
|
81
84
|
OBS_FEATURE_MATRIX_ANNDATA_H5AD: string;
|
|
82
85
|
OBS_FEATURE_COLUMNS_ANNDATA_H5AD: string;
|
|
83
86
|
OBS_SETS_ANNDATA_H5AD: string;
|
|
@@ -89,6 +92,7 @@ export const FileType: {
|
|
|
89
92
|
OBS_LABELS_ANNDATA_H5AD: string;
|
|
90
93
|
FEATURE_LABELS_ANNDATA_H5AD: string;
|
|
91
94
|
SAMPLE_EDGES_ANNDATA_H5AD: string;
|
|
95
|
+
SAMPLE_SETS_ANNDATA_H5AD: string;
|
|
92
96
|
IMAGE_SPATIALDATA_ZARR: string;
|
|
93
97
|
LABELS_SPATIALDATA_ZARR: string;
|
|
94
98
|
SHAPES_SPATIALDATA_ZARR: string;
|
|
@@ -252,11 +256,13 @@ export const CoordinationType: {
|
|
|
252
256
|
SAMPLE_SET_FILTER: string;
|
|
253
257
|
SAMPLE_FILTER_MODE: string;
|
|
254
258
|
SAMPLE_SET_COLOR: string;
|
|
259
|
+
SAMPLE_HIGHLIGHT: string;
|
|
255
260
|
EMBEDDING_POINTS_VISIBLE: string;
|
|
256
261
|
EMBEDDING_CONTOURS_VISIBLE: string;
|
|
257
262
|
EMBEDDING_CONTOURS_FILLED: string;
|
|
258
263
|
EMBEDDING_CONTOUR_PERCENTILES: string;
|
|
259
264
|
CONTOUR_COLOR_ENCODING: string;
|
|
260
265
|
CONTOUR_COLOR: string;
|
|
266
|
+
HIERARCHY_LEVELS: string;
|
|
261
267
|
};
|
|
262
268
|
//# sourceMappingURL=constants-merged.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-merged.d.ts","sourceRoot":"","sources":["../src/constants-merged.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants-merged.d.ts","sourceRoot":"","sources":["../src/constants-merged.js"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;;;;;;;;EAGE;AACF;;;;;;;;;;;;;;;EAGE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGE"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* backwards compatibility.
|
|
6
6
|
*/
|
|
7
7
|
import { ViewType as ViewTypeCurr, DataType as DataTypeCurr, FileType as FileTypeCurr, CoordinationType as CoordinationTypeCurr, } from '@vitessce/constants-internal';
|
|
8
|
+
import { log } from '@vitessce/globals';
|
|
8
9
|
import { ViewType as ViewTypeOld, DataType as DataTypeOld, FileType as FileTypeOld, CoordinationType as CoordinationTypeOld, } from './constants-old.js';
|
|
9
10
|
/**
|
|
10
11
|
* Creates a constant with a deprecation message.
|
|
@@ -20,7 +21,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
20
21
|
const oldKeys = Object.keys(oldObj);
|
|
21
22
|
const propKey = String(prop);
|
|
22
23
|
if (oldKeys.includes(propKey)) {
|
|
23
|
-
|
|
24
|
+
log.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':\n${oldObj[propKey][1]}`);
|
|
24
25
|
return oldObj[propKey];
|
|
25
26
|
}
|
|
26
27
|
return obj[prop];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/constants",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"dist-tsc"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@vitessce/
|
|
19
|
+
"@vitessce/globals": "3.5.7",
|
|
20
|
+
"@vitessce/constants-internal": "3.5.7"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@vitessce/types": "3.5.7"
|
|
20
24
|
},
|
|
21
25
|
"scripts": {
|
|
22
26
|
"bundle": "pnpm exec vite build -c ../../scripts/vite.config.js"
|
package/src/constants-merged.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
FileType as FileTypeCurr,
|
|
12
12
|
CoordinationType as CoordinationTypeCurr,
|
|
13
13
|
} from '@vitessce/constants-internal';
|
|
14
|
+
import { log } from '@vitessce/globals';
|
|
14
15
|
import {
|
|
15
16
|
ViewType as ViewTypeOld,
|
|
16
17
|
DataType as DataTypeOld,
|
|
@@ -32,7 +33,7 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
|
|
|
32
33
|
const oldKeys = Object.keys(oldObj);
|
|
33
34
|
const propKey = String(prop);
|
|
34
35
|
if (oldKeys.includes(propKey)) {
|
|
35
|
-
|
|
36
|
+
log.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':\n${oldObj[propKey][1]}`);
|
|
36
37
|
return oldObj[propKey];
|
|
37
38
|
}
|
|
38
39
|
return obj[prop];
|