@databiosphere/findable-ui 15.0.1 → 15.0.2

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "15.0.1"
2
+ ".": "15.0.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [15.0.2](https://github.com/DataBiosphere/findable-ui/compare/v15.0.1...v15.0.2) (2024-11-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * centre alignment of version info and update Config Provider entity list as optional ([#275](https://github.com/DataBiosphere/findable-ui/issues/275)) ([#276](https://github.com/DataBiosphere/findable-ui/issues/276)) ([4234063](https://github.com/DataBiosphere/findable-ui/commit/4234063fe1180afde7e5195bb54faa453c190ae0))
9
+
3
10
  ## [15.0.1](https://github.com/DataBiosphere/findable-ui/compare/v15.0.0...v15.0.1) (2024-11-20)
4
11
 
5
12
 
@@ -2,6 +2,7 @@ import styled from "@emotion/styled";
2
2
  import { Chip } from "@mui/material";
3
3
  import { inkLight } from "../../../../../../styles/common/mixins/colors";
4
4
  export const StyledChip = styled(Chip) `
5
+ align-self: center;
5
6
  border-radius: 4px;
6
7
  .MuiChip-label {
7
8
  color: ${inkLight};
@@ -67,6 +67,8 @@ export function getDefaultSorting(entityConfig) {
67
67
  export function getEntityConfig(entities, entityListType
68
68
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This config model is part of a generic array
69
69
  ) {
70
+ if (!entityListType)
71
+ return getDefaultEntityConfig();
70
72
  const entityConfig = entities.find(({ route }) => route === entityListType);
71
73
  if (!entityConfig) {
72
74
  throw Error("No entity config found with name: " + entityListType);
@@ -9,7 +9,7 @@ export type ConfigContextProps = {
9
9
  export interface ConfigProps {
10
10
  children: ReactNode | ReactNode[];
11
11
  config: SiteConfig;
12
- entityListType: string;
12
+ entityListType?: string;
13
13
  }
14
14
  export declare const ConfigContext: React.Context<ConfigContextProps>;
15
15
  export declare function ConfigProvider({ children, config, entityListType, }: ConfigProps): JSX.Element;
@@ -6,7 +6,7 @@ export const ConfigContext = createContext({
6
6
  entityConfig: getDefaultEntityConfig(),
7
7
  entityListType: "",
8
8
  });
9
- export function ConfigProvider({ children, config, entityListType, }) {
9
+ export function ConfigProvider({ children, config, entityListType = "", }) {
10
10
  const { entities } = config;
11
11
  const defaultEntityListType = config.redirectRootToPath.slice(1);
12
12
  const entityName = entityListType || defaultEntityListType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "15.0.1",
3
+ "version": "15.0.2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -3,6 +3,7 @@ import { Chip } from "@mui/material";
3
3
  import { inkLight } from "../../../../../../styles/common/mixins/colors";
4
4
 
5
5
  export const StyledChip = styled(Chip)`
6
+ align-self: center;
6
7
  border-radius: 4px;
7
8
  .MuiChip-label {
8
9
  color: ${inkLight};
@@ -75,6 +75,7 @@ export function getEntityConfig(
75
75
  entityListType: string
76
76
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This config model is part of a generic array
77
77
  ): EntityConfig {
78
+ if (!entityListType) return getDefaultEntityConfig();
78
79
  const entityConfig = entities.find(({ route }) => route === entityListType);
79
80
  if (!entityConfig) {
80
81
  throw Error("No entity config found with name: " + entityListType);
@@ -16,7 +16,7 @@ export type ConfigContextProps = {
16
16
  export interface ConfigProps {
17
17
  children: ReactNode | ReactNode[];
18
18
  config: SiteConfig;
19
- entityListType: string;
19
+ entityListType?: string;
20
20
  }
21
21
 
22
22
  export const ConfigContext = createContext<ConfigContextProps>({
@@ -29,7 +29,7 @@ export const ConfigContext = createContext<ConfigContextProps>({
29
29
  export function ConfigProvider({
30
30
  children,
31
31
  config,
32
- entityListType,
32
+ entityListType = "",
33
33
  }: ConfigProps): JSX.Element {
34
34
  const { entities } = config;
35
35
  const defaultEntityListType = config.redirectRootToPath.slice(1);