Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/version 0.10.69 #305

Merged
merged 13 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages": ["packages/*"],
"version": "0.10.68"
"version": "0.10.73"
}
9,341 changes: 6,725 additions & 2,616 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lint": "lerna run lint",
"lint-fix": "eslint . --fix",
"oxlint": "oxlint .",
"build": "lerna run build --include-dependencies",
"build": "lerna run build --include-dependencies --stream",
"build:pkg": "lerna run build --include-dependencies --stream --ignore=@gen3/samplecommons",
"build:clean": "lerna run build:clean",
"compile": "lerna run compile",
"dev": "lerna run dev",
Expand All @@ -35,12 +36,12 @@
"@grafana/faro-react": "^1.9.1",
"@grafana/faro-web-sdk": "^1.9.1",
"@grafana/faro-web-tracing": "^1.9.1",
"@mantine/core": "^7.14.3",
"@mantine/form": "^7.14.3",
"@mantine/hooks": "^7.14.3",
"@mantine/modals": "^7.14.3",
"@mantine/dates": "^7.14.3",
"@mantine/notifications": "^7.14.3",
"@mantine/core": "^7.16.0",
"@mantine/dates": "^7.16.0",
"@mantine/form": "^7.16.0",
"@mantine/hooks": "^7.16.0",
"@mantine/modals": "^7.16.0",
"@mantine/notifications": "^7.16.0",
"classnames": "^2.3.1",
"colorette": "^2.0.20",
"cookies-next": "4.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@gen3/core",
"version": "0.10.68",
"version": "0.10.73",
"author": "CTDS",
"description": "Core module for gen3 frontend. Provides an interface for interacting with the gen3 API and a redux store for managing state.",
"description": "Core module for Gen3.2. Packages provides an interface for interacting with the gen3 API and a redux store for managing state.",
"license": "Apache-2.0",
"engines": {
"npm": ">=10.8.2",
Expand Down
20 changes: 10 additions & 10 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gen3/frontend",
"version": "0.10.68",
"version": "0.10.73",
"description": "Gen3 frontend components, content management, and pages",
"keywords": [],
"author": "Center for Translational Data Science",
Expand Down Expand Up @@ -49,16 +49,17 @@
"os": false
},
"dependencies": {
"@gen3/core": "^0.10.73",
"@graphiql/react": "^0.23.1",
"@hello-pangea/dnd": "^17.0.0",
"@iconify/react": "^5.0.2",
"@kbox-labs/react-echarts": "^1.4.0",
"@mantine/core": "^7.15.2",
"@mantine/dates": "^7.15.2",
"@mantine/form": "^7.15.2",
"@mantine/hooks": "^7.15.2",
"@mantine/modals": "^7.15.2",
"@mantine/notifications": "^7.15.2",
"@mantine/core": "^7.16.0",
"@mantine/dates": "^7.16.0",
"@mantine/form": "^7.16.0",
"@mantine/hooks": "^7.16.0",
"@mantine/modals": "^7.16.0",
"@mantine/notifications": "^7.16.0",
"@mdx-js/loader": "^2.1.5",
"@mdx-js/mdx": "^2.1.5",
"@next/mdx": "^14.1.1",
Expand All @@ -84,10 +85,10 @@
"jose": "^4.15.9",
"js-cookie": "^3.0.5",
"json-file-database": "^2.0.3",
"mantine-react-table": "^2.0.0-beta.7",
"mantine-react-table": "^2.0.0-beta.8",
"mathjs": "^13.1.1",
"minisearch": "^6.3.0",
"next": "^14.2.15",
"next": "^14.2.23",
"next-compose-plugins": "^2.2.1",
"next-images": "^1.8.5",
"node-json-db": "^2.3.0",
Expand Down Expand Up @@ -146,7 +147,6 @@
"swr": "^2.2.5"
},
"peerDependencies": {
"@gen3/core": "file:../core",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.16"
Expand Down
26 changes: 9 additions & 17 deletions packages/frontend/src/components/Providers/Gen3Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ import { SessionConfiguration } from '../../lib/session/types';
import { Gen3ModalsProvider, type ModalsConfig } from '../Modals';

interface Gen3ProviderProps {
colors: Record<string, TenStringArray>;
icons: Array<RegisteredIcons>;
fonts: Fonts;
sessionConfig: SessionConfiguration;
modalsConfig: ModalsConfig;
children?: ReactNode | undefined;
}

// Define theme for mantine v7
const createMantineTheme = (
export const createMantineTheme = (
fonts: Fonts,
colors: Record<string, TenStringArray>,
) => {
Expand Down Expand Up @@ -82,9 +80,7 @@ const createMantineTheme = (
* inactivity limits for session timeouts.
*/
const Gen3Provider = ({
colors,
icons,
fonts,
sessionConfig,
modalsConfig,
children,
Expand All @@ -93,20 +89,16 @@ const Gen3Provider = ({
icons.forEach((i) => addCollection(i));
}, [icons]);

const theme = createMantineTheme(fonts, colors);

return (
<CoreProvider>
<MantineProvider theme={theme}>
<ModalsProvider>
<Notifications />
<SessionProvider {...sessionConfig}>
<Gen3ModalsProvider config={modalsConfig}>
{children}
</Gen3ModalsProvider>
</SessionProvider>
</ModalsProvider>
</MantineProvider>
<ModalsProvider>
<Notifications />
<SessionProvider {...sessionConfig}>
<Gen3ModalsProvider config={modalsConfig}>
{children}
</Gen3ModalsProvider>
</SessionProvider>
</ModalsProvider>
</CoreProvider>
);
};
Expand Down
5 changes: 4 additions & 1 deletion packages/frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { registerMetadataSchemaApp } from './features/Dictionary';
import '@gen3/core';

// export Gen3 data UI standard pages
import Gen3Provider from './components/Providers/Gen3Provider';
import Gen3Provider, {
createMantineTheme,
} from './components/Providers/Gen3Provider';
import DiscoveryPage from './pages/Discovery/Discovery';
import { DiscoveryPageGetServerSideProps } from './pages/Discovery/data';

Expand Down Expand Up @@ -127,6 +129,7 @@ export {
sessionLogout,
credentialsLogin,
credentialsLogout,
createMantineTheme,
AiSearchPage,
AISearchPageGetServerSideProps,
CrosswalkPage,
Expand Down
9 changes: 1 addition & 8 deletions packages/sampleCommons/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@ const nextConfig = {
experimental: {
esmExternals: true,
instrumentationHook: true,
turbo: {
loaders: {
'.js': ['jsx'],
'.jsx': ['jsx'],
'.ts': ['tsx'],
'.tsx': ['tsx'],
},
},
},
pageExtensions: ['mdx', 'md', 'jsx', 'js', 'tsx', 'ts'],
transpilePackages: ['@gen3/core', '@gen3/frontend'],
basePath: basePath,
webpack: (config) => {
config.infrastructureLogging = {
Expand Down
14 changes: 9 additions & 5 deletions packages/sampleCommons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gen3/samplecommons",
"version": "0.10.68",
"version": "0.10.73",
"private": true,
"scripts": {
"lint": "next lint",
Expand All @@ -20,16 +20,20 @@
"@fontsource/source-sans-pro": "^5.0.8",
"@gen3/core": "file:../core",
"@gen3/frontend": "file:../frontend",
"@mantine/core": "^7.16.0",
"@mantine/dates": "^7.16.0",
"@mantine/form": "^7.16.0",
"@mantine/hooks": "^7.16.0",
"@mantine/modals": "^7.16.0",
"@mantine/notifications": "^7.16.0",
"@mdx-js/loader": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"cookies-next": "^4.3.0",
"file-system-db": "^2.1.0",
"idb": "^8.0.0",
"jose": "^4.15.9",
"mantine-react-table": "^2.0.0-beta.7",
"next": "^14.2.15",
"react": "^18.3.1",
"react-dom": "18.3.1",
"mantine-react-table": "^2.0.0-beta.8",
"next": "^14.2.23",
"sharp": "^0.33.5"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const DetailsWithTagsRowRenderer = (
</Text>

<div className="flex space-x-6 space-y-6 flex-wrap">
{row.original?.tags.map((tagInfo: TagData) => {
{row.original?.tags?.map((tagInfo: TagData) => {
const { color, display, label } = getTagInfo(tagInfo, config.tags);

if (tagInfo.name === '') return null; // no tag
Expand Down
31 changes: 18 additions & 13 deletions packages/sampleCommons/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import App, { AppProps, AppContext, AppInitialProps } from 'next/app';
import React, { useEffect, useRef } from 'react';

import React, { useEffect, useMemo, useRef } from 'react';
import { MantineProvider } from '@mantine/core';
import { Faro, FaroErrorBoundary, withFaroProfiler } from '@grafana/faro-react';

import { initGrafanaFaro } from '../lib/Grafana/grafana';

import {
Expand All @@ -11,6 +10,7 @@ import {
type ModalsConfig,
RegisteredIcons,
Fonts,
createMantineTheme,
SessionConfiguration,
// registerCohortDiscoveryApp,
registerCohortDiversityApp,
Expand All @@ -28,7 +28,7 @@ import '@fontsource/poppins';

import { setDRSHostnames } from '@gen3/core';
import drsHostnames from '../../config/drsHostnames.json';
import { loadContent } from '../lib/content/loadContent';
import { loadContent } from '@/lib/content/loadContent';

if (typeof window !== 'undefined' && process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
Expand Down Expand Up @@ -78,17 +78,22 @@ const Gen3App = ({
// }
}, []);

const theme = useMemo(
() => createMantineTheme(themeFonts, colors),
[themeFonts, colors],
);

return (
<FaroErrorBoundary>
<Gen3Provider
colors={colors}
icons={icons}
fonts={themeFonts}
sessionConfig={sessionConfig}
modalsConfig={modalsConfig}
>
<Component {...pageProps} />
</Gen3Provider>
<MantineProvider theme={theme}>
<Gen3Provider
icons={icons}
sessionConfig={sessionConfig}
modalsConfig={modalsConfig}
>
<Component {...pageProps} />
</Gen3Provider>
</MantineProvider>
</FaroErrorBoundary>
);
};
Expand Down
4 changes: 2 additions & 2 deletions packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gen3/toolsff",
"version": "0.10.68",
"description": "tools for processing portal content",
"version": "0.10.73",
"description": "tools for processing Gen3 commons content: color theme, icons",
"main": "index.js",
"type": "module",
"engines": {
Expand Down
Loading