@salesforce/lds-ads-bridge 1.266.0-dev20 → 1.266.0-dev21
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.
- package/dist/ads-bridge-perf.js +12 -6
- package/dist/adsBridge.js +1 -1
- package/package.json +3 -3
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -481,7 +481,7 @@ const callbacks$1 = [];
|
|
|
481
481
|
function register(r) {
|
|
482
482
|
callbacks$1.forEach((callback) => callback(r));
|
|
483
483
|
}
|
|
484
|
-
// version: 1.266.0-
|
|
484
|
+
// version: 1.266.0-dev21-b2a247476
|
|
485
485
|
|
|
486
486
|
/**
|
|
487
487
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -4797,15 +4797,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
4797
4797
|
/**
|
|
4798
4798
|
* Returns the field API name, qualified with an object name if possible.
|
|
4799
4799
|
* @param value The value from which to get the qualified field API name.
|
|
4800
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
4800
4801
|
* @return The qualified field API name.
|
|
4801
4802
|
*/
|
|
4802
|
-
function getFieldApiName(value) {
|
|
4803
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
4803
4804
|
// Note: tightening validation logic changes behavior from userland getting
|
|
4804
4805
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
4805
|
-
// change the behavior.
|
|
4806
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
4807
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
4806
4808
|
if (isString(value)) {
|
|
4807
4809
|
const trimmed = value.trim();
|
|
4808
|
-
if (trimmed.length > 0) {
|
|
4810
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
4809
4811
|
return trimmed;
|
|
4810
4812
|
}
|
|
4811
4813
|
}
|
|
@@ -4818,15 +4820,19 @@ function getFieldApiName(value) {
|
|
|
4818
4820
|
/**
|
|
4819
4821
|
* Returns the field API name.
|
|
4820
4822
|
* @param value The value from which to get the field API name.
|
|
4823
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
4821
4824
|
* @returns The field API name.
|
|
4822
4825
|
*/
|
|
4823
|
-
function getFieldApiNamesArray(value) {
|
|
4826
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
4824
4827
|
const valueArray = isArray(value) ? value : [value];
|
|
4825
4828
|
const array = [];
|
|
4826
4829
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
4827
4830
|
const item = valueArray[i];
|
|
4828
|
-
const apiName = getFieldApiName(item);
|
|
4831
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
4829
4832
|
if (apiName === undefined) {
|
|
4833
|
+
if (options.onlyQualifiedFieldNames) {
|
|
4834
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
4835
|
+
}
|
|
4830
4836
|
return undefined;
|
|
4831
4837
|
}
|
|
4832
4838
|
push$1.call(array, apiName);
|
package/dist/adsBridge.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-ads-bridge",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev21",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Bridge to sync data between LDS and ADS",
|
|
6
6
|
"main": "dist/adsBridge.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@salesforce/lds-adapters-uiapi": "^1.266.0-
|
|
33
|
-
"@salesforce/lds-uiapi-record-utils": "^1.266.0-
|
|
32
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev21",
|
|
33
|
+
"@salesforce/lds-uiapi-record-utils": "^1.266.0-dev21"
|
|
34
34
|
}
|
|
35
35
|
}
|