瀏覽代碼

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
master
Saúl Ibarra Corretgé 7 年之前
父節點
當前提交
8ac701ab74
共有 3 個文件被更改,包括 10 次插入46 次删除
  1. 0
    12
      package-lock.json
  2. 0
    1
      package.json
  3. 10
    33
      react/features/base/dialog/components/web/StatelessDialog.js

+ 0
- 12
package-lock.json 查看文件

@@ -691,18 +691,6 @@
691 691
         "react-scrolllock": "^3.0.2"
692 692
       }
693 693
     },
694
-    "@atlaskit/layer-manager": {
695
-      "version": "5.0.19",
696
-      "resolved": "https://registry.npmjs.org/@atlaskit/layer-manager/-/layer-manager-5.0.19.tgz",
697
-      "integrity": "sha512-2NvSNEERS9uW/oExF7ltj/h8akJvJRJnhEleKGx1JXqnbCUwQHtGkiP+06cX9JriGnhPEySt26dfQS5dAA0sKg==",
698
-      "requires": {
699
-        "@babel/runtime": "^7.0.0",
700
-        "prop-types": "^15.5.10",
701
-        "react-focus-lock": "^1.11.3",
702
-        "react-scrolllock": "^3.0.2",
703
-        "react-transition-group": "^2.2.1"
704
-      }
705
-    },
706 694
     "@atlaskit/lozenge": {
707 695
       "version": "6.2.4",
708 696
       "resolved": "https://registry.npmjs.org/@atlaskit/lozenge/-/lozenge-6.2.4.tgz",

+ 0
- 1
package.json 查看文件

@@ -25,7 +25,6 @@
25 25
     "@atlaskit/icon": "15.0.3",
26 26
     "@atlaskit/inline-dialog": "5.3.0",
27 27
     "@atlaskit/inline-message": "7.0.10",
28
-    "@atlaskit/layer-manager": "5.0.19",
29 28
     "@atlaskit/lozenge": "6.2.4",
30 29
     "@atlaskit/modal-dialog": "7.1.2",
31 30
     "@atlaskit/multi-select": "11.0.13",

+ 10
- 33
react/features/base/dialog/components/web/StatelessDialog.js 查看文件

@@ -1,7 +1,6 @@
1 1
 // @flow
2 2
 
3 3
 import Button, { ButtonGroup } from '@atlaskit/button';
4
-import { withContextFromProps } from '@atlaskit/layer-manager';
5 4
 import Modal, { ModalFooter } from '@atlaskit/modal-dialog';
6 5
 import _ from 'lodash';
7 6
 import PropTypes from 'prop-types';
@@ -71,17 +70,6 @@ type Props = {
71 70
     width: string
72 71
 };
73 72
 
74
-/**
75
- * ContexTypes is used as a workaround for Atlaskit's modal being displayed
76
- * outside of the normal App hierarchy, thereby losing context. ContextType
77
- * is responsible for taking its props and passing them into children.
78
- *
79
- * @type {ReactElement}
80
- */
81
-const ContextProvider = withContextFromProps({
82
-    i18n: PropTypes.object
83
-});
84
-
85 73
 /**
86 74
  * Web dialog that uses atlaskit modal-dialog to display dialogs.
87 75
  */
@@ -136,27 +124,16 @@ class StatelessDialog extends Component<Props> {
136 124
                 onDialogDismissed = { this._onDialogDismissed }
137 125
                 shouldCloseOnEscapePress = { true }
138 126
                 width = { width || 'medium' }>
139
-                {
140
-
141
-                    /**
142
-                     * Wrapping the contents of {@link Modal} with
143
-                     * {@link ContextProvider} is a workaround for the
144
-                     * i18n context becoming undefined as modal gets rendered
145
-                     * outside of the normal react app context.
146
-                     */
147
-                }
148
-                <ContextProvider i18n = { this.props.i18n }>
149
-                    <div
150
-                        onKeyDown = { this._onKeyDown }
151
-                        ref = { this._setDialogElement }>
152
-                        <form
153
-                            className = 'modal-dialog-form'
154
-                            id = 'modal-dialog-form'
155
-                            onSubmit = { this._onSubmit }>
156
-                            { children }
157
-                        </form>
158
-                    </div>
159
-                </ContextProvider>
127
+                <div
128
+                    onKeyDown = { this._onKeyDown }
129
+                    ref = { this._setDialogElement }>
130
+                    <form
131
+                        className = 'modal-dialog-form'
132
+                        id = 'modal-dialog-form'
133
+                        onSubmit = { this._onSubmit }>
134
+                        { children }
135
+                    </form>
136
+                </div>
160 137
             </Modal>
161 138
         );
162 139
     }

Loading…
取消
儲存