diff --git a/packages/toolpad-core/src/Crud/Create.tsx b/packages/toolpad-core/src/Crud/Create.tsx index b8dc510d235..22b4f921086 100644 --- a/packages/toolpad-core/src/Crud/Create.tsx +++ b/packages/toolpad-core/src/Crud/Create.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import invariant from 'invariant'; -import { FormPage } from './FormPage'; +import { CrudForm } from './CrudForm'; import { DataModel, DataSource, OmitId } from './shared'; import { CrudContext } from '../shared/context'; @@ -56,7 +56,7 @@ function Create(props: CreateProps) { ); return ( - { +export interface CrudFormProps { dataSource: | (DataSource & Required, 'createOne'>>) | (DataSource & Required, 'updateOne'>>); @@ -36,13 +36,13 @@ export interface FormPageProps { onSubmit: (formValues: Partial>) => void | Promise; onSubmitSuccess?: () => void; resetOnSubmit?: boolean; - localeText: FormPageLocaleText; + localeText: CrudFormLocaleText; } /** * @ignore - internal component. */ -function FormPage(props: FormPageProps) { +function CrudForm(props: CrudFormProps) { const { dataSource, initialValues = {} as Partial>, @@ -362,7 +362,7 @@ function FormPage(props: FormPageProps) { ); } -FormPage.propTypes /* remove-proptypes */ = { +CrudForm.propTypes /* remove-proptypes */ = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -373,4 +373,4 @@ FormPage.propTypes /* remove-proptypes */ = { dataSource: PropTypes.object.isRequired, } as any; -export { FormPage }; +export { CrudForm }; diff --git a/packages/toolpad-core/src/Crud/Edit.tsx b/packages/toolpad-core/src/Crud/Edit.tsx index 54cc0c01d32..41200741015 100644 --- a/packages/toolpad-core/src/Crud/Edit.tsx +++ b/packages/toolpad-core/src/Crud/Edit.tsx @@ -5,7 +5,7 @@ import Alert from '@mui/material/Alert'; import Box from '@mui/material/Box'; import CircularProgress from '@mui/material/CircularProgress'; import invariant from 'invariant'; -import { FormPage } from './FormPage'; +import { CrudForm } from './CrudForm'; import { DataModel, DataModelId, DataSource, OmitId } from './shared'; import { CrudContext } from '../shared/context'; @@ -102,7 +102,7 @@ function Edit(props: EditProps) { } return data ? ( - =7.0.0' - eslint-plugin-react-compiler@19.0.0-beta-30d8a17-20250209: - resolution: {integrity: sha512-D2wohyvsW27KSQV8IhyjL9UhYKs4f7Y8WPIuNOeiYylOaredvb2vW/AAE2m36BWLsn3Q9xRYz1UZj2AXR15w/g==} + eslint-plugin-react-compiler@19.0.0-beta-21e868a-20250216: + resolution: {integrity: sha512-LstAv6tKgZylMmJniWxQL9TOY9kwRddLnvBsoTbRsgUDROL5bsg0k5XHMaNJLyX8cxh4iafQ/WxAw5shNUf3GQ==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7' @@ -16848,7 +16848,7 @@ snapshots: globals: 13.24.0 rambda: 7.5.0 - eslint-plugin-react-compiler@19.0.0-beta-30d8a17-20250209(eslint@8.57.1): + eslint-plugin-react-compiler@19.0.0-beta-21e868a-20250216(eslint@8.57.1): dependencies: '@babel/core': 7.26.0 '@babel/parser': 7.26.2