@alfresco/adf-process-services-cloud 9.2.0-38745876662 → 9.2.0-38778559181
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.
|
@@ -8062,7 +8062,7 @@ const isDropdownCloudValidValue = (value, options) => !!value && isDropdownCloud
|
|
|
8062
8062
|
const isDropdownCloudRestField = (field) => field?.optionType === 'rest' && !!field?.restUrl;
|
|
8063
8063
|
const isDropdownCloudLinkedField = (field) => !!field?.rule?.ruleOn;
|
|
8064
8064
|
const getOptionsFromPath = (data, path, id, label) => {
|
|
8065
|
-
const properties = path.split('.');
|
|
8065
|
+
const properties = path.split('.').map((property) => property.trim());
|
|
8066
8066
|
const currentProperty = properties.shift();
|
|
8067
8067
|
if (data === null || typeof data !== 'object' || !Object.hasOwn(data, currentProperty)) {
|
|
8068
8068
|
return { options: [], errors: [`${currentProperty} not found in ${JSON.stringify(data)}`] };
|
|
@@ -8080,7 +8080,11 @@ const resolveDropdownCloudVariableOptions = (field, variableConfig = field?.vari
|
|
|
8080
8080
|
if (data == null) {
|
|
8081
8081
|
return null;
|
|
8082
8082
|
}
|
|
8083
|
-
|
|
8083
|
+
const optionsPath = variableConfig?.optionsPath ?? DEFAULT_VARIABLE_OPTION_PATH;
|
|
8084
|
+
if (!optionsPath.trim()) {
|
|
8085
|
+
return { options: [], errors: ['Options path is empty'] };
|
|
8086
|
+
}
|
|
8087
|
+
return getOptionsFromPath(data, optionsPath, variableConfig?.optionsId ?? DEFAULT_VARIABLE_OPTION_ID, variableConfig?.optionsLabel ?? DEFAULT_VARIABLE_OPTION_LABEL);
|
|
8084
8088
|
};
|
|
8085
8089
|
|
|
8086
8090
|
/*!
|
|
@@ -15924,6 +15928,9 @@ class DataTablePathParserHelper {
|
|
|
15924
15928
|
return undefined;
|
|
15925
15929
|
}
|
|
15926
15930
|
const properties = this.splitPathIntoProperties(path);
|
|
15931
|
+
if (properties.length === 0) {
|
|
15932
|
+
return undefined;
|
|
15933
|
+
}
|
|
15927
15934
|
const currentProperty = properties.shift();
|
|
15928
15935
|
const propertyIndexReferences = this.getIndexReferencesFromProperty(currentProperty);
|
|
15929
15936
|
const purePropertyName = this.extractPurePropertyName(currentProperty);
|
|
@@ -15955,7 +15962,7 @@ class DataTablePathParserHelper {
|
|
|
15955
15962
|
switch (char) {
|
|
15956
15963
|
case separator:
|
|
15957
15964
|
if (isPropertySeparatorOutsideBrackets()) {
|
|
15958
|
-
properties.push(currentPropertyBuffer);
|
|
15965
|
+
properties.push(currentPropertyBuffer.trim());
|
|
15959
15966
|
currentPropertyBuffer = '';
|
|
15960
15967
|
}
|
|
15961
15968
|
else {
|
|
@@ -15975,8 +15982,9 @@ class DataTablePathParserHelper {
|
|
|
15975
15982
|
break;
|
|
15976
15983
|
}
|
|
15977
15984
|
}
|
|
15978
|
-
|
|
15979
|
-
|
|
15985
|
+
const lastProperty = currentPropertyBuffer.trim();
|
|
15986
|
+
if (lastProperty) {
|
|
15987
|
+
properties.push(lastProperty);
|
|
15980
15988
|
}
|
|
15981
15989
|
return properties;
|
|
15982
15990
|
}
|