@salesforce/lds-runtime-mobile 1.131.3 → 1.131.5
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 +22 -5
- package/package.json +1 -1
- package/sfdc/main.js +22 -5
package/dist/main.js
CHANGED
|
@@ -6251,16 +6251,23 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
6251
6251
|
|
|
6252
6252
|
const API_NAMESPACE = 'UiApi';
|
|
6253
6253
|
const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
|
|
6254
|
+
const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
|
|
6254
6255
|
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
|
|
6256
|
+
const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name`;
|
|
6255
6257
|
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
6256
6258
|
function isStoreKeyRecordId(key) {
|
|
6257
6259
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
|
|
6258
6260
|
}
|
|
6261
|
+
function isStoreKeyRecordViewEntity(key) {
|
|
6262
|
+
return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
|
|
6263
|
+
key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
|
|
6264
|
+
}
|
|
6259
6265
|
function isStoreKeyRecordField(key) {
|
|
6260
6266
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) > -1;
|
|
6261
6267
|
}
|
|
6262
6268
|
function extractRecordIdFromStoreKey(key) {
|
|
6263
|
-
if (key === undefined ||
|
|
6269
|
+
if (key === undefined ||
|
|
6270
|
+
(key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
|
|
6264
6271
|
return undefined;
|
|
6265
6272
|
}
|
|
6266
6273
|
const parts = key.split(':');
|
|
@@ -6275,7 +6282,8 @@ function isStoreRecordError(storeRecord) {
|
|
|
6275
6282
|
}
|
|
6276
6283
|
function isEntryDurableRecordRepresentation(entry, key) {
|
|
6277
6284
|
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
6278
|
-
return isStoreKeyRecordId(key)
|
|
6285
|
+
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity(key)) &&
|
|
6286
|
+
entry.data.__type === undefined);
|
|
6279
6287
|
}
|
|
6280
6288
|
|
|
6281
6289
|
/**
|
|
@@ -11782,6 +11790,15 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
11782
11790
|
links,
|
|
11783
11791
|
};
|
|
11784
11792
|
}
|
|
11793
|
+
function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
11794
|
+
// this will likely need to be handled when moving to structured keys
|
|
11795
|
+
// note record view entities dont have an associated keybuilder. They get ingested as records to a different key format
|
|
11796
|
+
// see the override for how they are handled packages/lds-adapters-uiapi/src/raml-artifacts/types/RecordRepresentation/keyBuilderFromType.ts
|
|
11797
|
+
if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
|
|
11798
|
+
return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
|
|
11799
|
+
}
|
|
11800
|
+
return keyBuilderRecord(luvio, { recordId });
|
|
11801
|
+
}
|
|
11785
11802
|
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
11786
11803
|
const getEntries = function (entries, segment) {
|
|
11787
11804
|
// this HOF only inspects records in the default segment
|
|
@@ -11801,7 +11818,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
11801
11818
|
const recordId = extractRecordIdFromStoreKey(id);
|
|
11802
11819
|
if (recordId !== undefined) {
|
|
11803
11820
|
if (recordEntries[recordId] === undefined) {
|
|
11804
|
-
const key =
|
|
11821
|
+
const key = getDenormalizedKey(id, recordId, luvio);
|
|
11805
11822
|
recordEntries[recordId] = true;
|
|
11806
11823
|
filteredEntryIds.push(key);
|
|
11807
11824
|
}
|
|
@@ -11845,7 +11862,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
11845
11862
|
const recordId = extractRecordIdFromStoreKey(key);
|
|
11846
11863
|
// do not put normalized field values
|
|
11847
11864
|
if (recordId !== undefined) {
|
|
11848
|
-
const recordKey =
|
|
11865
|
+
const recordKey = getDenormalizedKey(key, recordId, luvio);
|
|
11849
11866
|
if (putRecords[recordId] === true) {
|
|
11850
11867
|
continue;
|
|
11851
11868
|
}
|
|
@@ -15726,4 +15743,4 @@ register({
|
|
|
15726
15743
|
});
|
|
15727
15744
|
|
|
15728
15745
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15729
|
-
// version: 1.131.
|
|
15746
|
+
// version: 1.131.5-85e8eb5ad
|
package/package.json
CHANGED
package/sfdc/main.js
CHANGED
|
@@ -6251,16 +6251,23 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
6251
6251
|
|
|
6252
6252
|
const API_NAMESPACE = 'UiApi';
|
|
6253
6253
|
const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
|
|
6254
|
+
const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
|
|
6254
6255
|
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
|
|
6256
|
+
const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name`;
|
|
6255
6257
|
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
6256
6258
|
function isStoreKeyRecordId(key) {
|
|
6257
6259
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
|
|
6258
6260
|
}
|
|
6261
|
+
function isStoreKeyRecordViewEntity(key) {
|
|
6262
|
+
return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
|
|
6263
|
+
key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
|
|
6264
|
+
}
|
|
6259
6265
|
function isStoreKeyRecordField(key) {
|
|
6260
6266
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) > -1;
|
|
6261
6267
|
}
|
|
6262
6268
|
function extractRecordIdFromStoreKey(key) {
|
|
6263
|
-
if (key === undefined ||
|
|
6269
|
+
if (key === undefined ||
|
|
6270
|
+
(key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
|
|
6264
6271
|
return undefined;
|
|
6265
6272
|
}
|
|
6266
6273
|
const parts = key.split(':');
|
|
@@ -6275,7 +6282,8 @@ function isStoreRecordError(storeRecord) {
|
|
|
6275
6282
|
}
|
|
6276
6283
|
function isEntryDurableRecordRepresentation(entry, key) {
|
|
6277
6284
|
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
6278
|
-
return isStoreKeyRecordId(key)
|
|
6285
|
+
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity(key)) &&
|
|
6286
|
+
entry.data.__type === undefined);
|
|
6279
6287
|
}
|
|
6280
6288
|
|
|
6281
6289
|
/**
|
|
@@ -11782,6 +11790,15 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
11782
11790
|
links,
|
|
11783
11791
|
};
|
|
11784
11792
|
}
|
|
11793
|
+
function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
11794
|
+
// this will likely need to be handled when moving to structured keys
|
|
11795
|
+
// note record view entities dont have an associated keybuilder. They get ingested as records to a different key format
|
|
11796
|
+
// see the override for how they are handled packages/lds-adapters-uiapi/src/raml-artifacts/types/RecordRepresentation/keyBuilderFromType.ts
|
|
11797
|
+
if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
|
|
11798
|
+
return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
|
|
11799
|
+
}
|
|
11800
|
+
return keyBuilderRecord(luvio, { recordId });
|
|
11801
|
+
}
|
|
11785
11802
|
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
11786
11803
|
const getEntries = function (entries, segment) {
|
|
11787
11804
|
// this HOF only inspects records in the default segment
|
|
@@ -11801,7 +11818,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
11801
11818
|
const recordId = extractRecordIdFromStoreKey(id);
|
|
11802
11819
|
if (recordId !== undefined) {
|
|
11803
11820
|
if (recordEntries[recordId] === undefined) {
|
|
11804
|
-
const key =
|
|
11821
|
+
const key = getDenormalizedKey(id, recordId, luvio);
|
|
11805
11822
|
recordEntries[recordId] = true;
|
|
11806
11823
|
filteredEntryIds.push(key);
|
|
11807
11824
|
}
|
|
@@ -11845,7 +11862,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
11845
11862
|
const recordId = extractRecordIdFromStoreKey(key);
|
|
11846
11863
|
// do not put normalized field values
|
|
11847
11864
|
if (recordId !== undefined) {
|
|
11848
|
-
const recordKey =
|
|
11865
|
+
const recordKey = getDenormalizedKey(key, recordId, luvio);
|
|
11849
11866
|
if (putRecords[recordId] === true) {
|
|
11850
11867
|
continue;
|
|
11851
11868
|
}
|
|
@@ -15726,4 +15743,4 @@ register({
|
|
|
15726
15743
|
});
|
|
15727
15744
|
|
|
15728
15745
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15729
|
-
// version: 1.131.
|
|
15746
|
+
// version: 1.131.5-85e8eb5ad
|