@gen3/frontend 0.11.47 → 0.11.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/dts/components/Providers/Gen3Provider.d.ts +1 -1
- package/dist/dts/components/Tables/utils.d.ts.map +1 -1
- package/dist/dts/components/Tables/utils.js +4 -1
- package/dist/dts/components/Tables/utils.js.map +1 -1
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangeFacet.stories.d.ts +9 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangeFacet.stories.d.ts.map +1 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangeFacet.stories.js +26 -0
- package/dist/dts/components/facets/NumericRangeFacet/NumericRangeFacet.stories.js.map +1 -0
- package/dist/dts/components/facets/Panels/AccordianPanel.d.ts +1 -1
- package/dist/dts/components/facets/Panels/AccordianPanel.d.ts.map +1 -1
- package/dist/dts/components/facets/Panels/AccordianPanel.js +2 -8
- package/dist/dts/components/facets/Panels/AccordianPanel.js.map +1 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.d.ts +1 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.d.ts.map +1 -1
- package/dist/dts/components/facets/Panels/DropdownPanel.js +3 -12
- package/dist/dts/components/facets/Panels/DropdownPanel.js.map +1 -1
- package/dist/dts/components/facets/Panels/TabbedPanel.d.ts +1 -1
- package/dist/dts/components/facets/Panels/TabbedPanel.d.ts.map +1 -1
- package/dist/dts/components/facets/Panels/TabbedPanel.js +3 -3
- package/dist/dts/components/facets/Panels/TabbedPanel.js.map +1 -1
- package/dist/dts/components/facets/Panels/types.d.ts +7 -2
- package/dist/dts/components/facets/Panels/types.d.ts.map +1 -1
- package/dist/dts/components/facets/RangeFacet.d.ts +2 -2
- package/dist/dts/components/facets/RangeFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/RangeFacet.js.map +1 -1
- package/dist/dts/components/facets/ToggleFacet.d.ts +14 -0
- package/dist/dts/components/facets/ToggleFacet.d.ts.map +1 -0
- package/dist/dts/components/facets/ToggleFacet.js +44 -0
- package/dist/dts/components/facets/ToggleFacet.js.map +1 -0
- package/dist/dts/components/facets/UploadFacet.d.ts +3 -3
- package/dist/dts/components/facets/UploadFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/UploadFacet.js +5 -5
- package/dist/dts/components/facets/UploadFacet.js.map +1 -1
- package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
- package/dist/dts/components/facets/createFacetCard.js +13 -0
- package/dist/dts/components/facets/createFacetCard.js.map +1 -1
- package/dist/dts/components/facets/types.d.ts +11 -5
- package/dist/dts/components/facets/types.d.ts.map +1 -1
- package/dist/dts/components/facets/types.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts +1 -0
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.d.ts +2 -2
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.js +9 -10
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.stories.d.ts +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCollapsible.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.js +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -2
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCore.stories.d.ts +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCore.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.js +9 -3
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisPanel.stories.d.ts +1 -1
- package/dist/dts/features/Analysis/types.d.ts +1 -0
- package/dist/dts/features/Analysis/types.d.ts.map +1 -1
- package/dist/dts/features/Analysis/types.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +13 -3
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js +7 -2
- package/dist/dts/features/CohortBuilder/ExplorerTable/utils.js.map +1 -1
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.js +13 -3
- package/dist/dts/features/CohortBuilder/Repository/FileFacetPanel.js.map +1 -1
- package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.d.ts +1 -0
- package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.d.ts.map +1 -0
- package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.js +130 -0
- package/dist/dts/features/DataLibrary/tables/DatalistContentsPanel.js.map +1 -0
- package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable.js +2 -2
- package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.d.ts.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.js +1 -0
- package/dist/dts/features/Study/StudyDetails/StudyGroupPanel.js.map +1 -1
- package/dist/dts/lib/content/types.d.ts +1 -1
- package/dist/dts/lib/content/types.d.ts.map +1 -1
- package/dist/index/cjs/{QueryPanel-Bbd28e3w.js → QueryPanel-DHlPraJp.js} +2 -2
- package/dist/index/cjs/{QueryPanel-Bbd28e3w.js.map → QueryPanel-DHlPraJp.js.map} +1 -1
- package/dist/index/cjs/{index-CZW1TK-c.js → index-CVRAXkv2.js} +158 -47
- package/dist/index/cjs/index-CVRAXkv2.js.map +1 -0
- package/dist/index/cjs/index.js +1 -1
- package/dist/index/esm/{QueryPanel-CZJ44no-.js → QueryPanel-DaQpSckd.js} +2 -2
- package/dist/index/esm/{QueryPanel-CZJ44no-.js.map → QueryPanel-DaQpSckd.js.map} +1 -1
- package/dist/index/esm/{index-BNMPLnOi.js → index-DvCziqnB.js} +159 -48
- package/dist/index/esm/index-DvCziqnB.js.map +1 -0
- package/dist/index/esm/index.js +1 -1
- package/dist/index.d.ts +36 -25
- package/dist/server.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/dist/index/cjs/index-CZW1TK-c.js.map +0 -1
- package/dist/index/esm/index-BNMPLnOi.js.map +0 -1
|
@@ -4604,6 +4604,87 @@ const RangeFacet = ({ field, hooks, valueLabel, description, facetName, minimum
|
|
|
4604
4604
|
});
|
|
4605
4605
|
};
|
|
4606
4606
|
|
|
4607
|
+
const extractToggleValue = (values)=>values !== undefined && values.length > 0 && values.includes('true');
|
|
4608
|
+
/**
|
|
4609
|
+
* Facet card for boolean fields
|
|
4610
|
+
* @param field - field to facet on
|
|
4611
|
+
* @param hooks - hooks to use for the facet
|
|
4612
|
+
* @param description - description of the facet
|
|
4613
|
+
* @param valueLabel - label for the value
|
|
4614
|
+
* @param facetName - name of the facet
|
|
4615
|
+
* @param dismissCallback - callback to call when the facet is dismissed
|
|
4616
|
+
*/ const ToggleFacet = ({ field, hooks, description, valueLabel, facetName, dismissCallback = undefined })=>{
|
|
4617
|
+
const clearFilters = hooks.useClearFilter();
|
|
4618
|
+
const updateFacetFilters = hooks.useUpdateFacetFilters();
|
|
4619
|
+
const isFilterExpanded = hooks?.useFilterExpanded && hooks.useFilterExpanded(field);
|
|
4620
|
+
const showFilters = isFilterExpanded === undefined || isFilterExpanded;
|
|
4621
|
+
const { data, isSuccess } = hooks.useGetFacetData(field);
|
|
4622
|
+
const enumFilters = hooks.useGetFacetFilters(field);
|
|
4623
|
+
const toggleValue = React.useMemo(()=>extractToggleValue(enumFilters ? enumFilters?.operands : []), [
|
|
4624
|
+
enumFilters
|
|
4625
|
+
]);
|
|
4626
|
+
const setValue = (bValue)=>{
|
|
4627
|
+
if (bValue) updateFacetEnum(field, [
|
|
4628
|
+
'true'
|
|
4629
|
+
], updateFacetFilters, clearFilters);
|
|
4630
|
+
else clearFilters(field);
|
|
4631
|
+
};
|
|
4632
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
4633
|
+
className: "flex flex-col mx-0 bg-base-max relative border-base-lighter border-1 rounded-b-md transition text-sm",
|
|
4634
|
+
children: [
|
|
4635
|
+
/*#__PURE__*/ jsxRuntime.jsx(FacetControlsHeader, {
|
|
4636
|
+
field: field,
|
|
4637
|
+
description: description,
|
|
4638
|
+
hooks: hooks,
|
|
4639
|
+
facetName: facetName,
|
|
4640
|
+
dismissCallback: dismissCallback,
|
|
4641
|
+
showClearSelection: false
|
|
4642
|
+
}),
|
|
4643
|
+
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
4644
|
+
className: showFilters ? 'h-full' : 'h-0 invisible',
|
|
4645
|
+
"aria-hidden": !showFilters,
|
|
4646
|
+
children: [
|
|
4647
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
4648
|
+
className: "flex items-center justify-end flex-wrap p-1 mb-1 border-b-2",
|
|
4649
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
4650
|
+
className: "px-2",
|
|
4651
|
+
children: valueLabel
|
|
4652
|
+
})
|
|
4653
|
+
}),
|
|
4654
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
4655
|
+
className: "w-full ",
|
|
4656
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
4657
|
+
className: "flex flex-nowrap justify-between items-center p-2 ",
|
|
4658
|
+
children: [
|
|
4659
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.LoadingOverlay, {
|
|
4660
|
+
"data-testid": "loading-spinner",
|
|
4661
|
+
visible: !isSuccess
|
|
4662
|
+
}),
|
|
4663
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Switch, {
|
|
4664
|
+
label: data === undefined || Object.keys(data).length == 0 ? 'No data for this field' : data['1'].toLocaleString('en-US'),
|
|
4665
|
+
color: "accent",
|
|
4666
|
+
checked: toggleValue,
|
|
4667
|
+
onChange: (event)=>setValue(event.currentTarget.checked),
|
|
4668
|
+
"aria-label": facetName,
|
|
4669
|
+
"data-testid": "toggle-facet-value",
|
|
4670
|
+
classNames: {
|
|
4671
|
+
root: 'w-full',
|
|
4672
|
+
body: 'flex justify-between items-center',
|
|
4673
|
+
label: 'text-sm font-content'
|
|
4674
|
+
},
|
|
4675
|
+
wrapperProps: {
|
|
4676
|
+
'data-testid': 'toggle-area'
|
|
4677
|
+
}
|
|
4678
|
+
})
|
|
4679
|
+
]
|
|
4680
|
+
})
|
|
4681
|
+
})
|
|
4682
|
+
]
|
|
4683
|
+
})
|
|
4684
|
+
]
|
|
4685
|
+
});
|
|
4686
|
+
};
|
|
4687
|
+
|
|
4607
4688
|
const instanceOfIncludesExcludes$1 = (op)=>[
|
|
4608
4689
|
'in'
|
|
4609
4690
|
].includes(op.operator); // TODO: Guppy does not support excludes
|
|
@@ -4915,7 +4996,7 @@ const FilterBadge = ({ field, value, customTestid, hooks, operands, operator })=
|
|
|
4915
4996
|
/**
|
|
4916
4997
|
* Facet card component for fields were a user can upload a list of values
|
|
4917
4998
|
*/ const UploadFacet = ({ field, facetName, facetBtnToolTip, hooks })=>{
|
|
4918
|
-
const hash = window?.location?.hash.split(
|
|
4999
|
+
const hash = window?.location?.hash.split('#')?.[1];
|
|
4919
5000
|
const cardSelected = hash !== undefined && hash === field;
|
|
4920
5001
|
const openModal = hooks.useOpenUploadModal();
|
|
4921
5002
|
const { noData, items } = hooks.useFilterItems(field);
|
|
@@ -4937,7 +5018,7 @@ const FilterBadge = ({ field, value, customTestid, hooks, operands, operator })=
|
|
|
4937
5018
|
}, `query-rep-${itemField}-${item}-${index}`));
|
|
4938
5019
|
};
|
|
4939
5020
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
4940
|
-
className: `flex flex-col mx-0 bg-base-max border-base-lighter border-1 rounded-b-md text-xs transition ${cardSelected ?
|
|
5021
|
+
className: `flex flex-col mx-0 bg-base-max border-base-lighter border-1 rounded-b-md text-xs transition ${cardSelected ? 'animate-border-highlight ' : undefined}`,
|
|
4941
5022
|
id: field,
|
|
4942
5023
|
children: [
|
|
4943
5024
|
/*#__PURE__*/ jsxRuntime.jsx(FacetControlsHeader, {
|
|
@@ -4961,7 +5042,7 @@ const FilterBadge = ({ field, value, customTestid, hooks, operands, operator })=
|
|
|
4961
5042
|
withArrow: true,
|
|
4962
5043
|
transitionProps: {
|
|
4963
5044
|
duration: 200,
|
|
4964
|
-
transition:
|
|
5045
|
+
transition: 'fade'
|
|
4965
5046
|
},
|
|
4966
5047
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
4967
5048
|
variant: "outline",
|
|
@@ -5039,7 +5120,18 @@ const createFacetCard = ({ facetDefinition, valueLabel, hooks: dataFunctions, fa
|
|
|
5039
5120
|
field: field,
|
|
5040
5121
|
valueLabel: valueTypeLabel,
|
|
5041
5122
|
hooks: dataFunctions
|
|
5042
|
-
}, `${idPrefix}-upload-${field}`)
|
|
5123
|
+
}, `${idPrefix}-upload-${field}`),
|
|
5124
|
+
toggle: /*#__PURE__*/ jsxRuntime.jsx(ToggleFacet, {
|
|
5125
|
+
field: field,
|
|
5126
|
+
valueLabel: valueTypeLabel,
|
|
5127
|
+
hideIfEmpty: hideIfEmpty,
|
|
5128
|
+
showPercent: showPercent,
|
|
5129
|
+
hooks: {
|
|
5130
|
+
...dataFunctions
|
|
5131
|
+
},
|
|
5132
|
+
facetName: facetLabel,
|
|
5133
|
+
description: description
|
|
5134
|
+
}, `${idPrefix}-toggle-${field}`)
|
|
5043
5135
|
}[type]
|
|
5044
5136
|
}, `${idPrefix}-facet-${field}`);
|
|
5045
5137
|
};
|
|
@@ -5077,18 +5169,11 @@ const FiltersPanel = ({ fields, dataFunctions, valueLabel })=>{
|
|
|
5077
5169
|
});
|
|
5078
5170
|
};
|
|
5079
5171
|
|
|
5080
|
-
const AccordionPanel = ({
|
|
5172
|
+
const AccordionPanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks, allFiltersCollapsed, toggleAllFiltersExpanded, clearAllFilters, onAccessChange = (value)=>null, accessLevel = core.Accessibility.ALL, showAccessLevel = false })=>{
|
|
5081
5173
|
const coreDispatch = core.useCoreDispatch();
|
|
5082
5174
|
const sharedFilters = core.useCoreSelector((state)=>core.selectSharedFilters(state));
|
|
5083
5175
|
const theme = core$1.useMantineTheme();
|
|
5084
5176
|
const shareFilters = core.useCoreSelector((state)=>core.selectShouldShareFilters(state));
|
|
5085
|
-
const allFiltersCollapsed = core.useCoreSelector((state)=>core.selectAllCohortFiltersCollapsed(state, index));
|
|
5086
|
-
const toggleAllFiltersExpanded = (expand)=>{
|
|
5087
|
-
coreDispatch(core.toggleCohortBuilderAllFilters({
|
|
5088
|
-
expand,
|
|
5089
|
-
index
|
|
5090
|
-
}));
|
|
5091
|
-
};
|
|
5092
5177
|
const handleSharedFiltersChange = (value)=>{
|
|
5093
5178
|
modals.modals.openConfirmModal({
|
|
5094
5179
|
title: 'Confirm change of shared filters mode',
|
|
@@ -5221,27 +5306,12 @@ const AccessLevelControl = ({ onChange, accessLevel })=>{
|
|
|
5221
5306
|
});
|
|
5222
5307
|
};
|
|
5223
5308
|
|
|
5224
|
-
const DropdownPanel = ({
|
|
5309
|
+
const DropdownPanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks, allFiltersCollapsed, toggleAllFiltersExpanded, clearAllFilters, onAccessChange = (value)=>null, accessLevel = core.Accessibility.ALL, showAccessLevel = false })=>{
|
|
5225
5310
|
const [value, setValue] = React.useState('0');
|
|
5226
|
-
const allFiltersCollapsed = core.useCoreSelector((state)=>core.selectAllCohortFiltersCollapsed(state, index));
|
|
5227
5311
|
const sharedFilters = core.useCoreSelector((state)=>core.selectSharedFilters(state));
|
|
5228
5312
|
const shareFilters = core.useCoreSelector((state)=>core.selectShouldShareFilters(state));
|
|
5229
5313
|
const theme = core$1.useMantineTheme();
|
|
5230
5314
|
const coreDispatch = core.useCoreDispatch();
|
|
5231
|
-
const toggleAllFiltersExpanded = (expand)=>{
|
|
5232
|
-
coreDispatch(core.toggleCohortBuilderAllFilters({
|
|
5233
|
-
expand,
|
|
5234
|
-
index
|
|
5235
|
-
}));
|
|
5236
|
-
};
|
|
5237
|
-
const clearAllFilters = React.useCallback(()=>{
|
|
5238
|
-
coreDispatch(core.clearCohortFilters({
|
|
5239
|
-
index
|
|
5240
|
-
}));
|
|
5241
|
-
}, [
|
|
5242
|
-
coreDispatch,
|
|
5243
|
-
index
|
|
5244
|
-
]);
|
|
5245
5315
|
const items = useDeepCompare.useDeepCompareMemo(()=>filters.tabs.map((tab, idx)=>{
|
|
5246
5316
|
return {
|
|
5247
5317
|
label: tab.title,
|
|
@@ -5370,7 +5440,7 @@ const DropdownPanel = ({ index, filters, tabTitle, facetDefinitions, facetDataHo
|
|
|
5370
5440
|
});
|
|
5371
5441
|
};
|
|
5372
5442
|
|
|
5373
|
-
const VerticalTabbedPanel = ({
|
|
5443
|
+
const VerticalTabbedPanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks, onAccessChange = (value)=>null, accessLevel = core.Accessibility.ALL, showAccessLevel = false })=>{
|
|
5374
5444
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
5375
5445
|
children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Tabs, {
|
|
5376
5446
|
variant: "pills",
|
|
@@ -5420,15 +5490,13 @@ const SinglePanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks })=>{
|
|
|
5420
5490
|
}) : null
|
|
5421
5491
|
});
|
|
5422
5492
|
};
|
|
5423
|
-
const TabbedPanel = ({
|
|
5493
|
+
const TabbedPanel = ({ filters, tabTitle, facetDefinitions, facetDataHooks })=>{
|
|
5424
5494
|
return filters.tabs.length > 1 ? /*#__PURE__*/ jsxRuntime.jsx(VerticalTabbedPanel, {
|
|
5425
|
-
index: index,
|
|
5426
5495
|
filters: filters,
|
|
5427
5496
|
tabTitle: tabTitle,
|
|
5428
5497
|
facetDefinitions: facetDefinitions,
|
|
5429
5498
|
facetDataHooks: facetDataHooks
|
|
5430
5499
|
}) : /*#__PURE__*/ jsxRuntime.jsx(SinglePanel, {
|
|
5431
|
-
index: index,
|
|
5432
5500
|
filters: filters,
|
|
5433
5501
|
tabTitle: tabTitle,
|
|
5434
5502
|
facetDefinitions: facetDefinitions,
|
|
@@ -7703,6 +7771,7 @@ const StudyGroup = ({ data, header, fields })=>{
|
|
|
7703
7771
|
};
|
|
7704
7772
|
|
|
7705
7773
|
const StudyGroupPanel = ({ data, groups })=>{
|
|
7774
|
+
console.log('StudyGroupPanel:, data:', data);
|
|
7706
7775
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
7707
7776
|
className: "flex flex-col my-2 w-full",
|
|
7708
7777
|
children: groups.map(({ header, fields })=>{
|
|
@@ -8118,6 +8187,7 @@ const DiscoveryTable = ({ data, hits, dataRequestStatus, setSorting, setPaginati
|
|
|
8118
8187
|
},
|
|
8119
8188
|
mantineTableBodyRowProps: ({ row })=>({
|
|
8120
8189
|
onClick: ()=>{
|
|
8190
|
+
console.log('row.original', row.original);
|
|
8121
8191
|
setStudyDetails(()=>{
|
|
8122
8192
|
return {
|
|
8123
8193
|
...row.original
|
|
@@ -11092,10 +11162,13 @@ const registerExplorerDefaultCellRenderers = ()=>{
|
|
|
11092
11162
|
|
|
11093
11163
|
const jsonPathAccessor = (path)=>(row)=>{
|
|
11094
11164
|
// TODO: add logging if path is not found
|
|
11095
|
-
|
|
11165
|
+
console.log('jsonPathAccessor', path, row);
|
|
11166
|
+
const results = jsonpathPlus.JSONPath({
|
|
11096
11167
|
json: row,
|
|
11097
11168
|
path: path
|
|
11098
11169
|
});
|
|
11170
|
+
console.log('jsonPathAccessor', results);
|
|
11171
|
+
return results;
|
|
11099
11172
|
};
|
|
11100
11173
|
|
|
11101
11174
|
const ArrayCellRenderer = (cellRenderFunction, props, ...args)=>{
|
|
@@ -11121,6 +11194,7 @@ const isRecordAny = (obj)=>{
|
|
|
11121
11194
|
const createTableColumns = (tableConfig)=>{
|
|
11122
11195
|
const tableColumns = tableConfig.fields.map((field)=>{
|
|
11123
11196
|
const columnDef = tableConfig?.columns?.[field];
|
|
11197
|
+
console.log('createTableColumns', columnDef);
|
|
11124
11198
|
const cellRendererFunc = columnDef?.type ? ExplorerTableCellRendererFactory().getRenderer(columnDef?.type, columnDef?.cellRenderFunction ?? 'default') : undefined;
|
|
11125
11199
|
const cellRendererFuncParams = columnDef?.params && isRecordAny(columnDef?.params) ? columnDef?.params : {};
|
|
11126
11200
|
return {
|
|
@@ -14156,10 +14230,26 @@ const EmptyData = {};
|
|
|
14156
14230
|
const fields = React.useMemo(()=>getAllFieldsFromFilterConfigs(filters?.tabs ?? []), [
|
|
14157
14231
|
filters?.tabs
|
|
14158
14232
|
]);
|
|
14233
|
+
const coreDispatch = core.useCoreDispatch();
|
|
14159
14234
|
const [facetDefinitions, setFacetDefinitions] = React.useState({});
|
|
14160
14235
|
const [summaryCharts, setSummaryCharts] = React.useState({});
|
|
14161
14236
|
const cohortFilters = core.useCoreSelector((state)=>core.selectIndexFilters(state, index));
|
|
14162
14237
|
const cohortId = core.useCoreSelector((state)=>core.selectCurrentCohortId(state));
|
|
14238
|
+
const allFiltersCollapsed = core.useCoreSelector((state)=>core.selectAllCohortFiltersCollapsed(state, index));
|
|
14239
|
+
const toggleAllFiltersExpanded = (expand)=>{
|
|
14240
|
+
coreDispatch(core.toggleCohortBuilderAllFilters({
|
|
14241
|
+
expand,
|
|
14242
|
+
index
|
|
14243
|
+
}));
|
|
14244
|
+
};
|
|
14245
|
+
const clearAllFilters = React.useCallback(()=>{
|
|
14246
|
+
coreDispatch(core.clearCohortFilters({
|
|
14247
|
+
index
|
|
14248
|
+
}));
|
|
14249
|
+
}, [
|
|
14250
|
+
coreDispatch,
|
|
14251
|
+
index
|
|
14252
|
+
]);
|
|
14163
14253
|
const { data, isSuccess, isFetching: isAggsQueryFetching, isError: isAggsQueryError } = core.useGetAggsQuery({
|
|
14164
14254
|
type: index,
|
|
14165
14255
|
fields: fields,
|
|
@@ -14371,14 +14461,16 @@ const EmptyData = {};
|
|
|
14371
14461
|
id: "cohort-builder-filters",
|
|
14372
14462
|
className: "flex-shrink-0 md:w-1/4 lg:w-1/5",
|
|
14373
14463
|
children: filters?.tabs && /*#__PURE__*/ jsxRuntime.jsx(DropdownPanel, {
|
|
14374
|
-
index: index,
|
|
14375
14464
|
filters: filters,
|
|
14376
14465
|
tabTitle: tabTitle,
|
|
14377
14466
|
facetDefinitions: facetDefinitions,
|
|
14378
14467
|
facetDataHooks: facetDataHooks,
|
|
14379
14468
|
onAccessChange: setAccessLevel,
|
|
14380
14469
|
accessLevel: accessLevel,
|
|
14381
|
-
showAccessLevel: showAccessLevel
|
|
14470
|
+
showAccessLevel: showAccessLevel,
|
|
14471
|
+
allFiltersCollapsed: allFiltersCollapsed,
|
|
14472
|
+
toggleAllFiltersExpanded: toggleAllFiltersExpanded,
|
|
14473
|
+
clearAllFilters: clearAllFilters
|
|
14382
14474
|
})
|
|
14383
14475
|
}),
|
|
14384
14476
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -15127,6 +15219,22 @@ const FileFacetPanel = ({ filters, index, tabTitle, fieldMapping, indexPrefix =
|
|
|
15127
15219
|
]);
|
|
15128
15220
|
const [accessLevel, setAccessLevel] = React.useState(core.Accessibility.ALL);
|
|
15129
15221
|
const [facetDefinitions, setFacetDefinitions] = React.useState({});
|
|
15222
|
+
const coreDispatch = core.useCoreDispatch();
|
|
15223
|
+
const allFiltersCollapsed = core.useCoreSelector((state)=>core.selectAllCohortFiltersCollapsed(state, index));
|
|
15224
|
+
const toggleAllFiltersExpanded = (expand)=>{
|
|
15225
|
+
coreDispatch(core.toggleCohortBuilderAllFilters({
|
|
15226
|
+
expand,
|
|
15227
|
+
index
|
|
15228
|
+
}));
|
|
15229
|
+
};
|
|
15230
|
+
const clearAllFilters = React.useCallback(()=>{
|
|
15231
|
+
coreDispatch(core.clearCohortFilters({
|
|
15232
|
+
index
|
|
15233
|
+
}));
|
|
15234
|
+
}, [
|
|
15235
|
+
coreDispatch,
|
|
15236
|
+
index
|
|
15237
|
+
]);
|
|
15130
15238
|
const { data: facetData, isSuccess: isFacetsQuerySuccess, isFetching: isFacetsQueryFetching, isError: isFacetsQueryError } = useGetFacetValuesQuery({
|
|
15131
15239
|
type: index,
|
|
15132
15240
|
fields: fields,
|
|
@@ -15204,14 +15312,16 @@ const FileFacetPanel = ({ filters, index, tabTitle, fieldMapping, indexPrefix =
|
|
|
15204
15312
|
}); // TODO: replace with configurable message
|
|
15205
15313
|
}
|
|
15206
15314
|
return /*#__PURE__*/ jsxRuntime.jsx(DropdownPanel, {
|
|
15207
|
-
index: index,
|
|
15208
15315
|
filters: filters,
|
|
15209
15316
|
facetDefinitions: facetDefinitions,
|
|
15210
15317
|
facetDataHooks: facetDataHooks,
|
|
15211
15318
|
showAccessLevel: false,
|
|
15212
15319
|
tabTitle: tabTitle,
|
|
15213
15320
|
onAccessChange: setAccessLevel,
|
|
15214
|
-
accessLevel: accessLevel
|
|
15321
|
+
accessLevel: accessLevel,
|
|
15322
|
+
allFiltersCollapsed: allFiltersCollapsed,
|
|
15323
|
+
toggleAllFiltersExpanded: toggleAllFiltersExpanded,
|
|
15324
|
+
clearAllFilters: clearAllFilters
|
|
15215
15325
|
});
|
|
15216
15326
|
};
|
|
15217
15327
|
|
|
@@ -16505,7 +16615,7 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16505
16615
|
return /*#__PURE__*/ jsxRuntime.jsxs(core$1.Card, {
|
|
16506
16616
|
"data-testid": `${title}-tool`,
|
|
16507
16617
|
p: 6,
|
|
16508
|
-
className: `bg-base-max border-secondary-darkest overflow-visible border ${inactive ?
|
|
16618
|
+
className: `bg-base-max border-secondary-darkest overflow-visible border ${inactive ? '' : 'border-t-6'}
|
|
16509
16619
|
`,
|
|
16510
16620
|
"aria-label": `${title} Tool`,
|
|
16511
16621
|
children: [
|
|
@@ -16546,7 +16656,7 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16546
16656
|
focus:border-secondary-dark
|
|
16547
16657
|
mb-1
|
|
16548
16658
|
w-[50px]
|
|
16549
|
-
${inactive ?
|
|
16659
|
+
${inactive ? 'opacity-50 pointer-events-none' : ''}
|
|
16550
16660
|
rounded
|
|
16551
16661
|
h-5
|
|
16552
16662
|
`,
|
|
@@ -16595,7 +16705,8 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16595
16705
|
}),
|
|
16596
16706
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Divider, {
|
|
16597
16707
|
variant: "dotted",
|
|
16598
|
-
"aria-hidden": "true"
|
|
16708
|
+
"aria-hidden": "true",
|
|
16709
|
+
color: "accent.4"
|
|
16599
16710
|
}),
|
|
16600
16711
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
16601
16712
|
className: "flex flex-col items-center text-xs",
|
|
@@ -16613,8 +16724,8 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16613
16724
|
"aria-hidden": "true"
|
|
16614
16725
|
}),
|
|
16615
16726
|
classNames: {
|
|
16616
|
-
root:
|
|
16617
|
-
section:
|
|
16727
|
+
root: 'text-secondary-darkest font-bold bg-transparent',
|
|
16728
|
+
section: 'ml-0'
|
|
16618
16729
|
},
|
|
16619
16730
|
"aria-expanded": descriptionVisible,
|
|
16620
16731
|
children: title
|
|
@@ -16624,10 +16735,10 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16624
16735
|
style: {
|
|
16625
16736
|
height: descriptionVisible ? descHeight : 0
|
|
16626
16737
|
},
|
|
16627
|
-
className: "transition-[height] duration-300 bg-
|
|
16738
|
+
className: "transition-[height] duration-300 bg-accent-lightest overflow-hidden w-full mb-1",
|
|
16628
16739
|
"aria-hidden": !descriptionVisible,
|
|
16629
16740
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
16630
|
-
className: `${descriptionVisible ?
|
|
16741
|
+
className: `${descriptionVisible ? 'opacity-100' : 'opacity-0'} transition-opacity`,
|
|
16631
16742
|
ref: descRef,
|
|
16632
16743
|
children: /*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
16633
16744
|
className: "p-2 font-content",
|
|
@@ -16724,7 +16835,7 @@ const AnalysisCardCollapsible = ({ descriptionVisible, setDescriptionVisible, ti
|
|
|
16724
16835
|
}
|
|
16725
16836
|
}),
|
|
16726
16837
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
16727
|
-
className: `grid sm:grid-cols-2 ${section.core ? 'md:grid-cols-3' : 'md:grid-cols-4 lg:grid-cols-5'} gap-4 items-stretch`,
|
|
16838
|
+
className: `grid sm:grid-cols-2 ${section.core ? 'md:grid-cols-3' : 'md:grid-cols-4 lg:grid-cols-5'} gap-4 items-start items-stretch`,
|
|
16728
16839
|
children: section.tools.map((tool, idx)=>{
|
|
16729
16840
|
if (section.core) {
|
|
16730
16841
|
return /*#__PURE__*/ React.createElement(CoreToolCard, {
|
|
@@ -22275,7 +22386,7 @@ const DiscoveryPageGetServerSideProps = async ()=>{
|
|
|
22275
22386
|
}
|
|
22276
22387
|
};
|
|
22277
22388
|
|
|
22278
|
-
const QueryPanel = dynamic(()=>Promise.resolve().then(function () { return require('./QueryPanel-
|
|
22389
|
+
const QueryPanel = dynamic(()=>Promise.resolve().then(function () { return require('./QueryPanel-DHlPraJp.js'); }), {
|
|
22279
22390
|
ssr: false
|
|
22280
22391
|
});
|
|
22281
22392
|
const QueryPage = ({ headerProps, footerProps, queryProps })=>{
|
|
@@ -28637,4 +28748,4 @@ exports.useUpdateFilters = useUpdateFilters$1;
|
|
|
28637
28748
|
exports.useUpdateFiltersFlat = useUpdateFiltersFlat;
|
|
28638
28749
|
exports.userHasMethodForServiceOnResource = userHasMethodForServiceOnResource$1;
|
|
28639
28750
|
exports.validateObjectHasRequiredFields = validateObjectHasRequiredFields;
|
|
28640
|
-
//# sourceMappingURL=index-
|
|
28751
|
+
//# sourceMappingURL=index-CVRAXkv2.js.map
|