@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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +1 -0
- package/lib/config/utils.js +2 -0
- package/lib/providers/config.d.ts +1 -1
- package/lib/providers/config.js +1 -1
- package/package.json +1 -1
- package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +1 -0
- package/src/config/utils.ts +1 -0
- package/src/providers/config.tsx +2 -2
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
|
|
package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js
CHANGED
|
@@ -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};
|
package/lib/config/utils.js
CHANGED
|
@@ -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
|
|
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;
|
package/lib/providers/config.js
CHANGED
|
@@ -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
package/src/config/utils.ts
CHANGED
|
@@ -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);
|
package/src/providers/config.tsx
CHANGED
|
@@ -16,7 +16,7 @@ export type ConfigContextProps = {
|
|
|
16
16
|
export interface ConfigProps {
|
|
17
17
|
children: ReactNode | ReactNode[];
|
|
18
18
|
config: SiteConfig;
|
|
19
|
-
entityListType
|
|
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);
|