chrome-devtools-frontend 1.0.946920 → 1.0.947377
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/.eslintrc.js +1 -0
- package/config/gni/all_devtools_files.gni +0 -7
- package/config/gni/devtools_grd_files.gni +1 -3
- package/front_end/.eslintrc.js +5 -1
- package/front_end/core/host/InspectorFrontendHost.ts +0 -3
- package/front_end/core/root/Runtime.ts +0 -4
- package/front_end/core/sdk/AccessibilityModel.ts +0 -2
- package/front_end/core/sdk/CSSProperty.ts +0 -2
- package/front_end/core/sdk/CSSRule.ts +0 -2
- package/front_end/core/sdk/Cookie.ts +1 -5
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/Resource.ts +0 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
- package/front_end/entrypoints/devtools_app/devtools_app.json +0 -1
- package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
- package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +5 -2
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +12 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
- package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -2
- package/front_end/models/issues_manager/CorsIssue.ts +8 -0
- package/front_end/panels/animation/AnimationTimeline.ts +0 -2
- package/front_end/panels/animation/AnimationUI.ts +0 -2
- package/front_end/panels/application/BackForwardCacheStrings.ts +1 -0
- package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
- package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
- package/front_end/panels/search/SearchView.ts +24 -4
- package/front_end/panels/sources/CSSPlugin.ts +3 -0
- package/front_end/panels/sources/CoveragePlugin.ts +2 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +28 -4
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
- package/front_end/panels/sources/ProfilePlugin.ts +3 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/third_party/codemirror.next/package.json +1 -0
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
- package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
- package/front_end/third_party/lighthouse/locales/ar.json +0 -3
- package/front_end/third_party/lighthouse/locales/bg.json +17 -20
- package/front_end/third_party/lighthouse/locales/ca.json +0 -3
- package/front_end/third_party/lighthouse/locales/cs.json +0 -3
- package/front_end/third_party/lighthouse/locales/da.json +16 -19
- package/front_end/third_party/lighthouse/locales/de.json +0 -3
- package/front_end/third_party/lighthouse/locales/el.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
- package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
- package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
- package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
- package/front_end/third_party/lighthouse/locales/es.json +0 -3
- package/front_end/third_party/lighthouse/locales/fi.json +16 -19
- package/front_end/third_party/lighthouse/locales/fil.json +33 -36
- package/front_end/third_party/lighthouse/locales/fr.json +16 -19
- package/front_end/third_party/lighthouse/locales/he.json +16 -19
- package/front_end/third_party/lighthouse/locales/hi.json +0 -3
- package/front_end/third_party/lighthouse/locales/hr.json +16 -19
- package/front_end/third_party/lighthouse/locales/hu.json +16 -19
- package/front_end/third_party/lighthouse/locales/id.json +16 -19
- package/front_end/third_party/lighthouse/locales/it.json +37 -40
- package/front_end/third_party/lighthouse/locales/ja.json +16 -19
- package/front_end/third_party/lighthouse/locales/ko.json +16 -19
- package/front_end/third_party/lighthouse/locales/lt.json +17 -20
- package/front_end/third_party/lighthouse/locales/lv.json +0 -3
- package/front_end/third_party/lighthouse/locales/nl.json +16 -19
- package/front_end/third_party/lighthouse/locales/no.json +17 -20
- package/front_end/third_party/lighthouse/locales/pl.json +16 -19
- package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
- package/front_end/third_party/lighthouse/locales/pt.json +16 -19
- package/front_end/third_party/lighthouse/locales/ro.json +0 -3
- package/front_end/third_party/lighthouse/locales/ru.json +16 -19
- package/front_end/third_party/lighthouse/locales/sk.json +0 -3
- package/front_end/third_party/lighthouse/locales/sl.json +0 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
- package/front_end/third_party/lighthouse/locales/sr.json +16 -19
- package/front_end/third_party/lighthouse/locales/sv.json +17 -20
- package/front_end/third_party/lighthouse/locales/ta.json +0 -3
- package/front_end/third_party/lighthouse/locales/te.json +0 -3
- package/front_end/third_party/lighthouse/locales/th.json +0 -3
- package/front_end/third_party/lighthouse/locales/tr.json +0 -3
- package/front_end/third_party/lighthouse/locales/uk.json +17 -20
- package/front_end/third_party/lighthouse/locales/vi.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh.json +0 -3
- package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
- package/front_end/third_party/lighthouse/report/bundle.js +36 -7
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
- package/front_end/ui/components/text_editor/config.ts +5 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -32
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/package.json +1 -1
- package/scripts/check_gn.js +1 -1
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
- package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
- package/front_end/entrypoints/inspector/inspector.json +0 -4
- package/front_end/entrypoints/worker_app/worker_app.json +0 -3
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
- package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
|
@@ -3,7 +3,7 @@ export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron'
|
|
|
3
3
|
export type I18n<T> = any;
|
|
4
4
|
export type DetailsRenderer = any;
|
|
5
5
|
export type CRCSegment = {
|
|
6
|
-
node:
|
|
6
|
+
node: LH.Audit.Details.SimpleCriticalRequestNode;
|
|
7
7
|
isLastChild: boolean;
|
|
8
8
|
hasChildren: boolean;
|
|
9
9
|
startTime: number;
|
|
@@ -53,7 +53,7 @@ export class DOM {
|
|
|
53
53
|
* @param {string=} className
|
|
54
54
|
* @return {HTMLElementByTagName[T]}
|
|
55
55
|
*/
|
|
56
|
-
createElement<T extends string>(name: T, className?: string | undefined):
|
|
56
|
+
createElement<T extends string>(name: T, className?: string | undefined): HTMLElementByTagName;
|
|
57
57
|
/**
|
|
58
58
|
* @param {string} namespaceURI
|
|
59
59
|
* @param {string} name
|
|
@@ -77,7 +77,7 @@ export class DOM {
|
|
|
77
77
|
* @param {string=} className
|
|
78
78
|
* @return {HTMLElementByTagName[T]}
|
|
79
79
|
*/
|
|
80
|
-
createChildOf<T_1 extends string>(parentElem: Element, elementName: T_1, className?: string | undefined):
|
|
80
|
+
createChildOf<T_1 extends string>(parentElem: Element, elementName: T_1, className?: string | undefined): HTMLElementByTagName;
|
|
81
81
|
/**
|
|
82
82
|
* @param {import('./components.js').ComponentName} componentName
|
|
83
83
|
* @return {!DocumentFragment} A clone of the cached component.
|
|
@@ -131,14 +131,14 @@ export class DOM {
|
|
|
131
131
|
* @param {ParentNode} context
|
|
132
132
|
* @return {ParseSelector<T>}
|
|
133
133
|
*/
|
|
134
|
-
find<T_2 extends string>(query: T_2, context: ParentNode):
|
|
134
|
+
find<T_2 extends string>(query: T_2, context: ParentNode): ParseSelector<T_3>;
|
|
135
135
|
/**
|
|
136
136
|
* Helper for context.querySelectorAll. Returns an Array instead of a NodeList.
|
|
137
137
|
* @template {string} T
|
|
138
138
|
* @param {T} query
|
|
139
139
|
* @param {ParentNode} context
|
|
140
140
|
*/
|
|
141
|
-
findAll<
|
|
141
|
+
findAll<T_4 extends string>(query: T_4, context: ParentNode): Element[];
|
|
142
142
|
/**
|
|
143
143
|
* Fires a custom DOM event on target.
|
|
144
144
|
* @param {string} name Name of the event.
|
|
@@ -180,19 +180,19 @@ export class ReportRenderer {
|
|
|
180
180
|
/** @type {DOM} */
|
|
181
181
|
_dom: DOM;
|
|
182
182
|
/** @type {LH.Renderer.Options} */
|
|
183
|
-
_opts:
|
|
183
|
+
_opts: LH.Renderer.Options;
|
|
184
184
|
/**
|
|
185
185
|
* @param {LH.Result} lhr
|
|
186
186
|
* @param {HTMLElement?} rootEl Report root element containing the report
|
|
187
187
|
* @param {LH.Renderer.Options=} opts
|
|
188
188
|
* @return {!Element}
|
|
189
189
|
*/
|
|
190
|
-
renderReport(lhr:
|
|
190
|
+
renderReport(lhr: LH.Result, rootEl: HTMLElement | null, opts?: LH.Renderer.Options): Element;
|
|
191
191
|
/**
|
|
192
192
|
* @param {LH.ReportResult} report
|
|
193
193
|
* @return {DocumentFragment}
|
|
194
194
|
*/
|
|
195
|
-
_renderReportTopbar(report:
|
|
195
|
+
_renderReportTopbar(report: LH.ReportResult): DocumentFragment;
|
|
196
196
|
/**
|
|
197
197
|
* @return {DocumentFragment}
|
|
198
198
|
*/
|
|
@@ -201,42 +201,42 @@ export class ReportRenderer {
|
|
|
201
201
|
* @param {LH.ReportResult} report
|
|
202
202
|
* @return {DocumentFragment}
|
|
203
203
|
*/
|
|
204
|
-
_renderReportFooter(report:
|
|
204
|
+
_renderReportFooter(report: LH.ReportResult): DocumentFragment;
|
|
205
205
|
/**
|
|
206
206
|
* @param {LH.ReportResult} report
|
|
207
207
|
* @param {DocumentFragment} footer
|
|
208
208
|
*/
|
|
209
|
-
_renderMetaBlock(report:
|
|
209
|
+
_renderMetaBlock(report: LH.ReportResult, footer: DocumentFragment): void;
|
|
210
210
|
/**
|
|
211
211
|
* Returns a div with a list of top-level warnings, or an empty div if no warnings.
|
|
212
212
|
* @param {LH.ReportResult} report
|
|
213
213
|
* @return {Node}
|
|
214
214
|
*/
|
|
215
|
-
_renderReportWarnings(report:
|
|
215
|
+
_renderReportWarnings(report: LH.ReportResult): Node;
|
|
216
216
|
/**
|
|
217
217
|
* @param {LH.ReportResult} report
|
|
218
218
|
* @param {CategoryRenderer} categoryRenderer
|
|
219
219
|
* @param {Record<string, CategoryRenderer>} specificCategoryRenderers
|
|
220
220
|
* @return {!DocumentFragment[]}
|
|
221
221
|
*/
|
|
222
|
-
_renderScoreGauges(report:
|
|
222
|
+
_renderScoreGauges(report: LH.ReportResult, categoryRenderer: CategoryRenderer, specificCategoryRenderers: Record<string, CategoryRenderer>): DocumentFragment[];
|
|
223
223
|
/**
|
|
224
224
|
* @param {LH.ReportResult} report
|
|
225
225
|
* @return {!DocumentFragment}
|
|
226
226
|
*/
|
|
227
|
-
_renderReport(report:
|
|
227
|
+
_renderReport(report: LH.ReportResult): DocumentFragment;
|
|
228
228
|
}
|
|
229
229
|
export class ReportUIFeatures {
|
|
230
230
|
/**
|
|
231
231
|
* @param {DOM} dom
|
|
232
232
|
* @param {LH.Renderer.Options} opts
|
|
233
233
|
*/
|
|
234
|
-
constructor(dom: DOM, opts?:
|
|
234
|
+
constructor(dom: DOM, opts?: LH.Renderer.Options);
|
|
235
235
|
/** @type {LH.Result} */
|
|
236
|
-
json:
|
|
236
|
+
json: LH.Result;
|
|
237
237
|
/** @type {DOM} */
|
|
238
238
|
_dom: DOM;
|
|
239
|
-
_opts:
|
|
239
|
+
_opts: LH.Renderer.Options;
|
|
240
240
|
_topbar: TopbarFeatures;
|
|
241
241
|
/**
|
|
242
242
|
* Handle media query change events.
|
|
@@ -248,7 +248,7 @@ export class ReportUIFeatures {
|
|
|
248
248
|
* should be called whenever the report needs to be re-rendered.
|
|
249
249
|
* @param {LH.Result} lhr
|
|
250
250
|
*/
|
|
251
|
-
initFeatures(lhr:
|
|
251
|
+
initFeatures(lhr: LH.Result): void;
|
|
252
252
|
/**
|
|
253
253
|
* @param {{text: string, icon?: string, onClick: () => void}} opts
|
|
254
254
|
*/
|
|
@@ -256,7 +256,7 @@ export class ReportUIFeatures {
|
|
|
256
256
|
text: string;
|
|
257
257
|
icon?: string;
|
|
258
258
|
onClick: () => void;
|
|
259
|
-
}):
|
|
259
|
+
}): HTMLElementByTagName;
|
|
260
260
|
/**
|
|
261
261
|
* Returns the html that recreates this report.
|
|
262
262
|
* @return {string}
|
|
@@ -305,7 +305,7 @@ export class ReportUIFeatures {
|
|
|
305
305
|
* @param {LH.Renderer.Options} opts
|
|
306
306
|
* @return {HTMLElement}
|
|
307
307
|
*/
|
|
308
|
-
export function renderReport(lhr:
|
|
308
|
+
export function renderReport(lhr: LH.Result, opts?: LH.Renderer.Options): HTMLElement;
|
|
309
309
|
type LineContentType = number;
|
|
310
310
|
declare namespace LineContentType {
|
|
311
311
|
const CONTENT_NORMAL: number;
|
|
@@ -358,21 +358,21 @@ declare class CategoryRenderer {
|
|
|
358
358
|
* @param {LH.ReportResult.AuditRef} audit
|
|
359
359
|
* @return {Element}
|
|
360
360
|
*/
|
|
361
|
-
renderAudit(audit:
|
|
361
|
+
renderAudit(audit: LH.ReportResult.AuditRef): Element;
|
|
362
362
|
/**
|
|
363
363
|
* Populate an DOM tree with audit details. Used by renderAudit and renderOpportunity
|
|
364
364
|
* @param {LH.ReportResult.AuditRef} audit
|
|
365
365
|
* @param {DocumentFragment} component
|
|
366
366
|
* @return {!Element}
|
|
367
367
|
*/
|
|
368
|
-
populateAuditValues(audit:
|
|
368
|
+
populateAuditValues(audit: LH.ReportResult.AuditRef, component: DocumentFragment): Element;
|
|
369
369
|
/**
|
|
370
370
|
* Inject the final screenshot next to the score gauge of the first category (likely Performance)
|
|
371
371
|
* @param {HTMLElement} categoriesEl
|
|
372
372
|
* @param {LH.ReportResult['audits']} audits
|
|
373
373
|
* @param {Element} scoreScaleEl
|
|
374
374
|
*/
|
|
375
|
-
injectFinalScreenshot(categoriesEl: HTMLElement, audits:
|
|
375
|
+
injectFinalScreenshot(categoriesEl: HTMLElement, audits: LH.ReportResult, scoreScaleEl: Element): any;
|
|
376
376
|
/**
|
|
377
377
|
* @return {Element}
|
|
378
378
|
*/
|
|
@@ -390,8 +390,8 @@ declare class CategoryRenderer {
|
|
|
390
390
|
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
391
391
|
* @return {DocumentFragment}
|
|
392
392
|
*/
|
|
393
|
-
renderCategoryHeader(category:
|
|
394
|
-
gatherMode:
|
|
393
|
+
renderCategoryHeader(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
|
|
394
|
+
gatherMode: LH.Result.GatherMode;
|
|
395
395
|
} | undefined): DocumentFragment;
|
|
396
396
|
/**
|
|
397
397
|
* Renders the group container for a group of audits. Individual audit elements can be added
|
|
@@ -399,7 +399,7 @@ declare class CategoryRenderer {
|
|
|
399
399
|
* @param {LH.Result.ReportGroup} group
|
|
400
400
|
* @return {[Element, Element | null]}
|
|
401
401
|
*/
|
|
402
|
-
renderAuditGroup(group:
|
|
402
|
+
renderAuditGroup(group: LH.Result.ReportGroup): [Element, Element | null];
|
|
403
403
|
/**
|
|
404
404
|
* Takes an array of auditRefs, groups them if requested, then returns an
|
|
405
405
|
* array of audit and audit-group elements.
|
|
@@ -407,8 +407,8 @@ declare class CategoryRenderer {
|
|
|
407
407
|
* @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
|
|
408
408
|
* @return {Array<Element>}
|
|
409
409
|
*/
|
|
410
|
-
_renderGroupedAudits(auditRefs: Array<
|
|
411
|
-
[x: string]:
|
|
410
|
+
_renderGroupedAudits(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
411
|
+
[x: string]: LH.Result.ReportGroup;
|
|
412
412
|
}): Array<Element>;
|
|
413
413
|
/**
|
|
414
414
|
* Take a set of audits, group them if they have groups, then render in a top-level
|
|
@@ -417,8 +417,8 @@ declare class CategoryRenderer {
|
|
|
417
417
|
* @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
|
|
418
418
|
* @return {Element}
|
|
419
419
|
*/
|
|
420
|
-
renderUnexpandableClump(auditRefs: Array<
|
|
421
|
-
[x: string]:
|
|
420
|
+
renderUnexpandableClump(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
421
|
+
[x: string]: LH.Result.ReportGroup;
|
|
422
422
|
}): Element;
|
|
423
423
|
/**
|
|
424
424
|
* Take a set of audits and render in a top-level, expandable clump that starts
|
|
@@ -427,36 +427,38 @@ declare class CategoryRenderer {
|
|
|
427
427
|
* @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string}} clumpOpts
|
|
428
428
|
* @return {!Element}
|
|
429
429
|
*/
|
|
430
|
-
renderClump(clumpId: Exclude<
|
|
431
|
-
auditRefs: Array<
|
|
430
|
+
renderClump(clumpId: Exclude<TopLevelClumpId, 'failed'>, { auditRefs, description }: {
|
|
431
|
+
auditRefs: Array<LH.ReportResult.AuditRef>;
|
|
432
432
|
description?: string;
|
|
433
433
|
}): Element;
|
|
434
434
|
/**
|
|
435
435
|
* @param {LH.ReportResult.Category} category
|
|
436
436
|
* @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
|
|
437
|
-
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
437
|
+
* @param {{gatherMode: LH.Result.GatherMode, omitLabel?: boolean, onPageAnchorRendered?: (link: HTMLAnchorElement) => void}=} options
|
|
438
438
|
* @return {DocumentFragment}
|
|
439
439
|
*/
|
|
440
|
-
renderCategoryScore(category:
|
|
441
|
-
gatherMode:
|
|
442
|
-
|
|
440
|
+
renderCategoryScore(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
|
|
441
|
+
gatherMode: LH.Result.GatherMode;
|
|
442
|
+
omitLabel?: boolean;
|
|
443
|
+
onPageAnchorRendered?: (link: HTMLAnchorElement) => void;
|
|
444
|
+
}): DocumentFragment;
|
|
443
445
|
/**
|
|
444
446
|
* @param {LH.ReportResult.Category} category
|
|
445
447
|
* @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
|
|
446
448
|
* @return {DocumentFragment}
|
|
447
449
|
*/
|
|
448
|
-
renderScoreGauge(category:
|
|
450
|
+
renderScoreGauge(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>): DocumentFragment;
|
|
449
451
|
/**
|
|
450
452
|
* @param {LH.ReportResult.Category} category
|
|
451
453
|
* @return {DocumentFragment}
|
|
452
454
|
*/
|
|
453
|
-
renderCategoryFraction(category:
|
|
455
|
+
renderCategoryFraction(category: LH.ReportResult.Category): DocumentFragment;
|
|
454
456
|
/**
|
|
455
457
|
* Returns true if an LH category has any non-"notApplicable" audits.
|
|
456
458
|
* @param {LH.ReportResult.Category} category
|
|
457
459
|
* @return {boolean}
|
|
458
460
|
*/
|
|
459
|
-
hasApplicableAudits(category:
|
|
461
|
+
hasApplicableAudits(category: LH.ReportResult.Category): boolean;
|
|
460
462
|
/**
|
|
461
463
|
* Define the score arc of the gauge
|
|
462
464
|
* Credit to xgad for the original technique: https://codepen.io/xgad/post/svg-radial-progress-meters
|
|
@@ -468,13 +470,13 @@ declare class CategoryRenderer {
|
|
|
468
470
|
* @param {LH.ReportResult.AuditRef} audit
|
|
469
471
|
* @return {boolean}
|
|
470
472
|
*/
|
|
471
|
-
_auditHasWarning(audit:
|
|
473
|
+
_auditHasWarning(audit: LH.ReportResult.AuditRef): boolean;
|
|
472
474
|
/**
|
|
473
475
|
* Returns the id of the top-level clump to put this audit in.
|
|
474
476
|
* @param {LH.ReportResult.AuditRef} auditRef
|
|
475
477
|
* @return {TopLevelClumpId}
|
|
476
478
|
*/
|
|
477
|
-
_getClumpIdForAuditRef(auditRef:
|
|
479
|
+
_getClumpIdForAuditRef(auditRef: LH.ReportResult.AuditRef): TopLevelClumpId;
|
|
478
480
|
/**
|
|
479
481
|
* Renders a set of top level sections (clumps), under a status of failed, warning,
|
|
480
482
|
* manual, passed, or notApplicable. The result ends up something like:
|
|
@@ -498,10 +500,10 @@ declare class CategoryRenderer {
|
|
|
498
500
|
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
499
501
|
* @return {Element}
|
|
500
502
|
*/
|
|
501
|
-
render(category:
|
|
502
|
-
[x: string]:
|
|
503
|
+
render(category: LH.ReportResult.Category, groupDefinitions?: {
|
|
504
|
+
[x: string]: LH.Result.ReportGroup;
|
|
503
505
|
} | undefined, options?: {
|
|
504
|
-
gatherMode:
|
|
506
|
+
gatherMode: LH.Result.GatherMode;
|
|
505
507
|
} | undefined): Element;
|
|
506
508
|
}
|
|
507
509
|
/**
|
|
@@ -516,7 +518,7 @@ declare class TopbarFeatures {
|
|
|
516
518
|
*/
|
|
517
519
|
constructor(reportUIFeatures: ReportUIFeatures, dom: DOM);
|
|
518
520
|
/** @type {LH.Result} */
|
|
519
|
-
lhr:
|
|
521
|
+
lhr: LH.Result;
|
|
520
522
|
_reportUIFeatures: ReportUIFeatures;
|
|
521
523
|
_dom: DOM;
|
|
522
524
|
_dropDownMenu: DropDownMenu;
|
|
@@ -552,7 +554,7 @@ declare class TopbarFeatures {
|
|
|
552
554
|
/**
|
|
553
555
|
* @param {LH.Result} lhr
|
|
554
556
|
*/
|
|
555
|
-
enable(lhr:
|
|
557
|
+
enable(lhr: LH.Result): void;
|
|
556
558
|
/**
|
|
557
559
|
* Copies the report JSON to the clipboard (if supported by the browser).
|
|
558
560
|
*/
|
|
@@ -593,15 +595,15 @@ declare class DetailsRenderer {
|
|
|
593
595
|
* @param {{fullPageScreenshot?: LH.Audit.Details.FullPageScreenshot}} [options]
|
|
594
596
|
*/
|
|
595
597
|
constructor(dom: DOM, options?: {
|
|
596
|
-
fullPageScreenshot?:
|
|
598
|
+
fullPageScreenshot?: LH.Audit.Details.FullPageScreenshot;
|
|
597
599
|
});
|
|
598
600
|
_dom: DOM;
|
|
599
|
-
_fullPageScreenshot:
|
|
601
|
+
_fullPageScreenshot: LH.Audit.Details.FullPageScreenshot;
|
|
600
602
|
/**
|
|
601
603
|
* @param {AuditDetails} details
|
|
602
604
|
* @return {Element|null}
|
|
603
605
|
*/
|
|
604
|
-
render(details:
|
|
606
|
+
render(details: AuditDetails): Element | null;
|
|
605
607
|
/**
|
|
606
608
|
* @param {{value: number, granularity?: number}} details
|
|
607
609
|
* @return {Element}
|
|
@@ -655,7 +657,7 @@ declare class DetailsRenderer {
|
|
|
655
657
|
* @param {string} type
|
|
656
658
|
* @param {*} value
|
|
657
659
|
*/
|
|
658
|
-
_renderUnknown(type: string, value: any):
|
|
660
|
+
_renderUnknown(type: string, value: any): HTMLElementByTagName;
|
|
659
661
|
/**
|
|
660
662
|
* Render a details item value for embedding in a table. Renders the value
|
|
661
663
|
* based on the heading's valueType, unless the value itself has a `type`
|
|
@@ -664,7 +666,7 @@ declare class DetailsRenderer {
|
|
|
664
666
|
* @param {LH.Audit.Details.OpportunityColumnHeading} heading
|
|
665
667
|
* @return {Element|null}
|
|
666
668
|
*/
|
|
667
|
-
_renderTableValue(value:
|
|
669
|
+
_renderTableValue(value: TableItemValue, heading: LH.Audit.Details.OpportunityColumnHeading): Element | null;
|
|
668
670
|
/**
|
|
669
671
|
* Get the headings of a table-like details object, converted into the
|
|
670
672
|
* OpportunityColumnHeading type until we have all details use the same
|
|
@@ -672,7 +674,7 @@ declare class DetailsRenderer {
|
|
|
672
674
|
* @param {Table|OpportunityTable} tableLike
|
|
673
675
|
* @return {OpportunityTable['headings']}
|
|
674
676
|
*/
|
|
675
|
-
_getCanonicalizedHeadingsFromTable(tableLike:
|
|
677
|
+
_getCanonicalizedHeadingsFromTable(tableLike: Table | OpportunityTable): OpportunityTable;
|
|
676
678
|
/**
|
|
677
679
|
* Get the headings of a table-like details object, converted into the
|
|
678
680
|
* OpportunityColumnHeading type until we have all details use the same
|
|
@@ -680,13 +682,13 @@ declare class DetailsRenderer {
|
|
|
680
682
|
* @param {Table['headings'][number]} heading
|
|
681
683
|
* @return {OpportunityTable['headings'][number]}
|
|
682
684
|
*/
|
|
683
|
-
_getCanonicalizedHeading(heading:
|
|
685
|
+
_getCanonicalizedHeading(heading: Table): OpportunityTable;
|
|
684
686
|
/**
|
|
685
687
|
* @param {Exclude<LH.Audit.Details.TableColumnHeading['subItemsHeading'], undefined>} subItemsHeading
|
|
686
688
|
* @param {LH.Audit.Details.TableColumnHeading} parentHeading
|
|
687
689
|
* @return {LH.Audit.Details.OpportunityColumnHeading['subItemsHeading']}
|
|
688
690
|
*/
|
|
689
|
-
_getCanonicalizedsubItemsHeading(subItemsHeading: Exclude<
|
|
691
|
+
_getCanonicalizedsubItemsHeading(subItemsHeading: Exclude<LH.Audit.Details.TableColumnHeading['subItemsHeading'], undefined>, parentHeading: LH.Audit.Details.TableColumnHeading): LH.Audit.Details.OpportunityColumnHeading;
|
|
690
692
|
/**
|
|
691
693
|
* Returns a new heading where the values are defined first by `heading.subItemsHeading`,
|
|
692
694
|
* and secondly by `heading`. If there is no subItemsHeading, returns null, which will
|
|
@@ -694,45 +696,45 @@ declare class DetailsRenderer {
|
|
|
694
696
|
* @param {LH.Audit.Details.OpportunityColumnHeading} heading
|
|
695
697
|
* @return {LH.Audit.Details.OpportunityColumnHeading | null}
|
|
696
698
|
*/
|
|
697
|
-
_getDerivedsubItemsHeading(heading:
|
|
699
|
+
_getDerivedsubItemsHeading(heading: LH.Audit.Details.OpportunityColumnHeading): LH.Audit.Details.OpportunityColumnHeading | null;
|
|
698
700
|
/**
|
|
699
701
|
* @param {TableItem} item
|
|
700
702
|
* @param {(LH.Audit.Details.OpportunityColumnHeading | null)[]} headings
|
|
701
703
|
*/
|
|
702
|
-
_renderTableRow(item:
|
|
704
|
+
_renderTableRow(item: TableItem, headings: (LH.Audit.Details.OpportunityColumnHeading | null)[]): HTMLElementByTagName;
|
|
703
705
|
/**
|
|
704
706
|
* Renders one or more rows from a details table item. A single table item can
|
|
705
707
|
* expand into multiple rows, if there is a subItemsHeading.
|
|
706
708
|
* @param {TableItem} item
|
|
707
709
|
* @param {LH.Audit.Details.OpportunityColumnHeading[]} headings
|
|
708
710
|
*/
|
|
709
|
-
_renderTableRowsFromItem(item:
|
|
711
|
+
_renderTableRowsFromItem(item: TableItem, headings: LH.Audit.Details.OpportunityColumnHeading[]): DocumentFragment;
|
|
710
712
|
/**
|
|
711
713
|
* @param {OpportunityTable|Table} details
|
|
712
714
|
* @return {Element}
|
|
713
715
|
*/
|
|
714
|
-
_renderTable(details:
|
|
716
|
+
_renderTable(details: OpportunityTable | Table): Element;
|
|
715
717
|
/**
|
|
716
718
|
* @param {LH.Audit.Details.List} details
|
|
717
719
|
* @return {Element}
|
|
718
720
|
*/
|
|
719
|
-
_renderList(details:
|
|
721
|
+
_renderList(details: LH.Audit.Details.List): Element;
|
|
720
722
|
/**
|
|
721
723
|
* @param {LH.Audit.Details.NodeValue} item
|
|
722
724
|
* @return {Element}
|
|
723
725
|
*/
|
|
724
|
-
renderNode(item:
|
|
726
|
+
renderNode(item: LH.Audit.Details.NodeValue): Element;
|
|
725
727
|
/**
|
|
726
728
|
* @param {LH.Audit.Details.SourceLocationValue} item
|
|
727
729
|
* @return {Element|null}
|
|
728
730
|
* @protected
|
|
729
731
|
*/
|
|
730
|
-
protected renderSourceLocation(item:
|
|
732
|
+
protected renderSourceLocation(item: LH.Audit.Details.SourceLocationValue): Element | null;
|
|
731
733
|
/**
|
|
732
734
|
* @param {LH.Audit.Details.Filmstrip} details
|
|
733
735
|
* @return {Element}
|
|
734
736
|
*/
|
|
735
|
-
_renderFilmstrip(details:
|
|
737
|
+
_renderFilmstrip(details: LH.Audit.Details.Filmstrip): Element;
|
|
736
738
|
/**
|
|
737
739
|
* @param {string} text
|
|
738
740
|
* @return {Element}
|