@bundle-stats/ui 3.4.0-alpha.4 → 4.0.0-alpha.10
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/lib/app/app.js +9 -22
- package/lib/app/app.stories.js +1 -22
- package/lib/app/header/header.js +2 -1
- package/lib/assets/icons.svg +0 -8
- package/lib/components/asset-info/asset-info.js +1 -1
- package/lib/components/bundle-assets/bundle-assets.js +3 -2
- package/lib/components/bundle-assets/index.js +1 -1
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +1 -1
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.js +8 -44
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +1 -20
- package/lib/components/bundle-modules/bundle-modules.js +3 -4
- package/lib/components/bundle-modules/index.js +1 -1
- package/lib/components/bundle-packages/bundle-packages.js +3 -2
- package/lib/components/bundle-packages/index.js +1 -1
- package/lib/components/component-link.js +1 -1
- package/lib/components/index.js +0 -8
- package/lib/components/job-meta/job-meta.js +1 -1
- package/lib/components/job-name/job-name.js +1 -1
- package/lib/components/metrics-table/metrics-table.js +1 -1
- package/lib/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib/components/module-info/module-info.js +1 -1
- package/lib/components/summary/summary.js +13 -24
- package/lib/components/summary/summary.module.css +1 -45
- package/lib/components/summary/summary.stories.js +1 -30
- package/lib/components/summary-item/summary-item.js +14 -37
- package/lib/components/summary-item/summary-item.module.css +25 -13
- package/lib/components/summary-item/summary-item.stories.js +53 -51
- package/lib/constants.js +4 -4
- package/lib/layout/box/box.js +1 -1
- package/lib/layout/flex-stack/flex-stack.js +1 -1
- package/lib/layout/footer/footer.js +1 -1
- package/lib/layout/separator.js +1 -1
- package/lib/layout/stack/stack.js +1 -1
- package/lib/query-state.js +1 -1
- package/lib/ui/alert/alert.js +3 -13
- package/lib/ui/container/container.js +1 -1
- package/lib/ui/filters/filters.container.js +3 -3
- package/lib/ui/filters/filters.js +1 -1
- package/lib/ui/horizontal-bar-chart/horizontal-bar-chart.js +2 -2
- package/lib/ui/hover-card/hover-card.js +8 -2
- package/lib/ui/hover-card/hover-card.stories.js +1 -1
- package/lib/ui/icon/icon.js +1 -3
- package/lib/ui/input/input.js +1 -1
- package/lib/ui/loader/loader.js +1 -1
- package/lib/ui/logo/logo.js +1 -1
- package/lib/ui/panels/panels.js +1 -1
- package/lib/ui/skeleton/skeleton.js +1 -1
- package/lib/ui/sort-dropdown/sort-dropdown.js +1 -1
- package/lib/ui/tag/tag.js +1 -1
- package/lib/ui/tooltip/tooltip.js +1 -1
- package/lib-esm/app/app.js +9 -21
- package/lib-esm/app/app.stories.js +1 -22
- package/lib-esm/app/header/header.js +2 -1
- package/lib-esm/assets/icons.svg +0 -8
- package/lib-esm/components/asset-info/asset-info.js +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.js +3 -2
- package/lib-esm/components/bundle-assets/bundle-assets.utils.js +1 -0
- package/lib-esm/components/bundle-assets/index.js +1 -1
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +1 -1
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.js +8 -25
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +0 -18
- package/lib-esm/components/bundle-modules/bundle-modules.js +3 -4
- package/lib-esm/components/bundle-modules/index.js +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js +3 -2
- package/lib-esm/components/bundle-packages/bundle-packages.utils.js +1 -0
- package/lib-esm/components/bundle-packages/index.js +1 -1
- package/lib-esm/components/component-link.js +1 -1
- package/lib-esm/components/index.js +0 -1
- package/lib-esm/components/job-meta/job-meta.js +1 -1
- package/lib-esm/components/job-name/job-name.js +1 -1
- package/lib-esm/components/metrics-table/metrics-table.js +1 -1
- package/lib-esm/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib-esm/components/module-info/module-info.js +1 -1
- package/lib-esm/components/summary/summary.js +14 -22
- package/lib-esm/components/summary/summary.module.css +1 -45
- package/lib-esm/components/summary/summary.stories.js +1 -28
- package/lib-esm/components/summary-item/summary-item.js +11 -33
- package/lib-esm/components/summary-item/summary-item.module.css +25 -13
- package/lib-esm/components/summary-item/summary-item.stories.js +38 -50
- package/lib-esm/constants.js +4 -4
- package/lib-esm/layout/box/box.js +1 -1
- package/lib-esm/layout/flex-stack/flex-stack.js +1 -1
- package/lib-esm/layout/footer/footer.js +1 -1
- package/lib-esm/layout/separator.js +1 -1
- package/lib-esm/layout/stack/stack.js +1 -1
- package/lib-esm/query-state.js +1 -1
- package/lib-esm/ui/alert/alert.js +3 -6
- package/lib-esm/ui/container/container.js +1 -1
- package/lib-esm/ui/filters/filters.container.js +1 -1
- package/lib-esm/ui/filters/filters.js +2 -1
- package/lib-esm/ui/hover-card/hover-card.js +8 -2
- package/lib-esm/ui/hover-card/hover-card.stories.js +1 -1
- package/lib-esm/ui/icon/icon.js +1 -3
- package/lib-esm/ui/input/input.js +1 -1
- package/lib-esm/ui/loader/loader.js +1 -1
- package/lib-esm/ui/logo/logo.js +1 -1
- package/lib-esm/ui/panels/panels.js +1 -1
- package/lib-esm/ui/skeleton/skeleton.js +1 -1
- package/lib-esm/ui/sort-dropdown/sort-dropdown.js +1 -1
- package/lib-esm/ui/tag/tag.js +1 -1
- package/lib-esm/ui/tooltip/tooltip.js +1 -1
- package/package.json +31 -31
- package/src/app/app.jsx +7 -14
- package/src/app/header/header.jsx +1 -1
- package/src/assets/icons.svg +0 -8
- package/src/components/bundle-assets/bundle-assets.jsx +1 -1
- package/src/components/bundle-assets-totals-table/bundle-assets-totals-table.jsx +13 -27
- package/src/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
- package/src/components/bundle-modules/bundle-modules.jsx +1 -2
- package/src/components/bundle-packages/bundle-packages.jsx +2 -2
- package/src/components/index.js +0 -1
- package/src/components/summary/summary.jsx +19 -24
- package/src/components/summary/summary.module.css +1 -45
- package/src/components/summary-item/summary-item.jsx +10 -23
- package/src/components/summary-item/summary-item.module.css +25 -13
- package/src/constants.js +11 -7
- package/src/ui/alert/alert.jsx +2 -7
- package/src/ui/hover-card/hover-card.jsx +5 -0
- package/src/ui/icon/icon.jsx +0 -2
- package/lib/assets/icons/alert-circle.svg +0 -1
- package/lib/assets/icons/check-circle.svg +0 -1
- package/lib/components/budget-info/budget-info.js +0 -80
- package/lib/components/budget-info/budget-info.module.css +0 -40
- package/lib/components/budget-info/budget-info.stories.js +0 -44
- package/lib/components/budget-info/index.js +0 -18
- package/lib/components/budget-insights/budget-insights.js +0 -200
- package/lib/components/budget-insights/budget-insights.module.css +0 -53
- package/lib/components/budget-insights/budget-insights.stories.js +0 -104
- package/lib/components/budget-insights/index.js +0 -18
- package/lib-esm/assets/icons/alert-circle.svg +0 -1
- package/lib-esm/assets/icons/check-circle.svg +0 -1
- package/lib-esm/components/budget-info/budget-info.js +0 -58
- package/lib-esm/components/budget-info/budget-info.module.css +0 -40
- package/lib-esm/components/budget-info/budget-info.stories.js +0 -30
- package/lib-esm/components/budget-info/index.js +0 -1
- package/lib-esm/components/budget-insights/budget-insights.js +0 -148
- package/lib-esm/components/budget-insights/budget-insights.module.css +0 -53
- package/lib-esm/components/budget-insights/budget-insights.stories.js +0 -84
- package/lib-esm/components/budget-insights/index.js +0 -1
- package/src/assets/icons/alert-circle.svg +0 -1
- package/src/assets/icons/check-circle.svg +0 -1
- package/src/components/budget-info/budget-info.jsx +0 -65
- package/src/components/budget-info/budget-info.module.css +0 -40
- package/src/components/budget-info/index.js +0 -1
- package/src/components/budget-insights/budget-insights.jsx +0 -157
- package/src/components/budget-insights/budget-insights.module.css +0 -53
- package/src/components/budget-insights/index.js +0 -1
|
@@ -44,7 +44,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
44
44
|
|
|
45
45
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
46
46
|
|
|
47
|
-
function _extends() { _extends = Object.assign
|
|
47
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
48
48
|
|
|
49
49
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
50
50
|
|
|
@@ -47,7 +47,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
47
47
|
|
|
48
48
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
49
49
|
|
|
50
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
50
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
51
51
|
|
|
52
52
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
53
53
|
|
|
@@ -57,7 +57,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
57
57
|
|
|
58
58
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
59
59
|
|
|
60
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
60
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
61
61
|
|
|
62
62
|
var HorizontalBarChartItem = /*#__PURE__*/function (_React$Component) {
|
|
63
63
|
_inherits(HorizontalBarChartItem, _React$Component);
|
|
@@ -23,7 +23,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
27
27
|
|
|
28
28
|
var resolveComponent = function resolveComponent(as, href) {
|
|
29
29
|
if (as) {
|
|
@@ -53,6 +53,11 @@ var HoverCard = function HoverCard(props) {
|
|
|
53
53
|
}); // Fallback to span if no href
|
|
54
54
|
|
|
55
55
|
var Component = resolveComponent(as, href);
|
|
56
|
+
|
|
57
|
+
var handleOnClick = function handleOnClick(event) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
};
|
|
60
|
+
|
|
56
61
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
62
|
className: (0, _classnames["default"])(_hoverCardModule["default"].root, className)
|
|
58
63
|
}, /*#__PURE__*/_react["default"].createElement(_hovercard.HovercardAnchor, {
|
|
@@ -65,7 +70,8 @@ var HoverCard = function HoverCard(props) {
|
|
|
65
70
|
className: (0, _classnames["default"])(_hoverCardModule["default"].hoverCard, hoverCardClassName),
|
|
66
71
|
style: {
|
|
67
72
|
zIndex: 10000
|
|
68
|
-
}
|
|
73
|
+
},
|
|
74
|
+
onClick: handleOnClick
|
|
69
75
|
}), /*#__PURE__*/_react["default"].createElement(_hovercard.HovercardArrow, {
|
|
70
76
|
size: 24
|
|
71
77
|
}), typeof children === 'function' ? children({
|
|
@@ -11,7 +11,7 @@ var _ = require(".");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
17
|
title: 'UI/HoverCard',
|
package/lib/ui/icon/icon.js
CHANGED
|
@@ -17,20 +17,18 @@ var _excluded = ["className", "glyph", "as", "size"];
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
21
21
|
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
|
|
24
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; }
|
|
25
25
|
|
|
26
26
|
var ICONS = {
|
|
27
|
-
ALERT_CIRCLE: 'alert-circle',
|
|
28
27
|
ARROW: 'arrow',
|
|
29
28
|
ARROW_RIGHT_CIRLCE: 'arrow-right-circle',
|
|
30
29
|
CANCEL: 'cancel',
|
|
31
30
|
CLOSE: 'close',
|
|
32
31
|
CLOCK: 'clock',
|
|
33
|
-
CHECK_CIRCLE: 'check-circle',
|
|
34
32
|
COMMIT: 'commit',
|
|
35
33
|
FILTER: 'filter',
|
|
36
34
|
HELP: 'help',
|
package/lib/ui/input/input.js
CHANGED
|
@@ -17,7 +17,7 @@ var _excluded = ["className", "size"];
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
21
21
|
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
|
package/lib/ui/loader/loader.js
CHANGED
|
@@ -17,7 +17,7 @@ var _excluded = ["className", "size"];
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
21
21
|
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
|
package/lib/ui/logo/logo.js
CHANGED
|
@@ -21,7 +21,7 @@ var _ICONS;
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
25
|
|
|
26
26
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
27
|
|
package/lib/ui/panels/panels.js
CHANGED
|
@@ -18,7 +18,7 @@ var _excluded = ["className"],
|
|
|
18
18
|
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
20
|
|
|
21
|
-
function _extends() { _extends = Object.assign
|
|
21
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
22
|
|
|
23
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
24
|
|
|
@@ -17,7 +17,7 @@ var _excluded = ["className"];
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
21
21
|
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
|
|
@@ -21,7 +21,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
21
21
|
|
|
22
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
25
25
|
|
|
26
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
|
package/lib/ui/tag/tag.js
CHANGED
|
@@ -17,7 +17,7 @@ var _excluded = ["className", "as", "kind", "size"];
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
21
21
|
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
|
|
@@ -19,7 +19,7 @@ var _excluded = ["className", "title", "children", "as", "containerRef", "darkMo
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
25
|
|
package/lib-esm/app/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React, { useContext, useEffect, useMemo } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -8,7 +8,6 @@ import { METRICS_WEBPACK_ASSETS, METRICS_WEBPACK_GENERAL, METRICS_WEBPACK_MODULE
|
|
|
8
8
|
import { Box } from '../layout/box';
|
|
9
9
|
import { Container } from '../ui/container';
|
|
10
10
|
import { DuplicatePackagesWarning } from '../components/duplicate-packages-warning';
|
|
11
|
-
import { BudgetInsights } from '../components/budget-insights';
|
|
12
11
|
import { Summary } from '../components/summary';
|
|
13
12
|
import { BundleAssets } from '../components/bundle-assets';
|
|
14
13
|
import { BundleAssetsTotalsChartBars } from '../components/bundle-assets-totals-chart-bars';
|
|
@@ -54,6 +53,7 @@ const Layout = _ref => {
|
|
|
54
53
|
|
|
55
54
|
Layout.propTypes = {
|
|
56
55
|
jobs: PropTypes.arrayOf(PropTypes.object),
|
|
56
|
+
// eslint-disable-line react/forbid-prop-types
|
|
57
57
|
version: PropTypes.string
|
|
58
58
|
};
|
|
59
59
|
Layout.defaultProps = {
|
|
@@ -78,12 +78,11 @@ const JobsProvider = _ref2 => {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
JobsProvider.propTypes = {
|
|
81
|
-
jobs: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
81
|
+
jobs: PropTypes.arrayOf(PropTypes.object).isRequired // eslint-disable-line react/forbid-prop-types
|
|
82
|
+
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
const OverviewContent = () => {
|
|
85
|
-
var _jobs$0$insights, _jobs$0$insights$webp;
|
|
86
|
-
|
|
87
86
|
const {
|
|
88
87
|
jobs
|
|
89
88
|
} = useContext(JobsContext);
|
|
@@ -93,15 +92,10 @@ const OverviewContent = () => {
|
|
|
93
92
|
const duplicatePackagesInsights = Boolean(duplicatePackagesCount.current || duplicatePackagesCount.baseline);
|
|
94
93
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
95
94
|
space: "medium"
|
|
96
|
-
}, duplicatePackagesInsights && /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(
|
|
97
|
-
space: "small"
|
|
98
|
-
}, /*#__PURE__*/React.createElement(DuplicatePackagesWarning, {
|
|
95
|
+
}, duplicatePackagesInsights && /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(DuplicatePackagesWarning, {
|
|
99
96
|
duplicatePackagesCount: duplicatePackagesCount,
|
|
100
97
|
showDelta: jobs.length > 1
|
|
101
|
-
}), /*#__PURE__*/React.createElement(
|
|
102
|
-
source: "webpack",
|
|
103
|
-
budgets: (_jobs$0$insights = jobs[0].insights) == null ? void 0 : (_jobs$0$insights$webp = _jobs$0$insights.webpack) == null ? void 0 : _jobs$0$insights$webp.budgets
|
|
104
|
-
}))), /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Stack, {
|
|
98
|
+
})), /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Stack, {
|
|
105
99
|
space: "small"
|
|
106
100
|
}, /*#__PURE__*/React.createElement(TotalSizeTypeTitle, null), /*#__PURE__*/React.createElement(BundleAssetsTotalsChartBars, {
|
|
107
101
|
jobs: jobs
|
|
@@ -112,7 +106,7 @@ const OverviewContent = () => {
|
|
|
112
106
|
};
|
|
113
107
|
|
|
114
108
|
const AssetsContent = () => {
|
|
115
|
-
var _jobs
|
|
109
|
+
var _jobs$;
|
|
116
110
|
|
|
117
111
|
const [bundleStatsState, bundleStatsSetState] = useComponentQueryState(COMPONENT.BUNDLE_ASSETS);
|
|
118
112
|
const {
|
|
@@ -123,7 +117,6 @@ const AssetsContent = () => {
|
|
|
123
117
|
}, /*#__PURE__*/React.createElement(Summary, {
|
|
124
118
|
keys: METRICS_WEBPACK_ASSETS,
|
|
125
119
|
data: jobs == null ? void 0 : (_jobs$ = jobs[0]) == null ? void 0 : _jobs$.summary,
|
|
126
|
-
budgets: (_jobs$0$insights2 = jobs[0].insights) == null ? void 0 : (_jobs$0$insights2$web = _jobs$0$insights2.webpack) == null ? void 0 : _jobs$0$insights2$web.budgets,
|
|
127
120
|
showSummaryItemDelta: (jobs == null ? void 0 : jobs.length) !== 1
|
|
128
121
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
129
122
|
outline: true
|
|
@@ -134,7 +127,7 @@ const AssetsContent = () => {
|
|
|
134
127
|
};
|
|
135
128
|
|
|
136
129
|
const ModulesContent = () => {
|
|
137
|
-
var _jobs$2
|
|
130
|
+
var _jobs$2;
|
|
138
131
|
|
|
139
132
|
const [bundleModulesState, bundleModulesSetState] = useComponentQueryState(COMPONENT.BUNDLE_MODULES);
|
|
140
133
|
const {
|
|
@@ -145,7 +138,6 @@ const ModulesContent = () => {
|
|
|
145
138
|
}, /*#__PURE__*/React.createElement(Summary, {
|
|
146
139
|
keys: METRICS_WEBPACK_MODULES,
|
|
147
140
|
data: jobs == null ? void 0 : (_jobs$2 = jobs[0]) == null ? void 0 : _jobs$2.summary,
|
|
148
|
-
budgets: (_jobs$0$insights3 = jobs[0].insights) == null ? void 0 : (_jobs$0$insights3$web = _jobs$0$insights3.webpack) == null ? void 0 : _jobs$0$insights3$web.budgets,
|
|
149
141
|
showSummaryItemDelta: (jobs == null ? void 0 : jobs.length) !== 1
|
|
150
142
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
151
143
|
outline: true
|
|
@@ -156,7 +148,7 @@ const ModulesContent = () => {
|
|
|
156
148
|
};
|
|
157
149
|
|
|
158
150
|
const PackagesContent = () => {
|
|
159
|
-
var _jobs$3
|
|
151
|
+
var _jobs$3;
|
|
160
152
|
|
|
161
153
|
const [bundlePackagesState, bundlePackagesSetState] = useComponentQueryState(COMPONENT.BUNDLE_PACKAGES);
|
|
162
154
|
const {
|
|
@@ -167,7 +159,6 @@ const PackagesContent = () => {
|
|
|
167
159
|
}, /*#__PURE__*/React.createElement(Summary, {
|
|
168
160
|
keys: METRICS_WEBPACK_PACKAGES,
|
|
169
161
|
data: jobs == null ? void 0 : (_jobs$3 = jobs[0]) == null ? void 0 : _jobs$3.summary,
|
|
170
|
-
budgets: (_jobs$0$insights4 = jobs[0].insights) == null ? void 0 : (_jobs$0$insights4$web = _jobs$0$insights4.webpack) == null ? void 0 : _jobs$0$insights4$web.budgets,
|
|
171
162
|
showSummaryItemDelta: (jobs == null ? void 0 : jobs.length) !== 1
|
|
172
163
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
173
164
|
outline: true
|
|
@@ -179,8 +170,6 @@ const PackagesContent = () => {
|
|
|
179
170
|
};
|
|
180
171
|
|
|
181
172
|
const AppComponent = _ref3 => {
|
|
182
|
-
var _jobs$0$insights5, _jobs$0$insights5$web;
|
|
183
|
-
|
|
184
173
|
let {
|
|
185
174
|
version,
|
|
186
175
|
jobs
|
|
@@ -205,7 +194,6 @@ const AppComponent = _ref3 => {
|
|
|
205
194
|
size: "large",
|
|
206
195
|
keys: METRICS_WEBPACK_GENERAL,
|
|
207
196
|
data: jobs[0].summary,
|
|
208
|
-
budgets: (_jobs$0$insights5 = jobs[0].insights) == null ? void 0 : (_jobs$0$insights5$web = _jobs$0$insights5.webpack) == null ? void 0 : _jobs$0$insights5$web.budgets,
|
|
209
197
|
showSummaryItemDelta: jobs.length !== 1
|
|
210
198
|
})), /*#__PURE__*/React.createElement(Container, {
|
|
211
199
|
className: css.tabsContainer
|
|
@@ -28,28 +28,7 @@ const JOBS = createJobs([CURRENT_SOURCE, BASELINE_SOURCE], {
|
|
|
28
28
|
webpack: {
|
|
29
29
|
budgets: [{
|
|
30
30
|
metric: 'totalSizeByTypeALL',
|
|
31
|
-
value:
|
|
32
|
-
}, {
|
|
33
|
-
metric: 'totalInitialSizeJS',
|
|
34
|
-
value: 512 * 1024
|
|
35
|
-
}, {
|
|
36
|
-
metric: 'totalInitialSizeCSS',
|
|
37
|
-
value: 50 * 1024
|
|
38
|
-
}, {
|
|
39
|
-
metric: 'chunkCount',
|
|
40
|
-
value: 50
|
|
41
|
-
}, {
|
|
42
|
-
metric: 'moduleCount',
|
|
43
|
-
value: 2000
|
|
44
|
-
}, {
|
|
45
|
-
metric: 'duplicatePackagesCount',
|
|
46
|
-
value: 5
|
|
47
|
-
}, {
|
|
48
|
-
metric: 'sizes.totalSizeByTypeJS',
|
|
49
|
-
value: 2 * 1024 * 1024
|
|
50
|
-
}, {
|
|
51
|
-
metric: 'sizes.totalSizeByTypeCSS',
|
|
52
|
-
value: 20 * 1024
|
|
31
|
+
value: 1024 * 1024
|
|
53
32
|
}]
|
|
54
33
|
}
|
|
55
34
|
});
|
|
@@ -21,7 +21,8 @@ export const Header = _ref => {
|
|
|
21
21
|
};
|
|
22
22
|
Header.propTypes = {
|
|
23
23
|
className: PropTypes.string,
|
|
24
|
-
jobs: PropTypes.arrayOf(PropTypes.object)
|
|
24
|
+
jobs: PropTypes.arrayOf(PropTypes.object) // eslint-disable-line react/forbid-prop-types
|
|
25
|
+
|
|
25
26
|
};
|
|
26
27
|
Header.defaultProps = {
|
|
27
28
|
className: '',
|
package/lib-esm/assets/icons.svg
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
<svg width="16" height="16">
|
|
2
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-alert-circle" viewBox="0 0 24 24" id="alert-circle" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<circle cx="12" cy="12" r="10"/>
|
|
4
|
-
<path d="M12 8v4M12 16h.01"/>
|
|
5
|
-
</symbol>
|
|
6
2
|
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down" id="arrow" xmlns="http://www.w3.org/2000/svg">
|
|
7
3
|
<path d="M12 5v14M19 12l-7 7-7-7"/>
|
|
8
4
|
</symbol>
|
|
@@ -14,10 +10,6 @@
|
|
|
14
10
|
<circle cx="12" cy="12" r="10"/>
|
|
15
11
|
<path d="M15 9l-6 6M9 9l6 6"/>
|
|
16
12
|
</symbol>
|
|
17
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle" viewBox="0 0 24 24" id="check-circle" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"/>
|
|
19
|
-
<path d="M22 4L12 14.01l-3-3"/>
|
|
20
|
-
</symbol>
|
|
21
13
|
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock" id="clock" xmlns="http://www.w3.org/2000/svg">
|
|
22
14
|
<circle cx="12" cy="12" r="10"/>
|
|
23
15
|
<path d="M12 6v6l4 2"/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _map from "lodash/map";
|
|
2
2
|
import _find from "lodash/find";
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _map from "lodash/map";
|
|
2
2
|
import _get from "lodash/get";
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
5
5
|
|
|
6
6
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -145,7 +145,8 @@ RowHeader.propTypes = {
|
|
|
145
145
|
isChunk: PropTypes.bool,
|
|
146
146
|
isInitial: PropTypes.bool,
|
|
147
147
|
isEntry: PropTypes.bool,
|
|
148
|
-
runs: PropTypes.arrayOf(PropTypes.object)
|
|
148
|
+
runs: PropTypes.arrayOf(PropTypes.object) // eslint-disable-line react/forbid-prop-types
|
|
149
|
+
|
|
149
150
|
}).isRequired,
|
|
150
151
|
chunks: PropTypes.arrayOf(PropTypes.shape({
|
|
151
152
|
id: PropTypes.string,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _get from "lodash/get";
|
|
2
|
+
import "core-js/modules/es.array.includes.js";
|
|
2
3
|
import { ASSET_ENTRY_TYPE, ASSET_FILE_TYPE, ASSET_FILTERS, getFileType } from '@bundle-stats/utils';
|
|
3
4
|
import { SORT_BY_NAME, SORT_BY_DELTA, SORT_BY_SIZE } from './bundle-assets.constants';
|
|
4
5
|
export const addRowAssetFlags = row => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js
CHANGED
|
@@ -3,7 +3,7 @@ import _max from "lodash/max";
|
|
|
3
3
|
import _map from "lodash/map";
|
|
4
4
|
import _get from "lodash/get";
|
|
5
5
|
|
|
6
|
-
function _extends() { _extends = Object.assign
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
@@ -1,52 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import React from 'react';
|
|
6
4
|
import PropTypes from 'prop-types';
|
|
7
5
|
import { getBundleAssetsFileTypeComponentLink } from '@bundle-stats/utils';
|
|
8
6
|
import * as webpack from '@bundle-stats/utils/lib-esm/webpack';
|
|
9
7
|
import { ASSETS_SIZES_FILE_TYPE_MAP } from '../../constants';
|
|
10
|
-
import { FlexStack } from '../../layout/flex-stack';
|
|
11
8
|
import { MetricsTable } from '../metrics-table';
|
|
12
9
|
import { ComponentLink } from '../component-link';
|
|
13
|
-
import { BudgetInfo } from '../budget-info';
|
|
14
|
-
import css from './bundle-assets-totals-table.module.css';
|
|
15
10
|
export const BundleAssetsTotalsTable = _ref => {
|
|
16
|
-
var _jobs$0$insights, _jobs$0$insights$webp;
|
|
17
|
-
|
|
18
11
|
let {
|
|
19
12
|
className,
|
|
20
13
|
jobs,
|
|
21
14
|
customComponentLink: CustomComponentLink,
|
|
22
15
|
...restProps
|
|
23
16
|
} = _ref;
|
|
24
|
-
const items =
|
|
25
|
-
|
|
26
|
-
const renderRowHeader =
|
|
17
|
+
const items = webpack.compareBySection.sizes(jobs);
|
|
18
|
+
|
|
19
|
+
const renderRowHeader = item => {
|
|
27
20
|
const fileType = ASSETS_SIZES_FILE_TYPE_MAP[item.key];
|
|
28
21
|
const {
|
|
29
22
|
section,
|
|
30
23
|
title,
|
|
31
24
|
params
|
|
32
25
|
} = getBundleAssetsFileTypeComponentLink(fileType, item.label);
|
|
33
|
-
const [_, ...metricSlugs] = item.key.split('.');
|
|
34
|
-
const metricKey = metricSlugs.join('.');
|
|
35
|
-
|
|
36
|
-
const budget = _get(budgets, metricKey);
|
|
37
|
-
|
|
38
26
|
return /*#__PURE__*/React.createElement(CustomComponentLink, {
|
|
39
27
|
section: section,
|
|
40
28
|
title: title,
|
|
41
29
|
params: params
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, /*#__PURE__*/React.createElement("span", null, item.label), budget && /*#__PURE__*/React.createElement(BudgetInfo, {
|
|
46
|
-
metricId: item.key,
|
|
47
|
-
budgetInsight: budget
|
|
48
|
-
})));
|
|
49
|
-
}, [CustomComponentLink]);
|
|
30
|
+
}, item.label);
|
|
31
|
+
};
|
|
32
|
+
|
|
50
33
|
return /*#__PURE__*/React.createElement(MetricsTable, _extends({
|
|
51
34
|
className: className,
|
|
52
35
|
runs: jobs,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
1
|
+
.title {
|
|
2
|
+
color: var(--color-text-light);
|
|
3
3
|
}
|
|
@@ -31,22 +31,4 @@ EmptyBaseline.args = {
|
|
|
31
31
|
jobs: createJobs([{
|
|
32
32
|
webpack: currentStats
|
|
33
33
|
}, null])
|
|
34
|
-
};
|
|
35
|
-
export const WithBudgets = Template.bind();
|
|
36
|
-
WithBudgets.args = {
|
|
37
|
-
jobs: createJobs([{
|
|
38
|
-
webpack: currentStats
|
|
39
|
-
}, {
|
|
40
|
-
webpack: baselineStats
|
|
41
|
-
}], {
|
|
42
|
-
webpack: {
|
|
43
|
-
budgets: [{
|
|
44
|
-
metric: 'sizes.totalSizeByTypeJS',
|
|
45
|
-
value: 2 * 1024 * 1024
|
|
46
|
-
}, {
|
|
47
|
-
metric: 'sizes.totalSizeByTypeCSS',
|
|
48
|
-
value: 20 * 1024
|
|
49
|
-
}]
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
34
|
};
|
|
@@ -2,7 +2,7 @@ import _map from "lodash/map";
|
|
|
2
2
|
import _isEmpty from "lodash/isEmpty";
|
|
3
3
|
import _get from "lodash/get";
|
|
4
4
|
|
|
5
|
-
function _extends() { _extends = Object.assign
|
|
5
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
6
6
|
|
|
7
7
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -121,9 +121,8 @@ export const BundleModules = _ref2 => {
|
|
|
121
121
|
disabled: jobs.length <= 1
|
|
122
122
|
},
|
|
123
123
|
[MODULE_FILTERS.DUPLICATED]: {
|
|
124
|
-
label: '
|
|
125
|
-
defaultValue: filters[MODULE_FILTERS.DUPLICATED]
|
|
126
|
-
disabled: jobs.length <= 1
|
|
124
|
+
label: 'Duplicate',
|
|
125
|
+
defaultValue: filters[MODULE_FILTERS.DUPLICATED]
|
|
127
126
|
},
|
|
128
127
|
[MODULE_SOURCE_TYPE]: {
|
|
129
128
|
label: 'Source',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _map from "lodash/map";
|
|
2
2
|
import _uniqBy from "lodash/uniqBy";
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -30,7 +30,8 @@ const PackagePopoverContent = _ref => {
|
|
|
30
30
|
duplicate,
|
|
31
31
|
CustomComponentLink
|
|
32
32
|
} = _ref;
|
|
33
|
-
const
|
|
33
|
+
const fallbackPackagePath = `node_modules/${fullName.split(PACKAGES_SEPARATOR).join('/node_modules/')}`;
|
|
34
|
+
const normalizedPackagePath = `${path || fallbackPackagePath}/`;
|
|
34
35
|
const [normalizedName, packageId] = name.split(PACKAGE_ID_SEPARATOR);
|
|
35
36
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
36
37
|
space: "xsmall",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _uniq from "lodash/uniq";
|
|
2
2
|
import _flatten from "lodash/flatten";
|
|
3
3
|
import _get from "lodash/get";
|
|
4
|
+
import "core-js/modules/es.array.includes.js";
|
|
4
5
|
import { PACKAGE_FILTERS } from '@bundle-stats/utils';
|
|
5
6
|
import { SORT_BY_NAME, SORT_BY_DELTA, SORT_BY_SIZE } from './bundle-packages.constants'; // Get a list of duplicate packages across jobs
|
|
6
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -4,7 +4,6 @@ export { BundleAssetsTotalsTable } from './bundle-assets-totals-table';
|
|
|
4
4
|
export { BundleAssetsTotalsChartBars } from './bundle-assets-totals-chart-bars';
|
|
5
5
|
export { BundlePackages } from './bundle-packages';
|
|
6
6
|
export { BundleModules } from './bundle-modules';
|
|
7
|
-
export { BudgetInsights } from './budget-insights';
|
|
8
7
|
export { ComponentLink } from './component-link';
|
|
9
8
|
export { DuplicatePackagesWarning } from './duplicate-packages-warning';
|
|
10
9
|
export { Delta } from './delta';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|