@gen3/core 0.12.33 → 0.12.35
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/constants.js +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.js +158 -77
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/server.js +1 -1
- package/dist/cjs/server.js.map +1 -1
- package/dist/dts/constants.d.ts.map +1 -1
- package/dist/dts/features/cart/cartSelectors.d.ts +68 -0
- package/dist/dts/features/cart/cartSelectors.d.ts.map +1 -1
- package/dist/dts/features/cohort/cohortManagerSelector.d.ts +68 -0
- package/dist/dts/features/cohort/cohortManagerSelector.d.ts.map +1 -1
- package/dist/dts/features/cohort/cohortManagerSlice.d.ts +17 -0
- package/dist/dts/features/cohort/cohortManagerSlice.d.ts.map +1 -1
- package/dist/dts/features/guppy/guppySlice.d.ts.map +1 -1
- package/dist/dts/features/indexd/indexdSlice.d.ts +16 -1
- package/dist/dts/features/indexd/indexdSlice.d.ts.map +1 -1
- package/dist/dts/features/sower/index.d.ts +4 -2
- package/dist/dts/features/sower/index.d.ts.map +1 -1
- package/dist/dts/features/sower/reducers.d.ts +38 -0
- package/dist/dts/features/sower/reducers.d.ts.map +1 -0
- package/dist/dts/features/sower/sowerApi.d.ts +726 -14
- package/dist/dts/features/sower/sowerApi.d.ts.map +1 -1
- package/dist/dts/features/sower/sowerJobDatetime.d.ts +7 -0
- package/dist/dts/features/sower/sowerJobDatetime.d.ts.map +1 -0
- package/dist/dts/features/user/userSliceRTK.d.ts +51 -0
- package/dist/dts/features/user/userSliceRTK.d.ts.map +1 -1
- package/dist/dts/hooks.d.ts +34 -0
- package/dist/dts/hooks.d.ts.map +1 -1
- package/dist/dts/reducers.d.ts +54 -0
- package/dist/dts/reducers.d.ts.map +1 -1
- package/dist/dts/store.d.ts +68 -0
- package/dist/dts/store.d.ts.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.js +155 -78
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/server.js.map +1 -1
- package/dist/index.d.ts +11414 -10334
- package/package.json +5 -5
package/dist/cjs/constants.js
CHANGED
|
@@ -20,7 +20,7 @@ const GEN3_SUBMISSION_API = process.env.NEXT_PUBLIC_GEN3_SUBMISSION_API || `${GE
|
|
|
20
20
|
process.env.NEXT_PUBLIC_GEN3_WTS_API || `${GEN3_API}/wts`;
|
|
21
21
|
process.env.NEXT_PUBLIC_GEN3_DATA_LIBRARY_API || `${GEN3_API}/library/lists`;
|
|
22
22
|
const GEN3_CROSSWALK_API = process.env.NEXT_PUBLIC_GEN3_CROSSWALK_API || `${GEN3_API}/mds`;
|
|
23
|
-
const GEN3_SOWER_API = process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/
|
|
23
|
+
const GEN3_SOWER_API = process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/job`;
|
|
24
24
|
const GEN3_MANIFEST_API = process.env.NEXT_PUBLIC_GEN3_MANIFEST_API || `${GEN3_API}/manifests`;
|
|
25
25
|
process.env.NEXT_PUBLIC_GEN3_REQUESTOR_API || `${GEN3_API}/requestor`;
|
|
26
26
|
process.env.NEXT_PUBLIC_GEN3_ANALYSIS_API || `${GEN3_API}/analysis/v0`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../src/constants.ts"],"sourcesContent":["export const GEN3_COMMONS_NAME =\n process.env.NEXT_PUBLIC_GEN3_COMMONS_NAME || 'gen3';\nexport const GEN3_API = process.env.NEXT_PUBLIC_GEN3_API || '';\nexport const GEN3_DOMAIN = process.env.NEXT_PUBLIC_GEN3_DOMAIN || '';\nexport const GUID_PREFIX_PATTERN = /^dg.[a-zA-Z0-9]+\\//;\n\n/**\n * Service Specific Constants\n */\nexport const GEN3_GUPPY_API =\n process.env.NEXT_PUBLIC_GEN3_GUPPY_API || `${GEN3_API}/guppy`;\nexport const GEN3_MDS_API =\n process.env.NEXT_PUBLIC_GEN3_MDS_API || `${GEN3_API}/mds`;\nexport const GEN3_DOWNLOADS_ENDPOINT =\n process.env.NEXT_PUBLIC_GEN3_DOWNLOADS_ENDPOINT || 'downloads';\nexport const GEN3_FENCE_API =\n process.env.NEXT_PUBLIC_GEN3_FENCE_API || `${GEN3_API}/user`;\nexport const GEN3_FENCE_SERVICE =\n process.env.GEN3_FENCE_SERVICE || 'http://fence-service';\nexport const GEN3_INDEXD_API =\n process.env.NEXT_PUBLIC_GEN3_INDEXD_API || `${GEN3_API}/index`;\nexport const GEN3_AI_SEARCH_API =\n process.env.NEXT_PUBLIC_GEN3_AI_SEARCH_API || `${GEN3_API}/ai-search`;\nexport const GEN3_AUTHZ_API =\n process.env.NEXT_PUBLIC_GEN3_AUTHZ_API || `${GEN3_API}/authz`;\nexport const GEN3_AUTHZ_SERVICE =\n process.env.GEN3_AUTHZ_SERVICE || 'http://arborist-service';\nexport const GEN3_REDIRECT_URL =\n process.env.NEXT_PUBLIC_GEN3_REDIRECT_URL || GEN3_API;\nexport const GEN3_WORKSPACE_API =\n process.env.NEXT_PUBLIC_GEN3_WORKSPACE_STATUS_API ||\n `${GEN3_API}/lw-workspace`;\nexport const GEN3_SUBMISSION_API =\n process.env.NEXT_PUBLIC_GEN3_SUBMISSION_API ||\n `${GEN3_API}/api/v0/submission`;\nexport const GEN3_WTS_API =\n process.env.NEXT_PUBLIC_GEN3_WTS_API || `${GEN3_API}/wts`;\nexport const GEN3_DATA_LIBRARY_API =\n process.env.NEXT_PUBLIC_GEN3_DATA_LIBRARY_API || `${GEN3_API}/library/lists`;\nexport const GEN3_CROSSWALK_API =\n process.env.NEXT_PUBLIC_GEN3_CROSSWALK_API || `${GEN3_API}/mds`;\nexport const GEN3_SOWER_API =\n process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../src/constants.ts"],"sourcesContent":["export const GEN3_COMMONS_NAME =\n process.env.NEXT_PUBLIC_GEN3_COMMONS_NAME || 'gen3';\nexport const GEN3_API = process.env.NEXT_PUBLIC_GEN3_API || '';\nexport const GEN3_DOMAIN = process.env.NEXT_PUBLIC_GEN3_DOMAIN || '';\nexport const GUID_PREFIX_PATTERN = /^dg.[a-zA-Z0-9]+\\//;\n\n/**\n * Service Specific Constants\n */\nexport const GEN3_GUPPY_API =\n process.env.NEXT_PUBLIC_GEN3_GUPPY_API || `${GEN3_API}/guppy`;\nexport const GEN3_MDS_API =\n process.env.NEXT_PUBLIC_GEN3_MDS_API || `${GEN3_API}/mds`;\nexport const GEN3_DOWNLOADS_ENDPOINT =\n process.env.NEXT_PUBLIC_GEN3_DOWNLOADS_ENDPOINT || 'downloads';\nexport const GEN3_FENCE_API =\n process.env.NEXT_PUBLIC_GEN3_FENCE_API || `${GEN3_API}/user`;\nexport const GEN3_FENCE_SERVICE =\n process.env.GEN3_FENCE_SERVICE || 'http://fence-service';\nexport const GEN3_INDEXD_API =\n process.env.NEXT_PUBLIC_GEN3_INDEXD_API || `${GEN3_API}/index`;\nexport const GEN3_AI_SEARCH_API =\n process.env.NEXT_PUBLIC_GEN3_AI_SEARCH_API || `${GEN3_API}/ai-search`;\nexport const GEN3_AUTHZ_API =\n process.env.NEXT_PUBLIC_GEN3_AUTHZ_API || `${GEN3_API}/authz`;\nexport const GEN3_AUTHZ_SERVICE =\n process.env.GEN3_AUTHZ_SERVICE || 'http://arborist-service';\nexport const GEN3_REDIRECT_URL =\n process.env.NEXT_PUBLIC_GEN3_REDIRECT_URL || GEN3_API;\nexport const GEN3_WORKSPACE_API =\n process.env.NEXT_PUBLIC_GEN3_WORKSPACE_STATUS_API ||\n `${GEN3_API}/lw-workspace`;\nexport const GEN3_SUBMISSION_API =\n process.env.NEXT_PUBLIC_GEN3_SUBMISSION_API ||\n `${GEN3_API}/api/v0/submission`;\nexport const GEN3_WTS_API =\n process.env.NEXT_PUBLIC_GEN3_WTS_API || `${GEN3_API}/wts`;\nexport const GEN3_DATA_LIBRARY_API =\n process.env.NEXT_PUBLIC_GEN3_DATA_LIBRARY_API || `${GEN3_API}/library/lists`;\nexport const GEN3_CROSSWALK_API =\n process.env.NEXT_PUBLIC_GEN3_CROSSWALK_API || `${GEN3_API}/mds`;\nexport const GEN3_SOWER_API =\n process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/job`;\nexport const GEN3_MANIFEST_API =\n process.env.NEXT_PUBLIC_GEN3_MANIFEST_API || `${GEN3_API}/manifests`;\nexport const GEN3_REQUESTOR_API =\n process.env.NEXT_PUBLIC_GEN3_REQUESTOR_API || `${GEN3_API}/requestor`;\nexport const GEN3_ANALYSIS_API =\n process.env.NEXT_PUBLIC_GEN3_ANALYSIS_API || `${GEN3_API}/analysis/v0`;\n\nexport enum Accessibility {\n ACCESSIBLE = 'accessible',\n UNACCESSIBLE = 'unaccessible',\n ALL = 'all',\n}\n\nexport const FILE_FORMATS = {\n JSON: 'json',\n TSV: 'tsv',\n CSV: 'csv',\n};\n\nexport const FILE_DELIMITERS = {\n tsv: '\\t',\n csv: ',',\n};\n\nexport const CART_LIMIT = 80000;\n"],"names":["GEN3_COMMONS_NAME","process","env","NEXT_PUBLIC_GEN3_COMMONS_NAME","GEN3_API","NEXT_PUBLIC_GEN3_API","GEN3_DOMAIN","NEXT_PUBLIC_GEN3_DOMAIN","GEN3_GUPPY_API","NEXT_PUBLIC_GEN3_GUPPY_API","GEN3_MDS_API","NEXT_PUBLIC_GEN3_MDS_API","GEN3_DOWNLOADS_ENDPOINT","NEXT_PUBLIC_GEN3_DOWNLOADS_ENDPOINT","GEN3_FENCE_API","NEXT_PUBLIC_GEN3_FENCE_API","GEN3_FENCE_SERVICE","NEXT_PUBLIC_GEN3_INDEXD_API","NEXT_PUBLIC_GEN3_AI_SEARCH_API","GEN3_AUTHZ_API","NEXT_PUBLIC_GEN3_AUTHZ_API","GEN3_AUTHZ_SERVICE","GEN3_REDIRECT_URL","NEXT_PUBLIC_GEN3_REDIRECT_URL","GEN3_WORKSPACE_API","NEXT_PUBLIC_GEN3_WORKSPACE_STATUS_API","GEN3_SUBMISSION_API","NEXT_PUBLIC_GEN3_SUBMISSION_API","NEXT_PUBLIC_GEN3_WTS_API","NEXT_PUBLIC_GEN3_DATA_LIBRARY_API","GEN3_CROSSWALK_API","NEXT_PUBLIC_GEN3_CROSSWALK_API","GEN3_SOWER_API","NEXT_PUBLIC_GEN3_SOWER_API","GEN3_MANIFEST_API","NEXT_PUBLIC_GEN3_MANIFEST_API","NEXT_PUBLIC_GEN3_REQUESTOR_API","NEXT_PUBLIC_GEN3_ANALYSIS_API","Accessibility","FILE_FORMATS","JSON","TSV","CSV","FILE_DELIMITERS","tsv","csv","CART_LIMIT"],"mappings":";;MAAaA,iBAAAA,GACXC,OAAAA,CAAQC,GAAG,CAACC,6BAA6B,IAAI;MAClCC,QAAAA,GAAWH,OAAAA,CAAQC,GAAG,CAACG,oBAAoB,IAAI;MAC/CC,WAAAA,GAAcL,OAAAA,CAAQC,GAAG,CAACK,uBAAuB,IAAI;AAGlE;;AAEC,IACM,MAAMC,cAAAA,GACXP,OAAAA,CAAQC,GAAG,CAACO,0BAA0B,IAAI,CAAA,EAAGL,QAAAA,CAAS,MAAM;AACvD,MAAMM,YAAAA,GACXT,OAAAA,CAAQC,GAAG,CAACS,wBAAwB,IAAI,CAAA,EAAGP,QAAAA,CAAS,IAAI;MAC7CQ,uBAAAA,GACXX,OAAAA,CAAQC,GAAG,CAACW,mCAAmC,IAAI;AAC9C,MAAMC,cAAAA,GACXb,OAAAA,CAAQC,GAAG,CAACa,0BAA0B,IAAI,CAAA,EAAGX,QAAAA,CAAS,KAAK;MAChDY,kBAAAA,GACXf,OAAAA,CAAQC,GAAG,CAACc,kBAAkB,IAAI;AAElCf,OAAAA,CAAQC,GAAG,CAACe,2BAA2B,IAAI,CAAA,EAAGb,QAAAA,CAAS,MAAM;AAE7DH,OAAAA,CAAQC,GAAG,CAACgB,8BAA8B,IAAI,CAAA,EAAGd,QAAAA,CAAS,UAAU;AAC/D,MAAMe,cAAAA,GACXlB,OAAAA,CAAQC,GAAG,CAACkB,0BAA0B,IAAI,CAAA,EAAGhB,QAAAA,CAAS,MAAM;MACjDiB,kBAAAA,GACXpB,OAAAA,CAAQC,GAAG,CAACmB,kBAAkB,IAAI;MACvBC,iBAAAA,GACXrB,OAAAA,CAAQC,GAAG,CAACqB,6BAA6B,IAAInB;AACxC,MAAMoB,kBAAAA,GACXvB,OAAAA,CAAQC,GAAG,CAACuB,qCAAqC,IACjD,CAAA,EAAGrB,QAAAA,CAAS,aAAa;AACpB,MAAMsB,mBAAAA,GACXzB,OAAAA,CAAQC,GAAG,CAACyB,+BAA+B,IAC3C,CAAA,EAAGvB,QAAAA,CAAS,kBAAkB;AAE9BH,OAAAA,CAAQC,GAAG,CAAC0B,wBAAwB,IAAI,CAAA,EAAGxB,QAAAA,CAAS,IAAI;AAExDH,OAAAA,CAAQC,GAAG,CAAC2B,iCAAiC,IAAI,CAAA,EAAGzB,QAAAA,CAAS,cAAc;AACtE,MAAM0B,kBAAAA,GACX7B,OAAAA,CAAQC,GAAG,CAAC6B,8BAA8B,IAAI,CAAA,EAAG3B,QAAAA,CAAS,IAAI;AACzD,MAAM4B,cAAAA,GACX/B,OAAAA,CAAQC,GAAG,CAAC+B,0BAA0B,IAAI,CAAA,EAAG7B,QAAAA,CAAS,IAAI;AACrD,MAAM8B,iBAAAA,GACXjC,OAAAA,CAAQC,GAAG,CAACiC,6BAA6B,IAAI,CAAA,EAAG/B,QAAAA,CAAS,UAAU;AAEnEH,OAAAA,CAAQC,GAAG,CAACkC,8BAA8B,IAAI,CAAA,EAAGhC,QAAAA,CAAS,UAAU;AAEpEH,OAAAA,CAAQC,GAAG,CAACmC,6BAA6B,IAAI,CAAA,EAAGjC,QAAAA,CAAS,YAAY;AAEhE,IAAA,aAAKkC,iBAAAA,SAAAA,aAAAA,EAAAA;;;;AAAAA,IAAAA,OAAAA,aAAAA;AAIX,CAAA,CAAA,EAAA;MAEYC,YAAAA,GAAe;IAC1BC,IAAAA,EAAM,MAAA;IACNC,GAAAA,EAAK,KAAA;IACLC,GAAAA,EAAK;AACP;MAEaC,eAAAA,GAAkB;IAC7BC,GAAAA,EAAK,IAAA;IACLC,GAAAA,EAAK;AACP;AAEO,MAAMC,aAAa;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,11 +10,11 @@ var graphql = require('graphql');
|
|
|
10
10
|
var jsonpathPlus = require('jsonpath-plus');
|
|
11
11
|
var lodash = require('lodash');
|
|
12
12
|
var nanoid$1 = require('nanoid');
|
|
13
|
+
var reduxPersist = require('redux-persist');
|
|
14
|
+
var createWebStorage = require('redux-persist/lib/storage/createWebStorage');
|
|
13
15
|
var useSWR = require('swr');
|
|
14
16
|
var flat = require('flat');
|
|
15
17
|
var Papa = require('papaparse');
|
|
16
|
-
var reduxPersist = require('redux-persist');
|
|
17
|
-
var createWebStorage = require('redux-persist/lib/storage/createWebStorage');
|
|
18
18
|
var react$1 = require('redux-persist/integration/react');
|
|
19
19
|
var idb = require('idb');
|
|
20
20
|
var useDeepCompare = require('use-deep-compare');
|
|
@@ -62,7 +62,7 @@ const GEN3_SUBMISSION_API = process.env.NEXT_PUBLIC_GEN3_SUBMISSION_API || `${GE
|
|
|
62
62
|
const GEN3_WTS_API = process.env.NEXT_PUBLIC_GEN3_WTS_API || `${GEN3_API}/wts`;
|
|
63
63
|
const GEN3_DATA_LIBRARY_API = process.env.NEXT_PUBLIC_GEN3_DATA_LIBRARY_API || `${GEN3_API}/library/lists`;
|
|
64
64
|
const GEN3_CROSSWALK_API = process.env.NEXT_PUBLIC_GEN3_CROSSWALK_API || `${GEN3_API}/mds`;
|
|
65
|
-
const GEN3_SOWER_API = process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/
|
|
65
|
+
const GEN3_SOWER_API = process.env.NEXT_PUBLIC_GEN3_SOWER_API || `${GEN3_API}/job`;
|
|
66
66
|
const GEN3_MANIFEST_API = process.env.NEXT_PUBLIC_GEN3_MANIFEST_API || `${GEN3_API}/manifests`;
|
|
67
67
|
const GEN3_REQUESTOR_API = process.env.NEXT_PUBLIC_GEN3_REQUESTOR_API || `${GEN3_API}/requestor`;
|
|
68
68
|
const GEN3_ANALYSIS_API = process.env.NEXT_PUBLIC_GEN3_ANALYSIS_API || `${GEN3_API}/analysis/v0`;
|
|
@@ -335,7 +335,7 @@ const useCoreDispatch = reactRedux.useDispatch.withTypes();
|
|
|
335
335
|
});
|
|
336
336
|
const isAuthenticated = (loginStatus)=>loginStatus === 'authenticated';
|
|
337
337
|
const isPending = (loginStatus)=>loginStatus === 'pending';
|
|
338
|
-
const initialState$
|
|
338
|
+
const initialState$a = {
|
|
339
339
|
status: 'uninitialized',
|
|
340
340
|
loginStatus: 'unauthenticated',
|
|
341
341
|
error: undefined
|
|
@@ -346,9 +346,9 @@ const initialState$9 = {
|
|
|
346
346
|
* @returns: status messages wrapped around fetchUserState response dict
|
|
347
347
|
*/ const slice$4 = toolkit.createSlice({
|
|
348
348
|
name: 'fence/user',
|
|
349
|
-
initialState: initialState$
|
|
349
|
+
initialState: initialState$a,
|
|
350
350
|
reducers: {
|
|
351
|
-
resetUserState: ()=>initialState$
|
|
351
|
+
resetUserState: ()=>initialState$a
|
|
352
352
|
},
|
|
353
353
|
extraReducers: (builder)=>{
|
|
354
354
|
builder.addCase(fetchUserState.fulfilled, (_, action)=>{
|
|
@@ -431,12 +431,12 @@ const printRegistry = ()=>{
|
|
|
431
431
|
console.log(REGISTRY);
|
|
432
432
|
};
|
|
433
433
|
|
|
434
|
-
const initialState$
|
|
434
|
+
const initialState$9 = {
|
|
435
435
|
gen3Apps: {}
|
|
436
436
|
};
|
|
437
437
|
const slice$3 = toolkit.createSlice({
|
|
438
438
|
name: 'gen3Apps',
|
|
439
|
-
initialState: initialState$
|
|
439
|
+
initialState: initialState$9,
|
|
440
440
|
reducers: {
|
|
441
441
|
addGen3AppMetadata: (state, action)=>{
|
|
442
442
|
const { name, requiredEntityTypes } = action.payload;
|
|
@@ -455,11 +455,11 @@ const { addGen3AppMetadata } = slice$3.actions;
|
|
|
455
455
|
const selectGen3AppMetadataByName = (state, appName)=>state.gen3Apps.gen3Apps[appName];
|
|
456
456
|
const selectGen3AppByName = (appName)=>lookupGen3App(appName); // TODO: memoize this selector
|
|
457
457
|
|
|
458
|
-
const initialState$
|
|
458
|
+
const initialState$8 = {};
|
|
459
459
|
// TODO: document what this does
|
|
460
460
|
const slice$2 = toolkit.createSlice({
|
|
461
461
|
name: 'drsResolver',
|
|
462
|
-
initialState: initialState$
|
|
462
|
+
initialState: initialState$8,
|
|
463
463
|
reducers: {
|
|
464
464
|
setDRSHostnames: (_state, action)=>{
|
|
465
465
|
return action.payload;
|
|
@@ -482,13 +482,13 @@ const drsHostnamesSelector = (id, state)=>state.drsHostnames?.[id];
|
|
|
482
482
|
Modals["GeneralErrorModal"] = "GeneralErrorModal";
|
|
483
483
|
return Modals;
|
|
484
484
|
}({});
|
|
485
|
-
const initialState$
|
|
485
|
+
const initialState$7 = {
|
|
486
486
|
currentModal: null
|
|
487
487
|
};
|
|
488
488
|
//Creates a modal slice for tracking showModal and hideModal state.
|
|
489
489
|
const slice$1 = toolkit.createSlice({
|
|
490
490
|
name: 'modals',
|
|
491
|
-
initialState: initialState$
|
|
491
|
+
initialState: initialState$7,
|
|
492
492
|
reducers: {
|
|
493
493
|
showModal: (state, action)=>{
|
|
494
494
|
state.currentModal = action.payload.modal;
|
|
@@ -561,7 +561,7 @@ const getTimestamp = ()=>{
|
|
|
561
561
|
};
|
|
562
562
|
|
|
563
563
|
const NO_WORKSPACE_ID = 'none';
|
|
564
|
-
const initialState$
|
|
564
|
+
const initialState$6 = {
|
|
565
565
|
id: NO_WORKSPACE_ID,
|
|
566
566
|
status: WorkspaceStatus.NotFound,
|
|
567
567
|
requestedStatus: RequestedWorkspaceStatus.Unset,
|
|
@@ -569,7 +569,7 @@ const initialState$5 = {
|
|
|
569
569
|
};
|
|
570
570
|
const slice = toolkit.createSlice({
|
|
571
571
|
name: 'ActiveWorkspace',
|
|
572
|
-
initialState: initialState$
|
|
572
|
+
initialState: initialState$6,
|
|
573
573
|
reducers: {
|
|
574
574
|
setActiveWorkspaceId: (state, action)=>{
|
|
575
575
|
state = {
|
|
@@ -614,10 +614,10 @@ const selectRequestedWorkspaceStatusTimestamp = (state)=>state.activeWorkspace.r
|
|
|
614
614
|
const cartAdapter = toolkit.createEntityAdapter({
|
|
615
615
|
selectId: (item)=>item.id
|
|
616
616
|
});
|
|
617
|
-
const initialState$
|
|
617
|
+
const initialState$5 = cartAdapter.getInitialState({});
|
|
618
618
|
const cartSlice = toolkit.createSlice({
|
|
619
619
|
name: 'cart',
|
|
620
|
-
initialState: initialState$
|
|
620
|
+
initialState: initialState$5,
|
|
621
621
|
reducers: {
|
|
622
622
|
addItemsToCart: cartAdapter.addMany,
|
|
623
623
|
removeItemsFromCart: cartAdapter.removeMany
|
|
@@ -2229,13 +2229,13 @@ const emptyInitialState = cohortsAdapter.getInitialState({
|
|
|
2229
2229
|
message: undefined
|
|
2230
2230
|
});
|
|
2231
2231
|
// Set the initial cohort in the adapter state
|
|
2232
|
-
const initialState$
|
|
2232
|
+
const initialState$4 = cohortsAdapter.setOne(emptyInitialState, initialCohort);
|
|
2233
2233
|
const getCurrentCohortId = (state)=>state.currentCohortId;
|
|
2234
2234
|
/**
|
|
2235
2235
|
* Redux slice for cohort filters
|
|
2236
2236
|
*/ const cohortManagerSlice = toolkit.createSlice({
|
|
2237
2237
|
name: 'cohort',
|
|
2238
|
-
initialState: initialState$
|
|
2238
|
+
initialState: initialState$4,
|
|
2239
2239
|
reducers: {
|
|
2240
2240
|
createNewCohort: (state, action)=>{
|
|
2241
2241
|
const baseName = action.payload.name || `Cohort`;
|
|
@@ -2476,10 +2476,10 @@ const getCurrentCohortId = (state)=>state.currentCohortId;
|
|
|
2476
2476
|
const { createNewCohort, updateCohortFilter, setCohortFilter, setCohortIndexFilters, duplicateCohort, removeCohortFilter, clearCohortFilters, removeCohort, setCurrentCohortId, updateCohortName, updateCohortCounts, updateCohortIndexCountById, setCohortList } = cohortManagerSlice.actions;
|
|
2477
2477
|
const cohortReducer = cohortManagerSlice.reducer;
|
|
2478
2478
|
|
|
2479
|
-
const initialState$
|
|
2479
|
+
const initialState$3 = {};
|
|
2480
2480
|
const expandSlice$1 = toolkit.createSlice({
|
|
2481
2481
|
name: 'CohortBuilder/filterExpand',
|
|
2482
|
-
initialState: initialState$
|
|
2482
|
+
initialState: initialState$3,
|
|
2483
2483
|
reducers: {
|
|
2484
2484
|
toggleCohortBuilderCategoryFilter: (state, action)=>{
|
|
2485
2485
|
return {
|
|
@@ -2506,10 +2506,10 @@ const { toggleCohortBuilderCategoryFilter, toggleCohortBuilderAllFilters } = exp
|
|
|
2506
2506
|
const selectCohortFilterExpanded = (state, index, field)=>state.cohorts.filtersExpanded?.[index]?.[field];
|
|
2507
2507
|
const selectAllCohortFiltersCollapsed = (state, index)=>index in state.cohorts.filtersExpanded ? Object.values(state.cohorts.filtersExpanded?.[index]).every((e)=>!e) : false;
|
|
2508
2508
|
|
|
2509
|
-
const initialState$
|
|
2509
|
+
const initialState$2 = {};
|
|
2510
2510
|
const expandSlice = toolkit.createSlice({
|
|
2511
2511
|
name: 'CohortBuilder/filterCombineMode',
|
|
2512
|
-
initialState: initialState$
|
|
2512
|
+
initialState: initialState$2,
|
|
2513
2513
|
reducers: {
|
|
2514
2514
|
setCohortFilterCombineMode: (state, action)=>{
|
|
2515
2515
|
return {
|
|
@@ -2526,13 +2526,13 @@ const cohortBuilderFiltersCombineModeReducer = expandSlice.reducer;
|
|
|
2526
2526
|
const { setCohortFilterCombineMode } = expandSlice.actions;
|
|
2527
2527
|
const selectCohortFilterCombineMode = (state, index, field)=>state.cohorts.filtersCombineMode?.[index]?.[field] ?? 'or';
|
|
2528
2528
|
|
|
2529
|
-
const initialState = {
|
|
2529
|
+
const initialState$1 = {
|
|
2530
2530
|
shouldShareFilters: false,
|
|
2531
2531
|
sharedFiltersMap: {}
|
|
2532
2532
|
};
|
|
2533
2533
|
const cohortSharedFiltersSlice = toolkit.createSlice({
|
|
2534
2534
|
name: 'cohortSharedFilters',
|
|
2535
|
-
initialState: initialState,
|
|
2535
|
+
initialState: initialState$1,
|
|
2536
2536
|
reducers: {
|
|
2537
2537
|
setShouldShareFilters: (state, action)=>{
|
|
2538
2538
|
state.shouldShareFilters = action.payload;
|
|
@@ -2558,6 +2558,108 @@ const cohortReducers = toolkit.combineReducers({
|
|
|
2558
2558
|
cohortManager: cohortReducer
|
|
2559
2559
|
});
|
|
2560
2560
|
|
|
2561
|
+
/* eslint @typescript-eslint/no-unused-vars: 0 */ // Credit to: https://github.com/vercel/next.js/discussions/15687
|
|
2562
|
+
const createNoopStorage = ()=>{
|
|
2563
|
+
return {
|
|
2564
|
+
getItem (_key) {
|
|
2565
|
+
return Promise.resolve(null);
|
|
2566
|
+
},
|
|
2567
|
+
setItem (_key, value) {
|
|
2568
|
+
return Promise.resolve(value);
|
|
2569
|
+
},
|
|
2570
|
+
removeItem (_key) {
|
|
2571
|
+
return Promise.resolve();
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
};
|
|
2575
|
+
const storage = typeof window !== 'undefined' ? createWebStorage('local') : createNoopStorage();
|
|
2576
|
+
typeof window !== 'undefined' ? createWebStorage('session') : createNoopStorage();
|
|
2577
|
+
|
|
2578
|
+
const initialState = {
|
|
2579
|
+
datatimeCache: {}
|
|
2580
|
+
};
|
|
2581
|
+
const sowerJobDatetimeSlice = toolkit.createSlice({
|
|
2582
|
+
name: 'sowerJobDatetime',
|
|
2583
|
+
initialState,
|
|
2584
|
+
reducers: {
|
|
2585
|
+
setSowerJobDatetime: (state, action)=>{
|
|
2586
|
+
return {
|
|
2587
|
+
datatimeCache: {
|
|
2588
|
+
...state.datatimeCache,
|
|
2589
|
+
[action.payload]: Date.now()
|
|
2590
|
+
}
|
|
2591
|
+
};
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
});
|
|
2595
|
+
const { setSowerJobDatetime } = sowerJobDatetimeSlice.actions;
|
|
2596
|
+
const selectSowerJobDatetimeCache = (state)=>state.sower.sowerJobDatetime.datatimeCache;
|
|
2597
|
+
const sowerJobDatetimeReducer = sowerJobDatetimeSlice.reducer;
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Creates a loadingStatusApi for checking the status of a sower data download job
|
|
2601
|
+
* @param getJobList Shows the list of jobs currently running
|
|
2602
|
+
* @see https://petstore.swagger.io/?url=https://raw.githubusercontent.com/uc-cdis/sower/master/openapis/openapi.yaml#/sower/list
|
|
2603
|
+
* @param getDownloadStatus Shows the status of a selected job
|
|
2604
|
+
* @returns: A sower job response dict which returns job information of file downloads
|
|
2605
|
+
*/ const sowerJobApi = gen3Api.injectEndpoints({
|
|
2606
|
+
endpoints: (builder)=>({
|
|
2607
|
+
getSowerJobList: builder.query({
|
|
2608
|
+
query: ()=>`${GEN3_SOWER_API}/list`
|
|
2609
|
+
}),
|
|
2610
|
+
submitSowerJob: builder.mutation({
|
|
2611
|
+
query: (params)=>({
|
|
2612
|
+
url: `${GEN3_SOWER_API}/dispatch`,
|
|
2613
|
+
method: 'POST',
|
|
2614
|
+
body: params
|
|
2615
|
+
}),
|
|
2616
|
+
async onQueryStarted (_arg, { dispatch, queryFulfilled }) {
|
|
2617
|
+
const { data } = await queryFulfilled;
|
|
2618
|
+
dispatch(setSowerJobDatetime(data.uid));
|
|
2619
|
+
}
|
|
2620
|
+
}),
|
|
2621
|
+
getSowerJobStatus: builder.query({
|
|
2622
|
+
query: (uid)=>`${GEN3_SOWER_API}/status?UID=${uid}`
|
|
2623
|
+
}),
|
|
2624
|
+
getMultipleSowerJobStatus: builder.query({
|
|
2625
|
+
queryFn: async (arg, _queryApi, _extraOptions, fetchWithBQ)=>{
|
|
2626
|
+
const statuses = {};
|
|
2627
|
+
for (const uid of arg){
|
|
2628
|
+
const result = await fetchWithBQ(`${GEN3_SOWER_API}/status?UID=${uid}`);
|
|
2629
|
+
if (result.error) {
|
|
2630
|
+
return {
|
|
2631
|
+
error: result.error
|
|
2632
|
+
};
|
|
2633
|
+
} else {
|
|
2634
|
+
statuses[uid] = result.data;
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
return {
|
|
2638
|
+
data: statuses
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
}),
|
|
2642
|
+
getSowerOutput: builder.query({
|
|
2643
|
+
query: (uid)=>`${GEN3_SOWER_API}/output?UID=${uid}`
|
|
2644
|
+
}),
|
|
2645
|
+
getSowerServiceStatus: builder.query({
|
|
2646
|
+
query: ()=>`${GEN3_SOWER_API}/_status`
|
|
2647
|
+
})
|
|
2648
|
+
})
|
|
2649
|
+
});
|
|
2650
|
+
const { useGetSowerJobListQuery, useLazyGetSowerJobListQuery, useSubmitSowerJobMutation, useGetSowerJobStatusQuery, useLazyGetSowerJobStatusQuery, useGetSowerOutputQuery, useLazyGetSowerOutputQuery, useGetSowerServiceStatusQuery, useLazyGetMultipleSowerJobStatusQuery } = sowerJobApi;
|
|
2651
|
+
const sowerApiReducer = sowerJobApi.reducer;
|
|
2652
|
+
|
|
2653
|
+
const sowerJobDatetimePersistConfig = {
|
|
2654
|
+
key: "sowerJobDatetime",
|
|
2655
|
+
version: 1,
|
|
2656
|
+
storage: storage
|
|
2657
|
+
};
|
|
2658
|
+
const sowerReducer = toolkit.combineReducers({
|
|
2659
|
+
sowerApi: sowerApiReducer,
|
|
2660
|
+
sowerJobDatetime: reduxPersist.persistReducer(sowerJobDatetimePersistConfig, sowerJobDatetimeReducer)
|
|
2661
|
+
});
|
|
2662
|
+
|
|
2561
2663
|
const rootReducer = toolkit.combineReducers({
|
|
2562
2664
|
gen3Services: gen3ServicesReducer,
|
|
2563
2665
|
user: userReducer,
|
|
@@ -2568,7 +2670,8 @@ const rootReducer = toolkit.combineReducers({
|
|
|
2568
2670
|
activeWorkspace: activeWorkspaceReducer,
|
|
2569
2671
|
[guppyApiSliceReducerPath]: guppyApiReducer,
|
|
2570
2672
|
[userAuthApiReducerPath]: userAuthApiReducer,
|
|
2571
|
-
[cartReducerPath]: cartReducer
|
|
2673
|
+
[cartReducerPath]: cartReducer,
|
|
2674
|
+
sower: sowerReducer
|
|
2572
2675
|
});
|
|
2573
2676
|
|
|
2574
2677
|
/**
|
|
@@ -3354,7 +3457,7 @@ const explorerTags = guppyApi.enhanceEndpoints({
|
|
|
3354
3457
|
};
|
|
3355
3458
|
},
|
|
3356
3459
|
transformResponse: (response, _meta, args)=>{
|
|
3357
|
-
return response?.data[`${args?.indexPrefix ?? ''}_aggregation`][args.type]?._totalCount ?? 0;
|
|
3460
|
+
return response?.data?.[`${args?.indexPrefix ?? ''}_aggregation`]?.[args.type]?._totalCount ?? 0;
|
|
3358
3461
|
},
|
|
3359
3462
|
providesTags: [
|
|
3360
3463
|
'COUNTS'
|
|
@@ -3547,23 +3650,6 @@ const startCoreListening = coreStoreListenerMiddleware.startListening;
|
|
|
3547
3650
|
}
|
|
3548
3651
|
});
|
|
3549
3652
|
|
|
3550
|
-
/* eslint @typescript-eslint/no-unused-vars: 0 */ // Credit to: https://github.com/vercel/next.js/discussions/15687
|
|
3551
|
-
const createNoopStorage = ()=>{
|
|
3552
|
-
return {
|
|
3553
|
-
getItem (_key) {
|
|
3554
|
-
return Promise.resolve(null);
|
|
3555
|
-
},
|
|
3556
|
-
setItem (_key, value) {
|
|
3557
|
-
return Promise.resolve(value);
|
|
3558
|
-
},
|
|
3559
|
-
removeItem (_key) {
|
|
3560
|
-
return Promise.resolve();
|
|
3561
|
-
}
|
|
3562
|
-
};
|
|
3563
|
-
};
|
|
3564
|
-
const storage = typeof window !== 'undefined' ? createWebStorage('local') : createNoopStorage();
|
|
3565
|
-
typeof window !== 'undefined' ? createWebStorage('session') : createNoopStorage();
|
|
3566
|
-
|
|
3567
3653
|
/**
|
|
3568
3654
|
* Low-level helper to fetch Arborist resources for the current user.
|
|
3569
3655
|
* Adds an Authorization header when a token is provided and normalizes the response
|
|
@@ -3629,7 +3715,7 @@ const CoreProvider = ({ children })=>{
|
|
|
3629
3715
|
};
|
|
3630
3716
|
|
|
3631
3717
|
const usePrevious = (value)=>{
|
|
3632
|
-
const ref = React.useRef();
|
|
3718
|
+
const ref = React.useRef(undefined);
|
|
3633
3719
|
React.useEffect(()=>{
|
|
3634
3720
|
ref.current = value;
|
|
3635
3721
|
});
|
|
@@ -6047,37 +6133,6 @@ const requestorApi = gen3Api.injectEndpoints({
|
|
|
6047
6133
|
});
|
|
6048
6134
|
const { useCreateRequestMutation, useRequestQuery, useLazyRequestQuery, useStatusQuery: useRequestorStatusQuery, useRequestByIdQuery, useUserRequestQuery } = requestorApi;
|
|
6049
6135
|
|
|
6050
|
-
/**
|
|
6051
|
-
* Creates a loadingStatusApi for checking the status of a sower data download job
|
|
6052
|
-
* @param getJobList Shows the list of jobs currently running
|
|
6053
|
-
* @see https://petstore.swagger.io/?url=https://raw.githubusercontent.com/uc-cdis/sower/master/openapis/openapi.yaml#/sower/list
|
|
6054
|
-
* @param getDownloadStatus Shows the status of a selected job
|
|
6055
|
-
* @returns: A sower job response dict which returns job information of file downloads
|
|
6056
|
-
*/ const loadingStatusApi = gen3Api.injectEndpoints({
|
|
6057
|
-
endpoints: (builder)=>({
|
|
6058
|
-
getSowerJobList: builder.query({
|
|
6059
|
-
query: ()=>`${GEN3_SOWER_API}/list`
|
|
6060
|
-
}),
|
|
6061
|
-
submitSowerJob: builder.mutation({
|
|
6062
|
-
query: (params)=>({
|
|
6063
|
-
url: `${GEN3_SOWER_API}/dispatch`,
|
|
6064
|
-
method: 'POST',
|
|
6065
|
-
body: params
|
|
6066
|
-
})
|
|
6067
|
-
}),
|
|
6068
|
-
getSowerJobStatus: builder.query({
|
|
6069
|
-
query: (uid)=>`${GEN3_SOWER_API}/status?UID=${uid}`
|
|
6070
|
-
}),
|
|
6071
|
-
getSowerOutput: builder.query({
|
|
6072
|
-
query: (uid)=>`${GEN3_SOWER_API}/output?UID=${uid}`
|
|
6073
|
-
}),
|
|
6074
|
-
getSowerServiceStatus: builder.query({
|
|
6075
|
-
query: ()=>`${GEN3_SOWER_API}/_status`
|
|
6076
|
-
})
|
|
6077
|
-
})
|
|
6078
|
-
});
|
|
6079
|
-
const { useGetSowerJobListQuery, useLazyGetSowerJobListQuery, useSubmitSowerJobMutation, useGetSowerJobStatusQuery, useGetSowerOutputQuery, useGetSowerServiceStatusQuery } = loadingStatusApi;
|
|
6080
|
-
|
|
6081
6136
|
const resourcePathFromProjectID = (projectID)=>{
|
|
6082
6137
|
const split = projectID.split('-');
|
|
6083
6138
|
const program = split[0];
|
|
@@ -6519,9 +6574,31 @@ const { usePValueQuery } = pValueSlice;
|
|
|
6519
6574
|
const indexdApi = gen3Api.injectEndpoints({
|
|
6520
6575
|
endpoints: (builder)=>({
|
|
6521
6576
|
getIndexdMetdata: builder.query({
|
|
6522
|
-
query: ({ filters,
|
|
6577
|
+
query: ({ filters, params })=>{
|
|
6523
6578
|
const query = filters.reduce((acc, filter)=>`${acc}&${filter.key}=${filter.value}`, '');
|
|
6524
|
-
|
|
6579
|
+
const formattedParams = [];
|
|
6580
|
+
Object.entries(params || {}).forEach(([k, v])=>{
|
|
6581
|
+
if (v) {
|
|
6582
|
+
if (typeof v === "number") {
|
|
6583
|
+
formattedParams.push([
|
|
6584
|
+
k,
|
|
6585
|
+
v.toString()
|
|
6586
|
+
]);
|
|
6587
|
+
} else if (Array.isArray(v)) {
|
|
6588
|
+
v.forEach((v)=>formattedParams.push([
|
|
6589
|
+
k,
|
|
6590
|
+
v
|
|
6591
|
+
]));
|
|
6592
|
+
} else {
|
|
6593
|
+
formattedParams.push([
|
|
6594
|
+
k,
|
|
6595
|
+
v
|
|
6596
|
+
]);
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6599
|
+
});
|
|
6600
|
+
const queryString = new URLSearchParams(formattedParams).toString();
|
|
6601
|
+
return `${GEN3_INDEXD_API}/index?${query}&${queryString}`;
|
|
6525
6602
|
}
|
|
6526
6603
|
}),
|
|
6527
6604
|
getIndexObject: builder.query({
|
|
@@ -6764,6 +6841,7 @@ exports.selectRequestedWorkspaceStatusTimestamp = selectRequestedWorkspaceStatus
|
|
|
6764
6841
|
exports.selectSharedFilters = selectSharedFilters;
|
|
6765
6842
|
exports.selectSharedFiltersForFields = selectSharedFiltersForFields;
|
|
6766
6843
|
exports.selectShouldShareFilters = selectShouldShareFilters;
|
|
6844
|
+
exports.selectSowerJobDatetimeCache = selectSowerJobDatetimeCache;
|
|
6767
6845
|
exports.selectTotalCohorts = selectTotalCohorts;
|
|
6768
6846
|
exports.selectUser = selectUser;
|
|
6769
6847
|
exports.selectUserAuthStatus = selectUserAuthStatus;
|
|
@@ -6883,10 +6961,13 @@ exports.useLazyGetExternalLoginsQuery = useLazyGetExternalLoginsQuery;
|
|
|
6883
6961
|
exports.useLazyGetIndexObjectQuery = useLazyGetIndexObjectQuery;
|
|
6884
6962
|
exports.useLazyGetIndexdMetdataQuery = useLazyGetIndexdMetdataQuery;
|
|
6885
6963
|
exports.useLazyGetManifestServiceStatusQuery = useLazyGetManifestServiceStatusQuery;
|
|
6964
|
+
exports.useLazyGetMultipleSowerJobStatusQuery = useLazyGetMultipleSowerJobStatusQuery;
|
|
6886
6965
|
exports.useLazyGetObjectIdsQuery = useLazyGetObjectIdsQuery;
|
|
6887
6966
|
exports.useLazyGetPresignedUrlQuery = useLazyGetPresignedUrlQuery;
|
|
6888
6967
|
exports.useLazyGetProjectsQuery = useLazyGetProjectsQuery;
|
|
6889
6968
|
exports.useLazyGetSowerJobListQuery = useLazyGetSowerJobListQuery;
|
|
6969
|
+
exports.useLazyGetSowerJobStatusQuery = useLazyGetSowerJobStatusQuery;
|
|
6970
|
+
exports.useLazyGetSowerOutputQuery = useLazyGetSowerOutputQuery;
|
|
6890
6971
|
exports.useLazyGetStatsAggregationsQuery = useLazyGetStatsAggregationsQuery;
|
|
6891
6972
|
exports.useLazyGetSubmissionGraphQLQuery = useLazyGetSubmissionGraphQLQuery;
|
|
6892
6973
|
exports.useLazyIsExternalConnectedQuery = useLazyIsExternalConnectedQuery;
|