@pb33f/cowboy-components 0.0.14 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/dist/abap-DXvTa7XC.js +1404 -0
  2. package/dist/apex-DsQH3mjJ.js +332 -0
  3. package/dist/assets/css.worker-B_qZXUzt.js +84 -0
  4. package/dist/assets/editor.worker-HEmB0D7P.js +11 -0
  5. package/dist/assets/html.worker-D3WUrk8Q.js +458 -0
  6. package/dist/assets/json.worker-CAhUaBo4.js +42 -0
  7. package/dist/assets/rule-documentation.worker-BFIxMBU8.js +1 -0
  8. package/dist/assets/search-problems.worker-VJi4P9Gj.js +1 -0
  9. package/dist/azcli-Cir32SBk.js +74 -0
  10. package/dist/bat-BsNExolo.js +106 -0
  11. package/dist/bicep-2KcKzeQF.js +108 -0
  12. package/dist/cameligo-D0ezznwE.js +180 -0
  13. package/dist/clojure-DxYzAIlu.js +767 -0
  14. package/dist/coffee-DgiPTF3g.js +238 -0
  15. package/dist/components/editor/editor.d.ts +27 -0
  16. package/dist/components/editor/editor.js +192 -0
  17. package/dist/components/error-banner/error-banner.css.d.ts +2 -0
  18. package/dist/components/error-banner/error-banner.css.js +23 -0
  19. package/dist/components/error-banner/error-banner.d.ts +9 -0
  20. package/dist/components/error-banner/error-banner.js +40 -0
  21. package/dist/components/mailing-list/mailing-list.js +1 -1
  22. package/dist/components/paginator/paginator-events.d.ts +4 -0
  23. package/dist/components/paginator/paginator-events.js +4 -0
  24. package/dist/components/paginator/paginator-navigator.css.d.ts +2 -0
  25. package/dist/components/paginator/paginator-navigator.css.js +35 -0
  26. package/dist/components/paginator/paginator-navigator.d.ts +27 -0
  27. package/dist/components/paginator/paginator-navigator.js +168 -0
  28. package/dist/components/paginator/paginator.css.d.ts +2 -0
  29. package/dist/components/paginator/paginator.css.js +38 -0
  30. package/dist/components/paginator/paginator.d.ts +22 -0
  31. package/dist/components/paginator/paginator.js +122 -0
  32. package/dist/components/percent-bar/percent-bar.css.d.ts +2 -0
  33. package/dist/components/percent-bar/percent-bar.css.js +65 -0
  34. package/dist/components/percent-bar/percent-bar.d.ts +11 -0
  35. package/dist/components/percent-bar/percent-bar.js +85 -0
  36. package/dist/components/problem-list/details-drawer.css.d.ts +2 -0
  37. package/dist/components/problem-list/details-drawer.css.js +42 -0
  38. package/dist/components/problem-list/details-drawer.d.ts +22 -0
  39. package/dist/components/problem-list/details-drawer.js +66 -0
  40. package/dist/components/problem-list/filter.css.d.ts +2 -0
  41. package/dist/components/problem-list/filter.css.js +67 -0
  42. package/dist/components/problem-list/problem-item.css.d.ts +2 -0
  43. package/dist/components/problem-list/problem-item.css.js +170 -0
  44. package/dist/components/problem-list/problem-item.d.ts +27 -0
  45. package/dist/components/problem-list/problem-item.js +126 -0
  46. package/dist/components/problem-list/problem-label-view-filter.css.d.ts +2 -0
  47. package/dist/components/problem-list/problem-label-view-filter.css.js +6 -0
  48. package/dist/components/problem-list/problem-label-view-filter.d.ts +18 -0
  49. package/dist/components/problem-list/problem-label-view-filter.js +66 -0
  50. package/dist/components/problem-list/problem-list.css.d.ts +2 -0
  51. package/dist/components/problem-list/problem-list.css.js +59 -0
  52. package/dist/components/problem-list/problem-list.d.ts +37 -0
  53. package/dist/components/problem-list/problem-list.js +334 -0
  54. package/dist/components/problem-list/problem-mainview.css.d.ts +2 -0
  55. package/dist/components/problem-list/problem-mainview.css.js +100 -0
  56. package/dist/components/problem-list/problem-mainview.d.ts +20 -0
  57. package/dist/components/problem-list/problem-mainview.js +126 -0
  58. package/dist/components/problem-list/problem-rule-filter.d.ts +13 -0
  59. package/dist/components/problem-list/problem-rule-filter.js +67 -0
  60. package/dist/components/problem-list/problem-search-filter.d.ts +13 -0
  61. package/dist/components/problem-list/problem-search-filter.js +45 -0
  62. package/dist/components/problem-list/problem-sort-filter.d.ts +19 -0
  63. package/dist/components/problem-list/problem-sort-filter.js +67 -0
  64. package/dist/components/problem-list/problem-toolbar.css.d.ts +2 -0
  65. package/dist/components/problem-list/problem-toolbar.css.js +41 -0
  66. package/dist/components/problem-list/problem-toolbar.d.ts +14 -0
  67. package/dist/components/problem-list/problem-toolbar.js +63 -0
  68. package/dist/components/problem-list/shared.css.d.ts +2 -0
  69. package/dist/components/problem-list/shared.css.js +91 -0
  70. package/dist/components/problems-overview/diagnostic-evaluation.css.d.ts +2 -0
  71. package/dist/components/problems-overview/diagnostic-evaluation.css.js +178 -0
  72. package/dist/components/problems-overview/diagnostic-evaluation.d.ts +13 -0
  73. package/dist/components/problems-overview/diagnostic-evaluation.js +118 -0
  74. package/dist/components/problems-overview/document-statistic.css.d.ts +2 -0
  75. package/dist/components/problems-overview/document-statistic.css.js +16 -0
  76. package/dist/components/problems-overview/document-statistic.d.ts +10 -0
  77. package/dist/components/problems-overview/document-statistic.js +49 -0
  78. package/dist/components/problems-overview/problem-overview-group.css.d.ts +2 -0
  79. package/dist/components/problems-overview/problem-overview-group.css.js +84 -0
  80. package/dist/components/problems-overview/problem-overview-group.d.ts +17 -0
  81. package/dist/components/problems-overview/problem-overview-group.js +121 -0
  82. package/dist/components/problems-overview/problem-statistic.css.d.ts +2 -0
  83. package/dist/components/problems-overview/problem-statistic.css.js +40 -0
  84. package/dist/components/problems-overview/problem-statistic.d.ts +11 -0
  85. package/dist/components/problems-overview/problem-statistic.js +57 -0
  86. package/dist/components/problems-overview/problem-statistics.css.d.ts +2 -0
  87. package/dist/components/problems-overview/problem-statistics.css.js +46 -0
  88. package/dist/components/problems-overview/problem-statistics.d.ts +14 -0
  89. package/dist/components/problems-overview/problem-statistics.js +132 -0
  90. package/dist/components/problems-overview/problems-overview.css.d.ts +2 -0
  91. package/dist/components/problems-overview/problems-overview.css.js +49 -0
  92. package/dist/components/problems-overview/problems-overview.d.ts +21 -0
  93. package/dist/components/problems-overview/problems-overview.js +108 -0
  94. package/dist/components/render-json-path/render-json-path.css.d.ts +2 -0
  95. package/dist/components/render-json-path/render-json-path.css.js +86 -0
  96. package/dist/components/render-json-path/render-json-path.d.ts +11 -0
  97. package/dist/components/render-json-path/render-json-path.js +105 -0
  98. package/dist/components/the-doctor/settings.d.ts +5 -0
  99. package/dist/components/the-doctor/settings.js +22 -0
  100. package/dist/components/the-doctor/status-bar.css.d.ts +2 -0
  101. package/dist/components/the-doctor/status-bar.css.js +47 -0
  102. package/dist/components/the-doctor/status-bar.d.ts +12 -0
  103. package/dist/components/the-doctor/status-bar.js +71 -0
  104. package/dist/components/the-doctor/the-doctor.css.d.ts +2 -0
  105. package/dist/components/the-doctor/the-doctor.css.js +156 -0
  106. package/dist/components/the-doctor/the-doctor.d.ts +57 -0
  107. package/dist/components/the-doctor/the-doctor.js +340 -0
  108. package/dist/cowboy-components-BOuaCruy.js +114388 -0
  109. package/dist/cowboy-components.d.ts +5 -2
  110. package/dist/cowboy-components.js +8 -2
  111. package/dist/cowboy-components.umd.cjs +3997 -103
  112. package/dist/cpp-Bq-GnYlH.js +407 -0
  113. package/dist/csharp-IDcibKAT.js +332 -0
  114. package/dist/csp-QdYr8JWa.js +59 -0
  115. package/dist/css/button.css.d.ts +2 -0
  116. package/dist/css/button.css.js +34 -0
  117. package/dist/css/chroma-synxtax.css.d.ts +2 -0
  118. package/dist/css/chroma-synxtax.css.js +130 -0
  119. package/dist/css/cowboy-components.css +3 -0
  120. package/dist/css/links.css.d.ts +2 -0
  121. package/dist/css/links.css.js +17 -0
  122. package/dist/css/lists.css.d.ts +2 -0
  123. package/dist/css/lists.css.js +43 -0
  124. package/dist/css/pb33f-theme.css +2 -2
  125. package/dist/css/syntax.css.js +1 -1
  126. package/dist/css-C-wMMefI.js +193 -0
  127. package/dist/cssMode-Cvbhe77l.js +1541 -0
  128. package/dist/cypher-BfBo9yir.js +269 -0
  129. package/dist/dart-Cv3rVfv_.js +287 -0
  130. package/dist/dockerfile-DyCXBGhV.js +136 -0
  131. package/dist/ecl-COP_iObm.js +462 -0
  132. package/dist/elixir-DoEhbk9F.js +575 -0
  133. package/dist/events/doctor.d.ts +51 -0
  134. package/dist/events/doctor.js +17 -0
  135. package/dist/flow9-DuHGSNW1.js +148 -0
  136. package/dist/freemarker2-DmhDQrVn.js +995 -0
  137. package/dist/fsharp-Dv9PDxVO.js +223 -0
  138. package/dist/go-CcdAeqiK.js +224 -0
  139. package/dist/graphql-CoRm4b1H.js +157 -0
  140. package/dist/handlebars-DWUSy2Nn.js +425 -0
  141. package/dist/hcl-BSgAhV5f.js +189 -0
  142. package/dist/html-BTxdvu8o.js +314 -0
  143. package/dist/htmlMode-DeG-6tqP.js +1551 -0
  144. package/dist/ini-ewx9HLIq.js +77 -0
  145. package/dist/java-B5lwcbTy.js +238 -0
  146. package/dist/javascript-CQTBmqTv.js +76 -0
  147. package/dist/jsonMode-DJhhXlcK.js +1958 -0
  148. package/dist/julia-NCcg_P_q.js +517 -0
  149. package/dist/kotlin-BYlnmGrb.js +259 -0
  150. package/dist/less-DG4tqgOo.js +168 -0
  151. package/dist/lexon-CTTPcJLv.js +163 -0
  152. package/dist/liquid-OuSl50Zm.js +246 -0
  153. package/dist/lua-CxQ1RWuo.js +168 -0
  154. package/dist/m3-mHFfpmgx.js +216 -0
  155. package/dist/markdown-Dh6sYULt.js +235 -0
  156. package/dist/mdx-Cs8POpae.js +171 -0
  157. package/dist/mips-CNUcjHD1.js +204 -0
  158. package/dist/model/document-statistics.d.ts +40 -0
  159. package/dist/model/document-statistics.js +4 -0
  160. package/dist/model/how_to_fix.d.ts +4 -0
  161. package/dist/model/how_to_fix.js +1 -0
  162. package/dist/model/problem.d.ts +19 -0
  163. package/dist/model/problem.js +106 -0
  164. package/dist/model/rule_documentation.d.ts +5 -0
  165. package/dist/model/rule_documentation.js +1 -0
  166. package/dist/model/session.d.ts +5 -0
  167. package/dist/model/session.js +1 -0
  168. package/dist/msdax-ZvxFeKvs.js +381 -0
  169. package/dist/mysql-COjg31sJ.js +884 -0
  170. package/dist/objective-c-BqrCFBhT.js +189 -0
  171. package/dist/pascal-CUpkilAS.js +257 -0
  172. package/dist/pascaligo-nJfvRJ7x.js +170 -0
  173. package/dist/perl-CWsX6Ysg.js +632 -0
  174. package/dist/pgsql-DwgpEXC8.js +857 -0
  175. package/dist/php-CrbKyd62.js +506 -0
  176. package/dist/pla-JxXT6Kb-.js +143 -0
  177. package/dist/postiats-BOdnTRGv.js +913 -0
  178. package/dist/powerquery-DTkwcXGH.js +896 -0
  179. package/dist/powershell-Cx53dGpt.js +245 -0
  180. package/dist/protobuf-Dp9vE-l-.js +426 -0
  181. package/dist/pug-BSjKVjwP.js +408 -0
  182. package/dist/python-BsXAz21q.js +282 -0
  183. package/dist/qsharp-C5P1RxY3.js +291 -0
  184. package/dist/r-sEMYnclc.js +249 -0
  185. package/dist/razor-CXJ9MZn4.js +556 -0
  186. package/dist/redis-DbzUc-fU.js +308 -0
  187. package/dist/redshift-nrLijj1O.js +815 -0
  188. package/dist/restructuredtext-CIbGUl6T.js +180 -0
  189. package/dist/ruby-JcYJisWg.js +517 -0
  190. package/dist/rust-BgbFBFXH.js +349 -0
  191. package/dist/sb-hRFFChi7.js +121 -0
  192. package/dist/scala-Cs0yVo3Q.js +376 -0
  193. package/dist/scheme-l_0jNtxy.js +114 -0
  194. package/dist/scss-C4l7ZIRR.js +268 -0
  195. package/dist/services/linting-service.d.ts +12 -0
  196. package/dist/services/linting-service.js +121 -0
  197. package/dist/shell-ikLk_l24.js +227 -0
  198. package/dist/solidity-4GxCaH9e.js +1373 -0
  199. package/dist/sophia-tX0WEZsZ.js +205 -0
  200. package/dist/sparql-D7ky-uMk.js +207 -0
  201. package/dist/sql-CqEfBVGS.js +859 -0
  202. package/dist/st-CNWQPqyI.js +422 -0
  203. package/dist/style.css +1 -1
  204. package/dist/swift-C_fDfC0d.js +318 -0
  205. package/dist/systemverilog-gAvsEtN_.js +582 -0
  206. package/dist/tcl-KbBChuA6.js +238 -0
  207. package/dist/tsMode-C-mwN8lz.js +886 -0
  208. package/dist/twig-Bb652BpM.js +398 -0
  209. package/dist/typescript-CamPbG-s.js +349 -0
  210. package/dist/vb-2e5hSeUh.js +378 -0
  211. package/dist/wgsl-CYSDq0zg.js +445 -0
  212. package/dist/workers/rule-documentation.worker.d.ts +1 -0
  213. package/dist/workers/rule-documentation.worker.js +85 -0
  214. package/dist/workers/search-problems.worker.d.ts +1 -0
  215. package/dist/workers/search-problems.worker.js +19 -0
  216. package/dist/xml-CrDvxVsf.js +101 -0
  217. package/dist/yaml-xGWjZwPI.js +212 -0
  218. 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 { ProblemSearchFilterChanged, } from "@/events/doctor.js";
