@gen3/frontend 0.11.12 → 0.11.14

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.
Files changed (82) hide show
  1. package/dist/cjs/index.js +344 -239
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts +16 -10
  4. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts.map +1 -1
  5. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +24 -13
  6. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
  7. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +43 -30
  8. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js.map +1 -1
  9. package/dist/dts/components/Providers/Gen3Provider.d.ts +141 -4
  10. package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
  11. package/dist/dts/components/charts/Charts.d.ts.map +1 -1
  12. package/dist/dts/components/charts/Charts.js +27 -31
  13. package/dist/dts/components/charts/Charts.js.map +1 -1
  14. package/dist/dts/components/charts/CollapsableCharts.d.ts +2 -2
  15. package/dist/dts/components/charts/CollapsableCharts.d.ts.map +1 -1
  16. package/dist/dts/components/charts/CollapsableCharts.js +2 -2
  17. package/dist/dts/components/charts/CollapsableCharts.js.map +1 -1
  18. package/dist/dts/components/charts/createChart.d.ts.map +1 -1
  19. package/dist/dts/components/charts/createChart.js +7 -12
  20. package/dist/dts/components/charts/createChart.js.map +1 -1
  21. package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts.map +1 -1
  22. package/dist/dts/components/charts/echarts/HorizontalBarChart.js +7 -4
  23. package/dist/dts/components/charts/echarts/HorizontalBarChart.js.map +1 -1
  24. package/dist/dts/components/facets/EnumFacet.d.ts +1 -1
  25. package/dist/dts/components/facets/EnumFacet.d.ts.map +1 -1
  26. package/dist/dts/components/facets/EnumFacet.js +6 -6
  27. package/dist/dts/components/facets/EnumFacet.js.map +1 -1
  28. package/dist/dts/components/facets/FacetEnumList.d.ts +2 -0
  29. package/dist/dts/components/facets/FacetEnumList.d.ts.map +1 -1
  30. package/dist/dts/components/facets/FacetEnumList.js +24 -18
  31. package/dist/dts/components/facets/FacetEnumList.js.map +1 -1
  32. package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
  33. package/dist/dts/components/facets/createFacetCard.js +4 -4
  34. package/dist/dts/components/facets/createFacetCard.js.map +1 -1
  35. package/dist/dts/components/facets/types.d.ts +4 -0
  36. package/dist/dts/components/facets/types.d.ts.map +1 -1
  37. package/dist/dts/components/facets/types.js.map +1 -1
  38. package/dist/dts/components/facets/utils.d.ts.map +1 -1
  39. package/dist/dts/components/facets/utils.js +18 -0
  40. package/dist/dts/components/facets/utils.js.map +1 -1
  41. package/dist/dts/features/Analysis/AnalysisCard.d.ts.map +1 -1
  42. package/dist/dts/features/Analysis/AnalysisCard.js +1 -1
  43. package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -1
  44. package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts.map +1 -1
  45. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +14 -14
  46. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
  47. package/dist/dts/features/Analysis/TextDescription.d.ts.map +1 -1
  48. package/dist/dts/features/Analysis/TextDescription.js +3 -19
  49. package/dist/dts/features/Analysis/TextDescription.js.map +1 -1
  50. package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
  51. package/dist/dts/features/CohortBuilder/CohortBuilder.js +3 -13
  52. package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
  53. package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
  54. package/dist/dts/features/CohortBuilder/CohortPanel.js +28 -21
  55. package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
  56. package/dist/dts/features/CohortDiscovery/registerApp.js +1 -1
  57. package/dist/dts/features/CohortDiscovery/registerApp.js.map +1 -1
  58. package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +10 -10
  59. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.d.ts.map +1 -1
  60. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js +1 -0
  61. package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js.map +1 -1
  62. package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
  63. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +1 -1
  64. package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
  65. package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
  66. package/dist/dts/features/Discovery/DiscoveryTable.js +30 -5
  67. package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
  68. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts +1 -0
  69. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts.map +1 -1
  70. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js +10 -0
  71. package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js.map +1 -1
  72. package/dist/dts/features/Discovery/types.d.ts +7 -0
  73. package/dist/dts/features/Discovery/types.d.ts.map +1 -1
  74. package/dist/dts/features/Discovery/types.js.map +1 -1
  75. package/dist/dts/features/Navigation/NavigationBar.d.ts.map +1 -1
  76. package/dist/dts/features/Navigation/NavigationBar.js +3 -2
  77. package/dist/dts/features/Navigation/NavigationBar.js.map +1 -1
  78. package/dist/esm/index.js +345 -240
  79. package/dist/esm/index.js.map +1 -1
  80. package/dist/index.d.ts +170 -17
  81. package/dist/tsconfig.tsbuildinfo +1 -1
  82. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -7,7 +7,6 @@ import { MRT_Row, MRT_RowData, MRT_Cell, MRT_Column, MRT_TableInstance } from 'm
