@gen3/core 0.10.47 → 0.10.49
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 +198 -63
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/aiSearch/aiSearchSlice.d.ts +430 -6
- package/dist/dts/features/app/store.d.ts +3 -1
- package/dist/dts/features/authz/authzMappingSlice.d.ts +331 -61
- package/dist/dts/features/cohort/cohortSlice.d.ts +6 -6
- package/dist/dts/features/download/downloadStatusApi.d.ts +269 -5
- package/dist/dts/features/fence/credentialsApi.d.ts +619 -7
- package/dist/dts/features/fence/fenceApi.d.ts +136 -4
- package/dist/dts/features/fence/jwtApi.d.ts +136 -4
- package/dist/dts/features/gen3/gen3Api.d.ts +1 -1
- package/dist/dts/features/gen3Apps/Gen3App.d.ts +10 -9
- package/dist/dts/features/gen3Apps/Gen3AppRTKQ.d.ts +18 -0
- package/dist/dts/features/gen3Apps/constants.d.ts +1 -0
- package/dist/dts/features/gen3Apps/gen3AppsSlice.d.ts +2 -2
- package/dist/dts/features/gen3Apps/index.d.ts +4 -3
- package/dist/dts/features/graphQL/graphQLSlice.d.ts +137 -5
- package/dist/dts/features/guppy/guppyApi.d.ts +2 -2
- package/dist/dts/features/guppy/guppyDownloadSlice.d.ts +164 -4
- package/dist/dts/features/guppy/guppySlice.d.ts +2012 -15
- package/dist/dts/features/metadata/metadataSlice.d.ts +930 -9
- package/dist/dts/features/submission/submissionApi.d.ts +920 -2
- package/dist/dts/features/user/externalLoginsSlice.d.ts +527 -5
- package/dist/dts/features/user/hooks.d.ts +1 -1
- package/dist/dts/features/user/userSliceRTK.d.ts +1386 -189
- package/dist/dts/features/workspace/workspacesSlice.d.ts +402 -6
- package/dist/dts/hooks.d.ts +26 -13
- package/dist/dts/reducers.d.ts +25 -5
- package/dist/dts/store.d.ts +25 -34
- package/dist/esm/index.js +177 -61
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +8788 -912
- package/package.json +4 -3
- package/dist/dts/api.d.ts +0 -8
- package/dist/dts/features/dataLibrary/types.d.ts +0 -4
package/dist/cjs/index.js
CHANGED
|
@@ -2,21 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
var toolkit = require('@reduxjs/toolkit');
|
|
4
4
|
var react = require('@reduxjs/toolkit/query/react');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var reactRedux = require('react-redux');
|
|
7
|
-
var react$1 = require('@reduxjs/toolkit/dist/query/react');
|
|
8
5
|
var cookiesNext = require('cookies-next');
|
|
9
6
|
var query = require('@reduxjs/toolkit/query');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactRedux = require('react-redux');
|
|
10
9
|
var lodash = require('lodash');
|
|
11
10
|
var Queue = require('queue');
|
|
12
11
|
var jsonpathPlus = require('jsonpath-plus');
|
|
13
12
|
var uuid = require('uuid');
|
|
14
|
-
require('redux-persist');
|
|
13
|
+
var reduxPersist = require('redux-persist');
|
|
15
14
|
var reactCookie = require('react-cookie');
|
|
16
15
|
var useSWR = require('swr');
|
|
17
16
|
var flat = require('flat');
|
|
18
17
|
var Papa = require('papaparse');
|
|
19
18
|
|
|
19
|
+
function _interopNamespaceDefault(e) {
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
n.default = e;
|
|
33
|
+
return Object.freeze(n);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
37
|
+
|
|
20
38
|
const GEN3_COMMONS_NAME = process.env.GEN3_COMMONS_NAME || 'gen3';
|
|
21
39
|
const GEN3_API = process.env.NEXT_PUBLIC_GEN3_API || '';
|
|
22
40
|
const GEN3_DOMAIN = process.env.NEXT_PUBLIC_GEN3_DOMAIN || '';
|
|
@@ -44,30 +62,6 @@ const FILE_DELIMITERS = {
|
|
|
44
62
|
csv: ','
|
|
45
63
|
};
|
|
46
64
|
|
|
47
|
-
// From here down is react-related code. If we wanted to create a UI-agnotic core,
|
|
48
|
-
// we could need to move the following code and the provider into a new workspace,
|
|
49
|
-
// such as core-react.
|
|
50
|
-
/**
|
|
51
|
-
* The initial context is never used in practice. A little casting voodoo to satisfy TS.
|
|
52
|
-
*
|
|
53
|
-
* Note: Should the action type be AnyAction (from redux) or PayloadAction (from redux-toolkit)?
|
|
54
|
-
* If we are creating all of our actions through RTK, then PayloadAction might be the
|
|
55
|
-
* correct opinionated type.
|
|
56
|
-
*/ const CoreContext = React.createContext(undefined);
|
|
57
|
-
const useCoreSelector = reactRedux.createSelectorHook(CoreContext);
|
|
58
|
-
const useCoreDispatch = reactRedux.createDispatchHook(CoreContext);
|
|
59
|
-
const useCoreStore = reactRedux.createStoreHook(CoreContext);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Creates a custom Redux Toolkit core API
|
|
63
|
-
* See: https://redux-toolkit.js.org/rtk-query/usage/customizing-create-api
|
|
64
|
-
* @returns: created core API.
|
|
65
|
-
*/ const coreCreateApi = react.buildCreateApi(react.coreModule(), react.reactHooksModule({
|
|
66
|
-
useSelector: useCoreSelector,
|
|
67
|
-
useStore: useCoreStore,
|
|
68
|
-
useDispatch: useCoreDispatch
|
|
69
|
-
}));
|
|
70
|
-
|
|
71
65
|
/**
|
|
72
66
|
* Template for fence error response dict
|
|
73
67
|
* @returns: An error dict response from a RESTFUL API request
|
|
@@ -101,7 +95,7 @@ const useCoreStore = reactRedux.createStoreHook(CoreContext);
|
|
|
101
95
|
});
|
|
102
96
|
};
|
|
103
97
|
|
|
104
|
-
const userAuthApi =
|
|
98
|
+
const userAuthApi = react.createApi({
|
|
105
99
|
reducerPath: 'userAuthApi',
|
|
106
100
|
refetchOnMountOrArgChange: 1800,
|
|
107
101
|
refetchOnReconnect: true,
|
|
@@ -198,9 +192,9 @@ const selectHeadersWithCSRFToken = toolkit.createSelector([
|
|
|
198
192
|
* @param baseQuery: - The template query which the slices will addon to
|
|
199
193
|
* @param endpoints - Base API endpoints that should exist in every slice
|
|
200
194
|
* @returns: The generated base API
|
|
201
|
-
*/ const gen3Api =
|
|
195
|
+
*/ const gen3Api = react.createApi({
|
|
202
196
|
reducerPath: 'gen3Services',
|
|
203
|
-
baseQuery: react
|
|
197
|
+
baseQuery: react.fetchBaseQuery({
|
|
204
198
|
baseUrl: `${GEN3_API}`,
|
|
205
199
|
prepareHeaders: (headers, { getState })=>{
|
|
206
200
|
const csrfToken = selectCSRFToken(getState());
|
|
@@ -338,6 +332,18 @@ const credentialsWithTags = gen3Api.enhanceEndpoints({
|
|
|
338
332
|
});
|
|
339
333
|
const { useGetJWKKeysQuery } = jwtApi;
|
|
340
334
|
|
|
335
|
+
// From here down is react-related code. If we wanted to create a UI-agnotic core,
|
|
336
|
+
// we could need to move the following code and the provider into a new workspace,
|
|
337
|
+
// such as core-react.
|
|
338
|
+
/**
|
|
339
|
+
* The initial context is never used in practice. A little casting voodoo to satisfy TS.
|
|
340
|
+
*
|
|
341
|
+
* Note: Should the action type be AnyAction (from redux) or PayloadAction (from redux-toolkit)?
|
|
342
|
+
* If we are creating all of our actions through RTK, then PayloadAction might be the
|
|
343
|
+
* correct opinionated type.
|
|
344
|
+
*/ const useCoreSelector = reactRedux.useSelector.withTypes();
|
|
345
|
+
const useCoreDispatch = reactRedux.useDispatch.withTypes();
|
|
346
|
+
|
|
341
347
|
const usePrevious = (value)=>{
|
|
342
348
|
const ref = React.useRef();
|
|
343
349
|
React.useEffect(()=>{
|
|
@@ -592,8 +598,8 @@ const slice$2 = toolkit.createSlice({
|
|
|
592
598
|
initialState: initialState$2,
|
|
593
599
|
reducers: {
|
|
594
600
|
addGen3AppMetadata: (state, action)=>{
|
|
595
|
-
const {
|
|
596
|
-
state.gen3Apps[
|
|
601
|
+
const { name, requiredEntityTypes } = action.payload;
|
|
602
|
+
state.gen3Apps[name] = {
|
|
597
603
|
...action.payload,
|
|
598
604
|
// need to turn a ReadonlyArray into a mutable array for immer's WritableDraft
|
|
599
605
|
requiredEntityTypes: [
|
|
@@ -605,8 +611,8 @@ const slice$2 = toolkit.createSlice({
|
|
|
605
611
|
});
|
|
606
612
|
const gen3AppReducer = slice$2.reducer;
|
|
607
613
|
const { addGen3AppMetadata } = slice$2.actions;
|
|
608
|
-
const
|
|
609
|
-
const
|
|
614
|
+
const selectGen3AppMetadataByName = (state, appName)=>state.gen3Apps.gen3Apps[appName];
|
|
615
|
+
const selectGen3AppByName = (appName)=>lookupGen3App(appName); // TODO: memoize this selector
|
|
610
616
|
|
|
611
617
|
const initialState$1 = {};
|
|
612
618
|
// TODO: document what this does
|
|
@@ -733,8 +739,7 @@ const cohortsAdapter = createEntityAdapter<Cohort>({
|
|
|
733
739
|
}
|
|
734
740
|
};
|
|
735
741
|
}
|
|
736
|
-
}
|
|
737
|
-
extraReducers: {}
|
|
742
|
+
}
|
|
738
743
|
});
|
|
739
744
|
// Filter actions: addFilter, removeFilter, updateFilter
|
|
740
745
|
const { updateCohortFilter, removeCohortFilter, clearCohortFilters } = cohortSlice.actions;
|
|
@@ -768,7 +773,7 @@ const cohortReducer = cohortSlice.reducer;
|
|
|
768
773
|
/**
|
|
769
774
|
* Creates a base class core API for guppy API calls.
|
|
770
775
|
* @returns: guppy core API with guppyAPIFetch base query
|
|
771
|
-
*/ const guppyApi =
|
|
776
|
+
*/ const guppyApi = react.createApi({
|
|
772
777
|
reducerPath: 'guppy',
|
|
773
778
|
// TODO: refactor to use fetchBaseQuery
|
|
774
779
|
baseQuery: async (query, api)=>{
|
|
@@ -833,8 +838,7 @@ query.setupListeners(coreStore.dispatch);
|
|
|
833
838
|
|
|
834
839
|
const CoreProvider = ({ children })=>{
|
|
835
840
|
return /*#__PURE__*/ React.createElement(reactRedux.Provider, {
|
|
836
|
-
store: coreStore
|
|
837
|
-
context: CoreContext
|
|
841
|
+
store: coreStore
|
|
838
842
|
}, children);
|
|
839
843
|
};
|
|
840
844
|
|
|
@@ -999,12 +1003,13 @@ const { useGetAggMDSQuery, useGetMDSQuery, useGetTagsQuery, useGetDataQuery, use
|
|
|
999
1003
|
|
|
1000
1004
|
// using a random uuid v4 as the namespace
|
|
1001
1005
|
const GEN3_APP_NAMESPACE = '7bfaa818-c69c-457e-8d87-413cf60c25f0';
|
|
1006
|
+
|
|
1002
1007
|
const getGen3AppId = (name, version)=>{
|
|
1003
1008
|
const nameVersion = `${name}::${version}`;
|
|
1004
1009
|
return uuid.v5(nameVersion, GEN3_APP_NAMESPACE);
|
|
1005
1010
|
};
|
|
1006
1011
|
/**
|
|
1007
|
-
*
|
|
1012
|
+
* Creates a Gen3App that is dynamically loaded
|
|
1008
1013
|
*/ const createGen3App = ({ App, name, version, requiredEntityTypes })=>{
|
|
1009
1014
|
// create a stable id for this app
|
|
1010
1015
|
const nameVersion = `${name}::${version}`;
|
|
@@ -1016,20 +1021,95 @@ const getGen3AppId = (name, version)=>{
|
|
|
1016
1021
|
// need to register its name, category, path, data requirements
|
|
1017
1022
|
// this will be used to build page3
|
|
1018
1023
|
// click app link
|
|
1024
|
+
// const store = configureStore({
|
|
1025
|
+
// // TODO allow user to pass in a reducer in CreateGen3AppOptions?
|
|
1026
|
+
// reducer: (state) => state,
|
|
1027
|
+
// devTools: {
|
|
1028
|
+
// name: `${nameVersion}::${id}`,
|
|
1029
|
+
// },
|
|
1030
|
+
// });
|
|
1031
|
+
const Gen3AppWrapper = (props)=>{
|
|
1032
|
+
React.useEffect(()=>{
|
|
1033
|
+
document.title = `GEN3 - ${name}`;
|
|
1034
|
+
});
|
|
1035
|
+
return /*#__PURE__*/ React.createElement(App, props);
|
|
1036
|
+
};
|
|
1037
|
+
// add the app to the store
|
|
1038
|
+
coreStore.dispatch(addGen3AppMetadata({
|
|
1039
|
+
id,
|
|
1040
|
+
name,
|
|
1041
|
+
version,
|
|
1042
|
+
requiredEntityTypes
|
|
1043
|
+
}));
|
|
1044
|
+
registerGen3App(name, Gen3AppWrapper);
|
|
1045
|
+
return Gen3AppWrapper;
|
|
1046
|
+
};
|
|
1047
|
+
// ----------------------------------------------------------------------------------------
|
|
1048
|
+
// Apps with Local Storage
|
|
1049
|
+
//
|
|
1050
|
+
const createAppStore = (options)=>{
|
|
1051
|
+
const { name, version, reducers, middleware } = options;
|
|
1052
|
+
const nameVersion = `${name}::${version}`;
|
|
1053
|
+
const id = uuid.v5(nameVersion, GEN3_APP_NAMESPACE);
|
|
1019
1054
|
const store = toolkit.configureStore({
|
|
1020
|
-
|
|
1021
|
-
reducer: (state)=>state,
|
|
1055
|
+
reducer: reducers,
|
|
1022
1056
|
devTools: {
|
|
1023
1057
|
name: `${nameVersion}::${id}`
|
|
1024
|
-
}
|
|
1058
|
+
},
|
|
1059
|
+
middleware: (getDefaultMiddleware)=>middleware ? getDefaultMiddleware({
|
|
1060
|
+
serializableCheck: {
|
|
1061
|
+
ignoredActions: [
|
|
1062
|
+
reduxPersist.FLUSH,
|
|
1063
|
+
reduxPersist.REHYDRATE,
|
|
1064
|
+
reduxPersist.PAUSE,
|
|
1065
|
+
reduxPersist.PERSIST,
|
|
1066
|
+
reduxPersist.PURGE,
|
|
1067
|
+
reduxPersist.REGISTER
|
|
1068
|
+
]
|
|
1069
|
+
}
|
|
1070
|
+
}).concat(middleware) : getDefaultMiddleware({
|
|
1071
|
+
serializableCheck: {
|
|
1072
|
+
ignoredActions: [
|
|
1073
|
+
reduxPersist.FLUSH,
|
|
1074
|
+
reduxPersist.REHYDRATE,
|
|
1075
|
+
reduxPersist.PAUSE,
|
|
1076
|
+
reduxPersist.PERSIST,
|
|
1077
|
+
reduxPersist.PURGE,
|
|
1078
|
+
reduxPersist.REGISTER
|
|
1079
|
+
]
|
|
1080
|
+
}
|
|
1081
|
+
})
|
|
1025
1082
|
});
|
|
1026
|
-
const
|
|
1083
|
+
const context = /*#__PURE__*/ React.createContext(null);
|
|
1084
|
+
const useAppSelector = reactRedux.createSelectorHook(context);
|
|
1085
|
+
const useAppDispatch = reactRedux.createDispatchHook(context);
|
|
1086
|
+
const useAppStore = reactRedux.createStoreHook(context);
|
|
1087
|
+
return {
|
|
1088
|
+
id: id,
|
|
1089
|
+
AppStore: store,
|
|
1090
|
+
AppContext: context,
|
|
1091
|
+
useAppSelector: useAppSelector,
|
|
1092
|
+
useAppDispatch: useAppDispatch,
|
|
1093
|
+
useAppStore: useAppStore
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
1096
|
+
const createGen3AppWithOwnStore = (options)=>{
|
|
1097
|
+
const { App, id, name, version, requiredEntityTypes, store, context } = options;
|
|
1098
|
+
// need to create store and provider.
|
|
1099
|
+
// return a component representing this app
|
|
1100
|
+
// if component gets added to a list, then the list can be iterated in index.js and each provider component can be added
|
|
1101
|
+
// a route can be setup for the app
|
|
1102
|
+
// need to register its name, category, path, data requirements
|
|
1103
|
+
// this will be used to build page3
|
|
1104
|
+
// click app link
|
|
1105
|
+
const Gen3AppWrapper = (props)=>{
|
|
1027
1106
|
React.useEffect(()=>{
|
|
1028
1107
|
document.title = `GEN3 - ${name}`;
|
|
1029
1108
|
});
|
|
1030
1109
|
return /*#__PURE__*/ React.createElement(reactRedux.Provider, {
|
|
1031
|
-
store: store
|
|
1032
|
-
|
|
1110
|
+
store: store,
|
|
1111
|
+
context: context
|
|
1112
|
+
}, /*#__PURE__*/ React.createElement(reactCookie.CookiesProvider, null, /*#__PURE__*/ React.createElement(App, props)));
|
|
1033
1113
|
};
|
|
1034
1114
|
// add the app to the store
|
|
1035
1115
|
coreStore.dispatch(addGen3AppMetadata({
|
|
@@ -1038,10 +1118,69 @@ const getGen3AppId = (name, version)=>{
|
|
|
1038
1118
|
version,
|
|
1039
1119
|
requiredEntityTypes
|
|
1040
1120
|
}));
|
|
1041
|
-
registerGen3App(
|
|
1121
|
+
registerGen3App(name, Gen3AppWrapper);
|
|
1042
1122
|
return Gen3AppWrapper;
|
|
1043
1123
|
};
|
|
1044
1124
|
|
|
1125
|
+
const createAppApiForRTKQ = (reducerPath, baseQuery)=>{
|
|
1126
|
+
const appContext = React__namespace.createContext(null);
|
|
1127
|
+
const useAppSelector = reactRedux.useSelector.withTypes();
|
|
1128
|
+
const useAppDispatch = reactRedux.createDispatchHook(appContext);
|
|
1129
|
+
const useAppStore = reactRedux.createStoreHook(appContext);
|
|
1130
|
+
const appCreateApi = react.buildCreateApi(react.coreModule(), react.reactHooksModule({
|
|
1131
|
+
hooks: {
|
|
1132
|
+
useDispatch: useAppDispatch,
|
|
1133
|
+
useSelector: useAppSelector,
|
|
1134
|
+
useStore: useAppStore
|
|
1135
|
+
}
|
|
1136
|
+
}));
|
|
1137
|
+
const appRTKQApi = appCreateApi({
|
|
1138
|
+
reducerPath: reducerPath,
|
|
1139
|
+
baseQuery: baseQuery ?? react.fetchBaseQuery({
|
|
1140
|
+
baseUrl: `${GEN3_API}`,
|
|
1141
|
+
prepareHeaders: (headers)=>{
|
|
1142
|
+
headers.set('Content-Type', 'application/json');
|
|
1143
|
+
let accessToken = undefined;
|
|
1144
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1145
|
+
// NOTE: This cookie can only be accessed from the client side
|
|
1146
|
+
// in development mode. Otherwise, the cookie is set as httpOnly
|
|
1147
|
+
accessToken = cookiesNext.getCookie('credentials_token');
|
|
1148
|
+
}
|
|
1149
|
+
if (accessToken) headers.set('Authorization', `Bearer ${accessToken}`);
|
|
1150
|
+
return headers;
|
|
1151
|
+
}
|
|
1152
|
+
}),
|
|
1153
|
+
endpoints: ()=>({})
|
|
1154
|
+
});
|
|
1155
|
+
const appMiddleware = appRTKQApi.middleware;
|
|
1156
|
+
const appStore = toolkit.configureStore({
|
|
1157
|
+
reducer: {
|
|
1158
|
+
[appRTKQApi.reducerPath]: appRTKQApi.reducer
|
|
1159
|
+
},
|
|
1160
|
+
middleware: (getDefaultMiddleware)=>getDefaultMiddleware({
|
|
1161
|
+
serializableCheck: {
|
|
1162
|
+
ignoredActions: [
|
|
1163
|
+
reduxPersist.FLUSH,
|
|
1164
|
+
reduxPersist.REHYDRATE,
|
|
1165
|
+
reduxPersist.PAUSE,
|
|
1166
|
+
reduxPersist.PERSIST,
|
|
1167
|
+
reduxPersist.PURGE,
|
|
1168
|
+
reduxPersist.REGISTER
|
|
1169
|
+
]
|
|
1170
|
+
}
|
|
1171
|
+
}).concat(appMiddleware)
|
|
1172
|
+
});
|
|
1173
|
+
return {
|
|
1174
|
+
useAppSelector: useAppSelector,
|
|
1175
|
+
useAppDispatch: useAppDispatch,
|
|
1176
|
+
useAppStore: useAppStore,
|
|
1177
|
+
AppContext: appContext,
|
|
1178
|
+
appApi: appRTKQApi,
|
|
1179
|
+
appContext: appContext,
|
|
1180
|
+
appStore: appStore
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1045
1184
|
const graphQLWithTags = gen3Api.enhanceEndpoints({
|
|
1046
1185
|
addTagTypes: [
|
|
1047
1186
|
'graphQL'
|
|
@@ -1498,14 +1637,14 @@ const useGetStatus = ()=>{
|
|
|
1498
1637
|
}
|
|
1499
1638
|
}),
|
|
1500
1639
|
getFieldCountSummary: builder.query({
|
|
1501
|
-
query: ({ type, field, filters })=>{
|
|
1640
|
+
query: ({ type, field, filters, accessibility = exports.Accessibility.ALL })=>{
|
|
1502
1641
|
const gqlFilters = convertFilterSetToGqlFilter(filters);
|
|
1503
|
-
const query = `query ($filter: JSON) {
|
|
1642
|
+
const query = `query summary ($filter: JSON) {
|
|
1504
1643
|
_aggregation {
|
|
1505
|
-
${type} (filter: $filter) {
|
|
1644
|
+
${type} (filter: $filter, accessibility: ${accessibility}) {
|
|
1506
1645
|
${field} {
|
|
1507
1646
|
histogram {
|
|
1508
|
-
sum
|
|
1647
|
+
sum,
|
|
1509
1648
|
}
|
|
1510
1649
|
}
|
|
1511
1650
|
}
|
|
@@ -1603,12 +1742,7 @@ const useGetArrayTypes = ()=>{
|
|
|
1603
1742
|
return data ? data['indices'] : {};
|
|
1604
1743
|
}
|
|
1605
1744
|
};
|
|
1606
|
-
const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFieldsForTypeQuery, useGetAggsQuery, useGetSubAggsQuery, useGetCountsQuery, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGeneralGQLQuery, useLazyGeneralGQLQuery } = explorerApi;
|
|
1607
|
-
const EmptyAggData = {};
|
|
1608
|
-
const selectAggDataForIndex = (state, index, field)=>{
|
|
1609
|
-
const data = state.guppyApi.aggs[index]?.[field]?.histogram;
|
|
1610
|
-
return data ?? EmptyAggData;
|
|
1611
|
-
};
|
|
1745
|
+
const { useGetRawDataAndTotalCountsQuery, useGetAccessibleDataQuery, useGetAllFieldsForTypeQuery, useGetAggsQuery, useLazyGetAggsQuery, useGetSubAggsQuery, useGetCountsQuery, useGetFieldCountSummaryQuery, useGetFieldsForIndexQuery, useGeneralGQLQuery, useLazyGeneralGQLQuery } = explorerApi;
|
|
1612
1746
|
|
|
1613
1747
|
/**
|
|
1614
1748
|
* Flattens a deep nested JSON object skipping
|
|
@@ -2081,7 +2215,6 @@ const SubmissionGraphqlQuery = `query transactionList {
|
|
|
2081
2215
|
});
|
|
2082
2216
|
const { useGetProjectsQuery, useGetSubmissionGraphQLQuery, useGetProjectsDetailsQuery, useLazyGetProjectsQuery, useLazyGetSubmissionGraphQLQuery, useGetSubmissionsQuery, useGetDictionaryQuery } = submissionApi;
|
|
2083
2217
|
|
|
2084
|
-
exports.CoreContext = CoreContext;
|
|
2085
2218
|
exports.CoreProvider = CoreProvider;
|
|
2086
2219
|
exports.GEN3_API = GEN3_API;
|
|
2087
2220
|
exports.GEN3_AUTHZ_API = GEN3_AUTHZ_API;
|
|
@@ -2099,7 +2232,10 @@ exports.clearCohortFilters = clearCohortFilters;
|
|
|
2099
2232
|
exports.cohortReducer = cohortReducer;
|
|
2100
2233
|
exports.convertFilterSetToGqlFilter = convertFilterSetToGqlFilter;
|
|
2101
2234
|
exports.coreStore = coreStore;
|
|
2235
|
+
exports.createAppApiForRTKQ = createAppApiForRTKQ;
|
|
2236
|
+
exports.createAppStore = createAppStore;
|
|
2102
2237
|
exports.createGen3App = createGen3App;
|
|
2238
|
+
exports.createGen3AppWithOwnStore = createGen3AppWithOwnStore;
|
|
2103
2239
|
exports.createUseCoreDataHook = createUseCoreDataHook;
|
|
2104
2240
|
exports.downloadFromGuppyToBlob = downloadFromGuppyToBlob;
|
|
2105
2241
|
exports.downloadJSONDataFromGuppy = downloadJSONDataFromGuppy;
|
|
@@ -2152,7 +2288,6 @@ exports.rawDataQueryStrForEachField = rawDataQueryStrForEachField;
|
|
|
2152
2288
|
exports.removeCohortFilter = removeCohortFilter;
|
|
2153
2289
|
exports.resetUserState = resetUserState;
|
|
2154
2290
|
exports.resourcePathFromProjectID = resourcePathFromProjectID;
|
|
2155
|
-
exports.selectAggDataForIndex = selectAggDataForIndex;
|
|
2156
2291
|
exports.selectAuthzMappingData = selectAuthzMappingData;
|
|
2157
2292
|
exports.selectCSRFToken = selectCSRFToken;
|
|
2158
2293
|
exports.selectCSRFTokenData = selectCSRFTokenData;
|
|
@@ -2162,8 +2297,8 @@ exports.selectCurrentCohortId = selectCurrentCohortId;
|
|
|
2162
2297
|
exports.selectCurrentCohortName = selectCurrentCohortName;
|
|
2163
2298
|
exports.selectCurrentMessage = selectCurrentMessage;
|
|
2164
2299
|
exports.selectCurrentModal = selectCurrentModal;
|
|
2165
|
-
exports.
|
|
2166
|
-
exports.
|
|
2300
|
+
exports.selectGen3AppByName = selectGen3AppByName;
|
|
2301
|
+
exports.selectGen3AppMetadataByName = selectGen3AppMetadataByName;
|
|
2167
2302
|
exports.selectHeadersWithCSRFToken = selectHeadersWithCSRFToken;
|
|
2168
2303
|
exports.selectIndexFilters = selectIndexFilters;
|
|
2169
2304
|
exports.selectIndexedFilterByName = selectIndexedFilterByName;
|
|
@@ -2182,7 +2317,6 @@ exports.useAskQuestionMutation = useAskQuestionMutation;
|
|
|
2182
2317
|
exports.useAuthorizeFromCredentialsMutation = useAuthorizeFromCredentialsMutation;
|
|
2183
2318
|
exports.useCoreDispatch = useCoreDispatch;
|
|
2184
2319
|
exports.useCoreSelector = useCoreSelector;
|
|
2185
|
-
exports.useCoreStore = useCoreStore;
|
|
2186
2320
|
exports.useDownloadFromGuppyMutation = useDownloadFromGuppyMutation;
|
|
2187
2321
|
exports.useFetchUserDetailsQuery = useFetchUserDetailsQuery;
|
|
2188
2322
|
exports.useGeneralGQLQuery = useGeneralGQLQuery;
|
|
@@ -2224,6 +2358,7 @@ exports.useIsExternalConnectedQuery = useIsExternalConnectedQuery;
|
|
|
2224
2358
|
exports.useIsUserLoggedIn = useIsUserLoggedIn;
|
|
2225
2359
|
exports.useLazyFetchUserDetailsQuery = useLazyFetchUserDetailsQuery;
|
|
2226
2360
|
exports.useLazyGeneralGQLQuery = useLazyGeneralGQLQuery;
|
|
2361
|
+
exports.useLazyGetAggsQuery = useLazyGetAggsQuery;
|
|
2227
2362
|
exports.useLazyGetCrosswalkDataQuery = useLazyGetCrosswalkDataQuery;
|
|
2228
2363
|
exports.useLazyGetExternalLoginsQuery = useLazyGetExternalLoginsQuery;
|
|
2229
2364
|
exports.useLazyGetProjectsQuery = useLazyGetProjectsQuery;
|