@rcsb/rcsb-saguaro-app 6.2.2 → 6.2.4
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/build/app.js +1 -1
- package/build/constants.js +1 -1
- package/build/plot.js +1 -1
- package/lib/RcsbAnnotationConfig/RcsbAnnotationConfig.ac.json +2 -1
- package/lib/RcsbFvWeb/RcsbFvComponents/MountableComponent.d.ts +1 -1
- package/lib/RcsbFvWeb/RcsbFvComponents/MountableComponent.js +7 -2
- package/lib/RcsbSeacrh/FacetStore/SingleFacets.js +49 -17
- package/lib/commonjs/RcsbAnnotationConfig/RcsbAnnotationConfig.ac.json +2 -1
- package/lib/commonjs/RcsbFvWeb/RcsbFvComponents/MountableComponent.d.ts +1 -1
- package/lib/commonjs/RcsbFvWeb/RcsbFvComponents/MountableComponent.js +7 -2
- package/lib/commonjs/RcsbSeacrh/FacetStore/SingleFacets.js +49 -17
- package/package.json +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { createRoot } from "react-dom/client";
|
|
2
2
|
export class MountableComponent {
|
|
3
3
|
constructor(element) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var _a;
|
|
5
|
+
if (MountableComponent.ROOT.has(element.id)) {
|
|
6
|
+
(_a = MountableComponent.ROOT.get(element.id)) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
7
|
+
}
|
|
8
|
+
this.root = createRoot(element);
|
|
9
|
+
MountableComponent.ROOT.set(element.id, this.root);
|
|
6
10
|
}
|
|
7
11
|
render(node) {
|
|
8
12
|
this.unmount();
|
|
@@ -12,3 +16,4 @@ export class MountableComponent {
|
|
|
12
16
|
this.root.render(undefined);
|
|
13
17
|
}
|
|
14
18
|
}
|
|
19
|
+
MountableComponent.ROOT = new Map();
|
|
@@ -82,24 +82,56 @@ export const TAXONOMY_COUNT_FACET = {
|
|
|
82
82
|
title: "Number of Source Taxonomies",
|
|
83
83
|
attributeName: "TAXONOMY_COUNT_FACET",
|
|
84
84
|
attribute: RcsbSearchMetadata.RcsbPolymerEntity.RcsbSourceTaxonomyCount.path,
|
|
85
|
-
chartType: ChartType.
|
|
86
|
-
contentType: "
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
chartType: ChartType.barplot,
|
|
86
|
+
contentType: "string",
|
|
87
|
+
facetConfig: {
|
|
88
|
+
facetTransform: (bucket) => {
|
|
89
|
+
const out = [];
|
|
90
|
+
const wt = bucket.find(b => parseInt(b.label.toString()) == 1);
|
|
91
|
+
if (wt)
|
|
92
|
+
out.push({
|
|
93
|
+
label: "Single",
|
|
94
|
+
labelPath: ["Single"],
|
|
95
|
+
population: wt.population
|
|
96
|
+
});
|
|
97
|
+
const synthetic = bucket.find(b => parseInt(b.label.toString()) == 0);
|
|
98
|
+
if (synthetic)
|
|
99
|
+
out.push({
|
|
100
|
+
label: "None",
|
|
101
|
+
labelPath: ["None"],
|
|
102
|
+
population: synthetic.population
|
|
103
|
+
});
|
|
104
|
+
const chimeric = bucket.filter(b => parseInt(b.label.toString()) > 1);
|
|
105
|
+
if ((chimeric === null || chimeric === void 0 ? void 0 : chimeric.length) > 0)
|
|
106
|
+
out.push({
|
|
107
|
+
label: "Multiple",
|
|
108
|
+
labelPath: ["Multiple"],
|
|
109
|
+
population: chimeric.reduce((c, p) => c + p.population, 0)
|
|
110
|
+
});
|
|
111
|
+
return out;
|
|
98
112
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
bucketClickSearchQuery: (datum, data, e) => {
|
|
114
|
+
if (datum.x == "Single")
|
|
115
|
+
return buildAttributeQuery({
|
|
116
|
+
attribute: TAXONOMY_COUNT_FACET.attribute,
|
|
117
|
+
value: 1,
|
|
118
|
+
operator: Operator.Equals,
|
|
119
|
+
service: Service.Text
|
|
120
|
+
});
|
|
121
|
+
else if (datum.x == "None")
|
|
122
|
+
return buildAttributeQuery({
|
|
123
|
+
attribute: TAXONOMY_COUNT_FACET.attribute,
|
|
124
|
+
value: 0,
|
|
125
|
+
operator: Operator.Equals,
|
|
126
|
+
service: Service.Text
|
|
127
|
+
});
|
|
128
|
+
else
|
|
129
|
+
return buildAttributeQuery({
|
|
130
|
+
attribute: TAXONOMY_COUNT_FACET.attribute,
|
|
131
|
+
value: 1,
|
|
132
|
+
operator: Operator.Greater,
|
|
133
|
+
service: Service.Text
|
|
134
|
+
});
|
|
103
135
|
}
|
|
104
136
|
},
|
|
105
137
|
facet: {
|
|
@@ -4,8 +4,12 @@ exports.MountableComponent = void 0;
|
|
|
4
4
|
const client_1 = require("react-dom/client");
|
|
5
5
|
class MountableComponent {
|
|
6
6
|
constructor(element) {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var _a;
|
|
8
|
+
if (MountableComponent.ROOT.has(element.id)) {
|
|
9
|
+
(_a = MountableComponent.ROOT.get(element.id)) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
10
|
+
}
|
|
11
|
+
this.root = (0, client_1.createRoot)(element);
|
|
12
|
+
MountableComponent.ROOT.set(element.id, this.root);
|
|
9
13
|
}
|
|
10
14
|
render(node) {
|
|
11
15
|
this.unmount();
|
|
@@ -16,3 +20,4 @@ class MountableComponent {
|
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
22
|
exports.MountableComponent = MountableComponent;
|
|
23
|
+
MountableComponent.ROOT = new Map();
|
|
@@ -85,24 +85,56 @@ exports.TAXONOMY_COUNT_FACET = {
|
|
|
85
85
|
title: "Number of Source Taxonomies",
|
|
86
86
|
attributeName: "TAXONOMY_COUNT_FACET",
|
|
87
87
|
attribute: SearchMetadata_1.RcsbSearchMetadata.RcsbPolymerEntity.RcsbSourceTaxonomyCount.path,
|
|
88
|
-
chartType: ChartConfigInterface_1.ChartType.
|
|
89
|
-
contentType: "
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
88
|
+
chartType: ChartConfigInterface_1.ChartType.barplot,
|
|
89
|
+
contentType: "string",
|
|
90
|
+
facetConfig: {
|
|
91
|
+
facetTransform: (bucket) => {
|
|
92
|
+
const out = [];
|
|
93
|
+
const wt = bucket.find(b => parseInt(b.label.toString()) == 1);
|
|
94
|
+
if (wt)
|
|
95
|
+
out.push({
|
|
96
|
+
label: "Single",
|
|
97
|
+
labelPath: ["Single"],
|
|
98
|
+
population: wt.population
|
|
99
|
+
});
|
|
100
|
+
const synthetic = bucket.find(b => parseInt(b.label.toString()) == 0);
|
|
101
|
+
if (synthetic)
|
|
102
|
+
out.push({
|
|
103
|
+
label: "None",
|
|
104
|
+
labelPath: ["None"],
|
|
105
|
+
population: synthetic.population
|
|
106
|
+
});
|
|
107
|
+
const chimeric = bucket.filter(b => parseInt(b.label.toString()) > 1);
|
|
108
|
+
if ((chimeric === null || chimeric === void 0 ? void 0 : chimeric.length) > 0)
|
|
109
|
+
out.push({
|
|
110
|
+
label: "Multiple",
|
|
111
|
+
labelPath: ["Multiple"],
|
|
112
|
+
population: chimeric.reduce((c, p) => c + p.population, 0)
|
|
113
|
+
});
|
|
114
|
+
return out;
|
|
101
115
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
bucketClickSearchQuery: (datum, data, e) => {
|
|
117
|
+
if (datum.x == "Single")
|
|
118
|
+
return (0, SearchQueryTools_1.buildAttributeQuery)({
|
|
119
|
+
attribute: exports.TAXONOMY_COUNT_FACET.attribute,
|
|
120
|
+
value: 1,
|
|
121
|
+
operator: SearchEnums_1.Operator.Equals,
|
|
122
|
+
service: SearchEnums_1.Service.Text
|
|
123
|
+
});
|
|
124
|
+
else if (datum.x == "None")
|
|
125
|
+
return (0, SearchQueryTools_1.buildAttributeQuery)({
|
|
126
|
+
attribute: exports.TAXONOMY_COUNT_FACET.attribute,
|
|
127
|
+
value: 0,
|
|
128
|
+
operator: SearchEnums_1.Operator.Equals,
|
|
129
|
+
service: SearchEnums_1.Service.Text
|
|
130
|
+
});
|
|
131
|
+
else
|
|
132
|
+
return (0, SearchQueryTools_1.buildAttributeQuery)({
|
|
133
|
+
attribute: exports.TAXONOMY_COUNT_FACET.attribute,
|
|
134
|
+
value: 1,
|
|
135
|
+
operator: SearchEnums_1.Operator.Greater,
|
|
136
|
+
service: SearchEnums_1.Service.Text
|
|
137
|
+
});
|
|
106
138
|
}
|
|
107
139
|
},
|
|
108
140
|
facet: {
|