@contrail/documents 1.2.2 → 1.2.4
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.
|
@@ -20,7 +20,12 @@ class DocumentElementPropertyBindingHandler {
|
|
|
20
20
|
}
|
|
21
21
|
for (const propertyKey of Object.keys(element.propertyBindings)) {
|
|
22
22
|
const modelIndex = element.propertyBindings[propertyKey];
|
|
23
|
+
const pathParts = modelIndex.split('.');
|
|
24
|
+
const isNestedPropertyAccess = pathParts.length > 2;
|
|
23
25
|
let propertyValue = util_1.ObjectUtil.getByPath(localModel, modelIndex);
|
|
26
|
+
if ((propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.name) && !isNestedPropertyAccess) {
|
|
27
|
+
propertyValue = propertyValue.name;
|
|
28
|
+
}
|
|
24
29
|
if (propertyValue === null || propertyValue === undefined) {
|
|
25
30
|
propertyValue = '';
|
|
26
31
|
}
|
|
@@ -195,13 +195,8 @@ class DynamicTextUtil {
|
|
|
195
195
|
text = formatter.formatValueForProperty(memberValues[memberValues.length - 1], property);
|
|
196
196
|
}
|
|
197
197
|
else if (displayFunction === DynamicTextDisplayFunction.MIN) {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
text = '';
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
text = formatter.formatValueForProperty(minValue, property);
|
|
204
|
-
}
|
|
198
|
+
memberValues = memberValues.filter((e) => e !== null && e !== undefined);
|
|
199
|
+
text = formatter.formatValueForProperty(Math.min(...memberValues), property);
|
|
205
200
|
}
|
|
206
201
|
else if (displayFunction === DynamicTextDisplayFunction.MAX) {
|
|
207
202
|
memberValues = memberValues.filter((e) => e !== null && e !== undefined);
|