@salesforce/lds-adapters-uiapi 1.228.1 → 1.229.0-dev2
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/es/es2018/uiapi-records-service.js +26 -10
- package/package.json +7 -7
- package/sfdc/graphqlAdapters.js +1 -1
- package/sfdc/index.js +27 -11
|
@@ -5099,7 +5099,7 @@ function fulfill(existing, incoming) {
|
|
|
5099
5099
|
const batchRequestWithSingleRequest = isSingleBatchRecordRequest(existingUrlParams) &&
|
|
5100
5100
|
isSingleRecordRequest(urlParams) &&
|
|
5101
5101
|
incomingUrlRecords[0] === existingUrlRecords[0];
|
|
5102
|
-
if (!batchRequestWithSingleRequest) {
|
|
5102
|
+
if (!batchRequestWithSingleRequest || isRestrictedPathCondition(existingPath, path)) {
|
|
5103
5103
|
return false;
|
|
5104
5104
|
}
|
|
5105
5105
|
}
|
|
@@ -5142,6 +5142,12 @@ function isSingleBatchRecordRequest(urlParams) {
|
|
|
5142
5142
|
function isSingleRecordRequest(urlParams) {
|
|
5143
5143
|
return hasOwnProperty.call(urlParams, 'recordId');
|
|
5144
5144
|
}
|
|
5145
|
+
function isRestrictedPathCondition(existingPath, path) {
|
|
5146
|
+
// should not dedupe getRecordUi and getRecord as both of their representation is different
|
|
5147
|
+
// records call cannot digest response of getRecordUi
|
|
5148
|
+
return ((existingPath.includes('/record-ui') && path.includes('/records')) ||
|
|
5149
|
+
(existingPath.includes('/records') && path.includes('/record-ui')));
|
|
5150
|
+
}
|
|
5145
5151
|
|
|
5146
5152
|
const createResourceRequest$16 = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
5147
5153
|
return {
|
|
@@ -11974,18 +11980,28 @@ const buildLayoutModeCacheSnapshot = (apiName, recordTypeId, layoutType, mode) =
|
|
|
11974
11980
|
* These are intermediate lookups to check if the record is in the L2 cache
|
|
11975
11981
|
* @param {Luvio} luvio
|
|
11976
11982
|
* @param {GetRecordLayoutTypeConfig} config
|
|
11977
|
-
* @param {BuildCachedSnapshot<BuildSnapshotContext} cachedSnapshot
|
|
11983
|
+
* @param {BuildCachedSnapshot<BuildSnapshotContext>} cachedSnapshot
|
|
11978
11984
|
*/
|
|
11979
11985
|
function makeCacheOnlySnapshot(luvio, config, adapterContext, cachedSnapshot) {
|
|
11980
|
-
return luvio.applyCachePolicy(
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
},
|
|
11985
|
-
}, { config, luvio, adapterContext }, cachedSnapshot,
|
|
11986
|
-
// this won't be invoked since we're requesting only-if-cached
|
|
11986
|
+
return luvio.applyCachePolicy(
|
|
11987
|
+
// Pass empty context so environment will use its default cache-policy
|
|
11988
|
+
{}, { config, luvio, adapterContext }, cachedSnapshot,
|
|
11989
|
+
// disallow hitting the network by returning a gateway timeout
|
|
11987
11990
|
() => {
|
|
11988
|
-
|
|
11991
|
+
return new Promise((resolve) => {
|
|
11992
|
+
resolve({
|
|
11993
|
+
state: 'Error',
|
|
11994
|
+
data: undefined,
|
|
11995
|
+
error: {
|
|
11996
|
+
body: undefined,
|
|
11997
|
+
headers: {},
|
|
11998
|
+
ok: false,
|
|
11999
|
+
status: 504,
|
|
12000
|
+
statusText: 'Gateway Timeout',
|
|
12001
|
+
errorType: 'fetchResponse',
|
|
12002
|
+
},
|
|
12003
|
+
});
|
|
12004
|
+
});
|
|
11989
12005
|
});
|
|
11990
12006
|
}
|
|
11991
12007
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.229.0-dev2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Wire adapters for record related UI API endpoints",
|
|
6
6
|
"main": "dist/es/es2018/uiapi-records-service.js",
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@salesforce/lds-bindings": "
|
|
72
|
-
"@salesforce/lds-default-luvio": "
|
|
71
|
+
"@salesforce/lds-bindings": "1.229.0-dev2",
|
|
72
|
+
"@salesforce/lds-default-luvio": "1.229.0-dev2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@databases/sqlite": "^3.0.0",
|
|
76
|
-
"@salesforce/lds-compiler-plugins": "
|
|
77
|
-
"@salesforce/lds-jest": "
|
|
78
|
-
"@salesforce/lds-store-binary": "
|
|
79
|
-
"@salesforce/lds-uiapi-record-utils": "
|
|
76
|
+
"@salesforce/lds-compiler-plugins": "1.229.0-dev2",
|
|
77
|
+
"@salesforce/lds-jest": "1.229.0-dev2",
|
|
78
|
+
"@salesforce/lds-store-binary": "1.229.0-dev2",
|
|
79
|
+
"@salesforce/lds-uiapi-record-utils": "1.229.0-dev2"
|
|
80
80
|
},
|
|
81
81
|
"luvioBundlesize": [
|
|
82
82
|
{
|
package/sfdc/graphqlAdapters.js
CHANGED
|
@@ -18121,4 +18121,4 @@ register({
|
|
|
18121
18121
|
});
|
|
18122
18122
|
|
|
18123
18123
|
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
|
|
18124
|
-
// version: 1.
|
|
18124
|
+
// version: 1.229.0-dev2-696fe5026
|
package/sfdc/index.js
CHANGED
|
@@ -4965,7 +4965,7 @@ function fulfill(existing, incoming) {
|
|
|
4965
4965
|
const batchRequestWithSingleRequest = isSingleBatchRecordRequest(existingUrlParams) &&
|
|
4966
4966
|
isSingleRecordRequest(urlParams) &&
|
|
4967
4967
|
incomingUrlRecords[0] === existingUrlRecords[0];
|
|
4968
|
-
if (!batchRequestWithSingleRequest) {
|
|
4968
|
+
if (!batchRequestWithSingleRequest || isRestrictedPathCondition(existingPath, path)) {
|
|
4969
4969
|
return false;
|
|
4970
4970
|
}
|
|
4971
4971
|
}
|
|
@@ -5008,6 +5008,12 @@ function isSingleBatchRecordRequest(urlParams) {
|
|
|
5008
5008
|
function isSingleRecordRequest(urlParams) {
|
|
5009
5009
|
return hasOwnProperty.call(urlParams, 'recordId');
|
|
5010
5010
|
}
|
|
5011
|
+
function isRestrictedPathCondition(existingPath, path) {
|
|
5012
|
+
// should not dedupe getRecordUi and getRecord as both of their representation is different
|
|
5013
|
+
// records call cannot digest response of getRecordUi
|
|
5014
|
+
return ((existingPath.includes('/record-ui') && path.includes('/records')) ||
|
|
5015
|
+
(existingPath.includes('/records') && path.includes('/record-ui')));
|
|
5016
|
+
}
|
|
5011
5017
|
|
|
5012
5018
|
const createResourceRequest$12 = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
5013
5019
|
return {
|
|
@@ -11506,18 +11512,28 @@ const buildLayoutModeCacheSnapshot = (apiName, recordTypeId, layoutType, mode) =
|
|
|
11506
11512
|
* These are intermediate lookups to check if the record is in the L2 cache
|
|
11507
11513
|
* @param {Luvio} luvio
|
|
11508
11514
|
* @param {GetRecordLayoutTypeConfig} config
|
|
11509
|
-
* @param {BuildCachedSnapshot<BuildSnapshotContext} cachedSnapshot
|
|
11515
|
+
* @param {BuildCachedSnapshot<BuildSnapshotContext>} cachedSnapshot
|
|
11510
11516
|
*/
|
|
11511
11517
|
function makeCacheOnlySnapshot(luvio, config, adapterContext, cachedSnapshot) {
|
|
11512
|
-
return luvio.applyCachePolicy(
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
},
|
|
11517
|
-
}, { config, luvio, adapterContext }, cachedSnapshot,
|
|
11518
|
-
// this won't be invoked since we're requesting only-if-cached
|
|
11518
|
+
return luvio.applyCachePolicy(
|
|
11519
|
+
// Pass empty context so environment will use its default cache-policy
|
|
11520
|
+
{}, { config, luvio, adapterContext }, cachedSnapshot,
|
|
11521
|
+
// disallow hitting the network by returning a gateway timeout
|
|
11519
11522
|
() => {
|
|
11520
|
-
|
|
11523
|
+
return new Promise((resolve) => {
|
|
11524
|
+
resolve({
|
|
11525
|
+
state: 'Error',
|
|
11526
|
+
data: undefined,
|
|
11527
|
+
error: {
|
|
11528
|
+
body: undefined,
|
|
11529
|
+
headers: {},
|
|
11530
|
+
ok: false,
|
|
11531
|
+
status: 504,
|
|
11532
|
+
statusText: 'Gateway Timeout',
|
|
11533
|
+
errorType: 'fetchResponse',
|
|
11534
|
+
},
|
|
11535
|
+
});
|
|
11536
|
+
});
|
|
11521
11537
|
});
|
|
11522
11538
|
}
|
|
11523
11539
|
/**
|
|
@@ -32847,4 +32863,4 @@ withDefaultLuvio((luvio) => {
|
|
|
32847
32863
|
});
|
|
32848
32864
|
|
|
32849
32865
|
export { InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$J as ObjectInfoRepresentationType, RepresentationType$O as RecordRepresentationRepresentationType, TTL$w as RecordRepresentationTTL, RepresentationType$O as RecordRepresentationType, VERSION$17 as RecordRepresentationVersion, keyPrefix as UiApiNamespace, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createRecord, deleteRecord, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListObjectInfo, getListObjectInfo_imperative, getListRecordsByName, getListRecordsByName_imperative, getListUi, getListUi_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActions_imperative, factory$e as getRecordAdapterFactory, getRecordAvatars, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecordsAdapterFactory, getRecords_imperative, getRelatedListActions, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoBatch, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsBatch, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$Q as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$C as ingestObjectInfo, ingest$y as ingestQuickActionExecutionRepresentation, ingest$H as ingestRecord, instrument, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$y as keyBuilderFromTypeRecordRepresentation, keyBuilder$1J as keyBuilderObjectInfo, keyBuilder$1D as keyBuilderQuickActionExecutionRepresentation, keyBuilder$1U as keyBuilderRecord, notifyListInfoUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, updateLayoutUserState, updateListInfoByName, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
32850
|
-
// version: 1.
|
|
32866
|
+
// version: 1.229.0-dev2-696fe5026
|