Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-summary",
"description": "A summary view for an API base on AMF data model",
"version": "4.6.11",
"version": "4.6.12",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
Expand Down
21 changes: 9 additions & 12 deletions src/ApiSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import labelStyles from "@api-components/http-method-label/http-method-label-com
import sanitizer from "dompurify";
import "@advanced-rest-client/arc-marked/arc-marked.js";
import "@api-components/api-method-documentation/api-url.js";
import '@advanced-rest-client/icons/arc-icon.js';
import { codegenie } from '@advanced-rest-client/icons/ArcIcons.js';

import styles from "./Styles.js";

/** @typedef {import('lit-element').TemplateResult} TemplateResult */
Expand Down Expand Up @@ -633,17 +634,13 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
data-id="${item.id}"
data-shape-type="method"
title="Open method documentation"
>${item.method}</a
>

${item.hasAgent
? html`
<span class="agent-pill" title="Enabled for Agent">
Enabled for Agent
<arc-icon icon="infoOutline" class="info-icon"></arc-icon>
</span>
`
: ''}
>${item.method}
${
item.hasAgent
? html`<span class="method-icon">${codegenie}</span>`
: ""
}
</a>
`;
}

Expand Down
8 changes: 8 additions & 0 deletions src/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ export default css`
white-space: nowrap;
}

.method-icon {
display: inline-flex;
width: 13px;
height: 13px;
padding-left: 7px;
fill: var(--http-method-label-post-color, #fff);
}

label.section {
color: var(--arc-font-subhead-color);
font-weight: var(--arc-font-subhead-font-weight);
Expand Down
2 changes: 1 addition & 1 deletion test/api-summary.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe('ApiSummary', () => {
});

it('renders the agent pill', async () => {
const node = element.shadowRoot.querySelector('.agent-pill');
const node = element.shadowRoot.querySelector('.method-icon');
assert.ok(node);
});
});
Expand Down
Loading