@salesforce/lds-runtime-mobile 1.133.1 → 1.133.3

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/main.js CHANGED
@@ -2761,7 +2761,10 @@ function fieldFilter(fieldName, fieldNode, alias, apiName, input, joins) {
2761
2761
  for (let i = 0; i < length; i++) {
2762
2762
  const term = op.value.value[i];
2763
2763
  if (term !== null) {
2764
- const splittedValue = term.split(MultiPickListValueSeparator$1);
2764
+ const splittedValue = term
2765
+ .split(MultiPickListValueSeparator$1)
2766
+ .map((v) => v.trim())
2767
+ .filter((v) => v.length > 0);
2765
2768
  if (splittedValue.length === 1) {
2766
2769
  children.push(comparison(extract, op.operator, {
2767
2770
  type: ValueType.MultiPicklistSet,
@@ -3216,10 +3219,16 @@ function operatorWithValue(operator, valueNode, objectInfoDataType) {
3216
3219
  if (objectInfoDataType === 'MultiPicklist') {
3217
3220
  if (isMultiPicklistOperatorType(operator)) {
3218
3221
  if (is(valueNode, 'StringValue')) {
3222
+ // The raw value could be ';;a; b;;', clean it up to 'a;b'
3223
+ const welformatedValue = valueNode.value
3224
+ .split(MultiPickListValueSeparator$1)
3225
+ .map((v) => v.trim())
3226
+ .filter((v) => v.length > 0)
3227
+ .join(MultiPickListValueSeparator$1);
3219
3228
  return success({
3220
3229
  type: 'MultiPicklistOperator',
3221
3230
  operator,
3222
- value: stringLiteral(valueNode.value),
3231
+ value: stringLiteral(welformatedValue),
3223
3232
  });
3224
3233
  }
3225
3234
  return failure([message(`Comparison value must be a MultiPicklist`)]);
@@ -6996,7 +7005,14 @@ function createMultiPicklistPredicate(value, operator, fieldInfo, alias) {
6996
7005
  }
6997
7006
  // generate single prodicate for = and !=
6998
7007
  if (operator === '=' || operator === '!=') {
6999
- return createSinglePredicate(value, operator, fieldInfo, alias);
7008
+ // The raw value could be ';;a; b;;', clean it up to 'a;b'
7009
+ const welformatedValue = value
7010
+ .toString()
7011
+ .split(MultiPickListValueSeparator)
7012
+ .map((v) => v.trim())
7013
+ .filter((v) => v.length > 0)
7014
+ .join(MultiPickListValueSeparator);
7015
+ return createSinglePredicate(welformatedValue, operator, fieldInfo, alias);
7000
7016
  }
7001
7017
  // if we have more than 1 value in the array from an includes/excludes we must split the values into
7002
7018
  // a compound OR predicate for includes, AND predicate for excludes. each predicate could a composite
@@ -7006,7 +7022,10 @@ function createMultiPicklistPredicate(value, operator, fieldInfo, alias) {
7006
7022
  type: PredicateType.compound,
7007
7023
  operator: operator === 'LIKE' ? 'or' : 'and',
7008
7024
  children: valueArray.map((v) => {
7009
- const splittedValue = v.split(MultiPickListValueSeparator);
7025
+ const splittedValue = v
7026
+ .split(MultiPickListValueSeparator)
7027
+ .map((v) => v.trim())
7028
+ .filter((v) => v.length > 0);
7010
7029
  if (splittedValue.length === 1) {
7011
7030
  return createSinglePredicate(v, operator, fieldInfo, alias);
7012
7031
  }
@@ -15731,4 +15750,4 @@ register({
15731
15750
  });
15732
15751
 
15733
15752
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15734
- // version: 1.133.1-636752773
15753
+ // version: 1.133.3-9eae0c441
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.133.1",
3
+ "version": "1.133.3",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
package/sfdc/main.js CHANGED
@@ -2761,7 +2761,10 @@ function fieldFilter(fieldName, fieldNode, alias, apiName, input, joins) {
2761
2761
  for (let i = 0; i < length; i++) {
2762
2762
  const term = op.value.value[i];
2763
2763
  if (term !== null) {
2764
- const splittedValue = term.split(MultiPickListValueSeparator$1);
2764
+ const splittedValue = term
2765
+ .split(MultiPickListValueSeparator$1)
2766
+ .map((v) => v.trim())
2767
+ .filter((v) => v.length > 0);
2765
2768
  if (splittedValue.length === 1) {
2766
2769
  children.push(comparison(extract, op.operator, {
2767
2770
  type: ValueType.MultiPicklistSet,
@@ -3216,10 +3219,16 @@ function operatorWithValue(operator, valueNode, objectInfoDataType) {
3216
3219
  if (objectInfoDataType === 'MultiPicklist') {
3217
3220
  if (isMultiPicklistOperatorType(operator)) {
3218
3221
  if (is(valueNode, 'StringValue')) {
3222
+ // The raw value could be ';;a; b;;', clean it up to 'a;b'
3223
+ const welformatedValue = valueNode.value
3224
+ .split(MultiPickListValueSeparator$1)
3225
+ .map((v) => v.trim())
3226
+ .filter((v) => v.length > 0)
3227
+ .join(MultiPickListValueSeparator$1);
3219
3228
  return success({
3220
3229
  type: 'MultiPicklistOperator',
3221
3230
  operator,
3222
- value: stringLiteral(valueNode.value),
3231
+ value: stringLiteral(welformatedValue),
3223
3232
  });
3224
3233
  }
3225
3234
  return failure([message(`Comparison value must be a MultiPicklist`)]);
@@ -6996,7 +7005,14 @@ function createMultiPicklistPredicate(value, operator, fieldInfo, alias) {
6996
7005
  }
6997
7006
  // generate single prodicate for = and !=
6998
7007
  if (operator === '=' || operator === '!=') {
6999
- return createSinglePredicate(value, operator, fieldInfo, alias);
7008
+ // The raw value could be ';;a; b;;', clean it up to 'a;b'
7009
+ const welformatedValue = value
7010
+ .toString()
7011
+ .split(MultiPickListValueSeparator)
7012
+ .map((v) => v.trim())
7013
+ .filter((v) => v.length > 0)
7014
+ .join(MultiPickListValueSeparator);
7015
+ return createSinglePredicate(welformatedValue, operator, fieldInfo, alias);
7000
7016
  }
7001
7017
  // if we have more than 1 value in the array from an includes/excludes we must split the values into
7002
7018
  // a compound OR predicate for includes, AND predicate for excludes. each predicate could a composite
@@ -7006,7 +7022,10 @@ function createMultiPicklistPredicate(value, operator, fieldInfo, alias) {
7006
7022
  type: PredicateType.compound,
7007
7023
  operator: operator === 'LIKE' ? 'or' : 'and',
7008
7024
  children: valueArray.map((v) => {
7009
- const splittedValue = v.split(MultiPickListValueSeparator);
7025
+ const splittedValue = v
7026
+ .split(MultiPickListValueSeparator)
7027
+ .map((v) => v.trim())
7028
+ .filter((v) => v.length > 0);
7010
7029
  if (splittedValue.length === 1) {
7011
7030
  return createSinglePredicate(v, operator, fieldInfo, alias);
7012
7031
  }
@@ -15731,4 +15750,4 @@ register({
15731
15750
  });
15732
15751
 
15733
15752
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15734
- // version: 1.133.1-636752773
15753
+ // version: 1.133.3-9eae0c441