@panneau/modals 3.0.54 → 3.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +19 -6
- package/lib/index.js +21 -6
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
1
3
|
import PropTypes from 'prop-types';
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { ComponentsProvider, MODALS_NAMESPACE } from '@panneau/core/contexts';
|
|
@@ -8,23 +10,34 @@ var modals = {
|
|
|
8
10
|
DialogModal: DialogModal,
|
|
9
11
|
UploadModal: UploadModal
|
|
10
12
|
};
|
|
11
|
-
Object.keys(modals).map(function (name) {
|
|
13
|
+
var modalsArray = Object.keys(modals).map(function (name) {
|
|
12
14
|
return modals[name];
|
|
13
15
|
});
|
|
14
|
-
var ModalsComponents = modals;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
18
|
+
__proto__: null,
|
|
19
|
+
modalsArray: modalsArray,
|
|
20
|
+
'default': modals
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
var _excluded = ["components", "children"];
|
|
17
24
|
var propTypes = {
|
|
25
|
+
components: PropTypes.object,
|
|
26
|
+
// eslint-disable-line
|
|
18
27
|
children: PropTypes.node
|
|
19
28
|
};
|
|
20
29
|
var defaultProps = {
|
|
30
|
+
components: null,
|
|
21
31
|
children: null
|
|
22
32
|
};
|
|
23
|
-
var ModalsProvider = function ModalsProvider(
|
|
33
|
+
var ModalsProvider = function ModalsProvider(_ref) {
|
|
34
|
+
var injectedComponents = _ref.components,
|
|
35
|
+
children = _ref.children,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
37
|
return /*#__PURE__*/React.createElement(ComponentsProvider, Object.assign({
|
|
25
38
|
namespace: MODALS_NAMESPACE,
|
|
26
|
-
components:
|
|
27
|
-
}, props));
|
|
39
|
+
components: _objectSpread(_objectSpread({}, components), injectedComponents)
|
|
40
|
+
}, props), children);
|
|
28
41
|
};
|
|
29
42
|
ModalsProvider.propTypes = propTypes;
|
|
30
43
|
ModalsProvider.defaultProps = defaultProps;
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
7
|
var PropTypes = require('prop-types');
|
|
6
8
|
var React = require('react');
|
|
7
9
|
var contexts = require('@panneau/core/contexts');
|
|
@@ -10,6 +12,8 @@ var UploadModal = require('@panneau/modal-upload');
|
|
|
10
12
|
|
|
11
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
14
|
|
|
15
|
+
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
16
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
13
17
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
14
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
19
|
var DialogModal__default = /*#__PURE__*/_interopDefaultLegacy(DialogModal);
|
|
@@ -19,23 +23,34 @@ var modals = {
|
|
|
19
23
|
DialogModal: DialogModal__default["default"],
|
|
20
24
|
UploadModal: UploadModal__default["default"]
|
|
21
25
|
};
|
|
22
|
-
Object.keys(modals).map(function (name) {
|
|
26
|
+
var modalsArray = Object.keys(modals).map(function (name) {
|
|
23
27
|
return modals[name];
|
|
24
28
|
});
|
|
25
|
-
var ModalsComponents = modals;
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
31
|
+
__proto__: null,
|
|
32
|
+
modalsArray: modalsArray,
|
|
33
|
+
'default': modals
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
var _excluded = ["components", "children"];
|
|
28
37
|
var propTypes = {
|
|
38
|
+
components: PropTypes__default["default"].object,
|
|
39
|
+
// eslint-disable-line
|
|
29
40
|
children: PropTypes__default["default"].node
|
|
30
41
|
};
|
|
31
42
|
var defaultProps = {
|
|
43
|
+
components: null,
|
|
32
44
|
children: null
|
|
33
45
|
};
|
|
34
|
-
var ModalsProvider = function ModalsProvider(
|
|
46
|
+
var ModalsProvider = function ModalsProvider(_ref) {
|
|
47
|
+
var injectedComponents = _ref.components,
|
|
48
|
+
children = _ref.children,
|
|
49
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
35
50
|
return /*#__PURE__*/React__default["default"].createElement(contexts.ComponentsProvider, Object.assign({
|
|
36
51
|
namespace: contexts.MODALS_NAMESPACE,
|
|
37
|
-
components:
|
|
38
|
-
}, props));
|
|
52
|
+
components: _objectSpread__default["default"](_objectSpread__default["default"]({}, components), injectedComponents)
|
|
53
|
+
}, props), children);
|
|
39
54
|
};
|
|
40
55
|
ModalsProvider.propTypes = propTypes;
|
|
41
56
|
ModalsProvider.defaultProps = defaultProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modals",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.56",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"@babel/runtime": "^7.12.5",
|
|
56
56
|
"@panneau/core": "^3.0.45",
|
|
57
57
|
"@panneau/element-portal": "^3.0.36",
|
|
58
|
-
"@panneau/modal-dialog": "^3.0.
|
|
59
|
-
"@panneau/modal-upload": "^3.0.
|
|
60
|
-
"@panneau/themes": "^3.0.
|
|
58
|
+
"@panneau/modal-dialog": "^3.0.55",
|
|
59
|
+
"@panneau/modal-upload": "^3.0.56",
|
|
60
|
+
"@panneau/themes": "^3.0.55",
|
|
61
61
|
"classnames": "^2.2.6",
|
|
62
62
|
"prop-types": "^15.7.2"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1566926c838b9a963a67a018ef77d31a678be6e3"
|
|
68
68
|
}
|