@vitessce/vit-s 2.0.3 → 3.0.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/dist/index.js +41348 -0
- package/dist-tsc/CallbackPublisher.d.ts +18 -0
- package/dist-tsc/CallbackPublisher.d.ts.map +1 -0
- package/dist-tsc/CallbackPublisher.js +62 -0
- package/dist-tsc/LoadingIndicator.d.ts +2 -0
- package/dist-tsc/LoadingIndicator.d.ts.map +1 -0
- package/dist-tsc/LoadingIndicator.js +26 -0
- package/dist-tsc/TitleInfo.d.ts +2 -0
- package/dist-tsc/TitleInfo.d.ts.map +1 -0
- package/dist-tsc/TitleInfo.js +74 -0
- package/dist-tsc/VitS.d.ts +45 -0
- package/dist-tsc/VitS.d.ts.map +1 -0
- package/dist-tsc/VitS.js +119 -0
- package/dist-tsc/VitessceGrid.d.ts +23 -0
- package/dist-tsc/VitessceGrid.d.ts.map +1 -0
- package/dist-tsc/VitessceGrid.js +60 -0
- package/dist-tsc/VitessceGrid.test.d.ts +2 -0
- package/dist-tsc/VitessceGrid.test.d.ts.map +1 -0
- package/dist-tsc/VitessceGrid.test.js +40 -0
- package/dist-tsc/Warning.d.ts +2 -0
- package/dist-tsc/Warning.d.ts.map +1 -0
- package/dist-tsc/Warning.js +45 -0
- package/dist-tsc/classNames.d.ts +8 -0
- package/dist-tsc/classNames.d.ts.map +1 -0
- package/dist-tsc/classNames.js +8 -0
- package/dist-tsc/data/AbstractLoader.d.ts +22 -0
- package/dist-tsc/data/AbstractLoader.d.ts.map +1 -0
- package/dist-tsc/data/AbstractLoader.js +18 -0
- package/dist-tsc/data/AbstractTwoStepLoader.d.ts +6 -0
- package/dist-tsc/data/AbstractTwoStepLoader.d.ts.map +1 -0
- package/dist-tsc/data/AbstractTwoStepLoader.js +7 -0
- package/dist-tsc/data/LoaderResult.d.ts +7 -0
- package/dist-tsc/data/LoaderResult.d.ts.map +1 -0
- package/dist-tsc/data/LoaderResult.js +7 -0
- package/dist-tsc/data/index.d.ts +4 -0
- package/dist-tsc/data/index.d.ts.map +1 -0
- package/dist-tsc/data/index.js +3 -0
- package/dist-tsc/data/loader-registry.d.ts +9 -0
- package/dist-tsc/data/loader-registry.d.ts.map +1 -0
- package/dist-tsc/data/loader-registry.js +27 -0
- package/dist-tsc/data-hook-utils.d.ts +69 -0
- package/dist-tsc/data-hook-utils.d.ts.map +1 -0
- package/dist-tsc/data-hook-utils.js +173 -0
- package/dist-tsc/data-hooks.d.ts +77 -0
- package/dist-tsc/data-hooks.d.ts.map +1 -0
- package/dist-tsc/data-hooks.js +241 -0
- package/dist-tsc/errors/AbstractLoaderError.d.ts +10 -0
- package/dist-tsc/errors/AbstractLoaderError.d.ts.map +1 -0
- package/dist-tsc/errors/AbstractLoaderError.js +13 -0
- package/dist-tsc/errors/DataSourceFetchError.d.ts +8 -0
- package/dist-tsc/errors/DataSourceFetchError.d.ts.map +1 -0
- package/dist-tsc/errors/DataSourceFetchError.js +13 -0
- package/dist-tsc/errors/DatasetNotFoundError.d.ts +6 -0
- package/dist-tsc/errors/DatasetNotFoundError.d.ts.map +1 -0
- package/dist-tsc/errors/DatasetNotFoundError.js +17 -0
- package/dist-tsc/errors/LoaderNotFoundError.d.ts +10 -0
- package/dist-tsc/errors/LoaderNotFoundError.d.ts.map +1 -0
- package/dist-tsc/errors/LoaderNotFoundError.js +17 -0
- package/dist-tsc/errors/LoaderValidationError.d.ts +10 -0
- package/dist-tsc/errors/LoaderValidationError.d.ts.map +1 -0
- package/dist-tsc/errors/LoaderValidationError.js +15 -0
- package/dist-tsc/errors/index.d.ts +6 -0
- package/dist-tsc/errors/index.d.ts.map +1 -0
- package/dist-tsc/errors/index.js +5 -0
- package/dist-tsc/hooks.d.ts +80 -0
- package/dist-tsc/hooks.d.ts.map +1 -0
- package/dist-tsc/hooks.js +271 -0
- package/dist-tsc/index.d.ts +11 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +10 -17
- package/dist-tsc/plugins.test.fixtures.d.ts +61 -0
- package/dist-tsc/plugins.test.fixtures.d.ts.map +1 -0
- package/dist-tsc/plugins.test.fixtures.js +76 -0
- package/dist-tsc/schemas/config-0.1.0.schema.json +84 -0
- package/dist-tsc/schemas/config-1.0.0.schema.json +733 -0
- package/dist-tsc/schemas/config-1.0.1.schema.json +909 -0
- package/dist-tsc/schemas/config-1.0.10.schema.json +969 -0
- package/dist-tsc/schemas/config-1.0.11.schema.json +990 -0
- package/dist-tsc/schemas/config-1.0.12.schema.json +997 -0
- package/dist-tsc/schemas/config-1.0.13.schema.json +1013 -0
- package/dist-tsc/schemas/config-1.0.14.schema.json +1048 -0
- package/dist-tsc/schemas/config-1.0.15.schema.json +1048 -0
- package/dist-tsc/schemas/config-1.0.16.schema.json +1089 -0
- package/dist-tsc/schemas/config-1.0.2.schema.json +910 -0
- package/dist-tsc/schemas/config-1.0.3.schema.json +910 -0
- package/dist-tsc/schemas/config-1.0.4.schema.json +949 -0
- package/dist-tsc/schemas/config-1.0.5.schema.json +949 -0
- package/dist-tsc/schemas/config-1.0.6.schema.json +949 -0
- package/dist-tsc/schemas/config-1.0.7.schema.json +949 -0
- package/dist-tsc/schemas/config-1.0.8.schema.json +965 -0
- package/dist-tsc/schemas/config-1.0.9.schema.json +965 -0
- package/dist-tsc/schemas/obsSets.schema.d.ts +179 -0
- package/dist-tsc/schemas/obsSets.schema.d.ts.map +1 -0
- package/dist-tsc/schemas/obsSets.schema.js +195 -0
- package/dist-tsc/schemas/obsSetsTabular.schema.d.ts +57 -0
- package/dist-tsc/schemas/obsSetsTabular.schema.d.ts.map +1 -0
- package/dist-tsc/schemas/obsSetsTabular.schema.js +38 -0
- package/dist-tsc/schemas/raster.schema.d.ts +239 -0
- package/dist-tsc/schemas/raster.schema.d.ts.map +1 -0
- package/dist-tsc/schemas/raster.schema.js +120 -0
- package/dist-tsc/shared-mui/components.d.ts +2 -0
- package/dist-tsc/shared-mui/components.d.ts.map +1 -0
- package/dist-tsc/shared-mui/components.js +29 -0
- package/dist-tsc/shared-mui/container.d.ts +2 -0
- package/dist-tsc/shared-mui/container.d.ts.map +1 -0
- package/dist-tsc/shared-mui/container.js +211 -0
- package/dist-tsc/shared-mui/styles.d.ts +5 -0
- package/dist-tsc/shared-mui/styles.d.ts.map +1 -0
- package/dist-tsc/shared-mui/styles.js +109 -0
- package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts +2 -0
- package/dist-tsc/shared-plot-options/CellColorEncodingOption.d.ts.map +1 -0
- package/dist-tsc/shared-plot-options/CellColorEncodingOption.js +17 -0
- package/dist-tsc/shared-plot-options/OptionSelect.d.ts +2 -0
- package/dist-tsc/shared-plot-options/OptionSelect.d.ts.map +1 -0
- package/dist-tsc/shared-plot-options/OptionSelect.js +12 -0
- package/dist-tsc/shared-plot-options/OptionsContainer.d.ts +2 -0
- package/dist-tsc/shared-plot-options/OptionsContainer.d.ts.map +1 -0
- package/dist-tsc/shared-plot-options/OptionsContainer.js +9 -0
- package/dist-tsc/shared-plot-options/index.d.ts +5 -0
- package/dist-tsc/shared-plot-options/index.d.ts.map +1 -0
- package/dist-tsc/shared-plot-options/index.js +4 -0
- package/dist-tsc/shared-plot-options/styles.d.ts +2 -0
- package/dist-tsc/shared-plot-options/styles.d.ts.map +1 -0
- package/dist-tsc/shared-plot-options/styles.js +48 -0
- package/dist-tsc/state/hooks.d.ts +216 -0
- package/dist-tsc/state/hooks.d.ts.map +1 -0
- package/dist-tsc/state/hooks.js +575 -0
- package/dist-tsc/title-styles.d.ts +2 -0
- package/dist-tsc/title-styles.d.ts.map +1 -0
- package/dist-tsc/title-styles.js +72 -0
- package/dist-tsc/view-config-utils.d.ts +30 -0
- package/dist-tsc/view-config-utils.d.ts.map +1 -0
- package/dist-tsc/view-config-utils.js +234 -0
- package/dist-tsc/view-config-utils.test.d.ts +2 -0
- package/dist-tsc/view-config-utils.test.d.ts.map +1 -0
- package/dist-tsc/view-config-utils.test.fixtures.d.ts +1049 -0
- package/dist-tsc/view-config-utils.test.fixtures.d.ts.map +1 -0
- package/dist-tsc/view-config-utils.test.fixtures.js +883 -0
- package/dist-tsc/view-config-utils.test.js +209 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts +8 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.js +114 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts +2 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.js +48 -0
- package/dist-tsc/vitessce-grid-layout/index.d.ts +2 -0
- package/dist-tsc/vitessce-grid-layout/index.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-layout/index.js +1 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts +15 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.js +61 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts +2 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.test.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-layout/layout-utils.test.js +148 -0
- package/dist-tsc/vitessce-grid-utils.d.ts +13 -0
- package/dist-tsc/vitessce-grid-utils.d.ts.map +1 -0
- package/dist-tsc/vitessce-grid-utils.js +141 -0
- package/package.json +23 -10
- package/src/CallbackPublisher.js +7 -11
- package/src/LoadingIndicator.js +1 -2
- package/src/TitleInfo.js +12 -85
- package/src/VitS.js +72 -50
- package/src/VitessceGrid.js +21 -13
- package/src/VitessceGrid.test.jsx +16 -7
- package/src/Warning.js +2 -2
- package/src/data/AbstractLoader.js +2 -25
- package/src/data/AbstractTwoStepLoader.js +1 -1
- package/src/data/index.js +3 -3
- package/src/data/loader-registry.js +22 -13
- package/src/data-hook-utils.js +4 -6
- package/src/data-hooks.js +4 -4
- package/src/errors/DataSourceFetchError.js +1 -1
- package/src/errors/DatasetNotFoundError.js +1 -1
- package/src/errors/LoaderNotFoundError.js +1 -1
- package/src/errors/LoaderValidationError.js +1 -1
- package/src/errors/index.js +5 -6
- package/src/hooks.js +70 -5
- package/src/index.js +21 -46
- package/src/schemas/config-1.0.16.schema.json +21 -1
- package/src/shared-mui/components.js +10 -8
- package/src/shared-mui/container.js +1 -1
- package/src/shared-mui/styles.js +5 -2
- package/src/shared-plot-options/CellColorEncodingOption.js +3 -4
- package/src/shared-plot-options/OptionSelect.js +2 -2
- package/src/shared-plot-options/OptionsContainer.js +2 -5
- package/src/shared-plot-options/index.js +4 -4
- package/src/shared-plot-options/styles.js +1 -1
- package/src/state/hooks.js +10 -3
- package/src/title-styles.js +73 -0
- package/src/view-config-utils.js +46 -98
- package/src/view-config-utils.test.jsx +222 -0
- package/src/vitessce-grid-layout/VitessceGridLayout.js +51 -30
- package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +17 -9
- package/src/vitessce-grid-layout/index.js +1 -1
- package/src/vitessce-grid-layout/layout-utils.js +1 -1
- package/src/vitessce-grid-layout/layout-utils.test.js +1 -1
- package/src/vitessce-grid-utils.js +27 -15
- package/dist/index.mjs +0 -84801
- package/src/component-registry.js +0 -21
- package/src/errors/OptionsValidationError.js +0 -25
- package/src/file-options-schemas-legacy.js +0 -139
- package/src/file-options-schemas-legacy.test.js +0 -138
- package/src/file-options-schemas.js +0 -327
- package/src/file-options-schemas.test.js +0 -26
- package/src/joint-file-types-legacy.js +0 -298
- package/src/joint-file-types-legacy.test.js +0 -412
- package/src/joint-file-types.js +0 -171
- package/src/joint-file-types.test.js +0 -144
- package/src/json-schemas.js +0 -9
- package/src/plugins.js +0 -186
- package/src/plugins.test.js +0 -42
- package/src/schemas/config-1.0.16.schema.test.js +0 -32
- package/src/schemas/schema.test-old.js +0 -49
- package/src/view-config-upgraders.js +0 -628
- package/src/view-config-utils.test.js +0 -95
- package/src/view-config-versions.js +0 -68
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { z } from '@vitessce/schemas';
|
|
5
|
+
import { PluginViewType, PluginCoordinationType } from '@vitessce/plugins';
|
|
6
|
+
import { getExistingScopesForCoordinationType, initialize, } from './view-config-utils.js';
|
|
7
|
+
function FakeComponent(props) {
|
|
8
|
+
const { text } = props;
|
|
9
|
+
return _jsx("span", { children: text });
|
|
10
|
+
}
|
|
11
|
+
const jointFileTypes = [];
|
|
12
|
+
const coordinationTypes = [
|
|
13
|
+
new PluginCoordinationType('dataset', null, z.string().nullable()),
|
|
14
|
+
new PluginCoordinationType('embeddingTargetX', 0, z.number()),
|
|
15
|
+
new PluginCoordinationType('embeddingTargetY', 0, z.number()),
|
|
16
|
+
new PluginCoordinationType('embeddingZoom', 3, z.number()),
|
|
17
|
+
new PluginCoordinationType('embeddingType', null, z.string().nullable()),
|
|
18
|
+
];
|
|
19
|
+
const viewTypes = [
|
|
20
|
+
new PluginViewType('description', FakeComponent, ['dataset']),
|
|
21
|
+
new PluginViewType('scatterplot', FakeComponent, ['dataset', 'embeddingType', 'embeddingZoom', 'embeddingTargetX', 'embeddingTargetY']),
|
|
22
|
+
];
|
|
23
|
+
describe('src/app/view-config-utils.js', () => {
|
|
24
|
+
describe('getExistingScopesForCoordinationType', () => {
|
|
25
|
+
it('gets all scope names for a particular coordination type', () => {
|
|
26
|
+
const config = {
|
|
27
|
+
coordinationSpace: {
|
|
28
|
+
dataset: {
|
|
29
|
+
A: 'my-dataset-1',
|
|
30
|
+
B: 'my-dataset-2',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
layout: [
|
|
34
|
+
{
|
|
35
|
+
coordinationScopes: {
|
|
36
|
+
dataset: 'A',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
coordinationScopes: {
|
|
41
|
+
dataset: 'C',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
expect(getExistingScopesForCoordinationType(config, 'dataset')).toEqual(['A', 'B', 'C']);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
describe('initialize', () => {
|
|
50
|
+
it('initializes coordination space and component coordination scopes when initStrategy is auto', () => {
|
|
51
|
+
const preInitializationConfig = {
|
|
52
|
+
version: '1.0.16',
|
|
53
|
+
name: 'My config name',
|
|
54
|
+
description: 'My config description',
|
|
55
|
+
initStrategy: 'auto',
|
|
56
|
+
coordinationSpace: {
|
|
57
|
+
embeddingTargetX: {
|
|
58
|
+
A: 0,
|
|
59
|
+
},
|
|
60
|
+
embeddingTargetY: {
|
|
61
|
+
A: 0,
|
|
62
|
+
},
|
|
63
|
+
embeddingType: {
|
|
64
|
+
't-SNE': 't-SNE',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
datasets: [
|
|
68
|
+
{
|
|
69
|
+
files: [],
|
|
70
|
+
name: 'A',
|
|
71
|
+
uid: 'A',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
layout: [
|
|
75
|
+
{
|
|
76
|
+
component: 'description',
|
|
77
|
+
coordinationScopes: {},
|
|
78
|
+
h: 2,
|
|
79
|
+
w: 3,
|
|
80
|
+
x: 9,
|
|
81
|
+
y: 0,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
component: 'scatterplot',
|
|
85
|
+
coordinationScopes: {
|
|
86
|
+
embeddingTargetX: 'A',
|
|
87
|
+
embeddingTargetY: 'A',
|
|
88
|
+
embeddingType: 't-SNE',
|
|
89
|
+
},
|
|
90
|
+
h: 4,
|
|
91
|
+
w: 5,
|
|
92
|
+
x: 0,
|
|
93
|
+
y: 2,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
const initializedViewConfig = {
|
|
98
|
+
version: '1.0.16',
|
|
99
|
+
uid: 'A',
|
|
100
|
+
name: 'My config name',
|
|
101
|
+
description: 'My config description',
|
|
102
|
+
initStrategy: 'auto',
|
|
103
|
+
coordinationSpace: {
|
|
104
|
+
dataset: {
|
|
105
|
+
A: 'A',
|
|
106
|
+
},
|
|
107
|
+
embeddingTargetX: {
|
|
108
|
+
A: 0,
|
|
109
|
+
},
|
|
110
|
+
embeddingTargetY: {
|
|
111
|
+
A: 0,
|
|
112
|
+
},
|
|
113
|
+
embeddingType: {
|
|
114
|
+
't-SNE': 't-SNE',
|
|
115
|
+
},
|
|
116
|
+
embeddingZoom: {
|
|
117
|
+
A: 3,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
datasets: [
|
|
121
|
+
{
|
|
122
|
+
files: [],
|
|
123
|
+
name: 'A',
|
|
124
|
+
uid: 'A',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
layout: [
|
|
128
|
+
{
|
|
129
|
+
component: 'description',
|
|
130
|
+
coordinationScopes: {
|
|
131
|
+
dataset: 'A',
|
|
132
|
+
},
|
|
133
|
+
h: 2,
|
|
134
|
+
uid: 'A',
|
|
135
|
+
w: 3,
|
|
136
|
+
x: 9,
|
|
137
|
+
y: 0,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
component: 'scatterplot',
|
|
141
|
+
coordinationScopes: {
|
|
142
|
+
dataset: 'A',
|
|
143
|
+
embeddingTargetX: 'A',
|
|
144
|
+
embeddingTargetY: 'A',
|
|
145
|
+
embeddingType: 't-SNE',
|
|
146
|
+
embeddingZoom: 'A',
|
|
147
|
+
},
|
|
148
|
+
h: 4,
|
|
149
|
+
uid: 'B',
|
|
150
|
+
w: 5,
|
|
151
|
+
x: 0,
|
|
152
|
+
y: 2,
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
expect(initialize(preInitializationConfig, jointFileTypes, coordinationTypes, viewTypes))
|
|
157
|
+
.toEqual(initializedViewConfig);
|
|
158
|
+
});
|
|
159
|
+
it('does not initialize when initStrategy is none', () => {
|
|
160
|
+
const preInitializationConfig = {
|
|
161
|
+
version: '1.0.16',
|
|
162
|
+
name: 'My config name',
|
|
163
|
+
description: 'My config description',
|
|
164
|
+
initStrategy: 'none',
|
|
165
|
+
coordinationSpace: {
|
|
166
|
+
embeddingTargetX: {
|
|
167
|
+
A: 0,
|
|
168
|
+
},
|
|
169
|
+
embeddingTargetY: {
|
|
170
|
+
A: 0,
|
|
171
|
+
},
|
|
172
|
+
embeddingType: {
|
|
173
|
+
't-SNE': 't-SNE',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
datasets: [
|
|
177
|
+
{
|
|
178
|
+
files: [],
|
|
179
|
+
name: 'A',
|
|
180
|
+
uid: 'A',
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
layout: [
|
|
184
|
+
{
|
|
185
|
+
component: 'description',
|
|
186
|
+
coordinationScopes: {},
|
|
187
|
+
h: 2,
|
|
188
|
+
w: 3,
|
|
189
|
+
x: 9,
|
|
190
|
+
y: 0,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
component: 'scatterplot',
|
|
194
|
+
coordinationScopes: {
|
|
195
|
+
embeddingTargetX: 'A',
|
|
196
|
+
embeddingTargetY: 'A',
|
|
197
|
+
embeddingType: 't-SNE',
|
|
198
|
+
},
|
|
199
|
+
h: 4,
|
|
200
|
+
w: 5,
|
|
201
|
+
x: 0,
|
|
202
|
+
y: 2,
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
};
|
|
206
|
+
expect(initialize(preInitializationConfig, jointFileTypes, coordinationTypes, viewTypes).coordinationSpace).toEqual(preInitializationConfig.coordinationSpace);
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VitessceGridLayout.d.ts","sourceRoot":"","sources":["../../src/vitessce-grid-layout/VitessceGridLayout.js"],"names":[],"mappings":"AAeA,oDA8JC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useMemo, useCallback } from 'react';
|
|
3
|
+
import { Responsive, WidthProvider } from 'react-grid-layout-with-lodash';
|
|
4
|
+
import { isEqual } from 'lodash-es';
|
|
5
|
+
import { getMaxRows, resolveLayout } from './layout-utils.js';
|
|
6
|
+
const ResponsiveGridLayout = WidthProvider(Responsive);
|
|
7
|
+
class ResponsiveHeightGridLayout extends ResponsiveGridLayout {
|
|
8
|
+
componentDidUpdate(prevProps) {
|
|
9
|
+
if (this.props.height !== prevProps.height) {
|
|
10
|
+
this.onWindowResize();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function VitessceGridLayout(props) {
|
|
15
|
+
const { layout, viewTypes, padding, margin: marginProp, draggableHandle: draggableHandleClass, onResize, onResizeStop, rowHeight, theme, height, onRemoveComponent, onLayoutChange: onLayoutChangeProp, isBounded, } = props;
|
|
16
|
+
const getComponent = useCallback((viewType) => {
|
|
17
|
+
if (Array.isArray(viewTypes)) {
|
|
18
|
+
const matchingViewType = viewTypes.find(v => v.name === viewType);
|
|
19
|
+
if (matchingViewType) {
|
|
20
|
+
return matchingViewType.component;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return () => null;
|
|
24
|
+
}, [viewTypes]);
|
|
25
|
+
const draggableHandle = `.${draggableHandleClass}`;
|
|
26
|
+
// If layout changes, update grid components.
|
|
27
|
+
const { cols: gridCols, layouts: gridLayouts, breakpoints: gridBreakpoints, components: gridComponents, } = useMemo(() => resolveLayout(layout), [layout]);
|
|
28
|
+
const containerPadding = useMemo(() => ([padding, padding]), [padding]);
|
|
29
|
+
const margin = useMemo(() => ([marginProp, marginProp]), [marginProp]);
|
|
30
|
+
const maxRows = getMaxRows(gridLayouts);
|
|
31
|
+
// Inline CSS is generally avoided, but this saves the end-user a little work,
|
|
32
|
+
// and prevents class names from getting out of sync.
|
|
33
|
+
const style = (_jsx("style", { children: `
|
|
34
|
+
${draggableHandle} {
|
|
35
|
+
cursor: grab;
|
|
36
|
+
}
|
|
37
|
+
${draggableHandle}:active {
|
|
38
|
+
cursor: grabbing;
|
|
39
|
+
}
|
|
40
|
+
` }));
|
|
41
|
+
// A bit of hacky feeling stuff to prevent users from stacking elements and forcing the
|
|
42
|
+
// grid boundary to change even when isBounded is set to true. It seems like react-grid-layout
|
|
43
|
+
// should support this through isBounded and maxRows, but neither of these actually works for the
|
|
44
|
+
// edge case where a user drags one element above another and forces the first element downwards.
|
|
45
|
+
//
|
|
46
|
+
// Additionally, react-grid-layout doesn't revert if you don't save a new/changed layouts. If you
|
|
47
|
+
// wish to do this, first you have to save the new layouts and render the grid with it, and then
|
|
48
|
+
// you can revert to the original layouts. Thus, we need one state for a temporary grid layout,
|
|
49
|
+
// which gets called on every onLayoutChange. If the grid height is still valid, we then call
|
|
50
|
+
// onValidLayoutChange, otherwise we call onValidLayoutChange with lastValidGridLayouts.
|
|
51
|
+
//
|
|
52
|
+
// See the following GitHub issue for more information.
|
|
53
|
+
// https://github.com/react-grid-layout/react-grid-layout/issues/1104#issuecomment-827785217
|
|
54
|
+
const [tempGridLayouts, setTempGridLayouts] = useState(null);
|
|
55
|
+
const [lastValidGridLayouts, setLastValidGridLayouts] = useState(gridLayouts);
|
|
56
|
+
const onValidLayoutChange = useCallback((newLayout) => {
|
|
57
|
+
if (newLayout.length === Object.entries(gridComponents).length) {
|
|
58
|
+
const newComponentProps = {};
|
|
59
|
+
newLayout.forEach((nextC) => {
|
|
60
|
+
const id = nextC.i;
|
|
61
|
+
const prevC = gridComponents[id];
|
|
62
|
+
if (prevC) {
|
|
63
|
+
const nextProps = {
|
|
64
|
+
x: nextC.x, y: nextC.y, w: nextC.w, h: nextC.h,
|
|
65
|
+
};
|
|
66
|
+
const prevProps = {
|
|
67
|
+
x: prevC.x, y: prevC.y, w: prevC.w, h: prevC.h,
|
|
68
|
+
};
|
|
69
|
+
if (!isEqual(nextProps, prevProps)) {
|
|
70
|
+
newComponentProps[id] = nextProps;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
if (Object.keys(newComponentProps).length > 0) {
|
|
75
|
+
onLayoutChangeProp(newComponentProps);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [gridComponents, onLayoutChangeProp]);
|
|
79
|
+
const onLayoutChange = useCallback((newLayout, allLayouts) => {
|
|
80
|
+
// We first need to set the new layout to the potentially-invalid allLayouts
|
|
81
|
+
// (see comments above about react-grid-layout limitations).
|
|
82
|
+
setTempGridLayouts(allLayouts);
|
|
83
|
+
// Then we wait 50ms and validate/set the new layout.
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
if (!isBounded || getMaxRows({ ID: newLayout }) <= maxRows) {
|
|
86
|
+
// Good, new layout was valid with respect to isBounded, so set in parent.
|
|
87
|
+
onValidLayoutChange(newLayout);
|
|
88
|
+
setLastValidGridLayouts(allLayouts);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// Bad, new layout was not valid with respect to isBounded.
|
|
92
|
+
onValidLayoutChange(lastValidGridLayouts);
|
|
93
|
+
}
|
|
94
|
+
setTempGridLayouts(null);
|
|
95
|
+
}, 50);
|
|
96
|
+
}, [isBounded, lastValidGridLayouts, maxRows, onValidLayoutChange]);
|
|
97
|
+
const saveCurrentLayouts = useCallback(() => {
|
|
98
|
+
setLastValidGridLayouts(gridLayouts);
|
|
99
|
+
}, [gridLayouts]);
|
|
100
|
+
const layoutChildren = useMemo(() => Object.values(gridComponents).map((v) => {
|
|
101
|
+
const Component = getComponent(v.component);
|
|
102
|
+
const removeGridComponent = () => {
|
|
103
|
+
onRemoveComponent(v.uid);
|
|
104
|
+
};
|
|
105
|
+
return (_jsx("div", { children: _jsx(Component, { ...v.props, uuid: v.uid, coordinationScopes: v.coordinationScopes, coordinationScopesBy: v.coordinationScopesBy, theme: theme, removeGridComponent: removeGridComponent }) }, v.uid));
|
|
106
|
+
}), [gridComponents, getComponent, onRemoveComponent, theme]);
|
|
107
|
+
return (gridLayouts && gridComponents && gridBreakpoints && gridCols) && (_jsxs(_Fragment, { children: [style, _jsx(ResponsiveHeightGridLayout, { className: "layout", cols: gridCols, layouts: tempGridLayouts || gridLayouts, breakpoints: gridBreakpoints, height: height, rowHeight: rowHeight
|
|
108
|
+
|| ((window.innerHeight - 2 * padding - (maxRows - 1) * margin)
|
|
109
|
+
/ maxRows), containerPadding: containerPadding, margin: margin, draggableHandle: draggableHandle, onLayoutChange: onLayoutChange, isBounded: isBounded, onResizeStart: saveCurrentLayouts, onDragStart: saveCurrentLayouts, onResize: onResize, onResizeStop: onResizeStop, children: layoutChildren })] }));
|
|
110
|
+
}
|
|
111
|
+
VitessceGridLayout.defaultProps = {
|
|
112
|
+
padding: 10,
|
|
113
|
+
margin: 10,
|
|
114
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VitessceGridLayout.test.d.ts","sourceRoot":"","sources":["../../src/vitessce-grid-layout/VitessceGridLayout.test.jsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { cleanup, render, screen } from '@testing-library/react';
|
|
4
|
+
import { afterEach } from 'vitest';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { PluginViewType } from '@vitessce/plugins';
|
|
7
|
+
import { VitessceGridLayout } from './VitessceGridLayout.js';
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
cleanup();
|
|
10
|
+
});
|
|
11
|
+
function FakeComponent(props) {
|
|
12
|
+
const { text } = props;
|
|
13
|
+
return _jsx("span", { children: text });
|
|
14
|
+
}
|
|
15
|
+
const layoutJson = {
|
|
16
|
+
columns: {
|
|
17
|
+
600: [0, 2, 4, 8],
|
|
18
|
+
},
|
|
19
|
+
components: [
|
|
20
|
+
{
|
|
21
|
+
component: 'FakeComponent',
|
|
22
|
+
uid: 'fake',
|
|
23
|
+
props: { text: 'Hello World' },
|
|
24
|
+
x: 0,
|
|
25
|
+
y: 0,
|
|
26
|
+
w: 2,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
describe('VitessceGridLayout.js', () => {
|
|
31
|
+
describe('<VitessceGridLayout />', () => {
|
|
32
|
+
it('mount() works', async () => {
|
|
33
|
+
const viewTypes = [new PluginViewType('FakeComponent', FakeComponent, [])];
|
|
34
|
+
const { container } = render(_jsx(VitessceGridLayout, { layout: layoutJson, viewTypes: viewTypes, draggableHandle: ".my-handle" }));
|
|
35
|
+
expect(await screen.findByText('Hello World'));
|
|
36
|
+
expect(container.querySelectorAll('.react-grid-item span:not(.react-resizable-handle)').length).toEqual(1);
|
|
37
|
+
const style = container.querySelectorAll('style');
|
|
38
|
+
expect(style.length).toEqual(1);
|
|
39
|
+
expect(style[0].textContent).toContain('.my-handle {');
|
|
40
|
+
expect(style[0].textContent).toContain('.my-handle:active {');
|
|
41
|
+
});
|
|
42
|
+
it('rowHeight works', () => {
|
|
43
|
+
const viewTypes = [new PluginViewType('FakeComponent', FakeComponent, [])];
|
|
44
|
+
const { container } = render(_jsx(VitessceGridLayout, { layout: layoutJson, viewTypes: viewTypes, draggableHandle: ".my-handle", rowHeight: 123 }));
|
|
45
|
+
expect(container.querySelector('.react-grid-item').style.height).toEqual('123px');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vitessce-grid-layout/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VitessceGridLayout } from './VitessceGridLayout.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function makeGridLayout(colXs: any, colLayout: any): {
|
|
2
|
+
i: string;
|
|
3
|
+
y: any;
|
|
4
|
+
h: any;
|
|
5
|
+
x: any;
|
|
6
|
+
w: any;
|
|
7
|
+
}[];
|
|
8
|
+
export function getMaxRows(layouts: any): number;
|
|
9
|
+
export function resolveLayout(layout: any): {
|
|
10
|
+
cols: {};
|
|
11
|
+
layouts: {};
|
|
12
|
+
breakpoints: {};
|
|
13
|
+
components: {};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=layout-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-utils.d.ts","sourceRoot":"","sources":["../../src/vitessce-grid-layout/layout-utils.js"],"names":[],"mappings":"AAMA;;;;;;IAYC;AAED,iDAQC;AAED;;;;;EA6CC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { range } from 'lodash-es';
|
|
2
|
+
function sum(a) {
|
|
3
|
+
return a.reduce((x, y) => x + y, 0);
|
|
4
|
+
}
|
|
5
|
+
export function makeGridLayout(colXs, colLayout) {
|
|
6
|
+
const colWs = [];
|
|
7
|
+
for (let i = 0; i < colXs.length; i++) { // eslint-disable-line no-plusplus
|
|
8
|
+
colWs.push(colXs[i + 1] - colXs[i]);
|
|
9
|
+
}
|
|
10
|
+
return Object.entries(colLayout).map(([id, spec]) => ({
|
|
11
|
+
i: id,
|
|
12
|
+
y: spec.y,
|
|
13
|
+
h: spec.h || 1,
|
|
14
|
+
x: colXs[spec.x],
|
|
15
|
+
w: sum(colWs.slice(spec.x, spec.x + (spec.w || 1))),
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
export function getMaxRows(layouts) {
|
|
19
|
+
return Math.max(...Object.values(layouts).map(layout => Math.max(...layout.map(xywh => xywh.y + xywh.h))));
|
|
20
|
+
}
|
|
21
|
+
export function resolveLayout(layout) {
|
|
22
|
+
const cols = {};
|
|
23
|
+
const layouts = {};
|
|
24
|
+
const breakpoints = {};
|
|
25
|
+
const components = {};
|
|
26
|
+
const positions = {};
|
|
27
|
+
(('components' in layout) ? layout.components : layout).forEach((def) => {
|
|
28
|
+
const id = def.uid;
|
|
29
|
+
components[id] = {
|
|
30
|
+
uid: def.uid,
|
|
31
|
+
component: def.component,
|
|
32
|
+
props: def.props || {},
|
|
33
|
+
coordinationScopes: def.coordinationScopes || {},
|
|
34
|
+
coordinationScopesBy: def.coordinationScopesBy || {},
|
|
35
|
+
};
|
|
36
|
+
positions[id] = {
|
|
37
|
+
id, x: def.x, y: def.y, w: def.w, h: def.h,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
if ('components' in layout) {
|
|
41
|
+
Object.entries(layout.columns).forEach(([width, columnXs]) => {
|
|
42
|
+
cols[width] = columnXs[columnXs.length - 1];
|
|
43
|
+
layouts[width] = makeGridLayout(columnXs, positions);
|
|
44
|
+
breakpoints[width] = width;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// static layout
|
|
49
|
+
const id = 'ID';
|
|
50
|
+
const columnCount = 12;
|
|
51
|
+
cols[id] = columnCount;
|
|
52
|
+
layouts[id] = makeGridLayout(range(columnCount + 1), positions);
|
|
53
|
+
breakpoints[id] = 1000;
|
|
54
|
+
// Default has different numbers of columns at different widths,
|
|
55
|
+
// so we do need to override that to ensure the same number of columns,
|
|
56
|
+
// regardless of window width.
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
cols, layouts, breakpoints, components,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-utils.test.d.ts","sourceRoot":"","sources":["../../src/vitessce-grid-layout/layout-utils.test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { makeGridLayout, getMaxRows, resolveLayout, } from './layout-utils.js';
|
|
2
|
+
describe('layout-utils.js', () => {
|
|
3
|
+
describe('makeGridLayout', () => {
|
|
4
|
+
it('applies columnXs and makes list from object', () => {
|
|
5
|
+
const columnXs = [0, 4, 8, 12];
|
|
6
|
+
const layout = {
|
|
7
|
+
bigLeft: { x: 0, y: 0, w: 2 },
|
|
8
|
+
smallRight: { x: 2, y: 0 },
|
|
9
|
+
smallLeft: { x: 0, y: 1 },
|
|
10
|
+
bigRight: { x: 1, y: 1, w: 2 },
|
|
11
|
+
wholeRow: { x: 0, y: 2, w: 3 },
|
|
12
|
+
};
|
|
13
|
+
const gridLayout = makeGridLayout(columnXs, layout);
|
|
14
|
+
expect(gridLayout).toEqual(
|
|
15
|
+
/* Disable eslint so it's easier to copy-and-paste from test results. */
|
|
16
|
+
/* eslint-disable quote-props */
|
|
17
|
+
/* eslint-disable quotes */
|
|
18
|
+
[
|
|
19
|
+
{
|
|
20
|
+
"h": 1,
|
|
21
|
+
"i": "bigLeft",
|
|
22
|
+
"w": 8,
|
|
23
|
+
"x": 0,
|
|
24
|
+
"y": 0,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"h": 1,
|
|
28
|
+
"i": "smallRight",
|
|
29
|
+
"w": 4,
|
|
30
|
+
"x": 8,
|
|
31
|
+
"y": 0,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"h": 1,
|
|
35
|
+
"i": "smallLeft",
|
|
36
|
+
"w": 4,
|
|
37
|
+
"x": 0,
|
|
38
|
+
"y": 1,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"h": 1,
|
|
42
|
+
"i": "bigRight",
|
|
43
|
+
"w": 8,
|
|
44
|
+
"x": 4,
|
|
45
|
+
"y": 1,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"h": 1,
|
|
49
|
+
"i": "wholeRow",
|
|
50
|
+
"w": 12,
|
|
51
|
+
"x": 0,
|
|
52
|
+
"y": 2,
|
|
53
|
+
},
|
|
54
|
+
]);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('getMaxRows', () => {
|
|
58
|
+
it('works', () => {
|
|
59
|
+
const columnXs = [0, 4, 8, 12];
|
|
60
|
+
const layout = {
|
|
61
|
+
bigLeft: { x: 0, y: 0, w: 2 },
|
|
62
|
+
smallRight: { x: 2, y: 0 },
|
|
63
|
+
smallLeft: { x: 0, y: 1 },
|
|
64
|
+
bigRight: { x: 1, y: 1, w: 2 },
|
|
65
|
+
wholeRow: { x: 0, y: 2, w: 3 },
|
|
66
|
+
};
|
|
67
|
+
const gridLayout = makeGridLayout(columnXs, layout);
|
|
68
|
+
expect(getMaxRows([gridLayout])).toEqual(3);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
describe('resolveLayout', () => {
|
|
72
|
+
const componentsSpec = [
|
|
73
|
+
{
|
|
74
|
+
uid: 'i0', component: 'NoProps', x: 0, y: 0,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
uid: 'i1', component: 'HasProps', props: { foo: 'bar' }, x: 1, y: 1, w: 1, h: 1,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
const expectedComponents = {
|
|
81
|
+
i0: {
|
|
82
|
+
uid: 'i0',
|
|
83
|
+
component: 'NoProps',
|
|
84
|
+
coordinationScopes: {},
|
|
85
|
+
coordinationScopesBy: {},
|
|
86
|
+
props: {},
|
|
87
|
+
},
|
|
88
|
+
i1: {
|
|
89
|
+
uid: 'i1',
|
|
90
|
+
component: 'HasProps',
|
|
91
|
+
coordinationScopes: {},
|
|
92
|
+
coordinationScopesBy: {},
|
|
93
|
+
props: {
|
|
94
|
+
foo: 'bar',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
it('handles responsive', () => {
|
|
99
|
+
const { cols, layouts, breakpoints, components, } = resolveLayout({
|
|
100
|
+
columns: {
|
|
101
|
+
1000: [0, 3, 9, 12],
|
|
102
|
+
800: [0, 4, 8, 12],
|
|
103
|
+
},
|
|
104
|
+
components: componentsSpec,
|
|
105
|
+
});
|
|
106
|
+
expect(cols).toEqual({ 800: 12, 1000: 12 });
|
|
107
|
+
expect(layouts).toEqual({
|
|
108
|
+
800: [
|
|
109
|
+
{
|
|
110
|
+
h: 1, i: 'i0', w: 4, x: 0, y: 0,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
h: 1, i: 'i1', w: 4, x: 4, y: 1,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
1000: [
|
|
117
|
+
{
|
|
118
|
+
h: 1, i: 'i0', w: 3, x: 0, y: 0,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
h: 1, i: 'i1', w: 6, x: 3, y: 1,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
});
|
|
125
|
+
expect(breakpoints).toEqual({
|
|
126
|
+
800: '800',
|
|
127
|
+
1000: '1000',
|
|
128
|
+
});
|
|
129
|
+
expect(components).toEqual(expectedComponents);
|
|
130
|
+
});
|
|
131
|
+
it('handles static', () => {
|
|
132
|
+
const { cols, layouts, breakpoints, components, } = resolveLayout(componentsSpec);
|
|
133
|
+
expect(cols).toEqual({ ID: 12 });
|
|
134
|
+
expect(layouts).toEqual({
|
|
135
|
+
ID: [
|
|
136
|
+
{
|
|
137
|
+
h: 1, i: 'i0', w: 1, x: 0, y: 0,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
h: 1, i: 'i1', w: 1, x: 1, y: 1,
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
});
|
|
144
|
+
expect(breakpoints).toEqual({ ID: 1000 });
|
|
145
|
+
expect(components).toEqual(expectedComponents);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function useRowHeight(config: any, initialRowHeight: any, height: any, margin: any, padding: any): any[];
|
|
2
|
+
/**
|
|
3
|
+
* Create a mapping from dataset ID to loader objects by data type.
|
|
4
|
+
* @param {object[]} datasets The datasets array from the view config.
|
|
5
|
+
* @param {string} configDescription The top-level description in the
|
|
6
|
+
* @param {PluginFileType[]} fileTypes
|
|
7
|
+
* @param {PluginCoordinationType[]} coordinationTypes
|
|
8
|
+
* view config.
|
|
9
|
+
* @returns {object} Mapping from dataset ID to data type to loader
|
|
10
|
+
* instance.
|
|
11
|
+
*/
|
|
12
|
+
export function createLoaders(datasets: object[], configDescription: string, fileTypes: PluginFileType[], coordinationTypes: PluginCoordinationType[]): object;
|
|
13
|
+
//# sourceMappingURL=vitessce-grid-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitessce-grid-utils.d.ts","sourceRoot":"","sources":["../src/vitessce-grid-utils.js"],"names":[],"mappings":"AA0CA,gHA6CC;AA4BD;;;;;;;;;GASG;AACH,wCARW,MAAM,EAAE,qBACR,MAAM,aACN,gBAAgB,qBAChB,wBAAwB,GAEtB,MAAM,CAiDlB"}
|