@contrail/document-generation 1.0.16 → 1.0.17
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.
|
@@ -27,6 +27,9 @@ class DocumentPropertyUtil {
|
|
|
27
27
|
const modelKey = `${util_1.StringUtil.convertToCamelCase(property.typeRootSlug)}.${property.propertyDefinition.slug}`;
|
|
28
28
|
const value = util_1.ObjectUtil.getByPath(model, modelKey);
|
|
29
29
|
let display = formatter.formatValueForProperty(value, property.propertyDefinition);
|
|
30
|
+
if (!isComponent && property.includeLabel) {
|
|
31
|
+
display = property.propertyDefinition.label + ': ' + display;
|
|
32
|
+
}
|
|
30
33
|
const mergedOptions = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(options), { style: property.style || {} });
|
|
31
34
|
mergedOptions.position = position;
|
|
32
35
|
const useInlineFormatting = isComponent === false;
|
|
@@ -34,10 +37,6 @@ class DocumentPropertyUtil {
|
|
|
34
37
|
if (isComponent && property.includeLabel) {
|
|
35
38
|
element.label = (_a = property.propertyDefinition) === null || _a === void 0 ? void 0 : _a.label;
|
|
36
39
|
}
|
|
37
|
-
else if (!isComponent && property.includeLabel) {
|
|
38
|
-
display = property.propertyDefinition.label + ': ' + display;
|
|
39
|
-
}
|
|
40
|
-
element.text = display;
|
|
41
40
|
element.propertyBindings = { text: modelKey };
|
|
42
41
|
return element;
|
|
43
42
|
}
|