@bundle-stats/ui 4.3.0-beta.2 → 4.3.0-rc.0
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/globals.d.ts +4 -0
- package/lib/app/app.js +26 -8
- package/lib/app/app.js.map +1 -1
- package/lib/assets/icons.svg +14 -1
- package/lib/assets/icons.svg.js +10 -0
- package/lib/assets/icons.svg.js.map +1 -1
- package/lib/components/asset-info/asset-info.js +43 -44
- package/lib/components/asset-info/asset-info.js.map +1 -1
- package/lib/components/asset-info/asset-info.module.css +18 -6
- package/lib/components/asset-info/index.js.map +1 -1
- package/lib/components/asset-not-predictive/asset-not-predictive.js +28 -0
- package/lib/components/asset-not-predictive/asset-not-predictive.js.map +1 -0
- package/lib/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/lib/components/{duplicate-packages-insight → asset-not-predictive}/index.js +1 -1
- package/lib/components/asset-not-predictive/index.js.map +1 -0
- package/lib/components/bundle-assets/bundle-assets.js +17 -25
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.module.css +13 -20
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +7 -5
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +1 -2
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.module.css +5 -0
- package/lib/components/bundle-packages/bundle-packages.js +14 -45
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib/components/delta/delta.module.css +2 -1
- package/lib/components/entry-info/entry-info.js +46 -0
- package/lib/components/entry-info/entry-info.js.map +1 -0
- package/lib/components/entry-info/entry-info.module.css +33 -0
- package/lib/components/{summary-item → entry-info}/index.js +1 -1
- package/lib/components/entry-info/index.js.map +1 -0
- package/lib/components/index.js +9 -5
- package/lib/components/index.js.map +1 -1
- package/lib/components/insight-icon/index.js +18 -0
- package/lib/components/insight-icon/index.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.js +25 -0
- package/lib/components/insight-icon/insight-icon.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.module.css +24 -0
- package/lib/components/insights/index.js +18 -0
- package/lib/components/insights/index.js.map +1 -0
- package/lib/components/insights/insights.js +25 -0
- package/lib/components/insights/insights.js.map +1 -0
- package/lib/components/insights/insights.module.css +14 -0
- package/lib/components/metric/index.js.map +1 -1
- package/lib/components/metric/metric.js +7 -64
- package/lib/components/metric/metric.js.map +1 -1
- package/lib/components/metric/metric.module.css +3 -3
- package/lib/components/metric-run-info/index.js +18 -0
- package/lib/components/metric-run-info/index.js.map +1 -0
- package/lib/components/metric-run-info/metric-run-info.js +64 -0
- package/lib/components/metric-run-info/metric-run-info.js.map +1 -0
- package/lib/components/metric-run-info/metric-run-info.module.css +18 -0
- package/lib/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/lib/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib/components/module-info/index.js.map +1 -1
- package/lib/components/module-info/module-info.js +46 -47
- package/lib/components/module-info/module-info.js.map +1 -1
- package/lib/components/module-info/module-info.module.css +4 -6
- package/lib/components/package-info/index.js +18 -0
- package/lib/components/package-info/index.js.map +1 -0
- package/lib/components/package-info/package-info.js +71 -0
- package/lib/components/package-info/package-info.js.map +1 -0
- package/lib/components/package-info/package-info.module.css +13 -0
- package/lib/components/run-info/index.js +18 -0
- package/lib/components/run-info/index.js.map +1 -0
- package/lib/components/run-info/run-info.js +70 -0
- package/lib/components/run-info/run-info.js.map +1 -0
- package/{src/components/summary-item/summary-item.module.css → lib/components/run-info/run-info.module.css} +14 -19
- package/lib/components/summary/index.js.map +1 -1
- package/lib/components/summary/summary.js +10 -30
- package/lib/components/summary/summary.js.map +1 -1
- package/lib/components/summary/summary.module.css +17 -6
- package/lib/constants.js +1 -23
- package/lib/constants.js.map +1 -1
- package/lib/css/variables.css +17 -13
- package/lib/layout/box/box.js +3 -23
- package/lib/layout/box/box.js.map +1 -1
- package/lib/layout/box/box.module.css +11 -0
- package/lib/layout/box/index.js +15 -3
- package/lib/layout/box/index.js.map +1 -1
- package/lib/layout/flex-stack/flex-stack.js +3 -19
- package/lib/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib/layout/flex-stack/index.js.map +1 -1
- package/lib/layout/stack/index.js.map +1 -1
- package/lib/layout/stack/stack.js +3 -16
- package/lib/layout/stack/stack.js.map +1 -1
- package/lib/tokens.js +38 -0
- package/lib/tokens.js.map +1 -0
- package/lib/ui/alert/alert.js +2 -12
- package/lib/ui/alert/alert.js.map +1 -1
- package/lib/ui/alert/index.js.map +1 -1
- package/lib/ui/container/container.js +1 -10
- package/lib/ui/container/container.js.map +1 -1
- package/lib/ui/container/index.js +15 -3
- package/lib/ui/container/index.js.map +1 -1
- package/lib/ui/dropdown/dropdown.module.css +1 -2
- package/lib/ui/file-name/file-name.js +1 -1
- package/lib/ui/file-name/file-name.js.map +1 -1
- package/lib/ui/filters/filters.module.css +1 -5
- package/lib/ui/hover-card/hover-card.js +1 -1
- package/lib/ui/icon/icon.js +3 -0
- package/lib/ui/icon/icon.js.map +1 -1
- package/lib/ui/index.js +1 -3
- package/lib/ui/index.js.map +1 -1
- package/lib/ui/input/input.module.css +3 -4
- package/lib/ui/table/index.js.map +1 -1
- package/lib/ui/table/table.js +3 -17
- package/lib/ui/table/table.js.map +1 -1
- package/lib/ui/tag/index.js.map +1 -1
- package/lib/ui/tag/tag.js +5 -29
- package/lib/ui/tag/tag.js.map +1 -1
- package/lib/ui/tag/tag.module.css +15 -1
- package/lib/ui/tooltip/index.js.map +1 -1
- package/lib/ui/tooltip/tooltip.js +3 -23
- package/lib/ui/tooltip/tooltip.js.map +1 -1
- package/lib/ui/tooltip/tooltip.module.css +4 -4
- package/lib-esm/app/app.js +27 -9
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/assets/icons.svg +14 -1
- package/lib-esm/assets/icons.svg.js +10 -0
- package/lib-esm/assets/icons.svg.js.map +1 -1
- package/lib-esm/components/asset-info/asset-info.js +22 -45
- package/lib-esm/components/asset-info/asset-info.js.map +1 -1
- package/lib-esm/components/asset-info/asset-info.module.css +18 -6
- package/lib-esm/components/asset-info/index.js.map +1 -1
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.js +21 -0
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.js.map +1 -0
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/lib-esm/components/asset-not-predictive/index.js +2 -0
- package/lib-esm/components/asset-not-predictive/index.js.map +1 -0
- package/lib-esm/components/bundle-assets/bundle-assets.js +17 -25
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +13 -20
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +6 -6
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +1 -2
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.module.css +5 -0
- package/lib-esm/components/bundle-packages/bundle-packages.js +15 -46
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib-esm/components/delta/delta.module.css +2 -1
- package/lib-esm/components/entry-info/entry-info.js +40 -0
- package/lib-esm/components/entry-info/entry-info.js.map +1 -0
- package/lib-esm/components/entry-info/entry-info.module.css +33 -0
- package/lib-esm/components/entry-info/index.js +2 -0
- package/lib-esm/components/entry-info/index.js.map +1 -0
- package/lib-esm/components/index.js +4 -2
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/insight-icon/index.js +2 -0
- package/lib-esm/components/insight-icon/index.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.js +18 -0
- package/lib-esm/components/insight-icon/insight-icon.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.module.css +24 -0
- package/lib-esm/components/insights/index.js +2 -0
- package/lib-esm/components/insights/index.js.map +1 -0
- package/lib-esm/components/insights/insights.js +18 -0
- package/lib-esm/components/insights/insights.js.map +1 -0
- package/lib-esm/components/insights/insights.module.css +14 -0
- package/lib-esm/components/metric/index.js.map +1 -1
- package/lib-esm/components/metric/metric.js +7 -41
- package/lib-esm/components/metric/metric.js.map +1 -1
- package/lib-esm/components/metric/metric.module.css +3 -3
- package/lib-esm/components/metric-run-info/index.js +2 -0
- package/lib-esm/components/metric-run-info/index.js.map +1 -0
- package/lib-esm/components/metric-run-info/metric-run-info.js +34 -0
- package/lib-esm/components/metric-run-info/metric-run-info.js.map +1 -0
- package/lib-esm/components/metric-run-info/metric-run-info.module.css +18 -0
- package/lib-esm/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/lib-esm/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib-esm/components/module-info/index.js.map +1 -1
- package/lib-esm/components/module-info/module-info.js +25 -48
- package/lib-esm/components/module-info/module-info.js.map +1 -1
- package/lib-esm/components/module-info/module-info.module.css +4 -6
- package/lib-esm/components/package-info/index.js +2 -0
- package/lib-esm/components/package-info/index.js.map +1 -0
- package/lib-esm/components/package-info/package-info.js +42 -0
- package/lib-esm/components/package-info/package-info.js.map +1 -0
- package/lib-esm/components/package-info/package-info.module.css +13 -0
- package/lib-esm/components/run-info/index.js +2 -0
- package/lib-esm/components/run-info/index.js.map +1 -0
- package/lib-esm/components/run-info/run-info.js +40 -0
- package/lib-esm/components/run-info/run-info.js.map +1 -0
- package/lib-esm/components/{summary-item/summary-item.module.css → run-info/run-info.module.css} +14 -19
- package/lib-esm/components/summary/index.js.map +1 -1
- package/lib-esm/components/summary/summary.js +9 -29
- package/lib-esm/components/summary/summary.js.map +1 -1
- package/lib-esm/components/summary/summary.module.css +17 -6
- package/lib-esm/constants.js +0 -22
- package/lib-esm/constants.js.map +1 -1
- package/lib-esm/css/variables.css +17 -13
- package/lib-esm/layout/box/box.js +3 -23
- package/lib-esm/layout/box/box.js.map +1 -1
- package/lib-esm/layout/box/box.module.css +11 -0
- package/lib-esm/layout/box/index.js +1 -1
- package/lib-esm/layout/box/index.js.map +1 -1
- package/lib-esm/layout/flex-stack/flex-stack.js +3 -19
- package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib-esm/layout/flex-stack/index.js.map +1 -1
- package/lib-esm/layout/stack/index.js.map +1 -1
- package/lib-esm/layout/stack/stack.js +3 -16
- package/lib-esm/layout/stack/stack.js.map +1 -1
- package/lib-esm/tokens.js +35 -0
- package/lib-esm/tokens.js.map +1 -0
- package/lib-esm/ui/alert/alert.js +2 -12
- package/lib-esm/ui/alert/alert.js.map +1 -1
- package/lib-esm/ui/alert/index.js.map +1 -1
- package/lib-esm/ui/container/container.js +1 -10
- package/lib-esm/ui/container/container.js.map +1 -1
- package/lib-esm/ui/container/index.js +1 -1
- package/lib-esm/ui/container/index.js.map +1 -1
- package/lib-esm/ui/dropdown/dropdown.module.css +1 -2
- package/lib-esm/ui/file-name/file-name.js +1 -1
- package/lib-esm/ui/file-name/file-name.js.map +1 -1
- package/lib-esm/ui/filters/filters.module.css +1 -5
- package/lib-esm/ui/hover-card/hover-card.js +1 -1
- package/lib-esm/ui/icon/icon.js +3 -0
- package/lib-esm/ui/icon/icon.js.map +1 -1
- package/lib-esm/ui/index.js +0 -1
- package/lib-esm/ui/index.js.map +1 -1
- package/lib-esm/ui/input/input.module.css +3 -4
- package/lib-esm/ui/table/index.js.map +1 -1
- package/lib-esm/ui/table/table.js +3 -17
- package/lib-esm/ui/table/table.js.map +1 -1
- package/lib-esm/ui/tag/index.js.map +1 -1
- package/lib-esm/ui/tag/tag.js +4 -28
- package/lib-esm/ui/tag/tag.js.map +1 -1
- package/lib-esm/ui/tag/tag.module.css +15 -1
- package/lib-esm/ui/tooltip/index.js.map +1 -1
- package/lib-esm/ui/tooltip/tooltip.js +3 -23
- package/lib-esm/ui/tooltip/tooltip.js.map +1 -1
- package/lib-esm/ui/tooltip/tooltip.module.css +4 -4
- package/package.json +19 -25
- package/src/app/app.jsx +34 -9
- package/src/assets/icons/error.svg +6 -0
- package/src/assets/icons/info.svg +6 -0
- package/src/assets/icons/more-vertical.svg +5 -0
- package/src/assets/icons.svg +14 -1
- package/src/assets/icons.svg.jsx +40 -0
- package/src/components/asset-info/asset-info.module.css +18 -6
- package/src/components/asset-info/asset-info.stories.tsx +64 -0
- package/src/components/asset-info/asset-info.tsx +133 -0
- package/src/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/src/components/asset-not-predictive/asset-not-predictive.stories.tsx +23 -0
- package/src/components/asset-not-predictive/asset-not-predictive.tsx +44 -0
- package/src/components/asset-not-predictive/index.ts +1 -0
- package/src/components/bundle-assets/bundle-assets.jsx +43 -53
- package/src/components/bundle-assets/bundle-assets.module.css +13 -20
- package/src/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.jsx +18 -15
- package/src/components/bundle-modules/bundle-modules.jsx +11 -9
- package/src/components/bundle-modules/bundle-modules.module.css +5 -0
- package/src/components/bundle-packages/bundle-packages.jsx +55 -118
- package/src/components/bundle-packages/bundle-packages.module.css +4 -0
- package/src/components/delta/delta.module.css +2 -1
- package/src/components/entry-info/entry-info.module.css +33 -0
- package/src/components/entry-info/entry-info.stories.tsx +67 -0
- package/src/components/entry-info/entry-info.tsx +107 -0
- package/src/components/entry-info/index.ts +1 -0
- package/src/components/index.js +4 -2
- package/src/components/insight-icon/index.ts +1 -0
- package/src/components/insight-icon/insight-icon.module.css +24 -0
- package/src/components/insight-icon/insight-icon.tsx +25 -0
- package/src/components/insights/index.ts +1 -0
- package/src/components/insights/insights.module.css +14 -0
- package/src/components/insights/insights.stories.tsx +54 -0
- package/src/components/insights/insights.tsx +44 -0
- package/src/components/metric/metric.module.css +3 -3
- package/src/components/metric/metric.stories.tsx +41 -0
- package/src/components/metric/metric.tsx +42 -0
- package/src/components/metric-run-info/index.ts +1 -0
- package/src/components/metric-run-info/metric-run-info.module.css +18 -0
- package/src/components/metric-run-info/metric-run-info.stories.tsx +34 -0
- package/src/components/metric-run-info/metric-run-info.tsx +85 -0
- package/src/components/metrics-table-options/metrics-table-options.jsx +1 -1
- package/src/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/src/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/src/components/module-info/module-info.module.css +4 -6
- package/src/components/module-info/module-info.stories.tsx +44 -0
- package/src/components/module-info/module-info.tsx +79 -0
- package/src/components/package-info/index.ts +1 -0
- package/src/components/package-info/package-info.module.css +13 -0
- package/src/components/package-info/package-info.stories.tsx +36 -0
- package/src/components/package-info/package-info.tsx +112 -0
- package/src/components/run-info/index.ts +1 -0
- package/{lib/components/summary-item/summary-item.module.css → src/components/run-info/run-info.module.css} +14 -19
- package/src/components/run-info/run-info.stories.tsx +49 -0
- package/src/components/run-info/run-info.tsx +108 -0
- package/src/components/summary/summary.module.css +17 -6
- package/src/components/summary/summary.stories.tsx +57 -0
- package/src/components/summary/summary.tsx +103 -0
- package/src/constants.js +0 -24
- package/src/css/variables.css +17 -13
- package/src/layout/box/box.module.css +11 -0
- package/src/layout/box/box.stories.tsx +49 -0
- package/src/layout/box/box.tsx +49 -0
- package/src/layout/box/index.ts +1 -0
- package/src/layout/flex-stack/flex-stack.stories.tsx +59 -0
- package/src/layout/flex-stack/flex-stack.tsx +43 -0
- package/src/layout/stack/stack.stories.tsx +53 -0
- package/src/layout/stack/stack.tsx +22 -0
- package/src/tokens.ts +37 -0
- package/src/ui/alert/alert.stories.tsx +39 -0
- package/src/ui/alert/alert.tsx +23 -0
- package/src/ui/container/container.stories.tsx +29 -0
- package/src/ui/container/container.tsx +18 -0
- package/src/ui/container/index.ts +1 -0
- package/src/ui/dropdown/dropdown.module.css +1 -2
- package/src/ui/file-name/file-name.jsx +1 -1
- package/src/ui/filters/filters.module.css +1 -5
- package/src/ui/hover-card/hover-card.jsx +1 -1
- package/src/ui/icon/icon.jsx +3 -0
- package/src/ui/index.js +0 -1
- package/src/ui/input/input.module.css +3 -4
- package/src/ui/table/table.stories.tsx +238 -0
- package/src/ui/table/table.tsx +38 -0
- package/src/ui/tag/tag.module.css +15 -1
- package/src/ui/tag/tag.stories.tsx +32 -0
- package/src/ui/tag/tag.tsx +28 -0
- package/src/ui/tooltip/tooltip.module.css +4 -4
- package/src/ui/tooltip/tooltip.stories.tsx +30 -0
- package/src/ui/tooltip/tooltip.tsx +56 -0
- package/types/app/header/header.d.ts +1 -1
- package/types/components/asset-info/asset-info.d.ts +18 -23
- package/types/components/asset-info/index.d.ts +1 -1
- package/types/components/asset-not-predictive/asset-not-predictive.d.ts +8 -0
- package/types/components/asset-not-predictive/index.d.ts +1 -0
- package/types/components/browsertime-table/browsertime-table.d.ts +1 -1
- package/types/components/bundle-assets/bundle-assets.d.ts +2 -2
- package/types/components/bundle-assets/index.d.ts +1 -1
- package/types/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.d.ts +2 -2
- package/types/components/bundle-assets-totals-table/bundle-assets-totals-table.d.ts +2 -2
- package/types/components/bundle-modules/bundle-modules.d.ts +2 -2
- package/types/components/bundle-modules/index.d.ts +1 -1
- package/types/components/bundle-packages/bundle-packages.d.ts +2 -2
- package/types/components/bundle-packages/index.d.ts +1 -1
- package/types/components/component-link.d.ts +1 -1
- package/types/components/delta/delta.d.ts +1 -1
- package/types/components/entry-info/entry-info.d.ts +18 -0
- package/types/components/entry-info/index.d.ts +1 -0
- package/types/components/index.d.ts +4 -2
- package/types/components/insight-icon/index.d.ts +1 -0
- package/types/components/insight-icon/insight-icon.d.ts +7 -0
- package/types/components/insights/index.d.ts +1 -0
- package/types/components/insights/insights.d.ts +8 -0
- package/types/components/job-header/job-header.d.ts +1 -1
- package/types/components/job-meta/job-meta.d.ts +1 -1
- package/types/components/job-name/job-name.d.ts +1 -1
- package/types/components/jobs-header/jobs-header.d.ts +1 -1
- package/types/components/lighthouse-table/lighthouse-table.d.ts +1 -1
- package/types/components/metric/index.d.ts +1 -1
- package/types/components/metric/metric.d.ts +6 -32
- package/types/components/metric-run-info/index.d.ts +1 -0
- package/types/components/metric-run-info/metric-run-info.d.ts +13 -0
- package/types/components/metrics-table/metrics-table.d.ts +1 -1
- package/types/components/metrics-table-options/metrics-table-options.d.ts +1 -1
- package/types/components/metrics-table-search/metrics-table-search.d.ts +1 -1
- package/types/components/metrics-table-title/metrics-table-title.d.ts +1 -1
- package/types/components/module-info/index.d.ts +1 -1
- package/types/components/module-info/module-info.d.ts +16 -34
- package/types/components/package-info/index.d.ts +1 -0
- package/types/components/package-info/package-info.d.ts +15 -0
- package/types/components/run-info/index.d.ts +1 -0
- package/types/components/run-info/run-info.d.ts +16 -0
- package/types/components/summary/index.d.ts +1 -1
- package/types/components/summary/summary.d.ts +25 -36
- package/types/components/total-size-type-title/total-size-type-title.d.ts +1 -1
- package/types/constants.d.ts +0 -11
- package/types/layout/box/box.d.ts +12 -25
- package/types/layout/box/index.d.ts +1 -1
- package/types/layout/flex-stack/flex-stack.d.ts +10 -33
- package/types/layout/flex-stack/index.d.ts +1 -1
- package/types/layout/footer/footer.d.ts +1 -1
- package/types/layout/separator.d.ts +2 -2
- package/types/layout/stack/index.d.ts +1 -1
- package/types/layout/stack/stack.d.ts +7 -20
- package/types/tokens.d.ts +23 -0
- package/types/ui/alert/alert.d.ts +7 -14
- package/types/ui/alert/index.d.ts +1 -1
- package/types/ui/container/container.d.ts +5 -17
- package/types/ui/container/index.d.ts +1 -1
- package/types/ui/dropdown/dropdown.d.ts +1 -1
- package/types/ui/empty-set/empty-set.d.ts +1 -1
- package/types/ui/file-name/file-name.d.ts +2 -2
- package/types/ui/filters/filters.d.ts +1 -1
- package/types/ui/filters/index.d.ts +1 -1
- package/types/ui/horizontal-bar-chart/horizontal-bar-chart.d.ts +1 -1
- package/types/ui/hover-card/hover-card.d.ts +1 -1
- package/types/ui/icon/icon.d.ts +4 -1
- package/types/ui/index.d.ts +0 -1
- package/types/ui/input/input.d.ts +1 -1
- package/types/ui/loader/loader.d.ts +1 -1
- package/types/ui/skeleton/skeleton.d.ts +1 -1
- package/types/ui/sort-dropdown/sort-dropdown.d.ts +1 -1
- package/types/ui/table/index.d.ts +1 -1
- package/types/ui/table/table.d.ts +14 -33
- package/types/ui/tabs/tabs.d.ts +1 -1
- package/types/ui/tag/index.d.ts +1 -1
- package/types/ui/tag/tag.d.ts +22 -33
- package/types/ui/toolbar/toolbar.d.ts +1 -1
- package/types/ui/tooltip/index.d.ts +1 -1
- package/types/ui/tooltip/tooltip.d.ts +10 -28
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.js +0 -31
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.js.map +0 -1
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/lib/components/duplicate-packages-insight/index.js.map +0 -1
- package/lib/components/summary-item/index.js.map +0 -1
- package/lib/components/summary-item/summary-item.js +0 -97
- package/lib/components/summary-item/summary-item.js.map +0 -1
- package/lib/ui/panels/index.js +0 -6
- package/lib/ui/panels/index.js.map +0 -1
- package/lib/ui/panels/panels.js +0 -28
- package/lib/ui/panels/panels.js.map +0 -1
- package/lib/ui/panels/panels.module.css +0 -23
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.js +0 -24
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.js.map +0 -1
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/lib-esm/components/duplicate-packages-insight/index.js +0 -2
- package/lib-esm/components/duplicate-packages-insight/index.js.map +0 -1
- package/lib-esm/components/summary-item/index.js +0 -2
- package/lib-esm/components/summary-item/index.js.map +0 -1
- package/lib-esm/components/summary-item/summary-item.js +0 -67
- package/lib-esm/components/summary-item/summary-item.js.map +0 -1
- package/lib-esm/ui/panels/index.js +0 -2
- package/lib-esm/ui/panels/index.js.map +0 -1
- package/lib-esm/ui/panels/panels.js +0 -21
- package/lib-esm/ui/panels/panels.js.map +0 -1
- package/lib-esm/ui/panels/panels.module.css +0 -23
- package/src/components/asset-info/asset-info.jsx +0 -96
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.stories.tsx +0 -66
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.tsx +0 -81
- package/src/components/duplicate-packages-insight/index.ts +0 -1
- package/src/components/metric/metric.jsx +0 -63
- package/src/components/module-info/module-info.jsx +0 -93
- package/src/components/summary/summary.jsx +0 -73
- package/src/components/summary-item/index.js +0 -1
- package/src/components/summary-item/summary-item.jsx +0 -142
- package/src/layout/box/box.jsx +0 -67
- package/src/layout/box/index.js +0 -1
- package/src/layout/flex-stack/flex-stack.jsx +0 -49
- package/src/layout/stack/stack.jsx +0 -32
- package/src/ui/alert/alert.jsx +0 -27
- package/src/ui/container/container.jsx +0 -24
- package/src/ui/container/index.js +0 -1
- package/src/ui/panels/index.js +0 -1
- package/src/ui/panels/panels.jsx +0 -39
- package/src/ui/panels/panels.module.css +0 -23
- package/src/ui/table/table.jsx +0 -37
- package/src/ui/tag/tag.jsx +0 -49
- package/src/ui/tooltip/tooltip.jsx +0 -67
- package/tsconfig.esm.json +0 -13
- package/tsconfig.json +0 -7
- package/tsconfig.lib.json +0 -9
- package/types/components/duplicate-packages-insight/duplicate-packages-insight.d.ts +0 -11
- package/types/components/duplicate-packages-insight/index.d.ts +0 -1
- package/types/components/summary-item/index.d.ts +0 -1
- package/types/components/summary-item/summary-item.d.ts +0 -40
- package/types/ui/panels/index.d.ts +0 -1
- package/types/ui/panels/panels.d.ts +0 -18
- /package/src/components/asset-info/{index.js → index.ts} +0 -0
- /package/src/components/metric/{index.js → index.ts} +0 -0
- /package/src/components/module-info/{index.js → index.ts} +0 -0
- /package/src/components/summary/{index.js → index.ts} +0 -0
- /package/src/layout/flex-stack/{index.js → index.ts} +0 -0
- /package/src/layout/stack/{index.js → index.ts} +0 -0
- /package/src/ui/alert/{index.js → index.ts} +0 -0
- /package/src/ui/table/{index.js → index.ts} +0 -0
- /package/src/ui/tag/{index.js → index.ts} +0 -0
- /package/src/ui/tooltip/{index.js → index.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summary-item.js","sourceRoot":"","sources":["../../../src/components/summary-item/summary-item.jsx"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/panels/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import css from './panels.module.css';
|
|
5
|
-
const cloneElement = (element) => {
|
|
6
|
-
const { className, ...restProps } = element.props;
|
|
7
|
-
return React.cloneElement(element, {
|
|
8
|
-
...restProps,
|
|
9
|
-
className: cx(css.panel, className),
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
export const Panels = ({ className, children, ...restProps }) => (React.createElement("div", { className: cx(css.root, className), ...restProps }, React.Children.map(children, cloneElement)));
|
|
13
|
-
Panels.defaultProps = {
|
|
14
|
-
className: '',
|
|
15
|
-
children: null,
|
|
16
|
-
};
|
|
17
|
-
Panels.propTypes = {
|
|
18
|
-
className: PropTypes.string,
|
|
19
|
-
children: PropTypes.node,
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=panels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"panels.js","sourceRoot":"","sources":["../../../src/ui/panels/panels.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,GAAG,MAAM,qBAAqB,CAAC;AAEtC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,EAAE;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC;IAElD,OAAO,KAAK,CAAC,YAAY,CACvB,OAAO,EACP;QACE,GAAG,SAAS;QACZ,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC;KACpC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,CAC/D,6BACE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,KAC9B,SAAS,IAEZ,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CACvC,CACP,CAAC;AAEF,MAAM,CAAC,YAAY,GAAG;IACpB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,SAAS,GAAG;IAEjB,SAAS,EAAE,SAAS,CAAC,MAAM;IAG3B,QAAQ,EAAE,SAAS,CAAC,IAAI;CACzB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.panel {
|
|
7
|
-
flex: 1 1 100%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.panel + .panel {
|
|
11
|
-
margin-top: var(--space-medium);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media (min-width: 768px) {
|
|
15
|
-
.root {
|
|
16
|
-
flex-wrap: nowrap;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.panel + .panel {
|
|
20
|
-
margin-top: 0;
|
|
21
|
-
margin-left: var(--space-medium);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import { getBundleModulesByChunk, getModuleFileType } from '@bundle-stats/utils';
|
|
5
|
-
|
|
6
|
-
import { Stack } from '../../layout/stack';
|
|
7
|
-
import { FileName } from '../../ui/file-name';
|
|
8
|
-
import { ComponentLink } from '../component-link';
|
|
9
|
-
import css from './asset-info.module.css';
|
|
10
|
-
|
|
11
|
-
const ChunkModulesLink = ({ as: Component, chunks, chunkId, name }) => {
|
|
12
|
-
const chunk = chunks?.find(({ id }) => id === chunkId );
|
|
13
|
-
|
|
14
|
-
if (!chunk) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const chunkIds = chunks?.map(({ id }) => id);
|
|
19
|
-
const fileType = getModuleFileType(name);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Component
|
|
23
|
-
className={css.viewModules}
|
|
24
|
-
{...getBundleModulesByChunk(chunkIds, chunkId, fileType)}
|
|
25
|
-
>
|
|
26
|
-
View chunk modules
|
|
27
|
-
</Component>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
ChunkModulesLink.propTypes = {
|
|
32
|
-
as: PropTypes.elementType.isRequired,
|
|
33
|
-
chunks: PropTypes.array, // eslint-disable-line react/forbid-prop-types
|
|
34
|
-
chunkId: PropTypes.string,
|
|
35
|
-
name: PropTypes.string,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
ChunkModulesLink.defaultProps = {
|
|
39
|
-
chunks: [],
|
|
40
|
-
chunkId: '',
|
|
41
|
-
name: '',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const AssetInfo = (props) => {
|
|
45
|
-
const { className, chunks, item, labels, CustomComponentLink } = props;
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Stack space="xsmall" className={cx(css.root, className)}>
|
|
49
|
-
{item.runs.map((run, index) => {
|
|
50
|
-
const Title = index !== 0 ? 'h4' : 'h3';
|
|
51
|
-
const key = `asset-info-${run?.name || index}-${index}`;
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Stack space="xxxsmall" key={key}>
|
|
55
|
-
<Title>{labels[index]}</Title>
|
|
56
|
-
<FileName
|
|
57
|
-
className={css.fileName}
|
|
58
|
-
as='code'
|
|
59
|
-
name={run?.name || '-'}
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
{index === 0 && (
|
|
63
|
-
<ChunkModulesLink
|
|
64
|
-
as={CustomComponentLink}
|
|
65
|
-
chunks={chunks}
|
|
66
|
-
chunkId={run?.chunkId}
|
|
67
|
-
name={run?.name}
|
|
68
|
-
/>
|
|
69
|
-
)}
|
|
70
|
-
</Stack>
|
|
71
|
-
);
|
|
72
|
-
})}
|
|
73
|
-
</Stack>
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
AssetInfo.propTypes = {
|
|
78
|
-
className: PropTypes.string,
|
|
79
|
-
item: PropTypes.shape({
|
|
80
|
-
runs: PropTypes.arrayOf(
|
|
81
|
-
PropTypes.shape({
|
|
82
|
-
name: PropTypes.string,
|
|
83
|
-
chunkId: PropTypes.string,
|
|
84
|
-
}),
|
|
85
|
-
),
|
|
86
|
-
}).isRequired,
|
|
87
|
-
labels: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
88
|
-
chunks: PropTypes.array, // eslint-disable-line react/forbid-prop-types
|
|
89
|
-
CustomComponentLink: PropTypes.elementType,
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
AssetInfo.defaultProps = {
|
|
93
|
-
className: '',
|
|
94
|
-
chunks: [],
|
|
95
|
-
CustomComponentLink: ComponentLink,
|
|
96
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.metric {
|
|
2
|
-
font-weight: bold;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.metric::before,
|
|
6
|
-
.link::before {
|
|
7
|
-
content: '\00A0\2014\00A0';
|
|
8
|
-
font-weight: normal;
|
|
9
|
-
color: var(--color-text-ultra-light);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.delta {
|
|
13
|
-
margin-left: var(--space-xxxsmall);
|
|
14
|
-
padding: 1px 2px;
|
|
15
|
-
vertical-align: super;
|
|
16
|
-
font-size: 9px;
|
|
17
|
-
line-height: 1;
|
|
18
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
3
|
-
import { DuplicatePackagesInsight } from '.';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/DuplicatePackagesInsight',
|
|
7
|
-
component: DuplicatePackagesInsight,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const Template = (props: any) => <MemoryRouter><DuplicatePackagesInsight {...props} /></MemoryRouter>;
|
|
11
|
-
|
|
12
|
-
export const Default = Template.bind({});
|
|
13
|
-
|
|
14
|
-
Default.args = {
|
|
15
|
-
type: 'INFO',
|
|
16
|
-
data: {
|
|
17
|
-
packages: {},
|
|
18
|
-
text: 'Bundle does not contain duplicate packages',
|
|
19
|
-
},
|
|
20
|
-
summary: {
|
|
21
|
-
current: 0,
|
|
22
|
-
baseline: 0,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const NewDuplicates = Template.bind({});
|
|
27
|
-
|
|
28
|
-
NewDuplicates.args = {
|
|
29
|
-
type: 'ERROR',
|
|
30
|
-
data: {
|
|
31
|
-
packages: {},
|
|
32
|
-
text: 'Bundle introduced 2 duplicate packages',
|
|
33
|
-
},
|
|
34
|
-
summary: {
|
|
35
|
-
current: 4,
|
|
36
|
-
baseline: 2,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const NewDuplicatesAndRemovals = Template.bind({});
|
|
41
|
-
|
|
42
|
-
NewDuplicatesAndRemovals.args = {
|
|
43
|
-
type: 'ERROR',
|
|
44
|
-
data: {
|
|
45
|
-
packages: {},
|
|
46
|
-
text: 'Bundle introduced 2 and removed 1 duplicate packages',
|
|
47
|
-
},
|
|
48
|
-
summary: {
|
|
49
|
-
current: 4,
|
|
50
|
-
baseline: 3,
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const NoChangeDuplicates = Template.bind({});
|
|
55
|
-
|
|
56
|
-
NoChangeDuplicates.args = {
|
|
57
|
-
type: 'WARNING',
|
|
58
|
-
data: {
|
|
59
|
-
packages: {},
|
|
60
|
-
text: 'Bundle contains 4 duplicate packages',
|
|
61
|
-
},
|
|
62
|
-
summary: {
|
|
63
|
-
current: 4,
|
|
64
|
-
baseline: 4,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
BUNDLE_PACKAGES_DUPLICATE,
|
|
4
|
-
BUNDLE_PACKAGES_COUNT,
|
|
5
|
-
InsightType,
|
|
6
|
-
JobSummaryItem,
|
|
7
|
-
getMetricRunInfo,
|
|
8
|
-
JobInsightDuplicatePackagesV3Data,
|
|
9
|
-
getGlobalMetricType,
|
|
10
|
-
} from '@bundle-stats/utils';
|
|
11
|
-
|
|
12
|
-
import { Alert } from '../../ui/alert';
|
|
13
|
-
import { ComponentLink } from '../component-link';
|
|
14
|
-
import { Delta } from '../delta';
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import css from './duplicate-packages-insight.module.css';
|
|
17
|
-
|
|
18
|
-
interface DuplicatePackagesInsightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
-
type: InsightType;
|
|
20
|
-
data: JobInsightDuplicatePackagesV3Data;
|
|
21
|
-
summary: JobSummaryItem;
|
|
22
|
-
showDelta?: boolean;
|
|
23
|
-
customComponentLink?: React.FunctionComponent<React.HTMLAttributes<HTMLLinkElement>>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const AlertKindMap = new Map([
|
|
27
|
-
[InsightType.INFO, 'info'],
|
|
28
|
-
[InsightType.ERROR, 'danger'],
|
|
29
|
-
[InsightType.WARNING, 'warning'],
|
|
30
|
-
]);
|
|
31
|
-
|
|
32
|
-
export const DuplicatePackagesInsight = (props: DuplicatePackagesInsightProps) => {
|
|
33
|
-
const {
|
|
34
|
-
type,
|
|
35
|
-
data,
|
|
36
|
-
summary,
|
|
37
|
-
showDelta = true,
|
|
38
|
-
customComponentLink: CustomComponentLink = ComponentLink,
|
|
39
|
-
...restProps
|
|
40
|
-
} = props;
|
|
41
|
-
|
|
42
|
-
const metric = getGlobalMetricType('webpack.duplicatePackageCount');
|
|
43
|
-
|
|
44
|
-
const metricRunInfo = getMetricRunInfo(
|
|
45
|
-
metric,
|
|
46
|
-
summary.current,
|
|
47
|
-
summary.baseline,
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
const hasDuplicatePackages = metricRunInfo.value > 0 || (metricRunInfo && (metricRunInfo.delta !== 0));
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<Alert kind={AlertKindMap.get(type)} {...restProps}>
|
|
54
|
-
<span className={css.message}>{data.text}</span>
|
|
55
|
-
{hasDuplicatePackages && (
|
|
56
|
-
<span className={css.metric}>
|
|
57
|
-
{metricRunInfo.value}
|
|
58
|
-
{showDelta && typeof metricRunInfo.delta !== 'undefined' && (
|
|
59
|
-
<Delta
|
|
60
|
-
className={css.delta}
|
|
61
|
-
inverted
|
|
62
|
-
displayValue={metricRunInfo.displayDelta as string}
|
|
63
|
-
deltaType={metricRunInfo.deltaType as string}
|
|
64
|
-
/>
|
|
65
|
-
)}
|
|
66
|
-
</span>
|
|
67
|
-
)}
|
|
68
|
-
<span className={css.link}>
|
|
69
|
-
{hasDuplicatePackages ? (
|
|
70
|
-
<CustomComponentLink {...BUNDLE_PACKAGES_DUPLICATE as any}>
|
|
71
|
-
View duplicate packages
|
|
72
|
-
</CustomComponentLink>
|
|
73
|
-
) : (
|
|
74
|
-
<CustomComponentLink {...BUNDLE_PACKAGES_COUNT as any}>
|
|
75
|
-
View packages
|
|
76
|
-
</CustomComponentLink>
|
|
77
|
-
)}
|
|
78
|
-
</span>
|
|
79
|
-
</Alert>
|
|
80
|
-
);
|
|
81
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './duplicate-packages-insight';
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
import css from './metric.module.css';
|
|
6
|
-
|
|
7
|
-
// Separate value and unit
|
|
8
|
-
const EXTRACT_VALUE_UNIT_PATTERN = /([\d|.|,| ]*)(\w*|%)$/;
|
|
9
|
-
|
|
10
|
-
export const Metric = ({ className, value, formatter, inline, children, enhanced }) => {
|
|
11
|
-
const { displayValue, displayUnit } = useMemo(() => {
|
|
12
|
-
const formattedValue = formatter?.(value);
|
|
13
|
-
|
|
14
|
-
if (!formattedValue) {
|
|
15
|
-
return { displayValue: value };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (!enhanced) {
|
|
19
|
-
return { displayValue: formattedValue };
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const matches = formattedValue.match(EXTRACT_VALUE_UNIT_PATTERN);
|
|
23
|
-
|
|
24
|
-
if (!matches) {
|
|
25
|
-
return { displayValue: value };
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
displayUnit: matches[2],
|
|
30
|
-
displayValue: matches[1],
|
|
31
|
-
};
|
|
32
|
-
}, [formatter, value]);
|
|
33
|
-
|
|
34
|
-
const rootClassName = cx(className, css.root, inline && css.inline);
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className={rootClassName}>
|
|
38
|
-
<div className={css.display}>
|
|
39
|
-
<span className={css.displayValue}>{displayValue}</span>
|
|
40
|
-
{displayUnit && <span className={css.displayUnit}>{displayUnit}</span>}
|
|
41
|
-
</div>
|
|
42
|
-
<div className={css.delta}>{children}</div>
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
Metric.defaultProps = {
|
|
48
|
-
className: '',
|
|
49
|
-
enhanced: false,
|
|
50
|
-
inline: false,
|
|
51
|
-
value: 0,
|
|
52
|
-
children: [],
|
|
53
|
-
formatter: (val) => val,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
Metric.propTypes = {
|
|
57
|
-
className: PropTypes.string,
|
|
58
|
-
enhanced: PropTypes.bool,
|
|
59
|
-
inline: PropTypes.bool,
|
|
60
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
61
|
-
formatter: PropTypes.func,
|
|
62
|
-
children: PropTypes.node,
|
|
63
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
import noop from 'lodash/noop';
|
|
5
|
-
import { getBundleModulesByChunk } from '@bundle-stats/utils';
|
|
6
|
-
|
|
7
|
-
import { Stack } from '../../layout/stack';
|
|
8
|
-
import { FileName } from '../../ui/file-name';
|
|
9
|
-
import { ComponentLink } from '../component-link';
|
|
10
|
-
import css from './module-info.module.css';
|
|
11
|
-
|
|
12
|
-
export const ModuleInfo = (props) => {
|
|
13
|
-
const {
|
|
14
|
-
className,
|
|
15
|
-
item,
|
|
16
|
-
labels,
|
|
17
|
-
chunks,
|
|
18
|
-
chunkIds,
|
|
19
|
-
customComponentLink: CustomComponentLink,
|
|
20
|
-
onClick,
|
|
21
|
-
} = props;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Stack space="xsmall" className={className}>
|
|
25
|
-
{item.runs.map((run, index) => {
|
|
26
|
-
const TitleComponent = index !== 0 ? 'h4' : 'h3';
|
|
27
|
-
const key = `module-info-${run?.name || index}-${index}`;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<Stack space="xxxsmall" key={key}>
|
|
31
|
-
<TitleComponent>{labels[index]}</TitleComponent>
|
|
32
|
-
{index === 0 && !isEmpty(run?.chunkIds) && (
|
|
33
|
-
<div className={css.chunks}>
|
|
34
|
-
<span className={css.chunksTitle}>Chunks:</span>
|
|
35
|
-
{run.chunkIds.map((chunkId) => {
|
|
36
|
-
const chunk = chunks?.find(({ id }) => id === chunkId);
|
|
37
|
-
|
|
38
|
-
if (!chunk) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<CustomComponentLink
|
|
44
|
-
{...getBundleModulesByChunk(chunkIds, chunkId)}
|
|
45
|
-
onClick={onClick}
|
|
46
|
-
className={css.chunksItem}
|
|
47
|
-
>
|
|
48
|
-
{chunk.name}
|
|
49
|
-
</CustomComponentLink>
|
|
50
|
-
);
|
|
51
|
-
})}
|
|
52
|
-
</div>
|
|
53
|
-
)}
|
|
54
|
-
|
|
55
|
-
<FileName className={css.fileName} as="code" name={run?.name || '-'} />
|
|
56
|
-
</Stack>
|
|
57
|
-
);
|
|
58
|
-
})}
|
|
59
|
-
</Stack>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
ModuleInfo.propTypes = {
|
|
64
|
-
className: PropTypes.string,
|
|
65
|
-
item: PropTypes.shape({
|
|
66
|
-
key: PropTypes.string,
|
|
67
|
-
runs: PropTypes.arrayOf(
|
|
68
|
-
PropTypes.shape({
|
|
69
|
-
key: PropTypes.string,
|
|
70
|
-
name: PropTypes.string,
|
|
71
|
-
chunkIds: PropTypes.arrayOf(PropTypes.string),
|
|
72
|
-
}),
|
|
73
|
-
),
|
|
74
|
-
}).isRequired,
|
|
75
|
-
labels: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
76
|
-
chunks: PropTypes.arrayOf(
|
|
77
|
-
PropTypes.shape({
|
|
78
|
-
id: PropTypes.string,
|
|
79
|
-
name: PropTypes.string,
|
|
80
|
-
}),
|
|
81
|
-
),
|
|
82
|
-
chunkIds: PropTypes.arrayOf(PropTypes.string),
|
|
83
|
-
customComponentLink: PropTypes.elementType,
|
|
84
|
-
onClick: PropTypes.func,
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
ModuleInfo.defaultProps = {
|
|
88
|
-
className: '',
|
|
89
|
-
chunks: [],
|
|
90
|
-
chunkIds: [],
|
|
91
|
-
customComponentLink: ComponentLink,
|
|
92
|
-
onClick: noop,
|
|
93
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import get from 'lodash/get';
|
|
5
|
-
import { METRIC_COMPONENT_LINKS } from '@bundle-stats/utils';
|
|
6
|
-
|
|
7
|
-
import { METRICS_WEBPACK_GENERAL } from '../../constants';
|
|
8
|
-
import { Box } from '../../layout/box';
|
|
9
|
-
import { FlexStack } from '../../layout/flex-stack';
|
|
10
|
-
import { ComponentLink } from '../component-link';
|
|
11
|
-
import { SummaryItem } from '../summary-item';
|
|
12
|
-
import css from './summary.module.css';
|
|
13
|
-
|
|
14
|
-
export const Summary = ({
|
|
15
|
-
className,
|
|
16
|
-
size,
|
|
17
|
-
keys,
|
|
18
|
-
data,
|
|
19
|
-
loading,
|
|
20
|
-
showSummaryItemDelta,
|
|
21
|
-
summaryItemLink: SummaryItemCustomLink,
|
|
22
|
-
}) => (
|
|
23
|
-
<Box className={cx(css.root, className)}>
|
|
24
|
-
<FlexStack space="small" className={css.items}>
|
|
25
|
-
{Array.from(METRIC_COMPONENT_LINKS)
|
|
26
|
-
.filter(([metricId]) => keys.includes(metricId))
|
|
27
|
-
.map(([metricId, metricOptions]) => (
|
|
28
|
-
<Box
|
|
29
|
-
key={metricId}
|
|
30
|
-
outline
|
|
31
|
-
padding="small"
|
|
32
|
-
as={SummaryItemCustomLink}
|
|
33
|
-
{...metricOptions.link}
|
|
34
|
-
className={css.item}
|
|
35
|
-
>
|
|
36
|
-
<SummaryItem
|
|
37
|
-
size={size}
|
|
38
|
-
id={metricId}
|
|
39
|
-
data={get(data, metricId)}
|
|
40
|
-
loading={loading}
|
|
41
|
-
showMetricDescription
|
|
42
|
-
showDelta={showSummaryItemDelta && metricOptions.showDelta !== false}
|
|
43
|
-
/>
|
|
44
|
-
</Box>
|
|
45
|
-
))}
|
|
46
|
-
</FlexStack>
|
|
47
|
-
</Box>
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
Summary.defaultProps = {
|
|
51
|
-
className: '',
|
|
52
|
-
data: null,
|
|
53
|
-
loading: false,
|
|
54
|
-
size: '',
|
|
55
|
-
keys: METRICS_WEBPACK_GENERAL,
|
|
56
|
-
showSummaryItemDelta: true,
|
|
57
|
-
summaryItemLink: ComponentLink,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
Summary.propTypes = {
|
|
61
|
-
className: PropTypes.string,
|
|
62
|
-
size: PropTypes.string,
|
|
63
|
-
keys: PropTypes.arrayOf(PropTypes.string),
|
|
64
|
-
data: PropTypes.shape({
|
|
65
|
-
[PropTypes.string]: PropTypes.shape({
|
|
66
|
-
baseline: PropTypes.number,
|
|
67
|
-
current: PropTypes.number,
|
|
68
|
-
}),
|
|
69
|
-
}),
|
|
70
|
-
loading: PropTypes.bool,
|
|
71
|
-
showSummaryItemDelta: PropTypes.bool,
|
|
72
|
-
summaryItemLink: PropTypes.elementType,
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './summary-item';
|