Skip to content

Commit

Permalink
[internals] Move EventManager to @mui/x-internals package (#13815)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Jul 12, 2024
1 parent bb50cc1 commit 4765a52
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import { EventManager } from '@mui/x-internals/EventManager';
import { Store } from '../../utils/Store';
import { useGridApiMethod } from '../utils/useGridApiMethod';
import { GridSignature } from '../utils/useGridApiEventHandler';
import { DataGridProcessedProps } from '../../models/props/DataGridProps';
import type { GridCoreApi } from '../../models';
import type { GridApiCommon, GridPrivateApiCommon } from '../../models/api/gridApiCommon';
import { EventManager } from '../../utils/EventManager';

const SYMBOL_API_PRIVATE = Symbol('mui.api_private');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { EventListenerOptions } from '@mui/x-internals/EventManager';
import { GridEventListener, GridEvents } from '../../models/events';
import { UnregisterToken, CleanupTracking } from '../../utils/cleanupTracking/CleanupTracking';
import { EventListenerOptions } from '../../utils/EventManager';
import { TimerBasedCleanupTracking } from '../../utils/cleanupTracking/TimerBasedCleanupTracking';
import { FinalizationRegistryBasedCleanupTracking } from '../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking';
import type { GridApiCommon } from '../../models';
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/models/api/gridCoreApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
import { GridEventPublisher, GridEventListener, GridEvents } from '../events';
import { Store } from '../../utils/Store';
import { EventManager, EventListenerOptions } from '../../utils/EventManager';
import { GridApiCaches } from '../gridApiCaches';
import type { GridApiCommon, GridPrivateApiCommon } from './gridApiCommon';
import type { DataGridProcessedProps } from '../props/DataGridProps';
Expand Down
2 changes: 2 additions & 0 deletions packages/x-internals/src/EventManager/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { EventManager } from './EventManager';
export type { EventListenerOptions } from './EventManager';
1 change: 1 addition & 0 deletions packages/x-tree-view-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@mui/base": "^5.0.0-beta.40",
"@mui/system": "^5.16.0",
"@mui/utils": "^5.16.0",
"@mui/x-internals": "workspace:*",
"@mui/x-license": "workspace:*",
"@mui/x-tree-view": "workspace:*",
"@types/react-transition-group": "^4.4.10",
Expand Down
1 change: 1 addition & 0 deletions packages/x-tree-view-pro/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"types": ["node", "@mui/material/themeCssVarsAugmentation"]
},
"references": [
{ "path": "../x-internals/tsconfig.build.json" },
{ "path": "../x-tree-view/tsconfig.build.json" },
{ "path": "../x-license/tsconfig.build.json" }
],
Expand Down
1 change: 1 addition & 0 deletions packages/x-tree-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@mui/base": "^5.0.0-beta.40",
"@mui/system": "^5.16.0",
"@mui/utils": "^5.16.0",
"@mui/x-internals": "workspace:*",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.1",
"prop-types": "^15.8.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { EventManager } from '../../utils/EventManager';
import { EventManager } from '@mui/x-internals/EventManager';
import type { TreeViewPlugin } from '../../models';
import { UseTreeViewInstanceEventsSignature } from './useTreeViewInstanceEvents.types';
import type { TreeViewEventListener } from '../../models/events';
Expand Down
103 changes: 0 additions & 103 deletions packages/x-tree-view/src/internals/utils/EventManager.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/x-tree-view/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"rootDir": "./src",
"types": ["node", "@mui/material/themeCssVarsAugmentation", "@emotion/styled"]
},
"references": [{ "path": "../x-internals/tsconfig.build.json" }],
"include": ["src/**/*.ts*"],
"exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/tests/**/*"]
}
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4765a52

Please sign in to comment.