@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,45 @@
|
|
|
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/dropdown/dropdown.js';
|
|
8
|
+
import '@shoelace-style/shoelace/dist/components/menu/menu.js';
|
|
9
|
+
import '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';
|
|
10
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
11
|
+
import { html, LitElement } from "lit";
|
|
12
|
+
import filterCss from "./filter.css";
|
|
13
|
+
import { ProblemSearchFilterChanged } from "@/events/doctor";
|
|
14
|
+
let ProblemSearchFilter = class ProblemSearchFilter extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
}
|
|
18
|
+
search() {
|
|
19
|
+
this.dispatchEvent(new CustomEvent(ProblemSearchFilterChanged, {
|
|
20
|
+
composed: true,
|
|
21
|
+
bubbles: true,
|
|
22
|
+
detail: {
|
|
23
|
+
search: this.input.value,
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return html `
|
|
29
|
+
<div class="filter">
|
|
30
|
+
<sl-input @sl-change=${this.search} placeholder="search" clearable></sl-input>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
ProblemSearchFilter.styles = [filterCss];
|
|
36
|
+
__decorate([
|
|
37
|
+
property()
|
|
38
|
+
], ProblemSearchFilter.prototype, "selectedSort", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
query('sl-input')
|
|
41
|
+
], ProblemSearchFilter.prototype, "input", void 0);
|
|
42
|
+
ProblemSearchFilter = __decorate([
|
|
43
|
+
customElement('pb33f-problem-search-filter')
|
|
44
|
+
], ProblemSearchFilter);
|
|
45
|
+
export { ProblemSearchFilter };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '@shoelace-style/shoelace/dist/components/dropdown/dropdown.js';
|
|
2
|
+
import '@shoelace-style/shoelace/dist/components/menu/menu.js';
|
|
3
|
+
import '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';
|
|
4
|
+
import { LitElement } from "lit";
|
|
5
|
+
export declare enum ProblemSortView {
|
|
6
|
+
LineNumber = "Line Number",
|
|
7
|
+
Rule = "Rule Violation",
|
|
8
|
+
JSONPath = "Path",
|
|
9
|
+
Category = "Category",
|
|
10
|
+
Severity = "Severity"
|
|
11
|
+
}
|
|
12
|
+
export declare class ProblemSortFilter extends LitElement {
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
selectedSort: string;
|
|
15
|
+
private readonly menuValues;
|
|
16
|
+
constructor();
|
|
17
|
+
filterChanged(event: CustomEvent): void;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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/dropdown/dropdown.js';
|
|
8
|
+
import '@shoelace-style/shoelace/dist/components/menu/menu.js';
|
|
9
|
+
import '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';
|
|
10
|
+
import { customElement, property } from "lit/decorators.js";
|
|
11
|
+
import { html, LitElement } from "lit";
|
|
12
|
+
import problemLabelViewFilterCss from "./problem-label-view-filter.css";
|
|
13
|
+
import filterCss from "./filter.css";
|
|
14
|
+
import { ProblemSortFilterChanged } from "@/events/doctor";
|
|
15
|
+
export var ProblemSortView;
|
|
16
|
+
(function (ProblemSortView) {
|
|
17
|
+
ProblemSortView["LineNumber"] = "Line Number";
|
|
18
|
+
ProblemSortView["Rule"] = "Rule Violation";
|
|
19
|
+
ProblemSortView["JSONPath"] = "Path";
|
|
20
|
+
ProblemSortView["Category"] = "Category";
|
|
21
|
+
ProblemSortView["Severity"] = "Severity";
|
|
22
|
+
})(ProblemSortView || (ProblemSortView = {}));
|
|
23
|
+
let ProblemSortFilter = class ProblemSortFilter extends LitElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.menuValues = Object.values(ProblemSortView);
|
|
27
|
+
this.selectedSort = this.menuValues[0].toString();
|
|
28
|
+
}
|
|
29
|
+
filterChanged(event) {
|
|
30
|
+
const menuItem = event.detail.item;
|
|
31
|
+
this.selectedSort = menuItem.value;
|
|
32
|
+
this.dispatchEvent(new CustomEvent(ProblemSortFilterChanged, {
|
|
33
|
+
composed: true,
|
|
34
|
+
detail: {
|
|
35
|
+
sort: this.selectedSort,
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return html `
|
|
41
|
+
<div class="filter">
|
|
42
|
+
<div class="label"><label>Sort:</label></div>
|
|
43
|
+
<div class="dropdown">
|
|
44
|
+
<sl-dropdown skidding="5" distance="5">
|
|
45
|
+
<sl-button slot="trigger" caret>${this.selectedSort}</sl-button>
|
|
46
|
+
<sl-menu @sl-select=${this.filterChanged}>
|
|
47
|
+
${this.menuValues.map((value) => {
|
|
48
|
+
return html `
|
|
49
|
+
<sl-menu-item value="${value}" type="checkbox" .checked=${this.selectedSort === value}>
|
|
50
|
+
${value}
|
|
51
|
+
</sl-menu-item>`;
|
|
52
|
+
})}
|
|
53
|
+
</sl-menu>
|
|
54
|
+
</sl-dropdown>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
ProblemSortFilter.styles = [problemLabelViewFilterCss, filterCss];
|
|
61
|
+
__decorate([
|
|
62
|
+
property()
|
|
63
|
+
], ProblemSortFilter.prototype, "selectedSort", void 0);
|
|
64
|
+
ProblemSortFilter = __decorate([
|
|
65
|
+
customElement('pb33f-problem-sort-filter')
|
|
66
|
+
], ProblemSortFilter);
|
|
67
|
+
export { ProblemSortFilter };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
.toolbar-container{
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// height: 30px;
|
|
7
|
+
font-size: 0.7rem;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: flex-start;
|
|
10
|
+
flex-flow: row wrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.spacer{
|
|
14
|
+
margin-left: 20px;
|
|
15
|
+
border-left: 1px dashed var(--secondary-color);
|
|
16
|
+
height: 30px;
|
|
17
|
+
margin-right: 10px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.filter {
|
|
21
|
+
border: 1px dashed var(--secondary-color);
|
|
22
|
+
min-width: 200px;
|
|
23
|
+
width: 200px;
|
|
24
|
+
padding-left: 5px;
|
|
25
|
+
padding-right: 5px;
|
|
26
|
+
height: 30px;
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
flex-grow: 2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mid {
|
|
35
|
+
flex-grow: 2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.last {
|
|
39
|
+
flex-grow: 2;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class ProblemToolbar extends LitElement {
|
|
3
|
+
availableRules: string[];
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
private readonly problemLabelFilter;
|
|
6
|
+
private readonly problemSortFilter;
|
|
7
|
+
private readonly problemSearchFilter;
|
|
8
|
+
private readonly problemRuleFilter;
|
|
9
|
+
constructor();
|
|
10
|
+
protected willUpdate(): void;
|
|
11
|
+
ruleFilterChanged(rule: string): void;
|
|
12
|
+
resetRuleFilter(): void;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { ProblemLabelViewFilter } from "./problem-label-view-filter";
|
|
10
|
+
import { ProblemSortFilter } from "./problem-sort-filter";
|
|
11
|
+
import { ProblemSearchFilter } from "./problem-search-filter";
|
|
12
|
+
import { Rules, ProblemRuleFilter } from "./problem-rule-filter";
|
|
13
|
+
import problemToolbarCss from "./problem-toolbar.css";
|
|
14
|
+
let ProblemToolbar = class ProblemToolbar extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.problemLabelFilter = new ProblemLabelViewFilter();
|
|
18
|
+
this.problemSortFilter = new ProblemSortFilter();
|
|
19
|
+
this.problemSearchFilter = new ProblemSearchFilter();
|
|
20
|
+
this.problemRuleFilter = new ProblemRuleFilter();
|
|
21
|
+
this.problemRuleFilter.rules = this.availableRules;
|
|
22
|
+
}
|
|
23
|
+
willUpdate() {
|
|
24
|
+
if (this.availableRules?.length > 0) {
|
|
25
|
+
this.problemRuleFilter.rules = this.availableRules;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
ruleFilterChanged(rule) {
|
|
29
|
+
this.problemRuleFilter.selectedRule = rule;
|
|
30
|
+
}
|
|
31
|
+
resetRuleFilter() {
|
|
32
|
+
this.problemRuleFilter.selectedRule = Rules.AllRules;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return html `
|
|
36
|
+
<div class="toolbar-container">
|
|
37
|
+
<div class="filter first">
|
|
38
|
+
${this.problemLabelFilter}
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="filter mid">
|
|
42
|
+
${this.problemSortFilter}
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="filter mid">
|
|
46
|
+
${this.problemRuleFilter}
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="filter last">
|
|
50
|
+
${this.problemSearchFilter}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
ProblemToolbar.styles = [problemToolbarCss];
|
|
57
|
+
__decorate([
|
|
58
|
+
property()
|
|
59
|
+
], ProblemToolbar.prototype, "availableRules", void 0);
|
|
60
|
+
ProblemToolbar = __decorate([
|
|
61
|
+
customElement('pb33f-problem-toolbar')
|
|
62
|
+
], ProblemToolbar);
|
|
63
|
+
export { ProblemToolbar };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
code {
|
|
4
|
+
font-family: var(--font-stack), monospace;
|
|
5
|
+
border: 1px solid var(--secondary-color-lowalpha);
|
|
6
|
+
color: var(--secondary-color);
|
|
7
|
+
border-radius: 0;
|
|
8
|
+
padding: 0 2px 1px 2px;
|
|
9
|
+
margin: 0 0 2px 0;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
background-color: var(--secondary-color-very-lowalpha);
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
code:hover {
|
|
16
|
+
border: 1px solid var(--primary-color);
|
|
17
|
+
color: var(--primary-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
p {
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
color: var(--primary-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
a:hover {
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
color: var(--primary-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
a:visited {
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
color: var(--primary-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
a:active {
|
|
41
|
+
text-decoration: underline;
|
|
42
|
+
color: var(--secondary-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.button-primary::part(base) {
|
|
46
|
+
border: 1px solid var(--primary-color);
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
font-family: var(--font-stack), monospace;
|
|
49
|
+
background-color: var(--background-color);
|
|
50
|
+
color: var(--primary-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.button-primary::part(base):hover {
|
|
54
|
+
background-color: var(--primary-color);
|
|
55
|
+
color: var(--background-color);
|
|
56
|
+
font-family: var(--font-stack-bold), monospace;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button-primary::part(base):active {
|
|
60
|
+
background-color: var(--background-color);
|
|
61
|
+
color: var(--error-color);
|
|
62
|
+
border: 1px solid var(--error-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.button-icon::part(base) {
|
|
66
|
+
color: var(--primary-color);
|
|
67
|
+
padding: 0 0 0 8px;
|
|
68
|
+
font-size: 1.1rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.button-icon::part(base):hover {
|
|
72
|
+
color: var(--error-color);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.button-icon::part(base):active {
|
|
76
|
+
color: var(--font-color);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.error {
|
|
80
|
+
color: var(--error-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.warning {
|
|
84
|
+
color: var(--warn-color)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.info {
|
|
88
|
+
color: var(--primary-color)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
`;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
.diagnostic-evaluation {
|
|
4
|
+
display: flex;
|
|
5
|
+
border-bottom: 1px dashed var(--secondary-color);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.diagnostic-score {
|
|
9
|
+
text-align: center;
|
|
10
|
+
margin-top: 5px;
|
|
11
|
+
padding-bottom: 10px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.diagnostic-evaluation label {
|
|
15
|
+
font-size: 0.7rem;
|
|
16
|
+
font-family: var(--font-stack), monospace;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.diagnostic-evaluation span {
|
|
20
|
+
font-size: 0.9rem;
|
|
21
|
+
font-family: var(--font-stack-bold), monospace;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.score {
|
|
25
|
+
width: 100px;
|
|
26
|
+
height: 100px;
|
|
27
|
+
line-height: 100px;
|
|
28
|
+
border: 1px solid var(--primary-color);
|
|
29
|
+
text-align: center;
|
|
30
|
+
margin-top: 10px;
|
|
31
|
+
margin-bottom: 10px;
|
|
32
|
+
}
|
|
33
|
+
.score span {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
line-height: normal;
|
|
37
|
+
font-size: 2rem;
|
|
38
|
+
color: var(--primary-color);
|
|
39
|
+
font-family: var(--font-stack-bold), monospace;
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.evaluation {
|
|
44
|
+
margin-left: 10px;
|
|
45
|
+
text-align: left;
|
|
46
|
+
border-left: 1px dashed var(--secondary-color);
|
|
47
|
+
padding-left: 10px;
|
|
48
|
+
padding-top: 5px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.evaluation p {
|
|
52
|
+
font-size: 0.8rem;
|
|
53
|
+
margin-bottom: 3px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.evaluation label {
|
|
57
|
+
font-family: var(--font-stack-bold), monospace;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.score.one {
|
|
61
|
+
border-color: var(--error-color);
|
|
62
|
+
text-shadow: none;
|
|
63
|
+
animation-name: errorGlow;
|
|
64
|
+
animation-duration: 1.2s;
|
|
65
|
+
animation-iteration-count: infinite;
|
|
66
|
+
animation-direction: alternate;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.score.one span {
|
|
70
|
+
color: var(--error-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.score.two {
|
|
74
|
+
border-color: var(--warn-400);
|
|
75
|
+
text-shadow: none;
|
|
76
|
+
animation-name: twoGlow;
|
|
77
|
+
animation-duration: 1.2s;
|
|
78
|
+
animation-iteration-count: infinite;
|
|
79
|
+
animation-direction: alternate;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.score.two span {
|
|
83
|
+
color: var(--warn-400);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.score.three {
|
|
87
|
+
border-color: var(--warn-color);
|
|
88
|
+
text-shadow: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.score.three span {
|
|
92
|
+
color: var(--warn-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.score.four {
|
|
96
|
+
border-color: var(--ok-200);
|
|
97
|
+
text-shadow: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.score.four span {
|
|
101
|
+
color: var(--ok-200);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.score.five {
|
|
105
|
+
border-color: var(--terminal-text);
|
|
106
|
+
text-shadow: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.score.five span {
|
|
110
|
+
color: var(--terminal-text);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
.score.zero {
|
|
115
|
+
border-color: var(--font-color-sub2);
|
|
116
|
+
text-shadow: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.score.zero span {
|
|
120
|
+
color: var(--font-color-sub2);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
a {
|
|
124
|
+
color: var(--primary-color);
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
a:hover {
|
|
129
|
+
color: var(--primary-color);
|
|
130
|
+
text-decoration: underline;
|
|
131
|
+
}
|
|
132
|
+
a:active {
|
|
133
|
+
color: var(--error-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
ul {
|
|
137
|
+
padding-left: 5px;
|
|
138
|
+
margin-top: 0;
|
|
139
|
+
padding-top: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
ul > li {
|
|
143
|
+
font-size: 0.8rem;
|
|
144
|
+
line-height: 1.2em;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
@keyframes errorGlow {
|
|
149
|
+
from {
|
|
150
|
+
box-shadow: 0 0 1px var(--error-color-lowalpha);
|
|
151
|
+
border-color: var(--error-color-lowalpha);
|
|
152
|
+
text-shadow: 0 0 1rem var(--background-color);
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
to {
|
|
156
|
+
border-color: var(--error-color);
|
|
157
|
+
box-shadow: 0 0 8px var(--error-color);
|
|
158
|
+
text-shadow: 0 0 1rem var(--error-color);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@keyframes twoGlow {
|
|
163
|
+
from {
|
|
164
|
+
box-shadow: 0 0 1px var(--warn-400-lowalpha);
|
|
165
|
+
border-color: var(--warn-400-lowalpha);
|
|
166
|
+
text-shadow: 0 0 1rem var(--background-color);
|
|
167
|
+
}
|
|
168
|
+
to {
|
|
169
|
+
border-color: var(--warn-400);
|
|
170
|
+
box-shadow: 0 0 8px var(--warn-400);
|
|
171
|
+
text-shadow: 0 0 1rem var(--warn-400);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class DiagnosticEvaluation extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
score: number;
|
|
5
|
+
evaluation: string;
|
|
6
|
+
diagnosis: string;
|
|
7
|
+
private links;
|
|
8
|
+
constructor();
|
|
9
|
+
scoreClass(): string;
|
|
10
|
+
viewRuleDocs(ruleName: string): void;
|
|
11
|
+
convertToLinks(text: string): string;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 } from "lit/decorators.js";
|
|
8
|
+
import { html, LitElement } from "lit";
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { marked } from "marked";
|
|
11
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
12
|
+
import { ProblemDrawerEventType } from "@/components/problem-list/details-drawer";
|
|
13
|
+
import { OpenProblemDrawer } from "@/events/doctor";
|
|
14
|
+
import diagnosticEvaluationCss from "./diagnostic-evaluation.css";
|
|
15
|
+
import listsCss from "@/css/lists.css";
|
|
16
|
+
let DiagnosticEvaluation = class DiagnosticEvaluation extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.links = [];
|
|
20
|
+
this.evaluation = "Unknown";
|
|
21
|
+
}
|
|
22
|
+
scoreClass() {
|
|
23
|
+
if (this.score === 0) {
|
|
24
|
+
return "zero";
|
|
25
|
+
}
|
|
26
|
+
if (this.score >= 90) {
|
|
27
|
+
return "five";
|
|
28
|
+
}
|
|
29
|
+
else if (this.score >= 70) {
|
|
30
|
+
return "four";
|
|
31
|
+
}
|
|
32
|
+
else if (this.score >= 50) {
|
|
33
|
+
return "three";
|
|
34
|
+
}
|
|
35
|
+
else if (this.score >= 30) {
|
|
36
|
+
return "two";
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return "one";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
viewRuleDocs(ruleName) {
|
|
43
|
+
this.dispatchEvent(new CustomEvent(OpenProblemDrawer, {
|
|
44
|
+
bubbles: true,
|
|
45
|
+
composed: true,
|
|
46
|
+
detail: {
|
|
47
|
+
type: ProblemDrawerEventType.RULE_DOCS,
|
|
48
|
+
rule: ruleName
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
convertToLinks(text) {
|
|
53
|
+
const regex = /#\{([^}]+)}/g;
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
const replaced = text.replace(regex, (match, p1) => {
|
|
56
|
+
this.links.push(p1);
|
|
57
|
+
return ``;
|
|
58
|
+
});
|
|
59
|
+
return replaced;
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
this.links = [];
|
|
63
|
+
let parsed = this.convertToLinks(marked.parse(this.diagnosis).toString());
|
|
64
|
+
this.links.sort((a, b) => {
|
|
65
|
+
return a.localeCompare(b);
|
|
66
|
+
});
|
|
67
|
+
const renderedLinks = this.links.map((link) => {
|
|
68
|
+
return html `<li><a href="#" @click=${() => { this.viewRuleDocs(link); }}>${link}</a></li>`;
|
|
69
|
+
});
|
|
70
|
+
let evalString = this.evaluation;
|
|
71
|
+
if (evalString === '') {
|
|
72
|
+
evalString = "Unknown";
|
|
73
|
+
}
|
|
74
|
+
let score = this.score;
|
|
75
|
+
if (score === 0) {
|
|
76
|
+
score = "??";
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
score = this.score + '%';
|
|
80
|
+
}
|
|
81
|
+
if (parsed === '') {
|
|
82
|
+
parsed = "No diagnosis available, looks like we're missing an OpenAPI specification";
|
|
83
|
+
}
|
|
84
|
+
return html `
|
|
85
|
+
<div class="diagnostic-evaluation">
|
|
86
|
+
<div class="diagnostic-score">
|
|
87
|
+
<label>Overall score</label>
|
|
88
|
+
<div class="score ${this.scoreClass()}">
|
|
89
|
+
<span>${score}</span>
|
|
90
|
+
</div>
|
|
91
|
+
<span>${evalString}</span>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="evaluation">
|
|
94
|
+
<label>The doctor's diagnosis:</label>
|
|
95
|
+
<p class="diagnosis">
|
|
96
|
+
${unsafeHTML(parsed)}
|
|
97
|
+
</p>
|
|
98
|
+
<ul>
|
|
99
|
+
${renderedLinks}
|
|
100
|
+
</ul>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
DiagnosticEvaluation.styles = [listsCss, diagnosticEvaluationCss];
|
|
107
|
+
__decorate([
|
|
108
|
+
property({ type: Number })
|
|
109
|
+
], DiagnosticEvaluation.prototype, "score", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property()
|
|
112
|
+
], DiagnosticEvaluation.prototype, "evaluation", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property()
|
|
115
|
+
], DiagnosticEvaluation.prototype, "diagnosis", void 0);
|
|
116
|
+
DiagnosticEvaluation = __decorate([
|
|
117
|
+
customElement("pb33f-diagnostic-evaluation")
|
|
118
|
+
], DiagnosticEvaluation);
|
|
119
|
+
export { DiagnosticEvaluation };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
|
|
4
|
+
label {
|
|
5
|
+
font-size: 0.7rem;
|
|
6
|
+
font-family: var(--font-stack), monospace;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
span {
|
|
10
|
+
font-size: 0.7rem;
|
|
11
|
+
color: var(--primary-color);
|
|
12
|
+
font-family: var(--font-stack-bold), monospace;
|
|
13
|
+
text-shadow: 0 0 1rem var(--primary-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
`;
|