@gen3/frontend 0.11.18 → 0.11.20
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 +197 -90
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.d.ts +4 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.d.ts.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.js +192 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.js.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.d.ts +13 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.d.ts.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.js +53 -0
- package/dist/dts/components/AddtoDataLibrary/AddToDataLibrary.stories.js.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.d.ts +15 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.d.ts.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.js +37 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.js.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.stories.d.ts +13 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.stories.d.ts.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.stories.js +15 -0
- package/dist/dts/components/AddtoDataLibrary/DataLibraryActionButton.stories.js.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/types.d.ts +21 -0
- package/dist/dts/components/AddtoDataLibrary/types.d.ts.map +1 -0
- package/dist/dts/components/AddtoDataLibrary/types.js +2 -0
- package/dist/dts/components/AddtoDataLibrary/types.js.map +1 -0
- package/dist/dts/components/Details/DetailsDrawer.d.ts +2 -2
- package/dist/dts/components/Details/DetailsDrawer.d.ts.map +1 -1
- package/dist/dts/components/Details/DetailsDrawer.js +2 -2
- package/dist/dts/components/Details/DetailsDrawer.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +22 -22
- package/dist/dts/components/charts/Charts.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.js +14 -12
- package/dist/dts/components/charts/Charts.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +6 -6
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/types.d.ts +2 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/types.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js +30 -4
- package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js +1 -1
- package/dist/dts/features/CohortDiscovery/CohortManagment/CohortManager.js.map +1 -1
- package/dist/dts/features/Navigation/Footer/FooterColumn.d.ts.map +1 -1
- package/dist/dts/features/Navigation/Footer/FooterColumn.js +3 -0
- package/dist/dts/features/Navigation/Footer/FooterColumn.js.map +1 -1
- package/dist/dts/features/Navigation/Footer/types.d.ts +1 -0
- package/dist/dts/features/Navigation/Footer/types.d.ts.map +1 -1
- package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.js +4 -4
- package/dist/dts/features/Study/StudyDetails/SinglePageStudyDetailsPanel.js.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyItems.d.ts.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyItems.js +9 -5
- package/dist/dts/features/Study/StudyDetails/StudyItems.js.map +1 -1
- package/dist/esm/index.js +197 -90
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +25 -23
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -2186,6 +2186,36 @@ const processRangeKeyLabel = (key)=>{
|
|
|
2186
2186
|
}, {});
|
|
2187
2187
|
};
|
|
2188
2188
|
|
|
2189
|
+
const OverflowTooltippedLabel = ({ children, label, className = 'flex-grow font-heading text-md pt-0.5' })=>{
|
|
2190
|
+
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
2191
|
+
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
2192
|
+
label: label,
|
|
2193
|
+
disabled: !showTooltip,
|
|
2194
|
+
position: "top-start",
|
|
2195
|
+
offset: 5,
|
|
2196
|
+
multiline: true,
|
|
2197
|
+
withArrow: true,
|
|
2198
|
+
arrowOffset: 20,
|
|
2199
|
+
classNames: {
|
|
2200
|
+
tooltip: 'bg-base-min bg-opacity-90 text-base-contrast-min shadow-lg font-content font-medium text-xs',
|
|
2201
|
+
arrow: 'bg-base-min bg-opacity-90'
|
|
2202
|
+
},
|
|
2203
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
2204
|
+
className: `${className} truncate ... `,
|
|
2205
|
+
ref: (el)=>{
|
|
2206
|
+
if (el) {
|
|
2207
|
+
if (el.clientWidth < el.scrollWidth) {
|
|
2208
|
+
setShowTooltip(true);
|
|
2209
|
+
} else {
|
|
2210
|
+
setShowTooltip(false);
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
},
|
|
2214
|
+
children: children
|
|
2215
|
+
})
|
|
2216
|
+
});
|
|
2217
|
+
};
|
|
2218
|
+
|
|
2189
2219
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2190
2220
|
function DefaultItemRenderer(_props) {
|
|
2191
2221
|
return /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
@@ -2672,16 +2702,25 @@ const LegendRows = ({ data })=>{
|
|
|
2672
2702
|
const limitedRows = moreThanMaxRows ? data.slice(0, MAX_LEGEND_ROWS) : data;
|
|
2673
2703
|
return limitedRows.map((element, elIndex)=>/*#__PURE__*/ jsxRuntime.jsxs(core$1.Table.Tr, {
|
|
2674
2704
|
children: [
|
|
2675
|
-
/*#__PURE__*/ jsxRuntime.
|
|
2676
|
-
children:
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2705
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
|
|
2706
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
2707
|
+
className: "flex flex-nowrap items-center overflow-hidden",
|
|
2708
|
+
children: [
|
|
2709
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.ColorSwatch, {
|
|
2710
|
+
className: "inline-block mr-2 align-middle",
|
|
2711
|
+
size: "1em",
|
|
2712
|
+
radius: "xs",
|
|
2713
|
+
color: chartColors?.[elIndex % chartColors.length] || ''
|
|
2714
|
+
}),
|
|
2715
|
+
/*#__PURE__*/ jsxRuntime.jsx(OverflowTooltippedLabel, {
|
|
2716
|
+
label: element.key.toString(),
|
|
2717
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
2718
|
+
className: "text-sm font-medium font-content",
|
|
2719
|
+
children: element.key.toString()
|
|
2720
|
+
})
|
|
2721
|
+
})
|
|
2722
|
+
]
|
|
2723
|
+
})
|
|
2685
2724
|
}),
|
|
2686
2725
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
|
|
2687
2726
|
className: "text-right",
|
|
@@ -2719,25 +2758,35 @@ const LegendOverflow = ({ chart, data, chartTitle, counts })=>{
|
|
|
2719
2758
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Table, {
|
|
2720
2759
|
withRowBorders: false,
|
|
2721
2760
|
classNames: {
|
|
2722
|
-
table: '',
|
|
2761
|
+
table: 'w-full table-fixed',
|
|
2723
2762
|
td: 'p-1 leading-3'
|
|
2724
2763
|
},
|
|
2725
2764
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Tbody, {
|
|
2726
2765
|
children: data.map((element, elIndex)=>/*#__PURE__*/ jsxRuntime.jsxs(core$1.Table.Tr, {
|
|
2766
|
+
className: `${elIndex === 0 ? 'overflow-hidden text-ellipsis whitespace-nowrap' : 'last:text-right'}`,
|
|
2727
2767
|
children: [
|
|
2728
|
-
/*#__PURE__*/ jsxRuntime.
|
|
2729
|
-
children:
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2768
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
|
|
2769
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
2770
|
+
className: "flex flex-nowrap items-center",
|
|
2771
|
+
children: [
|
|
2772
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.ColorSwatch, {
|
|
2773
|
+
className: "inline-block mr-2 align-middle",
|
|
2774
|
+
size: "1em",
|
|
2775
|
+
radius: "xs",
|
|
2776
|
+
color: chartColors?.[elIndex % chartColors.length] || ''
|
|
2777
|
+
}),
|
|
2778
|
+
/*#__PURE__*/ jsxRuntime.jsx(OverflowTooltippedLabel, {
|
|
2779
|
+
label: element.key.toString(),
|
|
2780
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
2781
|
+
className: "text-sm font-medium font-content",
|
|
2782
|
+
children: element.key.toString()
|
|
2783
|
+
})
|
|
2784
|
+
})
|
|
2785
|
+
]
|
|
2786
|
+
})
|
|
2738
2787
|
}),
|
|
2739
2788
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
|
|
2740
|
-
className: "text-right",
|
|
2789
|
+
className: "w-[10%] text-right",
|
|
2741
2790
|
children: element.count
|
|
2742
2791
|
})
|
|
2743
2792
|
]
|
|
@@ -2815,31 +2864,35 @@ const Charts = ({ charts, data, counts, isSuccess, numCols = DEFAULT_COLS, style
|
|
|
2815
2864
|
inheritPadding: true,
|
|
2816
2865
|
py: "xs",
|
|
2817
2866
|
withBorder: style === 'box',
|
|
2818
|
-
children: /*#__PURE__*/ jsxRuntime.
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2867
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
2868
|
+
className: "w-full",
|
|
2869
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Table, {
|
|
2870
|
+
withRowBorders: false,
|
|
2871
|
+
classNames: {
|
|
2872
|
+
table: 'w-full table-fixed',
|
|
2873
|
+
td: 'p-1 leading-3',
|
|
2874
|
+
th: 'p-1 leading-3 [text-shadow:_1px_0_#000]',
|
|
2875
|
+
thead: 'border-b',
|
|
2876
|
+
tbody: "before:content-[''] before:block before:p-1"
|
|
2877
|
+
},
|
|
2878
|
+
children: [
|
|
2879
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Thead, {
|
|
2880
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Tr, {
|
|
2881
|
+
children: dataKeys.map((el, i)=>/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Th, {
|
|
2882
|
+
className: `${i === 0 ? 'w-[90%] overflow-hidden text-ellipsis whitespace-nowrap' : 'last:text-right'}`,
|
|
2883
|
+
children: charts[field]?.dataLabels?.[el] || /*#__PURE__*/ jsxRuntime.jsx(React.Fragment, {
|
|
2884
|
+
children: " "
|
|
2885
|
+
})
|
|
2886
|
+
}, i))
|
|
2887
|
+
})
|
|
2888
|
+
}),
|
|
2889
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Tbody, {
|
|
2890
|
+
children: data === undefined ? '' : /*#__PURE__*/ jsxRuntime.jsx(LegendRows, {
|
|
2891
|
+
data: data[field]
|
|
2892
|
+
})
|
|
2840
2893
|
})
|
|
2841
|
-
|
|
2842
|
-
|
|
2894
|
+
]
|
|
2895
|
+
})
|
|
2843
2896
|
})
|
|
2844
2897
|
}),
|
|
2845
2898
|
showLegends && moreThanMaxRows && /*#__PURE__*/ jsxRuntime.jsx(core$1.Card.Section, {
|
|
@@ -3870,36 +3923,6 @@ flex items-start justify-between items-center flex-nowrap bg-secondary px-1.5 ro
|
|
|
3870
3923
|
});
|
|
3871
3924
|
};
|
|
3872
3925
|
|
|
3873
|
-
const OverflowTooltippedLabel = ({ children, label, className = 'flex-grow font-heading text-md pt-0.5' })=>{
|
|
3874
|
-
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
3875
|
-
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
3876
|
-
label: label,
|
|
3877
|
-
disabled: !showTooltip,
|
|
3878
|
-
position: "top-start",
|
|
3879
|
-
offset: 5,
|
|
3880
|
-
multiline: true,
|
|
3881
|
-
withArrow: true,
|
|
3882
|
-
arrowOffset: 20,
|
|
3883
|
-
classNames: {
|
|
3884
|
-
tooltip: 'bg-base-min bg-opacity-90 text-base-contrast-min shadow-lg font-content font-medium text-xs',
|
|
3885
|
-
arrow: 'bg-base-min bg-opacity-90'
|
|
3886
|
-
},
|
|
3887
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
3888
|
-
className: `${className} truncate ... `,
|
|
3889
|
-
ref: (el)=>{
|
|
3890
|
-
if (el) {
|
|
3891
|
-
if (el.clientWidth < el.scrollWidth) {
|
|
3892
|
-
setShowTooltip(true);
|
|
3893
|
-
} else {
|
|
3894
|
-
setShowTooltip(false);
|
|
3895
|
-
}
|
|
3896
|
-
}
|
|
3897
|
-
},
|
|
3898
|
-
children: children
|
|
3899
|
-
})
|
|
3900
|
-
});
|
|
3901
|
-
};
|
|
3902
|
-
|
|
3903
3926
|
const FacetEnumList = ({ field, facetName, hooks, valueLabel, isSettings = false, isFacetView = true, isSearching = false, showPercent = false, hideIfEmpty = false, showSorting = true, sort = 'value-dsc', moveValuesToBottom = [], excludeValues = [] })=>{
|
|
3904
3927
|
const [isGroupExpanded, setIsGroupExpanded] = React.useState(false);
|
|
3905
3928
|
const cardRef = React.useRef(null);
|
|
@@ -5796,6 +5819,20 @@ const FooterRowComponent = ({ item, rowClassname })=>{
|
|
|
5796
5819
|
case 'Icon':
|
|
5797
5820
|
{
|
|
5798
5821
|
const logo = item[itemType];
|
|
5822
|
+
if (logo.href) {
|
|
5823
|
+
return /*#__PURE__*/ jsxRuntime.jsx("a", {
|
|
5824
|
+
href: logo.href,
|
|
5825
|
+
target: "_blank",
|
|
5826
|
+
rel: "noopener noreferrer",
|
|
5827
|
+
className: className,
|
|
5828
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Image, {
|
|
5829
|
+
src: `${logo.logo}`,
|
|
5830
|
+
width: logo.width,
|
|
5831
|
+
height: logo.height,
|
|
5832
|
+
alt: logo.description
|
|
5833
|
+
})
|
|
5834
|
+
}, `icons-${logo.logo}`);
|
|
5835
|
+
}
|
|
5799
5836
|
return /*#__PURE__*/ jsxRuntime.jsx(Image, {
|
|
5800
5837
|
src: `${logo.logo}`,
|
|
5801
5838
|
width: logo.width,
|
|
@@ -7231,10 +7268,16 @@ const createFieldRendererElement = (field, resource)=>{
|
|
|
7231
7268
|
json: resource,
|
|
7232
7269
|
path: field.field
|
|
7233
7270
|
});
|
|
7234
|
-
if (resourceFieldValue
|
|
7271
|
+
if (!lodash.isArray(resourceFieldValue) || resourceFieldValue.length == 0 || resourceFieldValue[0] === null) {
|
|
7235
7272
|
if (field.includeIfNotAvailable === false) return null;
|
|
7236
|
-
if (field.valueIfNotAvailable)
|
|
7237
|
-
|
|
7273
|
+
if (field.valueIfNotAvailable) {
|
|
7274
|
+
resourceFieldValue = field.valueIfNotAvailable;
|
|
7275
|
+
} else {
|
|
7276
|
+
resourceFieldValue = '';
|
|
7277
|
+
}
|
|
7278
|
+
} else {
|
|
7279
|
+
resourceFieldValue = resourceFieldValue[0];
|
|
7280
|
+
}
|
|
7238
7281
|
const label = field.includeLabel === undefined || field?.includeLabel ? field.name : undefined;
|
|
7239
7282
|
const studyFieldRenderer = StudyDetailsRenderer(field.contentType, field?.renderer ?? 'default');
|
|
7240
7283
|
switch(field.contentType){
|
|
@@ -7491,17 +7534,17 @@ const SinglePageStudyDetailsPanel = ({ data, studyConfig, authorization })=>{
|
|
|
7491
7534
|
children: "Study Details Panel not configured"
|
|
7492
7535
|
});
|
|
7493
7536
|
} else {
|
|
7494
|
-
return studyConfig?.fieldsToShow.map((
|
|
7537
|
+
return studyConfig?.fieldsToShow.map((fieldToShow)=>{
|
|
7495
7538
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
7496
|
-
className: `px-2 ${
|
|
7539
|
+
className: `px-2 ${fieldToShow.groupWidth == 'full' || fieldToShow.groupWidth === undefined ? 'w-full' : 'w-1/2'}`,
|
|
7497
7540
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
7498
7541
|
className: "flex flex-col",
|
|
7499
7542
|
children: [
|
|
7500
|
-
|
|
7543
|
+
fieldToShow?.groupName ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
7501
7544
|
className: "text-lg font-bold",
|
|
7502
|
-
children:
|
|
7545
|
+
children: fieldToShow.groupName
|
|
7503
7546
|
}) : null,
|
|
7504
|
-
|
|
7547
|
+
fieldToShow.fields.map((field)=>{
|
|
7505
7548
|
const element = createFieldRendererElement(field, data);
|
|
7506
7549
|
if (element !== null) {
|
|
7507
7550
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -7512,7 +7555,7 @@ const SinglePageStudyDetailsPanel = ({ data, studyConfig, authorization })=>{
|
|
|
7512
7555
|
})
|
|
7513
7556
|
]
|
|
7514
7557
|
})
|
|
7515
|
-
}, `${
|
|
7558
|
+
}, `${fieldToShow.fields.join('-')}-details`);
|
|
7516
7559
|
});
|
|
7517
7560
|
}
|
|
7518
7561
|
}, [
|
|
@@ -11416,6 +11459,48 @@ const DetailsModal = ({ title, id, row, classNames, panel, panelProps, onClose,
|
|
|
11416
11459
|
});
|
|
11417
11460
|
};
|
|
11418
11461
|
|
|
11462
|
+
const DetailsDrawer = ({ id, title, panel, panelProps })=>{
|
|
11463
|
+
const [opened, { open, close }] = hooks.useDisclosure(id !== undefined);
|
|
11464
|
+
React.useEffect(()=>{
|
|
11465
|
+
if (id !== undefined) open();
|
|
11466
|
+
else close();
|
|
11467
|
+
}, [
|
|
11468
|
+
close,
|
|
11469
|
+
id,
|
|
11470
|
+
open
|
|
11471
|
+
]);
|
|
11472
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(core$1.Drawer.Root, {
|
|
11473
|
+
opened: opened,
|
|
11474
|
+
onClose: close,
|
|
11475
|
+
size: "50%",
|
|
11476
|
+
position: "right",
|
|
11477
|
+
children: [
|
|
11478
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Drawer.Overlay, {
|
|
11479
|
+
opacity: 0.5,
|
|
11480
|
+
blur: 4
|
|
11481
|
+
}),
|
|
11482
|
+
/*#__PURE__*/ jsxRuntime.jsxs(core$1.Drawer.Content, {
|
|
11483
|
+
children: [
|
|
11484
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Drawer.Header, {
|
|
11485
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
11486
|
+
leftSection: /*#__PURE__*/ jsxRuntime.jsx(md.MdKeyboardDoubleArrowLeft, {}),
|
|
11487
|
+
onClick: close,
|
|
11488
|
+
variant: "outline",
|
|
11489
|
+
children: "Back"
|
|
11490
|
+
})
|
|
11491
|
+
}),
|
|
11492
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Drawer.Body, {
|
|
11493
|
+
children: panel({
|
|
11494
|
+
id: id,
|
|
11495
|
+
...panelProps
|
|
11496
|
+
})
|
|
11497
|
+
})
|
|
11498
|
+
]
|
|
11499
|
+
})
|
|
11500
|
+
]
|
|
11501
|
+
});
|
|
11502
|
+
};
|
|
11503
|
+
|
|
11419
11504
|
// TODO need to type this
|
|
11420
11505
|
const RenderArrayCell = ({ cell })=>{
|
|
11421
11506
|
const value = cell.getValue();
|
|
@@ -11886,7 +11971,10 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
11886
11971
|
pageIndex: 0,
|
|
11887
11972
|
pageSize: 10
|
|
11888
11973
|
});
|
|
11889
|
-
const DetailsComponent =
|
|
11974
|
+
const DetailsComponent = React.useMemo(()=>{
|
|
11975
|
+
if (!tableConfig?.detailsConfig || !tableConfig?.detailsConfig?.panel || tableConfig?.detailsConfig?.mode === 'none') return null;
|
|
11976
|
+
return tableConfig?.detailsConfig?.panelContainer === 'drawer' ? DetailsDrawer : DetailsModal;
|
|
11977
|
+
}, []);
|
|
11890
11978
|
const [sorting, setSorting] = React.useState([]);
|
|
11891
11979
|
const [rowSelection, setRowSelection] = React.useState({});
|
|
11892
11980
|
const [selectedRow, setSelectedRow] = React.useState(undefined);
|
|
@@ -11979,6 +12067,12 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
11979
12067
|
onPaginationChange: setPagination,
|
|
11980
12068
|
onSortingChange: setSorting,
|
|
11981
12069
|
enableTopToolbar: false,
|
|
12070
|
+
enableExpandAll: false,
|
|
12071
|
+
displayColumnDefOptions: {
|
|
12072
|
+
'mrt-row-expand': {
|
|
12073
|
+
enableHiding: true
|
|
12074
|
+
}
|
|
12075
|
+
},
|
|
11982
12076
|
enableExpanding: !!tableConfig?.detailsConfig,
|
|
11983
12077
|
getRowId: getRowId(tableConfig),
|
|
11984
12078
|
rowCount: totalRowCount,
|
|
@@ -11988,6 +12082,16 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
11988
12082
|
localization: {
|
|
11989
12083
|
rowsPerPage: limitLabel
|
|
11990
12084
|
},
|
|
12085
|
+
// mantineExpandAllButtonProps: {
|
|
12086
|
+
// style: {
|
|
12087
|
+
// visibility: 'hidden',
|
|
12088
|
+
// },
|
|
12089
|
+
// },
|
|
12090
|
+
// mantineExpandButtonProps: {
|
|
12091
|
+
// style: {
|
|
12092
|
+
// visibility: 'hidden',
|
|
12093
|
+
// },
|
|
12094
|
+
// },
|
|
11991
12095
|
mantineTableProps: {
|
|
11992
12096
|
style: {
|
|
11993
12097
|
backgroundColor: 'var(--mantine-color-base-1)',
|
|
@@ -12019,7 +12123,10 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
12019
12123
|
showProgressBars: isFetching,
|
|
12020
12124
|
showAlertBanner: isError,
|
|
12021
12125
|
density: 'xs',
|
|
12022
|
-
rowSelection: rowSelection
|
|
12126
|
+
rowSelection: rowSelection,
|
|
12127
|
+
columnVisibility: {
|
|
12128
|
+
'mrt-row-expand': false
|
|
12129
|
+
}
|
|
12023
12130
|
},
|
|
12024
12131
|
mantineTableBodyRowProps: tableConfig.detailsConfig?.mode === 'click' ? ({ row })=>({
|
|
12025
12132
|
onClick: ()=>{
|
|
@@ -12054,7 +12161,7 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
12054
12161
|
return /*#__PURE__*/ jsxRuntime.jsx(React.Fragment, {
|
|
12055
12162
|
children: /*#__PURE__*/ jsxRuntime.jsxs(StudyProvider, {
|
|
12056
12163
|
children: [
|
|
12057
|
-
|
|
12164
|
+
DetailsComponent && /*#__PURE__*/ jsxRuntime.jsx(DetailsComponent, {
|
|
12058
12165
|
title: tableConfig?.detailsConfig?.title,
|
|
12059
12166
|
id: Object.keys(rowSelection).length > 0 ? Object.keys(rowSelection).at(0) : undefined,
|
|
12060
12167
|
row: selectedRow,
|
|
@@ -12067,7 +12174,7 @@ const DEFAULT_PAGE_LIMIT = 10000;
|
|
|
12067
12174
|
...tableConfig?.detailsConfig?.params ?? {},
|
|
12068
12175
|
accessibility
|
|
12069
12176
|
}
|
|
12070
|
-
})
|
|
12177
|
+
}),
|
|
12071
12178
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
12072
12179
|
className: "inline-block overflow-x-scroll",
|
|
12073
12180
|
children: /*#__PURE__*/ jsxRuntime.jsx(mantineReactTable.MantineReactTable, {
|
|
@@ -16327,7 +16434,7 @@ const CohortManagerPanel = ({ indexResources, remoteSupportService, size = 'md'
|
|
|
16327
16434
|
]);
|
|
16328
16435
|
useDeepCompare.useDeepCompareEffect(()=>{
|
|
16329
16436
|
if (!currentCohort) {
|
|
16330
|
-
setCurrentCohortId(allCohorts[0].id);
|
|
16437
|
+
appDispatch(setCurrentCohortId(allCohorts[0].id));
|
|
16331
16438
|
}
|
|
16332
16439
|
}, [
|
|
16333
16440
|
allCohorts,
|