@pb33f/cowboy-components 0.1.10 → 0.1.12
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/assets/css.worker-B_qZXUzt.js +84 -0
- package/dist/assets/html.worker-D3WUrk8Q.js +458 -0
- package/dist/assets/json.worker-CAhUaBo4.js +42 -0
- package/dist/components/editor/editor.js +13 -19
- package/dist/components/percent-bar/percent-bar.js +0 -1
- package/dist/components/problem-list/details-drawer.js +1 -2
- package/dist/components/problem-list/problem-item.js +0 -1
- package/dist/components/problem-list/problem-label-view-filter.js +1 -2
- package/dist/components/problem-list/problem-list.d.ts +1 -1
- package/dist/components/problem-list/problem-list.js +3 -3
- package/dist/components/problem-list/problem-mainview.js +1 -2
- package/dist/components/problem-list/problem-search-filter.js +1 -2
- package/dist/components/problem-list/problem-sort-filter.js +1 -2
- package/dist/components/problem-list/problem-toolbar.js +1 -2
- package/dist/components/problems-overview/diagnostic-evaluation.js +1 -2
- package/dist/components/problems-overview/document-statistic.js +1 -2
- package/dist/components/problems-overview/problem-overview-group.js +1 -2
- package/dist/components/problems-overview/problem-statistics.d.ts +0 -1
- package/dist/components/problems-overview/problem-statistics.js +1 -10
- package/dist/components/the-doctor/feedback.js +11 -1
- package/dist/components/the-doctor/settings.js +1 -3
- package/dist/components/the-doctor/status-bar.js +1 -1
- package/dist/components/the-doctor/the-doctor.d.ts +1 -1
- package/dist/components/the-doctor/the-doctor.js +17 -15
- package/dist/cowboy-components.umd.cjs +69 -69
- package/dist/services/feedback-service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -14,24 +14,24 @@ import styles from "monaco-editor/min/vs/editor/editor.main.css?inline";
|
|
|
14
14
|
// @ts-ignore
|
|
15
15
|
import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
|
|
16
16
|
// @ts-ignore
|
|
17
|
-
|
|
17
|
+
import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
|
|
19
|
+
import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
|
|
21
|
+
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
|
|
22
22
|
import { EditorClicked, EditorUpdated } from "../../events/doctor.js";
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
self.MonacoEnvironment = {
|
|
25
|
-
getWorker(_) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
getWorker(_, label) {
|
|
26
|
+
if (label === "json") {
|
|
27
|
+
return new jsonWorker();
|
|
28
|
+
}
|
|
29
|
+
if (label === "html") {
|
|
30
|
+
return new htmlWorker();
|
|
31
|
+
}
|
|
32
|
+
if (label === "css" || label === "scss" || label === "less") {
|
|
33
|
+
return new cssWorker();
|
|
34
|
+
}
|
|
35
35
|
return new editorWorker();
|
|
36
36
|
},
|
|
37
37
|
};
|
|
@@ -157,7 +157,6 @@ let SpecEditor = class SpecEditor extends LitElement {
|
|
|
157
157
|
column: e.target.position?.column
|
|
158
158
|
}
|
|
159
159
|
}));
|
|
160
|
-
//this.editor?.getAction("editor.action.revealDefinition")!.run()
|
|
161
160
|
});
|
|
162
161
|
window
|
|
163
162
|
.matchMedia("(prefers-color-scheme: dark)")
|
|
@@ -190,8 +189,3 @@ SpecEditor = __decorate([
|
|
|
190
189
|
customElement("pb33f-editor")
|
|
191
190
|
], SpecEditor);
|
|
192
191
|
export { SpecEditor };
|
|
193
|
-
// declare global {
|
|
194
|
-
// interface HTMLElementTagNameMap {
|
|
195
|
-
// "pb33f-editor": SpecEditor;
|
|
196
|
-
// }
|
|
197
|
-
// }
|
|
@@ -25,8 +25,7 @@ let ProblemDetailsDrawer = class ProblemDetailsDrawer extends LitElement {
|
|
|
25
25
|
<sl-drawer contained label="${this.label}" class="drawer" style="--size: 800px;">
|
|
26
26
|
${this.content}
|
|
27
27
|
<sl-button slot="footer" @click=${this.close} variant="primary" class="button-primary">close panel</sl-button>
|
|
28
|
-
</sl-drawer
|
|
29
|
-
`;
|
|
28
|
+
</sl-drawer>`;
|
|
30
29
|
}
|
|
31
30
|
open(event) {
|
|
32
31
|
this.label = "";
|
|
@@ -80,7 +80,6 @@ let ProblemItem = class ProblemItem extends LitElement {
|
|
|
80
80
|
selectedClass = "selected-sibling";
|
|
81
81
|
sl = true;
|
|
82
82
|
}
|
|
83
|
-
//<pb33f-render-json-path path="${this.problem}" .selected=${sl} class="${this.selectedSibling? 'selectedPath': ''}"></pb33f-render-json-path>
|
|
84
83
|
return html `
|
|
85
84
|
<div @click="${this.selectedProblem}" class="problem ${selectedClass}">
|
|
86
85
|
<div class="icon ${getProblemClass(this.problemObject)} class="${sl ? selectedClass : ''}"">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import { ProblemItem } from "
|
|
2
|
+
import { ProblemItem } from "./problem-item.js";
|
|
3
3
|
import { MainViewSlideChangedEvent, ProblemClickedEvent, ProblemRuleFilterChangedEvent } from "../../events/doctor";
|
|
4
4
|
import { Problem } from "../../model/problem";
|
|
5
5
|
export declare class ProblemList extends LitElement {
|
|
@@ -6,8 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from "lit/decorators.js";
|
|
8
8
|
import { html, LitElement } from "lit";
|
|
9
|
-
import { ProblemItem } from "
|
|
10
|
-
import { ProblemMainView } from "
|
|
9
|
+
import { ProblemItem } from "./problem-item.js";
|
|
10
|
+
import { ProblemMainView } from "./problem-mainview.js";
|
|
11
11
|
import { MainViewSlideChanged, ProblemClicked, ProblemLabelViewFilterChanged, ProblemSortFilterChanged, ProblemSearchFilterChanged, MessageEvent, ProblemRuleFilterChanged, ProblemRuleFilterChangedManual } from "../../events/doctor";
|
|
12
12
|
import problemListCss from "./problem-list.css";
|
|
13
13
|
import sharedCss from "../../css/shared.css";
|
|
@@ -16,8 +16,8 @@ import { ProblemToolbar } from "./problem-toolbar";
|
|
|
16
16
|
import { ProblemLabelView } from "./problem-label-view-filter";
|
|
17
17
|
import { Paginator } from "../paginator/paginator";
|
|
18
18
|
import { ProblemSortView } from "./problem-sort-filter";
|
|
19
|
-
import SearchWorker from "../../workers/search-problems.worker?worker";
|
|
20
19
|
import { Rules } from "./problem-rule-filter";
|
|
20
|
+
import SearchWorker from "../../workers/search-problems.worker?worker";
|
|
21
21
|
let ProblemList = class ProblemList extends LitElement {
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
@@ -28,8 +28,7 @@ let ProblemSearchFilter = class ProblemSearchFilter extends LitElement {
|
|
|
28
28
|
return html `
|
|
29
29
|
<div class="filter">
|
|
30
30
|
<sl-input @sl-change=${this.search} placeholder="search" clearable></sl-input>
|
|
31
|
-
</div
|
|
32
|
-
`;
|
|
31
|
+
</div>`;
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
ProblemSearchFilter.styles = [filterCss];
|
|
@@ -29,8 +29,7 @@ let DocumentStatistic = class DocumentStatistic extends LitElement {
|
|
|
29
29
|
}
|
|
30
30
|
return html `
|
|
31
31
|
<label>${this.label}:</label>
|
|
32
|
-
<span>${formatted}${this.postfix}</span
|
|
33
|
-
`;
|
|
32
|
+
<span>${formatted}${this.postfix}</span>`;
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
DocumentStatistic.styles = [documentStatisticCss];
|
|
@@ -89,8 +89,7 @@ let ProblemOverviewGroup = class ProblemOverviewGroup extends LitElement {
|
|
|
89
89
|
<div class="action-buttons">
|
|
90
90
|
<sl-button @click="${this.selectRule}">${this.totalViolations} ></sl-button>
|
|
91
91
|
</div>
|
|
92
|
-
</div
|
|
93
|
-
`;
|
|
92
|
+
</div>`;
|
|
94
93
|
}
|
|
95
94
|
};
|
|
96
95
|
ProblemOverviewGroup.styles = [sharedCss, buttonCss, problemOverviewGroupCss];
|
|
@@ -13,17 +13,9 @@ import { Problem } from "../../model/problem.js";
|
|
|
13
13
|
import problemStatisticsCss from "./problem-statistics.css.js";
|
|
14
14
|
import { DocumentStatistics } from "../../model/document-statistics.js";
|
|
15
15
|
let ProblemStatisticsComponent = class ProblemStatisticsComponent extends LitElement {
|
|
16
|
-
// private problemStatistics: ProblemStatistics;
|
|
17
16
|
constructor() {
|
|
18
17
|
super();
|
|
19
18
|
}
|
|
20
|
-
willUpdate() {
|
|
21
|
-
// if (this.problemStatistics) {
|
|
22
|
-
// this.problemStatistics.problems = this.problems;
|
|
23
|
-
// } else {
|
|
24
|
-
// this.problemStatistics = new ProblemStatistics(this.problems);
|
|
25
|
-
// }
|
|
26
|
-
}
|
|
27
19
|
render() {
|
|
28
20
|
const totalViolations = this.problems.length;
|
|
29
21
|
const rulesViolated = new Set(this.problems.map((problem) => {
|
|
@@ -115,8 +107,7 @@ let ProblemStatisticsComponent = class ProblemStatisticsComponent extends LitEle
|
|
|
115
107
|
value="${this.drDiagnostics?.statistics.totalInfo}" isInform>
|
|
116
108
|
</pb33f-problem-statistic>
|
|
117
109
|
</sl-card>
|
|
118
|
-
</div
|
|
119
|
-
`;
|
|
110
|
+
</div>`;
|
|
120
111
|
}
|
|
121
112
|
};
|
|
122
113
|
ProblemStatisticsComponent.styles = [problemStatisticsCss];
|
|
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import '@shoelace-style/shoelace/dist/components/textarea/textarea.js';
|
|
8
8
|
import { customElement, query, state } from "lit/decorators.js";
|
|
9
9
|
import { html, LitElement } from "lit";
|
|
10
|
+
import { FeedbackService } from "../../services/feedback-service";
|
|
10
11
|
import feedbackCss from "./feedback.css.js";
|
|
11
12
|
import buttonCss from "../../css/button.css";
|
|
12
13
|
import sharedCss from "../../css/shared.css";
|
|
13
|
-
import { FeedbackService } from "@/services/feedback-service";
|
|
14
14
|
let FeedbackComponent = class FeedbackComponent extends LitElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -30,6 +30,14 @@ let FeedbackComponent = class FeedbackComponent extends LitElement {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
+
const mailinglist = html `
|
|
34
|
+
<hr/>
|
|
35
|
+
<h3>Sign up for updates</h3>
|
|
36
|
+
<p>
|
|
37
|
+
Want to know what's happening at <a href="https://pb33f.io">pb33f</a>? Join our mailing list
|
|
38
|
+
and stay up to date with the latest news and gossip.
|
|
39
|
+
</p>
|
|
40
|
+
<pb33f-mailing-list></pb33f-mailing-list>`;
|
|
33
41
|
if (!this.sent) {
|
|
34
42
|
return html `
|
|
35
43
|
<div class="feedback">
|
|
@@ -49,6 +57,7 @@ let FeedbackComponent = class FeedbackComponent extends LitElement {
|
|
|
49
57
|
size="small" @sl-input="${this.toggleButton}">
|
|
50
58
|
</sl-textarea>
|
|
51
59
|
<sl-button @click="${this.send}" disabled>Send Feedback</sl-button>
|
|
60
|
+
${mailinglist}
|
|
52
61
|
</div>
|
|
53
62
|
`;
|
|
54
63
|
}
|
|
@@ -60,6 +69,7 @@ let FeedbackComponent = class FeedbackComponent extends LitElement {
|
|
|
60
69
|
<a href="https://quobix.com">quobix</a> via discord.
|
|
61
70
|
</pb33f-attention-box>
|
|
62
71
|
</div>
|
|
72
|
+
${mailinglist}
|
|
63
73
|
`;
|
|
64
74
|
}
|
|
65
75
|
}
|
|
@@ -6,9 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement, property, query } from "lit/decorators.js";
|
|
8
8
|
import { html, LitElement } from "lit";
|
|
9
|
+
import buttonCss from "../../css/button.css";
|
|
9
10
|
import statusBarCss from "./status-bar.css.js";
|
|
10
11
|
import linksCss from "../../css/links.css.js";
|
|
11
|
-
import buttonCss from "../../css/button.css";
|
|
12
12
|
let StatusBar = class StatusBar extends LitElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
@@ -60,6 +60,6 @@ export declare class TheDoctor extends LitElement {
|
|
|
60
60
|
specChanged(event: CustomEvent<EditorUpdatedEvent>): void;
|
|
61
61
|
toggleOWASP(): void;
|
|
62
62
|
boostrap(): void;
|
|
63
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
64
63
|
closeWelcome(): void;
|
|
64
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
65
65
|
}
|
|
@@ -15,20 +15,20 @@ import { customElement, property, query } from "lit/decorators.js";
|
|
|
15
15
|
import { html, LitElement } from "lit";
|
|
16
16
|
import { SpecEditor } from "../editor/editor.js";
|
|
17
17
|
import { ActiveView, EditorClicked, EditorUpdated, OpenProblemDrawer, ProblemClicked, ProblemRuleFilterChangedManual, RuleClicked } from "../../events/doctor.js";
|
|
18
|
+
import { ProblemDetailsDrawer, ProblemDrawerEventType } from "../problem-list/details-drawer.js";
|
|
18
19
|
import { CreateBagManager } from "@pb33f/saddlebag";
|
|
19
20
|
import { LintingService } from "../../services/linting-service.js";
|
|
20
|
-
import { ProblemList } from "
|
|
21
|
+
import { ProblemList } from "../problem-list/problem-list.js";
|
|
21
22
|
import { Problem } from "../../model/problem.js";
|
|
22
|
-
import { ProblemDetailsDrawer, ProblemDrawerEventType } from "../problem-list/details-drawer.js";
|
|
23
|
-
import RuleDocumentationWorker from "../../workers/rule-documentation.worker.js?worker";
|
|
24
23
|
import { ProblemsOverview } from "../problems-overview/problems-overview.js";
|
|
25
24
|
import { ErrorBanner } from "../error-banner/error-banner.js";
|
|
26
|
-
import { StatusBar } from "
|
|
25
|
+
import { StatusBar } from "./status-bar.js";
|
|
27
26
|
import { FeedbackComponent } from "./feedback.js";
|
|
28
|
-
import theDoctorCss from "./the-doctor.css.js";
|
|
29
|
-
import linksCss from "../../css/links.css";
|
|
30
27
|
import { FeedbackService } from "../../services/feedback-service";
|
|
31
28
|
import { ActivitySpinner } from "./activity-spinner";
|
|
29
|
+
import RuleDocumentationWorker from "../../workers/rule-documentation.worker.js?worker";
|
|
30
|
+
import theDoctorCss from "./the-doctor.css.js";
|
|
31
|
+
import linksCss from "../../css/links.css";
|
|
32
32
|
export const DoctorDocumentBag = "pb33f-doctor-editor";
|
|
33
33
|
export const HowToFixBag = "pb33f-doctor-howtofix";
|
|
34
34
|
export const RuleDocumentationBag = "pb33f-doctor-ruledocs";
|
|
@@ -89,7 +89,7 @@ let TheDoctor = class TheDoctor extends LitElement {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
history.pushState({
|
|
92
|
+
//history.pushState({view: ActiveView.Overview}, "", ActiveView.Overview);
|
|
93
93
|
}
|
|
94
94
|
ruleGroupClicked(event) {
|
|
95
95
|
this.problemsPanel.focus();
|
|
@@ -313,14 +313,21 @@ let TheDoctor = class TheDoctor extends LitElement {
|
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
+
closeWelcome() {
|
|
317
|
+
this.welcomeBox.hide();
|
|
318
|
+
localStorage.setItem("pb33f-doctor-welcome", "closed");
|
|
319
|
+
}
|
|
316
320
|
render() {
|
|
317
321
|
let overlay = html ``;
|
|
318
322
|
if (this.unavailable) {
|
|
319
323
|
overlay = html `
|
|
320
324
|
<div class="overlay" @click="return false"></div>`;
|
|
321
325
|
}
|
|
322
|
-
let welcomeBox = html `
|
|
323
|
-
|
|
326
|
+
let welcomeBox = html `
|
|
327
|
+
<pb33f-attention-box id="welcome" type="success"
|
|
328
|
+
headerText="Welcome to the clinic, I am the OpenAPI doctor." closeable>
|
|
329
|
+
This is an <strong>early preview</strong> of a new <a href="https://pb33f.io">pb33f</a> product,
|
|
330
|
+
built on top of our very own open source and free software.
|
|
324
331
|
If you find a bug, please let us know in the <strong>feedback</strong> tab. <br/><br/>
|
|
325
332
|
<a href="#" @click="${this.closeWelcome}">[Close this message]</a>
|
|
326
333
|
</pb33f-attention-box>`;
|
|
@@ -366,12 +373,7 @@ let TheDoctor = class TheDoctor extends LitElement {
|
|
|
366
373
|
</div>
|
|
367
374
|
</sl-split-panel>
|
|
368
375
|
${this.statusBar}
|
|
369
|
-
</div
|
|
370
|
-
`;
|
|
371
|
-
}
|
|
372
|
-
closeWelcome() {
|
|
373
|
-
this.welcomeBox.hide();
|
|
374
|
-
localStorage.setItem("pb33f-doctor-welcome", "closed");
|
|
376
|
+
</div>`;
|
|
375
377
|
}
|
|
376
378
|
};
|
|
377
379
|
TheDoctor.styles = [theDoctorCss, linksCss];
|