@api-components/api-type-document 4.2.18 → 4.2.19

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.18",
4
+ "version": "4.2.19",
5
5
  "license": "Apache-2.0",
6
6
  "main": "index.js",
7
7
  "module": "index.js",
@@ -303,6 +303,25 @@ export class PropertyRangeDocument extends PropertyDocumentMixin(LitElement) {
303
303
  </div>`;
304
304
  }
305
305
 
306
+ _arrayPropertiesTemplate() {
307
+ const { range } = this;
308
+
309
+ return html` ${this._hasProperty(range, this.ns.w3.shacl.minCount)
310
+ ? this._listItemTemplate(
311
+ 'Minimum array length',
312
+ 'Minimum amount of items in array',
313
+ this.ns.w3.shacl.minCount
314
+ )
315
+ : ''}
316
+ ${this._hasProperty(range, this.ns.w3.shacl.maxCount)
317
+ ? this._listItemTemplate(
318
+ 'Maximum array length',
319
+ 'Maximum amount of items in array',
320
+ this.ns.w3.shacl.maxCount
321
+ )
322
+ : ''}`;
323
+ }
324
+
306
325
  /**
307
326
  * @return {TemplateResult|string} Template for the element.
308
327
  */
@@ -355,6 +374,7 @@ export class PropertyRangeDocument extends PropertyDocumentMixin(LitElement) {
355
374
  ? this._filePropertiesTemplate()
356
375
  : this._nonFilePropertiesTemplate()}
357
376
  ${this.isEnum ? this._enumTemplate() : ''}
377
+ ${this.isArray ? this._arrayPropertiesTemplate() : ''}
358
378
 
359
379
  <section class="examples" ?hidden="${!this._hasExamples}">
360
380
  <api-resource-example-document