@gen3/frontend 0.12.30 → 0.12.32
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/LICENSE +201 -0
- package/dist/dts/components/Content/TextContent.js +3 -3
- package/dist/dts/components/Content/TextContent.js.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js +2 -2
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.d.ts +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.js +15 -8
- package/dist/dts/components/Login/LoginProvidersPanel.js.map +1 -1
- package/dist/dts/components/Login/types.d.ts +4 -0
- package/dist/dts/components/Login/types.d.ts.map +1 -1
- package/dist/dts/components/Login/types.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts +2 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js +2 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.d.ts +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.js +12 -6
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts +2 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js +2 -1
- package/dist/dts/features/CohortDiscovery/CohortQueryExpression.js.map +1 -1
- package/dist/dts/features/Discovery/Discovery.d.ts.map +1 -1
- package/dist/dts/features/Discovery/Discovery.js +7 -6
- package/dist/dts/features/Discovery/Discovery.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.d.ts +1 -8
- package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.js +23 -27
- package/dist/dts/features/Discovery/DiscoveryDropdownTagViewer.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts +1 -3
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +22 -23
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryProvider.d.ts +6 -0
- package/dist/dts/features/Discovery/DiscoveryProvider.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryProvider.js +7 -2
- package/dist/dts/features/Discovery/DiscoveryProvider.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable/DiscoveryTable.js +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable/DiscoveryTable.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.d.ts +1 -3
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.js +6 -3
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanel.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.d.ts +7 -0
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.d.ts.map +1 -0
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.js +39 -0
- package/dist/dts/features/Discovery/DiscoveryTable/TableRenderers/RowDetailPanelTags.js.map +1 -0
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.d.ts.map +1 -1
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js +1 -1
- package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js.map +1 -1
- package/dist/index/cjs/{QueryPanel-BwtKHbn1.js → QueryPanel-sz-FVioZ.js} +2 -2
- package/dist/index/cjs/{QueryPanel-BwtKHbn1.js.map → QueryPanel-sz-FVioZ.js.map} +1 -1
- package/dist/index/cjs/{index-BB8seQLc.js → index-Bjn2PM9I.js} +531 -453
- package/dist/index/cjs/index-Bjn2PM9I.js.map +1 -0
- package/dist/index/cjs/index.js +1 -1
- package/dist/index/esm/{QueryPanel-DSqDH3j3.js → QueryPanel-7-YhRPuT.js} +2 -2
- package/dist/index/esm/{QueryPanel-DSqDH3j3.js.map → QueryPanel-7-YhRPuT.js.map} +1 -1
- package/dist/index/esm/{index-Df-CHhZ4.js → index-DxDRynQA.js} +532 -454
- package/dist/index/esm/index-DxDRynQA.js.map +1 -0
- package/dist/index/esm/index.js +1 -1
- package/dist/index.d.ts +64 -52
- package/dist/pages/cjs/{CohortBuilder-BfjTZk0Y.js → CohortBuilder-B-eEUQhE.js} +2 -2
- package/dist/pages/cjs/{CohortBuilder-BfjTZk0Y.js.map → CohortBuilder-B-eEUQhE.js.map} +1 -1
- package/dist/pages/cjs/{index-DOVSswNr.js → index-4CPJ2OlY.js} +323 -246
- package/dist/pages/cjs/index-4CPJ2OlY.js.map +1 -0
- package/dist/pages/cjs/index.js +1 -1
- package/dist/pages/esm/{CohortBuilder-BFRGbSQX.js → CohortBuilder-DAIbe43z.js} +2 -2
- package/dist/pages/esm/{CohortBuilder-BFRGbSQX.js.map → CohortBuilder-DAIbe43z.js.map} +1 -1
- package/dist/pages/esm/{index-DkUVZQPS.js → index-Dy9pEhcC.js} +323 -246
- package/dist/pages/esm/index-Dy9pEhcC.js.map +1 -0
- package/dist/pages/esm/index.js +1 -1
- package/dist/pages.d.ts +3 -0
- package/package.json +3 -3
- package/dist/index/cjs/QueryPanel-D8OUkUib.js +0 -24
- package/dist/index/cjs/QueryPanel-D8OUkUib.js.map +0 -1
- package/dist/index/cjs/index-BB8seQLc.js.map +0 -1
- package/dist/index/cjs/index-DLHpMKGF.js +0 -36786
- package/dist/index/cjs/index-DLHpMKGF.js.map +0 -1
- package/dist/index/esm/QueryPanel-oIjwIvAE.js +0 -22
- package/dist/index/esm/QueryPanel-oIjwIvAE.js.map +0 -1
- package/dist/index/esm/index-BBNceIuo.js +0 -36539
- package/dist/index/esm/index-BBNceIuo.js.map +0 -1
- package/dist/index/esm/index-Df-CHhZ4.js.map +0 -1
- package/dist/pages/cjs/index-DOVSswNr.js.map +0 -1
- package/dist/pages/esm/index-DkUVZQPS.js.map +0 -1
|
@@ -6276,6 +6276,7 @@ const OverflowTooltippedLabel = ({ children, label, className = 'flex-grow font-
|
|
|
6276
6276
|
|
|
6277
6277
|
const QueryExpressionContext = /*#__PURE__*/ React__default.createContext({
|
|
6278
6278
|
displayOnly: false,
|
|
6279
|
+
fieldsAreFlat: true,
|
|
6279
6280
|
cohortId: null,
|
|
6280
6281
|
cohortName: 'default',
|
|
6281
6282
|
shouldShowSummary: ()=>false,
|
|
@@ -6398,7 +6399,7 @@ const isNestedFilter = (x)=>{
|
|
|
6398
6399
|
};
|
|
6399
6400
|
const IncludeExcludeQueryElement = ({ index, field, path, operator, operands, displayOnly = false })=>{
|
|
6400
6401
|
const [queryExpressionsExpanded, setQueryExpressionsExpanded] = useContext(QueryExpressionsExpandedContext);
|
|
6401
|
-
const { cohortId: currentCohortId, useRemoveFilter, useUpdateFilters, shouldShowSummary } = useContext(QueryExpressionContext);
|
|
6402
|
+
const { cohortId: currentCohortId, useRemoveFilter, useUpdateFilters, shouldShowSummary, fieldsAreFlat } = useContext(QueryExpressionContext);
|
|
6402
6403
|
const removeCohortFilter = useRemoveFilter();
|
|
6403
6404
|
const updateCohortFilter = useUpdateFilters();
|
|
6404
6405
|
useDeepCompareEffect(()=>{
|
|
@@ -6509,7 +6510,11 @@ const IncludeExcludeQueryElement = ({ index, field, path, operator, operands, di
|
|
|
6509
6510
|
});
|
|
6510
6511
|
removeCohortFilter(index, fieldToUpdate);
|
|
6511
6512
|
} else {
|
|
6512
|
-
updateCohortFilter(index, fieldToUpdate,
|
|
6513
|
+
updateCohortFilter(index, fieldToUpdate, fieldsAreFlat ? {
|
|
6514
|
+
operator: operator,
|
|
6515
|
+
field: field,
|
|
6516
|
+
operands: newOperands
|
|
6517
|
+
} : buildNestedFilterForOperation(fieldToUpdate, {
|
|
6513
6518
|
operator: operator,
|
|
6514
6519
|
field: field,
|
|
6515
6520
|
operands: newOperands
|
|
@@ -7082,7 +7087,7 @@ const reducer = (state, action)=>{
|
|
|
7082
7087
|
}
|
|
7083
7088
|
}
|
|
7084
7089
|
};
|
|
7085
|
-
const QueryExpressionSection = ({ index, showImportExport = false, displayOnly = false, showTitle = true })=>{
|
|
7090
|
+
const QueryExpressionSection = ({ index, showImportExport = false, displayOnly = false, showTitle = true, fieldsAreFlat = true })=>{
|
|
7086
7091
|
const [expandedState, setExpandedState] = useReducer(reducer, {});
|
|
7087
7092
|
const [filtersSectionCollapsed, setFiltersSectionCollapsed] = useState(true);
|
|
7088
7093
|
const filtersRef = useRef(null);
|
|
@@ -7855,19 +7860,24 @@ class DiscoveryCellRendererFactory {
|
|
|
7855
7860
|
};
|
|
7856
7861
|
|
|
7857
7862
|
const DiscoveryContext = /*#__PURE__*/ createContext({
|
|
7858
|
-
discoveryConfig: {}
|
|
7863
|
+
discoveryConfig: {},
|
|
7864
|
+
selectedTags: {},
|
|
7865
|
+
setSelectedTags: ()=>{}
|
|
7859
7866
|
});
|
|
7860
7867
|
const useDiscoveryContext = ()=>{
|
|
7861
7868
|
const context = React__default.useContext(DiscoveryContext);
|
|
7862
7869
|
if (context === undefined) {
|
|
7863
|
-
throw Error('Discovery must be used
|
|
7870
|
+
throw new Error('Discovery must be used inside of a DiscoveryContext');
|
|
7864
7871
|
}
|
|
7865
7872
|
return context;
|
|
7866
7873
|
};
|
|
7867
7874
|
const DiscoveryProvider = ({ children, discoveryIndexConfig })=>{
|
|
7875
|
+
const [selectedTags, setSelectedTags] = useState({});
|
|
7868
7876
|
return /*#__PURE__*/ jsx(DiscoveryContext.Provider, {
|
|
7869
7877
|
value: {
|
|
7870
|
-
discoveryConfig: discoveryIndexConfig
|
|
7878
|
+
discoveryConfig: discoveryIndexConfig,
|
|
7879
|
+
selectedTags,
|
|
7880
|
+
setSelectedTags
|
|
7871
7881
|
},
|
|
7872
7882
|
children: children
|
|
7873
7883
|
});
|
|
@@ -8714,17 +8724,71 @@ const HighlightSearchTerm = (value, searchTerm)=>{
|
|
|
8714
8724
|
});
|
|
8715
8725
|
};
|
|
8716
8726
|
|
|
8717
|
-
const
|
|
8727
|
+
const RowDetailPanelTags = ({ rowTags })=>{
|
|
8728
|
+
const { discoveryConfig: config, selectedTags, setSelectedTags } = useDiscoveryContext();
|
|
8729
|
+
return /*#__PURE__*/ jsx("div", {
|
|
8730
|
+
className: "flex mt-2",
|
|
8731
|
+
children: rowTags.map((tag)=>{
|
|
8732
|
+
const { color, display, label } = getTagInfo(tag, config.tags);
|
|
8733
|
+
if (!display) return null;
|
|
8734
|
+
const active = Object.keys(selectedTags).includes(tag.name);
|
|
8735
|
+
const handleChange = (e)=>{
|
|
8736
|
+
e.stopPropagation();
|
|
8737
|
+
if (active) {
|
|
8738
|
+
// If already active, remove the tag
|
|
8739
|
+
setSelectedTags((prevTags)=>{
|
|
8740
|
+
const { [tag.name]: _, ...newTags } = prevTags;
|
|
8741
|
+
return newTags;
|
|
8742
|
+
});
|
|
8743
|
+
} else {
|
|
8744
|
+
// Otherwise add the tag
|
|
8745
|
+
setSelectedTags((prevObj)=>({
|
|
8746
|
+
...prevObj,
|
|
8747
|
+
[tag.name]: true
|
|
8748
|
+
}));
|
|
8749
|
+
}
|
|
8750
|
+
};
|
|
8751
|
+
return /*#__PURE__*/ jsx(Badge, {
|
|
8752
|
+
className: "mr-2 mt-2 cursor-pointer",
|
|
8753
|
+
onClick: (e)=>{
|
|
8754
|
+
handleChange(e);
|
|
8755
|
+
},
|
|
8756
|
+
role: "button",
|
|
8757
|
+
size: "lg",
|
|
8758
|
+
radius: "sm",
|
|
8759
|
+
variant: "filled",
|
|
8760
|
+
tabIndex: 0,
|
|
8761
|
+
"aria-label": tag.name,
|
|
8762
|
+
style: {
|
|
8763
|
+
backgroundColor: active ? color : 'transparent',
|
|
8764
|
+
borderColor: color,
|
|
8765
|
+
color: active ? '#fff' : 'inherit'
|
|
8766
|
+
},
|
|
8767
|
+
children: label
|
|
8768
|
+
}, tag.name);
|
|
8769
|
+
})
|
|
8770
|
+
});
|
|
8771
|
+
};
|
|
8772
|
+
|
|
8773
|
+
const RowDetailPanel = ({ row, searchTerm })=>{
|
|
8774
|
+
const { discoveryConfig: config } = useDiscoveryContext();
|
|
8718
8775
|
if (config.studyPreviewField) {
|
|
8719
8776
|
const studyPreviewData = _.get(row.original, config.studyPreviewField.field);
|
|
8720
|
-
return /*#__PURE__*/
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8777
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
8778
|
+
children: [
|
|
8779
|
+
/*#__PURE__*/ jsx(Box, {
|
|
8780
|
+
display: 'flex',
|
|
8781
|
+
w: '100%',
|
|
8782
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
8783
|
+
size: "xs",
|
|
8784
|
+
lineClamp: 2,
|
|
8785
|
+
children: HighlightSearchTerm(studyPreviewData, searchTerm)
|
|
8786
|
+
})
|
|
8787
|
+
}),
|
|
8788
|
+
/*#__PURE__*/ jsx(RowDetailPanelTags, {
|
|
8789
|
+
rowTags: row.original.tags
|
|
8790
|
+
})
|
|
8791
|
+
]
|
|
8728
8792
|
});
|
|
8729
8793
|
} else {
|
|
8730
8794
|
return undefined;
|
|
@@ -8821,7 +8885,6 @@ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPaginati
|
|
|
8821
8885
|
getRowId: (originalRow)=>config?.minimalFieldMapping?.uid && config.minimalFieldMapping.uid in originalRow ? originalRow[config.minimalFieldMapping.uid] : originalRow?.id ?? undefined,
|
|
8822
8886
|
renderDetailPanel: ({ row })=>/*#__PURE__*/ jsx(RowDetailPanel, {
|
|
8823
8887
|
row: row,
|
|
8824
|
-
config: config,
|
|
8825
8888
|
searchTerm: searchTerm
|
|
8826
8889
|
}),
|
|
8827
8890
|
onRowSelectionChange: setRowSelection,
|
|
@@ -12087,47 +12150,44 @@ const renderMultiSelectOption = ({ option }, highlightColor, containerSelections
|
|
|
12087
12150
|
})
|
|
12088
12151
|
});
|
|
12089
12152
|
};
|
|
12090
|
-
const MultiSelectContainer = ({ category
|
|
12153
|
+
const MultiSelectContainer = ({ category })=>{
|
|
12154
|
+
const { discoveryConfig: discoveryConfig, selectedTags, setSelectedTags } = useDiscoveryContext();
|
|
12091
12155
|
const containerData = category.tags.map((tag)=>({
|
|
12092
12156
|
value: tag,
|
|
12093
12157
|
label: tag
|
|
12094
12158
|
}));
|
|
12095
12159
|
const [containerSelections, setContainerSelections] = useState([]);
|
|
12160
|
+
const prevSelectionsRef = useRef([]);
|
|
12096
12161
|
useEffect(()=>{
|
|
12097
12162
|
const updatedSelections = Object.keys(selectedTags).filter((tag)=>selectedTags[tag]);
|
|
12098
12163
|
const selectedItemsThatExistInContainer = updatedSelections.filter((item)=>category.tags.includes(item));
|
|
12099
12164
|
setContainerSelections(selectedItemsThatExistInContainer);
|
|
12165
|
+
prevSelectionsRef.current = selectedItemsThatExistInContainer;
|
|
12100
12166
|
}, [
|
|
12101
12167
|
selectedTags
|
|
12102
12168
|
]);
|
|
12103
|
-
const
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
const
|
|
12109
|
-
...
|
|
12169
|
+
const handleChange = (value)=>{
|
|
12170
|
+
const previousValues = prevSelectionsRef.current;
|
|
12171
|
+
const removedTags = previousValues.filter((tag)=>!value.includes(tag));
|
|
12172
|
+
const addedTags = value.filter((tag)=>!previousValues.includes(tag));
|
|
12173
|
+
setSelectedTags((prev)=>{
|
|
12174
|
+
const updated = {
|
|
12175
|
+
...prev
|
|
12110
12176
|
};
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
// Need to add tags
|
|
12117
|
-
_.forEach(value, (tag)=>{
|
|
12118
|
-
if (!updatedTags[tag]) {
|
|
12119
|
-
updatedTags[tag] = true;
|
|
12120
|
-
}
|
|
12121
|
-
});
|
|
12122
|
-
}
|
|
12123
|
-
return updatedTags; // Update state with the new tags
|
|
12177
|
+
removedTags.forEach((tag)=>delete updated[tag]);
|
|
12178
|
+
addedTags.forEach((tag)=>{
|
|
12179
|
+
updated[tag] = true;
|
|
12180
|
+
});
|
|
12181
|
+
return updated;
|
|
12124
12182
|
});
|
|
12183
|
+
setContainerSelections(value);
|
|
12184
|
+
prevSelectionsRef.current = value;
|
|
12125
12185
|
};
|
|
12126
12186
|
return /*#__PURE__*/ jsx("div", {
|
|
12127
12187
|
children: /*#__PURE__*/ jsx(MultiSelect, {
|
|
12128
12188
|
placeholder: category.categoryDisplayName,
|
|
12129
12189
|
value: containerSelections,
|
|
12130
|
-
onChange: (value)=>handleChange(
|
|
12190
|
+
onChange: (value)=>handleChange(value),
|
|
12131
12191
|
clearable: true,
|
|
12132
12192
|
searchable: true,
|
|
12133
12193
|
data: containerData,
|
|
@@ -12141,20 +12201,16 @@ const MultiSelectContainer = ({ category, selectedTags, setSelectedTags })=>{
|
|
|
12141
12201
|
})
|
|
12142
12202
|
}, category.categoryDisplayName?.toString());
|
|
12143
12203
|
};
|
|
12144
|
-
const DiscoveryDropdownTagViewer = ({ tagCategoryData
|
|
12204
|
+
const DiscoveryDropdownTagViewer = ({ tagCategoryData })=>{
|
|
12145
12205
|
if (!tagCategoryData || tagCategoryData?.length === 0) return null;
|
|
12146
12206
|
return /*#__PURE__*/ jsx("div", {
|
|
12147
|
-
|
|
12148
|
-
className: `grid sm:grid-cols-1
|
|
12207
|
+
className: `grid sm:grid-cols-1
|
|
12149
12208
|
${tagCategoryData.length > 1 && ' md:grid-cols-2 gap-4'}`,
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
})
|
|
12156
|
-
}, i))
|
|
12157
|
-
})
|
|
12209
|
+
children: tagCategoryData.map((category, i)=>/*#__PURE__*/ jsx("div", {
|
|
12210
|
+
children: /*#__PURE__*/ jsx(MultiSelectContainer, {
|
|
12211
|
+
category: category
|
|
12212
|
+
})
|
|
12213
|
+
}, i))
|
|
12158
12214
|
});
|
|
12159
12215
|
};
|
|
12160
12216
|
|
|
@@ -12170,7 +12226,8 @@ const DiscoveryDropdownTagViewer = ({ tagCategoryData, selectedTags, setSelected
|
|
|
12170
12226
|
* @param {JSX.Element} props.indexSelector - React component for selecting an index in the discovery panel.
|
|
12171
12227
|
*
|
|
12172
12228
|
* @return {JSX.Element} A fully featured discovery interface including search functionality, a table, charts, filters, and more.
|
|
12173
|
-
*/ const DiscoveryIndexPanel = ({
|
|
12229
|
+
*/ const DiscoveryIndexPanel = ({ indexSelector })=>{
|
|
12230
|
+
const { discoveryConfig: discoveryConfig, selectedTags, setSelectedTags } = useDiscoveryContext();
|
|
12174
12231
|
const dataHook = useMemo(()=>getDiscoveryDataLoader(discoveryConfig?.features?.dataLoader?.dataFetchFunction) ?? useLoadAllMDSData, [
|
|
12175
12232
|
discoveryConfig?.features?.dataLoader?.dataFetchFunction
|
|
12176
12233
|
]);
|
|
@@ -12183,7 +12240,6 @@ const DiscoveryDropdownTagViewer = ({ tagCategoryData, selectedTags, setSelected
|
|
|
12183
12240
|
const [debouncedSearchBarTerms] = useDebouncedValue(searchBarTerms, DEBOUNCE_DELAY_TIME);
|
|
12184
12241
|
const [selections, setSelections] = useState([]); // table selections
|
|
12185
12242
|
const [sorting, setSorting] = useState([]);
|
|
12186
|
-
const [selectedTags, setSelectedTags] = useState({});
|
|
12187
12243
|
const [advancedSearchTerms, setAdvancedSearchTerms] = useState({
|
|
12188
12244
|
operation: SearchCombination.and,
|
|
12189
12245
|
filters: {}
|
|
@@ -12231,153 +12287,148 @@ const DiscoveryDropdownTagViewer = ({ tagCategoryData, selectedTags, setSelected
|
|
|
12231
12287
|
const enableSearchableTags = discoveryConfig?.features?.search?.tagSearchDropdown?.enabled;
|
|
12232
12288
|
return /*#__PURE__*/ jsx("div", {
|
|
12233
12289
|
className: "flex flex-col items-center p-4 w-full bg-base-lightest",
|
|
12234
|
-
children: /*#__PURE__*/ jsx(
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
children:
|
|
12238
|
-
|
|
12239
|
-
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
clearSearch: ()=>{
|
|
12271
|
-
setSearchBarTerms([]);
|
|
12272
|
-
},
|
|
12273
|
-
searchChanged: (v)=>setSearchBarTerms(v.split(' ')),
|
|
12274
|
-
placeholder: discoveryConfig?.features?.search?.searchBar?.placeholder ?? 'Search...',
|
|
12275
|
-
label: discoveryConfig?.features?.search?.searchBar?.inputSubtitle
|
|
12276
|
-
})
|
|
12277
|
-
}),
|
|
12278
|
-
enableSearchableTags && /*#__PURE__*/ jsxs(Grid.Col, {
|
|
12279
|
-
span: {
|
|
12280
|
-
sm: 12,
|
|
12281
|
-
md: 5
|
|
12290
|
+
children: /*#__PURE__*/ jsx(StudyProvider, {
|
|
12291
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
12292
|
+
className: "w-full",
|
|
12293
|
+
children: [
|
|
12294
|
+
discoveryConfig.features?.pageTitle && discoveryConfig?.features?.pageTitle.enabled ? /*#__PURE__*/ jsx(Text, {
|
|
12295
|
+
size: "xl",
|
|
12296
|
+
children: discoveryConfig?.features?.pageTitle.text
|
|
12297
|
+
}) : null,
|
|
12298
|
+
discoveryConfig.features?.chartsSection?.enabled && /*#__PURE__*/ jsx(CollapsableCharts, {
|
|
12299
|
+
config: discoveryConfig.features?.chartsSection,
|
|
12300
|
+
data: chartData,
|
|
12301
|
+
isSuccess: dataRequestStatus.isSuccess
|
|
12302
|
+
}),
|
|
12303
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12304
|
+
className: "flex items-center p-2 mb-4 bg-base-max rounded-lg",
|
|
12305
|
+
children: [
|
|
12306
|
+
indexSelector,
|
|
12307
|
+
/*#__PURE__*/ jsx(SummaryStatisticPanel, {
|
|
12308
|
+
summaries: summaryStatistics
|
|
12309
|
+
}),
|
|
12310
|
+
enableSearchBar && /*#__PURE__*/ jsxs("div", {
|
|
12311
|
+
className: "w-3/4 flex flex-col",
|
|
12312
|
+
children: [
|
|
12313
|
+
/*#__PURE__*/ jsxs(Grid, {
|
|
12314
|
+
children: [
|
|
12315
|
+
/*#__PURE__*/ jsx(Grid.Col, {
|
|
12316
|
+
span: {
|
|
12317
|
+
md: enableSearchableTags ? 7 : 10,
|
|
12318
|
+
sm: 12
|
|
12319
|
+
},
|
|
12320
|
+
children: /*#__PURE__*/ jsx(SearchInputWithSuggestions, {
|
|
12321
|
+
searchBarTerms: searchBarTerms,
|
|
12322
|
+
setSearchBarTerms: setSearchBarTerms,
|
|
12323
|
+
suggestions: suggestions,
|
|
12324
|
+
clearSearch: ()=>{
|
|
12325
|
+
setSearchBarTerms([]);
|
|
12282
12326
|
},
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
onClick: ()=>setSelectedTags({}),
|
|
12287
|
-
variant: "outline",
|
|
12288
|
-
leftSection: /*#__PURE__*/ jsx(IoIosRefresh, {}),
|
|
12289
|
-
className: Object.keys(selectedTags).length === 0 ? 'border-gray-400 mr-1 mt-1' : 'mr-1 mt-1',
|
|
12290
|
-
"data-disabled": Object.keys(selectedTags).length === 0,
|
|
12291
|
-
children: "Reset"
|
|
12292
|
-
}),
|
|
12293
|
-
/*#__PURE__*/ jsx(Button, {
|
|
12294
|
-
className: "mt-1",
|
|
12295
|
-
onClick: ()=>setIsDropdownTagViewerOpen((prev)=>!prev),
|
|
12296
|
-
disabled: data.length === 0,
|
|
12297
|
-
variant: "outline",
|
|
12298
|
-
leftSection: isDropdownTagViewerOpen ? /*#__PURE__*/ jsx(IoIosArrowUp, {}) : /*#__PURE__*/ jsx(IoIosArrowDown, {}),
|
|
12299
|
-
children: `${discoveryConfig?.features?.search?.tagSearchDropdown?.collapsibleButtonText || 'Tag Panel'}`
|
|
12300
|
-
})
|
|
12301
|
-
]
|
|
12327
|
+
searchChanged: (v)=>setSearchBarTerms(v.split(' ')),
|
|
12328
|
+
placeholder: discoveryConfig?.features?.search?.searchBar?.placeholder ?? 'Search...',
|
|
12329
|
+
label: discoveryConfig?.features?.search?.searchBar?.inputSubtitle
|
|
12302
12330
|
})
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12331
|
+
}),
|
|
12332
|
+
enableSearchableTags && /*#__PURE__*/ jsxs(Grid.Col, {
|
|
12333
|
+
span: {
|
|
12334
|
+
sm: 12,
|
|
12335
|
+
md: 5
|
|
12336
|
+
},
|
|
12337
|
+
className: "md:mt-5 sm:mt-1",
|
|
12338
|
+
children: [
|
|
12339
|
+
/*#__PURE__*/ jsx(Button, {
|
|
12340
|
+
onClick: ()=>setSelectedTags({}),
|
|
12341
|
+
variant: "outline",
|
|
12342
|
+
leftSection: /*#__PURE__*/ jsx(IoIosRefresh, {}),
|
|
12343
|
+
className: Object.keys(selectedTags).length === 0 ? 'border-gray-400 mr-1 mt-1' : 'mr-1 mt-1',
|
|
12344
|
+
"data-disabled": Object.keys(selectedTags).length === 0,
|
|
12345
|
+
children: "Reset"
|
|
12346
|
+
}),
|
|
12347
|
+
/*#__PURE__*/ jsx(Button, {
|
|
12348
|
+
className: "mt-1",
|
|
12349
|
+
onClick: ()=>setIsDropdownTagViewerOpen((prev)=>!prev),
|
|
12350
|
+
disabled: data.length === 0,
|
|
12351
|
+
variant: "outline",
|
|
12352
|
+
leftSection: isDropdownTagViewerOpen ? /*#__PURE__*/ jsx(IoIosArrowUp, {}) : /*#__PURE__*/ jsx(IoIosArrowDown, {}),
|
|
12353
|
+
children: `${discoveryConfig?.features?.search?.tagSearchDropdown?.collapsibleButtonText || 'Tag Panel'}`
|
|
12354
|
+
})
|
|
12355
|
+
]
|
|
12322
12356
|
})
|
|
12357
|
+
]
|
|
12358
|
+
}),
|
|
12359
|
+
/*#__PURE__*/ jsx(SearchInputSelectableFields, {
|
|
12360
|
+
searchMode: searchMode,
|
|
12361
|
+
setSearchMode: setSearchMode,
|
|
12362
|
+
searchableTextFields: discoveryConfig?.features?.search?.searchBar?.searchableTextFields,
|
|
12363
|
+
searchableAndSelectableTextFields: discoveryConfig?.features?.search?.searchBar?.searchableAndSelectableTextFields,
|
|
12364
|
+
setSelectedFieldsForSearchIndexing: setSelectedFieldsForSearchIndexing
|
|
12365
|
+
}),
|
|
12366
|
+
/*#__PURE__*/ jsx("div", {
|
|
12367
|
+
ref: tagViewerContentRef,
|
|
12368
|
+
className: `transition-all duration-300 ease-in-out mt-2 ${isDropdownTagViewerOpen ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0'} overflow-hidden`,
|
|
12369
|
+
style: {
|
|
12370
|
+
height: isDropdownTagViewerOpen && tagViewerContentRef.current ? `${tagViewerContentRef.current.scrollHeight}px` : '0px'
|
|
12371
|
+
},
|
|
12372
|
+
children: /*#__PURE__*/ jsx(DiscoveryDropdownTagViewer, {
|
|
12373
|
+
tagCategoryData: tagCategoryData
|
|
12323
12374
|
})
|
|
12324
|
-
]
|
|
12325
|
-
})
|
|
12326
|
-
]
|
|
12327
|
-
}),
|
|
12328
|
-
discoveryConfig?.features?.aiSearch && /*#__PURE__*/ jsx("div", {
|
|
12329
|
-
className: "mb-4",
|
|
12330
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
12331
|
-
className: "flex w-full bg-base-max p-4 rounded-lg",
|
|
12332
|
-
children: /*#__PURE__*/ jsx(AiSearch, {})
|
|
12333
|
-
})
|
|
12334
|
-
}),
|
|
12335
|
-
/*#__PURE__*/ jsxs("div", {
|
|
12336
|
-
className: "flex flex-row",
|
|
12337
|
-
children: [
|
|
12338
|
-
discoveryConfig?.features?.advSearchFilters?.enabled ? /*#__PURE__*/ jsx(Button, {
|
|
12339
|
-
onClick: toggleAdvancedSearch,
|
|
12340
|
-
color: "accent",
|
|
12341
|
-
children: "Filters"
|
|
12342
|
-
}) : false,
|
|
12343
|
-
discoveryConfig?.features?.exportFromDiscovery?.enabled ? /*#__PURE__*/ jsx(ActionBar, {
|
|
12344
|
-
buttons: discoveryConfig.features.exportFromDiscovery.buttons,
|
|
12345
|
-
exportDataFields: discoveryConfig.features.exportFromDiscovery.exportDataFields,
|
|
12346
|
-
selectedResources: selectedRecords,
|
|
12347
|
-
verifyExternalLogins: discoveryConfig.features.exportFromDiscovery.verifyExternalLogins,
|
|
12348
|
-
dataLibraryStoreMode: discoveryConfig.features.exportFromDiscovery.dataLibraryStoreMode
|
|
12349
|
-
}) : null
|
|
12350
|
-
]
|
|
12351
|
-
}),
|
|
12352
|
-
/*#__PURE__*/ jsxs("div", {
|
|
12353
|
-
className: "flex justify-start",
|
|
12354
|
-
children: [
|
|
12355
|
-
discoveryConfig?.features?.advSearchFilters?.enabled ? /*#__PURE__*/ jsx(AdvancedSearchPanel, {
|
|
12356
|
-
advSearchFilters: advancedSearchFilterValues,
|
|
12357
|
-
opened: showAdvancedSearch,
|
|
12358
|
-
setAdvancedSearchFilters: setAdvancedSearchTerms
|
|
12359
|
-
}) : false,
|
|
12360
|
-
/*#__PURE__*/ jsx("div", {
|
|
12361
|
-
className: "flex w-full grow-0 bg-base-max border-1 border-base-lighter p-4 rounded-md",
|
|
12362
|
-
ref: parentDivRef,
|
|
12363
|
-
children: /*#__PURE__*/ jsx(DiscoveryTable, {
|
|
12364
|
-
data: data,
|
|
12365
|
-
hits: hits,
|
|
12366
|
-
dataRequestStatus: dataRequestStatus,
|
|
12367
|
-
setPagination: setPagination,
|
|
12368
|
-
setSorting: setSorting,
|
|
12369
|
-
setSelection: setSelections,
|
|
12370
|
-
pagination: pagination,
|
|
12371
|
-
sorting: sorting,
|
|
12372
|
-
searchTerm: debouncedSearchBarTerms.join(' '),
|
|
12373
|
-
selectedFieldsForSearchIndexing: selectedFieldsForSearchIndexing,
|
|
12374
|
-
discoveryConfig: discoveryConfig
|
|
12375
12375
|
})
|
|
12376
|
-
|
|
12377
|
-
|
|
12376
|
+
]
|
|
12377
|
+
})
|
|
12378
|
+
]
|
|
12379
|
+
}),
|
|
12380
|
+
discoveryConfig?.features?.aiSearch && /*#__PURE__*/ jsx("div", {
|
|
12381
|
+
className: "mb-4",
|
|
12382
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
12383
|
+
className: "flex w-full bg-base-max p-4 rounded-lg",
|
|
12384
|
+
children: /*#__PURE__*/ jsx(AiSearch, {})
|
|
12378
12385
|
})
|
|
12379
|
-
|
|
12380
|
-
|
|
12386
|
+
}),
|
|
12387
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12388
|
+
className: "flex flex-row",
|
|
12389
|
+
children: [
|
|
12390
|
+
discoveryConfig?.features?.advSearchFilters?.enabled ? /*#__PURE__*/ jsx(Button, {
|
|
12391
|
+
onClick: toggleAdvancedSearch,
|
|
12392
|
+
color: "accent",
|
|
12393
|
+
children: "Filters"
|
|
12394
|
+
}) : false,
|
|
12395
|
+
discoveryConfig?.features?.exportFromDiscovery?.enabled ? /*#__PURE__*/ jsx(ActionBar, {
|
|
12396
|
+
buttons: discoveryConfig.features.exportFromDiscovery.buttons,
|
|
12397
|
+
exportDataFields: discoveryConfig.features.exportFromDiscovery.exportDataFields,
|
|
12398
|
+
selectedResources: selectedRecords,
|
|
12399
|
+
verifyExternalLogins: discoveryConfig.features.exportFromDiscovery.verifyExternalLogins,
|
|
12400
|
+
dataLibraryStoreMode: discoveryConfig.features.exportFromDiscovery.dataLibraryStoreMode
|
|
12401
|
+
}) : null
|
|
12402
|
+
]
|
|
12403
|
+
}),
|
|
12404
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12405
|
+
className: "flex justify-start",
|
|
12406
|
+
children: [
|
|
12407
|
+
discoveryConfig?.features?.advSearchFilters?.enabled ? /*#__PURE__*/ jsx(AdvancedSearchPanel, {
|
|
12408
|
+
advSearchFilters: advancedSearchFilterValues,
|
|
12409
|
+
opened: showAdvancedSearch,
|
|
12410
|
+
setAdvancedSearchFilters: setAdvancedSearchTerms
|
|
12411
|
+
}) : false,
|
|
12412
|
+
/*#__PURE__*/ jsx("div", {
|
|
12413
|
+
className: "flex w-full grow-0 bg-base-max border-1 border-base-lighter p-4 rounded-md",
|
|
12414
|
+
ref: parentDivRef,
|
|
12415
|
+
children: /*#__PURE__*/ jsx(DiscoveryTable, {
|
|
12416
|
+
data: data,
|
|
12417
|
+
hits: hits,
|
|
12418
|
+
dataRequestStatus: dataRequestStatus,
|
|
12419
|
+
setPagination: setPagination,
|
|
12420
|
+
setSorting: setSorting,
|
|
12421
|
+
setSelection: setSelections,
|
|
12422
|
+
pagination: pagination,
|
|
12423
|
+
sorting: sorting,
|
|
12424
|
+
searchTerm: debouncedSearchBarTerms.join(' '),
|
|
12425
|
+
selectedFieldsForSearchIndexing: selectedFieldsForSearchIndexing,
|
|
12426
|
+
discoveryConfig: discoveryConfig
|
|
12427
|
+
})
|
|
12428
|
+
})
|
|
12429
|
+
]
|
|
12430
|
+
})
|
|
12431
|
+
]
|
|
12381
12432
|
})
|
|
12382
12433
|
})
|
|
12383
12434
|
});
|
|
@@ -12423,42 +12474,46 @@ const Discovery = ({ discoveryConfig })=>{
|
|
|
12423
12474
|
}
|
|
12424
12475
|
if (menuItems.length === 1) {
|
|
12425
12476
|
// no need for tabs
|
|
12426
|
-
return /*#__PURE__*/ jsx(
|
|
12427
|
-
|
|
12428
|
-
|
|
12477
|
+
return /*#__PURE__*/ jsx(DiscoveryProvider, {
|
|
12478
|
+
discoveryIndexConfig: discoveryConfig.metadataConfig[0],
|
|
12479
|
+
children: /*#__PURE__*/ jsx(DiscoveryIndexPanel, {
|
|
12480
|
+
indexSelector: null
|
|
12481
|
+
})
|
|
12429
12482
|
});
|
|
12430
12483
|
}
|
|
12431
|
-
return /*#__PURE__*/ jsx(
|
|
12432
|
-
|
|
12433
|
-
children: /*#__PURE__*/
|
|
12434
|
-
className: "w-full",
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12484
|
+
return /*#__PURE__*/ jsx(DiscoveryProvider, {
|
|
12485
|
+
discoveryIndexConfig: discoveryConfig.metadataConfig[0],
|
|
12486
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
12487
|
+
className: "flex flex-col items-center p-4 w-full bg-base-lightest",
|
|
12488
|
+
children: /*#__PURE__*/ jsxs(Tabs, {
|
|
12489
|
+
className: "w-full",
|
|
12490
|
+
defaultValue: metadataIndex,
|
|
12491
|
+
variant: discoveryConfig.metadataConfig[0]?.tabType,
|
|
12492
|
+
onChange: (v)=>{
|
|
12493
|
+
setMetadataIndex(v ?? '0');
|
|
12494
|
+
},
|
|
12495
|
+
children: [
|
|
12496
|
+
/*#__PURE__*/ jsx(Tabs.List, {
|
|
12497
|
+
children: menuItems.map((item)=>/*#__PURE__*/ jsx(Tabs.Tab, {
|
|
12498
|
+
value: item.value,
|
|
12499
|
+
children: item.label
|
|
12500
|
+
}, item.value))
|
|
12501
|
+
}),
|
|
12502
|
+
menuItems.map((item, i)=>/*#__PURE__*/ jsx(Tabs.Panel, {
|
|
12443
12503
|
value: item.value,
|
|
12444
|
-
children:
|
|
12504
|
+
children: /*#__PURE__*/ jsx(DiscoveryIndexPanel, {
|
|
12505
|
+
indexSelector: menuItems.length < 0 ? /*#__PURE__*/ jsx(Select, {
|
|
12506
|
+
label: "Metadata:",
|
|
12507
|
+
data: menuItems,
|
|
12508
|
+
value: metadataIndex,
|
|
12509
|
+
onChange: (v)=>{
|
|
12510
|
+
setMetadataIndex(v ?? '0');
|
|
12511
|
+
}
|
|
12512
|
+
}) : null
|
|
12513
|
+
})
|
|
12445
12514
|
}, item.value))
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
value: item.value,
|
|
12449
|
-
children: /*#__PURE__*/ jsx(DiscoveryIndexPanel, {
|
|
12450
|
-
discoveryConfig: discoveryConfig.metadataConfig[Number.parseInt(item.value)],
|
|
12451
|
-
indexSelector: menuItems.length < 0 ? /*#__PURE__*/ jsx(Select, {
|
|
12452
|
-
label: "Metadata:",
|
|
12453
|
-
data: menuItems,
|
|
12454
|
-
value: metadataIndex,
|
|
12455
|
-
onChange: (v)=>{
|
|
12456
|
-
setMetadataIndex(v ?? '0');
|
|
12457
|
-
}
|
|
12458
|
-
}) : null
|
|
12459
|
-
})
|
|
12460
|
-
}, item.value))
|
|
12461
|
-
]
|
|
12515
|
+
]
|
|
12516
|
+
})
|
|
12462
12517
|
})
|
|
12463
12518
|
});
|
|
12464
12519
|
};
|
|
@@ -17409,7 +17464,7 @@ const SUMMARY_THRESHOLD = 10;
|
|
|
17409
17464
|
*/ const DefaultShouldShowSummary = (field, count)=>{
|
|
17410
17465
|
return count > SUMMARY_THRESHOLD;
|
|
17411
17466
|
};
|
|
17412
|
-
const QueryExpression = ({ index, shouldShowSummary = DefaultShouldShowSummary, hooks })=>{
|
|
17467
|
+
const QueryExpression = ({ index, shouldShowSummary = DefaultShouldShowSummary, hooks, fieldsAreFlat = true })=>{
|
|
17413
17468
|
const currentCohortId = useCoreSelector((state)=>selectCurrentCohortId(state));
|
|
17414
17469
|
const currentCohortName = useCoreSelector((state)=>selectCurrentCohortName(state));
|
|
17415
17470
|
return /*#__PURE__*/ jsx(QueryExpressionContext.Provider, {
|
|
@@ -17417,6 +17472,7 @@ const QueryExpression = ({ index, shouldShowSummary = DefaultShouldShowSummary,
|
|
|
17417
17472
|
cohortName: currentCohortName,
|
|
17418
17473
|
cohortId: currentCohortId,
|
|
17419
17474
|
displayOnly: false,
|
|
17475
|
+
fieldsAreFlat: fieldsAreFlat,
|
|
17420
17476
|
shouldShowSummary: shouldShowSummary,
|
|
17421
17477
|
useClearCohortFilters: ()=>{
|
|
17422
17478
|
const dispatch = useCoreDispatch();
|
|
@@ -17619,7 +17675,7 @@ const getActiveTab = (router)=>{
|
|
|
17619
17675
|
else if (typeof activeTab === 'object') return activeTab[0];
|
|
17620
17676
|
return undefined;
|
|
17621
17677
|
};
|
|
17622
|
-
const CohortBuilder = dynamic(()=>import('./CohortBuilder-
|
|
17678
|
+
const CohortBuilder = dynamic(()=>import('./CohortBuilder-DAIbe43z.js'), {
|
|
17623
17679
|
ssr: false
|
|
17624
17680
|
});
|
|
17625
17681
|
const ExplorerPage = ({ headerProps, footerProps, explorerConfig, headerMetadata, tabsLayout, sharedFiltersMap })=>{
|
|
@@ -18006,7 +18062,8 @@ function hashCode(str) {
|
|
|
18006
18062
|
case "markdown":
|
|
18007
18063
|
{
|
|
18008
18064
|
return /*#__PURE__*/ jsx(MarkdownContent, {
|
|
18009
|
-
content: text
|
|
18065
|
+
content: text,
|
|
18066
|
+
className: className
|
|
18010
18067
|
});
|
|
18011
18068
|
}
|
|
18012
18069
|
case "textWithEmail":
|
|
@@ -18282,11 +18339,19 @@ const TexturedSidePanel = ({ url })=>{
|
|
|
18282
18339
|
});
|
|
18283
18340
|
};
|
|
18284
18341
|
|
|
18285
|
-
const
|
|
18342
|
+
const logninExtraText = (extra)=>{
|
|
18343
|
+
return extra?.map((content, index)=>/*#__PURE__*/ createElement(TextContent, {
|
|
18344
|
+
...content,
|
|
18345
|
+
key: index
|
|
18346
|
+
}));
|
|
18347
|
+
};
|
|
18348
|
+
const LoginProviderMultipleItems = ({ provider, handleLoginSelected, loginProviderExtra })=>{
|
|
18286
18349
|
const [value, setValue] = useState(null);
|
|
18350
|
+
const extra = loginProviderExtra && loginProviderExtra[provider.name];
|
|
18287
18351
|
return /*#__PURE__*/ jsxs("div", {
|
|
18288
18352
|
className: "flex flex-col w-full font-medium hover:text-accent-light hover:font-bold",
|
|
18289
18353
|
children: [
|
|
18354
|
+
extra && logninExtraText(extra),
|
|
18290
18355
|
/*#__PURE__*/ jsx(Select, {
|
|
18291
18356
|
data: provider.urls.map((item)=>({
|
|
18292
18357
|
value: item.url,
|
|
@@ -18320,19 +18385,25 @@ const LoginProviderMultipleItems = ({ provider, handleLoginSelected })=>{
|
|
|
18320
18385
|
]
|
|
18321
18386
|
}, `${provider.name}-login-item`);
|
|
18322
18387
|
};
|
|
18323
|
-
const LoginProviderSingleItem = ({ provider, handleLoginSelected })=>{
|
|
18324
|
-
|
|
18325
|
-
|
|
18326
|
-
color: "accent.3",
|
|
18327
|
-
onClick: ()=>handleLoginSelected(provider.urls[0].url),
|
|
18388
|
+
const LoginProviderSingleItem = ({ provider, handleLoginSelected, loginProviderExtra })=>{
|
|
18389
|
+
const extra = loginProviderExtra && loginProviderExtra[provider.name];
|
|
18390
|
+
return /*#__PURE__*/ jsxs(React__default.Fragment, {
|
|
18328
18391
|
children: [
|
|
18329
|
-
|
|
18330
|
-
|
|
18331
|
-
|
|
18392
|
+
extra && logninExtraText(extra),
|
|
18393
|
+
/*#__PURE__*/ jsxs(Button, {
|
|
18394
|
+
fullWidth: true,
|
|
18395
|
+
color: "accent.3",
|
|
18396
|
+
onClick: ()=>handleLoginSelected(provider.urls[0].url),
|
|
18397
|
+
children: [
|
|
18398
|
+
' ',
|
|
18399
|
+
provider.name,
|
|
18400
|
+
' '
|
|
18401
|
+
]
|
|
18402
|
+
}, provider.name)
|
|
18332
18403
|
]
|
|
18333
|
-
}
|
|
18404
|
+
});
|
|
18334
18405
|
};
|
|
18335
|
-
const LoginProvidersPanel = ({ handleLoginSelected })=>{
|
|
18406
|
+
const LoginProvidersPanel = ({ handleLoginSelected, loginProviderExtra })=>{
|
|
18336
18407
|
const { data, isSuccess, isError, isLoading, isFetching } = useGetLoginProvidersQuery();
|
|
18337
18408
|
if (isError) {
|
|
18338
18409
|
return /*#__PURE__*/ jsx(Center, {
|
|
@@ -18361,17 +18432,21 @@ const LoginProvidersPanel = ({ handleLoginSelected })=>{
|
|
|
18361
18432
|
children: [
|
|
18362
18433
|
data && data.default_provider.urls.length > 1 ? /*#__PURE__*/ jsx(LoginProviderMultipleItems, {
|
|
18363
18434
|
provider: data.default_provider,
|
|
18364
|
-
handleLoginSelected: handleLoginSelected
|
|
18435
|
+
handleLoginSelected: handleLoginSelected,
|
|
18436
|
+
loginProviderExtra: loginProviderExtra
|
|
18365
18437
|
}) : data && /*#__PURE__*/ jsx(LoginProviderSingleItem, {
|
|
18366
18438
|
provider: data.default_provider,
|
|
18367
|
-
handleLoginSelected: handleLoginSelected
|
|
18439
|
+
handleLoginSelected: handleLoginSelected,
|
|
18440
|
+
loginProviderExtra: loginProviderExtra
|
|
18368
18441
|
}),
|
|
18369
18442
|
data?.providers.filter((x)=>x.name !== data.default_provider.name).map((x)=>x.urls.length > 1 ? /*#__PURE__*/ jsx(LoginProviderMultipleItems, {
|
|
18370
18443
|
provider: x,
|
|
18371
|
-
handleLoginSelected: handleLoginSelected
|
|
18444
|
+
handleLoginSelected: handleLoginSelected,
|
|
18445
|
+
loginProviderExtra: loginProviderExtra
|
|
18372
18446
|
}, x.name) : /*#__PURE__*/ jsx(LoginProviderSingleItem, {
|
|
18373
18447
|
provider: x,
|
|
18374
|
-
handleLoginSelected: handleLoginSelected
|
|
18448
|
+
handleLoginSelected: handleLoginSelected,
|
|
18449
|
+
loginProviderExtra: loginProviderExtra
|
|
18375
18450
|
}, x.name))
|
|
18376
18451
|
]
|
|
18377
18452
|
})
|
|
@@ -18541,7 +18616,7 @@ const filterRedirect = (redirect)=>{
|
|
|
18541
18616
|
return cleanPath ? `${baseUrl}/${cleanPath}` : baseUrl;
|
|
18542
18617
|
};
|
|
18543
18618
|
const LoginPanel = (loginConfig)=>{
|
|
18544
|
-
const { image, topContent, bottomContent } = loginConfig;
|
|
18619
|
+
const { image, topContent, loginProviderExtra, bottomContent } = loginConfig;
|
|
18545
18620
|
const router = useRouter();
|
|
18546
18621
|
const { query: { referer: refererQuery, redirect: redirectQuery } } = router;
|
|
18547
18622
|
const referer = redirectQuery || refererQuery; // either referer or redirect query param
|
|
@@ -18582,7 +18657,8 @@ const LoginPanel = (loginConfig)=>{
|
|
|
18582
18657
|
key: index
|
|
18583
18658
|
})),
|
|
18584
18659
|
/*#__PURE__*/ jsx(LoginProvidersPanel, {
|
|
18585
|
-
handleLoginSelected: handleFenceLoginSelected
|
|
18660
|
+
handleLoginSelected: handleFenceLoginSelected,
|
|
18661
|
+
loginProviderExtra: loginProviderExtra
|
|
18586
18662
|
}),
|
|
18587
18663
|
loginConfig?.showCredentialsLogin && process.env.NODE_ENV === 'development' && /*#__PURE__*/ jsx(CredentialsLogin, {
|
|
18588
18664
|
handleLogin: handleCredentialsLogin
|
|
@@ -26403,7 +26479,8 @@ const TabbedCohortBuilderPage = ({ headerProps, footerProps, configuration })=>{
|
|
|
26403
26479
|
})
|
|
26404
26480
|
}),
|
|
26405
26481
|
/*#__PURE__*/ jsx(QueryExpression, {
|
|
26406
|
-
index: configuration.index
|
|
26482
|
+
index: configuration.index,
|
|
26483
|
+
fieldsAreFlat: configuration.fieldsAreFlat
|
|
26407
26484
|
})
|
|
26408
26485
|
]
|
|
26409
26486
|
}),
|
|
@@ -27753,4 +27830,4 @@ const WorkspaceNoAccessPageServerSideProps = async ()=>{
|
|
|
27753
27830
|
};
|
|
27754
27831
|
|
|
27755
27832
|
export { QueryPageGetServerSideProps as $, AISearchPage as A, CrosswalkPage as B, CountsValue as C, DropdownPanel as D, ErrorCard as E, CrosswalkPageGetServerSideProps as F, Custom403Page as G, Custom404Page as H, DictionaryPage as I, DataLibraryPage as J, DataLibraryPageGetServerSideProps as K, DictionaryPageGetServerSideProps as L, DiscoveryPageGetServerSideProps as M, DiscoveryPage as N, ExplorerPage as O, ExplorerPageGetServerSideProps as P, QueryExpression as Q, ExplorerPageGetServerSidePropsForConfigId as R, LandingPage as S, LandingPageGetServerSideProps as T, LoginPage as U, LoginPageGetServerSideProps as V, NotebookLitePage as W, NotebookLitePageGetStaticProps as X, ProfilePage as Y, ProfilePageGetServerSideProps as Z, QueryPage as _, processRangeData as a, RepositoryPage as a0, RepositoryPageGetServerSideProps as a1, SubmissionPageGetServerSideProps as a2, SubmissionPage as a3, TabbedCohortBuilderPage as a4, TabbedCohortBuilderPageGetServerSideProps as a5, WorkspaceNoAccessPage as a6, WorkspaceNoAccessPageServerSideProps as a7, WorkspacePage as a8, WorkspacePageGetServerSideProps as a9, useToggleExpandFilter as b, useFilterExpandedState as c, useClearFilters as d, extractRangeValues$1 as e, useGetFacetFilters as f, getAllFieldsFromFilterConfigs as g, useUpdateFilters as h, useSetCohortFilterCombineState as i, useCohortFilterCombineState as j, classifyFacets as k, DownloadsPanel as l, CollapsableCharts as m, Charts as n, ExplorerTable as o, processBucketData as p, CohortManager as q, removeIntersectionFromEnum as r, AISearchPageGetServerSideProps as s, AnalysisPage as t, useFieldNameToLabel as u, AnalysisPageGetServerSideProps as v, ClinicalDataAnalysisPage as w, ClinicalDataAnalysisServerSideProps as x, ColorThemePage as y, ColorThemePageGetServerSideProps as z };
|
|
27756
|
-
//# sourceMappingURL=index-
|
|
27833
|
+
//# sourceMappingURL=index-Dy9pEhcC.js.map
|