Ver código fonte

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 anos atrás
pai
commit
8ac701ab74

+ 0
- 12
package-lock.json Ver arquivo

691
         "react-scrolllock": "^3.0.2"
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
     "@atlaskit/lozenge": {
694
     "@atlaskit/lozenge": {
707
       "version": "6.2.4",
695
       "version": "6.2.4",
708
       "resolved": "https://registry.npmjs.org/@atlaskit/lozenge/-/lozenge-6.2.4.tgz",
696
       "resolved": "https://registry.npmjs.org/@atlaskit/lozenge/-/lozenge-6.2.4.tgz",

+ 0
- 1
package.json Ver arquivo

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

+ 10
- 33
react/features/base/dialog/components/web/StatelessDialog.js Ver arquivo

1
 // @flow
1
 // @flow
2
 
2
 
3
 import Button, { ButtonGroup } from '@atlaskit/button';
3
 import Button, { ButtonGroup } from '@atlaskit/button';
4
-import { withContextFromProps } from '@atlaskit/layer-manager';
5
 import Modal, { ModalFooter } from '@atlaskit/modal-dialog';
4
 import Modal, { ModalFooter } from '@atlaskit/modal-dialog';
6
 import _ from 'lodash';
5
 import _ from 'lodash';
7
 import PropTypes from 'prop-types';
6
 import PropTypes from 'prop-types';
71
     width: string
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
  * Web dialog that uses atlaskit modal-dialog to display dialogs.
74
  * Web dialog that uses atlaskit modal-dialog to display dialogs.
87
  */
75
  */
136
                 onDialogDismissed = { this._onDialogDismissed }
124
                 onDialogDismissed = { this._onDialogDismissed }
137
                 shouldCloseOnEscapePress = { true }
125
                 shouldCloseOnEscapePress = { true }
138
                 width = { width || 'medium' }>
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
             </Modal>
137
             </Modal>
161
         );
138
         );
162
     }
139
     }

Carregando…
Cancelar
Salvar