@coreui/react 2.5.7 → 2.5.8
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/CHANGELOG.md +18 -0
- package/es/Aside.js +29 -37
- package/es/AsideToggler.js +36 -44
- package/es/Breadcrumb.js +51 -58
- package/es/Breadcrumb2.js +52 -60
- package/es/Footer.js +24 -32
- package/es/Header.js +23 -35
- package/es/HeaderDropdown.js +23 -27
- package/es/NavbarBrand.js +32 -39
- package/es/Shared/classes.js +0 -3
- package/es/Shared/element-closest.js +2 -0
- package/es/Shared/index.js +0 -1
- package/es/Shared/layout/layout.js +24 -16
- package/es/Shared/toggle-classes.js +2 -0
- package/es/Sidebar.js +43 -53
- package/es/SidebarFooter.js +19 -29
- package/es/SidebarForm.js +19 -29
- package/es/SidebarHeader.js +19 -29
- package/es/SidebarMinimizer.js +30 -35
- package/es/SidebarNav.js +128 -162
- package/es/SidebarNav2.js +178 -202
- package/es/SidebarToggler.js +35 -36
- package/es/Switch.js +59 -62
- package/lib/Aside.js +51 -60
- package/lib/AsideToggler.js +58 -67
- package/lib/Breadcrumb.js +71 -77
- package/lib/Breadcrumb2.js +72 -79
- package/lib/Footer.js +40 -47
- package/lib/Header.js +39 -50
- package/lib/HeaderDropdown.js +36 -37
- package/lib/NavbarBrand.js +50 -56
- package/lib/Shared/classes.js +8 -6
- package/lib/Shared/element-closest.js +3 -1
- package/lib/Shared/index.js +2 -3
- package/lib/Shared/layout/layout.js +31 -19
- package/lib/Shared/toggle-classes.js +6 -2
- package/lib/Sidebar.js +69 -81
- package/lib/SidebarFooter.js +33 -42
- package/lib/SidebarForm.js +33 -42
- package/lib/SidebarHeader.js +33 -42
- package/lib/SidebarMinimizer.js +51 -55
- package/lib/SidebarNav.js +154 -187
- package/lib/SidebarNav2.js +211 -236
- package/lib/SidebarToggler.js +56 -58
- package/lib/Switch.js +90 -92
- package/lib/index.js +36 -55
- package/package.json +14 -14
- package/umd/main.d0f057e5.css +5 -0
- package/umd/main.d0f057e5.css.map +1 -0
- package/umd/{@coreui/react.js → react.js} +918 -1076
- package/umd/react.min.js +38 -0
- package/umd/react.min.js.map +1 -0
- package/umd/@coreui/react.min.js +0 -44
- package/umd/@coreui/react.min.js.map +0 -1
- package/umd/main.a93373b7.css +0 -148
- package/umd/main.a93373b7.css.map +0 -1
package/lib/Footer.js
CHANGED
|
@@ -1,81 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
4
5
|
|
|
5
|
-
var
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
19
|
|
|
19
|
-
function
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
23
|
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
26
|
-
|
|
27
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
28
|
-
|
|
29
|
-
var propTypes = {
|
|
30
|
-
children: _propTypes2.default.node,
|
|
31
|
-
className: _propTypes2.default.string,
|
|
32
|
-
fixed: _propTypes2.default.bool,
|
|
33
|
-
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
|
|
34
|
-
};
|
|
24
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
35
25
|
|
|
26
|
+
var propTypes = process.env.NODE_ENV !== "production" ? {
|
|
27
|
+
children: _propTypes["default"].node,
|
|
28
|
+
className: _propTypes["default"].string,
|
|
29
|
+
fixed: _propTypes["default"].bool,
|
|
30
|
+
tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
|
|
31
|
+
} : {};
|
|
36
32
|
var defaultProps = {
|
|
37
33
|
tag: 'footer',
|
|
38
34
|
fixed: false
|
|
39
35
|
};
|
|
40
36
|
|
|
41
|
-
var AppFooter = function (_Component) {
|
|
42
|
-
|
|
37
|
+
var AppFooter = /*#__PURE__*/function (_Component) {
|
|
38
|
+
_inheritsLoose(AppFooter, _Component);
|
|
43
39
|
|
|
44
40
|
function AppFooter(props) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
|
41
|
+
var _this;
|
|
48
42
|
|
|
49
|
-
_this
|
|
43
|
+
_this = _Component.call(this, props) || this;
|
|
44
|
+
_this.isFixed = _this.isFixed.bind(_assertThisInitialized(_this));
|
|
50
45
|
return _this;
|
|
51
46
|
}
|
|
52
47
|
|
|
53
|
-
AppFooter.prototype
|
|
48
|
+
var _proto = AppFooter.prototype;
|
|
49
|
+
|
|
50
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
54
51
|
this.isFixed(this.props.fixed);
|
|
55
52
|
};
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
_proto.isFixed = function isFixed(fixed) {
|
|
58
55
|
if (fixed) {
|
|
59
56
|
document.body.classList.add('footer-fixed');
|
|
60
57
|
}
|
|
61
58
|
};
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
className =
|
|
66
|
-
children =
|
|
67
|
-
Tag =
|
|
68
|
-
attributes =
|
|
60
|
+
_proto.render = function render() {
|
|
61
|
+
var _this$props = this.props,
|
|
62
|
+
className = _this$props.className,
|
|
63
|
+
children = _this$props.children,
|
|
64
|
+
Tag = _this$props.tag,
|
|
65
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
|
|
69
66
|
|
|
70
67
|
delete attributes.fixed;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Tag,
|
|
76
|
-
_extends({ className: classes }, attributes),
|
|
77
|
-
children
|
|
78
|
-
);
|
|
68
|
+
var classes = (0, _classnames["default"])(className, 'app-footer');
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, _extends({
|
|
70
|
+
className: classes
|
|
71
|
+
}, attributes), children);
|
|
79
72
|
};
|
|
80
73
|
|
|
81
74
|
return AppFooter;
|
|
@@ -83,6 +76,6 @@ var AppFooter = function (_Component) {
|
|
|
83
76
|
|
|
84
77
|
AppFooter.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
85
78
|
AppFooter.defaultProps = defaultProps;
|
|
86
|
-
|
|
87
|
-
exports
|
|
88
|
-
module.exports = exports
|
|
79
|
+
var _default = AppFooter;
|
|
80
|
+
exports["default"] = _default;
|
|
81
|
+
module.exports = exports.default;
|
package/lib/Header.js
CHANGED
|
@@ -1,82 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
4
5
|
|
|
5
|
-
var
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
19
|
|
|
19
|
-
function
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
-
|
|
25
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
26
|
-
|
|
27
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
28
|
-
|
|
29
|
-
var propTypes = {
|
|
30
|
-
children: _propTypes2.default.node,
|
|
31
|
-
className: _propTypes2.default.string,
|
|
32
|
-
fixed: _propTypes2.default.bool,
|
|
33
|
-
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
|
|
34
|
-
};
|
|
22
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
35
23
|
|
|
24
|
+
var propTypes = process.env.NODE_ENV !== "production" ? {
|
|
25
|
+
children: _propTypes["default"].node,
|
|
26
|
+
className: _propTypes["default"].string,
|
|
27
|
+
fixed: _propTypes["default"].bool,
|
|
28
|
+
tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
|
|
29
|
+
} : {};
|
|
36
30
|
var defaultProps = {
|
|
37
31
|
tag: 'header',
|
|
38
32
|
fixed: false
|
|
39
33
|
};
|
|
40
34
|
|
|
41
|
-
var AppHeader = function (_Component) {
|
|
42
|
-
|
|
35
|
+
var AppHeader = /*#__PURE__*/function (_Component) {
|
|
36
|
+
_inheritsLoose(AppHeader, _Component);
|
|
43
37
|
|
|
44
38
|
function AppHeader() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
|
|
39
|
+
return _Component.apply(this, arguments) || this;
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
AppHeader.prototype
|
|
42
|
+
var _proto = AppHeader.prototype;
|
|
43
|
+
|
|
44
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
51
45
|
this.isFixed(this.props.fixed);
|
|
52
46
|
};
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
_proto.isFixed = function isFixed(fixed) {
|
|
55
49
|
if (fixed) {
|
|
56
50
|
document.body.classList.add('header-fixed');
|
|
57
51
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// breakpoint(breakpoint) {
|
|
52
|
+
} // breakpoint(breakpoint) {
|
|
61
53
|
// return breakpoint || '';
|
|
62
54
|
// }
|
|
55
|
+
;
|
|
63
56
|
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
className =
|
|
67
|
-
children =
|
|
68
|
-
Tag =
|
|
69
|
-
attributes =
|
|
57
|
+
_proto.render = function render() {
|
|
58
|
+
var _this$props = this.props,
|
|
59
|
+
className = _this$props.className,
|
|
60
|
+
children = _this$props.children,
|
|
61
|
+
Tag = _this$props.tag,
|
|
62
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
|
|
70
63
|
|
|
71
64
|
delete attributes.fixed;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Tag,
|
|
77
|
-
_extends({ className: classes }, attributes),
|
|
78
|
-
children
|
|
79
|
-
);
|
|
65
|
+
var classes = (0, _classnames["default"])(className, 'app-header', 'navbar');
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, _extends({
|
|
67
|
+
className: classes
|
|
68
|
+
}, attributes), children);
|
|
80
69
|
};
|
|
81
70
|
|
|
82
71
|
return AppHeader;
|
|
@@ -84,6 +73,6 @@ var AppHeader = function (_Component) {
|
|
|
84
73
|
|
|
85
74
|
AppHeader.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
86
75
|
AppHeader.defaultProps = defaultProps;
|
|
87
|
-
|
|
88
|
-
exports
|
|
89
|
-
module.exports = exports
|
|
76
|
+
var _default = AppHeader;
|
|
77
|
+
exports["default"] = _default;
|
|
78
|
+
module.exports = exports.default;
|
package/lib/HeaderDropdown.js
CHANGED
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
4
5
|
|
|
5
|
-
var
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _reactstrap = require("reactstrap");
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
17
|
|
|
17
|
-
function
|
|
18
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
19
|
|
|
19
|
-
function
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
22
23
|
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
26
|
-
|
|
27
|
-
var propTypes = _extends({
|
|
28
|
-
children: _propTypes2.default.node,
|
|
29
|
-
direction: _propTypes2.default.string
|
|
30
|
-
}, _reactstrap.Dropdown.propTypes);
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
25
|
|
|
26
|
+
var propTypes = process.env.NODE_ENV !== "production" ? _extends({
|
|
27
|
+
children: _propTypes["default"].node,
|
|
28
|
+
direction: _propTypes["default"].string
|
|
29
|
+
}, _reactstrap.Dropdown.propTypes) : {};
|
|
32
30
|
var defaultProps = {
|
|
33
31
|
direction: 'down'
|
|
34
32
|
};
|
|
35
33
|
|
|
36
|
-
var AppHeaderDropdown = function (_Component) {
|
|
37
|
-
|
|
34
|
+
var AppHeaderDropdown = /*#__PURE__*/function (_Component) {
|
|
35
|
+
_inheritsLoose(AppHeaderDropdown, _Component);
|
|
38
36
|
|
|
39
37
|
function AppHeaderDropdown(props) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
|
38
|
+
var _this;
|
|
43
39
|
|
|
44
|
-
_this
|
|
40
|
+
_this = _Component.call(this, props) || this;
|
|
41
|
+
_this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
|
|
45
42
|
_this.state = {
|
|
46
43
|
dropdownOpen: false
|
|
47
44
|
};
|
|
48
45
|
return _this;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
AppHeaderDropdown.prototype
|
|
48
|
+
var _proto = AppHeaderDropdown.prototype;
|
|
49
|
+
|
|
50
|
+
_proto.toggle = function toggle() {
|
|
52
51
|
this.setState({
|
|
53
52
|
dropdownOpen: !this.state.dropdownOpen
|
|
54
53
|
});
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
children =
|
|
60
|
-
attributes =
|
|
56
|
+
_proto.render = function render() {
|
|
57
|
+
var _this$props = this.props,
|
|
58
|
+
children = _this$props.children,
|
|
59
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["children"]);
|
|
61
60
|
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_reactstrap.Dropdown, _extends({
|
|
62
|
+
nav: true,
|
|
63
|
+
isOpen: this.state.dropdownOpen,
|
|
64
|
+
toggle: this.toggle
|
|
65
|
+
}, attributes), children);
|
|
67
66
|
};
|
|
68
67
|
|
|
69
68
|
return AppHeaderDropdown;
|
|
@@ -71,6 +70,6 @@ var AppHeaderDropdown = function (_Component) {
|
|
|
71
70
|
|
|
72
71
|
AppHeaderDropdown.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
73
72
|
AppHeaderDropdown.defaultProps = defaultProps;
|
|
74
|
-
|
|
75
|
-
exports
|
|
76
|
-
module.exports = exports
|
|
73
|
+
var _default = AppHeaderDropdown;
|
|
74
|
+
exports["default"] = _default;
|
|
75
|
+
module.exports = exports.default;
|
package/lib/NavbarBrand.js
CHANGED
|
@@ -1,71 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
4
5
|
|
|
5
|
-
var
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
19
|
|
|
19
|
-
function
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
-
|
|
25
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
26
|
-
|
|
27
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
28
|
-
|
|
29
|
-
var propTypes = {
|
|
30
|
-
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]),
|
|
31
|
-
children: _propTypes2.default.node,
|
|
32
|
-
className: _propTypes2.default.string,
|
|
33
|
-
brand: _propTypes2.default.any,
|
|
34
|
-
full: _propTypes2.default.any,
|
|
35
|
-
minimized: _propTypes2.default.any
|
|
36
|
-
};
|
|
22
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
37
23
|
|
|
24
|
+
var propTypes = process.env.NODE_ENV !== "production" ? {
|
|
25
|
+
tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string]),
|
|
26
|
+
children: _propTypes["default"].node,
|
|
27
|
+
className: _propTypes["default"].string,
|
|
28
|
+
brand: _propTypes["default"].any,
|
|
29
|
+
full: _propTypes["default"].any,
|
|
30
|
+
minimized: _propTypes["default"].any
|
|
31
|
+
} : {};
|
|
38
32
|
var defaultProps = {
|
|
39
33
|
tag: 'a'
|
|
40
34
|
};
|
|
41
35
|
|
|
42
|
-
var AppNavbarBrand = function (_Component) {
|
|
43
|
-
|
|
36
|
+
var AppNavbarBrand = /*#__PURE__*/function (_Component) {
|
|
37
|
+
_inheritsLoose(AppNavbarBrand, _Component);
|
|
44
38
|
|
|
45
39
|
function AppNavbarBrand() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return _possibleConstructorReturn(this, _Component.apply(this, arguments));
|
|
40
|
+
return _Component.apply(this, arguments) || this;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
|
-
AppNavbarBrand.prototype
|
|
43
|
+
var _proto = AppNavbarBrand.prototype;
|
|
44
|
+
|
|
45
|
+
_proto.imgSrc = function imgSrc(brand) {
|
|
52
46
|
return brand.src ? brand.src : '';
|
|
53
47
|
};
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
_proto.imgWidth = function imgWidth(brand) {
|
|
56
50
|
return brand.width ? brand.width : 'auto';
|
|
57
51
|
};
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
_proto.imgHeight = function imgHeight(brand) {
|
|
60
54
|
return brand.height ? brand.height : 'auto';
|
|
61
55
|
};
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
_proto.imgAlt = function imgAlt(brand) {
|
|
64
58
|
return brand.alt ? brand.alt : '';
|
|
65
59
|
};
|
|
66
60
|
|
|
67
|
-
|
|
68
|
-
return
|
|
61
|
+
_proto.navbarBrandImg = function navbarBrandImg(props, classBrand, key) {
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
69
63
|
src: this.imgSrc(props),
|
|
70
64
|
width: this.imgWidth(props),
|
|
71
65
|
height: this.imgHeight(props),
|
|
@@ -75,37 +69,37 @@ var AppNavbarBrand = function (_Component) {
|
|
|
75
69
|
});
|
|
76
70
|
};
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
className =
|
|
81
|
-
children =
|
|
82
|
-
Tag =
|
|
83
|
-
attributes =
|
|
84
|
-
|
|
85
|
-
var classes = (0, _classnames2.default)(className, 'navbar-brand');
|
|
72
|
+
_proto.render = function render() {
|
|
73
|
+
var _this$props = this.props,
|
|
74
|
+
className = _this$props.className,
|
|
75
|
+
children = _this$props.children,
|
|
76
|
+
Tag = _this$props.tag,
|
|
77
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
|
|
86
78
|
|
|
79
|
+
var classes = (0, _classnames["default"])(className, 'navbar-brand');
|
|
87
80
|
var img = [];
|
|
81
|
+
|
|
88
82
|
if (this.props.brand) {
|
|
89
83
|
var props = this.props.brand;
|
|
90
84
|
var classBrand = 'navbar-brand';
|
|
91
85
|
img.push(this.navbarBrandImg(props, classBrand, img.length + 1));
|
|
92
86
|
}
|
|
87
|
+
|
|
93
88
|
if (this.props.full) {
|
|
94
|
-
var
|
|
89
|
+
var _props = this.props.full;
|
|
95
90
|
var _classBrand = 'navbar-brand-full';
|
|
96
|
-
img.push(this.navbarBrandImg(
|
|
91
|
+
img.push(this.navbarBrandImg(_props, _classBrand, img.length + 1));
|
|
97
92
|
}
|
|
93
|
+
|
|
98
94
|
if (this.props.minimized) {
|
|
99
|
-
var
|
|
95
|
+
var _props2 = this.props.minimized;
|
|
100
96
|
var _classBrand2 = 'navbar-brand-minimized';
|
|
101
|
-
img.push(this.navbarBrandImg(
|
|
97
|
+
img.push(this.navbarBrandImg(_props2, _classBrand2, img.length + 1));
|
|
102
98
|
}
|
|
103
99
|
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
children || img
|
|
108
|
-
);
|
|
100
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, _extends({}, attributes, {
|
|
101
|
+
className: classes
|
|
102
|
+
}), children || img);
|
|
109
103
|
};
|
|
110
104
|
|
|
111
105
|
return AppNavbarBrand;
|
|
@@ -113,6 +107,6 @@ var AppNavbarBrand = function (_Component) {
|
|
|
113
107
|
|
|
114
108
|
AppNavbarBrand.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
115
109
|
AppNavbarBrand.defaultProps = defaultProps;
|
|
116
|
-
|
|
117
|
-
exports
|
|
118
|
-
module.exports = exports
|
|
110
|
+
var _default = AppNavbarBrand;
|
|
111
|
+
exports["default"] = _default;
|
|
112
|
+
module.exports = exports.default;
|
package/lib/Shared/classes.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.checkBreakpoint = checkBreakpoint;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
exports.validBreakpoints = exports.asideMenuCssClasses = exports.sidebarCssClasses = void 0;
|
|
6
|
+
var sidebarCssClasses = ['sidebar-show', 'sidebar-sm-show', 'sidebar-md-show', 'sidebar-lg-show', 'sidebar-xl-show'];
|
|
7
|
+
exports.sidebarCssClasses = sidebarCssClasses;
|
|
8
|
+
var asideMenuCssClasses = ['aside-menu-show', 'aside-menu-sm-show', 'aside-menu-md-show', 'aside-menu-lg-show', 'aside-menu-xl-show'];
|
|
9
|
+
exports.asideMenuCssClasses = asideMenuCssClasses;
|
|
10
|
+
var validBreakpoints = ['sm', 'md', 'lg', 'xl'];
|
|
11
|
+
exports.validBreakpoints = validBreakpoints;
|
|
10
12
|
|
|
11
13
|
function checkBreakpoint(breakpoint, list) {
|
|
12
14
|
return list.indexOf(breakpoint) > -1;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
(function (ElementProto) {
|
|
4
4
|
if (!ElementProto) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
|
+
|
|
7
8
|
if (typeof ElementProto.matches !== 'function') {
|
|
8
9
|
ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) {
|
|
9
10
|
var element = this;
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
if (element.matches(selector)) {
|
|
27
28
|
return element;
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
element = element.parentNode;
|
|
30
32
|
}
|
|
31
33
|
|
package/lib/Shared/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.checkBreakpoint = exports.validBreakpoints = exports.asideMenuCssClasses = exports.sidebarCssClasses = undefined;
|
|
5
4
|
|
|
6
|
-
var _classes = require(
|
|
5
|
+
var _classes = require("./classes");
|
|
7
6
|
|
|
8
7
|
exports.sidebarCssClasses = _classes.sidebarCssClasses;
|
|
9
8
|
exports.asideMenuCssClasses = _classes.asideMenuCssClasses;
|