Socket
Socket
Sign inDemoInstall

@api-components/api-type-document

Package Overview
Dependencies
Maintainers
4
Versions
62
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.11 to 4.2.12

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.11",
"version": "4.2.12",
"license": "Apache-2.0",

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

@@ -136,2 +136,7 @@ import { LitElement, CSSResult, TemplateResult } from 'lit-element';

renderReadOnly: boolean;
/**
* Determines if shape's range is deprecated
* @attribute
*/
deprecated: boolean

@@ -138,0 +143,0 @@ get complexToggleLabel(): string;

@@ -129,2 +129,6 @@ import { LitElement, html } from 'lit-element';

isAnyOf: { type: Boolean },
/**
* Determines if shape's range is deprecated
*/
deprecated: { type: Boolean, reflect: true },
};

@@ -212,2 +216,3 @@ }

this.renderReadOnly = false;
this.deprecated = false;
}

@@ -273,4 +278,10 @@

this.propertyDataType = this._computeObjectDataType(range, shape);
const isDeprecated = Boolean(this._computeIsDeprecated(range));
this.deprecated = isDeprecated;
}
_computeIsDeprecated(range) {
return this._getValue(range, this._getAmfKey(this.ns.aml.vocabularies.shapes.deprecated))
}
_computeObjectDataType(range, shape) {

@@ -639,2 +650,9 @@ let type = range && this._computeRangeDataType(this._resolve(range));

_deprecatedWarningTemplate() {
if (!this.deprecated) {
return '';
}
return html`<div class="deprecated-warning">Warning: Deprecated</div>`
}
/**

@@ -672,2 +690,3 @@ * @return {TemplateResult} Main render function.

</div>
${this._deprecatedWarningTemplate()}
${this._descriptionTemplate()}

@@ -674,0 +693,0 @@ <property-range-document

@@ -167,2 +167,20 @@ import { css } from 'lit-element';

}
:host([deprecated]) .property-title {
color: gray;
text-decoration: line-through;
}
:host([deprecated]) .property-traits > span {
background-color: var(--api-type-document-type-deprecated-background-color, gray);
color: var(--api-type-document-type-deprecated-color, white);
}
.deprecated-warning {
background-color: var(--api-type-document-type-deprecated-background-color, gray);
color: var(--api-type-document-type-deprecated-color, white);
padding: var(--api-type-document-deprecated-warning-padding, 3px 6px);
border-radius: var(--api-type-document-deprecated-warning-border-radius, 3px);
display: inline-flex;
}
`;
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