deps: drop @atlaskit/layer-manager dependency
We no longer need it since Rect 16 takes care of passing the context around. It's also deprecated: https://atlaskit.atlassian.com/packages/core/layer-manager
This commit is contained in:
parent
ce01b31514
commit
8ac701ab74
|
@ -691,18 +691,6 @@
|
|||
"react-scrolllock": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"@atlaskit/layer-manager": {
|
||||
"version": "5.0.19",
|
||||
"resolved": "https://registry.npmjs.org/@atlaskit/layer-manager/-/layer-manager-5.0.19.tgz",
|
||||
"integrity": "sha512-2NvSNEERS9uW/oExF7ltj/h8akJvJRJnhEleKGx1JXqnbCUwQHtGkiP+06cX9JriGnhPEySt26dfQS5dAA0sKg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"prop-types": "^15.5.10",
|
||||
"react-focus-lock": "^1.11.3",
|
||||
"react-scrolllock": "^3.0.2",
|
||||
"react-transition-group": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"@atlaskit/lozenge": {
|
||||
"version": "6.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@atlaskit/lozenge/-/lozenge-6.2.4.tgz",
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
"@atlaskit/icon": "15.0.3",
|
||||
"@atlaskit/inline-dialog": "5.3.0",
|
||||
"@atlaskit/inline-message": "7.0.10",
|
||||
"@atlaskit/layer-manager": "5.0.19",
|
||||
"@atlaskit/lozenge": "6.2.4",
|
||||
"@atlaskit/modal-dialog": "7.1.2",
|
||||
"@atlaskit/multi-select": "11.0.13",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// @flow
|
||||
|
||||
import Button, { ButtonGroup } from '@atlaskit/button';
|
||||
import { withContextFromProps } from '@atlaskit/layer-manager';
|
||||
import Modal, { ModalFooter } from '@atlaskit/modal-dialog';
|
||||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
|
@ -71,17 +70,6 @@ type Props = {
|
|||
width: string
|
||||
};
|
||||
|
||||
/**
|
||||
* ContexTypes is used as a workaround for Atlaskit's modal being displayed
|
||||
* outside of the normal App hierarchy, thereby losing context. ContextType
|
||||
* is responsible for taking its props and passing them into children.
|
||||
*
|
||||
* @type {ReactElement}
|
||||
*/
|
||||
const ContextProvider = withContextFromProps({
|
||||
i18n: PropTypes.object
|
||||
});
|
||||
|
||||
/**
|
||||
* Web dialog that uses atlaskit modal-dialog to display dialogs.
|
||||
*/
|
||||
|
@ -136,27 +124,16 @@ class StatelessDialog extends Component<Props> {
|
|||
onDialogDismissed = { this._onDialogDismissed }
|
||||
shouldCloseOnEscapePress = { true }
|
||||
width = { width || 'medium' }>
|
||||
{
|
||||
|
||||
/**
|
||||
* Wrapping the contents of {@link Modal} with
|
||||
* {@link ContextProvider} is a workaround for the
|
||||
* i18n context becoming undefined as modal gets rendered
|
||||
* outside of the normal react app context.
|
||||
*/
|
||||
}
|
||||
<ContextProvider i18n = { this.props.i18n }>
|
||||
<div
|
||||
onKeyDown = { this._onKeyDown }
|
||||
ref = { this._setDialogElement }>
|
||||
<form
|
||||
className = 'modal-dialog-form'
|
||||
id = 'modal-dialog-form'
|
||||
onSubmit = { this._onSubmit }>
|
||||
{ children }
|
||||
</form>
|
||||
</div>
|
||||
</ContextProvider>
|
||||
<div
|
||||
onKeyDown = { this._onKeyDown }
|
||||
ref = { this._setDialogElement }>
|
||||
<form
|
||||
className = 'modal-dialog-form'
|
||||
id = 'modal-dialog-form'
|
||||
onSubmit = { this._onSubmit }>
|
||||
{ children }
|
||||
</form>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue