@trudb/tru-common-lib 0.2.545 → 0.2.547
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.
|
@@ -2588,6 +2588,7 @@ class TruDesktopManager {
|
|
|
2588
2588
|
}
|
|
2589
2589
|
getWindowEvent = (tableName, tablePluralName, tablePluralLabel, isModal, componentName, entities = [], entityIndex = 0, openAsDetaiView = false, showNavigation = true, parentDataContext = null) => {
|
|
2590
2590
|
var windowEvent = new TruWindowEventArgs();
|
|
2591
|
+
windowEvent.title = tablePluralLabel;
|
|
2591
2592
|
windowEvent.tableName = tableName;
|
|
2592
2593
|
windowEvent.tablePluralName = tablePluralName;
|
|
2593
2594
|
windowEvent.tablePluralLabel = tablePluralLabel;
|
|
@@ -8084,6 +8085,21 @@ class TruDataGridUtil {
|
|
|
8084
8085
|
return true;
|
|
8085
8086
|
return TruDataGridUtil.resolvePropertyPath(entity, propertyPath) !== null;
|
|
8086
8087
|
};
|
|
8088
|
+
static getCellEditorConfigField = (rowData, columnDef) => {
|
|
8089
|
+
const fieldName = columnDef.field;
|
|
8090
|
+
if (!fieldName)
|
|
8091
|
+
return undefined;
|
|
8092
|
+
const propertyPath = rowData?.[fieldName]?.propertyPath;
|
|
8093
|
+
if (TruDataGridUtil.isPropertyPathAvailable(rowData?.$entity, propertyPath))
|
|
8094
|
+
return fieldName;
|
|
8095
|
+
const relationshipConfigField = columnDef.relationshipConfigField;
|
|
8096
|
+
if (!relationshipConfigField)
|
|
8097
|
+
return fieldName;
|
|
8098
|
+
const relationshipPropertyPath = rowData?.[relationshipConfigField]?.propertyPath;
|
|
8099
|
+
if (!TruDataGridUtil.isPropertyPathAvailable(rowData?.$entity, relationshipPropertyPath))
|
|
8100
|
+
return fieldName;
|
|
8101
|
+
return relationshipConfigField;
|
|
8102
|
+
};
|
|
8087
8103
|
static validatePropertyPath = (entity, propertyPath) => {
|
|
8088
8104
|
const resolvedProperty = TruDataGridUtil.resolvePropertyPath(entity, propertyPath);
|
|
8089
8105
|
if (!resolvedProperty)
|
|
@@ -9186,9 +9202,9 @@ class TruDataGrid {
|
|
|
9186
9202
|
: configuredEditable;
|
|
9187
9203
|
if (!canEdit)
|
|
9188
9204
|
return false;
|
|
9189
|
-
const
|
|
9190
|
-
const propertyPath =
|
|
9191
|
-
? params.data?.[
|
|
9205
|
+
const configFieldName = TruDataGridUtil.getCellEditorConfigField(params.data, columnDef);
|
|
9206
|
+
const propertyPath = configFieldName
|
|
9207
|
+
? params.data?.[configFieldName]?.propertyPath
|
|
9192
9208
|
: undefined;
|
|
9193
9209
|
return TruDataGridUtil.isPropertyPathAvailable(params.data?.$entity, propertyPath);
|
|
9194
9210
|
},
|