@api-components/api-type-document 4.2.27 → 4.2.28

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-components/api-type-document",
3
3
  "description": "A documentation table for type (resource) properties. Works with AMF data model",
4
- "version": "4.2.27",
4
+ "version": "4.2.28",
5
5
  "license": "Apache-2.0",
6
6
  "main": "index.js",
7
7
  "module": "index.js",
@@ -174,6 +174,8 @@ export class ApiTypeDocument extends PropertyDocumentMixin(LitElement) {
174
174
  */
175
175
  noMediaSelector: boolean;
176
176
 
177
+ noArrayInfo: boolean;
178
+
177
179
  get shouldRenderMediaSelector(): boolean;
178
180
 
179
181
  constructor();
@@ -167,6 +167,8 @@ export class ApiTypeDocument extends PropertyDocumentMixin(LitElement) {
167
167
  * applicable.
168
168
  */
169
169
  noMediaSelector: { type: Boolean },
170
+
171
+ noArrayInfo: { type: Boolean },
170
172
  };
171
173
  }
172
174
 
@@ -685,13 +687,16 @@ export class ApiTypeDocument extends PropertyDocumentMixin(LitElement) {
685
687
  }
686
688
 
687
689
  _arrayPropertiesTemplate() {
688
- const minCount = this._getValue(this._resolvedType, this.ns.w3.shacl.minCount)
689
- const maxCount = this._getValue(this._resolvedType, this.ns.w3.shacl.maxCount)
690
+ if (!this.noArrayInfo) {
691
+ const minCount = this._getValue(this._resolvedType, this.ns.w3.shacl.minCount)
692
+ const maxCount = this._getValue(this._resolvedType, this.ns.w3.shacl.maxCount)
690
693
 
691
- return html`
692
- ${minCount !== undefined ? this._arrayPropertyTemplate('Minimum array length:', minCount, 'Minimum amount of items in array') : ''}
693
- ${maxCount !== undefined ? this._arrayPropertyTemplate('Maximum array length:', maxCount, 'Maximum amount of items in array') : ''}
694
- `
694
+ return html`
695
+ ${minCount !== undefined ? this._arrayPropertyTemplate('Minimum array length:', minCount, 'Minimum amount of items in array') : ''}
696
+ ${maxCount !== undefined ? this._arrayPropertyTemplate('Maximum array length:', maxCount, 'Maximum amount of items in array') : ''}
697
+ `
698
+ }
699
+ return html``
695
700
  }
696
701
 
697
702
  /**
@@ -582,6 +582,7 @@ export class PropertyShapeDocument extends PropertyDocumentMixin(LitElement) {
582
582
  ?compatibility="${this.compatibility}"
583
583
  ?noExamplesActions="${this.noExamplesActions}"
584
584
  noMainExample
585
+ noArrayInfo
585
586
  .mediaType="${this.mediaType}"
586
587
  ?graph="${this.graph}"
587
588
  ></api-type-document>`;