@vitessce/feature-list 3.6.7 → 3.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -11874,6 +11874,23 @@ ButtonBase.propTypes = {
|
|
|
11874
11874
|
*/
|
|
11875
11875
|
type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
|
|
11876
11876
|
};
|
|
11877
|
+
function hasCorrectMainProperty(obj) {
|
|
11878
|
+
return typeof obj.main === "string";
|
|
11879
|
+
}
|
|
11880
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
11881
|
+
if (!hasCorrectMainProperty(obj)) {
|
|
11882
|
+
return false;
|
|
11883
|
+
}
|
|
11884
|
+
for (const value of additionalPropertiesToCheck) {
|
|
11885
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
11886
|
+
return false;
|
|
11887
|
+
}
|
|
11888
|
+
}
|
|
11889
|
+
return true;
|
|
11890
|
+
}
|
|
11891
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
11892
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
11893
|
+
}
|
|
11877
11894
|
function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
11878
11895
|
const propValue = props[propName];
|
|
11879
11896
|
const safePropName = propFullName || propName;
|
|
@@ -11957,23 +11974,6 @@ Portal.propTypes = {
|
|
|
11957
11974
|
{
|
|
11958
11975
|
Portal["propTypes"] = exactProp(Portal.propTypes);
|
|
11959
11976
|
}
|
|
11960
|
-
function hasCorrectMainProperty(obj) {
|
|
11961
|
-
return typeof obj.main === "string";
|
|
11962
|
-
}
|
|
11963
|
-
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
11964
|
-
if (!hasCorrectMainProperty(obj)) {
|
|
11965
|
-
return false;
|
|
11966
|
-
}
|
|
11967
|
-
for (const value of additionalPropertiesToCheck) {
|
|
11968
|
-
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
11969
|
-
return false;
|
|
11970
|
-
}
|
|
11971
|
-
}
|
|
11972
|
-
return true;
|
|
11973
|
-
}
|
|
11974
|
-
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
11975
|
-
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
11976
|
-
}
|
|
11977
11977
|
const FormControlContext = /* @__PURE__ */ React.createContext(void 0);
|
|
11978
11978
|
{
|
|
11979
11979
|
FormControlContext.displayName = "FormControlContext";
|
|
@@ -21810,7 +21810,12 @@ function FeatureListSubscriber(props) {
|
|
|
21810
21810
|
}] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_LIST], coordinationScopes);
|
|
21811
21811
|
const variablesLabel = variablesLabelOverride || featureType;
|
|
21812
21812
|
const title = titleOverride || `${capitalize$2(variablesLabel)} List`;
|
|
21813
|
-
const [
|
|
21813
|
+
const [
|
|
21814
|
+
{ featureLabelsMap },
|
|
21815
|
+
featureLabelsStatus,
|
|
21816
|
+
featureLabelsUrls,
|
|
21817
|
+
featureLabelsError
|
|
21818
|
+
] = useFeatureLabelsData(
|
|
21814
21819
|
loaders,
|
|
21815
21820
|
dataset,
|
|
21816
21821
|
false,
|
|
@@ -21823,12 +21828,21 @@ function FeatureListSubscriber(props) {
|
|
|
21823
21828
|
featureLabelsMap,
|
|
21824
21829
|
{ stripCuriePrefixes: true }
|
|
21825
21830
|
);
|
|
21826
|
-
const [
|
|
21831
|
+
const [
|
|
21832
|
+
{ featureIndex },
|
|
21833
|
+
matrixIndicesStatus,
|
|
21834
|
+
obsFeatureMatrixUrls,
|
|
21835
|
+
matrixIndicesError
|
|
21836
|
+
] = useObsFeatureMatrixIndices(
|
|
21827
21837
|
loaders,
|
|
21828
21838
|
dataset,
|
|
21829
21839
|
true,
|
|
21830
21840
|
{ obsType, featureType }
|
|
21831
21841
|
);
|
|
21842
|
+
const errors = [
|
|
21843
|
+
featureLabelsError,
|
|
21844
|
+
matrixIndicesError
|
|
21845
|
+
];
|
|
21832
21846
|
const isReady = useReady([
|
|
21833
21847
|
featureLabelsStatus,
|
|
21834
21848
|
expandedFeatureLabelsStatus,
|
|
@@ -21863,6 +21877,7 @@ function FeatureListSubscriber(props) {
|
|
|
21863
21877
|
isReady,
|
|
21864
21878
|
urls,
|
|
21865
21879
|
helpText,
|
|
21880
|
+
errors,
|
|
21866
21881
|
options: /* @__PURE__ */ React__default.createElement(
|
|
21867
21882
|
FeatureListOptions,
|
|
21868
21883
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAlBG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;CAC7C,
|
|
1
|
+
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAlBG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;CAC7C,eAqIA"}
|
|
@@ -35,9 +35,14 @@ export function FeatureListSubscriber(props) {
|
|
|
35
35
|
const title = titleOverride || `${capitalize(variablesLabel)} List`;
|
|
36
36
|
// Get data from loaders using the data hooks.
|
|
37
37
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
|
38
|
-
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
|
38
|
+
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
|
39
39
|
const [expandedFeatureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMap, { stripCuriePrefixes: true });
|
|
40
|
-
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(loaders, dataset, true, { obsType, featureType });
|
|
40
|
+
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls, matrixIndicesError,] = useObsFeatureMatrixIndices(loaders, dataset, true, { obsType, featureType });
|
|
41
|
+
// Consolidate error values from data hooks.
|
|
42
|
+
const errors = [
|
|
43
|
+
featureLabelsError,
|
|
44
|
+
matrixIndicesError,
|
|
45
|
+
];
|
|
41
46
|
const isReady = useReady([
|
|
42
47
|
featureLabelsStatus,
|
|
43
48
|
expandedFeatureLabelsStatus,
|
|
@@ -63,5 +68,5 @@ export function FeatureListSubscriber(props) {
|
|
|
63
68
|
// Virtual scroll is used but this allows for the same styling as a scroll component
|
|
64
69
|
// even though this no longer uses the TitleInfo component's
|
|
65
70
|
// scroll css (SelectableTable is virtual scroll).
|
|
66
|
-
isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: expandedFeatureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName }) }));
|
|
71
|
+
isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, errors: errors, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: expandedFeatureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName }) }));
|
|
67
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/feature-list",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.8",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"react-virtualized": "^9.22.6",
|
|
22
22
|
"uuid": "^9.0.0",
|
|
23
23
|
"react-aria": "^3.28.0",
|
|
24
|
-
"@vitessce/styles": "3.6.
|
|
25
|
-
"@vitessce/constants-internal": "3.6.
|
|
26
|
-
"@vitessce/utils": "3.6.
|
|
27
|
-
"@vitessce/vit-s": "3.6.
|
|
24
|
+
"@vitessce/styles": "3.6.8",
|
|
25
|
+
"@vitessce/constants-internal": "3.6.8",
|
|
26
|
+
"@vitessce/utils": "3.6.8",
|
|
27
|
+
"@vitessce/vit-s": "3.6.8"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -72,17 +72,26 @@ export function FeatureListSubscriber(props) {
|
|
|
72
72
|
|
|
73
73
|
// Get data from loaders using the data hooks.
|
|
74
74
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
|
75
|
-
const [
|
|
75
|
+
const [
|
|
76
|
+
{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls, featureLabelsError,
|
|
77
|
+
] = useFeatureLabelsData(
|
|
76
78
|
loaders, dataset, false, {}, {},
|
|
77
79
|
{ featureType },
|
|
78
80
|
);
|
|
79
81
|
const [expandedFeatureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
|
80
82
|
featureType, featureLabelsMap, { stripCuriePrefixes: true },
|
|
81
83
|
);
|
|
82
|
-
const [
|
|
84
|
+
const [
|
|
85
|
+
{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls, matrixIndicesError,
|
|
86
|
+
] = useObsFeatureMatrixIndices(
|
|
83
87
|
loaders, dataset, true,
|
|
84
88
|
{ obsType, featureType },
|
|
85
89
|
);
|
|
90
|
+
// Consolidate error values from data hooks.
|
|
91
|
+
const errors = [
|
|
92
|
+
featureLabelsError,
|
|
93
|
+
matrixIndicesError,
|
|
94
|
+
];
|
|
86
95
|
const isReady = useReady([
|
|
87
96
|
featureLabelsStatus,
|
|
88
97
|
expandedFeatureLabelsStatus,
|
|
@@ -123,6 +132,7 @@ export function FeatureListSubscriber(props) {
|
|
|
123
132
|
isReady={isReady}
|
|
124
133
|
urls={urls}
|
|
125
134
|
helpText={helpText}
|
|
135
|
+
errors={errors}
|
|
126
136
|
options={(
|
|
127
137
|
<FeatureListOptions
|
|
128
138
|
featureListSort={featureListSort}
|