openchs-models 1.32.55 → 1.32.56
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/dist/Concept.js +5 -4
- package/dist/ConceptMedia.js +1 -0
- package/package.json +1 -1
package/dist/Concept.js
CHANGED
|
@@ -85,11 +85,11 @@ class Concept extends _BaseEntity.default {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
getImageMedia() {
|
|
88
|
-
return this.media
|
|
88
|
+
return this.media.filter(m => m.isImage());
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
getVideoMedia() {
|
|
92
|
-
return this.media
|
|
92
|
+
return this.media.filter(m => m.isVideo());
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
hasImage() {
|
|
@@ -377,7 +377,7 @@ class Concept extends _BaseEntity.default {
|
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
hasMedia() {
|
|
380
|
-
return this.media
|
|
380
|
+
return this.media.length > 0 || this.hasAnswersWithMedia();
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
}
|
|
@@ -430,7 +430,8 @@ _defineProperty(Concept, "schema", {
|
|
|
430
430
|
},
|
|
431
431
|
media: {
|
|
432
432
|
type: "list",
|
|
433
|
-
objectType: "ConceptMedia"
|
|
433
|
+
objectType: "ConceptMedia",
|
|
434
|
+
default: []
|
|
434
435
|
}
|
|
435
436
|
}
|
|
436
437
|
});
|
package/dist/ConceptMedia.js
CHANGED