7
7
  import * as _mantine_core from '@mantine/core';
8
8
  import { ButtonProps, BoxProps, FloatingPosition, SegmentedControlProps as SegmentedControlProps$1, TitleOrder } from '@mantine/core';
9
9
  import * as tailwind_styled_components_dist_tailwind from 'tailwind-styled-components/dist/tailwind';
10
- import * as type_fest_source_partial_deep from 'type-fest/source/partial-deep';
11
10
  import { GetServerSideProps, NextPage, GetStaticProps, NextApiRequest, NextApiResponse } from 'next';
12
11
  import { IconType } from 'react-icons';
13
12
 
@@ -396,10 +395,10 @@ interface ChartsPanelProps {
396
395
  config: CollapsableChartsPanelConfiguration;
397
396
  data: AggregationsData;
398
397
  isFetching?: boolean;
399
- isSuccess?: boolean;
398
+ isSuccess: boolean;
400
399
  isError?: boolean;
401
400
  }
402
- declare const CollapsableCharts: ({ config, data }: ChartsPanelProps) => react_jsx_runtime.JSX.Element;
401
+ declare const CollapsableCharts: ({ config, data, isError, isFetching, isSuccess, }: ChartsPanelProps) => react_jsx_runtime.JSX.Element;
403
402
  //# sourceMappingURL=CollapsableCharts.d.ts.map
404
403
 
