@salesforce/lds-runtime-mobile 1.122.0 → 1.123.1

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
@@ -1275,9 +1275,15 @@ function makeDurable(environment, { durableStore, instrumentation }) {
1275
1275
  else {
1276
1276
  ingestStagingStore.recordsMap.set(key, record);
1277
1277
  }
1278
- },
1279
- // we don't need to prime metadata
1280
- () => { });
1278
+ }, (key, metadata) => {
1279
+ if (typeof key === 'string') {
1280
+ ingestStagingStore.fallbackStringKeyInMemoryStore.metadata[key] =
1281
+ metadata;
1282
+ }
1283
+ else {
1284
+ ingestStagingStore.metadataMap.set(key, metadata);
1285
+ }
1286
+ });
1281
1287
  snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
1282
1288
  })();
1283
1289
  for (const key of keysToReviveAsArray) {
@@ -7131,7 +7137,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
7131
7137
  const nullCheck = `json_extract("${alias}".data, '${leftPath}') ${operator === 'IN' ? 'IS' : 'IS NOT'} ?`;
7132
7138
  //if we only have a null in/nin then dont add the IN (y, z, ...)
7133
7139
  if (valueBinding.length > 0) {
7134
- sql = `json_extract("${alias}".data, '${leftPath}') ${isCaseSensitive === true ? '' : `COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
7140
+ sql = `json_extract("${alias}".data, '${leftPath}')${isCaseSensitive === true ? '' : ` COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
7135
7141
  }
7136
7142
  else {
7137
7143
  sql = `${includesNull ? nullCheck : ''}`;
@@ -7149,7 +7155,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
7149
7155
  sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE NOCASE`;
7150
7156
  }
7151
7157
  else {
7152
- sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} ${isCaseSensitive === true ? '' : `COLLATE NOCASE`}`;
7158
+ sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
7153
7159
  }
7154
7160
  binding.push(...valueBinding);
7155
7161
  }
@@ -7337,7 +7343,7 @@ function buildJoins(config) {
7337
7343
  }
7338
7344
  else {
7339
7345
  // predicate on a path
7340
- const left = `AND json_extract("${join.to}".data, '${condition.leftPath}')`;
7346
+ const left = ` AND json_extract("${join.to}".data, '${condition.leftPath}')`;
7341
7347
  const right = `json_extract("${join.alias}".data, '${condition.rightPath}')`;
7342
7348
  joined_sql = `${left} = ${right}`;
7343
7349
  }
@@ -7349,7 +7355,7 @@ function buildJoins(config) {
7349
7355
  joinAccumulator += `
7350
7356
  ${join.type} JOIN lds_data "${join.alias}"
7351
7357
  ON "${join.alias}".key like 'UiApi::RecordRepresentation:%'
7352
- AND ${formattedJoinCondition}
7358
+ AND${formattedJoinCondition}
7353
7359
  `;
7354
7360
  return joinAccumulator;
7355
7361
  }, '');
@@ -8037,6 +8043,15 @@ function scopeToJoins(scope = '', settings) {
8037
8043
  type: 'INNER',
8038
8044
  to: 'ServiceAppointment',
8039
8045
  conditions: [
8046
+ {
8047
+ type: PredicateType.single,
8048
+ alias: 'ServiceAppointment_AssignedResource',
8049
+ leftPath: '$.apiName',
8050
+ operator: '=',
8051
+ value: 'AssignedResource',
8052
+ dataType: 'String',
8053
+ isCaseSensitive: true,
8054
+ },
8040
8055
  {
8041
8056
  leftPath: '$.id',
8042
8057
  rightPath: '$.fields.ServiceAppointmentId.value',
@@ -8049,6 +8064,15 @@ function scopeToJoins(scope = '', settings) {
8049
8064
  type: 'INNER',
8050
8065
  to: 'ServiceAppointment_AssignedResource',
8051
8066
  conditions: [
8067
+ {
8068
+ type: PredicateType.single,
8069
+ alias: 'ServiceAppointment_AssignedResource_ServiceResource',
8070
+ leftPath: '$.apiName',
8071
+ operator: '=',
8072
+ value: 'ServiceResource',
8073
+ dataType: 'String',
8074
+ isCaseSensitive: true,
8075
+ },
8052
8076
  {
8053
8077
  leftPath: '$.fields.ServiceResourceId.value',
8054
8078
  rightPath: '$.id',
@@ -8060,6 +8084,7 @@ function scopeToJoins(scope = '', settings) {
8060
8084
  operator: '=',
8061
8085
  value: settings.userId,
8062
8086
  dataType: 'String',
8087
+ isCaseSensitive: true,
8063
8088
  },
8064
8089
  ],
8065
8090
  apiName: 'ServiceResource',
@@ -15644,4 +15669,4 @@ register({
15644
15669
  });
15645
15670
 
15646
15671
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15647
- // version: 1.122.0-aa6cc75e0
15672
+ // version: 1.123.1-553e88f85
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.122.0",
3
+ "version": "1.123.1",
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
@@ -1275,9 +1275,15 @@ function makeDurable(environment, { durableStore, instrumentation }) {
1275
1275
  else {
1276
1276
  ingestStagingStore.recordsMap.set(key, record);
1277
1277
  }
1278
- },
1279
- // we don't need to prime metadata
1280
- () => { });
1278
+ }, (key, metadata) => {
1279
+ if (typeof key === 'string') {
1280
+ ingestStagingStore.fallbackStringKeyInMemoryStore.metadata[key] =
1281
+ metadata;
1282
+ }
1283
+ else {
1284
+ ingestStagingStore.metadataMap.set(key, metadata);
1285
+ }
1286
+ });
1281
1287
  snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
1282
1288
  })();
