@bundle-stats/ui 4.13.0-rc.0 → 4.13.0-rc.1
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/components/bundle-assets/bundle-assets.js +23 -22
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets/index.js +3 -1
- package/lib/components/bundle-assets/index.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +10 -6
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.utils.js +2 -13
- package/lib/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib/components/bundle-modules/index.js +2 -1
- package/lib/components/bundle-modules/index.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.js +11 -6
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.constants.js +7 -0
- package/lib/components/metrics-treemap/metrics-treemap.constants.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.js +69 -71
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +47 -10
- package/lib/components/metrics-treemap/metrics-treemap.utils.js +60 -1
- package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
- package/lib/utils/colors.js +22 -0
- package/lib/utils/colors.js.map +1 -0
- package/lib/{utils.js → utils/components.js} +2 -17
- package/lib/utils/components.js.map +1 -0
- package/lib/utils/index.js +20 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/jobs.js +18 -0
- package/lib/utils/jobs.js.map +1 -0
- package/lib-esm/components/bundle-assets/bundle-assets.js +23 -23
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets/index.js +3 -1
- package/lib-esm/components/bundle-assets/index.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +10 -6
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js +1 -11
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib-esm/components/bundle-modules/index.js +3 -2
- package/lib-esm/components/bundle-modules/index.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js +11 -6
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js +6 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +65 -68
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +47 -10
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +57 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
- package/lib-esm/utils/colors.js +15 -0
- package/lib-esm/utils/colors.js.map +1 -0
- package/lib-esm/utils/components.js +16 -0
- package/lib-esm/utils/components.js.map +1 -0
- package/lib-esm/utils/index.js +4 -0
- package/lib-esm/utils/index.js.map +1 -0
- package/lib-esm/utils/jobs.js +11 -0
- package/lib-esm/utils/jobs.js.map +1 -0
- package/package.json +3 -3
- package/src/components/bundle-assets/bundle-assets.jsx +72 -48
- package/src/components/bundle-assets/index.jsx +4 -0
- package/src/components/bundle-modules/bundle-modules.tsx +32 -11
- package/src/components/bundle-modules/bundle-modules.types.d.ts +2 -17
- package/src/components/bundle-modules/bundle-modules.utils.ts +7 -18
- package/src/components/bundle-modules/index.tsx +4 -3
- package/src/components/bundle-packages/bundle-packages.jsx +19 -7
- package/src/components/metrics-treemap/metrics-treemap.constants.ts +11 -0
- package/src/components/metrics-treemap/metrics-treemap.module.css +47 -10
- package/src/components/metrics-treemap/metrics-treemap.tsx +171 -110
- package/src/components/metrics-treemap/metrics-treemap.utils.ts +107 -1
- package/src/utils/colors.ts +19 -0
- package/src/utils/components.tsx +19 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/jobs.ts +22 -0
- package/types/components/bundle-assets/bundle-assets.d.ts +1 -5
- package/types/components/bundle-modules/bundle-modules.d.ts +4 -2
- package/types/components/bundle-modules/bundle-modules.utils.d.ts +3 -7
- package/types/components/bundle-modules/index.d.ts +2 -2
- package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +8 -0
- package/types/components/metrics-treemap/metrics-treemap.d.ts +1 -1
- package/types/components/metrics-treemap/metrics-treemap.utils.d.ts +11 -1
- package/types/utils/colors.d.ts +1 -0
- package/types/utils/components.d.ts +2 -0
- package/types/utils/index.d.ts +3 -0
- package/types/utils/jobs.d.ts +7 -0
- package/lib/utils.js.map +0 -1
- package/lib-esm/utils.js +0 -30
- package/lib-esm/utils.js.map +0 -1
- package/src/utils.jsx +0 -38
- package/types/utils.d.ts +0 -3
package/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.jsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,yDAAiC;AACjC,4DAA4B;AAE5B,4EAAyC;AAElC,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,EAAE;IACrC,MAAM,MAAM,GAAG,IAAA,eAAK,EAAC,2BAAM,EAAE,IAAI,CAAC,KAAK,CAAC,2BAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IAEhE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE;QACvC,IAAI,KAAK,KAAK,CAAC,EAAE;YACf,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;SACvB;QAED,IAAI,KAAK,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAC5C;QAED,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,SAAS,aAcpB;AAEK,MAAM,2BAA2B,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE;IAClE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,uCAAK,SAAS,EAAE,SAAS,IAAG,KAAK,CAAO,CAAC;KACjD;IAED,OAAO,eAAK,CAAC,YAAY,CAAC,KAAK,EAAE;QAC/B,GAAG,KAAK;QACR,SAAS,EAAE,IAAA,oBAAE,EAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC;AAfW,QAAA,2BAA2B,+BAetC"}
|
package/lib-esm/utils.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import chunk from 'lodash/chunk';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import COLORS from './chart-colors.json';
|
|
5
|
-
export const getColors = (count = 2) => {
|
|
6
|
-
const chunks = chunk(COLORS, Math.round(COLORS.length / count));
|
|
7
|
-
return chunks.map((chunkColors, index) => {
|
|
8
|
-
if (index === 0) {
|
|
9
|
-
return chunkColors[0];
|
|
10
|
-
}
|
|
11
|
-
if (index === chunks.length - 1) {
|
|
12
|
-
return chunkColors[chunkColors.length - 1];
|
|
13
|
-
}
|
|
14
|
-
return chunkColors[Math.floor(chunkColors.length / 2)];
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export const getRenderChildWithClassName = (className) => (child) => {
|
|
18
|
-
if (child === null || child === '') {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
const { props } = child;
|
|
22
|
-
if (!props) {
|
|
23
|
-
return React.createElement("div", { className: className }, child);
|
|
24
|
-
}
|
|
25
|
-
return React.cloneElement(child, {
|
|
26
|
-
...props,
|
|
27
|
-
className: cx(className, props.className),
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=utils.js.map
|
package/lib-esm/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,EAAE;IACrC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IAEhE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE;QACvC,IAAI,KAAK,KAAK,CAAC,EAAE;YACf,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;SACvB;QAED,IAAI,KAAK,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAC5C;QAED,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE;IAClE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,6BAAK,SAAS,EAAE,SAAS,IAAG,KAAK,CAAO,CAAC;KACjD;IAED,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;QAC/B,GAAG,KAAK;QACR,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/src/utils.jsx
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import chunk from 'lodash/chunk';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
import COLORS from './chart-colors.json';
|
|
6
|
-
|
|
7
|
-
export const getColors = (count = 2) => {
|
|
8
|
-
const chunks = chunk(COLORS, Math.round(COLORS.length / count));
|
|
9
|
-
|
|
10
|
-
return chunks.map((chunkColors, index) => {
|
|
11
|
-
if (index === 0) {
|
|
12
|
-
return chunkColors[0];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (index === chunks.length - 1) {
|
|
16
|
-
return chunkColors[chunkColors.length - 1];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return chunkColors[Math.floor(chunkColors.length / 2)];
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const getRenderChildWithClassName = (className) => (child) => {
|
|
24
|
-
if (child === null || child === '') {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const { props } = child;
|
|
29
|
-
|
|
30
|
-
if (!props) {
|
|
31
|
-
return <div className={className}>{child}</div>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return React.cloneElement(child, {
|
|
35
|
-
...props,
|
|
36
|
-
className: cx(className, props.className), // eslint-disable-line react/prop-types
|
|
37
|
-
});
|
|
38
|
-
};
|
package/types/utils.d.ts
DELETED