405
404
  interface ReactEChartsProps {
@@ -474,6 +473,8 @@ interface FacetCardProps<T extends FacetCommonHooks> {
474
473
  readonly sharedWithIndices?: Array<IndexAndField>;
475
474
  readonly Chart?: React__default.FC<EnumChartProps>;
476
475
  readonly queryOptions?: QueryOptions;
476
+ readonly moveValuesToBottom?: Array<string>;
477
+ readonly excludeValues?: Array<string>;
477
478
  readonly header?: {
478
479
  readonly Panel: ComponentType<{
479
480
  children: ReactNode;
@@ -659,6 +660,8 @@ interface FacetDefinition {
659
660
  readonly hasData?: boolean;
660
661
  readonly label?: string;
661
662
  readonly sharedWithIndices?: Array<IndexAndField>;
663
+ readonly moveValuesToBottom?: Array<string>;
664
+ readonly excludeValues?: Array<string>;
662
665
  }
663
666
 
664
667
  type RendererFunction<T> = (props: T, ...params: any[]) => ReactNode;
@@ -1003,7 +1006,7 @@ interface EnumFacetHooks extends FacetDataHooks {
1003
1006
  useGetFacetData: GetEnumFacetDataFunction;
1004
1007
  updateVisibleValues?: EnumFacetDataChangedFunction;
1005
1008
  }
1006
- declare const EnumFacet: ({ field, hooks, valueLabel, description, facetName, showPercent, hideIfEmpty, showSearch, showFlip, showSettings, startShowingData, dismissCallback, width, sharedWithIndices, header, }: FacetCardProps<EnumFacetHooks>) => react_jsx_runtime.JSX.Element;
1009
+ declare const EnumFacet: ({ field, hooks, valueLabel, description, facetName, showPercent, hideIfEmpty, showSearch, showFlip, showSettings, startShowingData, dismissCallback, width, sharedWithIndices, moveValuesToBottom, excludeValues, header, }: FacetCardProps<EnumFacetHooks>) => react_jsx_runtime.JSX.Element;
1007
1010
 
1008
1011
  type ExactValueProps$1 = Omit<FacetCardProps<FacetDataHooks>, 'showSearch' | 'showFlip' | 'showPercent' | 'valueLabel'>;
1009
1012
  /**
@@ -1483,8 +1486,15 @@ interface MinimalFieldMapping {
1483
1486
  dataAvailabilityField: string;
1484
1487
  uid: string;
1485
1488
  }
1489
+ type RowSelectCompareFunctions = 'arrayNotEmpty' | 'alwaysTrue';
1490
+ interface SelectableRowConfiguration {
1491
+ field: string;
1492
+ comparer: RowSelectCompareFunctions;
1493
+ value?: string | number;
1494
+ }
1486
1495
  interface DiscoveryTableConfig {
1487
1496
  selectableRows?: boolean;
1497
+ selectableRowConfiguration?: SelectableRowConfiguration;
1488
1498
  expandableRows?: boolean;
1489
1499
  expandingRowRenderFunction?: string;
1490
1500
  }
@@ -1976,15 +1986,15 @@ interface DropdownWithIconProps {
1976
1986
  /**
1977
1987
  * if true, doesn't set width to be "target"
1978
1988
  */
1979
- disableTargetWidth?: string;
1989
+ disableTargetWidth?: boolean;
1980
1990
  /**
1981
- * Left Icon for the taret button, can be undefined too
1991
+ * Left Section for the target button, can be undefined too
1982
1992
  */
1983
- LeftIcon?: JSX.Element;
1993
+ LeftSection?: JSX.Element;
1984
1994
  /**
1985
- * Right Icon for the taret button, can be undefined too (default to dropdown icon)
1995
+ * Right Section for the target button, can be undefined too (default to dropdown icon)
1986
1996
  */
1987
- RightIcon?: JSX.Element;
1997
+ RightSection?: JSX.Element;
1988
1998
  /**
1989
1999
  * Content for target button
1990
2000
  */
@@ -2001,6 +2011,8 @@ interface DropdownWithIconProps {
2001
2011
  onClick?: () => void;
2002
2012
  icon?: JSX.Element;
2003
2013
  disabled?: boolean;
2014
+ isLoading?: boolean;
2015
+ loadingTooltip?: string;
2004
2016
  }>;
2005
2017
  /**
2006
2018
  * only provide menuLabelText if we want label for dropdown elements
@@ -2025,17 +2037,21 @@ interface DropdownWithIconProps {
2025
2037
  /**
2026
2038
  * custom test id
2027
2039
  */
2028
- customDataTestId?: string;
2040
+ customTargetButtonDataTestId?: string;
2029
2041
  /**
2030
- tooltip
2042
+ target button's tooltip
2031
2043
  */
2032
- tooltip?: string;
2044
+ targetButtonTooltip?: string;
2033
2045
  /**
2034
2046
  * aria-label for the button
2035
2047
  */
2036
2048
  buttonAriaLabel?: string;
2049
+ /**
2050
+ * Determines whether Menu should be closed when item is clicked
2051
+ */
2052
+ closeOnItemClick?: boolean;
2037
2053
  }
2038
- declare const DropdownWithIcon: ({ disableTargetWidth, LeftIcon, RightIcon, TargetButtonChildren, targetButtonDisabled, dropdownElements, menuLabelText, menuLabelCustomClass, customPosition, fullHeight, zIndex, customDataTestId, tooltip, buttonAriaLabel, }: DropdownWithIconProps) => JSX.Element;
2054
+ declare const DropdownWithIcon: ({ disableTargetWidth, LeftSection, RightSection, TargetButtonChildren, targetButtonDisabled, dropdownElements, menuLabelText, menuLabelCustomClass, customPosition, fullHeight, zIndex, customTargetButtonDataTestId, targetButtonTooltip, buttonAriaLabel, closeOnItemClick, }: DropdownWithIconProps) => JSX.Element;
2039
2055
 
2040
2056
  declare const ActionButton: ({ title, enabled, type, leftIcon, rightIcon, tooltipText, }: DownloadButtonProps) => react_jsx_runtime.JSX.Element;
2041
2057
  //# sourceMappingURL=ActionButton.d.ts.map
@@ -2066,10 +2082,147 @@ interface Gen3ProviderProps {
2066
2082
  modalsConfig: ModalsConfig;
2067
2083
  children?: ReactNode | undefined;
2068
2084
  }
2069
- declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) => type_fest_source_partial_deep.PartialObjectDeep<_mantine_core.MantineTheme, {
2070
- recurseIntoArrays: false;
2071
- allowUndefinedInNonTupleArrays: true;
2072
- }>;
2085
+ declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) => {
2086
+ focusRing?: "auto" | "always" | "never" | undefined;
2087
+ scale?: number | undefined;
2088
+ fontSmoothing?: boolean | undefined;
2089
+ white?: string | undefined;
2090
+ black?: string | undefined;
2091
+ colors?: {
2092
+ [x: string & {}]: _mantine_core.MantineColorsTuple | undefined;
2093
+ dark?: _mantine_core.MantineColorsTuple | undefined;
2094
+ gray?: _mantine_core.MantineColorsTuple | undefined;
2095
+ red?: _mantine_core.MantineColorsTuple | undefined;
2096
+ pink?: _mantine_core.MantineColorsTuple | undefined;
2097
+ grape?: _mantine_core.MantineColorsTuple | undefined;
2098
+ violet?: _mantine_core.MantineColorsTuple | undefined;
2099
+ indigo?: _mantine_core.MantineColorsTuple | undefined;
2100
+ blue?: _mantine_core.MantineColorsTuple | undefined;
2101
+ cyan?: _mantine_core.MantineColorsTuple | undefined;
2102
+ green?: _mantine_core.MantineColorsTuple | undefined;
2103
+ lime?: _mantine_core.MantineColorsTuple | undefined;
2104
+ yellow?: _mantine_core.MantineColorsTuple | undefined;
2105
+ orange?: _mantine_core.MantineColorsTuple | undefined;
2106
+ teal?: _mantine_core.MantineColorsTuple | undefined;
2107
+ } | undefined;
2108
+ primaryShade?: _mantine_core.MantineColorShade | {
2109
+ light?: _mantine_core.MantineColorShade | undefined;
2110
+ dark?: _mantine_core.MantineColorShade | undefined;
2111
+ } | undefined;
2112
+ primaryColor?: string | undefined;
2113
+ variantColorResolver?: _mantine_core.VariantColorsResolver | undefined;
2114
+ autoContrast?: boolean | undefined;
2115
+ luminanceThreshold?: number | undefined;
2116
+ fontFamily?: string | undefined;
2117
+ fontFamilyMonospace?: string | undefined;
2118
+ headings?: {
2119
+ fontFamily?: string | undefined;
2120
+ fontWeight?: string | undefined;
2121
+ textWrap?: "wrap" | "balance" | "nowrap" | "pretty" | "stable" | undefined;
2122
+ sizes?: {
2123
+ h1?: {
2124
+ fontSize?: string | undefined;
2125
+ fontWeight?: string | undefined;
2126
+ lineHeight?: string | undefined;
2127
+ } | undefined;
2128
+ h2?: {
2129
+ fontSize?: string | undefined;
2130
+ fontWeight?: string | undefined;
2131
+ lineHeight?: string | undefined;
2132
+ } | undefined;
2133
+ h3?: {
2134
+ fontSize?: string | undefined;
2135
+ fontWeight?: string | undefined;
2136
+ lineHeight?: string | undefined;
2137
+ } | undefined;
2138
+ h4?: {
2139
+ fontSize?: string | undefined;
2140
+ fontWeight?: string | undefined;
2141
+ lineHeight?: string | undefined;
2142
+ } | undefined;
2143
+ h5?: {
2144
+ fontSize?: string | undefined;
2145
+ fontWeight?: string | undefined;
2146
+ lineHeight?: string | undefined;
2147
+ } | undefined;
2148
+ h6?: {
2149
+ fontSize?: string | undefined;
2150
+ fontWeight?: string | undefined;
2151
+ lineHeight?: string | undefined;
2152
+ } | undefined;
2153
+ } | undefined;
2154
+ } | undefined;
2155
+ radius?: {
2156
+ [x: string & {}]: string | undefined;
2157
+ xl?: string | undefined;
2158
+ xs?: string | undefined;
2159
+ sm?: string | undefined;
2160
+ md?: string | undefined;
2161
+ lg?: string | undefined;
2162
+ } | undefined;
2163
+ defaultRadius?: _mantine_core.MantineRadius | undefined;
2164
+ spacing?: {
2165
+ [x: number]: string | undefined;
2166
+ [x: string & {}]: string | undefined;
2167
+ xl?: string | undefined;
2168
+ xs?: string | undefined;
2169
+ sm?: string | undefined;
2170
+ md?: string | undefined;
2171
+ lg?: string | undefined;
2172
+ } | undefined;
2173
+ fontSizes?: {
2174
+ [x: string & {}]: string | undefined;
2175
+ xl?: string | undefined;
2176
+ xs?: string | undefined;
2177
+ sm?: string | undefined;
2178
+ md?: string | undefined;
2179
+ lg?: string | undefined;
2180
+ } | undefined;
2181
+ lineHeights?: {
2182
+ [x: string & {}]: string | undefined;
2183
+ xl?: string | undefined;
2184
+ xs?: string | undefined;
2185
+ sm?: string | undefined;
2186
+ md?: string | undefined;
2187
+ lg?: string | undefined;
2188
+ } | undefined;
2189
+ breakpoints?: {
2190
+ [x: string & {}]: string | undefined;
2191
+ xl?: string | undefined;
2192
+ xs?: string | undefined;
2193
+ sm?: string | undefined;
2194
+ md?: string | undefined;
2195
+ lg?: string | undefined;
2196
+ } | undefined;
2197
+ shadows?: {
2198
+ [x: string & {}]: string | undefined;
2199
+ xl?: string | undefined;
2200
+ xs?: string | undefined;
2201
+ sm?: string | undefined;
2202
+ md?: string | undefined;
2203
+ lg?: string | undefined;
2204
+ } | undefined;
2205
+ respectReducedMotion?: boolean | undefined;
2206
+ cursorType?: "default" | "pointer" | undefined;
2207
+ defaultGradient?: {
2208
+ from?: string | undefined;
2209
+ to?: string | undefined;
2210
+ deg?: number | undefined;
2211
+ } | undefined;
2212
+ activeClassName?: string | undefined;
2213
+ focusClassName?: string | undefined;
2214
+ components?: {
2215
+ [x: string]: {
2216
+ classNames?: any;
2217
+ styles?: any;
2218
+ vars?: any;
2219
+ defaultProps?: any;
2220
+ } | undefined;
2221
+ } | undefined;
2222
+ other?: {
2223
+ [x: string]: any;
2224
+ } | undefined;
2225
+ };
2073
2226
  /**
2074
2227
  * Gen3Provider wraps around the entire app and provides general configurations
2075
2228
  * for the whole website like color scheme, icons, fonts, and sessionConfigs like