@gen3/core 0.11.29 → 0.11.31
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/cjs/index.js +159 -147
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/cohort/cohortManagerSlice.d.ts +10 -1
- package/dist/dts/features/cohort/cohortManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppySlice.d.ts +266 -456
- package/dist/dts/features/guppy/guppySlice.d.ts.map +1 -1
- package/dist/dts/listeners.d.ts.map +1 -1
- package/dist/esm/index.js +160 -148
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +270 -461
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guppySlice.d.ts","sourceRoot":"","sources":["../../../../src/features/guppy/guppySlice.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,aAAa,EAAkB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAEL,SAAS,EAEV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAY,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAO7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAOjD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,WAAW,CAAC,UAAU,EAAE,KAAK,CAG5D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GACzB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAC/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAClB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../src/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../src/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvC;;;GAGG;AAEH,eAAO,MAAM,2BAA2B,+JAA6B,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE9E,eAAO,MAAM,kBAAkB,EACiB,kBAAkB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { createSelector, createAsyncThunk, createSlice, createEntityAdapter,
|
|
1
|
+
import { createSelector, createAsyncThunk, createSlice, createEntityAdapter, combineReducers, createListenerMiddleware, isAnyOf, configureStore, nanoid as nanoid$1 } from '@reduxjs/toolkit';
|
|
2
2
|
import { createApi, fetchBaseQuery, buildCreateApi, coreModule, reactHooksModule } from '@reduxjs/toolkit/query/react';
|
|
3
3
|
import { getCookie } from 'cookies-next';
|
|
4
4
|
import { QueryStatus, setupListeners } from '@reduxjs/toolkit/query';
|
|
5
5
|
import { useSelector, useDispatch, Provider, createSelectorHook, createDispatchHook, createStoreHook } from 'react-redux';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useEffect, useState, useRef, useCallback } from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { customAlphabet } from 'nanoid';
|
|
9
9
|
import useSWR from 'swr';
|
|
10
|
+
import { isEqual } from 'lodash';
|
|
10
11
|
import { flatten } from 'flat';
|
|
11
12
|
import Papa from 'papaparse';
|
|
12
13
|
import { JSONPath } from 'jsonpath-plus';
|
|
@@ -844,6 +845,7 @@ const newCohort = ({ filters = {}, customName })=>{
|
|
|
844
845
|
counts: {}
|
|
845
846
|
};
|
|
846
847
|
};
|
|
848
|
+
const nanoid = customAlphabet('1234567890abcdef', 16);
|
|
847
849
|
const createCohortId = ()=>nanoid();
|
|
848
850
|
const cohortsAdapter = createEntityAdapter({
|
|
849
851
|
sortComparer: (a, b)=>{
|
|
@@ -1067,6 +1069,21 @@ const getCurrentCohortId = (state)=>state.currentCohortId;
|
|
|
1067
1069
|
}
|
|
1068
1070
|
});
|
|
1069
1071
|
},
|
|
1072
|
+
updateCohortIndexCountById: (state, action)=>{
|
|
1073
|
+
const { index, cohortId, counts } = action.payload;
|
|
1074
|
+
const cohort = state.entities[cohortId];
|
|
1075
|
+
cohortsAdapter.updateOne(state, {
|
|
1076
|
+
id: cohortId,
|
|
1077
|
+
changes: {
|
|
1078
|
+
counts: {
|
|
1079
|
+
...cohort.counts,
|
|
1080
|
+
...{
|
|
1081
|
+
[index]: counts
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
},
|
|
1070
1087
|
setCurrentCohortId: (state, action)=>{
|
|
1071
1088
|
state.currentCohortId = action.payload;
|
|
1072
1089
|
},
|
|
@@ -1088,7 +1105,7 @@ const getCurrentCohortId = (state)=>state.currentCohortId;
|
|
|
1088
1105
|
* @hidden
|
|
1089
1106
|
*/ const cohortSelectors = cohortsAdapter.getSelectors((state)=>state.cohorts.cohortManager);
|
|
1090
1107
|
// Filter actions: addFilter, removeFilter, updateFilter
|
|
1091
|
-
const { createNewCohort, updateCohortFilter, setCohortFilter, setCohortIndexFilters, duplicateCohort, removeCohortFilter, clearCohortFilters, removeCohort, setCurrentCohortId, updateCohortName, updateCohortCounts, setCohortList } = cohortManagerSlice.actions;
|
|
1108
|
+
const { createNewCohort, updateCohortFilter, setCohortFilter, setCohortIndexFilters, duplicateCohort, removeCohortFilter, clearCohortFilters, removeCohort, setCurrentCohortId, updateCohortName, updateCohortCounts, updateCohortIndexCountById, setCohortList } = cohortManagerSlice.actions;
|
|
1092
1109
|
const cohortReducer = cohortManagerSlice.reducer;
|
|
1093
1110
|
|
|
1094
1111
|
const initialState$2 = {};
|
|
@@ -1673,81 +1690,6 @@ const trimFirstFieldNameToTitle = (fieldName, trim = false)=>{
|
|
|
1673
1690
|
];
|
|
1674
1691
|
};
|
|
1675
1692
|
|
|
1676
|
-
const { selectAll: selectAllCohorts, selectTotal: selectTotalCohorts, selectById: selectCohortById, selectIds: selectCohortIds } = cohortsAdapter.getSelectors((state)=>state.cohorts.cohortManager);
|
|
1677
|
-
/**
|
|
1678
|
-
* Internally used selector for the exported selectora
|
|
1679
|
-
* @param state
|
|
1680
|
-
*/ const getCurrentCohortFromCoreState = (state)=>{
|
|
1681
|
-
return state.cohorts.cohortManager.currentCohortId;
|
|
1682
|
-
};
|
|
1683
|
-
const selectCohortFilters = (state)=>{
|
|
1684
|
-
const currentCohortId = getCurrentCohortFromCoreState(state);
|
|
1685
|
-
return state.cohorts.cohortManager.entities[currentCohortId]?.filters;
|
|
1686
|
-
};
|
|
1687
|
-
const selectCurrentCohortFilters = (state)=>{
|
|
1688
|
-
const currentCohortId = getCurrentCohortFromCoreState(state);
|
|
1689
|
-
return state.cohorts.cohortManager.entities[currentCohortId]?.filters;
|
|
1690
|
-
};
|
|
1691
|
-
const selectCurrentCohortId = (state)=>{
|
|
1692
|
-
return state.cohorts.cohortManager.currentCohortId;
|
|
1693
|
-
};
|
|
1694
|
-
const selectCurrentCohort = (state)=>cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
1695
|
-
const selectCurrentCohortName = (state)=>cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state)).name;
|
|
1696
|
-
/**
|
|
1697
|
-
* Select a filter by its name from the current cohort. If the filter is not found
|
|
1698
|
-
* returns undefined.
|
|
1699
|
-
* @param state - Core
|
|
1700
|
-
* @param index which cohort index to select from
|
|
1701
|
-
* @param name name of the filter to select
|
|
1702
|
-
*/ const selectIndexedFilterByName = (state, index, name)=>{
|
|
1703
|
-
return cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state)).filters[index]?.root[name];
|
|
1704
|
-
};
|
|
1705
|
-
/**
|
|
1706
|
-
* Returns all the cohorts in the state
|
|
1707
|
-
* @param state - the CoreState
|
|
1708
|
-
*
|
|
1709
|
-
* @category Cohort
|
|
1710
|
-
* @category Selectors
|
|
1711
|
-
*/ const selectAvailableCohorts = (state)=>cohortSelectors.selectAll(state);
|
|
1712
|
-
/**
|
|
1713
|
-
* Returns if the current cohort is modified
|
|
1714
|
-
* @param state - the CoreState
|
|
1715
|
-
* @category Cohort
|
|
1716
|
-
* @category Selectors
|
|
1717
|
-
* @hidden
|
|
1718
|
-
*/ const selectCurrentCohortModified = (state)=>{
|
|
1719
|
-
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
1720
|
-
return cohort?.modified;
|
|
1721
|
-
};
|
|
1722
|
-
/**
|
|
1723
|
-
* Returns if the current cohort has been saved
|
|
1724
|
-
* @param state - the CoreState
|
|
1725
|
-
* @category Cohort
|
|
1726
|
-
* @category Selectors
|
|
1727
|
-
* @hidden
|
|
1728
|
-
*/ const selectCurrentCohortSaved = (state)=>{
|
|
1729
|
-
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
1730
|
-
return cohort?.saved;
|
|
1731
|
-
};
|
|
1732
|
-
/**
|
|
1733
|
-
* Select a filter by its name from the current cohort. If the filter is not found
|
|
1734
|
-
* returns undefined.
|
|
1735
|
-
* @param state - Core
|
|
1736
|
-
* @param name name of the filter to select
|
|
1737
|
-
*/ const selectAvailableCohortByName = (state, name)=>cohortSelectors.selectAll(state).find((cohort)=>cohort.name === name);
|
|
1738
|
-
/**
|
|
1739
|
-
* Select a filter from the index.
|
|
1740
|
-
* returns undefined.
|
|
1741
|
-
* @param state - Core
|
|
1742
|
-
* @param index which cohort index to select from
|
|
1743
|
-
*/ const selectIndexFilters = (state, index)=>{
|
|
1744
|
-
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
1745
|
-
if (!cohort) {
|
|
1746
|
-
console.error('No Cohort Defined');
|
|
1747
|
-
}
|
|
1748
|
-
return cohort?.filters?.[index] ?? EmptyFilterSet;
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
1693
|
/**
|
|
1752
1694
|
* Flattens a deep nested JSON object skipping
|
|
1753
1695
|
* the first level to avoid potentially flattening
|
|
@@ -2115,6 +2057,15 @@ const useGetStatus = ()=>{
|
|
|
2115
2057
|
const fetcher = ()=>fetchJson(`${GEN3_GUPPY_API}${statusEndpoint}`);
|
|
2116
2058
|
return useSWR('explorerStatus', fetcher);
|
|
2117
2059
|
};
|
|
2060
|
+
const explorerTags = guppyApi.enhanceEndpoints({
|
|
2061
|
+
addTagTypes: [
|
|
2062
|
+
'AGGS',
|
|
2063
|
+
'COUNTS',
|
|
2064
|
+
'STATS',
|
|
2065
|
+
'TABLE_DATA',
|
|
2066
|
+
'RAW_DATA'
|
|
2067
|
+
]
|
|
2068
|
+
});
|
|
2118
2069
|
/**
|
|
2119
2070
|
* The main endpoint used in templating Exploration page queries.
|
|
2120
2071
|
* Includes table, filter and aggregation query types and leverages guppyApi defined in ./gupplApi.ts
|
|
@@ -2132,7 +2083,7 @@ const useGetStatus = ()=>{
|
|
|
2132
2083
|
* @param getSubAggs - TODO: not sure what this one does. Looks like nested aggregation
|
|
2133
2084
|
* @param getCounts - Returns total counts of a vertex type
|
|
2134
2085
|
* @returns: A guppy API endpoint for templating queryable data displayed on the exploration page
|
|
2135
|
-
*/ const explorerApi =
|
|
2086
|
+
*/ const explorerApi = explorerTags.injectEndpoints({
|
|
2136
2087
|
endpoints: (builder)=>({
|
|
2137
2088
|
getAllFieldsForType: builder.query({
|
|
2138
2089
|
query: (type)=>({
|
|
@@ -2143,11 +2094,11 @@ const useGetStatus = ()=>{
|
|
|
2143
2094
|
}
|
|
2144
2095
|
}),
|
|
2145
2096
|
getAccessibleData: builder.query({
|
|
2146
|
-
query: ({ type, fields,
|
|
2097
|
+
query: ({ type, fields, accessibility })=>{
|
|
2147
2098
|
const fieldParts = fields.map((field)=>`${field} { histogram { key count } }`);
|
|
2148
2099
|
return {
|
|
2149
2100
|
query: `_aggregation {
|
|
2150
|
-
${type} (accessibility: ${
|
|
2101
|
+
${type} (accessibility: ${accessibility}) {
|
|
2151
2102
|
${fieldParts.join(',')}
|
|
2152
2103
|
}
|
|
2153
2104
|
}`
|
|
@@ -2209,11 +2160,15 @@ const useGetStatus = ()=>{
|
|
|
2209
2160
|
query,
|
|
2210
2161
|
variables
|
|
2211
2162
|
};
|
|
2212
|
-
}
|
|
2163
|
+
},
|
|
2164
|
+
providesTags: [
|
|
2165
|
+
'RAW_DATA',
|
|
2166
|
+
'TABLE_DATA'
|
|
2167
|
+
]
|
|
2213
2168
|
}),
|
|
2214
2169
|
getAggs: builder.query({
|
|
2215
|
-
query: ({ type, fields, filters, accessibility = Accessibility.ALL })=>{
|
|
2216
|
-
return buildGetAggregationQuery(type, fields, filters, accessibility,
|
|
2170
|
+
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false })=>{
|
|
2171
|
+
return buildGetAggregationQuery(type, fields, filters, accessibility, filterSelf);
|
|
2217
2172
|
},
|
|
2218
2173
|
transformResponse: (response, _meta, args)=>{
|
|
2219
2174
|
const buckets = processHistogramResponse(response?.data?._aggregation[args.type] ?? {});
|
|
@@ -2228,41 +2183,39 @@ const useGetStatus = ()=>{
|
|
|
2228
2183
|
],
|
|
2229
2184
|
...buckets
|
|
2230
2185
|
};
|
|
2231
|
-
}
|
|
2232
|
-
}),
|
|
2233
|
-
getAggsNoFilterSelf: builder.query({
|
|
2234
|
-
query: ({ type, fields, filters, accessibility = Accessibility.ALL })=>{
|
|
2235
|
-
return buildGetAggregationQuery(type, fields, filters, accessibility, true);
|
|
2236
2186
|
},
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2187
|
+
providesTags: [
|
|
2188
|
+
'AGGS'
|
|
2189
|
+
]
|
|
2240
2190
|
}),
|
|
2241
2191
|
getStatsAggregations: builder.query({
|
|
2242
|
-
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false })=>{
|
|
2243
|
-
return buildGetStatsAggregationQuery(type, fields, filters, accessibility, filterSelf);
|
|
2192
|
+
query: ({ type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined })=>{
|
|
2193
|
+
return buildGetStatsAggregationQuery(type, fields, filters, accessibility, filterSelf, queryId);
|
|
2244
2194
|
},
|
|
2245
2195
|
transformResponse: (response, _meta, args)=>{
|
|
2246
2196
|
return processHistogramResponse(response?.data?._aggregation[args.type] ?? {});
|
|
2247
|
-
}
|
|
2197
|
+
},
|
|
2198
|
+
providesTags: [
|
|
2199
|
+
'STATS'
|
|
2200
|
+
]
|
|
2248
2201
|
}),
|
|
2249
2202
|
getSubAggs: builder.query({
|
|
2250
|
-
query: ({ type, mainField, termsFields = undefined, missingFields = undefined, numericAggAsText = false,
|
|
2203
|
+
query: ({ type, mainField, termsFields = undefined, missingFields = undefined, numericAggAsText = false, filters = undefined, accessibility = Accessibility.ALL })=>{
|
|
2251
2204
|
const nestedAggFields = {
|
|
2252
2205
|
termsFields: termsFields,
|
|
2253
2206
|
missingFields: missingFields
|
|
2254
2207
|
};
|
|
2255
|
-
const query = `query getSubAggs ( ${
|
|
2208
|
+
const query = `query getSubAggs ( ${filters ?? '$filter: JSON,'} $nestedAggFields: JSON) {
|
|
2256
2209
|
_aggregation {
|
|
2257
|
-
${type} ( ${
|
|
2210
|
+
${type} ( ${filters ?? 'filter: $filter, filterSelf: false,'} nestedAggFields: $nestedAggFields, accessibility: ${accessibility}) {
|
|
2258
2211
|
_totalCounts
|
|
2259
2212
|
${nestedHistogramQueryStrForEachField(mainField, numericAggAsText)}
|
|
2260
2213
|
}`;
|
|
2261
2214
|
return {
|
|
2262
2215
|
query: query,
|
|
2263
2216
|
variables: {
|
|
2264
|
-
...
|
|
2265
|
-
filter: convertFilterSetToGqlFilter(
|
|
2217
|
+
...filters && {
|
|
2218
|
+
filter: convertFilterSetToGqlFilter(filters)
|
|
2266
2219
|
},
|
|
2267
2220
|
nestedAggFields: nestedAggFields
|
|
2268
2221
|
}
|
|
@@ -2270,12 +2223,15 @@ const useGetStatus = ()=>{
|
|
|
2270
2223
|
},
|
|
2271
2224
|
transformResponse: (response, _meta, args)=>{
|
|
2272
2225
|
return processHistogramResponse(response?.data?._aggregation[args.type] ?? {});
|
|
2273
|
-
}
|
|
2226
|
+
},
|
|
2227
|
+
providesTags: [
|
|
2228
|
+
'AGGS'
|
|
2229
|
+
]
|
|
2274
2230
|
}),
|
|
2275
2231
|
getCounts: builder.query({
|
|
2276
|
-
query: ({ type, filters, accessibility = Accessibility.ALL })=>{
|
|
2232
|
+
query: ({ type, filters, accessibility = Accessibility.ALL, queryId = undefined })=>{
|
|
2277
2233
|
const gqlFilters = convertFilterSetToGqlFilter(filters);
|
|
2278
|
-
const queryLine = `query totalCounts ${gqlFilters ? '($filter: JSON)' : ''}{`;
|
|
2234
|
+
const queryLine = `query totalCounts${queryId ? `_${queryId}` : ''} ${gqlFilters ? '($filter: JSON)' : ''}{`;
|
|
2279
2235
|
const typeAggsLine = `${type} ${gqlFilters ? '(filter: $filter, ' : '('} accessibility: ${accessibility}) {`;
|
|
2280
2236
|
const query = `${queryLine} _aggregation {
|
|
2281
2237
|
${typeAggsLine}
|
|
@@ -2300,7 +2256,10 @@ const useGetStatus = ()=>{
|
|
|
2300
2256
|
throw new Error(`Invalid response: Missing expected key '${args.type}' in _aggregation`);
|
|
2301
2257
|
}
|
|
2302
2258
|
return response.data._aggregation[args.type]._totalCount ?? 0;
|
|
2303
|
-
}
|
|
2259
|
+
},
|
|
2260
|
+
providesTags: [
|
|
2261
|
+
'COUNTS'
|
|
2262
|
+
]
|
|
2304
2263
|
}),
|
|
2305
2264
|
getFieldCountSummary: builder.query({
|
|
2306
2265
|
query: ({ type, field, filters, accessibility = Accessibility.ALL })=>{
|
|
@@ -2363,8 +2322,6 @@ const useGetStatus = ()=>{
|
|
|
2363
2322
|
})
|
|
2364
2323
|
})
|
|
2365
2324
|
});
|
|
2366
|
-
// query for aggregate data
|
|
2367
|
-
// convert the function below to typescript
|
|
2368
2325
|
const histogramQueryStrForEachField = (field)=>{
|
|
2369
2326
|
const splittedFieldArray = field.split('.');
|
|
2370
2327
|
const splittedField = splittedFieldArray.shift();
|
|
@@ -2447,9 +2404,9 @@ const useGetIndexFields = (index)=>{
|
|
|
2447
2404
|
const { data } = useGetFieldsForIndexQuery(index);
|
|
2448
2405
|
return data ?? [];
|
|
2449
2406
|
};
|
|
2450
|
-
const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false)=>{
|
|
2407
|
+
const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined)=>{
|
|
2451
2408
|
const queryStart = isFilterEmpty(filters) ? `
|
|
2452
|
-
query getAggs {
|
|
2409
|
+
query getAggs${queryId ? `_${queryId}` : ''} {
|
|
2453
2410
|
_aggregation {
|
|
2454
2411
|
${type} (accessibility: ${accessibility}) {` : `query getAggs ($filter: JSON) {
|
|
2455
2412
|
_aggregation {
|
|
@@ -2468,11 +2425,11 @@ const buildGetAggregationQuery = (type, fields, filters, accessibility = Accessi
|
|
|
2468
2425
|
};
|
|
2469
2426
|
return queryBody;
|
|
2470
2427
|
};
|
|
2471
|
-
const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false)=>{
|
|
2428
|
+
const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Accessibility.ALL, filterSelf = false, queryId = undefined)=>{
|
|
2472
2429
|
const queryStart = isFilterEmpty(filters) ? `
|
|
2473
|
-
query
|
|
2430
|
+
query getStatsAggs${queryId ? `_${queryId}` : ''} {
|
|
2474
2431
|
_aggregation {
|
|
2475
|
-
${type} (accessibility: ${accessibility}) {` : `query
|
|
2432
|
+
${type} (accessibility: ${accessibility}) {` : `query getStatsAggs${queryId ? `_${queryId}` : ''} ($filter: JSON) {
|
|
2476
2433
|
_aggregation {
|
|
2477
2434
|
${type} (filter: $filter, filterSelf: ${filterSelf ? 'true' : 'false'}, accessibility: ${accessibility}) { _totalCount`;
|
|
2478
2435
|
const query = `${queryStart}
|
|
@@ -2488,49 +2445,29 @@ const buildGetStatsAggregationQuery = (type, fields, filters, accessibility = Ac
|
|
|
2488
2445
|
};
|
|
2489
2446
|
return queryBody;
|
|
2490
2447
|
};
|
|
2491
|
-
const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFieldsForTypeQuery, useGetAggsQuery,
|
|
2448
|
+
const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFieldsForTypeQuery, useGetAggsQuery, useLazyGetAggsQuery, useGetStatsAggregationsQuery, useLazyGetStatsAggregationsQuery, useGetSubAggsQuery, useGetCountsQuery, useLazyGetCountsQuery, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGetSharedFieldsForIndexQuery, useGeneralGQLQuery, useLazyGeneralGQLQuery } = explorerApi;
|
|
2492
2449
|
|
|
2493
|
-
const isPayloadActionWithObject = (action)=>{
|
|
2494
|
-
return typeof action === 'object' && action !== null && 'type' in action && 'payload' in action && typeof action.payload === 'object';
|
|
2495
|
-
};
|
|
2496
2450
|
/**
|
|
2497
2451
|
* Defines coreListeners for adding middleware.
|
|
2498
2452
|
* used to update the current Cohort Case count
|
|
2499
2453
|
*/ const coreStoreListenerMiddleware = createListenerMiddleware();
|
|
2500
2454
|
const startCoreListening = coreStoreListenerMiddleware.startListening;
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
// need to pass the current cohort id to the case count fetcher because it is possible that
|
|
2506
|
-
// the current cohort will be different when the fetch is fulfilled
|
|
2507
|
-
if (currentCohortId) console.log('currentCohortId', currentCohortId);
|
|
2508
|
-
}
|
|
2509
|
-
});
|
|
2510
|
-
startCoreListening({
|
|
2511
|
-
matcher: isAnyOf(explorerApi.endpoints.getAggs.matchFulfilled),
|
|
2512
|
-
effect: async (action, listenerApi)=>{
|
|
2513
|
-
if (isPayloadActionWithObject(action)) {
|
|
2514
|
-
const root = action.payload;
|
|
2515
|
-
const counts = root?._totalCount.reduce((acc, curr)=>{
|
|
2516
|
-
const { key, count } = curr;
|
|
2517
|
-
acc[key] = count;
|
|
2518
|
-
return acc;
|
|
2519
|
-
}, {});
|
|
2520
|
-
if (counts) {
|
|
2521
|
-
listenerApi.dispatch(updateCohortCounts(counts ?? {}));
|
|
2522
|
-
}
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
});
|
|
2526
|
-
startCoreListening({
|
|
2455
|
+
/**
|
|
2456
|
+
* When a getCounts is requested, it might be for a cohort.
|
|
2457
|
+
* If so, then update the cohort's counts for that index
|
|
2458
|
+
*/ startCoreListening({
|
|
2527
2459
|
matcher: isAnyOf(explorerApi.endpoints.getCounts.matchFulfilled),
|
|
2528
2460
|
effect: async (action, listenerApi)=>{
|
|
2529
2461
|
const counts = action.payload;
|
|
2530
|
-
const index = action?.meta?.arg?.originalArgs?.index
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2462
|
+
const index = action?.meta?.arg?.originalArgs?.type; // note this is the guppy index name
|
|
2463
|
+
const cohortId = action?.meta?.arg?.originalArgs?.queryId;
|
|
2464
|
+
if (cohortId && index) {
|
|
2465
|
+
listenerApi.dispatch(updateCohortIndexCountById({
|
|
2466
|
+
index,
|
|
2467
|
+
cohortId,
|
|
2468
|
+
counts
|
|
2469
|
+
}));
|
|
2470
|
+
}
|
|
2534
2471
|
}
|
|
2535
2472
|
});
|
|
2536
2473
|
|
|
@@ -3439,6 +3376,81 @@ class CohortStorage {
|
|
|
3439
3376
|
}
|
|
3440
3377
|
}
|
|
3441
3378
|
|
|
3379
|
+
const { selectAll: selectAllCohorts, selectTotal: selectTotalCohorts, selectById: selectCohortById, selectIds: selectCohortIds } = cohortsAdapter.getSelectors((state)=>state.cohorts.cohortManager);
|
|
3380
|
+
/**
|
|
3381
|
+
* Internally used selector for the exported selectora
|
|
3382
|
+
* @param state
|
|
3383
|
+
*/ const getCurrentCohortFromCoreState = (state)=>{
|
|
3384
|
+
return state.cohorts.cohortManager.currentCohortId;
|
|
3385
|
+
};
|
|
3386
|
+
const selectCohortFilters = (state)=>{
|
|
3387
|
+
const currentCohortId = getCurrentCohortFromCoreState(state);
|
|
3388
|
+
return state.cohorts.cohortManager.entities[currentCohortId]?.filters;
|
|
3389
|
+
};
|
|
3390
|
+
const selectCurrentCohortFilters = (state)=>{
|
|
3391
|
+
const currentCohortId = getCurrentCohortFromCoreState(state);
|
|
3392
|
+
return state.cohorts.cohortManager.entities[currentCohortId]?.filters;
|
|
3393
|
+
};
|
|
3394
|
+
const selectCurrentCohortId = (state)=>{
|
|
3395
|
+
return state.cohorts.cohortManager.currentCohortId;
|
|
3396
|
+
};
|
|
3397
|
+
const selectCurrentCohort = (state)=>cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
3398
|
+
const selectCurrentCohortName = (state)=>cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state)).name;
|
|
3399
|
+
/**
|
|
3400
|
+
* Select a filter by its name from the current cohort. If the filter is not found
|
|
3401
|
+
* returns undefined.
|
|
3402
|
+
* @param state - Core
|
|
3403
|
+
* @param index which cohort index to select from
|
|
3404
|
+
* @param name name of the filter to select
|
|
3405
|
+
*/ const selectIndexedFilterByName = (state, index, name)=>{
|
|
3406
|
+
return cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state)).filters[index]?.root[name];
|
|
3407
|
+
};
|
|
3408
|
+
/**
|
|
3409
|
+
* Returns all the cohorts in the state
|
|
3410
|
+
* @param state - the CoreState
|
|
3411
|
+
*
|
|
3412
|
+
* @category Cohort
|
|
3413
|
+
* @category Selectors
|
|
3414
|
+
*/ const selectAvailableCohorts = (state)=>cohortSelectors.selectAll(state);
|
|
3415
|
+
/**
|
|
3416
|
+
* Returns if the current cohort is modified
|
|
3417
|
+
* @param state - the CoreState
|
|
3418
|
+
* @category Cohort
|
|
3419
|
+
* @category Selectors
|
|
3420
|
+
* @hidden
|
|
3421
|
+
*/ const selectCurrentCohortModified = (state)=>{
|
|
3422
|
+
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
3423
|
+
return cohort?.modified;
|
|
3424
|
+
};
|
|
3425
|
+
/**
|
|
3426
|
+
* Returns if the current cohort has been saved
|
|
3427
|
+
* @param state - the CoreState
|
|
3428
|
+
* @category Cohort
|
|
3429
|
+
* @category Selectors
|
|
3430
|
+
* @hidden
|
|
3431
|
+
*/ const selectCurrentCohortSaved = (state)=>{
|
|
3432
|
+
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
3433
|
+
return cohort?.saved;
|
|
3434
|
+
};
|
|
3435
|
+
/**
|
|
3436
|
+
* Select a filter by its name from the current cohort. If the filter is not found
|
|
3437
|
+
* returns undefined.
|
|
3438
|
+
* @param state - Core
|
|
3439
|
+
* @param name name of the filter to select
|
|
3440
|
+
*/ const selectAvailableCohortByName = (state, name)=>cohortSelectors.selectAll(state).find((cohort)=>cohort.name === name);
|
|
3441
|
+
/**
|
|
3442
|
+
* Select a filter from the index.
|
|
3443
|
+
* returns undefined.
|
|
3444
|
+
* @param state - Core
|
|
3445
|
+
* @param index which cohort index to select from
|
|
3446
|
+
*/ const selectIndexFilters = (state, index)=>{
|
|
3447
|
+
const cohort = cohortSelectors.selectById(state, getCurrentCohortFromCoreState(state));
|
|
3448
|
+
if (!cohort) {
|
|
3449
|
+
console.error('No Cohort Defined');
|
|
3450
|
+
}
|
|
3451
|
+
return cohort?.filters?.[index] ?? EmptyFilterSet;
|
|
3452
|
+
};
|
|
3453
|
+
|
|
3442
3454
|
const isFileItem = (item)=>{
|
|
3443
3455
|
return item && 'guid' in item;
|
|
3444
3456
|
};
|
|
@@ -3805,7 +3817,7 @@ class LocalStorageService {
|
|
|
3805
3817
|
try {
|
|
3806
3818
|
const db = await this.getDb();
|
|
3807
3819
|
const tx = db.transaction(STORE_NAME, 'readwrite');
|
|
3808
|
-
const id = nanoid(); // Create an id for the list
|
|
3820
|
+
const id = nanoid$1(); // Create an id for the list
|
|
3809
3821
|
tx.objectStore(STORE_NAME).put({
|
|
3810
3822
|
id,
|
|
3811
3823
|
version: 0,
|
|
@@ -3989,7 +4001,7 @@ class LocalStorageService {
|
|
|
3989
4001
|
const timestamp = getTimestamp();
|
|
3990
4002
|
const allLists = data.reduce((acc, x)=>{
|
|
3991
4003
|
if (!isJSONObject(x)) return acc;
|
|
3992
|
-
const id = nanoid(10);
|
|
4004
|
+
const id = nanoid$1(10);
|
|
3993
4005
|
acc[id] = {
|
|
3994
4006
|
...x,
|
|
3995
4007
|
version: 0,
|
|
@@ -5589,5 +5601,5 @@ const selectPaymodelStatus = createSelector(paymodelStatusSelector, (status)=>st
|
|
|
5589
5601
|
const isWorkspaceActive = (status)=>status === WorkspaceStatus.Running || status === WorkspaceStatus.Launching || status === WorkspaceStatus.Terminating;
|
|
5590
5602
|
const isWorkspaceRunningOrStopping = (status)=>status === WorkspaceStatus.Running || status === WorkspaceStatus.Terminating;
|
|
5591
5603
|
|
|
5592
|
-
export { Accessibility, CohortStorage, CoreProvider, DataLibraryStoreMode, EmptyFilterSet, EmptyWorkspaceStatusResponse, EnumValueExtractorHandler, GEN3_API, GEN3_AUTHZ_API, GEN3_COMMONS_NAME, GEN3_CROSSWALK_API, GEN3_DOMAIN, GEN3_DOWNLOADS_ENDPOINT, GEN3_FENCE_API, GEN3_GUPPY_API, GEN3_MANIFEST_API, GEN3_MDS_API, GEN3_REDIRECT_URL, GEN3_SOWER_API, GEN3_SUBMISSION_API, GEN3_WORKSPACE_API, HTTPError, HTTPErrorMessages, HttpMethod, MissingServiceConfigurationError, Modals, PodConditionType, PodStatus, RequestedWorkspaceStatus, ToGqlHandler, ValueExtractorHandler, WorkspaceStatus, appendFilterToOperation, buildGetAggregationQuery, buildGetStatsAggregationQuery, buildListItemsGroupedByDataset, calculatePercentageAsNumber, calculatePercentageAsString, clearActiveWorkspaceId, clearCohortFilters, cohortReducer, convertFilterSetToGqlFilter, convertFilterToGqlFilter, convertGqlFilterToFilter, convertToHistogramDataAsStringKey, convertToQueryString, coreStore, createAppApiForRTKQ, createAppStore, createGen3App, createGen3AppWithOwnStore, createNewCohort, createUseCoreDataHook, defaultCohortNameGenerator, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, drsHostnamesReducer, duplicateCohort, explorerApi, extractEnumFilterValue, extractFieldNameFromFullFieldName, extractFileDatasetsInRecords, extractFilterValue, extractIndexAndFieldNameFromFullFieldName, extractIndexFromDataLibraryCohort, extractIndexFromFullFieldName, fetchFence, fetchFencePresignedURL, fetchJSONDataFromURL, fetchJson, fetchUserState, fieldNameToTitle, filterSetToOperation, gen3Api, generateUniqueName, getCurrentTimestamp, getFederatedLoginStatus, getGen3AppId, getNumberOfItemsInDatalist, getRemoteSupportServiceRegistry, getTimestamp, graphQLAPI, graphQLWithTags, groupSharedFields, guppyAPISliceMiddleware, guppyApi, guppyApiReducer, guppyApiSliceReducerPath, handleGqlOperation, handleOperation, hideModal, histogramQueryStrForEachField, isAdditionalDataItem, isArray, isAuthenticated, isCohortItem, isDataLibraryAPIResponse, isDatalistAPI, isErrorWithMessage, isFetchBaseQueryError, isFetchError, isFetchParseError, isFileItem, isFilterEmpty, isFilterSet, isGQLIntersection, isGQLUnion, isGuppyAggregationData, isHistogramData, isHistogramDataAArray, isHistogramDataAnEnum, isHistogramDataArray, isHistogramDataArrayARange, isHistogramDataArrayAnEnum, isHistogramDataCollection, isHistogramRangeData, isHttpStatusError, isIndexedFilterSetEmpty, isIntersection, isJSONObject, isJSONValue, isJSONValueArray, isNameUnique, isNotDefined, isObject, isOperandsType, isOperationWithField, isOperatorWithFieldAndArrayOfOperands, isPending, isProgramUrl, isRootUrl, isStatsValue, isStatsValuesArray, isString, isTimeGreaterThan, isUnion, isWorkspaceActive, isWorkspaceRunningOrStopping, listifyMethodsFromMapping, logoutFence, manifestApi, manifestTags, nestedHistogramQueryStrForEachField, prepareUrl, prependIndexToFieldName, processHistogramResponse, projectCodeFromResourcePath, queryMultipleMDSRecords, rawDataQueryStrForEachField, registerDefaultRemoteSupport, removeCohort, removeCohortFilter, requestorApi, resetUserState, resourcePathFromProjectID, roundHistogramResponse, selectActiveWorkspaceId, selectActiveWorkspaceStatus, selectAllCohortFiltersCollapsed, selectAllCohorts, selectAuthzMappingData, selectAvailableCohortByName, selectAvailableCohorts, selectCSRFToken, selectCSRFTokenData, selectCohortById, selectCohortFilterCombineMode, selectCohortFilterExpanded, selectCohortFilters, selectCohortIds, selectCurrentCohort, selectCurrentCohortFilters, selectCurrentCohortId, selectCurrentCohortModified, selectCurrentCohortName, selectCurrentCohortSaved, selectCurrentMessage, selectCurrentModal, selectGen3AppByName, selectGen3AppMetadataByName, selectHeadersWithCSRFToken, selectIndexFilters, selectIndexedFilterByName, selectPaymodelStatus, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, selectSharedFilters, selectSharedFiltersForFields, selectShouldShareFilters, selectTotalCohorts, selectUser, selectUserAuthStatus, selectUserData, selectUserDetails, selectUserLoginStatus, selectWorkspaceStatus, selectWorkspaceStatusFromService, setActiveWorkspace, setActiveWorkspaceId, setActiveWorkspaceStatus, setCohortFilter, setCohortFilterCombineMode, setCohortIndexFilters, setCohortList, setCurrentCohortId, setDRSHostnames, setRequestedWorkspaceStatus, setSharedFilters, setShouldShareFilters, setupCoreStore, showModal, statsQueryStrForEachField, submissionApi, toggleCohortBuilderAllFilters, toggleCohortBuilderCategoryFilter, trimFirstFieldNameToTitle, updateCohortFilter, updateCohortName, useAddCohortManifestMutation, useAddFileManifestMutation, useAddMetadataManifestMutation, useAddNewCredentialMutation, useAskQuestionMutation, useAuthorizeFromCredentialsMutation, useCoreDispatch, useCoreSelector, useCreateAuthzResourceMutation, useCreateRequestMutation, useDataLibrary, useDownloadFromGuppyMutation, useFetchUserDetailsQuery, useGeneralGQLQuery, useGetAISearchStatusQuery, useGetAISearchVersionQuery, useGetAccessibleDataQuery, useGetActivePayModelQuery, useGetAggMDSQuery,
|
|
5604
|
+
export { Accessibility, CohortStorage, CoreProvider, DataLibraryStoreMode, EmptyFilterSet, EmptyWorkspaceStatusResponse, EnumValueExtractorHandler, GEN3_API, GEN3_AUTHZ_API, GEN3_COMMONS_NAME, GEN3_CROSSWALK_API, GEN3_DOMAIN, GEN3_DOWNLOADS_ENDPOINT, GEN3_FENCE_API, GEN3_GUPPY_API, GEN3_MANIFEST_API, GEN3_MDS_API, GEN3_REDIRECT_URL, GEN3_SOWER_API, GEN3_SUBMISSION_API, GEN3_WORKSPACE_API, HTTPError, HTTPErrorMessages, HttpMethod, MissingServiceConfigurationError, Modals, PodConditionType, PodStatus, RequestedWorkspaceStatus, ToGqlHandler, ValueExtractorHandler, WorkspaceStatus, appendFilterToOperation, buildGetAggregationQuery, buildGetStatsAggregationQuery, buildListItemsGroupedByDataset, calculatePercentageAsNumber, calculatePercentageAsString, clearActiveWorkspaceId, clearCohortFilters, cohortReducer, convertFilterSetToGqlFilter, convertFilterToGqlFilter, convertGqlFilterToFilter, convertToHistogramDataAsStringKey, convertToQueryString, coreStore, createAppApiForRTKQ, createAppStore, createGen3App, createGen3AppWithOwnStore, createNewCohort, createUseCoreDataHook, defaultCohortNameGenerator, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, drsHostnamesReducer, duplicateCohort, explorerApi, explorerTags, extractEnumFilterValue, extractFieldNameFromFullFieldName, extractFileDatasetsInRecords, extractFilterValue, extractIndexAndFieldNameFromFullFieldName, extractIndexFromDataLibraryCohort, extractIndexFromFullFieldName, fetchFence, fetchFencePresignedURL, fetchJSONDataFromURL, fetchJson, fetchUserState, fieldNameToTitle, filterSetToOperation, gen3Api, generateUniqueName, getCurrentTimestamp, getFederatedLoginStatus, getGen3AppId, getNumberOfItemsInDatalist, getRemoteSupportServiceRegistry, getTimestamp, graphQLAPI, graphQLWithTags, groupSharedFields, guppyAPISliceMiddleware, guppyApi, guppyApiReducer, guppyApiSliceReducerPath, handleGqlOperation, handleOperation, hideModal, histogramQueryStrForEachField, isAdditionalDataItem, isArray, isAuthenticated, isCohortItem, isDataLibraryAPIResponse, isDatalistAPI, isErrorWithMessage, isFetchBaseQueryError, isFetchError, isFetchParseError, isFileItem, isFilterEmpty, isFilterSet, isGQLIntersection, isGQLUnion, isGuppyAggregationData, isHistogramData, isHistogramDataAArray, isHistogramDataAnEnum, isHistogramDataArray, isHistogramDataArrayARange, isHistogramDataArrayAnEnum, isHistogramDataCollection, isHistogramRangeData, isHttpStatusError, isIndexedFilterSetEmpty, isIntersection, isJSONObject, isJSONValue, isJSONValueArray, isNameUnique, isNotDefined, isObject, isOperandsType, isOperationWithField, isOperatorWithFieldAndArrayOfOperands, isPending, isProgramUrl, isRootUrl, isStatsValue, isStatsValuesArray, isString, isTimeGreaterThan, isUnion, isWorkspaceActive, isWorkspaceRunningOrStopping, listifyMethodsFromMapping, logoutFence, manifestApi, manifestTags, nestedHistogramQueryStrForEachField, prepareUrl, prependIndexToFieldName, processHistogramResponse, projectCodeFromResourcePath, queryMultipleMDSRecords, rawDataQueryStrForEachField, registerDefaultRemoteSupport, removeCohort, removeCohortFilter, requestorApi, resetUserState, resourcePathFromProjectID, roundHistogramResponse, selectActiveWorkspaceId, selectActiveWorkspaceStatus, selectAllCohortFiltersCollapsed, selectAllCohorts, selectAuthzMappingData, selectAvailableCohortByName, selectAvailableCohorts, selectCSRFToken, selectCSRFTokenData, selectCohortById, selectCohortFilterCombineMode, selectCohortFilterExpanded, selectCohortFilters, selectCohortIds, selectCurrentCohort, selectCurrentCohortFilters, selectCurrentCohortId, selectCurrentCohortModified, selectCurrentCohortName, selectCurrentCohortSaved, selectCurrentMessage, selectCurrentModal, selectGen3AppByName, selectGen3AppMetadataByName, selectHeadersWithCSRFToken, selectIndexFilters, selectIndexedFilterByName, selectPaymodelStatus, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, selectSharedFilters, selectSharedFiltersForFields, selectShouldShareFilters, selectTotalCohorts, selectUser, selectUserAuthStatus, selectUserData, selectUserDetails, selectUserLoginStatus, selectWorkspaceStatus, selectWorkspaceStatusFromService, setActiveWorkspace, setActiveWorkspaceId, setActiveWorkspaceStatus, setCohortFilter, setCohortFilterCombineMode, setCohortIndexFilters, setCohortList, setCurrentCohortId, setDRSHostnames, setRequestedWorkspaceStatus, setSharedFilters, setShouldShareFilters, setupCoreStore, showModal, statsQueryStrForEachField, submissionApi, toggleCohortBuilderAllFilters, toggleCohortBuilderCategoryFilter, trimFirstFieldNameToTitle, updateCohortFilter, updateCohortName, useAddCohortManifestMutation, useAddFileManifestMutation, useAddMetadataManifestMutation, useAddNewCredentialMutation, useAskQuestionMutation, useAuthorizeFromCredentialsMutation, useCoreDispatch, useCoreSelector, useCreateAuthzResourceMutation, useCreateRequestMutation, useDataLibrary, useDownloadFromGuppyMutation, useFetchUserDetailsQuery, useGeneralGQLQuery, useGetAISearchStatusQuery, useGetAISearchVersionQuery, useGetAccessibleDataQuery, useGetActivePayModelQuery, useGetAggMDSQuery, useGetAggsQuery, useGetAllFieldsForTypeQuery, useGetArrayTypes, useGetAuthzMappingsQuery, useGetAuthzResourcesQuery, useGetCSRFQuery, useGetCohortManifestQuery, useGetCountsQuery, useGetCredentialsQuery, useGetCrosswalkDataQuery, useGetDataQuery, useGetDictionaryQuery, useGetDownloadQuery, useGetExternalLoginsQuery, useGetFederatedLoginStatus, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGetFileFromManifestQuery, useGetFileManifestQuery, useGetIndexAggMDSQuery, useGetIndexFields, useGetJWKKeysQuery, useGetLoginProvidersQuery, useGetMDSQuery, useGetManifestServiceStatusQuery, useGetMetadataByIdQuery, useGetMetadataFromManifestQuery, useGetMetadataManifestQuery, useGetProjectsDetailsQuery, useGetProjectsQuery, useGetRawDataAndTotalCountsQuery, useGetSharedFieldsForIndexQuery, useGetSowerJobListQuery, useGetSowerJobStatusQuery, useGetSowerOutputQuery, useGetSowerServiceStatusQuery, useGetStatsAggregationsQuery, useGetStatus, useGetSubAggsQuery, useGetSubmissionGraphQLQuery, useGetSubmissionsQuery, useGetTagsQuery, useGetWorkspaceOptionsQuery, useGetWorkspacePayModelsQuery, useGetWorkspaceStatusQuery, useGraphQLQuery, useIsExternalConnectedQuery, useIsUserLoggedIn, useLaunchWorkspaceMutation, useLazyFetchUserDetailsQuery, useLazyGeneralGQLQuery, useLazyGetAggsQuery, useLazyGetAuthzMappingsQuery, useLazyGetAuthzResourcesQuery, useLazyGetCSRFQuery, useLazyGetCountsQuery, useLazyGetCrosswalkDataQuery, useLazyGetDownloadQuery, useLazyGetExternalLoginsQuery, useLazyGetManifestServiceStatusQuery, useLazyGetProjectsQuery, useLazyGetSowerJobListQuery, useLazyGetStatsAggregationsQuery, useLazyGetSubmissionGraphQLQuery, useLazyIsExternalConnectedQuery, useLazyRequestQuery, usePrevious, useRemoveCredentialMutation, useRequestByIdQuery, useRequestQuery, useRequestorStatusQuery, useSetCurrentPayModelMutation, useSubmitSowerJobMutation, useTerminateWorkspaceMutation, useUserAuth, useUserRequestQuery, userHasCreateOrUpdateOnAnyProject, userHasDataUpload, userHasMethodForServiceOnProject, userHasMethodForServiceOnResource, userHasMethodOnAnyProject, userHasSheepdogProgramAdmin, userHasSheepdogProjectAdmin };
|
|
5593
5605
|
//# sourceMappingURL=index.js.map
|