@contrail/documents 1.2.5 → 1.2.7
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
|
}
|
|
@@ -103,6 +103,14 @@ class DynamicTextUtil {
|
|
|
103
103
|
.filter((model) => { var _a, _b; return (_b = (_a = model[entityType]) === null || _a === void 0 ? void 0 : _a.roles) === null || _b === void 0 ? void 0 : _b.includes(propertyLevel); })
|
|
104
104
|
.map((model) => { var _a; return [(_a = model[entityType]) === null || _a === void 0 ? void 0 : _a.id, model]; })).values());
|
|
105
105
|
}
|
|
106
|
+
else {
|
|
107
|
+
if (entityType === 'assortmentItem') {
|
|
108
|
+
componentModels = Array.from(new Map(componentModels.map((model) => { var _a, _b; return [((_a = model.item) === null || _a === void 0 ? void 0 : _a.id) + '_' + ((_b = model.assortmentItem) === null || _b === void 0 ? void 0 : _b.id), model]; })).values());
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
componentModels = Array.from(new Map(componentModels.map((model) => { var _a; return [(_a = model[entityType]) === null || _a === void 0 ? void 0 : _a.id, model]; })).values());
|
|
112
|
+
}
|
|
113
|
+
}
|
|
106
114
|
componentModels.forEach((elementModel) => {
|
|
107
115
|
frameMemberValues.push(util_1.ObjectUtil.getByPath(elementModel, bindingProperty));
|
|
108
116
|
});
|