@pb33f/cowboy-components 0.6.6 → 0.7.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/assets/equalizer.worker-DyLD5JTU.js +1 -0
- package/dist/assets/search-problems.worker-BAF8L2rX.js +1 -0
- package/dist/components/auth/oauth-login.js +0 -1
- package/dist/components/changelog/changelog.js +1 -1
- package/dist/components/charts/beefy-chart.d.ts +21 -0
- package/dist/components/charts/beefy-chart.js +159 -0
- package/dist/components/charts/chart-colors.d.ts +27 -0
- package/dist/components/charts/chart-colors.js +76 -0
- package/dist/components/charts/config.d.ts +15 -0
- package/dist/components/charts/config.js +35 -0
- package/dist/components/charts/doughnut-chart.d.ts +22 -0
- package/dist/components/charts/doughnut-chart.js +128 -0
- package/dist/components/editor/editor.d.ts +9 -3
- package/dist/components/editor/editor.js +115 -60
- package/dist/components/editor/init.d.ts +0 -0
- package/dist/components/editor/init.js +28 -0
- package/dist/components/editor/schemas/openapi3.json +1651 -0
- package/dist/components/editor/schemas/openapi31.json +1449 -0
- package/dist/components/model-icon/model-icon.js +3 -0
- package/dist/components/model-renderer/callback.js +2 -1
- package/dist/components/model-renderer/change.css.d.ts +2 -0
- package/dist/components/model-renderer/change.css.js +254 -0
- package/dist/components/model-renderer/changes.d.ts +19 -0
- package/dist/components/model-renderer/changes.js +306 -0
- package/dist/components/model-renderer/clickable-ref.d.ts +10 -6
- package/dist/components/model-renderer/clickable-ref.js +9 -0
- package/dist/components/model-renderer/components.js +1 -0
- package/dist/components/model-renderer/contact.js +2 -1
- package/dist/components/model-renderer/document.js +11 -9
- package/dist/components/model-renderer/encoding.js +1 -0
- package/dist/components/model-renderer/example.js +1 -0
- package/dist/components/model-renderer/external-docs.js +1 -0
- package/dist/components/model-renderer/has-changes.d.ts +8 -0
- package/dist/components/model-renderer/has-changes.js +50 -0
- package/dist/components/model-renderer/header.js +1 -0
- package/dist/components/model-renderer/info.js +3 -1
- package/dist/components/model-renderer/license.js +3 -3
- package/dist/components/model-renderer/link.js +1 -1
- package/dist/components/model-renderer/media-type.js +1 -1
- package/dist/components/model-renderer/oauth-flows.js +2 -1
- package/dist/components/model-renderer/operation.js +2 -1
- package/dist/components/model-renderer/parameter.js +1 -0
- package/dist/components/model-renderer/path-item.js +1 -0
- package/dist/components/model-renderer/paths.js +1 -0
- package/dist/components/model-renderer/rendered-node.js +20 -20
- package/dist/components/model-renderer/rendered-property.css.js +4 -0
- package/dist/components/model-renderer/rendered-property.js +5 -2
- package/dist/components/model-renderer/request-body.js +1 -1
- package/dist/components/model-renderer/response.js +1 -1
- package/dist/components/model-renderer/schema.js +57 -54
- package/dist/components/model-renderer/security-scheme.js +1 -1
- package/dist/components/model-renderer/server.js +1 -0
- package/dist/components/model-renderer/tag.js +3 -1
- package/dist/components/model-tree/tree.d.ts +7 -4
- package/dist/components/model-tree/tree.js +54 -25
- package/dist/components/paginator/paginator.css.js +6 -3
- package/dist/components/paginator/paginator.d.ts +1 -0
- package/dist/components/paginator/paginator.js +26 -7
- package/dist/components/problem-list/problem-mainview.js +8 -1
- package/dist/components/rodeo/npm/download-statistic.d.ts +41 -0
- package/dist/components/rodeo/npm/download-statistic.js +634 -0
- package/dist/components/rodeo/rodeo-nav.js +1 -0
- package/dist/components/rodeo/rodeo.d.ts +1 -0
- package/dist/components/rodeo/rodeo.js +9 -2
- package/dist/components/rodeo/statistic.css.js +17 -0
- package/dist/components/rodeo/statistic.d.ts +4 -2
- package/dist/components/rodeo/statistic.js +15 -4
- package/dist/components/the-doctor/settings.css.d.ts +2 -0
- package/dist/components/the-doctor/settings.css.js +28 -0
- package/dist/components/the-doctor/settings.d.ts +13 -0
- package/dist/components/the-doctor/settings.js +83 -2
- package/dist/components/the-doctor/sparks.d.ts +3 -0
- package/dist/components/the-doctor/sparks.js +16 -5
- package/dist/components/the-doctor/the-doctor.css.js +80 -47
- package/dist/components/the-doctor/the-doctor.d.ts +24 -6
- package/dist/components/the-doctor/the-doctor.js +344 -109
- package/dist/components/the-doctor/upload-archive.js +1 -1
- package/dist/components/theme-switcher/theme-switcher.d.ts +1 -1
- package/dist/components/theme-switcher/theme-switcher.js +5 -2
- package/dist/components/time-vortex/change-list-item.css.d.ts +2 -0
- package/dist/components/time-vortex/change-list-item.css.js +96 -0
- package/dist/components/time-vortex/change-list-item.d.ts +10 -0
- package/dist/components/time-vortex/change-list-item.js +58 -0
- package/dist/components/time-vortex/history-picker.css.d.ts +2 -0
- package/dist/components/time-vortex/history-picker.css.js +90 -0
- package/dist/components/time-vortex/history-picker.d.ts +18 -0
- package/dist/components/time-vortex/history-picker.js +143 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.css.d.ts +2 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.css.js +144 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.d.ts +11 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.js +153 -0
- package/dist/components/time-vortex/tardis-control.css.d.ts +2 -0
- package/dist/components/time-vortex/tardis-control.css.js +103 -0
- package/dist/components/time-vortex/tardis-control.d.ts +32 -0
- package/dist/components/time-vortex/tardis-control.js +286 -0
- package/dist/components/time-vortex/time-vortex.d.ts +17 -0
- package/dist/components/time-vortex/time-vortex.js +75 -0
- package/dist/components/time-vortex/timeline-view.css.d.ts +2 -0
- package/dist/components/time-vortex/timeline-view.css.js +28 -0
- package/dist/components/time-vortex/timeline-view.d.ts +32 -0
- package/dist/components/time-vortex/timeline-view.js +233 -0
- package/dist/components/timeline/timeline-item.css.js +95 -48
- package/dist/components/timeline/timeline-item.d.ts +1 -0
- package/dist/components/timeline/timeline-item.js +20 -1
- package/dist/components/timeline/timeline.css.js +46 -40
- package/dist/components/timeline/timeline.d.ts +1 -0
- package/dist/components/timeline/timeline.js +9 -5
- package/dist/components/toast/toast-component.css.js +4 -0
- package/dist/components/visualizer/equalizer.d.ts +2 -0
- package/dist/components/visualizer/equalizer.js +13 -5
- package/dist/components/visualizer/explorer.d.ts +5 -0
- package/dist/components/visualizer/explorer.js +41 -37
- package/dist/components/visualizer/foreign-object.js +3 -0
- package/dist/components/visualizer/nodes/callback.js +3 -1
- package/dist/components/visualizer/nodes/changes.css.d.ts +2 -0
- package/dist/components/visualizer/nodes/changes.css.js +33 -0
- package/dist/components/visualizer/nodes/components.js +3 -1
- package/dist/components/visualizer/nodes/contact.js +3 -1
- package/dist/components/visualizer/nodes/document.js +1 -0
- package/dist/components/visualizer/nodes/graph-node.d.ts +8 -7
- package/dist/components/visualizer/nodes/graph-node.js +55 -1
- package/dist/components/visualizer/nodes/header.js +3 -1
- package/dist/components/visualizer/nodes/info.js +3 -1
- package/dist/components/visualizer/nodes/license.js +8 -1
- package/dist/components/visualizer/nodes/link.js +3 -1
- package/dist/components/visualizer/nodes/media-type.js +3 -1
- package/dist/components/visualizer/nodes/operation.js +4 -1
- package/dist/components/visualizer/nodes/parameter.js +3 -1
- package/dist/components/visualizer/nodes/path-item.js +3 -1
- package/dist/components/visualizer/nodes/request-body.js +3 -1
- package/dist/components/visualizer/nodes/response.js +3 -1
- package/dist/components/visualizer/nodes/schema.js +3 -1
- package/dist/components/visualizer/nodes/security-scheme.js +3 -1
- package/dist/components/visualizer/nodes/server.js +3 -1
- package/dist/components/visualizer/nodes/tag.js +3 -1
- package/dist/components/visualizer/nodes/xml.js +3 -1
- package/dist/components/visualizer/orientation-controls.d.ts +1 -0
- package/dist/components/visualizer/orientation-controls.js +31 -16
- package/dist/components/visualizer/search.js +4 -3
- package/dist/components/warning-stripe/warning-stripe.d.ts +20 -0
- package/dist/components/warning-stripe/warning-stripe.js +124 -0
- package/dist/cowboy-components.umd.cjs +3849 -2221
- package/dist/css/panels.css.d.ts +2 -0
- package/dist/css/panels.css.js +44 -0
- package/dist/css/pb33f-theme.css +8 -1
- package/dist/css/scrollbar.css.d.ts +2 -0
- package/dist/css/scrollbar.css.js +16 -0
- package/dist/css/tabs.css.js +1 -1
- package/dist/events/doctor.d.ts +15 -1
- package/dist/events/doctor.js +5 -0
- package/dist/model/api-response.d.ts +6 -0
- package/dist/model/api-response.js +2 -0
- package/dist/model/chart-data.d.ts +15 -0
- package/dist/model/chart-data.js +1 -0
- package/dist/model/diagnostic-report.d.ts +5 -0
- package/dist/model/diagnostic-report.js +3 -0
- package/dist/model/document.d.ts +1 -0
- package/dist/model/graph.d.ts +26 -0
- package/dist/model/media-type.d.ts +2 -0
- package/dist/model/media-type.js +7 -0
- package/dist/model/node_type.d.ts +2 -0
- package/dist/model/node_type.js +2 -0
- package/dist/model/settings.d.ts +5 -0
- package/dist/model/settings.js +1 -0
- package/dist/model/timeline.d.ts +33 -0
- package/dist/model/timeline.js +1 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +53460 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +13517 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +29660 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +21318 -0
- package/dist/monacoeditorwork/yaml.worker..bundle.js +37321 -0
- package/dist/services/color-service.d.ts +1 -0
- package/dist/services/color-service.js +13 -0
- package/dist/services/linting-service.d.ts +1 -3
- package/dist/services/linting-service.js +21 -29
- package/dist/services/model-service.d.ts +1 -1
- package/dist/services/model-service.js +35 -8
- package/dist/services/rodeo-service.d.ts +6 -0
- package/dist/services/rodeo-service.js +134 -0
- package/dist/services/timeline-service.d.ts +8 -0
- package/dist/services/timeline-service.js +85 -0
- package/dist/style.css +1 -1
- package/dist/workers/equalizer.worker.js +1 -1
- package/dist/workers/search-problems.worker.js +1 -1
- package/package.json +6 -1
- package/dist/assets/css.worker-Byh--afc.js +0 -84
- package/dist/assets/editor.worker-CYC0jP-p.js +0 -12
- package/dist/assets/equalizer.worker-CdIiiqfH.js +0 -1
- package/dist/assets/html.worker-DArWg-Dy.js +0 -461
- package/dist/assets/json.worker-heCfXoJw.js +0 -49
- package/dist/assets/search-problems.worker-VJi4P9Gj.js +0 -1
|
@@ -3,7 +3,7 @@ export declare const DarkTheme = "dark";
|
|
|
3
3
|
export declare const LightTheme = "light";
|
|
4
4
|
export declare const PB33F_THEME = "pb33f-theme";
|
|
5
5
|
export declare class ThemeSwitcher extends LitElement {
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
6
|
+
static styles: import("lit").CSSResult[];
|
|
7
7
|
theme: string;
|
|
8
8
|
connectedCallback(): void;
|
|
9
9
|
toggleTheme(): void;
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { customElement, state } from "lit/decorators.js";
|
|
8
8
|
import { html, LitElement } from "lit";
|
|
9
9
|
import themeSwitcherCss from "./theme-switcher.css.js";
|
|
10
|
+
import tooltipCss from "../../css/tooltip.css.js";
|
|
10
11
|
export const DarkTheme = 'dark';
|
|
11
12
|
export const LightTheme = 'light';
|
|
12
13
|
export const PB33F_THEME = 'pb33f-theme';
|
|
@@ -17,7 +18,7 @@ let ThemeSwitcher = class ThemeSwitcher extends LitElement {
|
|
|
17
18
|
}
|
|
18
19
|
connectedCallback() {
|
|
19
20
|
super.connectedCallback();
|
|
20
|
-
this.theme = localStorage.getItem(PB33F_THEME) ||
|
|
21
|
+
this.theme = localStorage.getItem(PB33F_THEME) || DarkTheme;
|
|
21
22
|
const root = document.querySelector('html');
|
|
22
23
|
if (root) {
|
|
23
24
|
root.setAttribute('theme', this.theme);
|
|
@@ -58,15 +59,17 @@ let ThemeSwitcher = class ThemeSwitcher extends LitElement {
|
|
|
58
59
|
gear = 'moon';
|
|
59
60
|
}
|
|
60
61
|
return html `
|
|
62
|
+
<sl-tooltip content="Toggle between dark and light mode" placement="top">
|
|
61
63
|
<sl-icon-button
|
|
62
64
|
@click=${this.toggleTheme}
|
|
63
65
|
name="${gear}"
|
|
64
66
|
label="Settings">
|
|
65
67
|
</sl-icon-button>
|
|
68
|
+
</sl-tooltip>
|
|
66
69
|
`;
|
|
67
70
|
}
|
|
68
71
|
};
|
|
69
|
-
ThemeSwitcher.styles = themeSwitcherCss;
|
|
72
|
+
ThemeSwitcher.styles = [themeSwitcherCss, tooltipCss];
|
|
70
73
|
__decorate([
|
|
71
74
|
state()
|
|
72
75
|
], ThemeSwitcher.prototype, "theme", void 0);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
|
|
4
|
+
.changes {
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: 50px 170px auto 30px 100px;
|
|
7
|
+
max-height: calc(100vh - 550px);
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.change-list-item {
|
|
12
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
13
|
+
font-size: 0.8rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
text-align: center;
|
|
20
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.context {
|
|
24
|
+
|
|
25
|
+
width: 100px;
|
|
26
|
+
color: var(--font-color-sub2);
|
|
27
|
+
text-align: center;
|
|
28
|
+
font-size: 0.8rem;
|
|
29
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.removed-icon {
|
|
34
|
+
font-size: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.added-icon {
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.modified-icon {
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.removed {
|
|
46
|
+
color: var(--error-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.added {
|
|
50
|
+
color: var(--terminal-text);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.modified {
|
|
54
|
+
color: var(--font-color-sub1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
sl-badge::part(base) {
|
|
58
|
+
border-radius: 0;
|
|
59
|
+
background-color: var(--background-color);
|
|
60
|
+
border: 1px solid var(--secondary-color);
|
|
61
|
+
color: var(--secondary-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.type {
|
|
65
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.property {
|
|
69
|
+
padding-top: 6px!important;
|
|
70
|
+
font-size: 0.9rem;
|
|
71
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.property-type {
|
|
75
|
+
color: var(--primary-color);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.property-value {
|
|
79
|
+
font-family: var(--font-stack-bold), sans-serif;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.change-type {
|
|
83
|
+
font-size: 0.7rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.breaking-col {
|
|
87
|
+
padding-top: 10px!important;
|
|
88
|
+
text-align: center;
|
|
89
|
+
border-bottom: 1px dotted var(--secondary-color-dimmer);
|
|
90
|
+
}
|
|
91
|
+
.col {
|
|
92
|
+
padding-top: 5px;
|
|
93
|
+
padding-bottom: 5px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TemplateResult } from "lit";
|
|
2
|
+
import { Change } from "../../model/graph.js";
|
|
3
|
+
import { HasChanges } from "../model-renderer/has-changes.js";
|
|
4
|
+
export declare class ChangeList extends HasChanges {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
constructor();
|
|
7
|
+
changes: Change[];
|
|
8
|
+
getChangeValue(change: Change): TemplateResult;
|
|
9
|
+
render(): TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 } from "lit";
|
|
9
|
+
import { HasChanges } from "../model-renderer/has-changes.js";
|
|
10
|
+
import changeListItemCss from "./change-list-item.css.js";
|
|
11
|
+
import scrollbarCss from "../../css/scrollbar.css.js";
|
|
12
|
+
let ChangeList = class ChangeList extends HasChanges {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
}
|
|
16
|
+
getChangeValue(change) {
|
|
17
|
+
if (change.new)
|
|
18
|
+
return html `<span class="property-type">${change.property}</span>:
|
|
19
|
+
<span class="property-value">${change.new.length > 100 ? change.new.slice(0, 70) + '...' : change.new}</span>`;
|
|
20
|
+
if (change.original)
|
|
21
|
+
return html `<span class="property-type">${change.property}</span>:
|
|
22
|
+
<span class="property-value">${change.original.length > 100 ? change.original.slice(0, 70) + '...' : change.original}</span>`;
|
|
23
|
+
return html `<span class="property-type">${change.property}</span>`;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return html `
|
|
27
|
+
<div class="changes scroller">
|
|
28
|
+
${this.changes.map((change) => {
|
|
29
|
+
let ctx = html `${change.context.newLine}:${change.context.newColumn}`;
|
|
30
|
+
if (!change.context.newLine) {
|
|
31
|
+
ctx = html `${change.context.originalLine}:${change.context.originalColumn}`;
|
|
32
|
+
}
|
|
33
|
+
return html `
|
|
34
|
+
<div class="col icon">${this.renderChangeIcon(change)}</div>
|
|
35
|
+
<div class="col type">
|
|
36
|
+
<pb33f-model-icon icon="${change.type}"></pb33f-model-icon>
|
|
37
|
+
<sl-badge>${change.type?.replace(/([a-z])([A-Z])/g, '$1 $2').toLowerCase()}</sl-badge>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="col property">
|
|
40
|
+
<span class="property-item">${this.getChangeValue(change)}
|
|
41
|
+
<span class="change-type">${this.renderChangeType(change)}</span>
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col breaking-col">${this.renderBreaking(change.breaking)}</div>
|
|
45
|
+
<div class="col context">${ctx}</div>
|
|
46
|
+
`;
|
|
47
|
+
})}
|
|
48
|
+
</div>`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
ChangeList.styles = [changeListItemCss, scrollbarCss];
|
|
52
|
+
__decorate([
|
|
53
|
+
property()
|
|
54
|
+
], ChangeList.prototype, "changes", void 0);
|
|
55
|
+
ChangeList = __decorate([
|
|
56
|
+
customElement("pb33f-change-list")
|
|
57
|
+
], ChangeList);
|
|
58
|
+
export { ChangeList };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
.breaking-change {
|
|
4
|
+
color: var(--error-color);
|
|
5
|
+
font-size: 1.5rem;
|
|
6
|
+
background: var(--background-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.change {
|
|
10
|
+
color: var(--secondary-color);
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
padding-left: 6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.heart-breaker {
|
|
16
|
+
|
|
17
|
+
border-left: 3px solid var(--error-color);
|
|
18
|
+
padding-left: 5px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
.selected-bar {
|
|
23
|
+
border-left: 3px solid var(--primary-color)!important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dream-maker {
|
|
27
|
+
|
|
28
|
+
border-left: 3px solid var(--secondary-color-lowalpha);
|
|
29
|
+
padding-left: 5px;
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.change {
|
|
34
|
+
|
|
35
|
+
height: 30px;
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
pb33f-timeline-item:hover {
|
|
40
|
+
background-color: var(--secondary-color-very-lowalpha);
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
pb33f-timeline-item.selected:hover {
|
|
46
|
+
background-color: var(--primary-color-verylowalpha);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.selected {
|
|
51
|
+
background: linear-gradient(90deg, var(--background-color) 0%, var(--primary-color-verylowalpha) 100%);
|
|
52
|
+
color: var(--background-color);
|
|
53
|
+
border-right: 4px solid var(--primary-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.view-tardis {
|
|
57
|
+
padding-left: 12px;
|
|
58
|
+
padding-bottom: 10px;
|
|
59
|
+
padding-top: 5px;
|
|
60
|
+
font-size: 0.9rem;
|
|
61
|
+
border-bottom: 1px dashed var(--secondary-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.view-tardis sl-icon {
|
|
65
|
+
vertical-align: middle;
|
|
66
|
+
font-size: 1rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.skip-changes{
|
|
70
|
+
padding-left: 12px;
|
|
71
|
+
padding-bottom: 5px;
|
|
72
|
+
padding-top: 5px;
|
|
73
|
+
margin-bottom: 5px;
|
|
74
|
+
color: var(--warn-color);
|
|
75
|
+
font-size: 0.9rem;
|
|
76
|
+
border: 1px dashed var(--warn-color);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tardis-timeline {
|
|
80
|
+
height: calc(100vh - 205px);
|
|
81
|
+
width: 100%;
|
|
82
|
+
overflow-y: auto;
|
|
83
|
+
overflow-x: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
strong {
|
|
87
|
+
font-family: var(--font-stack-bold), sans-serif;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { SpecSummary } from "../../model/timeline.js";
|
|
3
|
+
import '../timeline/timeline.js';
|
|
4
|
+
import '../timeline/timeline-item.js';
|
|
5
|
+
import './spec-summary-timeline-item.js';
|
|
6
|
+
import '@shoelace-style/shoelace/dist/components/format-date/format-date.js';
|
|
7
|
+
import '@shoelace-style/shoelace/dist/components/relative-time/relative-time.js';
|
|
8
|
+
export declare class HistoryPicker extends LitElement {
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
|
+
specSummary: SpecSummary[];
|
|
11
|
+
skipChanges: boolean;
|
|
12
|
+
constructor();
|
|
13
|
+
loadOverview(): void;
|
|
14
|
+
openSettings(): void;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
deselectTimelineItems(): void;
|
|
17
|
+
loadSpecSummary(spec: SpecSummary): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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 { html, LitElement } from "lit";
|
|
8
|
+
import { customElement, state } from "lit/decorators.js";
|
|
9
|
+
import historyPickerCss from "./history-picker.css.js";
|
|
10
|
+
import { OpenSettings, RevisionClicked, ShowTimelineSummary } from "../../events/doctor.js";
|
|
11
|
+
import linksCss from "../../css/links.css.js";
|
|
12
|
+
import scrollbarCss from "../../css/scrollbar.css.js";
|
|
13
|
+
import '../timeline/timeline.js';
|
|
14
|
+
import '../timeline/timeline-item.js';
|
|
15
|
+
import './spec-summary-timeline-item.js';
|
|
16
|
+
import '@shoelace-style/shoelace/dist/components/format-date/format-date.js';
|
|
17
|
+
import '@shoelace-style/shoelace/dist/components/relative-time/relative-time.js';
|
|
18
|
+
let HistoryPicker = class HistoryPicker extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.skipChanges = false;
|
|
22
|
+
}
|
|
23
|
+
loadOverview() {
|
|
24
|
+
this.deselectTimelineItems();
|
|
25
|
+
this.dispatchEvent(new Event(ShowTimelineSummary, {
|
|
26
|
+
bubbles: true,
|
|
27
|
+
composed: true,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
openSettings() {
|
|
31
|
+
this.dispatchEvent(new Event(OpenSettings, {
|
|
32
|
+
bubbles: true,
|
|
33
|
+
composed: true,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
let skipped = html ``;
|
|
38
|
+
if (this.skipChanges) {
|
|
39
|
+
skipped = html `<div class="skip-changes">
|
|
40
|
+
The tardis is <strong>disabled</strong>, changes <strong>not</strong> being tracked.
|
|
41
|
+
<a href="#" @click="${this.openSettings}">Open settings</a>
|
|
42
|
+
</div>`;
|
|
43
|
+
}
|
|
44
|
+
return html `
|
|
45
|
+
${skipped}
|
|
46
|
+
<div class="view-tardis">
|
|
47
|
+
<sl-icon name="clock-history"></sl-icon>
|
|
48
|
+
<a href="#" @click="${this.loadOverview}">Timeline Overview</a>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="tardis-timeline scroller">
|
|
51
|
+
<pb33f-timeline skinny>
|
|
52
|
+
${this.specSummary?.map((spec, index) => {
|
|
53
|
+
let heartBreaker = false;
|
|
54
|
+
let breaking = html `
|
|
55
|
+
<sl-icon slot="icon" name="caret-right-fill" class="change"></sl-icon>`;
|
|
56
|
+
if (spec.breakingChanges && spec.breakingChanges > 0) {
|
|
57
|
+
breaking = html `
|
|
58
|
+
<sl-icon slot="icon" name="heartbreak-fill" class="breaking-change"></sl-icon>`;
|
|
59
|
+
heartBreaker = true;
|
|
60
|
+
}
|
|
61
|
+
if (this.specSummary[index + 1] != undefined && spec && spec.diagnosisScore) {
|
|
62
|
+
const preSpec = this.specSummary[index + 1];
|
|
63
|
+
if (preSpec && preSpec.diagnosisScore && preSpec.diagnosisScore > spec.diagnosisScore) {
|
|
64
|
+
spec.wentDown = true;
|
|
65
|
+
spec.scoreVariance = preSpec.diagnosisScore - spec.diagnosisScore;
|
|
66
|
+
}
|
|
67
|
+
if (preSpec && preSpec.diagnosisScore && preSpec.diagnosisScore < spec.diagnosisScore) {
|
|
68
|
+
spec.wentUp = true;
|
|
69
|
+
spec.scoreVariance = spec.diagnosisScore - preSpec.diagnosisScore;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return html `
|
|
73
|
+
<pb33f-timeline-item id="change-${spec.changeId}" skinny @click="${() => {
|
|
74
|
+
this.loadSpecSummary(spec);
|
|
75
|
+
}}">
|
|
76
|
+
${breaking}
|
|
77
|
+
<div id="timebar-${spec.changeId}" slot="time"
|
|
78
|
+
class="time ${heartBreaker ? 'heart-breaker' : 'dream-maker'}">
|
|
79
|
+
<sl-relative-time date="${spec.created}" format="long"></sl-relative-time>
|
|
80
|
+
</div>
|
|
81
|
+
<div slot="content">
|
|
82
|
+
<div id="changebar-${spec.changeId}"
|
|
83
|
+
class="change ${heartBreaker ? 'heart-breaker' : 'dream-maker'}">
|
|
84
|
+
<pb33f-spec-summary-timeline-item .specSummary="${spec}">
|
|
85
|
+
</pb33f-spec-summary-timeline-item>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
</pb33f-timeline-item>
|
|
90
|
+
`;
|
|
91
|
+
})}
|
|
92
|
+
</pb33f-timeline>
|
|
93
|
+
</div>
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
deselectTimelineItems() {
|
|
97
|
+
const items = this.shadowRoot?.querySelectorAll('pb33f-timeline-item');
|
|
98
|
+
const changeBars = this.shadowRoot?.querySelectorAll('div.change');
|
|
99
|
+
const timeBars = this.shadowRoot?.querySelectorAll('div.time');
|
|
100
|
+
if (items) {
|
|
101
|
+
for (const item of items) {
|
|
102
|
+
item.classList.remove('selected');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (changeBars) {
|
|
106
|
+
for (const item of changeBars) {
|
|
107
|
+
item.classList.remove('selected-bar');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (timeBars) {
|
|
111
|
+
for (const item of timeBars) {
|
|
112
|
+
item.classList.remove('selected-bar');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
loadSpecSummary(spec) {
|
|
117
|
+
this.dispatchEvent(new CustomEvent(RevisionClicked, {
|
|
118
|
+
bubbles: true,
|
|
119
|
+
composed: true,
|
|
120
|
+
detail: {
|
|
121
|
+
specSummary: spec,
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
const picked = this.shadowRoot?.querySelector('pb33f-timeline-item#change-' + spec.changeId);
|
|
125
|
+
const changeBar = this.shadowRoot?.querySelector('div#changebar-' + spec.changeId);
|
|
126
|
+
const timeBar = this.shadowRoot?.querySelector('div#timebar-' + spec.changeId);
|
|
127
|
+
this.deselectTimelineItems();
|
|
128
|
+
picked?.classList.add('selected');
|
|
129
|
+
changeBar?.classList.add('selected-bar');
|
|
130
|
+
timeBar?.classList.add('selected-bar');
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
HistoryPicker.styles = [historyPickerCss, linksCss, scrollbarCss];
|
|
134
|
+
__decorate([
|
|
135
|
+
state()
|
|
136
|
+
], HistoryPicker.prototype, "specSummary", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
state()
|
|
139
|
+
], HistoryPicker.prototype, "skipChanges", void 0);
|
|
140
|
+
HistoryPicker = __decorate([
|
|
141
|
+
customElement("pb33f-history-picker")
|
|
142
|
+
], HistoryPicker);
|
|
143
|
+
export { HistoryPicker };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
.timeline-item {
|
|
4
|
+
display: flex;
|
|
5
|
+
padding-top: 5px;
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.selected {
|
|
10
|
+
color: var(--background-color);!important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.score {
|
|
14
|
+
height: 15px;
|
|
15
|
+
width: 15px;
|
|
16
|
+
font-size: 0.8rem;
|
|
17
|
+
text-align: center;
|
|
18
|
+
color: var(--font-color);
|
|
19
|
+
border: 1px solid var(--font-color-sub3);
|
|
20
|
+
padding: 3px;
|
|
21
|
+
margin-right : 5px;
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.triple {
|
|
26
|
+
width: 25px!important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.triple-large {
|
|
30
|
+
width: 60px!important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.quad {
|
|
34
|
+
width: 35px!important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.quad-large {
|
|
38
|
+
width: 75px!important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.quint {
|
|
42
|
+
width: 45px!important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sext {
|
|
46
|
+
width: 55px!important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.sext-large {
|
|
50
|
+
width: 115px!important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.quint-large {
|
|
54
|
+
width: 95px!important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.large {
|
|
58
|
+
height: 40px;
|
|
59
|
+
width: 43px;
|
|
60
|
+
font-size: 1.9rem !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.breaking {
|
|
64
|
+
color: var(--error-color)!important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
.breaking-score {
|
|
69
|
+
color: var(--error-color);
|
|
70
|
+
border: 1px solid var(--error-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.score sl-icon {
|
|
74
|
+
margin-top: 8px;
|
|
75
|
+
font-size: 0.7rem;
|
|
76
|
+
color: var(--font-color-sub1)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.score > sl-icon:hover, .score.large > sl-icon:hover {
|
|
80
|
+
color: var(--primary-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.score.large sl-icon {
|
|
84
|
+
margin-top: 20px;
|
|
85
|
+
font-size: 1.5rem;
|
|
86
|
+
color: var(--font-color-sub1)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.justify-center {
|
|
90
|
+
justify-content: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.score sl-icon.empty {
|
|
94
|
+
margin-top: 2px;
|
|
95
|
+
font-size: 0.8rem;
|
|
96
|
+
color: var(--font-color-sub3)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.score.large sl-icon.empty {
|
|
100
|
+
font-size: 1.7rem;
|
|
101
|
+
margin-top: 6px;
|
|
102
|
+
margin-left: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.score:hover, .score.large:hover {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
border-color: var(--primary-color);
|
|
108
|
+
color: var(--primary-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.breaking-score:hover {
|
|
112
|
+
border-color: var(--error-color) !important;
|
|
113
|
+
color: var(--error-color) !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
strong {
|
|
117
|
+
font-family: var(--font-stack-bold), sans-serif;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.arrow {
|
|
121
|
+
position: absolute;
|
|
122
|
+
right: -18px;
|
|
123
|
+
top: -5px;
|
|
124
|
+
font-size: 1rem !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.arrow.large {
|
|
128
|
+
position: absolute;
|
|
129
|
+
right: -45px;
|
|
130
|
+
top: -10px;
|
|
131
|
+
font-size: 2rem !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.up {
|
|
135
|
+
color: var(--terminal-text) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
.down {
|
|
140
|
+
color: var(--error-color) !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { SpecSummary } from "../../model/timeline";
|
|
3
|
+
export declare class SpecSummaryTimelineItem extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
specSummary: SpecSummary;
|
|
6
|
+
large: boolean;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
constructor();
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
additionalWidth(v: number | undefined): string;
|
|
11
|
+
}
|