@vitessce/vit-s 2.0.3-beta.0 → 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 -18
- package/dist-tsc/CallbackPublisher.d.ts +18 -0
- package/dist-tsc/CallbackPublisher.d.ts.map +1 -0
- package/{dist → dist-tsc}/CallbackPublisher.js +6 -12
- package/dist-tsc/LoadingIndicator.d.ts +2 -0
- package/dist-tsc/LoadingIndicator.d.ts.map +1 -0
- package/{dist → dist-tsc}/LoadingIndicator.js +1 -2
- package/dist-tsc/TitleInfo.d.ts +2 -0
- package/dist-tsc/TitleInfo.d.ts.map +1 -0
- package/{dist → dist-tsc}/TitleInfo.js +6 -83
- 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 → dist-tsc}/VitessceGrid.js +14 -13
- package/dist-tsc/VitessceGrid.test.d.ts +2 -0
- package/dist-tsc/VitessceGrid.test.d.ts.map +1 -0
- package/{dist → dist-tsc}/VitessceGrid.test.js +8 -4
- package/dist-tsc/Warning.d.ts +2 -0
- package/dist-tsc/Warning.d.ts.map +1 -0
- package/{dist → dist-tsc}/Warning.js +2 -2
- package/dist-tsc/classNames.d.ts +8 -0
- package/dist-tsc/classNames.d.ts.map +1 -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 → dist-tsc}/data/AbstractTwoStepLoader.js +1 -1
- package/dist-tsc/data/LoaderResult.d.ts +7 -0
- package/dist-tsc/data/LoaderResult.d.ts.map +1 -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 → dist-tsc}/data-hook-utils.js +4 -6
- package/dist-tsc/data-hooks.d.ts +77 -0
- package/dist-tsc/data-hooks.d.ts.map +1 -0
- package/{dist → dist-tsc}/data-hooks.js +4 -4
- package/dist-tsc/errors/AbstractLoaderError.d.ts +10 -0
- package/dist-tsc/errors/AbstractLoaderError.d.ts.map +1 -0
- package/dist-tsc/errors/DataSourceFetchError.d.ts +8 -0
- package/dist-tsc/errors/DataSourceFetchError.d.ts.map +1 -0
- package/{dist → dist-tsc}/errors/DataSourceFetchError.js +1 -1
- package/dist-tsc/errors/DatasetNotFoundError.d.ts +6 -0
- package/dist-tsc/errors/DatasetNotFoundError.d.ts.map +1 -0
- package/{dist → dist-tsc}/errors/DatasetNotFoundError.js +1 -1
- package/dist-tsc/errors/LoaderNotFoundError.d.ts +10 -0
- package/dist-tsc/errors/LoaderNotFoundError.d.ts.map +1 -0
- package/{dist → dist-tsc}/errors/LoaderNotFoundError.js +1 -1
- package/dist-tsc/errors/LoaderValidationError.d.ts +10 -0
- package/dist-tsc/errors/LoaderValidationError.d.ts.map +1 -0
- package/{dist → dist-tsc}/errors/LoaderValidationError.js +1 -1
- package/dist-tsc/errors/index.d.ts +6 -0
- package/dist-tsc/errors/index.d.ts.map +1 -0
- package/{dist → dist-tsc}/errors/index.js +5 -6
- package/dist-tsc/hooks.d.ts +80 -0
- package/dist-tsc/hooks.d.ts.map +1 -0
- package/{dist → dist-tsc}/hooks.js +60 -4
- package/dist-tsc/index.d.ts +11 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +11 -0
- package/dist-tsc/plugins.test.fixtures.d.ts +61 -0
- package/dist-tsc/plugins.test.fixtures.d.ts.map +1 -0
- package/{dist → dist-tsc}/schemas/config-1.0.16.schema.json +21 -41
- 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/obsSetsTabular.schema.d.ts +57 -0
- package/dist-tsc/schemas/obsSetsTabular.schema.d.ts.map +1 -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/shared-mui/components.d.ts +2 -0
- package/dist-tsc/shared-mui/components.d.ts.map +1 -0
- package/{dist → dist-tsc}/shared-mui/components.js +2 -8
- package/dist-tsc/shared-mui/container.d.ts +2 -0
- package/dist-tsc/shared-mui/container.d.ts.map +1 -0
- package/{dist → dist-tsc}/shared-mui/container.js +1 -1
- package/dist-tsc/shared-mui/styles.d.ts +5 -0
- package/dist-tsc/shared-mui/styles.d.ts.map +1 -0
- package/{dist → dist-tsc}/shared-mui/styles.js +4 -2
- 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 → dist-tsc}/shared-plot-options/CellColorEncodingOption.js +3 -4
- 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 → dist-tsc}/shared-plot-options/OptionSelect.js +2 -2
- 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 → dist-tsc}/shared-plot-options/OptionsContainer.js +2 -5
- 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 → dist-tsc}/shared-plot-options/styles.js +1 -1
- package/dist-tsc/state/hooks.d.ts +216 -0
- package/dist-tsc/state/hooks.d.ts.map +1 -0
- package/{dist → dist-tsc}/state/hooks.js +47 -21
- 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 → dist-tsc}/view-config-utils.js +32 -84
- 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 → dist-tsc}/view-config-utils.test.fixtures.js +118 -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 → dist-tsc}/vitessce-grid-layout/VitessceGridLayout.js +47 -28
- 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 → dist-tsc}/vitessce-grid-layout/VitessceGridLayout.test.js +13 -5
- 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 → dist-tsc}/vitessce-grid-layout/layout-utils.js +2 -1
- 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 → dist-tsc}/vitessce-grid-layout/layout-utils.test.js +3 -1
- package/dist-tsc/vitessce-grid-utils.d.ts +13 -0
- package/dist-tsc/vitessce-grid-utils.d.ts.map +1 -0
- package/{dist → dist-tsc}/vitessce-grid-utils.js +15 -14
- package/package.json +24 -11
- package/src/CallbackPublisher.js +77 -0
- package/src/LoadingIndicator.js +33 -0
- package/src/TitleInfo.js +167 -0
- package/src/VitS.js +202 -0
- package/src/VitessceGrid.js +118 -0
- package/src/VitessceGrid.test.jsx +57 -0
- package/src/Warning.js +62 -0
- package/src/classNames.js +8 -0
- package/src/data/AbstractLoader.js +23 -0
- package/src/data/AbstractTwoStepLoader.js +8 -0
- package/src/data/LoaderResult.js +8 -0
- package/src/data/index.js +3 -0
- package/src/data/loader-registry.js +28 -0
- package/src/data-hook-utils.js +195 -0
- package/src/data-hooks.js +354 -0
- package/src/errors/AbstractLoaderError.js +14 -0
- package/src/errors/DataSourceFetchError.js +15 -0
- package/src/errors/DatasetNotFoundError.js +23 -0
- package/src/errors/LoaderNotFoundError.js +24 -0
- package/src/errors/LoaderValidationError.js +23 -0
- package/src/errors/index.js +5 -0
- package/src/hooks.js +317 -0
- package/src/index.js +76 -0
- package/src/plugins.test.fixtures.js +78 -0
- package/src/schemas/config-0.1.0.schema.json +85 -0
- package/src/schemas/config-1.0.0.schema.json +733 -0
- package/src/schemas/config-1.0.1.schema.json +909 -0
- package/src/schemas/config-1.0.10.schema.json +969 -0
- package/src/schemas/config-1.0.11.schema.json +990 -0
- package/src/schemas/config-1.0.12.schema.json +997 -0
- package/src/schemas/config-1.0.13.schema.json +1013 -0
- package/src/schemas/config-1.0.14.schema.json +1048 -0
- package/src/schemas/config-1.0.15.schema.json +1048 -0
- package/src/schemas/config-1.0.16.schema.json +1089 -0
- package/src/schemas/config-1.0.2.schema.json +911 -0
- package/src/schemas/config-1.0.3.schema.json +911 -0
- package/src/schemas/config-1.0.4.schema.json +949 -0
- package/src/schemas/config-1.0.5.schema.json +949 -0
- package/src/schemas/config-1.0.6.schema.json +950 -0
- package/src/schemas/config-1.0.7.schema.json +950 -0
- package/src/schemas/config-1.0.8.schema.json +966 -0
- package/src/schemas/config-1.0.9.schema.json +965 -0
- package/src/schemas/fixtures/cellSets.good.json +16 -0
- package/src/schemas/fixtures/config-1.0.1.bad.json +1 -0
- package/src/schemas/fixtures/config-1.0.1.bad.message.json +11 -0
- package/src/schemas/fixtures/config-1.0.1.good.json +37 -0
- package/src/schemas/fixtures/config-1.0.2.bad.json +1 -0
- package/src/schemas/fixtures/config-1.0.2.bad.message.json +11 -0
- package/src/schemas/fixtures/config-1.0.2.good.json +38 -0
- package/src/schemas/fixtures/config-1.0.3.bad.json +1 -0
- package/src/schemas/fixtures/config-1.0.3.bad.message.json +11 -0
- package/src/schemas/fixtures/config-1.0.3.good.json +38 -0
- package/src/schemas/fixtures/obsSets.bad.json +1 -0
- package/src/schemas/fixtures/obsSets.bad.message.json +11 -0
- package/src/schemas/fixtures/obsSets.good.json +16 -0
- package/src/schemas/fixtures/obsSetsTabular.bad.json +1 -0
- package/src/schemas/fixtures/obsSetsTabular.bad.message.json +11 -0
- package/src/schemas/fixtures/obsSetsTabular.good.json +26 -0
- package/src/schemas/fixtures/raster.bad.json +1 -0
- package/src/schemas/fixtures/raster.bad.message.json +11 -0
- package/src/schemas/fixtures/raster.good.json +39 -0
- package/src/schemas/obsSets.schema.js +195 -0
- package/src/schemas/obsSetsTabular.schema.js +39 -0
- package/src/schemas/raster.schema.js +121 -0
- package/src/schemas/schema-schema.sh +34 -0
- package/src/shared-mui/components.js +81 -0
- package/src/shared-mui/container.js +212 -0
- package/src/shared-mui/styles.js +113 -0
- package/src/shared-plot-options/CellColorEncodingOption.js +42 -0
- package/src/shared-plot-options/OptionSelect.js +19 -0
- package/src/shared-plot-options/OptionsContainer.js +23 -0
- package/src/shared-plot-options/index.js +4 -0
- package/src/shared-plot-options/styles.js +49 -0
- package/src/state/hooks.js +640 -0
- package/src/title-styles.js +73 -0
- package/src/view-config-utils.js +263 -0
- package/src/view-config-utils.test.fixtures.js +893 -0
- package/src/view-config-utils.test.jsx +222 -0
- package/src/vitessce-grid-layout/VitessceGridLayout.js +179 -0
- package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +64 -0
- package/src/vitessce-grid-layout/index.js +1 -0
- package/src/vitessce-grid-layout/layout-utils.js +76 -0
- package/src/vitessce-grid-layout/layout-utils.test.js +167 -0
- package/src/vitessce-grid-utils.js +172 -0
- package/dist/VitS.js +0 -117
- package/dist/Vitessce.integration.test.js +0 -36
- package/dist/Vitessce.js +0 -101
- package/dist/component-registry.js +0 -16
- package/dist/data/AbstractLoader.js +0 -35
- package/dist/data/index.js +0 -3
- package/dist/data/loader-registry.js +0 -15
- package/dist/errors/OptionsValidationError.js +0 -15
- package/dist/export-utils.js +0 -70
- package/dist/export-utils.test.js +0 -66
- package/dist/file-options-schemas-legacy.js +0 -136
- package/dist/file-options-schemas-legacy.test.js +0 -126
- package/dist/file-options-schemas.js +0 -322
- package/dist/file-options-schemas.test.js +0 -23
- package/dist/joint-file-types-legacy.js +0 -278
- package/dist/joint-file-types-legacy.test.js +0 -400
- package/dist/joint-file-types.js +0 -148
- package/dist/joint-file-types.test.js +0 -139
- package/dist/loader-registry.js +0 -98
- package/dist/plugins.js +0 -154
- package/dist/plugins.test.js +0 -30
- package/dist/schemas/PrettyJsonSchema.js +0 -34
- package/dist/schemas/config-1.0.15.schema.test.js +0 -22
- package/dist/schemas/config-1.0.16.schema.test.js +0 -22
- package/dist/schemas/obs-sets-tabular.schema.js +0 -37
- package/dist/schemas/obs-sets.schema.js +0 -194
- package/dist/schemas/schema.test-old.js +0 -50
- package/dist/schemas/schema.test.js +0 -46
- package/dist/schemas-extra.js +0 -3
- package/dist/schemas.js +0 -4
- package/dist/shared-plot-options/index.js +0 -4
- package/dist/view-config-upgraders.js +0 -525
- package/dist/view-config-utils.test.js +0 -66
- package/dist/view-config-versions.js +0 -47
- package/dist/vitessce-grid-layout/index.js +0 -1
- /package/{dist → dist-tsc}/classNames.js +0 -0
- /package/{dist → dist-tsc}/data/LoaderResult.js +0 -0
- /package/{dist → dist-tsc}/errors/AbstractLoaderError.js +0 -0
- /package/{dist → dist-tsc}/plugins.test.fixtures.js +0 -0
- /package/{dist → dist-tsc}/schemas/config-0.1.0.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.0.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.1.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.10.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.11.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.12.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.13.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.14.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.15.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.2.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.3.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.4.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.5.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.6.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.7.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.8.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/config-1.0.9.schema.json +0 -0
- /package/{dist → dist-tsc}/schemas/obsSets.schema.js +0 -0
- /package/{dist → dist-tsc}/schemas/obsSetsTabular.schema.js +0 -0
- /package/{dist → dist-tsc}/schemas/raster.schema.js +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import TableCell from '@material-ui/core
|
|
4
|
-
import TableRow from '@material-ui/core/TableRow';
|
|
3
|
+
import { TableCell, TableRow } from '@material-ui/core';
|
|
5
4
|
import { capitalize } from '@vitessce/utils';
|
|
6
|
-
import OptionSelect from './OptionSelect';
|
|
7
|
-
import { useStyles } from './styles';
|
|
5
|
+
import OptionSelect from './OptionSelect.js';
|
|
6
|
+
import { useStyles } from './styles.js';
|
|
8
7
|
export default function CellColorEncodingOption(props) {
|
|
9
8
|
const { observationsLabel, cellColorEncoding, setCellColorEncoding, } = props;
|
|
10
9
|
const classes = useStyles();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionSelect.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/OptionSelect.js"],"names":[],"mappings":"AAIA,8DAcC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Select from '@material-ui/core
|
|
4
|
-
import { useStyles } from './styles';
|
|
3
|
+
import { Select } from '@material-ui/core';
|
|
4
|
+
import { useStyles } from './styles.js';
|
|
5
5
|
export default function OptionSelect(props) {
|
|
6
6
|
const { classes: classesProp = {} } = props;
|
|
7
7
|
const classes = useStyles();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionsContainer.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/OptionsContainer.js"],"names":[],"mappings":"AAIA,kEAkBC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Box from '@material-ui/core
|
|
4
|
-
import
|
|
5
|
-
import TableBody from '@material-ui/core/TableBody';
|
|
6
|
-
import TableContainer from '@material-ui/core/TableContainer';
|
|
7
|
-
import { useStyles } from './styles';
|
|
3
|
+
import { Box, Table, TableBody, TableContainer } from '@material-ui/core';
|
|
4
|
+
import { useStyles } from './styles.js';
|
|
8
5
|
export default function OptionsContainer(props) {
|
|
9
6
|
const { children, } = props;
|
|
10
7
|
const classes = useStyles();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as CellColorEncodingOption } from "./CellColorEncodingOption.js";
|
|
2
|
+
export { default as OptionsContainer } from "./OptionsContainer.js";
|
|
3
|
+
export { default as OptionSelect } from "./OptionSelect.js";
|
|
4
|
+
export { useStyles as usePlotOptionsStyles } from "./styles.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as CellColorEncodingOption } from './CellColorEncodingOption.js';
|
|
2
|
+
export { default as OptionsContainer } from './OptionsContainer.js';
|
|
3
|
+
export { default as OptionSelect } from './OptionSelect.js';
|
|
4
|
+
export { useStyles as usePlotOptionsStyles } from './styles.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/shared-plot-options/styles.js"],"names":[],"mappings":"AAEA,2GA8CI"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The useCoordination hook returns both the
|
|
3
|
+
* values and setter functions for the coordination objects
|
|
4
|
+
* in a particular coordination scope mapping.
|
|
5
|
+
* This hook is intended to be used within the ___Subscriber
|
|
6
|
+
* components to allow them to "hook into" only those coordination
|
|
7
|
+
* objects and setter functions of relevance.
|
|
8
|
+
* @param {string[]} parameters Array of coordination types.
|
|
9
|
+
* @param {object} coordinationScopes Mapping of coordination types
|
|
10
|
+
* to scope names.
|
|
11
|
+
* @returns {array} Returns a tuple [values, setters]
|
|
12
|
+
* where values is an object containing all coordination values,
|
|
13
|
+
* and setters is an object containing all coordination setter
|
|
14
|
+
* functions for the values in `values`, named with a "set"
|
|
15
|
+
* prefix.
|
|
16
|
+
*/
|
|
17
|
+
export function useCoordination(parameters: string[], coordinationScopes: object): array;
|
|
18
|
+
export function useMultiCoordinationValues(parameter: any, coordinationScopes: any): any;
|
|
19
|
+
/**
|
|
20
|
+
* Get a mapping from dataset coordination scopes to dataset UIDs.
|
|
21
|
+
* @param {object} coordinationScopes The coordination scope mapping object for a view.
|
|
22
|
+
* @returns {object} Mapping from dataset coordination scope names to dataset UIDs.
|
|
23
|
+
*/
|
|
24
|
+
export function useDatasetUids(coordinationScopes: object): object;
|
|
25
|
+
/**
|
|
26
|
+
* Use coordination values and coordination setter functions corresponding to
|
|
27
|
+
* {coordinationType}-specific coordination scopes for each coordination type.
|
|
28
|
+
* @param {string[]} parameters An array of coordination types supported by a view.
|
|
29
|
+
* @param {object} coordinationScopes The coordination scope mapping object for a view.
|
|
30
|
+
* @param {object} coordinationScopesBy The per-coordinationType coordination scope
|
|
31
|
+
* mapping object for a view.
|
|
32
|
+
* @param {string} byType The {coordinationType} to use for per-{coordinationType} coordination
|
|
33
|
+
* scope mappings.
|
|
34
|
+
* @returns {array} [cValues, cSetters] where
|
|
35
|
+
* cValues is a mapping from coordination scope name to { coordinationType: coordinationValue },
|
|
36
|
+
* and cSetters is a mapping from coordination scope name to { setCoordinationType }
|
|
37
|
+
* setter functions.
|
|
38
|
+
*/
|
|
39
|
+
export function useComplexCoordination(parameters: string[], coordinationScopes: object, coordinationScopesBy: object, byType: string): array;
|
|
40
|
+
/**
|
|
41
|
+
* Use coordination values and coordination setter functions corresponding to
|
|
42
|
+
* dataset-specific coordination scopes for each coordination type.
|
|
43
|
+
* @param {string[]} parameters An array of coordination types supported by a view.
|
|
44
|
+
* @param {object} coordinationScopes The coordination scope mapping object for a view.
|
|
45
|
+
* @param {object} coordinationScopesBy The per-coordinationType coordination scope
|
|
46
|
+
* mapping object for a view.
|
|
47
|
+
* @returns {array} [cValues, cSetters] where
|
|
48
|
+
* cValues is a mapping from coordination scope name to { coordinationType: coordinationValue },
|
|
49
|
+
* and cSetters is a mapping from coordination scope name to { setCoordinationType }
|
|
50
|
+
* setter functions.
|
|
51
|
+
*/
|
|
52
|
+
export function useMultiDatasetCoordination(parameters: string[], coordinationScopes: object, coordinationScopesBy: object): array;
|
|
53
|
+
/**
|
|
54
|
+
* The useAuxiliaryCoordination hook returns both the
|
|
55
|
+
* values and setter functions for the auxiliary coordination objects
|
|
56
|
+
* in a particular coordination scope mapping.
|
|
57
|
+
* This hook is intended to be used within the ___Subscriber
|
|
58
|
+
* components to allow them to "hook into" only those auxiliary coordination
|
|
59
|
+
* objects and setter functions of relevance, for example "on load" callbacks.
|
|
60
|
+
* @param {string[]} parameters Array of coordination types.
|
|
61
|
+
* @param {object} coordinationScopes Mapping of coordination types
|
|
62
|
+
* to scope names.
|
|
63
|
+
* @returns {array} Returns a tuple [values, setters]
|
|
64
|
+
* where values is an object containing all coordination values,
|
|
65
|
+
* and setters is an object containing all coordination setter
|
|
66
|
+
* functions for the values in `values`, named with a "set"
|
|
67
|
+
* prefix.
|
|
68
|
+
*/
|
|
69
|
+
export function useAuxiliaryCoordination(parameters: string[], coordinationScopes: object): array;
|
|
70
|
+
/**
|
|
71
|
+
* Obtain the loaders object from
|
|
72
|
+
* the global app state.
|
|
73
|
+
* @returns {object} The loaders object
|
|
74
|
+
* in the `useViewConfigStore` store.
|
|
75
|
+
*/
|
|
76
|
+
export function useLoaders(): object;
|
|
77
|
+
/**
|
|
78
|
+
* Find a specific loader instance for a particular dataset, data type, and view
|
|
79
|
+
* coordination values (mapping from coordination types to coordination values).
|
|
80
|
+
* Uses lodash/isMatch to perform matching against the file definition's
|
|
81
|
+
* coordination value mapping.
|
|
82
|
+
* @param {object} loaders The value returned by useLoaders.
|
|
83
|
+
* @param {string} dataset The dataset UID.
|
|
84
|
+
* @param {string} dataType The data type for the matching file.
|
|
85
|
+
* @param {object} viewCoordinationValues Current coordination values
|
|
86
|
+
* from the view. Match these against a subset of file definition coordination
|
|
87
|
+
* values.
|
|
88
|
+
* @returns The matching loader instance or `null`.
|
|
89
|
+
*/
|
|
90
|
+
export function useMatchingLoader(loaders: object, dataset: string, dataType: string, viewCoordinationValues: object): any;
|
|
91
|
+
/**
|
|
92
|
+
* Find a specific loader instance for a particular dataset, data type, and view
|
|
93
|
+
* coordination values (mapping from coordination types to coordination values).
|
|
94
|
+
* Uses lodash/isMatch to perform matching against the file definition's
|
|
95
|
+
* coordination value mapping.
|
|
96
|
+
* @param {object} loaders The value returned by useLoaders.
|
|
97
|
+
* @param {string} dataset The dataset UID.
|
|
98
|
+
* @param {string} dataType The data type for the matching file.
|
|
99
|
+
* @param {object} viewCoordinationValues Current coordination values
|
|
100
|
+
* from the view. Match these against a subset of file definition coordination
|
|
101
|
+
* values.
|
|
102
|
+
* @returns The matching loader instance or `null`.
|
|
103
|
+
*/
|
|
104
|
+
export function useMatchingLoaders(loaders: object, dataset: string, dataType: string, viewCoordinationValuesObj: any): any;
|
|
105
|
+
/**
|
|
106
|
+
* Obtain the view config layout array from
|
|
107
|
+
* the global app state.
|
|
108
|
+
* @returns {object[]} The layout array
|
|
109
|
+
* in the `useViewConfigStore` store.
|
|
110
|
+
*/
|
|
111
|
+
export function useLayout(): object[];
|
|
112
|
+
/**
|
|
113
|
+
* Obtain the component removal function from
|
|
114
|
+
* the global app state.
|
|
115
|
+
* @returns {function} The remove component function
|
|
116
|
+
* in the `useViewInfoStore` store.
|
|
117
|
+
*/
|
|
118
|
+
export function useRemoveComponent(): Function;
|
|
119
|
+
/**
|
|
120
|
+
* Obtain the component prop setter function from
|
|
121
|
+
* the global app state.
|
|
122
|
+
* @returns {function} The set component props function
|
|
123
|
+
* in the `useViewInfoStore` store.
|
|
124
|
+
*/
|
|
125
|
+
export function useChangeLayout(): Function;
|
|
126
|
+
/**
|
|
127
|
+
* Obtain the loaders setter function from
|
|
128
|
+
* the global app state.
|
|
129
|
+
* @returns {function} The loaders setter function
|
|
130
|
+
* in the `useViewConfigStore` store.
|
|
131
|
+
*/
|
|
132
|
+
export function useSetLoaders(): Function;
|
|
133
|
+
/**
|
|
134
|
+
* Obtain the view config setter function from
|
|
135
|
+
* the global app state.
|
|
136
|
+
* @returns {function} The view config setter function
|
|
137
|
+
* in the `useViewConfigStore` store.
|
|
138
|
+
*/
|
|
139
|
+
export function useSetViewConfig(viewConfigStoreApi: any): Function;
|
|
140
|
+
/**
|
|
141
|
+
* Obtain the component hover value from
|
|
142
|
+
* the global app state.
|
|
143
|
+
* @returns {number} The hovered component ID
|
|
144
|
+
* in the `useHoverStore` store.
|
|
145
|
+
*/
|
|
146
|
+
export function useComponentHover(): number;
|
|
147
|
+
/**
|
|
148
|
+
* Obtain the component hover setter function from
|
|
149
|
+
* the global app state.
|
|
150
|
+
* @returns {function} The component hover setter function
|
|
151
|
+
* in the `useHoverStore` store.
|
|
152
|
+
*/
|
|
153
|
+
export function useSetComponentHover(): Function;
|
|
154
|
+
/**
|
|
155
|
+
* Obtain the warning message from
|
|
156
|
+
* the global app state.
|
|
157
|
+
* @returns {string} The warning message
|
|
158
|
+
* in the `useWarnStore` store.
|
|
159
|
+
*/
|
|
160
|
+
export function useWarning(): string;
|
|
161
|
+
/**
|
|
162
|
+
* Obtain the warning setter function from
|
|
163
|
+
* the global app state.
|
|
164
|
+
* @returns {function} The warning setter function
|
|
165
|
+
* in the `useWarnStore` store.
|
|
166
|
+
*/
|
|
167
|
+
export function useSetWarning(): Function;
|
|
168
|
+
/**
|
|
169
|
+
* Obtain the component view info value from
|
|
170
|
+
* the global app state.
|
|
171
|
+
* @returns {object} The view info object for the component
|
|
172
|
+
* in the `useViewInfoStore` store.
|
|
173
|
+
*/
|
|
174
|
+
export function useComponentViewInfo(uuid: any): object;
|
|
175
|
+
/**
|
|
176
|
+
* Obtain the component view info setter function from
|
|
177
|
+
* the global app state.
|
|
178
|
+
* @returns {function} The component view info setter function
|
|
179
|
+
* in the `useViewInfoStore` store.
|
|
180
|
+
*/
|
|
181
|
+
export function useSetComponentViewInfo(uuid: any): Function;
|
|
182
|
+
/**
|
|
183
|
+
* Obtain the grid resize count value
|
|
184
|
+
* from the global app state.
|
|
185
|
+
* @returns {number} The grid resize increment value.
|
|
186
|
+
*/
|
|
187
|
+
export function useGridResize(): number;
|
|
188
|
+
/**
|
|
189
|
+
* Obtain the grid resize count increment function
|
|
190
|
+
* from the global app state.
|
|
191
|
+
* @returns {function} The grid resize count increment
|
|
192
|
+
* function.
|
|
193
|
+
*/
|
|
194
|
+
export function useEmitGridResize(): Function;
|
|
195
|
+
export const ViewConfigProvider: ({ initialStore, createStore, children, }: {
|
|
196
|
+
initialStore?: import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>> | undefined;
|
|
197
|
+
createStore: () => import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>>;
|
|
198
|
+
children: import("../../../plugins/node_modules/@types/react/ts5.0").ReactNode;
|
|
199
|
+
}) => import("../../../plugins/node_modules/@types/react/ts5.0").FunctionComponentElement<import("../../../plugins/node_modules/@types/react/ts5.0").ProviderProps<import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>> | undefined>>;
|
|
200
|
+
export const useViewConfigStore: import("zustand/context").UseContextStore<object>;
|
|
201
|
+
export const useViewConfigStoreApi: () => {
|
|
202
|
+
getState: import("zustand").GetState<object>;
|
|
203
|
+
setState: import("zustand").SetState<object>;
|
|
204
|
+
subscribe: import("zustand").Subscribe<object>;
|
|
205
|
+
destroy: import("zustand").Destroy;
|
|
206
|
+
};
|
|
207
|
+
export const AuxiliaryProvider: ({ initialStore, createStore, children, }: {
|
|
208
|
+
initialStore?: import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>> | undefined;
|
|
209
|
+
createStore: () => import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>>;
|
|
210
|
+
children: import("../../../plugins/node_modules/@types/react/ts5.0").ReactNode;
|
|
211
|
+
}) => import("../../../plugins/node_modules/@types/react/ts5.0").FunctionComponentElement<import("../../../plugins/node_modules/@types/react/ts5.0").ProviderProps<import("zustand").UseBoundStore<object, import("zustand").StoreApi<object>> | undefined>>;
|
|
212
|
+
export const useAuxiliaryStore: import("zustand/context").UseContextStore<object>;
|
|
213
|
+
export function createViewConfigStore(): Function;
|
|
214
|
+
export function useComponentLayout(component: any, scopes: any, coordinationScopes: any): Object;
|
|
215
|
+
export function createAuxiliaryStore(): Function;
|
|
216
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/state/hooks.js"],"names":[],"mappings":"AAuLA;;;;;;;;;;;;;;;GAeG;AACH,4CATW,MAAM,EAAE,sBACR,MAAM,SAkChB;AAED,yFAmBC;AAED;;;;GAIG;AACH,mDAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;;;;;;GAaG;AACH,mDAXW,MAAM,EAAE,sBACR,MAAM,wBACN,MAAM,UAEN,MAAM,SAsEhB;AAED;;;;;;;;;;;GAWG;AACH,wDATW,MAAM,EAAE,sBACR,MAAM,wBACN,MAAM,SAYhB;AA6BD;;;;;;;;;;;;;;;GAeG;AACH,qDATW,MAAM,EAAE,sBACR,MAAM,SAkChB;AAED;;;;;GAKG;AACH,8BAHa,MAAM,CAKlB;AAED;;;;;;;;;;;;GAYG;AACH,2CARW,MAAM,WACN,MAAM,YACN,MAAM,0BACN,MAAM,OAsBhB;AAED;;;;;;;;;;;;GAYG;AACH,4CARW,MAAM,WACN,MAAM,YACN,MAAM,uCA4BhB;AAED;;;;;GAKG;AACH,6BAHa,MAAM,EAAE,CAKpB;AAED;;;;;GAKG;AACH,+CAEC;AAED;;;;;GAKG;AACH,4CAEC;AAED;;;;;GAKG;AACH,0CAEC;AAED;;;;;GAKG;AACH,oEAIC;AAED;;;;;GAKG;AACH,qCAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,iDAEC;AAED;;;;;GAKG;AACH,8BAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,0CAEC;AAED;;;;;GAKG;AACH,iDAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,6DAOC;AAED;;;;GAIG;AACH,iCAFa,MAAM,CAIlB;AAED;;;;;GAKG;AACH,8CAEC;AA9mBD;;;;6PAA0D;AAC1D,mFAA0D;AAC1D;;;;;EAAgE;AAOhE;;;;6PAAwD;AACxD,kFAAwD;AAajD,kDA+CJ;AAOI,0FAFM,MAAM,CAOlB;AAcM,iDAUJ"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/* eslint-disable react-refresh/only-export-components */
|
|
1
2
|
import { useRef, useCallback, useMemo } from 'react';
|
|
2
3
|
import create from 'zustand';
|
|
3
4
|
import createContext from 'zustand/context';
|
|
4
5
|
import shallow from 'zustand/shallow';
|
|
5
|
-
import isMatch from 'lodash
|
|
6
|
+
import { isMatch } from 'lodash-es';
|
|
6
7
|
import { CoordinationType } from '@vitessce/constants-internal';
|
|
7
8
|
import { fromEntries, capitalize } from '@vitessce/utils';
|
|
8
9
|
// Reference: https://github.com/pmndrs/zustand#react-context
|
|
@@ -18,7 +19,10 @@ export const useAuxiliaryStore = useAuxiliaryStoreLocal;
|
|
|
18
19
|
* The useViewConfigStore hook is initialized via the zustand
|
|
19
20
|
* create() function, which sets up both the state variables
|
|
20
21
|
* and the reducer-type functions.
|
|
21
|
-
*
|
|
22
|
+
* References:
|
|
23
|
+
* - https://github.com/react-spring/zustand
|
|
24
|
+
* - https://github.com/pmndrs/zustand/releases/tag/v3.6.0
|
|
25
|
+
* - https://github.com/pmndrs/zustand#using-subscribe-with-selector
|
|
22
26
|
* @returns {function} The useStore hook.
|
|
23
27
|
*/
|
|
24
28
|
export const createViewConfigStore = () => create(set => ({
|
|
@@ -221,35 +225,41 @@ export function useDatasetUids(coordinationScopes) {
|
|
|
221
225
|
}
|
|
222
226
|
/**
|
|
223
227
|
* Use coordination values and coordination setter functions corresponding to
|
|
224
|
-
*
|
|
228
|
+
* {coordinationType}-specific coordination scopes for each coordination type.
|
|
225
229
|
* @param {string[]} parameters An array of coordination types supported by a view.
|
|
226
230
|
* @param {object} coordinationScopes The coordination scope mapping object for a view.
|
|
231
|
+
* @param {object} coordinationScopesBy The per-coordinationType coordination scope
|
|
232
|
+
* mapping object for a view.
|
|
233
|
+
* @param {string} byType The {coordinationType} to use for per-{coordinationType} coordination
|
|
234
|
+
* scope mappings.
|
|
227
235
|
* @returns {array} [cValues, cSetters] where
|
|
228
236
|
* cValues is a mapping from coordination scope name to { coordinationType: coordinationValue },
|
|
229
237
|
* and cSetters is a mapping from coordination scope name to { setCoordinationType }
|
|
230
238
|
* setter functions.
|
|
231
239
|
*/
|
|
232
|
-
export function
|
|
240
|
+
export function useComplexCoordination(parameters, coordinationScopes, coordinationScopesBy, byType) {
|
|
233
241
|
const setCoordinationValue = useViewConfigStore(state => state.setCoordinationValue);
|
|
234
|
-
const
|
|
242
|
+
const typeScopes = coordinationScopes[byType];
|
|
243
|
+
const byTypeScopes = coordinationScopesBy[byType];
|
|
235
244
|
// Convert a single scope to an array of scopes to be consistent.
|
|
236
|
-
const
|
|
245
|
+
const typeScopesArr = Array.isArray(typeScopes) ? typeScopes : [typeScopes];
|
|
237
246
|
const values = useViewConfigStore((state) => {
|
|
238
247
|
const { coordinationSpace } = state.viewConfig;
|
|
239
|
-
return fromEntries(
|
|
248
|
+
return fromEntries(typeScopesArr.map((datasetScope) => {
|
|
240
249
|
const datasetValues = fromEntries(parameters.map((parameter) => {
|
|
241
250
|
if (coordinationSpace && coordinationSpace[parameter]) {
|
|
242
251
|
let value;
|
|
243
252
|
const parameterSpace = coordinationSpace[parameter];
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
const parameterScopeGlobal = coordinationScopes[parameter];
|
|
254
|
+
const parameterScopeByDataset = byTypeScopes?.[parameter];
|
|
255
|
+
if (parameterScopeByDataset && parameterScopeByDataset[datasetScope]) {
|
|
256
|
+
value = parameterSpace[parameterScopeByDataset[datasetScope]];
|
|
247
257
|
}
|
|
248
|
-
else if (
|
|
249
|
-
value = parameterSpace[
|
|
258
|
+
else if (parameterScopeGlobal) {
|
|
259
|
+
value = parameterSpace[parameterScopeGlobal];
|
|
250
260
|
}
|
|
251
261
|
else {
|
|
252
|
-
console.error(`coordination scope for ${parameter}
|
|
262
|
+
console.error(`coordination scope for ${parameter} was not found.`);
|
|
253
263
|
}
|
|
254
264
|
return [parameter, value];
|
|
255
265
|
}
|
|
@@ -258,27 +268,28 @@ export function useMultiDatasetCoordination(parameters, coordinationScopes) {
|
|
|
258
268
|
return [datasetScope, datasetValues];
|
|
259
269
|
}));
|
|
260
270
|
}, shallow);
|
|
261
|
-
const setters = useMemo(() => fromEntries(
|
|
271
|
+
const setters = useMemo(() => fromEntries(typeScopesArr.map((datasetScope) => {
|
|
262
272
|
const datasetSetters = fromEntries(parameters.map((parameter) => {
|
|
263
273
|
const setterName = `set${capitalize(parameter)}`;
|
|
264
274
|
let setterFunc;
|
|
265
|
-
const
|
|
266
|
-
|
|
275
|
+
const parameterScopeGlobal = coordinationScopes[parameter];
|
|
276
|
+
const parameterScopeByDataset = byTypeScopes?.[parameter];
|
|
277
|
+
if (parameterScopeByDataset && parameterScopeByDataset[datasetScope]) {
|
|
267
278
|
setterFunc = value => setCoordinationValue({
|
|
268
279
|
parameter,
|
|
269
|
-
scope:
|
|
280
|
+
scope: parameterScopeByDataset[datasetScope],
|
|
270
281
|
value,
|
|
271
282
|
});
|
|
272
283
|
}
|
|
273
|
-
else if (
|
|
284
|
+
else if (parameterScopeGlobal) {
|
|
274
285
|
setterFunc = value => setCoordinationValue({
|
|
275
286
|
parameter,
|
|
276
|
-
scope:
|
|
287
|
+
scope: parameterScopeGlobal,
|
|
277
288
|
value,
|
|
278
289
|
});
|
|
279
290
|
}
|
|
280
291
|
else {
|
|
281
|
-
console.error(`coordination scope for ${parameter}
|
|
292
|
+
console.error(`coordination scope for ${parameter} was not found.`);
|
|
282
293
|
}
|
|
283
294
|
return [setterName, setterFunc];
|
|
284
295
|
}));
|
|
@@ -287,6 +298,21 @@ export function useMultiDatasetCoordination(parameters, coordinationScopes) {
|
|
|
287
298
|
})), [parameters, coordinationScopes]);
|
|
288
299
|
return [values, setters];
|
|
289
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Use coordination values and coordination setter functions corresponding to
|
|
303
|
+
* dataset-specific coordination scopes for each coordination type.
|
|
304
|
+
* @param {string[]} parameters An array of coordination types supported by a view.
|
|
305
|
+
* @param {object} coordinationScopes The coordination scope mapping object for a view.
|
|
306
|
+
* @param {object} coordinationScopesBy The per-coordinationType coordination scope
|
|
307
|
+
* mapping object for a view.
|
|
308
|
+
* @returns {array} [cValues, cSetters] where
|
|
309
|
+
* cValues is a mapping from coordination scope name to { coordinationType: coordinationValue },
|
|
310
|
+
* and cSetters is a mapping from coordination scope name to { setCoordinationType }
|
|
311
|
+
* setter functions.
|
|
312
|
+
*/
|
|
313
|
+
export function useMultiDatasetCoordination(parameters, coordinationScopes, coordinationScopesBy) {
|
|
314
|
+
return useComplexCoordination(parameters, coordinationScopes, coordinationScopesBy, CoordinationType.DATASET);
|
|
315
|
+
}
|
|
290
316
|
const AUXILIARY_COORDINATION_TYPES_MAP = {
|
|
291
317
|
spatialImageLayer: ['imageLayerCallbacks', 'areLoadingImageChannels'],
|
|
292
318
|
spatialSegmentationLayer: ['segmentationLayerCallbacks', 'areLoadingSegmentationChannels'],
|
|
@@ -527,7 +553,7 @@ export function useComponentViewInfo(uuid) {
|
|
|
527
553
|
*/
|
|
528
554
|
export function useSetComponentViewInfo(uuid) {
|
|
529
555
|
const setViewInfoRef = useRef(useViewInfoStore.getState().setComponentViewInfo);
|
|
530
|
-
const setComponentViewInfo = viewInfo => setViewInfoRef.current(uuid, viewInfo);
|
|
556
|
+
const setComponentViewInfo = useCallback(viewInfo => setViewInfoRef.current(uuid, viewInfo), [uuid]);
|
|
531
557
|
return setComponentViewInfo;
|
|
532
558
|
}
|
|
533
559
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-styles.d.ts","sourceRoot":"","sources":["../src/title-styles.js"],"names":[],"mappings":"AAEA,gHAsEI"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
export const useTitleStyles = makeStyles(theme => ({
|
|
3
|
+
title: {
|
|
4
|
+
color: theme.palette.primaryForeground,
|
|
5
|
+
overflowX: 'hidden',
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
flexShrink: '0',
|
|
9
|
+
},
|
|
10
|
+
titleLeft: {
|
|
11
|
+
flexShrink: '1',
|
|
12
|
+
textOverflow: 'ellipsis',
|
|
13
|
+
whiteSpace: 'nowrap',
|
|
14
|
+
},
|
|
15
|
+
titleInfo: {
|
|
16
|
+
width: '100%',
|
|
17
|
+
textOverflow: 'ellipsis',
|
|
18
|
+
whiteSpace: 'nowrap',
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
fontSize: '80% !important',
|
|
21
|
+
opacity: '.8',
|
|
22
|
+
padding: '0 4px',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
lineHeight: '25px !important',
|
|
25
|
+
flexShrink: '1',
|
|
26
|
+
textAlign: 'right !important',
|
|
27
|
+
},
|
|
28
|
+
titleButtons: {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
flexGrow: '1',
|
|
32
|
+
flexShrink: '0',
|
|
33
|
+
justifyContent: 'right',
|
|
34
|
+
'& div': {
|
|
35
|
+
display: 'inline-block',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
card: {
|
|
39
|
+
border: `1px solid ${theme.palette.cardBorder}`,
|
|
40
|
+
flex: '1 1 auto',
|
|
41
|
+
minHeight: '1px',
|
|
42
|
+
padding: '12px',
|
|
43
|
+
marginTop: '8px',
|
|
44
|
+
marginBottom: '8px',
|
|
45
|
+
position: 'relative',
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
minWidth: '0',
|
|
49
|
+
wordWrap: 'break-word',
|
|
50
|
+
backgroundClip: 'border-box',
|
|
51
|
+
borderRadius: '4px',
|
|
52
|
+
},
|
|
53
|
+
noScrollCard: {
|
|
54
|
+
backgroundColor: theme.palette.secondaryBackground,
|
|
55
|
+
color: theme.palette.secondaryForeground,
|
|
56
|
+
},
|
|
57
|
+
scrollCard: {
|
|
58
|
+
backgroundColor: theme.palette.primaryBackground,
|
|
59
|
+
color: theme.palette.primaryForeground,
|
|
60
|
+
'& a': {
|
|
61
|
+
color: theme.palette.primaryForegroundActive,
|
|
62
|
+
},
|
|
63
|
+
overflowY: 'auto',
|
|
64
|
+
},
|
|
65
|
+
spatialCard: {
|
|
66
|
+
backgroundColor: theme.palette.black,
|
|
67
|
+
color: theme.palette.white,
|
|
68
|
+
'& a': {
|
|
69
|
+
color: theme.palette.white,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a list of all unique scope names for a
|
|
3
|
+
* particular coordination type, which exist in
|
|
4
|
+
* a particular view config.
|
|
5
|
+
* @param {object} config A view config object.
|
|
6
|
+
* @param {string} coordinationType A coordination type,
|
|
7
|
+
* for example 'spatialZoom' or 'dataset'.
|
|
8
|
+
* @returns {string[]} Array of existing coordination scope names.
|
|
9
|
+
*/
|
|
10
|
+
export function getExistingScopesForCoordinationType(config: object, coordinationType: string): string[];
|
|
11
|
+
/**
|
|
12
|
+
* Initialize the view config:
|
|
13
|
+
* - Fill in missing coordination objects with default values.
|
|
14
|
+
* - Fill in missing component coordination scope mappings.
|
|
15
|
+
* based on the `initStrategy` specified in the view config.
|
|
16
|
+
* - Fill in missing view uid values.
|
|
17
|
+
* - Expand convenience file types.
|
|
18
|
+
* Should be "stable": if run on the same view config twice, the return value the second
|
|
19
|
+
* time should be identical to the return value the first time.
|
|
20
|
+
* @param {object} config The view config prop.
|
|
21
|
+
* @param {PluginJointFileType[]} jointFileTypes
|
|
22
|
+
* @param {PluginCoordinationType[]} coordinationTypes
|
|
23
|
+
* @param {PluginViewType[]} viewTypes
|
|
24
|
+
* @returns The initialized view config.
|
|
25
|
+
*/
|
|
26
|
+
export function initialize(config: object, jointFileTypes: PluginJointFileType[], coordinationTypes: PluginCoordinationType[], viewTypes: PluginViewType[]): {
|
|
27
|
+
uid: any;
|
|
28
|
+
layout: any;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=view-config-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-config-utils.d.ts","sourceRoot":"","sources":["../src/view-config-utils.js"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,6DALW,MAAM,oBACN,MAAM,GAEJ,MAAM,EAAE,CAMpB;AAyND;;;;;;;;;;;;;;GAcG;AACH,mCANW,MAAM,kBACN,qBAAqB,qBACrB,wBAAwB,aACxB,gBAAgB;;;EAY1B"}
|