13
+ import filterCss from "./filter.css.js";
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 { ProblemSortFilterChanged } from "@/events/doctor.js";
13
+ import problemLabelViewFilterCss from "./problem-label-view-filter.css.js";
14
+ import filterCss from "./filter.css.js";
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,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -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.js";
10
+ import { ProblemSortFilter } from "./problem-sort-filter.js";
11
+ import { ProblemSearchFilter } from "./problem-search-filter.js";
12
+ import { Rules, ProblemRuleFilter } from "./problem-rule-filter.js";
13
+ import problemToolbarCss from "./problem-toolbar.css.js";
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,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -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,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -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,118 @@
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 { marked } from "marked";
10
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
11
+ import { ProblemDrawerEventType } from "@/components/problem-list/details-drawer.js";
12
+ import { OpenProblemDrawer } from "@/events/doctor.js";
13
+ import diagnosticEvaluationCss from "./diagnostic-evaluation.css.js";
14
+ import listsCss from "@/css/lists.css.js";
15
+ let DiagnosticEvaluation = class DiagnosticEvaluation extends LitElement {
16
+ constructor() {
17
+ super();
18
+ this.links = [];
19
+ this.evaluation = "Unknown";
20
+ }
21
+ scoreClass() {
22
+ if (this.score === 0) {
23
+ return "zero";
24
+ }
25
+ if (this.score >= 90) {
26
+ return "five";
27
+ }
28
+ else if (this.score >= 70) {
29
+ return "four";
30
+ }
31
+ else if (this.score >= 50) {
32
+ return "three";
33
+ }
34
+ else if (this.score >= 30) {
35
+ return "two";
36
+ }
37
+ else {
38
+ return "one";
39
+ }
40
+ }
41
+ viewRuleDocs(ruleName) {
42
+ this.dispatchEvent(new CustomEvent(OpenProblemDrawer, {
43
+ bubbles: true,
44
+ composed: true,
45
+ detail: {
46
+ type: ProblemDrawerEventType.RULE_DOCS,
47
+ rule: ruleName
48
+ }
49
+ }));
50
+ }
51
+ convertToLinks(text) {
52
+ const regex = /#\{([^}]+)}/g;
53
+ // @ts-ignore
54
+ const replaced = text.replace(regex, (match, p1) => {
55
+ this.links.push(p1);
56
+ return ``;
57
+ });
58
+ return replaced;
59
+ }
60
+ render() {
61
+ this.links = [];
62
+ let parsed = this.convertToLinks(marked.parse(this.diagnosis).toString());
63
+ this.links.sort((a, b) => {
64
+ return a.localeCompare(b);
65
+ });
66
+ const renderedLinks = this.links.map((link) => {
67
+ return html `<li><a href="#" @click=${() => { this.viewRuleDocs(link); }}>${link}</a></li>`;
68
+ });
69
+ let evalString = this.evaluation;
70
+ if (evalString === '') {
71
+ evalString = "Unknown";
72
+ }
73
+ let score = this.score;
74
+ if (score === 0) {
75
+ score = "??";
76
+ }
77
+ else {
78
+ score = this.score + '%';
79
+ }
80
+ if (parsed === '') {
81
+ parsed = "No diagnosis available, looks like we're missing an OpenAPI specification";
82
+ }
83
+ return html `
84
+ <div class="diagnostic-evaluation">
85
+ <div class="diagnostic-score">
86
+ <label>Overall score</label>
87
+ <div class="score ${this.scoreClass()}">
88
+ <span>${score}</span>
89
+ </div>
90
+ <span>${evalString}</span>
91
+ </div>
92
+ <div class="evaluation">
93
+ <label>The doctor's diagnosis:</label>
94
+ <p class="diagnosis">
95
+ ${unsafeHTML(parsed)}
96
+ </p>
97
+ <ul>
98
+ ${renderedLinks}
99
+ </ul>
100
+ </div>
101
+ </div>
102
+ `;
103
+ }
104
+ };
105
+ DiagnosticEvaluation.styles = [listsCss, diagnosticEvaluationCss];
106
+ __decorate([
107
+ property({ type: Number })
108
+ ], DiagnosticEvaluation.prototype, "score", void 0);
109
+ __decorate([
110
+ property()
111
+ ], DiagnosticEvaluation.prototype, "evaluation", void 0);
112
+ __decorate([
113
+ property()
114
+ ], DiagnosticEvaluation.prototype, "diagnosis", void 0);
115
+ DiagnosticEvaluation = __decorate([
116
+ customElement("pb33f-diagnostic-evaluation")
117
+ ], DiagnosticEvaluation);
118
+ export { DiagnosticEvaluation };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -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
+ `;