@bundle-stats/ui 4.1.6 → 4.1.8-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/bundle-assets/bundle-assets.utils.js +1 -1
- package/lib/components/bundle-assets/bundle-assets.utils.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.utils.js +1 -1
- package/lib/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib/components/bundle-modules/index.js +8 -2
- package/lib/components/bundle-modules/index.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.utils.js +1 -1
- package/lib/components/bundle-packages/bundle-packages.utils.js.map +1 -1
- package/lib/components/metrics-table/index.js +19 -3
- package/lib/components/metrics-table/index.js.map +1 -1
- package/lib/components/metrics-table/metrics-table.js +13 -3
- package/lib/components/metrics-table/metrics-table.js.map +1 -1
- package/lib/components/metrics-table/metrics-table.module.css +17 -0
- package/lib/hooks/search-params.js +11 -2
- package/lib/hooks/search-params.js.map +1 -1
- package/lib/ui/tag/tag.module.css +2 -2
- package/lib-esm/components/bundle-assets/bundle-assets.utils.js +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.utils.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib-esm/components/bundle-modules/index.js +8 -2
- package/lib-esm/components/bundle-modules/index.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.utils.js +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.utils.js.map +1 -1
- package/lib-esm/components/metrics-table/index.js +6 -1
- package/lib-esm/components/metrics-table/index.js.map +1 -1
- package/lib-esm/components/metrics-table/metrics-table.js +13 -3
- package/lib-esm/components/metrics-table/metrics-table.js.map +1 -1
- package/lib-esm/components/metrics-table/metrics-table.module.css +17 -0
- package/lib-esm/hooks/search-params.js +12 -3
- package/lib-esm/hooks/search-params.js.map +1 -1
- package/lib-esm/ui/tag/tag.module.css +2 -2
- package/package.json +19 -18
- package/src/components/bundle-assets/bundle-assets.utils.js +1 -1
- package/src/components/bundle-modules/bundle-modules.utils.js +1 -1
- package/src/components/bundle-modules/index.jsx +15 -2
- package/src/components/bundle-packages/bundle-packages.utils.js +1 -1
- package/src/components/metrics-table/index.jsx +11 -0
- package/src/components/metrics-table/metrics-table.jsx +42 -5
- package/src/components/metrics-table/metrics-table.module.css +17 -0
- package/src/hooks/search-params.js +23 -11
- package/src/ui/tag/tag.module.css +2 -2
- package/tsconfig.json +3 -0
- package/types/app/app.d.ts +1 -1
- package/types/app/header/header.d.ts +4 -3
- package/types/assets/icons.svg.d.ts +1 -1
- package/types/components/asset-info/asset-info.d.ts +12 -6
- package/types/components/browsertime-table/browsertime-table.d.ts +4 -3
- package/types/components/bundle-assets/bundle-assets.d.ts +37 -16
- package/types/components/bundle-assets/index.d.ts +8 -7
- package/types/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.d.ts +7 -4
- package/types/components/bundle-assets-totals-table/bundle-assets-totals-table.d.ts +5 -4
- package/types/components/bundle-modules/bundle-modules.d.ts +26 -17
- package/types/components/bundle-modules/index.d.ts +8 -7
- package/types/components/bundle-packages/bundle-packages.d.ts +31 -16
- package/types/components/bundle-packages/index.d.ts +8 -7
- package/types/components/component-link.d.ts +5 -4
- package/types/components/delta/delta.d.ts +6 -5
- package/types/components/duplicate-packages-warning/duplicate-packages-warning.d.ts +9 -5
- package/types/components/job-header/job-header.d.ts +12 -5
- package/types/components/job-meta/job-meta.d.ts +8 -4
- package/types/components/job-name/job-name.d.ts +6 -5
- package/types/components/jobs-header/jobs-header.d.ts +6 -3
- package/types/components/lighthouse-table/lighthouse-table.d.ts +4 -3
- package/types/components/metric/metric.d.ts +8 -7
- package/types/components/metrics-table/index.d.ts +1 -1
- package/types/components/metrics-table/metrics-table.d.ts +24 -10
- package/types/components/metrics-table-options/metrics-table-options.d.ts +5 -4
- package/types/components/metrics-table-search/metrics-table-search.d.ts +6 -5
- package/types/components/metrics-table-title/metrics-table-title.d.ts +7 -6
- package/types/components/module-info/module-info.d.ts +19 -8
- package/types/components/summary/summary.d.ts +9 -8
- package/types/components/summary-item/summary-item.d.ts +10 -9
- package/types/components/total-size-type-title/total-size-type-title.d.ts +3 -2
- package/types/hooks/rows-sort.d.ts +9 -3
- package/types/hooks/search-params.d.ts +4 -4
- package/types/layout/box/box.d.ts +8 -7
- package/types/layout/flex-stack/flex-stack.d.ts +8 -7
- package/types/layout/footer/footer.d.ts +4 -3
- package/types/layout/separator.d.ts +4 -4
- package/types/layout/stack/stack.d.ts +6 -5
- package/types/query-state.d.ts +1 -1
- package/types/stories/wrapper.d.ts +1 -1
- package/types/ui/alert/alert.d.ts +5 -4
- package/types/ui/container/container.d.ts +4 -3
- package/types/ui/dropdown/dropdown.d.ts +11 -10
- package/types/ui/empty-set/empty-set.d.ts +6 -5
- package/types/ui/file-name/file-name.d.ts +5 -4
- package/types/ui/filters/filters.d.ts +6 -5
- package/types/ui/filters/index.d.ts +4 -3
- package/types/ui/horizontal-bar-chart/horizontal-bar-chart.d.ts +12 -4
- package/types/ui/hover-card/hover-card.d.ts +9 -8
- package/types/ui/icon/icon.d.ts +6 -5
- package/types/ui/input/input.d.ts +4 -3
- package/types/ui/loader/loader.d.ts +4 -3
- package/types/ui/panels/panels.d.ts +4 -3
- package/types/ui/skeleton/skeleton.d.ts +5 -4
- package/types/ui/sort-dropdown/sort-dropdown.d.ts +8 -7
- package/types/ui/table/table.d.ts +7 -6
- package/types/ui/tabs/tabs.d.ts +8 -7
- package/types/ui/tag/tag.d.ts +6 -5
- package/types/ui/toolbar/toolbar.d.ts +5 -4
- package/types/ui/tooltip/tooltip.d.ts +11 -8
- package/types/utils.d.ts +1 -1
- package/src/components/metrics-table/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-params.js","sourceRoot":"","sources":["../../src/hooks/search-params.js"],"names":[],"mappings":"AAAA,OAAO,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,EAAE;QAC1C,QAAQ,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,qBAAqB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7C,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,MAAM;QACN,aAAa;QACb,OAAO;QACP,gBAAgB,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;QACtD,YAAY,EAAE,kBAAkB;QAChC,aAAa,EAAE,mBAAmB;QAClC,YAAY,EAAE,kBAAkB;QAChC,eAAe,EAAE,qBAAqB;KACvC,CAAC,EACF;QACE,MAAM;QACN,aAAa;QACb,OAAO;QACP,iBAAiB;QACjB,kBAAkB;QAClB,mBAAmB;QACnB,kBAAkB;QAClB,qBAAqB;KACtB,CACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
/** default: medium */
|
|
30
30
|
.root {
|
|
31
31
|
border-radius: var(--radius-medium);
|
|
32
|
-
padding: var(--space-xxxsmall);
|
|
32
|
+
padding: calc(var(--space-xxxsmall) / 2) var(--space-xxxsmall);
|
|
33
33
|
min-width: var(--space-small);
|
|
34
34
|
height: var(--space-small);
|
|
35
35
|
font-size: 9px;
|
|
36
|
-
line-height:
|
|
36
|
+
line-height: var(--space-xsmall);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.small {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8-beta.0",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -41,16 +41,17 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@babel/preset-env": "7.20.2",
|
|
43
43
|
"@babel/preset-react": "7.18.6",
|
|
44
|
-
"@storybook/addon-essentials": "6.5.
|
|
44
|
+
"@storybook/addon-essentials": "6.5.15",
|
|
45
45
|
"@storybook/addon-knobs": "6.4.0",
|
|
46
46
|
"@storybook/addon-postcss": "2.0.0",
|
|
47
|
-
"@storybook/addon-storyshots": "6.5.
|
|
48
|
-
"@storybook/addons": "6.5.
|
|
49
|
-
"@storybook/builder-webpack5": "6.5.
|
|
50
|
-
"@storybook/manager-webpack5": "6.5.
|
|
51
|
-
"@storybook/react": "6.5.
|
|
47
|
+
"@storybook/addon-storyshots": "6.5.15",
|
|
48
|
+
"@storybook/addons": "6.5.15",
|
|
49
|
+
"@storybook/builder-webpack5": "6.5.15",
|
|
50
|
+
"@storybook/manager-webpack5": "6.5.15",
|
|
51
|
+
"@storybook/react": "6.5.15",
|
|
52
|
+
"@types/react": "18.0.26",
|
|
52
53
|
"babel-plugin-require-context-hook": "1.0.0",
|
|
53
|
-
"chromatic": "6.
|
|
54
|
+
"chromatic": "6.14.0",
|
|
54
55
|
"classnames": "2.3.2",
|
|
55
56
|
"colormap": "2.3.2",
|
|
56
57
|
"cross-env": "7.0.3",
|
|
@@ -65,8 +66,8 @@
|
|
|
65
66
|
"lodash": "4.17.21",
|
|
66
67
|
"postcss": "8.4.20",
|
|
67
68
|
"prop-types": "15.8.1",
|
|
68
|
-
"react": "
|
|
69
|
-
"react-dom": "
|
|
69
|
+
"react": "17.0.2",
|
|
70
|
+
"react-dom": "17.0.2",
|
|
70
71
|
"react-router-dom": "5.3.4",
|
|
71
72
|
"react-test-renderer": "18.2.0",
|
|
72
73
|
"rimraf": "3.0.2",
|
|
@@ -76,16 +77,16 @@
|
|
|
76
77
|
"classnames": "^2.0.0",
|
|
77
78
|
"lodash": "^4.0.0",
|
|
78
79
|
"prop-types": "^15.0.0",
|
|
79
|
-
"react": "^
|
|
80
|
-
"react-dom": "^
|
|
80
|
+
"react": "^17.0.0 | ^18.0.0",
|
|
81
|
+
"react-dom": "^17.0.0 | ^18.0.0",
|
|
81
82
|
"react-router-dom": "^5.0.0"
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
|
84
|
-
"@bundle-stats/utils": "^4.1.
|
|
85
|
-
"ariakit": "
|
|
86
|
-
"modern-css-reset": "
|
|
87
|
-
"query-string": "
|
|
88
|
-
"use-query-params": "
|
|
85
|
+
"@bundle-stats/utils": "^4.1.8-beta.0",
|
|
86
|
+
"ariakit": "2.0.0-next.43",
|
|
87
|
+
"modern-css-reset": "1.4.0",
|
|
88
|
+
"query-string": "7.1.3",
|
|
89
|
+
"use-query-params": "2.1.2"
|
|
89
90
|
},
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "0c82e07e4810738eff0c6d5ae6a1715f9fa67d5c"
|
|
91
92
|
}
|
|
@@ -24,8 +24,21 @@ import { SORT_BY } from './bundle-modules.constants';
|
|
|
24
24
|
export const BundleModules = (props) => {
|
|
25
25
|
const { jobs, filters, search, setState, sortBy, direction, ...restProps } = props;
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const { chunks, chunkIds } = useMemo(
|
|
28
|
+
() => {
|
|
29
|
+
const bundleChunks = uniqBy(
|
|
30
|
+
jobs.map((job) => job?.meta?.webpack?.chunks || []).flat(),
|
|
31
|
+
({ id }) => id
|
|
32
|
+
);
|
|
33
|
+
const bundleChunkIds = bundleChunks?.map(({ id }) => id);
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
chunks: bundleChunks,
|
|
37
|
+
chunkIds: bundleChunkIds,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
[jobs],
|
|
41
|
+
);
|
|
29
42
|
|
|
30
43
|
const { defaultFilters, allEntriesFilters } = useMemo(
|
|
31
44
|
() => ({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { MetricsTable as BaseComponent } from './metrics-table';
|
|
4
|
+
|
|
5
|
+
export const MetricsTable = (props) => {
|
|
6
|
+
const [showAllItems, setShowAllItems] = useState(false);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<BaseComponent {...props} showAllItems={showAllItems} setShowAllItems={setShowAllItems} />
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -12,6 +12,7 @@ import { JobName } from '../job-name';
|
|
|
12
12
|
import styles from './metrics-table.module.css';
|
|
13
13
|
|
|
14
14
|
const METRIC_TYPE_DATA = getGlobalMetricType(null, METRIC_TYPE_FILE_SIZE);
|
|
15
|
+
const VISIBLE_COUNT = 100;
|
|
15
16
|
|
|
16
17
|
const getRowsRunTotal = (rows, runIndex) => sum(rows.map((row) => row?.runs?.[runIndex]?.value || 0));
|
|
17
18
|
|
|
@@ -164,6 +165,8 @@ export const MetricsTable = ({
|
|
|
164
165
|
showHeaderSum,
|
|
165
166
|
headerRows,
|
|
166
167
|
title,
|
|
168
|
+
showAllItems,
|
|
169
|
+
setShowAllItems,
|
|
167
170
|
...restProps
|
|
168
171
|
}) => {
|
|
169
172
|
const { headers, columnClassNames } = useMemo(() => {
|
|
@@ -183,6 +186,11 @@ export const MetricsTable = ({
|
|
|
183
186
|
showHeaderSum && styles.showHeaderSum,
|
|
184
187
|
);
|
|
185
188
|
|
|
189
|
+
const showEmpty = isEmpty(items);
|
|
190
|
+
const showItems = !showEmpty;
|
|
191
|
+
const hasHiddenItems = items?.length > VISIBLE_COUNT;
|
|
192
|
+
const visibleItems = !hasHiddenItems || showAllItems ? items : items?.slice(0, VISIBLE_COUNT);
|
|
193
|
+
|
|
186
194
|
return (
|
|
187
195
|
<Table className={rootClassName} compact {...restProps}>
|
|
188
196
|
<Table.THead>
|
|
@@ -201,17 +209,46 @@ export const MetricsTable = ({
|
|
|
201
209
|
})}
|
|
202
210
|
</Table.THead>
|
|
203
211
|
<Table.TBody>
|
|
204
|
-
{
|
|
205
|
-
items.map((item) => (
|
|
206
|
-
<MetricsTableRow key={item.key} item={item} renderRowHeader={renderRowHeader} />
|
|
207
|
-
))
|
|
208
|
-
) : (
|
|
212
|
+
{showEmpty && (
|
|
209
213
|
<Table.Tr>
|
|
210
214
|
<Table.Td className={styles.empty} colSpan={columnClassNames?.length || 1}>
|
|
211
215
|
{emptyMessage}
|
|
212
216
|
</Table.Td>
|
|
213
217
|
</Table.Tr>
|
|
214
218
|
)}
|
|
219
|
+
|
|
220
|
+
{showItems && (
|
|
221
|
+
<>
|
|
222
|
+
{visibleItems.map((item) => (
|
|
223
|
+
<MetricsTableRow key={item.key} item={item} renderRowHeader={renderRowHeader} />
|
|
224
|
+
))}
|
|
225
|
+
|
|
226
|
+
{hasHiddenItems && (
|
|
227
|
+
<Table.Tr>
|
|
228
|
+
<Table.Td className={styles.showAllItems} colSpan={columnClassNames?.length || 1}>
|
|
229
|
+
{showAllItems ? (
|
|
230
|
+
<button
|
|
231
|
+
onClick={() => setShowAllItems(false)}
|
|
232
|
+
type="button"
|
|
233
|
+
className={styles.showAllItemsButton}
|
|
234
|
+
>
|
|
235
|
+
Show less
|
|
236
|
+
</button>
|
|
237
|
+
) : (
|
|
238
|
+
<button
|
|
239
|
+
onClick={() => setShowAllItems(true)}
|
|
240
|
+
type="button"
|
|
241
|
+
className={styles.showAllItemsButton}
|
|
242
|
+
>
|
|
243
|
+
Show all
|
|
244
|
+
</button>
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
</Table.Td>
|
|
248
|
+
</Table.Tr>
|
|
249
|
+
)}
|
|
250
|
+
</>
|
|
251
|
+
)}
|
|
215
252
|
</Table.TBody>
|
|
216
253
|
</Table>
|
|
217
254
|
);
|
|
@@ -67,6 +67,23 @@
|
|
|
67
67
|
text-align: center;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
.root .showAllItems {
|
|
71
|
+
background: none !important;
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** show all */
|
|
76
|
+
.showAllItemsButton {
|
|
77
|
+
appearance: none;
|
|
78
|
+
background: none;
|
|
79
|
+
margin: 0;
|
|
80
|
+
border: 0;
|
|
81
|
+
padding: var(--space-xxxsmall);
|
|
82
|
+
color: var(--color-primary);
|
|
83
|
+
text-decoration: underline;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
|
|
70
87
|
/** Breakpoints */
|
|
71
88
|
.root tr {
|
|
72
89
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useLayoutEffect, useReducer } from 'react';
|
|
1
|
+
import { useCallback, useLayoutEffect, useMemo, useReducer } from 'react';
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
4
|
|
|
@@ -150,14 +150,26 @@ export const useSearchParams = ({
|
|
|
150
150
|
dispatch({ type: ACTION_RESET_ALL });
|
|
151
151
|
}, [dispatch]);
|
|
152
152
|
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
return useMemo(
|
|
154
|
+
() => ({
|
|
155
|
+
search,
|
|
156
|
+
searchPattern,
|
|
157
|
+
filters,
|
|
158
|
+
hasActiveFilters: !isEqual(allEntriesFilters, filters),
|
|
159
|
+
updateSearch: handleUpdateSearch,
|
|
160
|
+
updateFilters: handleUpdateFilters,
|
|
161
|
+
resetFilters: handleResetFilters,
|
|
162
|
+
resetAllFilters: handleResetAllFilters,
|
|
163
|
+
}),
|
|
164
|
+
[
|
|
165
|
+
search,
|
|
166
|
+
searchPattern,
|
|
167
|
+
filters,
|
|
168
|
+
allEntriesFilters,
|
|
169
|
+
handleUpdateSearch,
|
|
170
|
+
handleUpdateFilters,
|
|
171
|
+
handleResetFilters,
|
|
172
|
+
handleResetAllFilters,
|
|
173
|
+
],
|
|
174
|
+
);
|
|
163
175
|
};
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
/** default: medium */
|
|
30
30
|
.root {
|
|
31
31
|
border-radius: var(--radius-medium);
|
|
32
|
-
padding: var(--space-xxxsmall);
|
|
32
|
+
padding: calc(var(--space-xxxsmall) / 2) var(--space-xxxsmall);
|
|
33
33
|
min-width: var(--space-small);
|
|
34
34
|
height: var(--space-small);
|
|
35
35
|
font-size: 9px;
|
|
36
|
-
line-height:
|
|
36
|
+
line-height: var(--space-xsmall);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.small {
|
package/tsconfig.json
CHANGED
package/types/app/app.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function App(props: any):
|
|
1
|
+
export function App(props: any): JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export function Header({ className, jobs }: {
|
|
2
2
|
className: any;
|
|
3
3
|
jobs: any;
|
|
4
|
-
}):
|
|
4
|
+
}): JSX.Element;
|
|
5
5
|
export namespace Header {
|
|
6
6
|
namespace propTypes {
|
|
7
|
-
const className:
|
|
8
|
-
const jobs:
|
|
7
|
+
const className: PropTypes.Requireable<string>;
|
|
8
|
+
const jobs: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
9
9
|
}
|
|
10
10
|
namespace defaultProps {
|
|
11
11
|
const className_1: string;
|
|
@@ -14,3 +14,4 @@ export namespace Header {
|
|
|
14
14
|
export { jobs_1 as jobs };
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function SvgIcons(props: any):
|
|
1
|
+
export function SvgIcons(props: any): JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
export function AssetInfo(props: any):
|
|
1
|
+
export function AssetInfo(props: any): JSX.Element;
|
|
2
2
|
export namespace AssetInfo {
|
|
3
3
|
namespace propTypes {
|
|
4
|
-
const className:
|
|
5
|
-
const item:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const className: PropTypes.Requireable<string>;
|
|
5
|
+
const item: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
6
|
+
runs: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
7
|
+
name: PropTypes.Requireable<string>;
|
|
8
|
+
chunkId: PropTypes.Requireable<string>;
|
|
9
|
+
}> | null | undefined)[]>;
|
|
10
|
+
}>>>;
|
|
11
|
+
const labels: PropTypes.Validator<(string | null | undefined)[]>;
|
|
12
|
+
const chunks: PropTypes.Requireable<any[]>;
|
|
13
|
+
const CustomComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
9
14
|
}
|
|
10
15
|
namespace defaultProps {
|
|
11
16
|
const className_1: string;
|
|
@@ -15,4 +20,5 @@ export namespace AssetInfo {
|
|
|
15
20
|
export { ComponentLink as CustomComponentLink };
|
|
16
21
|
}
|
|
17
22
|
}
|
|
23
|
+
import PropTypes from "prop-types";
|
|
18
24
|
import { ComponentLink } from "../component-link";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export function BrowsertimeTable(props: any):
|
|
1
|
+
export function BrowsertimeTable(props: any): JSX.Element;
|
|
2
2
|
export namespace BrowsertimeTable {
|
|
3
3
|
namespace defaultProps {
|
|
4
4
|
const className: string;
|
|
5
5
|
const jobs: never[];
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
|
-
const className_1:
|
|
8
|
+
const className_1: PropTypes.Requireable<string>;
|
|
9
9
|
export { className_1 as className };
|
|
10
|
-
const jobs_1: any
|
|
10
|
+
const jobs_1: PropTypes.Requireable<any[]>;
|
|
11
11
|
export { jobs_1 as jobs };
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
import PropTypes from "prop-types";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function BundleAssets(props: any):
|
|
1
|
+
export function BundleAssets(props: any): JSX.Element;
|
|
2
2
|
export namespace BundleAssets {
|
|
3
3
|
namespace defaultProps {
|
|
4
4
|
export const className: string;
|
|
@@ -7,24 +7,45 @@ export namespace BundleAssets {
|
|
|
7
7
|
export { ComponentLink as customComponentLink };
|
|
8
8
|
}
|
|
9
9
|
namespace propTypes {
|
|
10
|
-
const className_1:
|
|
10
|
+
const className_1: PropTypes.Requireable<string>;
|
|
11
11
|
export { className_1 as className };
|
|
12
|
-
export const jobs:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
export const jobs: PropTypes.Validator<(PropTypes.InferProps<{
|
|
13
|
+
internalBuildNumber: PropTypes.Requireable<number>;
|
|
14
|
+
label: PropTypes.Requireable<string>;
|
|
15
|
+
meta: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
+
webpack: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
|
+
chunks: PropTypes.Requireable<any[]>;
|
|
18
|
+
}>>;
|
|
19
|
+
}>>;
|
|
20
|
+
}> | null | undefined)[]>;
|
|
21
|
+
export const items: PropTypes.Validator<(PropTypes.InferProps<{
|
|
22
|
+
key: PropTypes.Requireable<string>;
|
|
23
|
+
label: PropTypes.Requireable<string>;
|
|
24
|
+
runs: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
25
|
+
displayValue: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
26
|
+
displayDelta: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
27
|
+
}> | null | undefined)[]>;
|
|
28
|
+
}> | null | undefined)[]>;
|
|
29
|
+
export const updateFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
+
export const resetFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
+
export const resetAllFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
32
|
+
const totalRowCount_1: PropTypes.Requireable<number>;
|
|
18
33
|
export { totalRowCount_1 as totalRowCount };
|
|
19
|
-
export const filters:
|
|
20
|
-
|
|
34
|
+
export const filters: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
+
changed: PropTypes.Requireable<boolean>;
|
|
36
|
+
}>>>;
|
|
37
|
+
const hasActiveFilters_1: PropTypes.Requireable<boolean>;
|
|
21
38
|
export { hasActiveFilters_1 as hasActiveFilters };
|
|
22
|
-
export const sortFields:
|
|
23
|
-
export const search:
|
|
24
|
-
export const updateSearch: any
|
|
25
|
-
export const sort:
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
export const sortFields: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
40
|
+
export const search: PropTypes.Validator<string>;
|
|
41
|
+
export const updateSearch: PropTypes.Validator<(...args: any[]) => any>;
|
|
42
|
+
export const sort: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
43
|
+
sortBy: PropTypes.Requireable<string>;
|
|
44
|
+
direction: PropTypes.Requireable<string>;
|
|
45
|
+
}>>>;
|
|
46
|
+
export const updateSort: PropTypes.Validator<(...args: any[]) => any>;
|
|
47
|
+
export const customComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
28
48
|
}
|
|
29
49
|
}
|
|
30
50
|
import { ComponentLink } from "../component-link";
|
|
51
|
+
import PropTypes from "prop-types";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export function BundleAssets(props: any):
|
|
1
|
+
export function BundleAssets(props: any): JSX.Element;
|
|
2
2
|
export namespace BundleAssets {
|
|
3
3
|
namespace propTypes {
|
|
4
|
-
const jobs:
|
|
5
|
-
const filters:
|
|
6
|
-
const search:
|
|
7
|
-
const sortBy:
|
|
8
|
-
const direction:
|
|
9
|
-
const setState: any
|
|
4
|
+
const jobs: PropTypes.Validator<(object | null | undefined)[]>;
|
|
5
|
+
const filters: PropTypes.Requireable<object>;
|
|
6
|
+
const search: PropTypes.Requireable<string>;
|
|
7
|
+
const sortBy: PropTypes.Requireable<string>;
|
|
8
|
+
const direction: PropTypes.Requireable<string>;
|
|
9
|
+
const setState: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
10
|
}
|
|
11
11
|
namespace defaultProps {
|
|
12
12
|
const filters_1: undefined;
|
|
@@ -19,3 +19,4 @@ export namespace BundleAssets {
|
|
|
19
19
|
export { direction_1 as direction };
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
import PropTypes from "prop-types";
|
package/types/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.d.ts
CHANGED
|
@@ -2,17 +2,20 @@ export function BundleAssetsTotalsChartBars({ className, jobs, customComponentLi
|
|
|
2
2
|
className: any;
|
|
3
3
|
jobs: any;
|
|
4
4
|
customComponentLink: any;
|
|
5
|
-
}):
|
|
5
|
+
}): JSX.Element;
|
|
6
6
|
export namespace BundleAssetsTotalsChartBars {
|
|
7
7
|
namespace defaultProps {
|
|
8
8
|
export const className: string;
|
|
9
9
|
export { ComponentLink as customComponentLink };
|
|
10
10
|
}
|
|
11
11
|
namespace propTypes {
|
|
12
|
-
const className_1:
|
|
12
|
+
const className_1: PropTypes.Requireable<string>;
|
|
13
13
|
export { className_1 as className };
|
|
14
|
-
export const jobs:
|
|
15
|
-
|
|
14
|
+
export const jobs: PropTypes.Validator<(PropTypes.InferProps<{
|
|
15
|
+
internalBuildNumber: PropTypes.Requireable<number>;
|
|
16
|
+
}> | null | undefined)[]>;
|
|
17
|
+
export const customComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
import { ComponentLink } from "../component-link";
|
|
21
|
+
import PropTypes from "prop-types";
|
|
@@ -3,7 +3,7 @@ export function BundleAssetsTotalsTable({ className, jobs, customComponentLink:
|
|
|
3
3
|
className: any;
|
|
4
4
|
jobs: any;
|
|
5
5
|
customComponentLink: any;
|
|
6
|
-
}):
|
|
6
|
+
}): JSX.Element;
|
|
7
7
|
export namespace BundleAssetsTotalsTable {
|
|
8
8
|
namespace defaultProps {
|
|
9
9
|
export const className: string;
|
|
@@ -11,11 +11,12 @@ export namespace BundleAssetsTotalsTable {
|
|
|
11
11
|
export { ComponentLink as customComponentLink };
|
|
12
12
|
}
|
|
13
13
|
namespace propTypes {
|
|
14
|
-
const className_1:
|
|
14
|
+
const className_1: PropTypes.Requireable<string>;
|
|
15
15
|
export { className_1 as className };
|
|
16
|
-
const jobs_1: any
|
|
16
|
+
const jobs_1: PropTypes.Requireable<any[]>;
|
|
17
17
|
export { jobs_1 as jobs };
|
|
18
|
-
export const customComponentLink:
|
|
18
|
+
export const customComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
import { ComponentLink } from "../component-link";
|
|
22
|
+
import PropTypes from "prop-types";
|
|
@@ -15,7 +15,7 @@ export function BundleModules({ className, jobs, items, chunks, totalRowCount, u
|
|
|
15
15
|
updateSearch: any;
|
|
16
16
|
hasActiveFilters: any;
|
|
17
17
|
customComponentLink: any;
|
|
18
|
-
}):
|
|
18
|
+
}): JSX.Element;
|
|
19
19
|
export namespace BundleModules {
|
|
20
20
|
namespace defaultProps {
|
|
21
21
|
export const className: string;
|
|
@@ -26,27 +26,36 @@ export namespace BundleModules {
|
|
|
26
26
|
export { ComponentLink as customComponentLink };
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
|
-
const className_1:
|
|
29
|
+
const className_1: PropTypes.Requireable<string>;
|
|
30
30
|
export { className_1 as className };
|
|
31
|
-
const items_1: any
|
|
31
|
+
const items_1: PropTypes.Requireable<any[]>;
|
|
32
32
|
export { items_1 as items };
|
|
33
|
-
const jobs_1: any
|
|
33
|
+
const jobs_1: PropTypes.Requireable<any[]>;
|
|
34
34
|
export { jobs_1 as jobs };
|
|
35
|
-
export const chunks:
|
|
36
|
-
|
|
35
|
+
export const chunks: PropTypes.Validator<(PropTypes.InferProps<{
|
|
36
|
+
id: PropTypes.Requireable<string>;
|
|
37
|
+
name: PropTypes.Requireable<string>;
|
|
38
|
+
}> | null | undefined)[]>;
|
|
39
|
+
const totalRowCount_1: PropTypes.Requireable<number>;
|
|
37
40
|
export { totalRowCount_1 as totalRowCount };
|
|
38
|
-
export const updateFilters: any
|
|
39
|
-
export const resetFilters: any
|
|
40
|
-
export const resetAllFilters: any
|
|
41
|
-
export const filters:
|
|
42
|
-
|
|
41
|
+
export const updateFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
42
|
+
export const resetFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
43
|
+
export const resetAllFilters: PropTypes.Validator<(...args: any[]) => any>;
|
|
44
|
+
export const filters: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
45
|
+
changed: PropTypes.Requireable<boolean>;
|
|
46
|
+
}>>>;
|
|
47
|
+
const hasActiveFilters_1: PropTypes.Requireable<boolean>;
|
|
43
48
|
export { hasActiveFilters_1 as hasActiveFilters };
|
|
44
|
-
export const sortFields:
|
|
45
|
-
export const sort:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export const
|
|
49
|
+
export const sortFields: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
50
|
+
export const sort: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
51
|
+
sortBy: PropTypes.Requireable<string>;
|
|
52
|
+
direction: PropTypes.Requireable<string>;
|
|
53
|
+
}>>>;
|
|
54
|
+
export const updateSort: PropTypes.Validator<(...args: any[]) => any>;
|
|
55
|
+
export const search: PropTypes.Validator<string>;
|
|
56
|
+
export const updateSearch: PropTypes.Validator<(...args: any[]) => any>;
|
|
57
|
+
export const customComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
import { ComponentLink } from "../component-link";
|
|
61
|
+
import PropTypes from "prop-types";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export function BundleModules(props: any):
|
|
1
|
+
export function BundleModules(props: any): JSX.Element;
|
|
2
2
|
export namespace BundleModules {
|
|
3
3
|
namespace propTypes {
|
|
4
|
-
const jobs:
|
|
5
|
-
const filters:
|
|
6
|
-
const search:
|
|
7
|
-
const sortBy:
|
|
8
|
-
const direction:
|
|
9
|
-
const setState: any
|
|
4
|
+
const jobs: PropTypes.Validator<(object | null | undefined)[]>;
|
|
5
|
+
const filters: PropTypes.Requireable<object>;
|
|
6
|
+
const search: PropTypes.Requireable<string>;
|
|
7
|
+
const sortBy: PropTypes.Requireable<string>;
|
|
8
|
+
const direction: PropTypes.Requireable<string>;
|
|
9
|
+
const setState: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
10
|
}
|
|
11
11
|
namespace defaultProps {
|
|
12
12
|
const filters_1: undefined;
|
|
@@ -19,3 +19,4 @@ export namespace BundleModules {
|
|
|
19
19
|
export { direction_1 as direction };
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
import PropTypes from "prop-types";
|