Skip to content

Commit

Permalink
Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 12, 2025
1 parent ae30775 commit 8d28920
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Attributes from './Attributes'
import BaseCard from './BaseCard'

import type { BaseCardProps, BaseProps } from '../types'

export interface BaseInputProps extends BaseCardProps {
omit?: string[]
model: any
descriptions?: Record<string, React.ReactNode>
formatter?: (val: unknown, key: string) => React.ReactNode
}

export default function BaseAttributes(props: BaseProps) {
const { title = 'Attributes', feature } = props
return (
<BaseCard {...props} title={title}>
<Attributes {...props} attributes={feature} />
</BaseCard>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import BaseCard from './BaseCard'

Check failure on line 1 in packages/core/BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails.tsx

View workflow job for this annotation

GitHub Actions / Lint, typecheck, test

There should be no empty line within import group

import CoreDetails from './CoreDetails'

import type { BaseProps } from '../types'

export default function BaseCoreDetails(props: BaseProps) {
const { title = 'Primary data' } = props
return (
<BaseCard {...props} title={title}>
<CoreDetails {...props} />
</BaseCard>
)
}
33 changes: 3 additions & 30 deletions packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,11 @@
import { observer } from 'mobx-react'

// utils
import { isEmpty } from './util'
import { replaceUndefinedWithNull } from '../util'
import Attributes from './Attributes'
import BaseCard from './BaseCard'
import CoreDetails from './CoreDetails'
import FeatureDetails from './FeatureDetails'
import { ErrorMessage } from '../../ui'

import type { BaseCardProps, BaseProps } from '../types'

export const BaseCoreDetails = (props: BaseProps) => {
const { title = 'Primary data' } = props
return (
<BaseCard {...props} title={title}>
<CoreDetails {...props} />
</BaseCard>
)
}

export const BaseAttributes = (props: BaseProps) => {
const { feature } = props
return (
<BaseCard {...props} title="Attributes">
<Attributes {...props} attributes={feature} />
</BaseCard>
)
}

export interface BaseInputProps extends BaseCardProps {
omit?: string[]
model: any
descriptions?: Record<string, React.ReactNode>
formatter?: (val: unknown, key: string) => React.ReactNode
}
import type { BaseInputProps } from './types'

const BaseFeatureDetail = observer(function ({ model }: BaseInputProps) {
const { error, featureData } = model
Expand All @@ -58,4 +29,6 @@ const BaseFeatureDetail = observer(function ({ model }: BaseInputProps) {
export default BaseFeatureDetail

export { default as BaseCard } from './BaseCard'
export { default as BaseAttributes } from './BaseAttributes'
export { default as BaseCoreDetails } from './BaseCoreDetails'
export { default as FeatureDetails } from './FeatureDetails'
8 changes: 8 additions & 0 deletions packages/core/BaseFeatureWidget/BaseFeatureDetail/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { BaseCardProps } from '../types'

Check failure on line 1 in packages/core/BaseFeatureWidget/BaseFeatureDetail/types.ts

View workflow job for this annotation

GitHub Actions / Lint, typecheck, test

All imports in the declaration are only used as types. Use `import type`

export interface BaseInputProps extends BaseCardProps {
omit?: string[]
model: any
descriptions?: Record<string, React.ReactNode>
formatter?: (val: unknown, key: string) => React.ReactNode
}
17 changes: 13 additions & 4 deletions packages/core/ReExports/modules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { LazyExoticComponent } from 'react'
import * as React from 'react'
import { Suspense, forwardRef, lazy } from 'react'

import { useTheme } from '@mui/material'
import { alpha, createTheme, useTheme } from '@mui/material'
import * as MUIStyles from '@mui/material/styles'
import * as MUIUtils from '@mui/material/utils'
import {
Expand Down Expand Up @@ -199,6 +199,12 @@ const FeatureDetails = lazy(
const BaseCard = lazy(
() => import('../BaseFeatureWidget/BaseFeatureDetail/BaseCard'),
)
const BaseAttributes = lazy(
() => import('../BaseFeatureWidget/BaseFeatureDetail/BaseAttributes'),
)
const BaseCoreDetails = lazy(
() => import('../BaseFeatureWidget/BaseFeatureDetail/BaseCoreDetails'),
)

const DataGridEntries: Record<string, LazyExoticComponent<any>> = {
DataGrid: lazy(() =>
Expand Down Expand Up @@ -514,7 +520,7 @@ const libs = {
'@material-ui/core': {
...LazyMUICore,
useTheme,
alpha: MUIStyles.alpha,
alpha,

makeStyles: (args: any) => {
const useStyles = makeStyles()(args)
Expand All @@ -523,8 +529,9 @@ const libs = {
},
'@mui/material': {
...LazyMUICore,
alpha: MUIStyles.alpha,
useTheme: MUIStyles.useTheme,
alpha,
useTheme,
createTheme,
},

// end special case
Expand Down Expand Up @@ -593,6 +600,8 @@ const libs = {
Attributes: LazyAttributes,
FeatureDetails: LazyFeatureDetails,
BaseCard: LazyBaseCard,
BaseCoreDetails,
BaseAttributes,
},
'@jbrowse/core/data_adapters/BaseAdapter': BaseAdapterExports,
}
Expand Down

0 comments on commit 8d28920

Please sign in to comment.