1283
1289
  for (const key of keysToReviveAsArray) {
@@ -7131,7 +7137,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
7131
7137
  const nullCheck = `json_extract("${alias}".data, '${leftPath}') ${operator === 'IN' ? 'IS' : 'IS NOT'} ?`;
7132
7138
  //if we only have a null in/nin then dont add the IN (y, z, ...)
7133
7139
  if (valueBinding.length > 0) {
7134
- sql = `json_extract("${alias}".data, '${leftPath}') ${isCaseSensitive === true ? '' : `COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
7140
+ sql = `json_extract("${alias}".data, '${leftPath}')${isCaseSensitive === true ? '' : ` COLLATE NOCASE`} ${operator} ${questionSql} ${includesNull ? `OR ${nullCheck}` : ''}`;
7135
7141
  }
7136
7142
  else {
7137
7143
  sql = `${includesNull ? nullCheck : ''}`;
@@ -7149,7 +7155,7 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
7149
7155
  sql = `'${MultiPickListValueSeparator}' || json_extract("${alias}".data, '${leftPath}') || '${MultiPickListValueSeparator}' ${operator} ${questionSql} COLLATE NOCASE`;
7150
7156
  }
7151
7157
  else {
7152
- sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql} ${isCaseSensitive === true ? '' : `COLLATE NOCASE`}`;
7158
+ sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
7153
7159
  }
7154
7160
  binding.push(...valueBinding);
7155
7161
  }
@@ -7337,7 +7343,7 @@ function buildJoins(config) {
7337
7343
  }
7338
7344
  else {
7339
7345
  // predicate on a path
7340
- const left = `AND json_extract("${join.to}".data, '${condition.leftPath}')`;
7346
+ const left = ` AND json_extract("${join.to}".data, '${condition.leftPath}')`;
7341
7347
  const right = `json_extract("${join.alias}".data, '${condition.rightPath}')`;
7342
7348
  joined_sql = `${left} = ${right}`;
7343
7349
  }
@@ -7349,7 +7355,7 @@ function buildJoins(config) {
7349
7355
  joinAccumulator += `
7350
7356
  ${join.type} JOIN lds_data "${join.alias}"
7351
7357
  ON "${join.alias}".key like 'UiApi::RecordRepresentation:%'
7352
- AND ${formattedJoinCondition}
7358
+ AND${formattedJoinCondition}
7353
7359
  `;
7354
7360
  return joinAccumulator;
7355
7361
  }, '');
@@ -8037,6 +8043,15 @@ function scopeToJoins(scope = '', settings) {
8037
8043
  type: 'INNER',
8038
8044
  to: 'ServiceAppointment',
8039
8045
  conditions: [
8046
+ {
8047
+ type: PredicateType.single,
8048
+ alias: 'ServiceAppointment_AssignedResource',
8049
+ leftPath: '$.apiName',
8050
+ operator: '=',
8051
+ value: 'AssignedResource',
8052
+ dataType: 'String',
8053
+ isCaseSensitive: true,
8054
+ },
8040
8055
  {
8041
8056
  leftPath: '$.id',
8042
8057
  rightPath: '$.fields.ServiceAppointmentId.value',
@@ -8049,6 +8064,15 @@ function scopeToJoins(scope = '', settings) {
8049
8064
  type: 'INNER',
8050
8065
  to: 'ServiceAppointment_AssignedResource',
8051
8066
  conditions: [
8067
+ {
8068
+ type: PredicateType.single,
8069
+ alias: 'ServiceAppointment_AssignedResource_ServiceResource',
8070
+ leftPath: '$.apiName',
8071
+ operator: '=',
8072
+ value: 'ServiceResource',
8073
+ dataType: 'String',
8074
+ isCaseSensitive: true,
8075
+ },
8052
8076
  {
8053
8077
  leftPath: '$.fields.ServiceResourceId.value',
8054
8078
  rightPath: '$.id',
@@ -8060,6 +8084,7 @@ function scopeToJoins(scope = '', settings) {
8060
8084
  operator: '=',
8061
8085
  value: settings.userId,
8062
8086
  dataType: 'String',
8087
+ isCaseSensitive: true,
8063
8088
  },
8064
8089
  ],
8065
8090
  apiName: 'ServiceResource',
@@ -15644,4 +15669,4 @@ register({
15644
15669
  });
15645
15670
 
15646
15671
  export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
15647
- // version: 1.122.0-aa6cc75e0
15672
+ // version: 1.123.1-553e88f85