@bundle-stats/ui 4.13.0-beta.2 → 4.13.0-beta.20
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 +4 -8
- package/lib/app/app.js.map +1 -1
- package/lib/app/app.module.css +2 -2
- package/lib/assets/icons.svg +70 -67
- package/lib/assets/icons.svg.js +14 -12
- package/lib/assets/icons.svg.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.js +47 -8
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.module.css +0 -5
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js +25 -14
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.i18n.js +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +45 -14
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.module.css +0 -5
- package/lib/components/bundle-packages/bundle-packages.js +45 -6
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +0 -5
- package/lib/components/delta/delta.js +1 -1
- package/lib/components/delta/delta.js.map +1 -1
- package/lib/components/delta/delta.module.css +10 -1
- package/lib/components/index.js +1 -3
- package/lib/components/index.js.map +1 -1
- package/lib/components/jobs-header/jobs-header.module.css +0 -4
- package/lib/components/metrics-display-selector/metrics-display-selector.js +42 -5
- package/lib/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/lib/components/metrics-table/metrics-table.i18n.js +1 -6
- package/lib/components/metrics-table/metrics-table.i18n.js.map +1 -1
- package/lib/components/metrics-table/metrics-table.js +4 -37
- package/lib/components/metrics-table/metrics-table.js.map +1 -1
- package/lib/components/metrics-table/metrics-table.module.css +1 -44
- package/lib/components/{total-size-type-title → metrics-table-header}/index.js +1 -1
- package/lib/components/metrics-table-header/index.js.map +1 -0
- package/lib/components/metrics-table-header/metrics-table-header.i18n.js +9 -0
- package/lib/components/metrics-table-header/metrics-table-header.i18n.js.map +1 -0
- package/lib/components/metrics-table-header/metrics-table-header.js +79 -0
- package/lib/components/metrics-table-header/metrics-table-header.js.map +1 -0
- package/lib/components/metrics-table-header/metrics-table-header.module.css +51 -0
- package/lib/components/metrics-table-options/metrics-table-options.js +2 -2
- package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.module.css +4 -4
- package/lib/components/metrics-treemap/index.js +4 -0
- package/lib/components/metrics-treemap/index.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.constants.js +3 -0
- package/lib/components/metrics-treemap/metrics-treemap.constants.js.map +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.i18n.js +6 -0
- package/lib/components/metrics-treemap/metrics-treemap.i18n.js.map +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.js +96 -70
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +163 -51
- package/lib/components/metrics-treemap/metrics-treemap.utils.js +109 -0
- package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib/components/module-info/module-info.js +1 -2
- package/lib/components/module-info/module-info.js.map +1 -1
- package/lib/components/run-info/run-info.module.css +7 -7
- package/lib/components/sort-button/sort-button.module.css +1 -0
- package/lib/css/variables.css +14 -13
- package/lib/hooks/metrics-display-type.js +45 -24
- package/lib/hooks/metrics-display-type.js.map +1 -1
- package/lib/hooks/search-params.js +1 -0
- package/lib/hooks/search-params.js.map +1 -1
- package/lib/layout/box/box.module.css +4 -2
- package/lib/layout/flex-stack/flex-stack.js +3 -4
- package/lib/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib/layout/flex-stack/flex-stack.module.css +19 -23
- package/lib/ui/button/button.js +5 -4
- package/lib/ui/button/button.js.map +1 -1
- package/lib/ui/button/button.module.css +55 -53
- package/lib/ui/dropdown/dropdown.js +10 -40
- package/lib/ui/dropdown/dropdown.js.map +1 -1
- package/lib/ui/dropdown/index.js.map +1 -1
- package/lib/ui/filters/filters.js +33 -35
- package/lib/ui/filters/filters.js.map +1 -1
- package/lib/ui/filters/filters.module.css +55 -67
- package/lib/ui/hover-card/hover-card.js +1 -1
- package/lib/ui/hover-card/hover-card.js.map +1 -1
- package/lib/ui/icon/icon.js +2 -1
- package/lib/ui/icon/icon.js.map +1 -1
- package/lib/ui/input-search/input-search.js +1 -1
- package/lib/ui/input-search/input-search.js.map +1 -1
- package/lib/ui/loader/loader.js +1 -1
- package/lib/ui/loader/loader.js.map +1 -1
- package/lib/ui/table/table.module.css +30 -0
- package/lib/ui/tag/tag.module.css +3 -3
- package/lib/ui/toolbar/toolbar.module.css +1 -3
- package/lib-esm/app/app.js +4 -8
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/app/app.module.css +2 -2
- package/lib-esm/assets/icons.svg +70 -67
- package/lib-esm/assets/icons.svg.js +14 -12
- package/lib-esm/assets/icons.svg.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.js +48 -9
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +0 -5
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js +26 -15
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.i18n.js +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +46 -15
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.module.css +0 -5
- package/lib-esm/components/bundle-packages/bundle-packages.js +46 -7
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +0 -5
- package/lib-esm/components/delta/delta.js +1 -1
- package/lib-esm/components/delta/delta.js.map +1 -1
- package/lib-esm/components/delta/delta.module.css +10 -1
- package/lib-esm/components/index.js +0 -1
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +0 -4
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js +42 -5
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/lib-esm/components/metrics-table/metrics-table.i18n.js +0 -5
- package/lib-esm/components/metrics-table/metrics-table.i18n.js.map +1 -1
- package/lib-esm/components/metrics-table/metrics-table.js +4 -37
- package/lib-esm/components/metrics-table/metrics-table.js.map +1 -1
- package/lib-esm/components/metrics-table/metrics-table.module.css +1 -44
- package/lib-esm/components/metrics-table-header/index.js +2 -0
- package/lib-esm/components/metrics-table-header/index.js.map +1 -0
- package/lib-esm/components/metrics-table-header/metrics-table-header.i18n.js +6 -0
- package/lib-esm/components/metrics-table-header/metrics-table-header.i18n.js.map +1 -0
- package/lib-esm/components/metrics-table-header/metrics-table-header.js +49 -0
- package/lib-esm/components/metrics-table-header/metrics-table-header.js.map +1 -0
- package/lib-esm/components/metrics-table-header/metrics-table-header.module.css +51 -0
- package/lib-esm/components/metrics-table-options/metrics-table-options.js +3 -3
- package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.module.css +4 -4
- package/lib-esm/components/metrics-treemap/index.js +1 -0
- package/lib-esm/components/metrics-treemap/index.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js +2 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js.map +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.i18n.js +3 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.i18n.js.map +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +98 -71
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +163 -51
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +105 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib-esm/components/module-info/module-info.js +1 -2
- package/lib-esm/components/module-info/module-info.js.map +1 -1
- package/lib-esm/components/run-info/run-info.module.css +7 -7
- package/lib-esm/components/sort-button/sort-button.module.css +1 -0
- package/lib-esm/css/variables.css +14 -13
- package/lib-esm/hooks/metrics-display-type.js +46 -24
- package/lib-esm/hooks/metrics-display-type.js.map +1 -1
- package/lib-esm/hooks/search-params.js +1 -0
- package/lib-esm/hooks/search-params.js.map +1 -1
- package/lib-esm/layout/box/box.module.css +4 -2
- package/lib-esm/layout/flex-stack/flex-stack.js +3 -4
- package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib-esm/layout/flex-stack/flex-stack.module.css +19 -23
- package/lib-esm/ui/button/button.js +5 -4
- package/lib-esm/ui/button/button.js.map +1 -1
- package/lib-esm/ui/button/button.module.css +55 -53
- package/lib-esm/ui/dropdown/dropdown.js +8 -39
- package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
- package/lib-esm/ui/dropdown/index.js.map +1 -1
- package/lib-esm/ui/filters/filters.js +34 -36
- package/lib-esm/ui/filters/filters.js.map +1 -1
- package/lib-esm/ui/filters/filters.module.css +55 -67
- package/lib-esm/ui/hover-card/hover-card.js +1 -1
- package/lib-esm/ui/hover-card/hover-card.js.map +1 -1
- package/lib-esm/ui/icon/icon.js +2 -1
- package/lib-esm/ui/icon/icon.js.map +1 -1
- package/lib-esm/ui/input-search/input-search.js +1 -1
- package/lib-esm/ui/input-search/input-search.js.map +1 -1
- package/lib-esm/ui/loader/loader.js +1 -1
- package/lib-esm/ui/loader/loader.js.map +1 -1
- package/lib-esm/ui/table/table.module.css +30 -0
- package/lib-esm/ui/tag/tag.module.css +3 -3
- package/lib-esm/ui/toolbar/toolbar.module.css +1 -3
- package/package.json +10 -10
- package/src/app/app.jsx +4 -12
- package/src/app/app.module.css +2 -2
- package/src/assets/icons/check.svg +4 -0
- package/src/assets/icons.svg +70 -67
- package/src/assets/icons.svg.jsx +12 -12
- package/src/components/bundle-assets/bundle-assets.jsx +85 -12
- package/src/components/bundle-assets/bundle-assets.module.css +0 -5
- package/src/components/bundle-assets-totals/bundle-assets-totals.jsx +71 -35
- package/src/components/bundle-modules/bundle-modules.i18n.ts +1 -1
- package/src/components/bundle-modules/bundle-modules.module.css +0 -5
- package/src/components/bundle-modules/bundle-modules.tsx +123 -45
- package/src/components/bundle-packages/bundle-packages.jsx +79 -10
- package/src/components/bundle-packages/bundle-packages.module.css +0 -5
- package/src/components/delta/delta.jsx +1 -1
- package/src/components/delta/delta.module.css +10 -1
- package/src/components/index.js +0 -1
- package/src/components/jobs-header/jobs-header.module.css +0 -4
- package/src/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/src/components/metrics-display-selector/metrics-display-selector.stories.tsx +33 -0
- package/src/components/metrics-display-selector/metrics-display-selector.tsx +86 -28
- package/src/components/metrics-table/metrics-table.i18n.ts +0 -7
- package/src/components/metrics-table/metrics-table.module.css +1 -44
- package/src/components/metrics-table/metrics-table.tsx +17 -153
- package/src/components/metrics-table-header/index.ts +1 -0
- package/src/components/metrics-table-header/metrics-table-header.i18n.ts +6 -0
- package/src/components/metrics-table-header/metrics-table-header.module.css +51 -0
- package/src/components/metrics-table-header/metrics-table-header.tsx +172 -0
- package/src/components/metrics-table-options/metrics-table-options.jsx +4 -10
- package/src/components/metrics-table-title/metrics-table-title.jsx +1 -1
- package/src/components/metrics-table-title/metrics-table-title.module.css +4 -4
- package/src/components/metrics-treemap/__tests__/metrics-treemap.utils.ts +188 -0
- package/src/components/metrics-treemap/index.ts +1 -0
- package/src/components/metrics-treemap/metrics-treemap.constants.ts +52 -0
- package/src/components/metrics-treemap/metrics-treemap.i18n.ts +2 -0
- package/src/components/metrics-treemap/metrics-treemap.module.css +163 -51
- package/src/components/metrics-treemap/metrics-treemap.stories.tsx +44 -10
- package/src/components/metrics-treemap/metrics-treemap.tsx +340 -142
- package/src/components/metrics-treemap/metrics-treemap.utils.ts +162 -0
- package/src/components/module-info/module-info.tsx +1 -1
- package/src/components/run-info/run-info.module.css +7 -7
- package/src/components/sort-button/sort-button.module.css +1 -0
- package/src/css/variables.css +14 -13
- package/src/hooks/metrics-display-type.ts +79 -29
- package/src/hooks/search-params.js +1 -0
- package/src/layout/box/box.module.css +4 -2
- package/src/layout/flex-stack/flex-stack.module.css +19 -23
- package/src/layout/flex-stack/flex-stack.tsx +2 -8
- package/src/ui/button/button.module.css +55 -53
- package/src/ui/button/button.stories.tsx +16 -9
- package/src/ui/button/button.tsx +8 -7
- package/src/ui/dropdown/dropdown.stories.tsx +25 -0
- package/src/ui/dropdown/dropdown.tsx +66 -0
- package/src/ui/filters/filters.module.css +55 -67
- package/src/ui/filters/filters.stories.tsx +109 -0
- package/src/ui/filters/filters.tsx +128 -167
- package/src/ui/hover-card/hover-card.tsx +1 -1
- package/src/ui/icon/icon.tsx +2 -1
- package/src/ui/input-search/input-search.tsx +1 -0
- package/src/ui/loader/loader.jsx +1 -1
- package/src/ui/table/table.module.css +30 -0
- package/src/ui/tag/tag.module.css +3 -3
- package/src/ui/toolbar/toolbar.module.css +1 -3
- package/types/components/bundle-assets-totals/bundle-assets-totals.d.ts +5 -1
- package/types/components/bundle-modules/bundle-modules.i18n.d.ts +1 -1
- package/types/components/delta/delta.d.ts +2 -2
- package/types/components/index.d.ts +0 -1
- package/types/components/metrics-display-selector/metrics-display-selector.d.ts +5 -3
- package/types/components/metrics-table/metrics-table.d.ts +4 -10
- package/types/components/metrics-table/metrics-table.i18n.d.ts +0 -5
- package/types/components/metrics-table-header/index.d.ts +1 -0
- package/types/components/metrics-table-header/metrics-table-header.d.ts +15 -0
- package/types/components/metrics-table-header/metrics-table-header.i18n.d.ts +5 -0
- package/types/components/metrics-treemap/index.d.ts +1 -0
- package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +20 -0
- package/types/components/metrics-treemap/metrics-treemap.d.ts +7 -5
- package/types/components/metrics-treemap/metrics-treemap.i18n.d.ts +2 -0
- package/types/components/metrics-treemap/metrics-treemap.utils.d.ts +5 -0
- package/types/hooks/metrics-display-type.d.ts +8 -2
- package/types/ui/dropdown/dropdown.d.ts +12 -47
- package/types/ui/dropdown/index.d.ts +1 -1
- package/types/ui/filters/filters.d.ts +2 -7
- package/types/ui/icon/icon.d.ts +4 -2
- package/types/ui/loader/loader.d.ts +2 -2
- package/lib/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/lib/components/total-size-type-title/index.js.map +0 -1
- package/lib/components/total-size-type-title/total-size-type-title.js +0 -32
- package/lib/components/total-size-type-title/total-size-type-title.js.map +0 -1
- package/lib/components/total-size-type-title/total-size-type-title.module.css +0 -14
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/lib-esm/components/total-size-type-title/index.js +0 -2
- package/lib-esm/components/total-size-type-title/index.js.map +0 -1
- package/lib-esm/components/total-size-type-title/total-size-type-title.js +0 -25
- package/lib-esm/components/total-size-type-title/total-size-type-title.js.map +0 -1
- package/lib-esm/components/total-size-type-title/total-size-type-title.module.css +0 -14
- package/src/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/src/components/total-size-type-title/index.js +0 -1
- package/src/components/total-size-type-title/total-size-type-title.jsx +0 -41
- package/src/components/total-size-type-title/total-size-type-title.module.css +0 -14
- package/src/ui/dropdown/dropdown.jsx +0 -88
- package/types/components/total-size-type-title/index.d.ts +0 -1
- package/types/components/total-size-type-title/total-size-type-title.d.ts +0 -14
- /package/src/ui/dropdown/{index.js → index.ts} +0 -0
|
@@ -89,6 +89,36 @@
|
|
|
89
89
|
border-width: 1px;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
/** cascade border radius */
|
|
93
|
+
.root thead,
|
|
94
|
+
.root thead tr:first-child {
|
|
95
|
+
border-top-left-radius: inherit;
|
|
96
|
+
border-top-right-radius: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.root thead tr:first-child th:first-child {
|
|
100
|
+
border-top-left-radius: inherit;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.root thead tr:first-child th:last-child {
|
|
104
|
+
border-top-right-radius: inherit;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.root tbody:last-child,
|
|
108
|
+
.root tbody:last-child tr:last-child {
|
|
109
|
+
border-bottom-left-radius: inherit;
|
|
110
|
+
border-bottom-right-radius: inherit;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.root tbody:last-child tr:last-child th:first-child,
|
|
114
|
+
.root tbody:last-child tr:last-child td:first-child {
|
|
115
|
+
border-bottom-left-radius: inherit;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.root tbody:last-child tr:last-child td:last-child {
|
|
119
|
+
border-bottom-right-radius: inherit;
|
|
120
|
+
}
|
|
121
|
+
|
|
92
122
|
/* compact variation */
|
|
93
123
|
.compact td,
|
|
94
124
|
.compact th {
|
|
@@ -42,7 +42,7 @@ a.root:active {
|
|
|
42
42
|
/** Size variation */
|
|
43
43
|
/** default: medium */
|
|
44
44
|
.root {
|
|
45
|
-
border-radius: var(--radius-
|
|
45
|
+
border-radius: var(--radius-small);
|
|
46
46
|
padding: calc(var(--space-xxxsmall) / 2) var(--space-xxxsmall);
|
|
47
47
|
min-width: var(--space-small);
|
|
48
48
|
height: var(--space-small);
|
|
@@ -51,7 +51,7 @@ a.root:active {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.small {
|
|
54
|
-
border-radius: var(--radius-
|
|
54
|
+
border-radius: var(--radius-xsmall);
|
|
55
55
|
padding: calc(var(--space-xxxsmall) / 2);
|
|
56
56
|
height: var(--space-xsmall);
|
|
57
57
|
min-width: var(--space-xsmall);
|
|
@@ -60,7 +60,7 @@ a.root:active {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.large {
|
|
63
|
-
border-radius: var(--radius-
|
|
63
|
+
border-radius: var(--radius-medium);
|
|
64
64
|
padding: var(--space-xxxsmall) var(--space-xxsmall);
|
|
65
65
|
min-width: var(--space-medium);
|
|
66
66
|
height: var(--space-medium);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "4.13.0-beta.
|
|
3
|
+
"version": "4.13.0-beta.20",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@babel/preset-env": "7.24.
|
|
40
|
-
"@babel/preset-react": "7.
|
|
41
|
-
"@babel/preset-typescript": "7.
|
|
39
|
+
"@babel/preset-env": "7.24.5",
|
|
40
|
+
"@babel/preset-react": "7.24.1",
|
|
41
|
+
"@babel/preset-typescript": "7.24.1",
|
|
42
42
|
"@storybook/addon-essentials": "7.6.17",
|
|
43
43
|
"@storybook/react": "7.6.17",
|
|
44
44
|
"@storybook/react-webpack5": "7.6.17",
|
|
45
45
|
"@types/d3": "7.4.3",
|
|
46
|
-
"@types/react": "18.
|
|
46
|
+
"@types/react": "18.3.1",
|
|
47
47
|
"@types/react-router-dom": "5.3.3",
|
|
48
48
|
"babel-plugin-require-context-hook": "1.0.0",
|
|
49
49
|
"classnames": "2.5.1",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"hex-rgb": "5.0.0",
|
|
53
53
|
"identity-obj-proxy": "3.0.0",
|
|
54
54
|
"jest": "29.7.0",
|
|
55
|
-
"jest-date-mock": "1.0.
|
|
55
|
+
"jest-date-mock": "1.0.10",
|
|
56
56
|
"jest-environment-jsdom": "29.7.0",
|
|
57
57
|
"lodash": "4.17.21",
|
|
58
58
|
"prop-types": "15.8.1",
|
|
59
|
-
"react": "18.
|
|
60
|
-
"react-dom": "18.
|
|
59
|
+
"react": "18.3.1",
|
|
60
|
+
"react-dom": "18.3.1",
|
|
61
61
|
"react-router-dom": "5.3.4",
|
|
62
62
|
"rimraf": "5.0.5",
|
|
63
63
|
"storybook": "7.6.17",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"react-router-dom": "^5.0.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@bundle-stats/utils": "
|
|
76
|
+
"@bundle-stats/utils": "4.13.0-beta.20",
|
|
77
77
|
"ariakit": "2.0.0-next.44",
|
|
78
78
|
"d3": "^7.8.5",
|
|
79
79
|
"modern-css-reset": "1.4.0",
|
|
80
80
|
"react-use": "^17.5.0",
|
|
81
81
|
"use-query-params": "2.2.1"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e1b9e8d14614a451ddcc2be9203100b25d4b1137"
|
|
84
84
|
}
|
package/src/app/app.jsx
CHANGED
|
@@ -97,9 +97,7 @@ const OverviewContent = () => {
|
|
|
97
97
|
</Container>
|
|
98
98
|
)}
|
|
99
99
|
<Container>
|
|
100
|
-
<
|
|
101
|
-
<BundleAssetsTotals jobs={jobs} />
|
|
102
|
-
</Box>
|
|
100
|
+
<BundleAssetsTotals jobs={jobs} />
|
|
103
101
|
</Container>
|
|
104
102
|
</Stack>
|
|
105
103
|
);
|
|
@@ -111,9 +109,7 @@ const AssetsContent = () => {
|
|
|
111
109
|
|
|
112
110
|
return (
|
|
113
111
|
<Container>
|
|
114
|
-
<
|
|
115
|
-
<BundleAssets jobs={jobs} setState={bundleStatsSetState} {...bundleStatsState} />
|
|
116
|
-
</Box>
|
|
112
|
+
<BundleAssets jobs={jobs} setState={bundleStatsSetState} {...bundleStatsState} />
|
|
117
113
|
</Container>
|
|
118
114
|
);
|
|
119
115
|
};
|
|
@@ -126,9 +122,7 @@ const ModulesContent = () => {
|
|
|
126
122
|
|
|
127
123
|
return (
|
|
128
124
|
<Container>
|
|
129
|
-
<
|
|
130
|
-
<BundleModules jobs={jobs} setState={bundleModulesSetState} {...bundleModulesState} />
|
|
131
|
-
</Box>
|
|
125
|
+
<BundleModules jobs={jobs} setState={bundleModulesSetState} {...bundleModulesState} />
|
|
132
126
|
</Container>
|
|
133
127
|
);
|
|
134
128
|
};
|
|
@@ -141,9 +135,7 @@ const PackagesContent = () => {
|
|
|
141
135
|
|
|
142
136
|
return (
|
|
143
137
|
<Container>
|
|
144
|
-
<
|
|
145
|
-
<BundlePackages jobs={jobs} {...bundlePackagesState} setState={bundlePackagesSetState} />
|
|
146
|
-
</Box>
|
|
138
|
+
<BundlePackages jobs={jobs} {...bundlePackagesState} setState={bundlePackagesSetState} />
|
|
147
139
|
</Container>
|
|
148
140
|
);
|
|
149
141
|
};
|
package/src/app/app.module.css
CHANGED
package/src/assets/icons.svg
CHANGED
|
@@ -1,69 +1,72 @@
|
|
|
1
1
|
<svg width="0" height="0" style="position:absolute">
|
|
2
|
-
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
3
|
-
<path d="M12 5v14M19 12l-7 7-7-7"/>
|
|
4
|
-
</symbol>
|
|
5
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
6
|
-
<circle cx="12" cy="12" r="10"/>
|
|
7
|
-
<path d="m12 16 4-4-4-4M8 12h8"/>
|
|
8
|
-
</symbol>
|
|
9
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
10
|
-
<path d="
|
|
11
|
-
</symbol>
|
|
12
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
13
|
-
<path d="
|
|
14
|
-
</symbol>
|
|
15
|
-
<symbol
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
<path d="
|
|
33
|
-
</symbol>
|
|
34
|
-
<symbol
|
|
35
|
-
<path d="
|
|
36
|
-
</symbol>
|
|
37
|
-
<symbol viewBox="0 0
|
|
38
|
-
<path
|
|
39
|
-
</symbol>
|
|
40
|
-
<symbol viewBox="0 0
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
<path d="
|
|
50
|
-
</symbol>
|
|
51
|
-
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
<path d="
|
|
62
|
-
</symbol>
|
|
63
|
-
<symbol fill="none" stroke="currentColor" stroke-
|
|
64
|
-
<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9
|
|
65
|
-
</symbol>
|
|
66
|
-
<symbol
|
|
67
|
-
<path d="
|
|
68
|
-
</symbol>
|
|
2
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="arrow" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M12 5v14M19 12l-7 7-7-7"/>
|
|
4
|
+
</symbol>
|
|
5
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="arrow-right-circle" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<circle cx="12" cy="12" r="10"/>
|
|
7
|
+
<path d="m12 16 4-4-4-4M8 12h8"/>
|
|
8
|
+
</symbol>
|
|
9
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="check" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<path d="M20 6 9 17l-5-5"/>
|
|
11
|
+
</symbol>
|
|
12
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="chevron-down" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<path d="m6 9 6 6 6-6"/>
|
|
14
|
+
</symbol>
|
|
15
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="chevron-up" xmlns="http://www.w3.org/2000/svg">
|
|
16
|
+
<path d="m18 15-6-6-6 6"/>
|
|
17
|
+
</symbol>
|
|
18
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="clock" xmlns="http://www.w3.org/2000/svg">
|
|
19
|
+
<circle cx="12" cy="12" r="10"/>
|
|
20
|
+
<path d="M12 6v6l4 2"/>
|
|
21
|
+
</symbol>
|
|
22
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="close" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<circle cx="12" cy="12" r="10"/>
|
|
24
|
+
<path d="m15 9-6 6M9 9l6 6"/>
|
|
25
|
+
</symbol>
|
|
26
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="commit" xmlns="http://www.w3.org/2000/svg">
|
|
27
|
+
<circle cx="12" cy="12" r="4"/>
|
|
28
|
+
<path d="M1.05 12H7M17.01 12h5.95"/>
|
|
29
|
+
</symbol>
|
|
30
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="error" xmlns="http://www.w3.org/2000/svg">
|
|
31
|
+
<circle cx="12" cy="12" r="10"/>
|
|
32
|
+
<path d="M12 8v4M12 16h.01"/>
|
|
33
|
+
</symbol>
|
|
34
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="external-link" xmlns="http://www.w3.org/2000/svg">
|
|
35
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3"/>
|
|
36
|
+
</symbol>
|
|
37
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="filter" xmlns="http://www.w3.org/2000/svg">
|
|
38
|
+
<path d="M12 20V10M18 20V4M6 20v-4"/>
|
|
39
|
+
</symbol>
|
|
40
|
+
<symbol viewBox="0 0 98 96" id="github" xmlns="http://www.w3.org/2000/svg">
|
|
41
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="currentColor"/>
|
|
42
|
+
</symbol>
|
|
43
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="help" xmlns="http://www.w3.org/2000/svg">
|
|
44
|
+
<circle cx="12" cy="12" r="10"/>
|
|
45
|
+
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"/>
|
|
46
|
+
</symbol>
|
|
47
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="info" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
+
<circle cx="12" cy="12" r="10"/>
|
|
49
|
+
<path d="M12 16v-4M12 8h.01"/>
|
|
50
|
+
</symbol>
|
|
51
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="menu" xmlns="http://www.w3.org/2000/svg">
|
|
52
|
+
<path d="M3 12h18M3 6h18M3 18h18"/>
|
|
53
|
+
</symbol>
|
|
54
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="more-vertical" xmlns="http://www.w3.org/2000/svg">
|
|
55
|
+
<circle cx="12" cy="12" r="1"/>
|
|
56
|
+
<circle cx="12" cy="5" r="1"/>
|
|
57
|
+
<circle cx="12" cy="19" r="1"/>
|
|
58
|
+
</symbol>
|
|
59
|
+
<symbol viewBox="0 0 24 24" fill="currentColor" id="sort" xmlns="http://www.w3.org/2000/svg">
|
|
60
|
+
<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>
|
|
61
|
+
<path d="M0 0h24v24H0z" fill="none"/>
|
|
62
|
+
</symbol>
|
|
63
|
+
<symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="table" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
+
<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>
|
|
65
|
+
</symbol>
|
|
66
|
+
<symbol fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" id="treemap" xmlns="http://www.w3.org/2000/svg">
|
|
67
|
+
<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 21h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9M12.025 3.422 12 20.652ZM12.85 9l7.347.025zm-.153 6 7.576.025zm4.334.764L17 20.326Z"/>
|
|
68
|
+
</symbol>
|
|
69
|
+
<symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="warning" xmlns="http://www.w3.org/2000/svg">
|
|
70
|
+
<path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01"/>
|
|
71
|
+
</symbol>
|
|
69
72
|
</svg>
|
package/src/assets/icons.svg.jsx
CHANGED
|
@@ -9,7 +9,6 @@ export const SvgIcons = (props) => (
|
|
|
9
9
|
strokeWidth="2"
|
|
10
10
|
strokeLinecap="round"
|
|
11
11
|
strokeLinejoin="round"
|
|
12
|
-
className="feather feather-arrow-down"
|
|
13
12
|
id="arrow"
|
|
14
13
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
14
|
>
|
|
@@ -21,7 +20,6 @@ export const SvgIcons = (props) => (
|
|
|
21
20
|
strokeWidth="2"
|
|
22
21
|
strokeLinecap="round"
|
|
23
22
|
strokeLinejoin="round"
|
|
24
|
-
className="feather feather-arrow-right-circle"
|
|
25
23
|
viewBox="0 0 24 24"
|
|
26
24
|
id="arrow-right-circle"
|
|
27
25
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -29,13 +27,24 @@ export const SvgIcons = (props) => (
|
|
|
29
27
|
<circle cx="12" cy="12" r="10" />
|
|
30
28
|
<path d="m12 16 4-4-4-4M8 12h8" />
|
|
31
29
|
</symbol>
|
|
30
|
+
<symbol
|
|
31
|
+
viewBox="0 0 24 24"
|
|
32
|
+
fill="none"
|
|
33
|
+
stroke="currentColor"
|
|
34
|
+
strokeWidth="2"
|
|
35
|
+
strokeLinecap="round"
|
|
36
|
+
strokeLinejoin="round"
|
|
37
|
+
id="check"
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
>
|
|
40
|
+
<path d="M20 6 9 17l-5-5" />
|
|
41
|
+
</symbol>
|
|
32
42
|
<symbol
|
|
33
43
|
fill="none"
|
|
34
44
|
stroke="currentColor"
|
|
35
45
|
strokeWidth="2"
|
|
36
46
|
strokeLinecap="round"
|
|
37
47
|
strokeLinejoin="round"
|
|
38
|
-
className="lucide lucide-chevron-down"
|
|
39
48
|
viewBox="0 0 24 24"
|
|
40
49
|
id="chevron-down"
|
|
41
50
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -48,7 +57,6 @@ export const SvgIcons = (props) => (
|
|
|
48
57
|
strokeWidth="2"
|
|
49
58
|
strokeLinecap="round"
|
|
50
59
|
strokeLinejoin="round"
|
|
51
|
-
className="lucide lucide-chevron-up"
|
|
52
60
|
viewBox="0 0 24 24"
|
|
53
61
|
id="chevron-up"
|
|
54
62
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -62,7 +70,6 @@ export const SvgIcons = (props) => (
|
|
|
62
70
|
strokeWidth="2"
|
|
63
71
|
strokeLinecap="round"
|
|
64
72
|
strokeLinejoin="round"
|
|
65
|
-
className="feather feather-clock"
|
|
66
73
|
id="clock"
|
|
67
74
|
xmlns="http://www.w3.org/2000/svg"
|
|
68
75
|
>
|
|
@@ -75,7 +82,6 @@ export const SvgIcons = (props) => (
|
|
|
75
82
|
strokeWidth="2"
|
|
76
83
|
strokeLinecap="round"
|
|
77
84
|
strokeLinejoin="round"
|
|
78
|
-
className="feather feather-x-circle"
|
|
79
85
|
viewBox="0 0 24 24"
|
|
80
86
|
id="close"
|
|
81
87
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -90,7 +96,6 @@ export const SvgIcons = (props) => (
|
|
|
90
96
|
strokeWidth="2"
|
|
91
97
|
strokeLinecap="round"
|
|
92
98
|
strokeLinejoin="round"
|
|
93
|
-
className="feather feather-git-commit"
|
|
94
99
|
id="commit"
|
|
95
100
|
xmlns="http://www.w3.org/2000/svg"
|
|
96
101
|
>
|
|
@@ -116,7 +121,6 @@ export const SvgIcons = (props) => (
|
|
|
116
121
|
strokeWidth="2"
|
|
117
122
|
strokeLinecap="round"
|
|
118
123
|
strokeLinejoin="round"
|
|
119
|
-
className="feather feather-external-link"
|
|
120
124
|
viewBox="0 0 24 24"
|
|
121
125
|
id="external-link"
|
|
122
126
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -130,7 +134,6 @@ export const SvgIcons = (props) => (
|
|
|
130
134
|
strokeWidth="2"
|
|
131
135
|
strokeLinecap="round"
|
|
132
136
|
strokeLinejoin="round"
|
|
133
|
-
className="feather feather-bar-chart"
|
|
134
137
|
id="filter"
|
|
135
138
|
xmlns="http://www.w3.org/2000/svg"
|
|
136
139
|
>
|
|
@@ -151,7 +154,6 @@ export const SvgIcons = (props) => (
|
|
|
151
154
|
strokeWidth="2"
|
|
152
155
|
strokeLinecap="round"
|
|
153
156
|
strokeLinejoin="round"
|
|
154
|
-
className="feather feather-help-circle"
|
|
155
157
|
id="help"
|
|
156
158
|
xmlns="http://www.w3.org/2000/svg"
|
|
157
159
|
>
|
|
@@ -178,7 +180,6 @@ export const SvgIcons = (props) => (
|
|
|
178
180
|
strokeWidth="2"
|
|
179
181
|
strokeLinecap="round"
|
|
180
182
|
strokeLinejoin="round"
|
|
181
|
-
className="feather feather-menu"
|
|
182
183
|
id="menu"
|
|
183
184
|
xmlns="http://www.w3.org/2000/svg"
|
|
184
185
|
>
|
|
@@ -233,7 +234,6 @@ export const SvgIcons = (props) => (
|
|
|
233
234
|
strokeWidth="2"
|
|
234
235
|
strokeLinecap="round"
|
|
235
236
|
strokeLinejoin="round"
|
|
236
|
-
className="feather feather-alert-triangle"
|
|
237
237
|
id="warning"
|
|
238
238
|
xmlns="http://www.w3.org/2000/svg"
|
|
239
239
|
>
|
|
@@ -15,12 +15,15 @@ import config from '../../config.json';
|
|
|
15
15
|
import I18N from '../../i18n';
|
|
16
16
|
import { MetricsDisplayType } from '../../constants';
|
|
17
17
|
import { useMetricsDisplayType } from '../../hooks/metrics-display-type';
|
|
18
|
+
import { Box } from '../../layout/box';
|
|
18
19
|
import { FlexStack } from '../../layout/flex-stack';
|
|
20
|
+
import { Stack } from '../../layout/stack';
|
|
19
21
|
import { Icon } from '../../ui/icon';
|
|
20
22
|
import { InputSearch } from '../../ui/input-search';
|
|
21
23
|
import { FileName } from '../../ui/file-name';
|
|
22
24
|
import { HoverCard } from '../../ui/hover-card';
|
|
23
25
|
import { Tag } from '../../ui/tag';
|
|
26
|
+
import { Table } from '../../ui/table';
|
|
24
27
|
import { Filters } from '../../ui/filters';
|
|
25
28
|
import { EmptySet } from '../../ui/empty-set';
|
|
26
29
|
import { Toolbar } from '../../ui/toolbar';
|
|
@@ -30,15 +33,20 @@ import { ComponentLink } from '../component-link';
|
|
|
30
33
|
import { MetricsTable } from '../metrics-table';
|
|
31
34
|
import { MetricsTableOptions } from '../metrics-table-options';
|
|
32
35
|
import { MetricsTableTitle } from '../metrics-table-title';
|
|
33
|
-
import { SEARCH_PLACEHOLDER } from './bundle-assets.i18n';
|
|
34
36
|
import { MetricsDisplaySelector } from '../metrics-display-selector';
|
|
35
|
-
import {
|
|
37
|
+
import { MetricsTableHeader } from '../metrics-table-header';
|
|
38
|
+
import { MetricsTreemap, getTreemapNodes, getTreemapNodesGroupedByPath } from '../metrics-treemap';
|
|
39
|
+
import { SEARCH_PLACEHOLDER } from './bundle-assets.i18n';
|
|
36
40
|
import css from './bundle-assets.module.css';
|
|
37
41
|
|
|
38
42
|
const RUN_TITLE_CURRENT = 'Current';
|
|
39
43
|
const RUN_TITLE_BASELINE = 'Baseline';
|
|
40
44
|
const RUNS_LABELS = [RUN_TITLE_CURRENT, RUN_TITLE_BASELINE];
|
|
41
45
|
|
|
46
|
+
const DISPLAY_TYPE_GROUPS = {
|
|
47
|
+
[MetricsDisplayType.TREEMAP]: ['folder'],
|
|
48
|
+
};
|
|
49
|
+
|
|
42
50
|
const getFileTypeFilters = (filters) =>
|
|
43
51
|
Object.entries(FILE_TYPE_LABELS)
|
|
44
52
|
.map(([key, label]) => ({
|
|
@@ -159,6 +167,60 @@ RowHeader.defaultProps = {
|
|
|
159
167
|
chunks: [],
|
|
160
168
|
};
|
|
161
169
|
|
|
170
|
+
const ViewMetricsTreemap = (props) => {
|
|
171
|
+
const { metricsTableTitle, jobs, items, displayType, emptyMessage, showEntryInfo, updateSearch } = props;
|
|
172
|
+
|
|
173
|
+
const treeNodes = useMemo(() => {
|
|
174
|
+
if (displayType.groupBy === 'folder') {
|
|
175
|
+
return getTreemapNodesGroupedByPath(items);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return getTreemapNodes(items);
|
|
179
|
+
}, [items, displayType.groupBy]);
|
|
180
|
+
|
|
181
|
+
const onGroupClick = useCallback(
|
|
182
|
+
(groupPath) => {
|
|
183
|
+
// Search by group path
|
|
184
|
+
// 1. use `^` to match only the string beggining
|
|
185
|
+
// 2. add `/` suffix to match only exact directories
|
|
186
|
+
// 3. if the group path is empty(root), clear search
|
|
187
|
+
if (groupPath) {
|
|
188
|
+
updateSearch(`^${groupPath}/`);
|
|
189
|
+
} else {
|
|
190
|
+
updateSearch('');
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
[updateSearch],
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<>
|
|
198
|
+
<Table compact>
|
|
199
|
+
<MetricsTableHeader metricTitle={metricsTableTitle} showSum jobs={jobs} rows={items} />
|
|
200
|
+
</Table>
|
|
201
|
+
<MetricsTreemap
|
|
202
|
+
treeNodes={treeNodes}
|
|
203
|
+
nested={Boolean(displayType.groupBy)}
|
|
204
|
+
emptyMessage={emptyMessage}
|
|
205
|
+
onItemClick={showEntryInfo}
|
|
206
|
+
onGroupClick={onGroupClick}
|
|
207
|
+
/>
|
|
208
|
+
</>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
ViewMetricsTreemap.propTypes = {
|
|
213
|
+
jobs: PropTypes.arrayOf(PropTypes.object).isRequired, // eslint-disable-line react/forbid-prop-types
|
|
214
|
+
items: PropTypes.arrayOf(PropTypes.object).isRequired, // eslint-disable-line react/forbid-prop-types
|
|
215
|
+
metricsTableTitle: PropTypes.node.isRequired,
|
|
216
|
+
displayType: PropTypes.shape({
|
|
217
|
+
groupBy: PropTypes.string,
|
|
218
|
+
}).isRequired,
|
|
219
|
+
emptyMessage: PropTypes.node.isRequired,
|
|
220
|
+
showEntryInfo: PropTypes.func.isRequired,
|
|
221
|
+
updateSearch: PropTypes.func.isRequired,
|
|
222
|
+
};
|
|
223
|
+
|
|
162
224
|
export const BundleAssets = (props) => {
|
|
163
225
|
const {
|
|
164
226
|
className,
|
|
@@ -183,7 +245,7 @@ export const BundleAssets = (props) => {
|
|
|
183
245
|
|
|
184
246
|
const jobLabels = jobs?.map((job) => job?.label);
|
|
185
247
|
|
|
186
|
-
const [displayType, setDisplayType] = useMetricsDisplayType();
|
|
248
|
+
const [displayType, setDisplayType] = useMetricsDisplayType(DISPLAY_TYPE_GROUPS);
|
|
187
249
|
|
|
188
250
|
const dropdownFilters = useMemo(
|
|
189
251
|
() => getFilters({ compareMode: jobs?.length > 1, filters }),
|
|
@@ -230,12 +292,16 @@ export const BundleAssets = (props) => {
|
|
|
230
292
|
|
|
231
293
|
return (
|
|
232
294
|
<>
|
|
233
|
-
<section className={cx(css.root, className)}>
|
|
295
|
+
<Stack space="xsmall" as="section" className={cx(css.root, className)}>
|
|
234
296
|
<Toolbar
|
|
235
|
-
className={css.toolbar}
|
|
236
297
|
renderActions={({ actionClassName }) => (
|
|
237
298
|
<FlexStack space="xxsmall" className={cx(css.dropdown, actionClassName)}>
|
|
238
|
-
<MetricsDisplaySelector
|
|
299
|
+
<MetricsDisplaySelector
|
|
300
|
+
value={displayType.value}
|
|
301
|
+
groupBy={displayType.groupBy}
|
|
302
|
+
groups={DISPLAY_TYPE_GROUPS}
|
|
303
|
+
onSelect={setDisplayType}
|
|
304
|
+
/>
|
|
239
305
|
<MetricsTableOptions
|
|
240
306
|
handleViewAll={resetAllFilters}
|
|
241
307
|
handleResetFilters={resetFilters}
|
|
@@ -258,8 +324,8 @@ export const BundleAssets = (props) => {
|
|
|
258
324
|
/>
|
|
259
325
|
</FlexStack>
|
|
260
326
|
</Toolbar>
|
|
261
|
-
<main>
|
|
262
|
-
{displayType === MetricsDisplayType.TABLE && (
|
|
327
|
+
<Box outline as="main">
|
|
328
|
+
{displayType.value === MetricsDisplayType.TABLE && (
|
|
263
329
|
<MetricsTable
|
|
264
330
|
runs={jobs}
|
|
265
331
|
items={items}
|
|
@@ -271,11 +337,18 @@ export const BundleAssets = (props) => {
|
|
|
271
337
|
updateSort={updateSort}
|
|
272
338
|
/>
|
|
273
339
|
)}
|
|
274
|
-
{displayType === MetricsDisplayType.TREEMAP && (
|
|
275
|
-
<
|
|
340
|
+
{displayType.value === MetricsDisplayType.TREEMAP && (
|
|
341
|
+
<ViewMetricsTreemap
|
|
342
|
+
jobs={jobs}
|
|
343
|
+
items={items}
|
|
344
|
+
displayType={displayType}
|
|
345
|
+
emptyMessage={emptyMessage}
|
|
346
|
+
showEntryInfo={showEntryInfo}
|
|
347
|
+
updateSearch={updateSearch}
|
|
348
|
+
/>
|
|
276
349
|
)}
|
|
277
|
-
</
|
|
278
|
-
</
|
|
350
|
+
</Box>
|
|
351
|
+
</Stack>
|
|
279
352
|
|
|
280
353
|
{entryItem && (
|
|
281
354
|
<AssetInfo
|