@pb33f/cowboy-components 0.0.13 → 0.1.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/dist/abap-DXvTa7XC.js +1404 -0
- package/dist/apex-DsQH3mjJ.js +332 -0
- package/dist/assets/css.worker-B_qZXUzt.js +84 -0
- package/dist/assets/editor.worker-HEmB0D7P.js +11 -0
- package/dist/assets/html.worker-D3WUrk8Q.js +458 -0
- package/dist/assets/json.worker-CAhUaBo4.js +42 -0
- package/dist/assets/rule-documentation.worker-BFIxMBU8.js +1 -0
- package/dist/assets/search-problems.worker-VJi4P9Gj.js +1 -0
- package/dist/azcli-Cir32SBk.js +74 -0
- package/dist/bat-BsNExolo.js +106 -0
- package/dist/bicep-2KcKzeQF.js +108 -0
- package/dist/cameligo-D0ezznwE.js +180 -0
- package/dist/clojure-DxYzAIlu.js +767 -0
- package/dist/coffee-DgiPTF3g.js +238 -0
- package/dist/components/changelog/release.css.js +3 -3
- package/dist/components/editor/editor.d.ts +27 -0
- package/dist/components/editor/editor.js +192 -0
- package/dist/components/error-banner/error-banner.css.d.ts +2 -0
- package/dist/components/error-banner/error-banner.css.js +23 -0
- package/dist/components/error-banner/error-banner.d.ts +9 -0
- package/dist/components/error-banner/error-banner.js +40 -0
- package/dist/components/kv-view/kv-view.css.js +4 -0
- package/dist/components/paginator/paginator-events.d.ts +4 -0
- package/dist/components/paginator/paginator-events.js +4 -0
- package/dist/components/paginator/paginator-navigator.css.d.ts +2 -0
- package/dist/components/paginator/paginator-navigator.css.js +35 -0
- package/dist/components/paginator/paginator-navigator.d.ts +27 -0
- package/dist/components/paginator/paginator-navigator.js +168 -0
- package/dist/components/paginator/paginator.css.d.ts +2 -0
- package/dist/components/paginator/paginator.css.js +38 -0
- package/dist/components/paginator/paginator.d.ts +22 -0
- package/dist/components/paginator/paginator.js +122 -0
- package/dist/components/percent-bar/percent-bar.css.d.ts +2 -0
- package/dist/components/percent-bar/percent-bar.css.js +65 -0
- package/dist/components/percent-bar/percent-bar.d.ts +11 -0
- package/dist/components/percent-bar/percent-bar.js +85 -0
- package/dist/components/problem-list/details-drawer.css.d.ts +2 -0
- package/dist/components/problem-list/details-drawer.css.js +42 -0
- package/dist/components/problem-list/details-drawer.d.ts +22 -0
- package/dist/components/problem-list/details-drawer.js +66 -0
- package/dist/components/problem-list/filter.css.d.ts +2 -0
- package/dist/components/problem-list/filter.css.js +67 -0
- package/dist/components/problem-list/problem-item.css.d.ts +2 -0
- package/dist/components/problem-list/problem-item.css.js +170 -0
- package/dist/components/problem-list/problem-item.d.ts +27 -0
- package/dist/components/problem-list/problem-item.js +126 -0
- package/dist/components/problem-list/problem-label-view-filter.css.d.ts +2 -0
- package/dist/components/problem-list/problem-label-view-filter.css.js +6 -0
- package/dist/components/problem-list/problem-label-view-filter.d.ts +18 -0
- package/dist/components/problem-list/problem-label-view-filter.js +66 -0
- package/dist/components/problem-list/problem-list.css.d.ts +2 -0
- package/dist/components/problem-list/problem-list.css.js +59 -0
- package/dist/components/problem-list/problem-list.d.ts +37 -0
- package/dist/components/problem-list/problem-list.js +334 -0
- package/dist/components/problem-list/problem-mainview.css.d.ts +2 -0
- package/dist/components/problem-list/problem-mainview.css.js +100 -0
- package/dist/components/problem-list/problem-mainview.d.ts +20 -0
- package/dist/components/problem-list/problem-mainview.js +126 -0
- package/dist/components/problem-list/problem-rule-filter.d.ts +13 -0
- package/dist/components/problem-list/problem-rule-filter.js +67 -0
- package/dist/components/problem-list/problem-search-filter.d.ts +13 -0
- package/dist/components/problem-list/problem-search-filter.js +45 -0
- package/dist/components/problem-list/problem-sort-filter.d.ts +19 -0
- package/dist/components/problem-list/problem-sort-filter.js +67 -0
- package/dist/components/problem-list/problem-toolbar.css.d.ts +2 -0
- package/dist/components/problem-list/problem-toolbar.css.js +41 -0
- package/dist/components/problem-list/problem-toolbar.d.ts +14 -0
- package/dist/components/problem-list/problem-toolbar.js +63 -0
- package/dist/components/problem-list/shared.css.d.ts +2 -0
- package/dist/components/problem-list/shared.css.js +91 -0
- package/dist/components/problems-overview/diagnostic-evaluation.css.d.ts +2 -0
- package/dist/components/problems-overview/diagnostic-evaluation.css.js +178 -0
- package/dist/components/problems-overview/diagnostic-evaluation.d.ts +13 -0
- package/dist/components/problems-overview/diagnostic-evaluation.js +119 -0
- package/dist/components/problems-overview/document-statistic.css.d.ts +2 -0
- package/dist/components/problems-overview/document-statistic.css.js +16 -0
- package/dist/components/problems-overview/document-statistic.d.ts +10 -0
- package/dist/components/problems-overview/document-statistic.js +49 -0
- package/dist/components/problems-overview/problem-overview-group.css.d.ts +2 -0
- package/dist/components/problems-overview/problem-overview-group.css.js +84 -0
- package/dist/components/problems-overview/problem-overview-group.d.ts +17 -0
- package/dist/components/problems-overview/problem-overview-group.js +121 -0
- package/dist/components/problems-overview/problem-statistic.css.d.ts +2 -0
- package/dist/components/problems-overview/problem-statistic.css.js +40 -0
- package/dist/components/problems-overview/problem-statistic.d.ts +11 -0
- package/dist/components/problems-overview/problem-statistic.js +57 -0
- package/dist/components/problems-overview/problem-statistics.css.d.ts +2 -0
- package/dist/components/problems-overview/problem-statistics.css.js +46 -0
- package/dist/components/problems-overview/problem-statistics.d.ts +14 -0
- package/dist/components/problems-overview/problem-statistics.js +132 -0
- package/dist/components/problems-overview/problems-overview.css.d.ts +2 -0
- package/dist/components/problems-overview/problems-overview.css.js +49 -0
- package/dist/components/problems-overview/problems-overview.d.ts +21 -0
- package/dist/components/problems-overview/problems-overview.js +108 -0
- package/dist/components/render-json-path/render-json-path.css.d.ts +2 -0
- package/dist/components/render-json-path/render-json-path.css.js +86 -0
- package/dist/components/render-json-path/render-json-path.d.ts +11 -0
- package/dist/components/render-json-path/render-json-path.js +105 -0
- package/dist/components/the-doctor/settings.d.ts +5 -0
- package/dist/components/the-doctor/settings.js +22 -0
- package/dist/components/the-doctor/status-bar.css.d.ts +2 -0
- package/dist/components/the-doctor/status-bar.css.js +47 -0
- package/dist/components/the-doctor/status-bar.d.ts +12 -0
- package/dist/components/the-doctor/status-bar.js +71 -0
- package/dist/components/the-doctor/the-doctor.css.d.ts +2 -0
- package/dist/components/the-doctor/the-doctor.css.js +156 -0
- package/dist/components/the-doctor/the-doctor.d.ts +57 -0
- package/dist/components/the-doctor/the-doctor.js +340 -0
- package/dist/cowboy-components-FcPnnXMU.js +114388 -0
- package/dist/cowboy-components.d.ts +5 -2
- package/dist/cowboy-components.js +8 -2
- package/dist/cowboy-components.umd.cjs +4004 -106
- package/dist/cpp-Bq-GnYlH.js +407 -0
- package/dist/csharp-IDcibKAT.js +332 -0
- package/dist/csp-QdYr8JWa.js +59 -0
- package/dist/css/button.css.d.ts +2 -0
- package/dist/css/button.css.js +34 -0
- package/dist/css/chroma-synxtax.css.d.ts +2 -0
- package/dist/css/chroma-synxtax.css.js +130 -0
- package/dist/css/cowboy-components.css +3 -0
- package/dist/css/links.css.d.ts +2 -0
- package/dist/css/links.css.js +17 -0
- package/dist/css/lists.css.d.ts +2 -0
- package/dist/css/lists.css.js +43 -0
- package/dist/css/pb33f-theme.css +2 -2
- package/dist/css/syntax.css.js +1 -1
- package/dist/css-C-wMMefI.js +193 -0
- package/dist/cssMode-DcUlnXpV.js +1541 -0
- package/dist/cypher-BfBo9yir.js +269 -0
- package/dist/dart-Cv3rVfv_.js +287 -0
- package/dist/dockerfile-DyCXBGhV.js +136 -0
- package/dist/ecl-COP_iObm.js +462 -0
- package/dist/elixir-DoEhbk9F.js +575 -0
- package/dist/events/doctor.d.ts +51 -0
- package/dist/events/doctor.js +17 -0
- package/dist/flow9-DuHGSNW1.js +148 -0
- package/dist/freemarker2-sY6FVddl.js +995 -0
- package/dist/fsharp-Dv9PDxVO.js +223 -0
- package/dist/go-CcdAeqiK.js +224 -0
- package/dist/graphql-CoRm4b1H.js +157 -0
- package/dist/handlebars-BqznQEC5.js +425 -0
- package/dist/hcl-BSgAhV5f.js +189 -0
- package/dist/html-DBpY_ZT1.js +314 -0
- package/dist/htmlMode-Cf0lYQWN.js +1551 -0
- package/dist/ini-ewx9HLIq.js +77 -0
- package/dist/java-B5lwcbTy.js +238 -0
- package/dist/javascript-DRgEI2Yf.js +76 -0
- package/dist/jsonMode-CmuECwTh.js +1958 -0
- package/dist/julia-NCcg_P_q.js +517 -0
- package/dist/kotlin-BYlnmGrb.js +259 -0
- package/dist/less-DG4tqgOo.js +168 -0
- package/dist/lexon-CTTPcJLv.js +163 -0
- package/dist/liquid-DWVJYCIL.js +246 -0
- package/dist/lua-CxQ1RWuo.js +168 -0
- package/dist/m3-mHFfpmgx.js +216 -0
- package/dist/markdown-Dh6sYULt.js +235 -0
- package/dist/mdx-Bjcj5AvL.js +171 -0
- package/dist/mips-CNUcjHD1.js +204 -0
- package/dist/model/document-statistics.d.ts +40 -0
- package/dist/model/document-statistics.js +4 -0
- package/dist/model/how_to_fix.d.ts +4 -0
- package/dist/model/how_to_fix.js +1 -0
- package/dist/model/problem.d.ts +19 -0
- package/dist/model/problem.js +106 -0
- package/dist/model/rule_documentation.d.ts +5 -0
- package/dist/model/rule_documentation.js +1 -0
- package/dist/model/session.d.ts +5 -0
- package/dist/model/session.js +1 -0
- package/dist/msdax-ZvxFeKvs.js +381 -0
- package/dist/mysql-COjg31sJ.js +884 -0
- package/dist/objective-c-BqrCFBhT.js +189 -0
- package/dist/pascal-CUpkilAS.js +257 -0
- package/dist/pascaligo-nJfvRJ7x.js +170 -0
- package/dist/perl-CWsX6Ysg.js +632 -0
- package/dist/pgsql-DwgpEXC8.js +857 -0
- package/dist/php-CrbKyd62.js +506 -0
- package/dist/pla-JxXT6Kb-.js +143 -0
- package/dist/postiats-BOdnTRGv.js +913 -0
- package/dist/powerquery-DTkwcXGH.js +896 -0
- package/dist/powershell-Cx53dGpt.js +245 -0
- package/dist/protobuf-Dp9vE-l-.js +426 -0
- package/dist/pug-BSjKVjwP.js +408 -0
- package/dist/python-CiN6iAi3.js +282 -0
- package/dist/qsharp-C5P1RxY3.js +291 -0
- package/dist/r-sEMYnclc.js +249 -0
- package/dist/razor-B4jDf_4z.js +556 -0
- package/dist/redis-DbzUc-fU.js +308 -0
- package/dist/redshift-nrLijj1O.js +815 -0
- package/dist/restructuredtext-CIbGUl6T.js +180 -0
- package/dist/ruby-JcYJisWg.js +517 -0
- package/dist/rust-BgbFBFXH.js +349 -0
- package/dist/sb-hRFFChi7.js +121 -0
- package/dist/scala-Cs0yVo3Q.js +376 -0
- package/dist/scheme-l_0jNtxy.js +114 -0
- package/dist/scss-C4l7ZIRR.js +268 -0
- package/dist/services/linting-service.d.ts +12 -0
- package/dist/services/linting-service.js +121 -0
- package/dist/shell-ikLk_l24.js +227 -0
- package/dist/solidity-4GxCaH9e.js +1373 -0
- package/dist/sophia-tX0WEZsZ.js +205 -0
- package/dist/sparql-D7ky-uMk.js +207 -0
- package/dist/sql-CqEfBVGS.js +859 -0
- package/dist/st-CNWQPqyI.js +422 -0
- package/dist/style.css +1 -1
- package/dist/swift-C_fDfC0d.js +318 -0
- package/dist/systemverilog-gAvsEtN_.js +582 -0
- package/dist/tcl-KbBChuA6.js +238 -0
- package/dist/tsMode-29i0IHrU.js +886 -0
- package/dist/twig-Bb652BpM.js +398 -0
- package/dist/typescript-FDohSLaF.js +349 -0
- package/dist/vb-2e5hSeUh.js +378 -0
- package/dist/wgsl-CYSDq0zg.js +445 -0
- package/dist/workers/rule-documentation.worker.d.ts +1 -0
- package/dist/workers/rule-documentation.worker.js +85 -0
- package/dist/workers/search-problems.worker.d.ts +1 -0
- package/dist/workers/search-problems.worker.js +19 -0
- package/dist/xml-BdgdiRK4.js +101 -0
- package/dist/yaml-CJDq-Ud3.js +212 -0
- package/package.json +6 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class DocumentStatistic extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
label: string;
|
|
5
|
+
value: any;
|
|
6
|
+
postfix: string;
|
|
7
|
+
private isNumeric;
|
|
8
|
+
constructor();
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { html, LitElement } from "lit";
|
|
9
|
+
import documentStatisticCss from "./document-statistic.css";
|
|
10
|
+
let DocumentStatistic = class DocumentStatistic extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.isNumeric = (string) => /^[+-]?\d+(\.\d+)?$/.test(string);
|
|
14
|
+
this.label = "[statistic]";
|
|
15
|
+
this.value = 0;
|
|
16
|
+
this.postfix = '';
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
let formatted;
|
|
20
|
+
if (this.value && !this.isNumeric(this.value)) {
|
|
21
|
+
formatted = html `${this.value}`;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
let v = this.value;
|
|
25
|
+
if (this.value < 1) {
|
|
26
|
+
v = 0;
|
|
27
|
+
}
|
|
28
|
+
formatted = html `<sl-format-number value="${v}"></sl-format-number>`;
|
|
29
|
+
}
|
|
30
|
+
return html `
|
|
31
|
+
<label>${this.label}:</label>
|
|
32
|
+
<span>${formatted}${this.postfix}</span>
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
DocumentStatistic.styles = [documentStatisticCss];
|
|
37
|
+
__decorate([
|
|
38
|
+
property()
|
|
39
|
+
], DocumentStatistic.prototype, "label", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
property()
|
|
42
|
+
], DocumentStatistic.prototype, "value", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
property()
|
|
45
|
+
], DocumentStatistic.prototype, "postfix", void 0);
|
|
46
|
+
DocumentStatistic = __decorate([
|
|
47
|
+
customElement("pb33f-document-statistic")
|
|
48
|
+
], DocumentStatistic);
|
|
49
|
+
export { DocumentStatistic };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
.problem-overview-group {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
border-bottom: 1px dashed var(--secondary-color);
|
|
7
|
+
padding-bottom: 10px;
|
|
8
|
+
margin-top: 10px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.group-rank {
|
|
12
|
+
width: 30px;
|
|
13
|
+
text-align: center;
|
|
14
|
+
font-size: 1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.group-rank span {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.group-details {
|
|
22
|
+
flex-grow: 2;
|
|
23
|
+
margin-left: 10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
span.name {
|
|
27
|
+
color: var(--primary-color);
|
|
28
|
+
font-size: 0.9rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
span.name:hover {
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
span.error {
|
|
38
|
+
color: var(--error-color);
|
|
39
|
+
font-family: var(--font-stack-bold), monospace;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
span.warn {
|
|
43
|
+
color: var(--warn-color);
|
|
44
|
+
font-family: var(--font-stack-bold), monospace;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.violation-count {
|
|
48
|
+
font-size: 0.8rem;
|
|
49
|
+
color: var(--font-color-sub1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.violations {
|
|
53
|
+
font-size: 0.7rem;
|
|
54
|
+
width: 100px;
|
|
55
|
+
margin-left: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.violation {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.line {
|
|
65
|
+
color: var(--font-color-sub1)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.path {
|
|
69
|
+
margin-left: 5px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.action-buttons {
|
|
73
|
+
padding-right: 5px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.action-buttons sl-button::part(base) {
|
|
77
|
+
display: block;
|
|
78
|
+
margin-top: 10px;
|
|
79
|
+
min-width: 100px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { ProblemItem } from "@/components/problem-list/problem-item";
|
|
3
|
+
export declare class ProblemOverviewGroup extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
rank: number;
|
|
6
|
+
totalViolations: number;
|
|
7
|
+
groupName: string;
|
|
8
|
+
description: string;
|
|
9
|
+
category: string;
|
|
10
|
+
violationPercent: number;
|
|
11
|
+
problems: ProblemItem[];
|
|
12
|
+
constructor();
|
|
13
|
+
viewRuleDocs(): void;
|
|
14
|
+
selectRule(): void;
|
|
15
|
+
selectLine(problem: ProblemItem): void;
|
|
16
|
+
render(): TemplateResult<1>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { html, LitElement } from "lit";
|
|
9
|
+
import problemOverviewGroupCss from "./problem-overview-group.css";
|
|
10
|
+
import { ProblemDrawerEventType } from "@/components/problem-list/details-drawer";
|
|
11
|
+
import { OpenProblemDrawer, ProblemClicked, RuleClicked } from "@/events/doctor";
|
|
12
|
+
import sharedCss from "@/css/shared.css";
|
|
13
|
+
import buttonCss from "@/css/button.css";
|
|
14
|
+
import { ProblemItem } from "@/components/problem-list/problem-item";
|
|
15
|
+
let ProblemOverviewGroup = class ProblemOverviewGroup extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
}
|
|
19
|
+
viewRuleDocs() {
|
|
20
|
+
this.dispatchEvent(new CustomEvent(OpenProblemDrawer, {
|
|
21
|
+
bubbles: true,
|
|
22
|
+
composed: true,
|
|
23
|
+
detail: {
|
|
24
|
+
type: ProblemDrawerEventType.RULE_DOCS,
|
|
25
|
+
rule: this.groupName
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
selectRule() {
|
|
30
|
+
this.dispatchEvent(new CustomEvent(RuleClicked, {
|
|
31
|
+
bubbles: true,
|
|
32
|
+
composed: true,
|
|
33
|
+
detail: {
|
|
34
|
+
rule: this.groupName
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
selectLine(problem) {
|
|
39
|
+
this.dispatchEvent(new CustomEvent(ProblemClicked, {
|
|
40
|
+
bubbles: true,
|
|
41
|
+
composed: true,
|
|
42
|
+
detail: {
|
|
43
|
+
problem: problem,
|
|
44
|
+
launchedFromProblems: false
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const renderedProblems = this.problems?.slice(0, 4);
|
|
50
|
+
//const renderedProblems = this.problems;
|
|
51
|
+
let pc = html `
|
|
52
|
+
<pb33f-percent-bar value="${this.violationPercent}"></pb33f-percent-bar>`;
|
|
53
|
+
let clazz = "";
|
|
54
|
+
if (this.rank == 1) {
|
|
55
|
+
clazz = "error";
|
|
56
|
+
pc = html `
|
|
57
|
+
<pb33f-percent-bar value="${this.violationPercent}" error></pb33f-percent-bar>`;
|
|
58
|
+
}
|
|
59
|
+
if (this.rank == 2) {
|
|
60
|
+
clazz = "warn";
|
|
61
|
+
pc = html `
|
|
62
|
+
<pb33f-percent-bar value="${this.violationPercent}" warning></pb33f-percent-bar>`;
|
|
63
|
+
}
|
|
64
|
+
if (!this.groupName || this.groupName === '') {
|
|
65
|
+
this.groupName = 'invalid OpenAPI specification';
|
|
66
|
+
}
|
|
67
|
+
return html `
|
|
68
|
+
<div class="problem-overview-group">
|
|
69
|
+
<div class="group-rank">
|
|
70
|
+
<span>${this.rank}</span>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="group-details">
|
|
73
|
+
<span class="name ${clazz}" @click="${this.viewRuleDocs}">${this.groupName}</span>
|
|
74
|
+
${pc}
|
|
75
|
+
</div>
|
|
76
|
+
<div class="violations">
|
|
77
|
+
|
|
78
|
+
${renderedProblems?.map(problem => {
|
|
79
|
+
return html `
|
|
80
|
+
<div class="violation">
|
|
81
|
+
<div class="line">
|
|
82
|
+
<a href="#" @click="${() => this.selectLine(problem)}">
|
|
83
|
+
${problem?.problemObject?.startLineNumber}:${problem?.problemObject?.startColumn}</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
`;
|
|
87
|
+
})}
|
|
88
|
+
</div>
|
|
89
|
+
<div class="action-buttons">
|
|
90
|
+
<sl-button @click="${this.selectRule}">${this.totalViolations} ></sl-button>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
ProblemOverviewGroup.styles = [sharedCss, buttonCss, problemOverviewGroupCss];
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: Number })
|
|
99
|
+
], ProblemOverviewGroup.prototype, "rank", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
property({ type: Number })
|
|
102
|
+
], ProblemOverviewGroup.prototype, "totalViolations", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
property()
|
|
105
|
+
], ProblemOverviewGroup.prototype, "groupName", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property()
|
|
108
|
+
], ProblemOverviewGroup.prototype, "description", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
property()
|
|
111
|
+
], ProblemOverviewGroup.prototype, "category", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: Number })
|
|
114
|
+
], ProblemOverviewGroup.prototype, "violationPercent", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: ProblemItem })
|
|
117
|
+
], ProblemOverviewGroup.prototype, "problems", void 0);
|
|
118
|
+
ProblemOverviewGroup = __decorate([
|
|
119
|
+
customElement("pb33f-problem-overview-group")
|
|
120
|
+
], ProblemOverviewGroup);
|
|
121
|
+
export { ProblemOverviewGroup };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
|
|
4
|
+
label {
|
|
5
|
+
font-size: 0.8rem;
|
|
6
|
+
font-family: var(--font-stack), monospace;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
span {
|
|
10
|
+
display: block;
|
|
11
|
+
font-size: 1.3rem;
|
|
12
|
+
padding-top: 3px;
|
|
13
|
+
color: var(--primary-color);
|
|
14
|
+
font-family: var(--font-stack-bold), monospace;
|
|
15
|
+
text-shadow: 0 0 1rem var(--primary-color);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.warn {
|
|
19
|
+
color: var(--warn-color);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.error {
|
|
23
|
+
color: var(--error-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
sl-icon {
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
margin-right: 5px;
|
|
29
|
+
font-size: 1rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.glow-warn {
|
|
33
|
+
text-shadow: 0 0 1rem var(--warn-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.glow-error {
|
|
37
|
+
text-shadow: 0 0 1rem var(--error-color), 0 0 1.2rem var(--error-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class ProblemStatistic extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
label: string;
|
|
5
|
+
value: number;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
isWarning: boolean;
|
|
8
|
+
isInform: boolean;
|
|
9
|
+
constructor();
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { html, LitElement } from "lit";
|
|
9
|
+
import problemStatisticCss from "./problem-statistic.css";
|
|
10
|
+
let ProblemStatistic = class ProblemStatistic extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.label = "[statistic]";
|
|
14
|
+
this.value = 0;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (this.isError) {
|
|
18
|
+
return html `
|
|
19
|
+
<sl-icon name="x-square" class="error"></sl-icon><label>${this.label}</label>
|
|
20
|
+
<span class="error glow-error"><sl-format-number value="${this.value}"></sl-format-number></span>`;
|
|
21
|
+
}
|
|
22
|
+
if (this.isWarning) {
|
|
23
|
+
return html `
|
|
24
|
+
<sl-icon name="exclamation-triangle" class="warn"></sl-icon><label>${this.label}</label>
|
|
25
|
+
<span class="warn glow-warn"><sl-format-number value="${this.value}"></sl-format-number></span>`;
|
|
26
|
+
}
|
|
27
|
+
if (this.isInform) {
|
|
28
|
+
return html `
|
|
29
|
+
<sl-icon name="info-square"></sl-icon><label>${this.label}</label>
|
|
30
|
+
<span><sl-format-number value="${this.value}"></sl-format-number></span>`;
|
|
31
|
+
}
|
|
32
|
+
return html `
|
|
33
|
+
<label>${this.label}</label>
|
|
34
|
+
<span><sl-format-number value="${this.value}"></sl-format-number></span>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
ProblemStatistic.styles = [problemStatisticCss];
|
|
39
|
+
__decorate([
|
|
40
|
+
property()
|
|
41
|
+
], ProblemStatistic.prototype, "label", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
property({ type: Number })
|
|
44
|
+
], ProblemStatistic.prototype, "value", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ type: Boolean })
|
|
47
|
+
], ProblemStatistic.prototype, "isError", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property({ type: Boolean })
|
|
50
|
+
], ProblemStatistic.prototype, "isWarning", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Boolean })
|
|
53
|
+
], ProblemStatistic.prototype, "isInform", void 0);
|
|
54
|
+
ProblemStatistic = __decorate([
|
|
55
|
+
customElement("pb33f-problem-statistic")
|
|
56
|
+
], ProblemStatistic);
|
|
57
|
+
export { ProblemStatistic };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
sl-card {
|
|
4
|
+
--border-color: var(--secondary-color);
|
|
5
|
+
--border-radius: 0;
|
|
6
|
+
--border-width: 1px;
|
|
7
|
+
|
|
8
|
+
--padding: 5px;
|
|
9
|
+
flex-grow: 1;
|
|
10
|
+
margin-left: 10px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
sl-card::part(base) {
|
|
14
|
+
border-style: dashed;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
sl-card.card-small::part(body) {
|
|
19
|
+
padding:0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
sl-card.card-small {
|
|
23
|
+
--border-color: var(--background-color)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
h3 {
|
|
28
|
+
margin-top: 10px;
|
|
29
|
+
margin-bottom: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.statistics {
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
padding-bottom: 10px;
|
|
36
|
+
border-bottom: 1px dashed var(--secondary-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
.statistics sl-card:first-child {
|
|
41
|
+
margin-left: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/card/card.js';
|
|
2
|
+
import './problem-statistic.js';
|
|
3
|
+
import './document-statistic.js';
|
|
4
|
+
import { LitElement } from "lit";
|
|
5
|
+
import { DrDiagnostics } from "@/model/document-statistics";
|
|
6
|
+
import { ProblemItem } from "@/components/problem-list/problem-item";
|
|
7
|
+
export declare class ProblemStatisticsComponent extends LitElement {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
problems: ProblemItem[];
|
|
10
|
+
drDiagnostics: DrDiagnostics;
|
|
11
|
+
constructor();
|
|
12
|
+
protected willUpdate(): void;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import '@shoelace-style/shoelace/dist/components/card/card.js';
|
|
8
|
+
import './problem-statistic.js';
|
|
9
|
+
import './document-statistic.js';
|
|
10
|
+
import { customElement, property } from "lit/decorators.js";
|
|
11
|
+
import { html, LitElement } from "lit";
|
|
12
|
+
import { Problem } from "@/model/problem";
|
|
13
|
+
import problemStatisticsCss from "./problem-statistics.css";
|
|
14
|
+
import { DocumentStatistics } from "@/model/document-statistics";
|
|
15
|
+
let ProblemStatisticsComponent = class ProblemStatisticsComponent extends LitElement {
|
|
16
|
+
// private problemStatistics: ProblemStatistics;
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
}
|
|
20
|
+
willUpdate() {
|
|
21
|
+
// if (this.problemStatistics) {
|
|
22
|
+
// this.problemStatistics.problems = this.problems;
|
|
23
|
+
// } else {
|
|
24
|
+
// this.problemStatistics = new ProblemStatistics(this.problems);
|
|
25
|
+
// }
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const totalViolations = this.problems.length;
|
|
29
|
+
const rulesViolated = new Set(this.problems.map((problem) => {
|
|
30
|
+
return problem.problemObject.source;
|
|
31
|
+
})).size;
|
|
32
|
+
let categoriesViolated = 0;
|
|
33
|
+
if (this.drDiagnostics) {
|
|
34
|
+
categoriesViolated = this.drDiagnostics?.statistics.categoryStatistics?.filter((cat) => {
|
|
35
|
+
return cat.numIssues > 0;
|
|
36
|
+
}).length;
|
|
37
|
+
}
|
|
38
|
+
return html `
|
|
39
|
+
<div class="statistics">
|
|
40
|
+
<sl-card class="card-small">
|
|
41
|
+
<pb33f-document-statistic label="Size"
|
|
42
|
+
postFix="kb"
|
|
43
|
+
value="${this.drDiagnostics?.statistics.filesizeKb}">
|
|
44
|
+
</pb33f-document-statistic>
|
|
45
|
+
</sl-card>
|
|
46
|
+
|
|
47
|
+
<sl-card class="card-small">
|
|
48
|
+
<pb33f-document-statistic label="Version"
|
|
49
|
+
value="${this.drDiagnostics?.statistics.version}">
|
|
50
|
+
</pb33f-document-statistic>
|
|
51
|
+
</sl-card>
|
|
52
|
+
|
|
53
|
+
<sl-card class="card-small">
|
|
54
|
+
<pb33f-document-statistic label="Schemas"
|
|
55
|
+
value="${this.drDiagnostics?.statistics.schemas}">
|
|
56
|
+
</pb33f-document-statistic>
|
|
57
|
+
</sl-card>
|
|
58
|
+
|
|
59
|
+
<sl-card class="card-small">
|
|
60
|
+
<pb33f-document-statistic label="Parameters"
|
|
61
|
+
value="${this.drDiagnostics?.statistics.parameters}">
|
|
62
|
+
</pb33f-document-statistic>
|
|
63
|
+
</sl-card>
|
|
64
|
+
|
|
65
|
+
<sl-card class="card-small">
|
|
66
|
+
<pb33f-document-statistic label="Operations"
|
|
67
|
+
value="${this.drDiagnostics?.statistics.operations}">
|
|
68
|
+
</pb33f-document-statistic>
|
|
69
|
+
</sl-card>
|
|
70
|
+
<sl-card class="card-small">
|
|
71
|
+
<pb33f-document-statistic label="Refs"
|
|
72
|
+
value="${this.drDiagnostics?.statistics.references}">
|
|
73
|
+
</pb33f-document-statistic>
|
|
74
|
+
</sl-card>
|
|
75
|
+
<sl-card class="card-small">
|
|
76
|
+
<pb33f-document-statistic label="Enums"
|
|
77
|
+
value="${this.drDiagnostics?.statistics.enums}">
|
|
78
|
+
</pb33f-document-statistic>
|
|
79
|
+
</sl-card>
|
|
80
|
+
<sl-card class="card-small">
|
|
81
|
+
<pb33f-document-statistic label="Tags"
|
|
82
|
+
value="${this.drDiagnostics?.statistics.tags}">
|
|
83
|
+
</pb33f-document-statistic>
|
|
84
|
+
</sl-card>
|
|
85
|
+
</div>
|
|
86
|
+
<h3>Violation Statistics</h3>
|
|
87
|
+
<div class="statistics">
|
|
88
|
+
<sl-card class="card-basic">
|
|
89
|
+
<pb33f-problem-statistic label="Total"
|
|
90
|
+
value="${totalViolations}">
|
|
91
|
+
</pb33f-problem-statistic>
|
|
92
|
+
</sl-card>
|
|
93
|
+
<sl-card class="card-basic">
|
|
94
|
+
<pb33f-problem-statistic label="Rules"
|
|
95
|
+
value="${rulesViolated}">
|
|
96
|
+
</pb33f-problem-statistic>
|
|
97
|
+
</sl-card>
|
|
98
|
+
<sl-card class="card-basic">
|
|
99
|
+
<pb33f-problem-statistic label="Categories"
|
|
100
|
+
value="${categoriesViolated}">
|
|
101
|
+
</pb33f-problem-statistic>
|
|
102
|
+
</sl-card>
|
|
103
|
+
<sl-card class="card-basic">
|
|
104
|
+
<pb33f-problem-statistic label="Errors"
|
|
105
|
+
value="${this.drDiagnostics?.statistics.totalErrors}" isError>
|
|
106
|
+
</pb33f-problem-statistic>
|
|
107
|
+
</sl-card>
|
|
108
|
+
<sl-card class="card-basic">
|
|
109
|
+
<pb33f-problem-statistic label="Warnings"
|
|
110
|
+
value="${this.drDiagnostics?.statistics.totalWarnings}" isWarning>
|
|
111
|
+
</pb33f-problem-statistic>
|
|
112
|
+
</sl-card>
|
|
113
|
+
<sl-card class="card-basic">
|
|
114
|
+
<pb33f-problem-statistic label="Informs"
|
|
115
|
+
value="${this.drDiagnostics?.statistics.totalInfo}" isInform>
|
|
116
|
+
</pb33f-problem-statistic>
|
|
117
|
+
</sl-card>
|
|
118
|
+
</div>
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
ProblemStatisticsComponent.styles = [problemStatisticsCss];
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: Problem })
|
|
125
|
+
], ProblemStatisticsComponent.prototype, "problems", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: DocumentStatistics })
|
|
128
|
+
], ProblemStatisticsComponent.prototype, "drDiagnostics", void 0);
|
|
129
|
+
ProblemStatisticsComponent = __decorate([
|
|
130
|
+
customElement("pb33f-problem-statistics")
|
|
131
|
+
], ProblemStatisticsComponent);
|
|
132
|
+
export { ProblemStatisticsComponent };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
|
|
4
|
+
h3.rule-violations {
|
|
5
|
+
border-top: 1px dashed var(--secondary-color);
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
padding-top: 10px;
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.paginator {
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
pb33f-paginator-navigation::part(values) {
|
|
17
|
+
max-height: calc(100vh - 450px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
.paginator::part(values) {
|
|
22
|
+
background-color: red;
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.overview-container {
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.unavailable {
|
|
31
|
+
width: 50%;
|
|
32
|
+
margin: 80px auto;
|
|
33
|
+
font-size: 6rem;
|
|
34
|
+
text-align: center;
|
|
35
|
+
color: var(--error-color);
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.unavailable p {
|
|
40
|
+
font-size: 1.2rem;
|
|
41
|
+
color: var(--font-color-sub1)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.unavailable p strong {
|
|
45
|
+
font-family: var(--font-stack-bold), monospace;
|
|
46
|
+
color: var(--error-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import './diagnostic-evaluation.js';
|
|
3
|
+
import '@/components/percent-bar/percent-bar.js';
|
|
4
|
+
import { SlResizeObserver } from "@shoelace-style/shoelace";
|
|
5
|
+
import { ProblemItem } from "@/components/problem-list/problem-item";
|
|
6
|
+
import { DrDiagnostics } from "@/model/document-statistics";
|
|
7
|
+
export declare class ProblemsOverview extends LitElement {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
problemList: ProblemItem[];
|
|
10
|
+
resizeObserver: SlResizeObserver;
|
|
11
|
+
statistics: DrDiagnostics;
|
|
12
|
+
unavailable: boolean;
|
|
13
|
+
private readonly problemStatistics;
|
|
14
|
+
private problemOverviewGroups;
|
|
15
|
+
private readonly paginator;
|
|
16
|
+
constructor();
|
|
17
|
+
willUpdate(): void;
|
|
18
|
+
private buildProblemOverviewGroups;
|
|
19
|
+
set problems(value: ProblemItem[]);
|
|
20
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
}
|