@cccsaurora/clue-ui 1.2.0-dev.113 → 1.2.0-dev.117
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.
|
@@ -11,9 +11,14 @@ const QueryStatus = () => {
|
|
|
11
11
|
const [inProgressCount, setInProgressCount] = useState(0);
|
|
12
12
|
const [completeCount, setCompleteCount] = useState(0);
|
|
13
13
|
useEffect(() => {
|
|
14
|
+
var _a;
|
|
14
15
|
if (!ready) {
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
18
|
+
if ((_a = database == null ? void 0 : database.status) == null ? void 0 : _a.closed) {
|
|
19
|
+
console.warn("Status collection is closed");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
17
22
|
const observables = [
|
|
18
23
|
database.status.count({ selector: { status: "pending" } }).$.subscribe(setPendingCount),
|
|
19
24
|
database.status.count({ selector: { status: "in-progress" } }).$.subscribe(setInProgressCount),
|
package/hooks/useAnnotations.js
CHANGED
|
@@ -22,6 +22,10 @@ const useAnnotations = (type, value, _classification, { skipEnrichment } = { ski
|
|
|
22
22
|
if (!ready || !(database == null ? void 0 : database.status)) {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
+
if (database == null ? void 0 : database.status.closed) {
|
|
26
|
+
console.warn("Status collection is closed");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
25
29
|
const observable = database.status.count({ selector: { type, value, classification, status: "in-progress" } }).$.subscribe((_count) => setLoading(_count > 0));
|
|
26
30
|
return () => {
|
|
27
31
|
observable == null ? void 0 : observable.unsubscribe();
|