Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@api-components/api-type-document

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@api-components/api-type-document - npm Package Compare versions

Comparing version 4.2.17 to 4.2.18

2

package.json
{
"name": "@api-components/api-type-document",
"description": "A documentation table for type (resource) properties. Works with AMF data model",
"version": "4.2.17",
"version": "4.2.18",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -655,2 +655,21 @@ import { LitElement, html } from 'lit-element';

_arrayPropertyTemplate(label, value, title) {
return html`
<div class="property-attribute" part="property-attribute">
<span class="attribute-label" part="attribute-label">${label}</span>
<span class="attribute-value" part="attribute-value" title=${title}>${value}</span>
</div>
`
}
_arrayPropertiesTemplate() {
const minCount = this._getValue(this._resolvedType, this.ns.w3.shacl.minCount)
const maxCount = this._getValue(this._resolvedType, this.ns.w3.shacl.maxCount)
return html`
${minCount !== undefined ? this._arrayPropertyTemplate('Minimum array length:', minCount, 'Minimum amount of items in array') : ''}
${maxCount !== undefined ? this._arrayPropertyTemplate('Maximum array length:', maxCount, 'Maximum amount of items in array') : ''}
`
}
/**

@@ -692,11 +711,15 @@ * @return {TemplateResult} Templates for object properties

);
if (!this.hasParentType) {
return html`
return html`
${!this.hasParentType ?
html`
<span>Array of:</span>
<div class="array-children">
${documents}
</div>
`;
}
return html`${documents}`;
</div>`
: html`${documents}`
}
${this._arrayPropertiesTemplate()}
`;
}

@@ -703,0 +726,0 @@

@@ -88,2 +88,13 @@ import { css } from 'lit-element';

}
.property-attribute {
margin: 4px 0;
padding: 0;
color: var(--api-type-document-type-attribute-color, #616161);
}
.attribute-label {
font-weight: var(--api-type-document-property-range-attribute-label-font-weight, 500);
margin-right: 12px;
}
`;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc