@gen3/core 0.10.71 → 0.10.74
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 +20 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/cohort/cohortSlice.d.ts +16 -1
- package/dist/dts/features/cohort/cohortSlice.d.ts.map +1 -1
- package/dist/dts/features/cohort/index.d.ts +2 -2
- package/dist/dts/features/cohort/index.d.ts.map +1 -1
- package/dist/esm/index.js +20 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -675,12 +675,15 @@ const { showModal, hideModal } = slice$1.actions;
|
|
|
675
675
|
const selectCurrentModal = (state)=>state.modals.currentModal;
|
|
676
676
|
const selectCurrentMessage = (state)=>state.modals.message;
|
|
677
677
|
|
|
678
|
+
const EmptyCohort = {
|
|
679
|
+
id: 'default',
|
|
680
|
+
name: 'Filters',
|
|
681
|
+
filters: {},
|
|
682
|
+
modified_datetime: new Date().toISOString()
|
|
683
|
+
};
|
|
678
684
|
const initialCohortState = {
|
|
679
685
|
cohort: {
|
|
680
|
-
|
|
681
|
-
name: 'Filters',
|
|
682
|
-
filters: {},
|
|
683
|
-
modified_datetime: new Date().toISOString()
|
|
686
|
+
...EmptyCohort
|
|
684
687
|
}
|
|
685
688
|
};
|
|
686
689
|
// TODO: start using this adapter
|
|
@@ -728,6 +731,16 @@ const cohortsAdapter = createEntityAdapter<Cohort>({
|
|
|
728
731
|
}
|
|
729
732
|
};
|
|
730
733
|
},
|
|
734
|
+
setCohortIndexFilters: (state, action)=>{
|
|
735
|
+
return {
|
|
736
|
+
cohort: {
|
|
737
|
+
...state.cohort,
|
|
738
|
+
filters: {
|
|
739
|
+
...action.payload.filters
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
},
|
|
731
744
|
// removes a filter to the cohort filter set at the given index
|
|
732
745
|
removeCohortFilter: (state, action)=>{
|
|
733
746
|
const { index, field } = action.payload;
|
|
@@ -769,7 +782,7 @@ const cohortsAdapter = createEntityAdapter<Cohort>({
|
|
|
769
782
|
}
|
|
770
783
|
});
|
|
771
784
|
// Filter actions: addFilter, removeFilter, updateFilter
|
|
772
|
-
const { updateCohortFilter, setCohortFilter, removeCohortFilter, clearCohortFilters } = cohortSlice.actions;
|
|
785
|
+
const { updateCohortFilter, setCohortFilter, setCohortIndexFilters, removeCohortFilter, clearCohortFilters } = cohortSlice.actions;
|
|
773
786
|
const selectCohortFilters = (state)=>state.cohorts.cohort.filters;
|
|
774
787
|
const selectCurrentCohortId = (state)=>state.cohorts.cohort.id;
|
|
775
788
|
const selectCurrentCohort = (state)=>state.cohorts.cohort;
|
|
@@ -2343,7 +2356,7 @@ const coreStore = toolkit.configureStore({
|
|
|
2343
2356
|
query.setupListeners(coreStore.dispatch);
|
|
2344
2357
|
|
|
2345
2358
|
const isNotDefined = (x)=>{
|
|
2346
|
-
return x === undefined || x === null || x ===
|
|
2359
|
+
return x === undefined || x === null || x === undefined;
|
|
2347
2360
|
};
|
|
2348
2361
|
const isObject = (x)=>{
|
|
2349
2362
|
return typeof x === 'object';
|
|
@@ -3400,6 +3413,7 @@ exports.setActiveWorkspace = setActiveWorkspace;
|
|
|
3400
3413
|
exports.setActiveWorkspaceId = setActiveWorkspaceId;
|
|
3401
3414
|
exports.setActiveWorkspaceStatus = setActiveWorkspaceStatus;
|
|
3402
3415
|
exports.setCohortFilter = setCohortFilter;
|
|
3416
|
+
exports.setCohortIndexFilters = setCohortIndexFilters;
|
|
3403
3417
|
exports.setDRSHostnames = setDRSHostnames;
|
|
3404
3418
|
exports.setDataLibraryListSelection = setDataLibraryListSelection;
|
|
3405
3419
|
exports.setRequestedWorkspaceStatus = setRequestedWorkspaceStatus;
|