@bundle-stats/ui 4.13.0-beta.16 → 4.13.0-beta.17
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/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 +39 -7
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js +4 -4
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +28 -7
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.js +39 -7
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.js +41 -4
- 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-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.js +57 -38
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +55 -25
- package/lib/components/metrics-treemap/metrics-treemap.utils.js +70 -0
- package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib/hooks/metrics-display-type.js +56 -24
- package/lib/hooks/metrics-display-type.js.map +1 -1
- package/lib/ui/icon/icon.js +1 -0
- package/lib/ui/icon/icon.js.map +1 -1
- 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 +40 -8
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js +5 -5
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +29 -8
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js +40 -8
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js +41 -4
- 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-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.js +58 -39
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +55 -25
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +65 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib-esm/hooks/metrics-display-type.js +57 -24
- package/lib-esm/hooks/metrics-display-type.js.map +1 -1
- package/lib-esm/ui/icon/icon.js +1 -0
- package/lib-esm/ui/icon/icon.js.map +1 -1
- package/package.json +7 -7
- 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 +76 -20
- package/src/components/bundle-assets-totals/bundle-assets-totals.jsx +5 -4
- package/src/components/bundle-modules/bundle-modules.tsx +76 -16
- package/src/components/bundle-packages/bundle-packages.jsx +71 -16
- 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 +83 -25
- package/src/components/metrics-treemap/__tests__/metrics-treemap.utils.ts +143 -0
- package/src/components/metrics-treemap/index.ts +1 -0
- package/src/components/metrics-treemap/metrics-treemap.constants.ts +43 -0
- package/src/components/metrics-treemap/metrics-treemap.module.css +55 -25
- package/src/components/metrics-treemap/metrics-treemap.stories.tsx +44 -10
- package/src/components/metrics-treemap/metrics-treemap.tsx +247 -84
- package/src/components/metrics-treemap/metrics-treemap.utils.ts +107 -0
- package/src/hooks/metrics-display-type.ts +87 -29
- package/src/ui/icon/icon.tsx +1 -0
- package/types/components/metrics-display-selector/metrics-display-selector.d.ts +3 -1
- package/types/components/metrics-treemap/index.d.ts +1 -0
- package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +15 -0
- package/types/components/metrics-treemap/metrics-treemap.d.ts +7 -5
- package/types/components/metrics-treemap/metrics-treemap.utils.d.ts +4 -0
- package/types/hooks/metrics-display-type.d.ts +8 -2
- package/types/ui/icon/icon.d.ts +2 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTreemapNodesGroupedByPath = exports.getTreemapNodes = void 0;
|
|
4
|
+
const ROOT_LABEL = '(root)';
|
|
5
|
+
function getReportMetricRowMaxValue(item) {
|
|
6
|
+
const values = item.runs.map((run) => run?.value || 0);
|
|
7
|
+
return Math.max(...values);
|
|
8
|
+
}
|
|
9
|
+
function getTreemapNodes(items) {
|
|
10
|
+
const rootChildren = items.map((item) => ({
|
|
11
|
+
id: item.key,
|
|
12
|
+
label: item.key,
|
|
13
|
+
value: getReportMetricRowMaxValue(item),
|
|
14
|
+
item,
|
|
15
|
+
}));
|
|
16
|
+
return {
|
|
17
|
+
id: '',
|
|
18
|
+
label: ROOT_LABEL,
|
|
19
|
+
value: 0,
|
|
20
|
+
children: rootChildren,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.getTreemapNodes = getTreemapNodes;
|
|
24
|
+
function setTreeNode(nodes, slugs, currentSlugId, newNode) {
|
|
25
|
+
const baseSlugs = slugs.slice(0, currentSlugId);
|
|
26
|
+
const [currentSlug, ...restSlug] = slugs.slice(currentSlugId);
|
|
27
|
+
if (!currentSlug) {
|
|
28
|
+
nodes.push(newNode);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const currentNodePath = [...baseSlugs, currentSlug].join('/');
|
|
32
|
+
let parentNode = nodes.find((treeNode) => treeNode.id === currentNodePath);
|
|
33
|
+
if (!parentNode) {
|
|
34
|
+
parentNode = {
|
|
35
|
+
id: currentNodePath,
|
|
36
|
+
label: currentSlug,
|
|
37
|
+
value: 0,
|
|
38
|
+
children: [],
|
|
39
|
+
};
|
|
40
|
+
nodes.push(parentNode);
|
|
41
|
+
}
|
|
42
|
+
if (restSlug.length === 0) {
|
|
43
|
+
parentNode.children.push(newNode);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setTreeNode(parentNode.children, slugs, currentSlugId + 1, newNode);
|
|
47
|
+
}
|
|
48
|
+
function getTreemapNodesGroupedByPath(items) {
|
|
49
|
+
const treeNodes = [];
|
|
50
|
+
items.forEach((item) => {
|
|
51
|
+
const slugs = item.key.split('/');
|
|
52
|
+
const baseSlugs = slugs.slice(0, -1);
|
|
53
|
+
const baseName = slugs.slice(-1)[0];
|
|
54
|
+
const treeNode = {
|
|
55
|
+
id: item.key,
|
|
56
|
+
label: baseName,
|
|
57
|
+
value: getReportMetricRowMaxValue(item),
|
|
58
|
+
item,
|
|
59
|
+
};
|
|
60
|
+
setTreeNode(treeNodes, baseSlugs, 0, treeNode);
|
|
61
|
+
});
|
|
62
|
+
return {
|
|
63
|
+
id: '',
|
|
64
|
+
label: ROOT_LABEL,
|
|
65
|
+
value: 0,
|
|
66
|
+
children: treeNodes,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
exports.getTreemapNodesGroupedByPath = getTreemapNodesGroupedByPath;
|
|
70
|
+
//# sourceMappingURL=metrics-treemap.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics-treemap.utils.js","sourceRoot":"","sources":["../../../src/components/metrics-treemap/metrics-treemap.utils.ts"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAG,QAAQ,CAAC;AAM5B,SAAS,0BAA0B,CAAC,IAAqB;IACvD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;AAC7B,CAAC;AAKD,SAAgB,eAAe,CAAC,KAA6B;IAC3D,MAAM,YAAY,GAAoB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzD,EAAE,EAAE,IAAI,CAAC,GAAG;QACZ,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,KAAK,EAAE,0BAA0B,CAAC,IAAI,CAAC;QACvC,IAAI;KACL,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,YAAY;KACvB,CAAC;AACJ,CAAC;AAdD,0CAcC;AAKD,SAAS,WAAW,CAClB,KAAuB,EACvB,KAAoB,EACpB,aAAqB,EACrB,OAAiB;IAEjB,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAChD,MAAM,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAG9D,IAAI,CAAC,WAAW,EAAE;QAChB,KAAK,CAAC,IAAI,CAAC,OAAO,CAA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W,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,SAAS;KACpB,CAAC;AACJ,CAAC;AAzBD,oEAyBC"}
|
|
@@ -5,36 +5,68 @@ const react_1 = require("react");
|
|
|
5
5
|
const react_use_1 = require("react-use");
|
|
6
6
|
const use_query_params_1 = require("use-query-params");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const DEFAULT_VALUE = constants_1.MetricsDisplayType.TABLE;
|
|
9
|
+
const DEFAULT_GROUP_BY = '';
|
|
10
|
+
const QUERY_PARAM_VALUE = 'dt';
|
|
11
|
+
const QUERY_PARAM_GROUP_BY = 'dtg';
|
|
12
|
+
const useMetricsDisplayType = (groups) => {
|
|
13
|
+
const [queryParams, setQueryParams] = (0, use_query_params_1.useQueryParams)({
|
|
14
|
+
[QUERY_PARAM_VALUE]: use_query_params_1.StringParam,
|
|
15
|
+
[QUERY_PARAM_GROUP_BY]: use_query_params_1.StringParam,
|
|
13
16
|
});
|
|
14
|
-
const [
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const { [QUERY_PARAM_VALUE]: queryParamValue, [QUERY_PARAM_GROUP_BY]: queryParamGroupBy } = queryParams;
|
|
18
|
+
const [storageValue, setStorageValue] = (0, react_use_1.useLocalStorage)(QUERY_PARAM_VALUE, DEFAULT_VALUE);
|
|
19
|
+
const [storageGroupBy, setStorageGroupBy] = (0, react_use_1.useLocalStorage)(QUERY_PARAM_GROUP_BY, DEFAULT_GROUP_BY);
|
|
20
|
+
const value = (0, react_1.useMemo)(() => {
|
|
21
|
+
const resolvedValue = queryParamValue || storageValue;
|
|
22
|
+
if (!resolvedValue) {
|
|
23
|
+
return DEFAULT_VALUE;
|
|
19
24
|
}
|
|
20
|
-
if (!Object.values(constants_1.MetricsDisplayType).includes(
|
|
21
|
-
return
|
|
25
|
+
if (!Object.values(constants_1.MetricsDisplayType).includes(resolvedValue)) {
|
|
26
|
+
return DEFAULT_VALUE;
|
|
22
27
|
}
|
|
23
|
-
return
|
|
24
|
-
}, [
|
|
28
|
+
return resolvedValue;
|
|
29
|
+
}, [queryParamValue, storageValue]);
|
|
30
|
+
const groupBy = (0, react_1.useMemo)(() => {
|
|
31
|
+
const resolvedValue = queryParamGroupBy || storageGroupBy;
|
|
32
|
+
if (!resolvedValue) {
|
|
33
|
+
return DEFAULT_GROUP_BY;
|
|
34
|
+
}
|
|
35
|
+
if (!groups?.[value]?.includes(resolvedValue)) {
|
|
36
|
+
return DEFAULT_GROUP_BY;
|
|
37
|
+
}
|
|
38
|
+
return resolvedValue;
|
|
39
|
+
}, [queryParamGroupBy, storageGroupBy]);
|
|
40
|
+
(0, react_1.useEffect)(() => {
|
|
41
|
+
if (value !== queryParamValue || groupBy !== queryParamGroupBy) {
|
|
42
|
+
setQueryParams({ [QUERY_PARAM_VALUE]: value, [QUERY_PARAM_GROUP_BY]: groupBy });
|
|
43
|
+
}
|
|
44
|
+
}, [value, queryParamValue, groupBy, queryParamGroupBy, setQueryParams]);
|
|
25
45
|
(0, react_1.useEffect)(() => {
|
|
26
|
-
if (
|
|
27
|
-
|
|
46
|
+
if (value !== storageValue) {
|
|
47
|
+
setStorageValue(value);
|
|
28
48
|
}
|
|
29
|
-
if (
|
|
30
|
-
|
|
49
|
+
if (groupBy !== storageValue) {
|
|
50
|
+
setStorageGroupBy(groupBy);
|
|
31
51
|
}
|
|
32
|
-
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
}, [
|
|
53
|
+
value,
|
|
54
|
+
storageValue,
|
|
55
|
+
groupBy,
|
|
56
|
+
storageGroupBy,
|
|
57
|
+
setQueryParams,
|
|
58
|
+
setStorageValue,
|
|
59
|
+
setStorageGroupBy,
|
|
60
|
+
]);
|
|
61
|
+
const setDisplayType = (0, react_1.useCallback)((newValue, newGroupBy = DEFAULT_GROUP_BY) => {
|
|
62
|
+
setStorageValue(newValue);
|
|
63
|
+
setStorageGroupBy(newGroupBy);
|
|
64
|
+
setQueryParams({
|
|
65
|
+
[QUERY_PARAM_VALUE]: newValue,
|
|
66
|
+
[QUERY_PARAM_GROUP_BY]: newGroupBy,
|
|
67
|
+
});
|
|
68
|
+
}, [setStorageValue, setQueryParams]);
|
|
69
|
+
return [{ value, groupBy }, setDisplayType];
|
|
38
70
|
};
|
|
39
71
|
exports.useMetricsDisplayType = useMetricsDisplayType;
|
|
40
72
|
//# sourceMappingURL=metrics-display-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics-display-type.js","sourceRoot":"","sources":["../../src/hooks/metrics-display-type.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,yCAA4C;AAC5C,uDAA+D;AAE/D,4CAAkD;AAElD,MAAM,
|
|
1
|
+
{"version":3,"file":"metrics-display-type.js","sourceRoot":"","sources":["../../src/hooks/metrics-display-type.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,yCAA4C;AAC5C,uDAA+D;AAE/D,4CAAkD;AAElD,MAAM,aAAa,GAAG,8BAAkB,CAAC,KAAK,CAAC;AAC/C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAG5B,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAO5B,MAAM,qBAAqB,GAAG,CACnC,MAA2D,EACpC,EAAE;IACzB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,iCAAc,EAAC;QACnD,CAAC,iBAAiB,CAAC,EAAE,8BAAW;QAChC,CAAC,oBAAoB,CAAC,EAAE,8BAAW;KACpC,CAA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K,EAAE,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;SACjF;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC;IAKzE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,KAAK,YAAY,EAAE;YAC1B,eAAe,CAAC,KAAK,CAAC,CAAC;SACxB;QACD,IAAI,OAAO,KAAK,YAAY,EAAE;YAC5B,iBAAiB,CAAC,OAAO,CAAC,CAAC;SAC5B;IACH,CAAC,EAAE;QACD,KAAK;QACL,YAAY;QACZ,OAAO;QACP,cAAc;QACd,cAAc;QACd,eAAe;QACf,iBAAiB;KAClB,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,QAA4B,EAAE,aAAqB,gBAAgB,EAAE,EAAE;QACtE,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC1B,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAE9B,cAAc,CAAC;YACb,CAAC,iBAAiB,CAAC,EAAE,QAAQ;YAC7B,CAAC,oBAAoB,CAAC,EAAE,UAAU;SACnC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,eAAe,EAAE,cAAc,CAAC,CAClC,CAAC;IAEF,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;AAC9C,CAAC,CAAC;AA9FW,QAAA,qBAAqB,yBA8FhC"}
|
package/lib/ui/icon/icon.js
CHANGED
package/lib/ui/icon/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/ui/icon/icon.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAA4B;AAE5B,wEAAoC;AAEpC,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,oBAAoB;IACx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C,IAAI,CAAC,CAAC,KAAM,SAAS;QACrE,uCAAK,SAAS,EAAE,yBAAG,CAAC,IAAI;YACtB,uCAAK,SAAS,EAAE,IAAI,KAAK,EAAE,GAAI,CAC3B,CACI,CACb,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,IAAI,QAUf;AAEF,YAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AAEnB,YAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;AAC7B,YAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC;AAC/B,YAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;AAC7B,YAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC"}
|
package/lib-esm/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>
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const SvgIcons = (props) => (React.createElement("svg", { width: "0", height: "0", style: { position: 'absolute' }, ...props },
|
|
3
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
3
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "arrow", xmlns: "http://www.w3.org/2000/svg" },
|
|
4
4
|
React.createElement("path", { d: "M12 5v14M19 12l-7 7-7-7" })),
|
|
5
|
-
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
5
|
+
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "arrow-right-circle", xmlns: "http://www.w3.org/2000/svg" },
|
|
6
6
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
7
7
|
React.createElement("path", { d: "m12 16 4-4-4-4M8 12h8" })),
|
|
8
|
-
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
8
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "check", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
+
React.createElement("path", { d: "M20 6 9 17l-5-5" })),
|
|
10
|
+
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "chevron-down", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
11
|
React.createElement("path", { d: "m6 9 6 6 6-6" })),
|
|
10
|
-
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
12
|
+
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "chevron-up", xmlns: "http://www.w3.org/2000/svg" },
|
|
11
13
|
React.createElement("path", { d: "m18 15-6-6-6 6" })),
|
|
12
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
14
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "clock", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
15
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
14
16
|
React.createElement("path", { d: "M12 6v6l4 2" })),
|
|
15
|
-
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
17
|
+
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "close", xmlns: "http://www.w3.org/2000/svg" },
|
|
16
18
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
17
19
|
React.createElement("path", { d: "m15 9-6 6M9 9l6 6" })),
|
|
18
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
20
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "commit", xmlns: "http://www.w3.org/2000/svg" },
|
|
19
21
|
React.createElement("circle", { cx: "12", cy: "12", r: "4" }),
|
|
20
22
|
React.createElement("path", { d: "M1.05 12H7M17.01 12h5.95" })),
|
|
21
23
|
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "error", xmlns: "http://www.w3.org/2000/svg" },
|
|
22
24
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
23
25
|
React.createElement("path", { d: "M12 8v4M12 16h.01" })),
|
|
24
|
-
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
26
|
+
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "external-link", xmlns: "http://www.w3.org/2000/svg" },
|
|
25
27
|
React.createElement("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" })),
|
|
26
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
28
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "filter", xmlns: "http://www.w3.org/2000/svg" },
|
|
27
29
|
React.createElement("path", { d: "M12 20V10M18 20V4M6 20v-4" })),
|
|
28
30
|
React.createElement("symbol", { viewBox: "0 0 98 96", id: "github", xmlns: "http://www.w3.org/2000/svg" },
|
|
29
31
|
React.createElement("path", { fillRule: "evenodd", clipRule: "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" })),
|
|
30
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
32
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "help", xmlns: "http://www.w3.org/2000/svg" },
|
|
31
33
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
32
34
|
React.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01" })),
|
|
33
35
|
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "info", xmlns: "http://www.w3.org/2000/svg" },
|
|
34
36
|
React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
35
37
|
React.createElement("path", { d: "M12 16v-4M12 8h.01" })),
|
|
36
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
38
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "menu", xmlns: "http://www.w3.org/2000/svg" },
|
|
37
39
|
React.createElement("path", { d: "M3 12h18M3 6h18M3 18h18" })),
|
|
38
40
|
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", viewBox: "0 0 24 24", id: "more-vertical", xmlns: "http://www.w3.org/2000/svg" },
|
|
39
41
|
React.createElement("circle", { cx: "12", cy: "12", r: "1" }),
|
|
@@ -46,6 +48,6 @@ export const SvgIcons = (props) => (React.createElement("svg", { width: "0", hei
|
|
|
46
48
|
React.createElement("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" })),
|
|
47
49
|
React.createElement("symbol", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", id: "treemap", xmlns: "http://www.w3.org/2000/svg" },
|
|
48
50
|
React.createElement("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" })),
|
|
49
|
-
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
51
|
+
React.createElement("symbol", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", id: "warning", xmlns: "http://www.w3.org/2000/svg" },
|
|
50
52
|
React.createElement("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" }))));
|
|
51
53
|
//# sourceMappingURL=icons.svg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.svg.js","sourceRoot":"","sources":["../../src/assets/icons.svg.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CACjC,6BAAK,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAM,KAAK;IAClE,gCACE,OAAO,EAAC,WAAW,EACnB,I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gCAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG;QAC/B,gCAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,GAAG,CACzB;IACT,gCAAQ,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,EAAC,EAAE,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;QAC1F,8BAAM,CAAC,EAAC,8CAA8C,GAAG;QACzD,8BAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,CAC/B;IACT,gCACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,OAAO,EAAC,WAAW,EACnB,EAAE,EAAC,OAAO,EACV,KAAK,EAAC,4BAA4B;QAElC,8BAAM,CAAC,EAAC,2GAA2G,GAAG,CAC/G;IACT,gCACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,GAAG,EACf,OAAO,EAAC,WAAW,EACnB,EAAE,EAAC,SAAS,EACZ,KAAK,EAAC,4BAA4B;QAElC,8BAAM,CAAC,EAAC,iLAAiL,GAAG,CACrL;IACT,gCACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,EAAE,EAAC,SAAS,EACZ,KAAK,EAAC,4BAA4B;QAElC,8BAAM,CAAC,EAAC,2GAA2G,GAAG,CAC/G,CACL,CACP,CAAC"}
|
|
@@ -27,12 +27,15 @@ import { MetricsTableOptions } from '../metrics-table-options';
|
|
|
27
27
|
import { MetricsTableTitle } from '../metrics-table-title';
|
|
28
28
|
import { MetricsDisplaySelector } from '../metrics-display-selector';
|
|
29
29
|
import { MetricsTableHeader } from '../metrics-table-header';
|
|
30
|
-
import { MetricsTreemap } from '../metrics-treemap';
|
|
30
|
+
import { MetricsTreemap, getTreemapNodes, getTreemapNodesGroupedByPath } from '../metrics-treemap';
|
|
31
31
|
import { SEARCH_PLACEHOLDER } from './bundle-assets.i18n';
|
|
32
32
|
import css from './bundle-assets.module.css';
|
|
33
33
|
const RUN_TITLE_CURRENT = 'Current';
|
|
34
34
|
const RUN_TITLE_BASELINE = 'Baseline';
|
|
35
35
|
const RUNS_LABELS = [RUN_TITLE_CURRENT, RUN_TITLE_BASELINE];
|
|
36
|
+
const DISPLAY_TYPE_GROUPS = {
|
|
37
|
+
[MetricsDisplayType.TREEMAP]: ['folder'],
|
|
38
|
+
};
|
|
36
39
|
const getFileTypeFilters = (filters) => Object.entries(FILE_TYPE_LABELS)
|
|
37
40
|
.map(([key, label]) => ({
|
|
38
41
|
key,
|
|
@@ -106,11 +109,43 @@ RowHeader.propTypes = {
|
|
|
106
109
|
RowHeader.defaultProps = {
|
|
107
110
|
chunks: [],
|
|
108
111
|
};
|
|
112
|
+
const ViewMetricsTreemap = (props) => {
|
|
113
|
+
const { metricsTableTitle, jobs, items, displayType, emptyMessage, showEntryInfo, updateSearch } = props;
|
|
114
|
+
const treeNodes = useMemo(() => {
|
|
115
|
+
if (displayType.groupBy === 'folder') {
|
|
116
|
+
return getTreemapNodesGroupedByPath(items);
|
|
117
|
+
}
|
|
118
|
+
return getTreemapNodes(items);
|
|
119
|
+
}, [items, displayType.groupBy]);
|
|
120
|
+
const onGroupClick = useCallback((groupPath) => {
|
|
121
|
+
if (groupPath) {
|
|
122
|
+
updateSearch(`^${groupPath}/`);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
updateSearch('');
|
|
126
|
+
}
|
|
127
|
+
}, [updateSearch]);
|
|
128
|
+
return (React.createElement(React.Fragment, null,
|
|
129
|
+
React.createElement(Table, { compact: true },
|
|
130
|
+
React.createElement(MetricsTableHeader, { metricTitle: metricsTableTitle, showSum: true, jobs: jobs, rows: items })),
|
|
131
|
+
React.createElement(MetricsTreemap, { treeNodes: treeNodes, nested: Boolean(displayType.groupBy), emptyMessage: emptyMessage, onItemClick: showEntryInfo, onGroupClick: onGroupClick })));
|
|
132
|
+
};
|
|
133
|
+
ViewMetricsTreemap.propTypes = {
|
|
134
|
+
jobs: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
135
|
+
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
136
|
+
metricsTableTitle: PropTypes.node.isRequired,
|
|
137
|
+
displayType: PropTypes.shape({
|
|
138
|
+
groupBy: PropTypes.string,
|
|
139
|
+
}).isRequired,
|
|
140
|
+
emptyMessage: PropTypes.node.isRequired,
|
|
141
|
+
showEntryInfo: PropTypes.func.isRequired,
|
|
142
|
+
updateSearch: PropTypes.func.isRequired,
|
|
143
|
+
};
|
|
109
144
|
export const BundleAssets = (props) => {
|
|
110
145
|
var _a, _b, _c;
|
|
111
146
|
const { className, jobs, items, allItems, updateFilters, resetFilters, resetAllFilters, totalRowCount, filters, entryId, hasActiveFilters, sort, updateSort, search, updateSearch, customComponentLink: CustomComponentLink, hideEntryInfo, showEntryInfo, } = props;
|
|
112
147
|
const jobLabels = jobs === null || jobs === void 0 ? void 0 : jobs.map((job) => job === null || job === void 0 ? void 0 : job.label);
|
|
113
|
-
const [displayType, setDisplayType] = useMetricsDisplayType();
|
|
148
|
+
const [displayType, setDisplayType] = useMetricsDisplayType(DISPLAY_TYPE_GROUPS);
|
|
114
149
|
const dropdownFilters = useMemo(() => getFilters({ compareMode: (jobs === null || jobs === void 0 ? void 0 : jobs.length) > 1, filters }), [jobs, filters]);
|
|
115
150
|
const metricsTableTitle = useMemo(() => (React.createElement(MetricsTableTitle, { title: I18N.ASSETS, info: `${items.length}/${totalRowCount}`, popoverInfo: I18N.ASSETS_INFO, popoverHref: config.documentation.assets })), [items, totalRowCount]);
|
|
116
151
|
const renderRowHeader = useCallback((row) => (React.createElement(RowHeader, { row: row, customComponentLink: CustomComponentLink, filters: filters, search: search })), [CustomComponentLink, filters, search]);
|
|
@@ -124,17 +159,14 @@ export const BundleAssets = (props) => {
|
|
|
124
159
|
return (React.createElement(React.Fragment, null,
|
|
125
160
|
React.createElement(Stack, { space: "xsmall", as: "section", className: cx(css.root, className) },
|
|
126
161
|
React.createElement(Toolbar, { renderActions: ({ actionClassName }) => (React.createElement(FlexStack, { space: "xxsmall", className: cx(css.dropdown, actionClassName) },
|
|
127
|
-
React.createElement(MetricsDisplaySelector, {
|
|
162
|
+
React.createElement(MetricsDisplaySelector, { value: displayType.value, groupBy: displayType.groupBy, groups: DISPLAY_TYPE_GROUPS, onSelect: setDisplayType }),
|
|
128
163
|
React.createElement(MetricsTableOptions, { handleViewAll: resetAllFilters, handleResetFilters: resetFilters }))) },
|
|
129
164
|
React.createElement(FlexStack, { space: "xxsmall" },
|
|
130
165
|
React.createElement(InputSearch, { className: css.toolbarSearch, placeholder: SEARCH_PLACEHOLDER, defaultValue: search, onChange: updateSearch }),
|
|
131
166
|
React.createElement(Filters, { className: css.toolbarFilters, filters: dropdownFilters, hasActiveFilters: hasActiveFilters, onChange: updateFilters }))),
|
|
132
167
|
React.createElement(Box, { outline: true, as: "main" },
|
|
133
|
-
displayType === MetricsDisplayType.TABLE && (React.createElement(MetricsTable, { runs: jobs, items: items, renderRowHeader: renderRowHeader, emptyMessage: emptyMessage, showHeaderSum: true, title: metricsTableTitle, sort: sort, updateSort: updateSort })),
|
|
134
|
-
displayType === MetricsDisplayType.TREEMAP && (React.createElement(
|
|
135
|
-
React.createElement(Table, { compact: true },
|
|
136
|
-
React.createElement(MetricsTableHeader, { metricTitle: metricsTableTitle, showSum: true, jobs: jobs, rows: items })),
|
|
137
|
-
React.createElement(MetricsTreemap, { emptyMessage: emptyMessage, items: items, onItemClick: showEntryInfo }))))),
|
|
168
|
+
displayType.value === MetricsDisplayType.TABLE && (React.createElement(MetricsTable, { runs: jobs, items: items, renderRowHeader: renderRowHeader, emptyMessage: emptyMessage, showHeaderSum: true, title: metricsTableTitle, sort: sort, updateSort: updateSort })),
|
|
169
|
+
displayType.value === MetricsDisplayType.TREEMAP && (React.createElement(ViewMetricsTreemap, { jobs: jobs, items: items, displayType: displayType, emptyMessage: emptyMessage, showEntryInfo: showEntryInfo, updateSearch: updateSearch })))),
|
|
138
170
|
entryItem && (React.createElement(AssetInfo, { className: css.assetInfo, item: entryItem, labels: jobLabels, chunks: ((_c = (_b = (_a = jobs[0]) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.webpack) === null || _c === void 0 ? void 0 : _c.chunks) || [], customComponentLink: CustomComponentLink, onClose: hideEntryInfo }))));
|
|
139
171
|
};
|
|
140
172
|
BundleAssets.defaultProps = {
|