@salesforce/lds-runtime-mobile 1.361.0 → 1.362.0

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
@@ -109,7 +109,7 @@ function createErrorResponse(status, body) {
109
109
  };
110
110
  }
111
111
  function isSpanningRecord$2(fieldValue) {
112
- return fieldValue !== null && typeof fieldValue === 'object';
112
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
113
113
  }
114
114
  function mergeRecordFields$2(first, second) {
115
115
  const { fields: targetFields } = first;
@@ -5372,7 +5372,9 @@ const getTypeCacheKeys$1u = (rootKeySet, luvio, input, _fullPathFactory) => {
5372
5372
  const input_fields_length = field_values.length;
5373
5373
  for (let i = 0; i < input_fields_length; i++) {
5374
5374
  const field_value = input_fields[field_values[i]];
5375
- if (field_value.value !== null && typeof field_value.value === 'object') {
5375
+ if (field_value.value !== null &&
5376
+ typeof field_value.value === 'object' &&
5377
+ !Array.isArray(field_value.value)) {
5376
5378
  getTypeCacheKeys$1u(rootKeySet, luvio, field_value.value);
5377
5379
  }
5378
5380
  }
@@ -5856,7 +5858,7 @@ const DRAFTS_SELECTION = {
5856
5858
  required: false,
5857
5859
  };
5858
5860
  function isSpanningRecord$1(fieldValue) {
5859
- return fieldValue !== null && typeof fieldValue === 'object';
5861
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
5860
5862
  }
5861
5863
  function createRecordSelection(fieldDefinition) {
5862
5864
  const sel = dynamicSelect$8({
@@ -6974,7 +6976,7 @@ function extractTrackedFieldsToTrie(recordId, node, root) {
6974
6976
  current.children[key] = next;
6975
6977
  continue;
6976
6978
  }
6977
- if (fieldRep.isScalar('value') === false) {
6979
+ if (fieldRep.isScalar('value') === false && !Array.isArray(fieldRep.data?.value)) {
6978
6980
  const link = fieldRep.link('value');
6979
6981
  const spanningRep = link.follow();
6980
6982
  if (isExternalLookupFieldKey(spanningRep)) {
@@ -7115,7 +7117,7 @@ function markNulledOutPath(record, path) {
7115
7117
  }
7116
7118
  const resolved = fieldValueRepresentation.object(fieldName);
7117
7119
  if (isGraphNode(resolved) &&
7118
- resolved.isScalar('value') &&
7120
+ (resolved.isScalar('value') || Array.isArray(resolved.data?.value)) &&
7119
7121
  path.length > 0 && // TODO [W-14082782]: temporary fix
7120
7122
  !isFrozen(resolved.data)) {
7121
7123
  const stateFields = readFieldStateFromValueNode(resolved.data);
@@ -7153,7 +7155,7 @@ function _markMissingPath(record, path) {
7153
7155
  writeMissingFieldToStore(fieldValueRepresentation, fieldName);
7154
7156
  return;
7155
7157
  }
7156
- if (fieldValueValue.isScalar('value') === true) {
7158
+ if (fieldValueValue.isScalar('value') === true || Array.isArray(fieldValueValue.data?.value)) {
7157
7159
  return;
7158
7160
  }
7159
7161
  const link = fieldValueValue.link('value');
@@ -46629,12 +46631,14 @@ function pageInfoResolver(source) {
46629
46631
  e: EARLY_END,
46630
46632
  }),
46631
46633
  hasNextPage: source.hasNextPage,
46634
+ hasPreviousPage: source.hasPreviousPage,
46632
46635
  };
46633
46636
  }
46634
46637
  return {
46635
46638
  startCursor: null,
46636
46639
  endCursor: null,
46637
46640
  hasNextPage: source.hasNextPage,
46641
+ hasPreviousPage: source.hasPreviousPage,
46638
46642
  };
46639
46643
  }
46640
46644
  let startIndex = source.records[0].index;
@@ -46653,6 +46657,7 @@ function pageInfoResolver(source) {
46653
46657
  startCursor: encodeV1Cursor(startCursor),
46654
46658
  endCursor: encodeV1Cursor(endCursor),
46655
46659
  hasNextPage: source.hasNextPage,
46660
+ hasPreviousPage: source.hasPreviousPage,
46656
46661
  };
46657
46662
  }
46658
46663
  function pageResultCountResolver(source) {
@@ -46907,6 +46912,7 @@ async function connectionResolver(obj, args, context, info) {
46907
46912
  return {
46908
46913
  records: [],
46909
46914
  hasNextPage: false,
46915
+ hasPreviousPage: false,
46910
46916
  earlyEnd: false,
46911
46917
  offset: 0,
46912
46918
  };
@@ -46958,6 +46964,7 @@ async function connectionResolver(obj, args, context, info) {
46958
46964
  const { sql, bindings } = buildQuery(queryConfig);
46959
46965
  const results = await query(sql, bindings);
46960
46966
  let hasNextPage = false;
46967
+ const hasPreviousPage = offset > 0;
46961
46968
  let earlyEnd = false;
46962
46969
  if (wantsHasNextPage) {
46963
46970
  if (results.rows.length > limit) {
@@ -47006,6 +47013,7 @@ async function connectionResolver(obj, args, context, info) {
47006
47013
  return {
47007
47014
  records,
47008
47015
  hasNextPage,
47016
+ hasPreviousPage,
47009
47017
  earlyEnd,
47010
47018
  offset,
47011
47019
  };
@@ -50852,7 +50860,7 @@ function shouldUseAggregateUiForFields(fieldsArray, optionalFieldsArray, maxLeng
50852
50860
  return fieldsArray.length + optionalFieldsArray.length >= maxLengthPerChunk;
50853
50861
  }
50854
50862
  function isSpanningRecord(fieldValue) {
50855
- return fieldValue !== null && typeof fieldValue === 'object';
50863
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
50856
50864
  }
50857
50865
  function mergeRecordFields(first, second) {
50858
50866
  const { fields: targetFields } = first;
@@ -55827,4 +55835,4 @@ register({
55827
55835
  });
55828
55836
 
55829
55837
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, registerReportObserver, reportGraphqlQueryParseError };
55830
- // version: 1.361.0-6a70680f2b
55838
+ // version: 1.362.0-5d2767de00
@@ -2,7 +2,7 @@ import type { PathSelection } from '@luvio/engine';
2
2
  import type { RecordFieldTrie } from '../util/records';
3
3
  import type { RecordRepresentation } from '../types/RecordRepresentation';
4
4
  import type { FieldMapRepresentation } from '../util/fields';
5
- export declare function isSpanningRecord(fieldValue: null | string | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
5
+ export declare function isSpanningRecord(fieldValue: null | string | string[] | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
6
6
  export declare function createRecordSelection(fieldDefinition: RecordFieldTrie): PathSelection[];
7
7
  /**
8
8
  * Convert a list of fields and optional fields into RecordRepresentation its equivalent
@@ -8,7 +8,7 @@ export type PolymorphicFieldRepresentationNormalized = {
8
8
  };
9
9
  export type PolymorphicFieldRepresentation = {
10
10
  displayValue: string | null;
11
- value: RecordRepresentation | ScalarFieldType;
11
+ value: RecordRepresentation | ScalarFieldType | string[];
12
12
  };
13
13
  export type FieldMapRepresentationNormalized = {
14
14
  apiName: string;
@@ -12,6 +12,7 @@ export type IndexedRecordInformation = RecordInformation & {
12
12
  export type RecordConnectionInformation = {
13
13
  records: IndexedRecordInformation[];
14
14
  hasNextPage: boolean;
15
+ hasPreviousPage: boolean;
15
16
  earlyEnd: boolean;
16
17
  offset: number;
17
18
  };
@@ -5,14 +5,17 @@ export declare function pageInfoResolver(source: RecordConnectionInformation): {
5
5
  startCursor: null;
6
6
  endCursor: string;
7
7
  hasNextPage: boolean;
8
+ hasPreviousPage: boolean;
8
9
  } | {
9
10
  startCursor: null;
10
11
  endCursor: null;
11
12
  hasNextPage: boolean;
13
+ hasPreviousPage: boolean;
12
14
  } | {
13
15
  startCursor: string;
14
16
  endCursor: string;
15
17
  hasNextPage: boolean;
18
+ hasPreviousPage: boolean;
16
19
  };
17
20
  export declare function pageResultCountResolver(source: RecordConnectionInformation): number;
18
21
  export interface LocalCursor {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-mobile",
3
- "version": "1.361.0",
3
+ "version": "1.362.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for mobile/hybrid environments.",
6
6
  "main": "dist/main.js",
@@ -32,24 +32,24 @@
32
32
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
33
33
  },
34
34
  "dependencies": {
35
- "@salesforce/lds-adapters-uiapi": "^1.361.0",
36
- "@salesforce/lds-bindings": "^1.361.0",
37
- "@salesforce/lds-instrumentation": "^1.361.0",
35
+ "@salesforce/lds-adapters-uiapi": "^1.362.0",
36
+ "@salesforce/lds-bindings": "^1.362.0",
37
+ "@salesforce/lds-instrumentation": "^1.362.0",
38
38
  "@salesforce/user": "0.0.21",
39
39
  "o11y": "250.7.0",
40
40
  "o11y_schema": "256.126.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@salesforce/lds-adapters-graphql": "^1.361.0",
44
- "@salesforce/lds-drafts": "^1.361.0",
45
- "@salesforce/lds-durable-records": "^1.361.0",
46
- "@salesforce/lds-network-adapter": "^1.361.0",
47
- "@salesforce/lds-network-nimbus": "^1.361.0",
48
- "@salesforce/lds-store-binary": "^1.361.0",
49
- "@salesforce/lds-store-nimbus": "^1.361.0",
50
- "@salesforce/lds-store-sql": "^1.361.0",
51
- "@salesforce/lds-utils-adapters": "^1.361.0",
52
- "@salesforce/nimbus-plugin-lds": "^1.361.0",
43
+ "@salesforce/lds-adapters-graphql": "^1.362.0",
44
+ "@salesforce/lds-drafts": "^1.362.0",
45
+ "@salesforce/lds-durable-records": "^1.362.0",
46
+ "@salesforce/lds-network-adapter": "^1.362.0",
47
+ "@salesforce/lds-network-nimbus": "^1.362.0",
48
+ "@salesforce/lds-store-binary": "^1.362.0",
49
+ "@salesforce/lds-store-nimbus": "^1.362.0",
50
+ "@salesforce/lds-store-sql": "^1.362.0",
51
+ "@salesforce/lds-utils-adapters": "^1.362.0",
52
+ "@salesforce/nimbus-plugin-lds": "^1.362.0",
53
53
  "babel-plugin-dynamic-import-node": "^2.3.3",
54
54
  "wait-for-expect": "^3.0.2"
55
55
  },
package/sfdc/main.js CHANGED
@@ -109,7 +109,7 @@ function createErrorResponse(status, body) {
109
109
  };
110
110
  }
111
111
  function isSpanningRecord$2(fieldValue) {
112
- return fieldValue !== null && typeof fieldValue === 'object';
112
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
113
113
  }
114
114
  function mergeRecordFields$2(first, second) {
115
115
  const { fields: targetFields } = first;
@@ -5372,7 +5372,9 @@ const getTypeCacheKeys$1u = (rootKeySet, luvio, input, _fullPathFactory) => {
5372
5372
  const input_fields_length = field_values.length;
5373
5373
  for (let i = 0; i < input_fields_length; i++) {
5374
5374
  const field_value = input_fields[field_values[i]];
5375
- if (field_value.value !== null && typeof field_value.value === 'object') {
5375
+ if (field_value.value !== null &&
5376
+ typeof field_value.value === 'object' &&
5377
+ !Array.isArray(field_value.value)) {
5376
5378
  getTypeCacheKeys$1u(rootKeySet, luvio, field_value.value);
5377
5379
  }
5378
5380
  }
@@ -5856,7 +5858,7 @@ const DRAFTS_SELECTION = {
5856
5858
  required: false,
5857
5859
  };
5858
5860
  function isSpanningRecord$1(fieldValue) {
5859
- return fieldValue !== null && typeof fieldValue === 'object';
5861
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
5860
5862
  }
5861
5863
  function createRecordSelection(fieldDefinition) {
5862
5864
  const sel = dynamicSelect$8({
@@ -6974,7 +6976,7 @@ function extractTrackedFieldsToTrie(recordId, node, root) {
6974
6976
  current.children[key] = next;
6975
6977
  continue;
6976
6978
  }
6977
- if (fieldRep.isScalar('value') === false) {
6979
+ if (fieldRep.isScalar('value') === false && !Array.isArray(fieldRep.data?.value)) {
6978
6980
  const link = fieldRep.link('value');
6979
6981
  const spanningRep = link.follow();
6980
6982
  if (isExternalLookupFieldKey(spanningRep)) {
@@ -7115,7 +7117,7 @@ function markNulledOutPath(record, path) {
7115
7117
  }
7116
7118
  const resolved = fieldValueRepresentation.object(fieldName);
7117
7119
  if (isGraphNode(resolved) &&
7118
- resolved.isScalar('value') &&
7120
+ (resolved.isScalar('value') || Array.isArray(resolved.data?.value)) &&
7119
7121
  path.length > 0 && // TODO [W-14082782]: temporary fix
7120
7122
  !isFrozen(resolved.data)) {
7121
7123
  const stateFields = readFieldStateFromValueNode(resolved.data);
@@ -7153,7 +7155,7 @@ function _markMissingPath(record, path) {
7153
7155
  writeMissingFieldToStore(fieldValueRepresentation, fieldName);
7154
7156
  return;
7155
7157
  }
7156
- if (fieldValueValue.isScalar('value') === true) {
7158
+ if (fieldValueValue.isScalar('value') === true || Array.isArray(fieldValueValue.data?.value)) {
7157
7159
  return;
7158
7160
  }
7159
7161
  const link = fieldValueValue.link('value');
@@ -46629,12 +46631,14 @@ function pageInfoResolver(source) {
46629
46631
  e: EARLY_END,
46630
46632
  }),
46631
46633
  hasNextPage: source.hasNextPage,
46634
+ hasPreviousPage: source.hasPreviousPage,
46632
46635
  };
46633
46636
  }
46634
46637
  return {
46635
46638
  startCursor: null,
46636
46639
  endCursor: null,
46637
46640
  hasNextPage: source.hasNextPage,
46641
+ hasPreviousPage: source.hasPreviousPage,
46638
46642
  };
46639
46643
  }
46640
46644
  let startIndex = source.records[0].index;
@@ -46653,6 +46657,7 @@ function pageInfoResolver(source) {
46653
46657
  startCursor: encodeV1Cursor(startCursor),
46654
46658
  endCursor: encodeV1Cursor(endCursor),
46655
46659
  hasNextPage: source.hasNextPage,
46660
+ hasPreviousPage: source.hasPreviousPage,
46656
46661
  };
46657
46662
  }
46658
46663
  function pageResultCountResolver(source) {
@@ -46907,6 +46912,7 @@ async function connectionResolver(obj, args, context, info) {
46907
46912
  return {
46908
46913
  records: [],
46909
46914
  hasNextPage: false,
46915
+ hasPreviousPage: false,
46910
46916
  earlyEnd: false,
46911
46917
  offset: 0,
46912
46918
  };
@@ -46958,6 +46964,7 @@ async function connectionResolver(obj, args, context, info) {
46958
46964
  const { sql, bindings } = buildQuery(queryConfig);
46959
46965
  const results = await query(sql, bindings);
46960
46966
  let hasNextPage = false;
46967
+ const hasPreviousPage = offset > 0;
46961
46968
  let earlyEnd = false;
46962
46969
  if (wantsHasNextPage) {
46963
46970
  if (results.rows.length > limit) {
@@ -47006,6 +47013,7 @@ async function connectionResolver(obj, args, context, info) {
47006
47013
  return {
47007
47014
  records,
47008
47015
  hasNextPage,
47016
+ hasPreviousPage,
47009
47017
  earlyEnd,
47010
47018
  offset,
47011
47019
  };
@@ -50852,7 +50860,7 @@ function shouldUseAggregateUiForFields(fieldsArray, optionalFieldsArray, maxLeng
50852
50860
  return fieldsArray.length + optionalFieldsArray.length >= maxLengthPerChunk;
50853
50861
  }
50854
50862
  function isSpanningRecord(fieldValue) {
50855
- return fieldValue !== null && typeof fieldValue === 'object';
50863
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
50856
50864
  }
50857
50865
  function mergeRecordFields(first, second) {
50858
50866
  const { fields: targetFields } = first;
@@ -55827,4 +55835,4 @@ register({
55827
55835
  });
55828
55836
 
55829
55837
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, registerReportObserver, reportGraphqlQueryParseError };
55830
- // version: 1.361.0-6a70680f2b
55838
+ // version: 1.362.0-5d2767de00
@@ -2,7 +2,7 @@ import type { PathSelection } from '@luvio/engine';
2
2
  import type { RecordFieldTrie } from '../util/records';
3
3
  import type { RecordRepresentation } from '../types/RecordRepresentation';
4
4
  import type { FieldMapRepresentation } from '../util/fields';
5
- export declare function isSpanningRecord(fieldValue: null | string | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
5
+ export declare function isSpanningRecord(fieldValue: null | string | string[] | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
6
6
  export declare function createRecordSelection(fieldDefinition: RecordFieldTrie): PathSelection[];
7
7
  /**
8
8
  * Convert a list of fields and optional fields into RecordRepresentation its equivalent
@@ -8,7 +8,7 @@ export type PolymorphicFieldRepresentationNormalized = {
8
8
  };
9
9
  export type PolymorphicFieldRepresentation = {
10
10
  displayValue: string | null;
11
- value: RecordRepresentation | ScalarFieldType;
11
+ value: RecordRepresentation | ScalarFieldType | string[];
12
12
  };
13
13
  export type FieldMapRepresentationNormalized = {
14
14
  apiName: string;
@@ -12,6 +12,7 @@ export type IndexedRecordInformation = RecordInformation & {
12
12
  export type RecordConnectionInformation = {
13
13
  records: IndexedRecordInformation[];
14
14
  hasNextPage: boolean;
15
+ hasPreviousPage: boolean;
15
16
  earlyEnd: boolean;
16
17
  offset: number;
17
18
  };
@@ -5,14 +5,17 @@ export declare function pageInfoResolver(source: RecordConnectionInformation): {
5
5
  startCursor: null;
6
6
  endCursor: string;
7
7
  hasNextPage: boolean;
8
+ hasPreviousPage: boolean;
8
9
  } | {
9
10
  startCursor: null;
10
11
  endCursor: null;
11
12
  hasNextPage: boolean;
13
+ hasPreviousPage: boolean;
12
14
  } | {
13
15
  startCursor: string;
14
16
  endCursor: string;
15
17
  hasNextPage: boolean;
18
+ hasPreviousPage: boolean;
16
19
  };
17
20
  export declare function pageResultCountResolver(source: RecordConnectionInformation): number;
18
21
  export interface LocalCursor {