@coreui/react 2.5.4 → 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 +32 -0
- package/css/scrollbar.css +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 +75 -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 +249 -174
- 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 +82 -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 +275 -198
- package/lib/SidebarToggler.js +56 -58
- package/lib/Switch.js +90 -92
- package/lib/index.js +36 -55
- package/package.json +21 -20
- package/umd/main.d0f057e5.css +5 -0
- package/umd/main.d0f057e5.css.map +1 -0
- package/umd/react.js +6069 -0
- package/umd/react.min.js +38 -0
- package/umd/react.min.js.map +1 -0
- package/umd/@coreui/react.js +0 -11849
- package/umd/@coreui/react.min.js +0 -77
- package/umd/@coreui/react.min.js.map +0 -1
- package/umd/main.a25994ba.css +0 -129
- package/umd/main.a25994ba.css.map +0 -1
package/lib/Breadcrumb.js
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
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 _reactRouterDom = require("react-router-dom");
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
+
var _reactstrap = require("reactstrap");
|
|
10
11
|
|
|
11
|
-
var
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
+
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; }
|
|
20
21
|
|
|
21
|
-
var
|
|
22
|
+
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); }
|
|
22
23
|
|
|
23
|
-
function
|
|
24
|
+
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; }
|
|
24
25
|
|
|
25
|
-
function
|
|
26
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
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; }
|
|
30
|
-
|
|
31
|
-
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; }
|
|
32
|
-
|
|
33
|
-
var routes = void 0;
|
|
28
|
+
var routes;
|
|
34
29
|
|
|
35
30
|
var getPaths = function getPaths(pathname) {
|
|
36
31
|
var paths = ['/'];
|
|
37
|
-
|
|
38
32
|
if (pathname === '/') return paths;
|
|
39
|
-
|
|
40
33
|
pathname.split('/').reduce(function (prev, curr) {
|
|
41
|
-
var currPath = prev +
|
|
34
|
+
var currPath = prev + "/" + curr;
|
|
42
35
|
paths.push(currPath);
|
|
43
36
|
return currPath;
|
|
44
37
|
});
|
|
@@ -47,96 +40,97 @@ var getPaths = function getPaths(pathname) {
|
|
|
47
40
|
|
|
48
41
|
var findRouteName = function findRouteName(url) {
|
|
49
42
|
var aroute = routes.find(function (route) {
|
|
50
|
-
return (0, _reactRouterDom.matchPath)(url, {
|
|
43
|
+
return (0, _reactRouterDom.matchPath)(url, {
|
|
44
|
+
path: route.path,
|
|
45
|
+
exact: route.exact
|
|
46
|
+
});
|
|
51
47
|
});
|
|
52
48
|
return aroute && aroute.name ? aroute.name : null;
|
|
53
49
|
};
|
|
54
50
|
|
|
55
51
|
var BreadcrumbsItem = function BreadcrumbsItem(_ref) {
|
|
56
52
|
var match = _ref.match;
|
|
57
|
-
|
|
58
53
|
var routeName = findRouteName(match.url);
|
|
54
|
+
|
|
59
55
|
if (routeName) {
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
) : _react2.default.createElement(
|
|
67
|
-
_reactstrap.BreadcrumbItem,
|
|
68
|
-
null,
|
|
69
|
-
_react2.default.createElement(
|
|
70
|
-
_reactRouterDom.Link,
|
|
71
|
-
{ to: match.url || '' },
|
|
72
|
-
routeName
|
|
73
|
-
)
|
|
74
|
-
)
|
|
56
|
+
return (// eslint-disable-next-line react/prop-types
|
|
57
|
+
match.isExact ? /*#__PURE__*/_react["default"].createElement(_reactstrap.BreadcrumbItem, {
|
|
58
|
+
active: true
|
|
59
|
+
}, routeName) : /*#__PURE__*/_react["default"].createElement(_reactstrap.BreadcrumbItem, null, /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
|
|
60
|
+
to: match.url || ''
|
|
61
|
+
}, routeName))
|
|
75
62
|
);
|
|
76
63
|
}
|
|
64
|
+
|
|
77
65
|
return null;
|
|
78
66
|
};
|
|
79
67
|
|
|
80
68
|
BreadcrumbsItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
81
|
-
match:
|
|
82
|
-
url:
|
|
69
|
+
match: _propTypes["default"].shape({
|
|
70
|
+
url: _propTypes["default"].string
|
|
83
71
|
})
|
|
84
72
|
} : {};
|
|
85
73
|
|
|
86
74
|
var Breadcrumbs = function Breadcrumbs(args) {
|
|
87
75
|
var paths = getPaths(args.location.pathname);
|
|
88
76
|
var items = paths.map(function (path, i) {
|
|
89
|
-
return
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Route, {
|
|
78
|
+
key: i.toString(),
|
|
79
|
+
path: path,
|
|
80
|
+
component: BreadcrumbsItem
|
|
81
|
+
});
|
|
90
82
|
});
|
|
91
|
-
return
|
|
92
|
-
_reactstrap.Breadcrumb,
|
|
93
|
-
null,
|
|
94
|
-
items
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
var propTypes = {
|
|
99
|
-
children: _propTypes2.default.node,
|
|
100
|
-
className: _propTypes2.default.string,
|
|
101
|
-
appRoutes: _propTypes2.default.any,
|
|
102
|
-
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement(_reactstrap.Breadcrumb, null, items);
|
|
103
84
|
};
|
|
104
85
|
|
|
86
|
+
var propTypes = process.env.NODE_ENV !== "production" ? {
|
|
87
|
+
children: _propTypes["default"].node,
|
|
88
|
+
className: _propTypes["default"].string,
|
|
89
|
+
appRoutes: _propTypes["default"].any,
|
|
90
|
+
tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
|
|
91
|
+
} : {};
|
|
105
92
|
var defaultProps = {
|
|
106
93
|
tag: 'div',
|
|
107
94
|
className: '',
|
|
108
|
-
appRoutes: [{
|
|
95
|
+
appRoutes: [{
|
|
96
|
+
path: '/',
|
|
97
|
+
exact: true,
|
|
98
|
+
name: 'Home',
|
|
99
|
+
component: null
|
|
100
|
+
}]
|
|
109
101
|
};
|
|
110
102
|
|
|
111
|
-
var AppBreadcrumb = function (_Component) {
|
|
112
|
-
|
|
103
|
+
var AppBreadcrumb = /*#__PURE__*/function (_Component) {
|
|
104
|
+
_inheritsLoose(AppBreadcrumb, _Component);
|
|
113
105
|
|
|
114
106
|
function AppBreadcrumb(props) {
|
|
115
|
-
|
|
107
|
+
var _this;
|
|
116
108
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
_this = _Component.call(this, props) || this;
|
|
110
|
+
_this.state = {
|
|
111
|
+
routes: props.appRoutes
|
|
112
|
+
};
|
|
120
113
|
routes = _this.state.routes;
|
|
121
114
|
return _this;
|
|
122
115
|
}
|
|
123
116
|
|
|
124
|
-
AppBreadcrumb.prototype
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
117
|
+
var _proto = AppBreadcrumb.prototype;
|
|
118
|
+
|
|
119
|
+
_proto.render = function render() {
|
|
120
|
+
var _this$props = this.props,
|
|
121
|
+
className = _this$props.className,
|
|
122
|
+
Tag = _this$props.tag,
|
|
123
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "tag"]);
|
|
129
124
|
|
|
130
125
|
delete attributes.children;
|
|
131
126
|
delete attributes.appRoutes;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
);
|
|
127
|
+
var classes = (0, _classnames["default"])(className);
|
|
128
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, {
|
|
129
|
+
className: classes
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Route, _extends({
|
|
131
|
+
path: "/:path",
|
|
132
|
+
component: Breadcrumbs
|
|
133
|
+
}, attributes)));
|
|
140
134
|
};
|
|
141
135
|
|
|
142
136
|
return AppBreadcrumb;
|
|
@@ -144,6 +138,6 @@ var AppBreadcrumb = function (_Component) {
|
|
|
144
138
|
|
|
145
139
|
AppBreadcrumb.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
146
140
|
AppBreadcrumb.defaultProps = defaultProps;
|
|
147
|
-
|
|
148
|
-
exports
|
|
149
|
-
module.exports = exports
|
|
141
|
+
var _default = AppBreadcrumb;
|
|
142
|
+
exports["default"] = _default;
|
|
143
|
+
module.exports = exports.default;
|
package/lib/Breadcrumb2.js
CHANGED
|
@@ -1,43 +1,36 @@
|
|
|
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
|
-
var
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
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; }
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
+
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); }
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
+
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; }
|
|
22
23
|
|
|
23
|
-
function
|
|
24
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
|
|
29
|
-
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; }
|
|
30
|
-
|
|
31
|
-
var routes = void 0;
|
|
32
|
-
var router = void 0;
|
|
26
|
+
var routes;
|
|
27
|
+
var router;
|
|
33
28
|
|
|
34
29
|
var getPaths = function getPaths(pathname) {
|
|
35
30
|
var paths = ['/'];
|
|
36
|
-
|
|
37
31
|
if (pathname === '/') return paths;
|
|
38
|
-
|
|
39
32
|
pathname.split('/').reduce(function (prev, curr) {
|
|
40
|
-
var currPath = prev +
|
|
33
|
+
var currPath = prev + "/" + curr;
|
|
41
34
|
paths.push(currPath);
|
|
42
35
|
return currPath;
|
|
43
36
|
});
|
|
@@ -47,40 +40,35 @@ var getPaths = function getPaths(pathname) {
|
|
|
47
40
|
var findRouteName2 = function findRouteName2(url) {
|
|
48
41
|
var matchPath = router.matchPath;
|
|
49
42
|
var aroute = routes.find(function (route) {
|
|
50
|
-
return matchPath(url, {
|
|
43
|
+
return matchPath(url, {
|
|
44
|
+
path: route.path,
|
|
45
|
+
exact: route.exact
|
|
46
|
+
});
|
|
51
47
|
});
|
|
52
48
|
return aroute && aroute.name ? aroute.name : null;
|
|
53
49
|
};
|
|
54
50
|
|
|
55
51
|
var BreadcrumbsItem2 = function BreadcrumbsItem2(_ref) {
|
|
56
52
|
var match = _ref.match;
|
|
57
|
-
|
|
58
53
|
var routeName = findRouteName2(match.url);
|
|
59
54
|
var Link = router.Link;
|
|
55
|
+
|
|
60
56
|
if (routeName) {
|
|
61
|
-
return (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
) : _react2.default.createElement(
|
|
68
|
-
_reactstrap.BreadcrumbItem,
|
|
69
|
-
null,
|
|
70
|
-
_react2.default.createElement(
|
|
71
|
-
Link,
|
|
72
|
-
{ to: match.url || '' },
|
|
73
|
-
routeName
|
|
74
|
-
)
|
|
75
|
-
)
|
|
57
|
+
return (// eslint-disable-next-line react/prop-types
|
|
58
|
+
match.isExact ? /*#__PURE__*/_react["default"].createElement(_reactstrap.BreadcrumbItem, {
|
|
59
|
+
active: true
|
|
60
|
+
}, routeName) : /*#__PURE__*/_react["default"].createElement(_reactstrap.BreadcrumbItem, null, /*#__PURE__*/_react["default"].createElement(Link, {
|
|
61
|
+
to: match.url || ''
|
|
62
|
+
}, routeName))
|
|
76
63
|
);
|
|
77
64
|
}
|
|
65
|
+
|
|
78
66
|
return null;
|
|
79
67
|
};
|
|
80
68
|
|
|
81
69
|
BreadcrumbsItem2.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
82
|
-
match:
|
|
83
|
-
url:
|
|
70
|
+
match: _propTypes["default"].shape({
|
|
71
|
+
url: _propTypes["default"].string
|
|
84
72
|
})
|
|
85
73
|
} : {};
|
|
86
74
|
|
|
@@ -88,62 +76,67 @@ var Breadcrumbs2 = function Breadcrumbs2(args) {
|
|
|
88
76
|
var Route = router.Route;
|
|
89
77
|
var paths = getPaths(args.location.pathname);
|
|
90
78
|
var items = paths.map(function (path, i) {
|
|
91
|
-
return
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement(Route, {
|
|
80
|
+
key: i.toString(),
|
|
81
|
+
path: path,
|
|
82
|
+
component: BreadcrumbsItem2
|
|
83
|
+
});
|
|
92
84
|
});
|
|
93
|
-
return
|
|
94
|
-
_reactstrap.Breadcrumb,
|
|
95
|
-
null,
|
|
96
|
-
items
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
var propTypes = {
|
|
101
|
-
children: _propTypes2.default.node,
|
|
102
|
-
className: _propTypes2.default.string,
|
|
103
|
-
appRoutes: _propTypes2.default.any,
|
|
104
|
-
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]),
|
|
105
|
-
router: _propTypes2.default.any
|
|
85
|
+
return /*#__PURE__*/_react["default"].createElement(_reactstrap.Breadcrumb, null, items);
|
|
106
86
|
};
|
|
107
87
|
|
|
88
|
+
var propTypes = process.env.NODE_ENV !== "production" ? {
|
|
89
|
+
children: _propTypes["default"].node,
|
|
90
|
+
className: _propTypes["default"].string,
|
|
91
|
+
appRoutes: _propTypes["default"].any,
|
|
92
|
+
tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string]),
|
|
93
|
+
router: _propTypes["default"].any
|
|
94
|
+
} : {};
|
|
108
95
|
var defaultProps = {
|
|
109
96
|
tag: 'div',
|
|
110
97
|
className: '',
|
|
111
|
-
appRoutes: [{
|
|
98
|
+
appRoutes: [{
|
|
99
|
+
path: '/',
|
|
100
|
+
exact: true,
|
|
101
|
+
name: 'Home',
|
|
102
|
+
component: null
|
|
103
|
+
}]
|
|
112
104
|
};
|
|
113
105
|
|
|
114
|
-
var AppBreadcrumb2 = function (_Component) {
|
|
115
|
-
|
|
106
|
+
var AppBreadcrumb2 = /*#__PURE__*/function (_Component) {
|
|
107
|
+
_inheritsLoose(AppBreadcrumb2, _Component);
|
|
116
108
|
|
|
117
109
|
function AppBreadcrumb2(props) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
|
110
|
+
var _this;
|
|
121
111
|
|
|
122
|
-
_this
|
|
112
|
+
_this = _Component.call(this, props) || this;
|
|
113
|
+
_this.state = {
|
|
114
|
+
routes: props.appRoutes
|
|
115
|
+
};
|
|
123
116
|
routes = _this.state.routes;
|
|
124
117
|
router = props.router;
|
|
125
118
|
return _this;
|
|
126
119
|
}
|
|
127
120
|
|
|
128
|
-
AppBreadcrumb2.prototype
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
var _proto = AppBreadcrumb2.prototype;
|
|
122
|
+
|
|
123
|
+
_proto.render = function render() {
|
|
124
|
+
var _this$props = this.props,
|
|
125
|
+
className = _this$props.className,
|
|
126
|
+
Tag = _this$props.tag,
|
|
127
|
+
attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "tag"]);
|
|
133
128
|
|
|
134
129
|
delete attributes.children;
|
|
135
130
|
delete attributes.appRoutes;
|
|
136
131
|
delete attributes.router;
|
|
137
|
-
|
|
138
|
-
var classes = (0, _classnames2.default)(className);
|
|
139
|
-
|
|
132
|
+
var classes = (0, _classnames["default"])(className);
|
|
140
133
|
var Route = router.Route;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
);
|
|
134
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, {
|
|
135
|
+
className: classes
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement(Route, _extends({
|
|
137
|
+
path: "/:path",
|
|
138
|
+
component: Breadcrumbs2
|
|
139
|
+
}, attributes)));
|
|
147
140
|
};
|
|
148
141
|
|
|
149
142
|
return AppBreadcrumb2;
|
|
@@ -151,6 +144,6 @@ var AppBreadcrumb2 = function (_Component) {
|
|
|
151
144
|
|
|
152
145
|
AppBreadcrumb2.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
153
146
|
AppBreadcrumb2.defaultProps = defaultProps;
|
|
154
|
-
|
|
155
|
-
exports
|
|
156
|
-
module.exports = exports
|
|
147
|
+
var _default = AppBreadcrumb2;
|
|
148
|
+
exports["default"] = _default;
|
|
149
|
+
module.exports = exports.default;
|
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;
|