@contrail/documents 1.2.5 → 1.2.6

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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",