@api-components/api-type-document
Advanced tools
Comparing version 4.2.9 to 4.2.10
{ | ||
"name": "@api-components/api-type-document", | ||
"description": "A documentation table for type (resource) properties. Works with AMF data model", | ||
"version": "4.2.9", | ||
"version": "4.2.10", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -97,2 +97,7 @@ import { LitElement, CSSResult, TemplateResult } from 'lit-element'; | ||
/** | ||
* A description of the shape to render. | ||
* @attribute | ||
*/ | ||
shapeDescription: string; | ||
/** | ||
* Computed value, true if description is set. | ||
@@ -103,2 +108,7 @@ * @attribute | ||
/** | ||
* Computed value, true if description is set. | ||
* @attribute | ||
*/ | ||
hasShapeDescription: boolean; | ||
/** | ||
* A property to set when the component is rendered in the narrow | ||
@@ -105,0 +115,0 @@ * view. To be used with mobile rendering or when the |
@@ -95,2 +95,6 @@ import { LitElement, html } from 'lit-element'; | ||
/** | ||
* A description of the shape to render. | ||
*/ | ||
shapeDescription: { type: String }, | ||
/** | ||
* Computed value, true if description is set. | ||
@@ -100,2 +104,6 @@ */ | ||
/** | ||
* Computed value, true if description is set. | ||
*/ | ||
hasShapeDescription: { type: Boolean }, | ||
/** | ||
* A property to set when the component is rendered in the narrow | ||
@@ -228,2 +236,6 @@ * view. To be used with mobile rendering or when the | ||
this.isRequired = this._computeIsRequired(shape); | ||
this.shapeDescription = this._computeDescription(shape); | ||
this.hasShapeDescription = this._computeHasStringValue( | ||
this.shapeDescription | ||
); | ||
} | ||
@@ -570,7 +582,7 @@ | ||
_descriptionTemplate() { | ||
if (!this.hasPropertyDescription) { | ||
if (!(this.hasPropertyDescription || this.hasShapeDescription)) { | ||
return ''; | ||
} | ||
return html` | ||
<arc-marked .markdown="${this.propertyDescription}" sanitize> | ||
<arc-marked .markdown="${this.propertyDescription || this.shapeDescription}" sanitize> | ||
<div slot="markdown-html" class="markdown-body"></div> | ||
@@ -577,0 +589,0 @@ </arc-marked> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137546
4109