@salesforce/lds-worker-api 1.293.0 → 1.294.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/sfdc/es/ldsWorkerApi.js +1 -1
- package/dist/standalone/es/lds-worker-api.js +201 -103
- package/dist/standalone/umd/lds-worker-api.js +201 -103
- package/package.json +10 -10
|
@@ -1074,4 +1074,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1077
|
-
// version: 1.
|
|
1077
|
+
// version: 1.294.0-06a44f23f
|
|
@@ -4076,7 +4076,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4076
4076
|
}
|
|
4077
4077
|
return resourceParams;
|
|
4078
4078
|
}
|
|
4079
|
-
// engine version: 0.154.
|
|
4079
|
+
// engine version: 0.154.20-1c52d927
|
|
4080
4080
|
|
|
4081
4081
|
/**
|
|
4082
4082
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4204,7 +4204,7 @@ function withDefaultLuvio(callback) {
|
|
|
4204
4204
|
}
|
|
4205
4205
|
callbacks.push(callback);
|
|
4206
4206
|
}
|
|
4207
|
-
// version: 1.
|
|
4207
|
+
// version: 1.294.0-06a44f23f
|
|
4208
4208
|
|
|
4209
4209
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4210
4210
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15712,7 +15712,7 @@ function gql(literals, ...subs) {
|
|
|
15712
15712
|
}
|
|
15713
15713
|
return superResult;
|
|
15714
15714
|
}
|
|
15715
|
-
// version: 1.
|
|
15715
|
+
// version: 1.294.0-06a44f23f
|
|
15716
15716
|
|
|
15717
15717
|
function unwrap(data) {
|
|
15718
15718
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16641,7 +16641,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16641
16641
|
const { apiFamily, name } = metadata;
|
|
16642
16642
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16643
16643
|
}
|
|
16644
|
-
// version: 1.
|
|
16644
|
+
// version: 1.294.0-06a44f23f
|
|
16645
16645
|
|
|
16646
16646
|
/**
|
|
16647
16647
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16740,7 +16740,7 @@ var TypeCheckShapes;
|
|
|
16740
16740
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16741
16741
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16742
16742
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16743
|
-
// engine version: 0.154.
|
|
16743
|
+
// engine version: 0.154.20-1c52d927
|
|
16744
16744
|
|
|
16745
16745
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16746
16746
|
|
|
@@ -17730,20 +17730,23 @@ function getTypeCacheKeys$Z$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
17730
17730
|
});
|
|
17731
17731
|
}
|
|
17732
17732
|
|
|
17733
|
+
const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
|
|
17734
|
+
const keyParams = {
|
|
17735
|
+
listViewApiName: object.listReference.listViewApiName
|
|
17736
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
17737
|
+
: object.listReference.listViewApiName,
|
|
17738
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
17739
|
+
type: object.listReference.type,
|
|
17740
|
+
};
|
|
17741
|
+
return keyBuilder$27(luvio, keyParams);
|
|
17742
|
+
};
|
|
17743
|
+
|
|
17733
17744
|
const TTL$A = 900000;
|
|
17734
17745
|
const VERSION$1e$1 = "c658fe1591386d570e214eaed0daadd1";
|
|
17735
17746
|
const RepresentationType$X = 'ListInfoRepresentation';
|
|
17736
17747
|
function keyBuilder$27(luvio, config) {
|
|
17737
17748
|
return keyPrefix$2 + '::' + RepresentationType$X + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
|
|
17738
17749
|
}
|
|
17739
|
-
function keyBuilderFromType$E(luvio, object) {
|
|
17740
|
-
const keyParams = {
|
|
17741
|
-
listViewApiName: object.listReference.listViewApiName,
|
|
17742
|
-
objectApiName: object.listReference.objectApiName,
|
|
17743
|
-
type: object.listReference.type
|
|
17744
|
-
};
|
|
17745
|
-
return keyBuilder$27(luvio, keyParams);
|
|
17746
|
-
}
|
|
17747
17750
|
function normalize$Q(input, existing, path, luvio, store, timestamp) {
|
|
17748
17751
|
const input_displayColumns = input.displayColumns;
|
|
17749
17752
|
const input_displayColumns_id = path.fullPath + '__displayColumns';
|
|
@@ -21731,21 +21734,24 @@ function tokenForAtMost$1(paginationMetadata, maxOffset) {
|
|
|
21731
21734
|
return [tokenResult, offsetResult];
|
|
21732
21735
|
}
|
|
21733
21736
|
|
|
21734
|
-
const
|
|
21735
|
-
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21736
|
-
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21737
|
-
function keyBuilder$23(luvio, config) {
|
|
21738
|
-
return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
21739
|
-
}
|
|
21740
|
-
function keyBuilderFromType$B(luvio, object) {
|
|
21737
|
+
const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
|
|
21741
21738
|
const keyParams = {
|
|
21742
|
-
objectApiName: object.listReference.objectApiName,
|
|
21739
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
21743
21740
|
searchTerm: object.searchTerm,
|
|
21744
21741
|
sortBy: object.sortBy,
|
|
21745
21742
|
where: object.where,
|
|
21746
21743
|
listViewApiName: object.listReference.listViewApiName
|
|
21744
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
21745
|
+
: object.listReference.listViewApiName,
|
|
21747
21746
|
};
|
|
21748
21747
|
return keyBuilder$23(luvio, keyParams);
|
|
21748
|
+
};
|
|
21749
|
+
|
|
21750
|
+
const TTL$x = 30000;
|
|
21751
|
+
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21752
|
+
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21753
|
+
function keyBuilder$23(luvio, config) {
|
|
21754
|
+
return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
21749
21755
|
}
|
|
21750
21756
|
function paginationKeyBuilder(luvio, config) {
|
|
21751
21757
|
return keyBuilder$23(luvio, config) + '__pagination';
|
|
@@ -22755,8 +22761,8 @@ const LIST_SUMMARY_PREFIX = keyPrefix$2 + '::' + RepresentationType$Q;
|
|
|
22755
22761
|
let listRecordCollectionCache = new Map();
|
|
22756
22762
|
let listSummaryCollectionCache = new Map();
|
|
22757
22763
|
function getListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22758
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22759
|
-
const keys = cacheEntriesByObjectApiName.get(listViewApiName) || [];
|
|
22764
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22765
|
+
const keys = cacheEntriesByObjectApiName.get(listViewApiName.toLowerCase()) || [];
|
|
22760
22766
|
return [...keys];
|
|
22761
22767
|
}
|
|
22762
22768
|
function getListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
@@ -22788,8 +22794,8 @@ function addListSummaryCollectionKey(objectApiName, recentLists, key) {
|
|
|
22788
22794
|
keys.add(key);
|
|
22789
22795
|
}
|
|
22790
22796
|
function removeListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22791
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22792
|
-
cacheEntriesByObjectApiName.delete(listViewApiName);
|
|
22797
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22798
|
+
cacheEntriesByObjectApiName.delete(listViewApiName.toLowerCase());
|
|
22793
22799
|
}
|
|
22794
22800
|
function removeListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
22795
22801
|
const cacheEntriesByObjectApiName = listSummaryCollectionCache.get(objectApiName) || new Map();
|
|
@@ -22841,7 +22847,7 @@ function buildListRefByIdContextKey(listViewId) {
|
|
|
22841
22847
|
return `listReferenceById::${listViewId}`;
|
|
22842
22848
|
}
|
|
22843
22849
|
function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
|
|
22844
|
-
return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
|
|
22850
|
+
return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
|
|
22845
22851
|
}
|
|
22846
22852
|
/**
|
|
22847
22853
|
* Adds a list reference so it can be retrieved with #getListReference later.
|
|
@@ -22897,7 +22903,12 @@ const LIST_INFO_SELECTIONS_ETAG = [
|
|
|
22897
22903
|
* @param luvio Luvio
|
|
22898
22904
|
*/
|
|
22899
22905
|
function getListInfo(luvio, listRef, storeLookup) {
|
|
22900
|
-
|
|
22906
|
+
let mutatedListRef = { ...listRef };
|
|
22907
|
+
mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
|
|
22908
|
+
mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
|
|
22909
|
+
? mutatedListRef.listViewApiName.toLowerCase()
|
|
22910
|
+
: mutatedListRef.listViewApiName;
|
|
22911
|
+
const key = keyBuilder$27(luvio, { ...mutatedListRef });
|
|
22901
22912
|
return storeLookup({
|
|
22902
22913
|
recordId: key,
|
|
22903
22914
|
node: {
|
|
@@ -22911,7 +22922,7 @@ function getListInfo(luvio, listRef, storeLookup) {
|
|
|
22911
22922
|
}
|
|
22912
22923
|
function buildDefaultsKey(listRef) {
|
|
22913
22924
|
const { objectApiName, listViewApiName } = listRef;
|
|
22914
|
-
return `defaults::${objectApiName}:${listViewApiName}`;
|
|
22925
|
+
return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
|
|
22915
22926
|
}
|
|
22916
22927
|
/**
|
|
22917
22928
|
* Update the default values based on a server response.
|
|
@@ -23086,9 +23097,11 @@ function setContext$1(adapterContext) {
|
|
|
23086
23097
|
context$1 = adapterContext;
|
|
23087
23098
|
}
|
|
23088
23099
|
function keyBuilder$1$(luvio, params) {
|
|
23100
|
+
// lists data can now be fetched using case insensitive urlParams therefore
|
|
23101
|
+
// also changing contextStore to use lowercase caching
|
|
23089
23102
|
const query = {
|
|
23090
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23091
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23103
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23104
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23092
23105
|
};
|
|
23093
23106
|
// Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
|
|
23094
23107
|
const listReference = getListReference(query, context$1);
|
|
@@ -23098,8 +23111,10 @@ function keyBuilder$1$(luvio, params) {
|
|
|
23098
23111
|
const defaults = getServerDefaults(config, context$1);
|
|
23099
23112
|
// Use default values when sortBy is undefined or an empty Array []
|
|
23100
23113
|
return keyBuilder$23(luvio, {
|
|
23101
|
-
objectApiName: listReference.objectApiName,
|
|
23102
|
-
listViewApiName: listReference.listViewApiName
|
|
23114
|
+
objectApiName: listReference.objectApiName.toLowerCase(),
|
|
23115
|
+
listViewApiName: listReference.listViewApiName
|
|
23116
|
+
? listReference.listViewApiName.toLowerCase()
|
|
23117
|
+
: listReference.listViewApiName,
|
|
23103
23118
|
// # removing listViewId from key only supporing getting records using api name
|
|
23104
23119
|
// listViewId: listReference.id,
|
|
23105
23120
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -23112,8 +23127,8 @@ function keyBuilder$1$(luvio, params) {
|
|
|
23112
23127
|
// If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
|
|
23113
23128
|
// Assuming that listViewId is empty and continue on
|
|
23114
23129
|
return keyBuilder$23(luvio, {
|
|
23115
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23116
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23130
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23131
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23117
23132
|
// # removing listViewId from key only supporing getting records using api name
|
|
23118
23133
|
// listViewId: '',
|
|
23119
23134
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -24060,8 +24075,10 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
|
|
|
24060
24075
|
searchTerm: null,
|
|
24061
24076
|
where: null,
|
|
24062
24077
|
sortBy: config.sortBy === undefined ? null : config.sortBy,
|
|
24063
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24064
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24078
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24079
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24080
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24081
|
+
: listInfo.listReference.listViewApiName,
|
|
24065
24082
|
});
|
|
24066
24083
|
const selector = {
|
|
24067
24084
|
recordId: paginationKey,
|
|
@@ -24108,8 +24125,10 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
|
|
|
24108
24125
|
searchTerm: null,
|
|
24109
24126
|
where: null,
|
|
24110
24127
|
sortBy: body.sortBy,
|
|
24111
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24112
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24128
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24129
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24130
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24131
|
+
: listInfo.listReference.listViewApiName,
|
|
24113
24132
|
}), ingest$M$1, body);
|
|
24114
24133
|
const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
|
|
24115
24134
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
@@ -24157,7 +24176,7 @@ function buildCachedListInfoSnapshot$1(context, storeLookup, luvio) {
|
|
|
24157
24176
|
return getListInfo(luvio, {
|
|
24158
24177
|
id: null,
|
|
24159
24178
|
listViewApiName: null,
|
|
24160
|
-
objectApiName: config.objectApiName,
|
|
24179
|
+
objectApiName: config.objectApiName.toLowerCase(),
|
|
24161
24180
|
type: 'mru',
|
|
24162
24181
|
}, storeLookup);
|
|
24163
24182
|
}
|
|
@@ -24443,8 +24462,10 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
|
|
|
24443
24462
|
searchTerm: null,
|
|
24444
24463
|
where: null,
|
|
24445
24464
|
sortBy: getSortBy(config, context),
|
|
24446
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24447
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24465
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24466
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24467
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24468
|
+
: listInfo.listReference.listViewApiName,
|
|
24448
24469
|
});
|
|
24449
24470
|
const selector = {
|
|
24450
24471
|
recordId: paginationKey,
|
|
@@ -24494,8 +24515,10 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
|
|
|
24494
24515
|
searchTerm: null,
|
|
24495
24516
|
where: null,
|
|
24496
24517
|
sortBy: body.sortBy,
|
|
24497
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24498
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24518
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24519
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24520
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24521
|
+
: listInfo.listReference.listViewApiName,
|
|
24499
24522
|
}), ingest$M$1, body);
|
|
24500
24523
|
const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
|
|
24501
24524
|
releaseKeys();
|
|
@@ -26426,8 +26449,14 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
|
|
|
26426
26449
|
// We automatically set the type based on the listViewApiName, and we need to do the same
|
|
26427
26450
|
// here for key matching and validation
|
|
26428
26451
|
configs.forEach((config) => {
|
|
26452
|
+
config.listViewApiName = config.listViewApiName
|
|
26453
|
+
? config.listViewApiName.toLowerCase()
|
|
26454
|
+
: config.listViewApiName;
|
|
26455
|
+
config.objectApiName = config.objectApiName
|
|
26456
|
+
? config.objectApiName.toLowerCase()
|
|
26457
|
+
: config.objectApiName;
|
|
26429
26458
|
if (!config.type) {
|
|
26430
|
-
config.type = config.listViewApiName === '
|
|
26459
|
+
config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
|
|
26431
26460
|
}
|
|
26432
26461
|
});
|
|
26433
26462
|
return generated_notifyUpdateAvailable(configs);
|
|
@@ -30978,9 +31007,9 @@ const getLayoutUserStateAdapterFactory = (luvio) => function UiApi__getLayoutUse
|
|
|
30978
31007
|
|
|
30979
31008
|
function keyBuilder$1c$1(luvio, params) {
|
|
30980
31009
|
return keyBuilder$27(luvio, {
|
|
30981
|
-
objectApiName: params.urlParams.objectApiName,
|
|
30982
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
30983
|
-
type: params.urlParams.listViewApiName === '
|
|
31010
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
31011
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
31012
|
+
type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
|
|
30984
31013
|
});
|
|
30985
31014
|
}
|
|
30986
31015
|
|
|
@@ -44238,7 +44267,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44238
44267
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44239
44268
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44240
44269
|
});
|
|
44241
|
-
// version: 1.
|
|
44270
|
+
// version: 1.294.0-e7eb16228
|
|
44242
44271
|
|
|
44243
44272
|
var ldsIdempotencyWriteDisabled = {
|
|
44244
44273
|
isOpen: function (e) {
|
|
@@ -52728,6 +52757,7 @@ function buildQuery(config) {
|
|
|
52728
52757
|
${predicates.sql}
|
|
52729
52758
|
${orderBy.sql}
|
|
52730
52759
|
LIMIT ?
|
|
52760
|
+
OFFSET ?
|
|
52731
52761
|
`
|
|
52732
52762
|
.split('\n')
|
|
52733
52763
|
.map((line) => line.trim())
|
|
@@ -52740,6 +52770,7 @@ function buildQuery(config) {
|
|
|
52740
52770
|
...predicates.bindings,
|
|
52741
52771
|
// limit binding
|
|
52742
52772
|
config.limit || 10,
|
|
52773
|
+
config.offset || 0,
|
|
52743
52774
|
];
|
|
52744
52775
|
return { sql: sql.trim(), bindings };
|
|
52745
52776
|
}
|
|
@@ -53457,32 +53488,6 @@ async function readIngestionTimestampForKey(key, query) {
|
|
|
53457
53488
|
return ingestionTimestamp;
|
|
53458
53489
|
}
|
|
53459
53490
|
|
|
53460
|
-
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53461
|
-
// base64 character set, plus padding character (=)
|
|
53462
|
-
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53463
|
-
function btoaPolyfill(input) {
|
|
53464
|
-
let bitmap, a, b, c;
|
|
53465
|
-
let result = '', i = 0;
|
|
53466
|
-
const rest = input.length % 3; // To determine the final padding
|
|
53467
|
-
for (; i < input.length;) {
|
|
53468
|
-
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53469
|
-
(b = input.charCodeAt(i++)) > 255 ||
|
|
53470
|
-
(c = input.charCodeAt(i++)) > 255) {
|
|
53471
|
-
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53472
|
-
input);
|
|
53473
|
-
}
|
|
53474
|
-
bitmap = (a << 16) | (b << 8) | c;
|
|
53475
|
-
result +=
|
|
53476
|
-
b64.charAt((bitmap >> 18) & 63) +
|
|
53477
|
-
b64.charAt((bitmap >> 12) & 63) +
|
|
53478
|
-
b64.charAt((bitmap >> 6) & 63) +
|
|
53479
|
-
b64.charAt(bitmap & 63);
|
|
53480
|
-
}
|
|
53481
|
-
// If there's need of padding, replace the last 'A's with equal signs
|
|
53482
|
-
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53483
|
-
}
|
|
53484
|
-
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53485
|
-
|
|
53486
53491
|
function findSpanningField(name) {
|
|
53487
53492
|
return (field) => {
|
|
53488
53493
|
return (field.apiName === name ||
|
|
@@ -53629,13 +53634,101 @@ function scopeToPredicates(scope = '', settings) {
|
|
|
53629
53634
|
];
|
|
53630
53635
|
}
|
|
53631
53636
|
|
|
53637
|
+
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53638
|
+
// base64 character set, plus padding character (=)
|
|
53639
|
+
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53640
|
+
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
|
|
53641
|
+
function btoaPolyfill(input) {
|
|
53642
|
+
let bitmap, a, b, c;
|
|
53643
|
+
let result = '', i = 0;
|
|
53644
|
+
const rest = input.length % 3; // To determine the final padding
|
|
53645
|
+
for (; i < input.length;) {
|
|
53646
|
+
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53647
|
+
(b = input.charCodeAt(i++)) > 255 ||
|
|
53648
|
+
(c = input.charCodeAt(i++)) > 255) {
|
|
53649
|
+
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53650
|
+
input);
|
|
53651
|
+
}
|
|
53652
|
+
bitmap = (a << 16) | (b << 8) | c;
|
|
53653
|
+
result +=
|
|
53654
|
+
b64.charAt((bitmap >> 18) & 63) +
|
|
53655
|
+
b64.charAt((bitmap >> 12) & 63) +
|
|
53656
|
+
b64.charAt((bitmap >> 6) & 63) +
|
|
53657
|
+
b64.charAt(bitmap & 63);
|
|
53658
|
+
}
|
|
53659
|
+
// If there's need of padding, replace the last 'A's with equal signs
|
|
53660
|
+
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53661
|
+
}
|
|
53662
|
+
function atobPolyfill(data) {
|
|
53663
|
+
// atob can work with strings with whitespaces, even inside the encoded part,
|
|
53664
|
+
// but only \t, \n, \f, \r and ' ', which can be stripped.
|
|
53665
|
+
let string = String(data).replace(/[\t\n\f\r ]+/g, '');
|
|
53666
|
+
if (!b64re.test(string))
|
|
53667
|
+
throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
|
53668
|
+
// Adding the padding if missing, for semplicity
|
|
53669
|
+
string += '=='.slice(2 - (string.length & 3));
|
|
53670
|
+
var bitmap, result = '', r1, r2, i = 0;
|
|
53671
|
+
for (; i < string.length;) {
|
|
53672
|
+
bitmap =
|
|
53673
|
+
(b64.indexOf(string.charAt(i++)) << 18) |
|
|
53674
|
+
(b64.indexOf(string.charAt(i++)) << 12) |
|
|
53675
|
+
((r1 = b64.indexOf(string.charAt(i++))) << 6) |
|
|
53676
|
+
(r2 = b64.indexOf(string.charAt(i++)));
|
|
53677
|
+
result +=
|
|
53678
|
+
r1 === 64
|
|
53679
|
+
? String.fromCharCode((bitmap >> 16) & 255)
|
|
53680
|
+
: r2 === 64
|
|
53681
|
+
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
|
53682
|
+
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
|
53683
|
+
}
|
|
53684
|
+
return result;
|
|
53685
|
+
}
|
|
53686
|
+
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53687
|
+
const base64decode = typeof atob === 'function' ? atob : atobPolyfill;
|
|
53688
|
+
|
|
53689
|
+
function cursorResolver(source) {
|
|
53690
|
+
return encodeV1Cursor(source.index);
|
|
53691
|
+
}
|
|
53692
|
+
function pageInfoResolver(source) {
|
|
53693
|
+
if (source.length === 0) {
|
|
53694
|
+
return {
|
|
53695
|
+
startCursor: null,
|
|
53696
|
+
endCursor: null,
|
|
53697
|
+
};
|
|
53698
|
+
}
|
|
53699
|
+
let startIndex = source[0].index;
|
|
53700
|
+
let endIndex = source[source.length - 1].index;
|
|
53701
|
+
return {
|
|
53702
|
+
startCursor: encodeV1Cursor(startIndex),
|
|
53703
|
+
endCursor: encodeV1Cursor(endIndex),
|
|
53704
|
+
};
|
|
53705
|
+
}
|
|
53706
|
+
function pageResultCountResolver(source) {
|
|
53707
|
+
return source.length;
|
|
53708
|
+
}
|
|
53709
|
+
function encodeV1Cursor(index) {
|
|
53710
|
+
return base64encode(`v1:${index}`);
|
|
53711
|
+
}
|
|
53712
|
+
const cursorRegex = /^v1:(?<index>\d+)$/;
|
|
53713
|
+
function decodeV1Cursor(base64cursor) {
|
|
53714
|
+
const cursor = base64decode(base64cursor);
|
|
53715
|
+
if (!cursor) {
|
|
53716
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53717
|
+
throw new Error('Unable to parse cursor');
|
|
53718
|
+
}
|
|
53719
|
+
const found = cursor.match(cursorRegex);
|
|
53720
|
+
if (!found || !found.groups) {
|
|
53721
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53722
|
+
throw new Error('Unable to parse cursor');
|
|
53723
|
+
}
|
|
53724
|
+
return Number(found.groups.index);
|
|
53725
|
+
}
|
|
53726
|
+
|
|
53632
53727
|
/*
|
|
53633
53728
|
resolves connections...
|
|
53634
53729
|
*/
|
|
53635
53730
|
async function connectionResolver(obj, args, context, info) {
|
|
53636
|
-
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
53637
|
-
if (!ingestionTimestamp)
|
|
53638
|
-
ingestionTimestamp = 0;
|
|
53731
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp = 0 } = obj;
|
|
53639
53732
|
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53640
53733
|
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53641
53734
|
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
@@ -53664,6 +53757,10 @@ async function connectionResolver(obj, args, context, info) {
|
|
|
53664
53757
|
];
|
|
53665
53758
|
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
53666
53759
|
joins.push(...scopeJoins);
|
|
53760
|
+
let offset = 0;
|
|
53761
|
+
if (args.after) {
|
|
53762
|
+
offset = decodeV1Cursor(args.after) + 1;
|
|
53763
|
+
}
|
|
53667
53764
|
// Alias starts as entity's ApiName
|
|
53668
53765
|
const queryConfig = {
|
|
53669
53766
|
alias,
|
|
@@ -53671,18 +53768,20 @@ async function connectionResolver(obj, args, context, info) {
|
|
|
53671
53768
|
predicates,
|
|
53672
53769
|
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
53673
53770
|
limit: args.first,
|
|
53771
|
+
offset: offset,
|
|
53674
53772
|
ingestionTimestamp,
|
|
53675
53773
|
};
|
|
53676
53774
|
const { sql, bindings } = buildQuery(queryConfig);
|
|
53677
53775
|
const results = await query(sql, bindings);
|
|
53678
53776
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53679
53777
|
return results.rows
|
|
53680
|
-
.map((row) => row[0])
|
|
53681
|
-
.map((
|
|
53778
|
+
.map((row) => parse$4(row[0]))
|
|
53779
|
+
.map((recordRepresentation, index) => {
|
|
53780
|
+
context.seenRecordIds.add(recordRepresentation.id);
|
|
53682
53781
|
return {
|
|
53683
|
-
|
|
53782
|
+
recordRepresentation,
|
|
53684
53783
|
ingestionTimestamp,
|
|
53685
|
-
index,
|
|
53784
|
+
index: index + offset,
|
|
53686
53785
|
};
|
|
53687
53786
|
});
|
|
53688
53787
|
}
|
|
@@ -53846,10 +53945,10 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53846
53945
|
field.resolve = passThroughResolver;
|
|
53847
53946
|
break;
|
|
53848
53947
|
case 'pageInfo':
|
|
53849
|
-
field.resolve =
|
|
53850
|
-
|
|
53851
|
-
|
|
53852
|
-
|
|
53948
|
+
field.resolve = pageInfoResolver;
|
|
53949
|
+
break;
|
|
53950
|
+
case 'pageResultCount':
|
|
53951
|
+
field.resolve = pageResultCountResolver;
|
|
53853
53952
|
break;
|
|
53854
53953
|
default:
|
|
53855
53954
|
field.resolve = defaultFieldResolver;
|
|
@@ -53872,17 +53971,10 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53872
53971
|
// }
|
|
53873
53972
|
for (const field of fields) {
|
|
53874
53973
|
if (field.name === 'node') {
|
|
53875
|
-
field.resolve =
|
|
53876
|
-
const { record, ingestionTimestamp } = obj;
|
|
53877
|
-
const recordRepresentation = parse$4(record);
|
|
53878
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53879
|
-
return { recordRepresentation, ingestionTimestamp };
|
|
53880
|
-
};
|
|
53974
|
+
field.resolve = passThroughResolver;
|
|
53881
53975
|
}
|
|
53882
53976
|
else if (field.name === 'cursor') {
|
|
53883
|
-
field.resolve =
|
|
53884
|
-
return base64encode(`v1:${index}`);
|
|
53885
|
-
};
|
|
53977
|
+
field.resolve = cursorResolver;
|
|
53886
53978
|
}
|
|
53887
53979
|
}
|
|
53888
53980
|
}
|
|
@@ -54241,7 +54333,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
|
|
|
54241
54333
|
// handles child relationship
|
|
54242
54334
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
54243
54335
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
54244
|
-
const recordQueries = `${apiName}(first: Int, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54336
|
+
const recordQueries = `${apiName}(first: Int, after: String, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54245
54337
|
const isServiceAppointment = apiName === 'ServiceAppointment';
|
|
54246
54338
|
const recordConnections = /* GraphQL */ `
|
|
54247
54339
|
${isServiceAppointment ? `scalar ${apiName.toUpperCase()}_SCOPE` : ''}
|
|
@@ -54263,6 +54355,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
|
|
|
54263
54355
|
edges: [${apiName}Edge]
|
|
54264
54356
|
pageInfo: PageInfo!
|
|
54265
54357
|
totalCount: Int!
|
|
54358
|
+
pageResultCount: Int!
|
|
54266
54359
|
}
|
|
54267
54360
|
|
|
54268
54361
|
type ${apiName}Edge {
|
|
@@ -54344,7 +54437,7 @@ function makeSpanningRecordConnections(schema, childRelationships, objectInfoMap
|
|
|
54344
54437
|
}
|
|
54345
54438
|
if (objectInfoMap[childObjectApiName] !== undefined &&
|
|
54346
54439
|
!existingParentRelationships.has(relationshipName)) {
|
|
54347
|
-
spanningRecordConnections += `${relationshipName}(first: Int, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54440
|
+
spanningRecordConnections += `${relationshipName}(first: Int, after: String, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54348
54441
|
// if the record type has already been extended then these additional scalars have already been added
|
|
54349
54442
|
// to add them again would throw an error
|
|
54350
54443
|
const filterScalarType = schema.getType(`${childObjectApiName}_Filter`);
|
|
@@ -62556,7 +62649,7 @@ register$1({
|
|
|
62556
62649
|
id: '@salesforce/lds-network-adapter',
|
|
62557
62650
|
instrument: instrument$2,
|
|
62558
62651
|
});
|
|
62559
|
-
// version: 1.
|
|
62652
|
+
// version: 1.294.0-06a44f23f
|
|
62560
62653
|
|
|
62561
62654
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62562
62655
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -81011,6 +81104,11 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
|
|
|
81011
81104
|
const parentRecordId = resolvedLink.recordId;
|
|
81012
81105
|
const totalEdges = source.edges !== undefined ? source.edges.length : 0;
|
|
81013
81106
|
const metadata = reader.resolveMetadata(source, PAGINATION_VERSION);
|
|
81107
|
+
if (metadata === undefined) {
|
|
81108
|
+
reader.markMissingLink(fieldData.__ref);
|
|
81109
|
+
reader.markMissing();
|
|
81110
|
+
return;
|
|
81111
|
+
}
|
|
81014
81112
|
const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
|
|
81015
81113
|
const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
|
|
81016
81114
|
const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
|
|
@@ -81021,7 +81119,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
|
|
|
81021
81119
|
token: afterArgVal
|
|
81022
81120
|
};
|
|
81023
81121
|
let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
|
|
81024
|
-
const listIsComplete = (
|
|
81122
|
+
const listIsComplete = (metadata.__END__ !== undefined);
|
|
81025
81123
|
let trimmedEdges = [];
|
|
81026
81124
|
let maxOffset = undefined;
|
|
81027
81125
|
if (totalEdges === 0 && listIsComplete) {
|
|
@@ -81034,7 +81132,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
|
|
|
81034
81132
|
}
|
|
81035
81133
|
}
|
|
81036
81134
|
else {
|
|
81037
|
-
if (
|
|
81135
|
+
if (startOffset === undefined || endOffset === undefined) {
|
|
81038
81136
|
reader.markMissingLink(fieldData.__ref);
|
|
81039
81137
|
reader.markMissing();
|
|
81040
81138
|
return;
|
|
@@ -82620,7 +82718,7 @@ register$1({
|
|
|
82620
82718
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82621
82719
|
instrument: instrument$1,
|
|
82622
82720
|
});
|
|
82623
|
-
// version: 1.
|
|
82721
|
+
// version: 1.294.0-e7eb16228
|
|
82624
82722
|
|
|
82625
82723
|
// On core the unstable adapters are re-exported with different names,
|
|
82626
82724
|
// we want to match them here.
|
|
@@ -84876,7 +84974,7 @@ withDefaultLuvio((luvio) => {
|
|
|
84876
84974
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84877
84975
|
graphQLImperative = ldsAdapter;
|
|
84878
84976
|
});
|
|
84879
|
-
// version: 1.
|
|
84977
|
+
// version: 1.294.0-e7eb16228
|
|
84880
84978
|
|
|
84881
84979
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84882
84980
|
__proto__: null,
|
|
@@ -85614,7 +85712,7 @@ const callbacks$1 = [];
|
|
|
85614
85712
|
function register(r) {
|
|
85615
85713
|
callbacks$1.forEach((callback) => callback(r));
|
|
85616
85714
|
}
|
|
85617
|
-
// version: 1.
|
|
85715
|
+
// version: 1.294.0-06a44f23f
|
|
85618
85716
|
|
|
85619
85717
|
/**
|
|
85620
85718
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90576,4 +90674,4 @@ const { luvio } = getRuntime();
|
|
|
90576
90674
|
setDefaultLuvio({ luvio });
|
|
90577
90675
|
|
|
90578
90676
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
90579
|
-
// version: 1.
|
|
90677
|
+
// version: 1.294.0-06a44f23f
|
|
@@ -4082,7 +4082,7 @@
|
|
|
4082
4082
|
}
|
|
4083
4083
|
return resourceParams;
|
|
4084
4084
|
}
|
|
4085
|
-
// engine version: 0.154.
|
|
4085
|
+
// engine version: 0.154.20-1c52d927
|
|
4086
4086
|
|
|
4087
4087
|
/**
|
|
4088
4088
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4210,7 +4210,7 @@
|
|
|
4210
4210
|
}
|
|
4211
4211
|
callbacks.push(callback);
|
|
4212
4212
|
}
|
|
4213
|
-
// version: 1.
|
|
4213
|
+
// version: 1.294.0-06a44f23f
|
|
4214
4214
|
|
|
4215
4215
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4216
4216
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15718,7 +15718,7 @@
|
|
|
15718
15718
|
}
|
|
15719
15719
|
return superResult;
|
|
15720
15720
|
}
|
|
15721
|
-
// version: 1.
|
|
15721
|
+
// version: 1.294.0-06a44f23f
|
|
15722
15722
|
|
|
15723
15723
|
function unwrap(data) {
|
|
15724
15724
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16647,7 +16647,7 @@
|
|
|
16647
16647
|
const { apiFamily, name } = metadata;
|
|
16648
16648
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16649
16649
|
}
|
|
16650
|
-
// version: 1.
|
|
16650
|
+
// version: 1.294.0-06a44f23f
|
|
16651
16651
|
|
|
16652
16652
|
/**
|
|
16653
16653
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16746,7 +16746,7 @@
|
|
|
16746
16746
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16747
16747
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16748
16748
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16749
|
-
// engine version: 0.154.
|
|
16749
|
+
// engine version: 0.154.20-1c52d927
|
|
16750
16750
|
|
|
16751
16751
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16752
16752
|
|
|
@@ -17736,20 +17736,23 @@
|
|
|
17736
17736
|
});
|
|
17737
17737
|
}
|
|
17738
17738
|
|
|
17739
|
+
const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
|
|
17740
|
+
const keyParams = {
|
|
17741
|
+
listViewApiName: object.listReference.listViewApiName
|
|
17742
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
17743
|
+
: object.listReference.listViewApiName,
|
|
17744
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
17745
|
+
type: object.listReference.type,
|
|
17746
|
+
};
|
|
17747
|
+
return keyBuilder$27(luvio, keyParams);
|
|
17748
|
+
};
|
|
17749
|
+
|
|
17739
17750
|
const TTL$A = 900000;
|
|
17740
17751
|
const VERSION$1e$1 = "c658fe1591386d570e214eaed0daadd1";
|
|
17741
17752
|
const RepresentationType$X = 'ListInfoRepresentation';
|
|
17742
17753
|
function keyBuilder$27(luvio, config) {
|
|
17743
17754
|
return keyPrefix$2 + '::' + RepresentationType$X + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
|
|
17744
17755
|
}
|
|
17745
|
-
function keyBuilderFromType$E(luvio, object) {
|
|
17746
|
-
const keyParams = {
|
|
17747
|
-
listViewApiName: object.listReference.listViewApiName,
|
|
17748
|
-
objectApiName: object.listReference.objectApiName,
|
|
17749
|
-
type: object.listReference.type
|
|
17750
|
-
};
|
|
17751
|
-
return keyBuilder$27(luvio, keyParams);
|
|
17752
|
-
}
|
|
17753
17756
|
function normalize$Q(input, existing, path, luvio, store, timestamp) {
|
|
17754
17757
|
const input_displayColumns = input.displayColumns;
|
|
17755
17758
|
const input_displayColumns_id = path.fullPath + '__displayColumns';
|
|
@@ -21737,21 +21740,24 @@
|
|
|
21737
21740
|
return [tokenResult, offsetResult];
|
|
21738
21741
|
}
|
|
21739
21742
|
|
|
21740
|
-
const
|
|
21741
|
-
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21742
|
-
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21743
|
-
function keyBuilder$23(luvio, config) {
|
|
21744
|
-
return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
21745
|
-
}
|
|
21746
|
-
function keyBuilderFromType$B(luvio, object) {
|
|
21743
|
+
const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
|
|
21747
21744
|
const keyParams = {
|
|
21748
|
-
objectApiName: object.listReference.objectApiName,
|
|
21745
|
+
objectApiName: object.listReference.objectApiName.toLowerCase(),
|
|
21749
21746
|
searchTerm: object.searchTerm,
|
|
21750
21747
|
sortBy: object.sortBy,
|
|
21751
21748
|
where: object.where,
|
|
21752
21749
|
listViewApiName: object.listReference.listViewApiName
|
|
21750
|
+
? object.listReference.listViewApiName.toLowerCase()
|
|
21751
|
+
: object.listReference.listViewApiName,
|
|
21753
21752
|
};
|
|
21754
21753
|
return keyBuilder$23(luvio, keyParams);
|
|
21754
|
+
};
|
|
21755
|
+
|
|
21756
|
+
const TTL$x = 30000;
|
|
21757
|
+
const VERSION$18$1 = "e5c90c4081cd557f8ffec53028ede1e8";
|
|
21758
|
+
const RepresentationType$T = 'ListRecordCollectionRepresentation';
|
|
21759
|
+
function keyBuilder$23(luvio, config) {
|
|
21760
|
+
return keyPrefix$2 + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
21755
21761
|
}
|
|
21756
21762
|
function paginationKeyBuilder(luvio, config) {
|
|
21757
21763
|
return keyBuilder$23(luvio, config) + '__pagination';
|
|
@@ -22761,8 +22767,8 @@
|
|
|
22761
22767
|
let listRecordCollectionCache = new Map();
|
|
22762
22768
|
let listSummaryCollectionCache = new Map();
|
|
22763
22769
|
function getListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22764
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22765
|
-
const keys = cacheEntriesByObjectApiName.get(listViewApiName) || [];
|
|
22770
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22771
|
+
const keys = cacheEntriesByObjectApiName.get(listViewApiName.toLowerCase()) || [];
|
|
22766
22772
|
return [...keys];
|
|
22767
22773
|
}
|
|
22768
22774
|
function getListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
@@ -22794,8 +22800,8 @@
|
|
|
22794
22800
|
keys.add(key);
|
|
22795
22801
|
}
|
|
22796
22802
|
function removeListRecordCollectionKeys(objectApiName, listViewApiName) {
|
|
22797
|
-
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
|
|
22798
|
-
cacheEntriesByObjectApiName.delete(listViewApiName);
|
|
22803
|
+
const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
|
|
22804
|
+
cacheEntriesByObjectApiName.delete(listViewApiName.toLowerCase());
|
|
22799
22805
|
}
|
|
22800
22806
|
function removeListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
|
|
22801
22807
|
const cacheEntriesByObjectApiName = listSummaryCollectionCache.get(objectApiName) || new Map();
|
|
@@ -22847,7 +22853,7 @@
|
|
|
22847
22853
|
return `listReferenceById::${listViewId}`;
|
|
22848
22854
|
}
|
|
22849
22855
|
function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
|
|
22850
|
-
return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
|
|
22856
|
+
return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
|
|
22851
22857
|
}
|
|
22852
22858
|
/**
|
|
22853
22859
|
* Adds a list reference so it can be retrieved with #getListReference later.
|
|
@@ -22903,7 +22909,12 @@
|
|
|
22903
22909
|
* @param luvio Luvio
|
|
22904
22910
|
*/
|
|
22905
22911
|
function getListInfo(luvio, listRef, storeLookup) {
|
|
22906
|
-
|
|
22912
|
+
let mutatedListRef = { ...listRef };
|
|
22913
|
+
mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
|
|
22914
|
+
mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
|
|
22915
|
+
? mutatedListRef.listViewApiName.toLowerCase()
|
|
22916
|
+
: mutatedListRef.listViewApiName;
|
|
22917
|
+
const key = keyBuilder$27(luvio, { ...mutatedListRef });
|
|
22907
22918
|
return storeLookup({
|
|
22908
22919
|
recordId: key,
|
|
22909
22920
|
node: {
|
|
@@ -22917,7 +22928,7 @@
|
|
|
22917
22928
|
}
|
|
22918
22929
|
function buildDefaultsKey(listRef) {
|
|
22919
22930
|
const { objectApiName, listViewApiName } = listRef;
|
|
22920
|
-
return `defaults::${objectApiName}:${listViewApiName}`;
|
|
22931
|
+
return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
|
|
22921
22932
|
}
|
|
22922
22933
|
/**
|
|
22923
22934
|
* Update the default values based on a server response.
|
|
@@ -23092,9 +23103,11 @@
|
|
|
23092
23103
|
context$1 = adapterContext;
|
|
23093
23104
|
}
|
|
23094
23105
|
function keyBuilder$1$(luvio, params) {
|
|
23106
|
+
// lists data can now be fetched using case insensitive urlParams therefore
|
|
23107
|
+
// also changing contextStore to use lowercase caching
|
|
23095
23108
|
const query = {
|
|
23096
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23097
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23109
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23110
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23098
23111
|
};
|
|
23099
23112
|
// Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
|
|
23100
23113
|
const listReference = getListReference(query, context$1);
|
|
@@ -23104,8 +23117,10 @@
|
|
|
23104
23117
|
const defaults = getServerDefaults(config, context$1);
|
|
23105
23118
|
// Use default values when sortBy is undefined or an empty Array []
|
|
23106
23119
|
return keyBuilder$23(luvio, {
|
|
23107
|
-
objectApiName: listReference.objectApiName,
|
|
23108
|
-
listViewApiName: listReference.listViewApiName
|
|
23120
|
+
objectApiName: listReference.objectApiName.toLowerCase(),
|
|
23121
|
+
listViewApiName: listReference.listViewApiName
|
|
23122
|
+
? listReference.listViewApiName.toLowerCase()
|
|
23123
|
+
: listReference.listViewApiName,
|
|
23109
23124
|
// # removing listViewId from key only supporing getting records using api name
|
|
23110
23125
|
// listViewId: listReference.id,
|
|
23111
23126
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -23118,8 +23133,8 @@
|
|
|
23118
23133
|
// If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
|
|
23119
23134
|
// Assuming that listViewId is empty and continue on
|
|
23120
23135
|
return keyBuilder$23(luvio, {
|
|
23121
|
-
objectApiName: params.urlParams.objectApiName,
|
|
23122
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
23136
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
23137
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
23123
23138
|
// # removing listViewId from key only supporing getting records using api name
|
|
23124
23139
|
// listViewId: '',
|
|
23125
23140
|
searchTerm: params.body.searchTerm || null,
|
|
@@ -24066,8 +24081,10 @@
|
|
|
24066
24081
|
searchTerm: null,
|
|
24067
24082
|
where: null,
|
|
24068
24083
|
sortBy: config.sortBy === undefined ? null : config.sortBy,
|
|
24069
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24070
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24084
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24085
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24086
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24087
|
+
: listInfo.listReference.listViewApiName,
|
|
24071
24088
|
});
|
|
24072
24089
|
const selector = {
|
|
24073
24090
|
recordId: paginationKey,
|
|
@@ -24114,8 +24131,10 @@
|
|
|
24114
24131
|
searchTerm: null,
|
|
24115
24132
|
where: null,
|
|
24116
24133
|
sortBy: body.sortBy,
|
|
24117
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24118
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24134
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24135
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24136
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24137
|
+
: listInfo.listReference.listViewApiName,
|
|
24119
24138
|
}), ingest$M$1, body);
|
|
24120
24139
|
const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
|
|
24121
24140
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
@@ -24163,7 +24182,7 @@
|
|
|
24163
24182
|
return getListInfo(luvio, {
|
|
24164
24183
|
id: null,
|
|
24165
24184
|
listViewApiName: null,
|
|
24166
|
-
objectApiName: config.objectApiName,
|
|
24185
|
+
objectApiName: config.objectApiName.toLowerCase(),
|
|
24167
24186
|
type: 'mru',
|
|
24168
24187
|
}, storeLookup);
|
|
24169
24188
|
}
|
|
@@ -24449,8 +24468,10 @@
|
|
|
24449
24468
|
searchTerm: null,
|
|
24450
24469
|
where: null,
|
|
24451
24470
|
sortBy: getSortBy(config, context),
|
|
24452
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24453
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24471
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24472
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24473
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24474
|
+
: listInfo.listReference.listViewApiName,
|
|
24454
24475
|
});
|
|
24455
24476
|
const selector = {
|
|
24456
24477
|
recordId: paginationKey,
|
|
@@ -24500,8 +24521,10 @@
|
|
|
24500
24521
|
searchTerm: null,
|
|
24501
24522
|
where: null,
|
|
24502
24523
|
sortBy: body.sortBy,
|
|
24503
|
-
objectApiName: listInfo.listReference.objectApiName,
|
|
24504
|
-
listViewApiName: listInfo.listReference.listViewApiName
|
|
24524
|
+
objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
|
|
24525
|
+
listViewApiName: listInfo.listReference.listViewApiName
|
|
24526
|
+
? listInfo.listReference.listViewApiName.toLowerCase()
|
|
24527
|
+
: listInfo.listReference.listViewApiName,
|
|
24505
24528
|
}), ingest$M$1, body);
|
|
24506
24529
|
const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
|
|
24507
24530
|
releaseKeys();
|
|
@@ -26432,8 +26455,14 @@
|
|
|
26432
26455
|
// We automatically set the type based on the listViewApiName, and we need to do the same
|
|
26433
26456
|
// here for key matching and validation
|
|
26434
26457
|
configs.forEach((config) => {
|
|
26458
|
+
config.listViewApiName = config.listViewApiName
|
|
26459
|
+
? config.listViewApiName.toLowerCase()
|
|
26460
|
+
: config.listViewApiName;
|
|
26461
|
+
config.objectApiName = config.objectApiName
|
|
26462
|
+
? config.objectApiName.toLowerCase()
|
|
26463
|
+
: config.objectApiName;
|
|
26435
26464
|
if (!config.type) {
|
|
26436
|
-
config.type = config.listViewApiName === '
|
|
26465
|
+
config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
|
|
26437
26466
|
}
|
|
26438
26467
|
});
|
|
26439
26468
|
return generated_notifyUpdateAvailable(configs);
|
|
@@ -30984,9 +31013,9 @@
|
|
|
30984
31013
|
|
|
30985
31014
|
function keyBuilder$1c$1(luvio, params) {
|
|
30986
31015
|
return keyBuilder$27(luvio, {
|
|
30987
|
-
objectApiName: params.urlParams.objectApiName,
|
|
30988
|
-
listViewApiName: params.urlParams.listViewApiName,
|
|
30989
|
-
type: params.urlParams.listViewApiName === '
|
|
31016
|
+
objectApiName: params.urlParams.objectApiName.toLowerCase(),
|
|
31017
|
+
listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
|
|
31018
|
+
type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
|
|
30990
31019
|
});
|
|
30991
31020
|
}
|
|
30992
31021
|
|
|
@@ -44244,7 +44273,7 @@
|
|
|
44244
44273
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44245
44274
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44246
44275
|
});
|
|
44247
|
-
// version: 1.
|
|
44276
|
+
// version: 1.294.0-e7eb16228
|
|
44248
44277
|
|
|
44249
44278
|
var ldsIdempotencyWriteDisabled = {
|
|
44250
44279
|
isOpen: function (e) {
|
|
@@ -52734,6 +52763,7 @@
|
|
|
52734
52763
|
${predicates.sql}
|
|
52735
52764
|
${orderBy.sql}
|
|
52736
52765
|
LIMIT ?
|
|
52766
|
+
OFFSET ?
|
|
52737
52767
|
`
|
|
52738
52768
|
.split('\n')
|
|
52739
52769
|
.map((line) => line.trim())
|
|
@@ -52746,6 +52776,7 @@
|
|
|
52746
52776
|
...predicates.bindings,
|
|
52747
52777
|
// limit binding
|
|
52748
52778
|
config.limit || 10,
|
|
52779
|
+
config.offset || 0,
|
|
52749
52780
|
];
|
|
52750
52781
|
return { sql: sql.trim(), bindings };
|
|
52751
52782
|
}
|
|
@@ -53463,32 +53494,6 @@
|
|
|
53463
53494
|
return ingestionTimestamp;
|
|
53464
53495
|
}
|
|
53465
53496
|
|
|
53466
|
-
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53467
|
-
// base64 character set, plus padding character (=)
|
|
53468
|
-
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53469
|
-
function btoaPolyfill(input) {
|
|
53470
|
-
let bitmap, a, b, c;
|
|
53471
|
-
let result = '', i = 0;
|
|
53472
|
-
const rest = input.length % 3; // To determine the final padding
|
|
53473
|
-
for (; i < input.length;) {
|
|
53474
|
-
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53475
|
-
(b = input.charCodeAt(i++)) > 255 ||
|
|
53476
|
-
(c = input.charCodeAt(i++)) > 255) {
|
|
53477
|
-
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53478
|
-
input);
|
|
53479
|
-
}
|
|
53480
|
-
bitmap = (a << 16) | (b << 8) | c;
|
|
53481
|
-
result +=
|
|
53482
|
-
b64.charAt((bitmap >> 18) & 63) +
|
|
53483
|
-
b64.charAt((bitmap >> 12) & 63) +
|
|
53484
|
-
b64.charAt((bitmap >> 6) & 63) +
|
|
53485
|
-
b64.charAt(bitmap & 63);
|
|
53486
|
-
}
|
|
53487
|
-
// If there's need of padding, replace the last 'A's with equal signs
|
|
53488
|
-
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53489
|
-
}
|
|
53490
|
-
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53491
|
-
|
|
53492
53497
|
function findSpanningField(name) {
|
|
53493
53498
|
return (field) => {
|
|
53494
53499
|
return (field.apiName === name ||
|
|
@@ -53635,13 +53640,101 @@
|
|
|
53635
53640
|
];
|
|
53636
53641
|
}
|
|
53637
53642
|
|
|
53643
|
+
// Code lifted from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
53644
|
+
// base64 character set, plus padding character (=)
|
|
53645
|
+
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
53646
|
+
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
|
|
53647
|
+
function btoaPolyfill(input) {
|
|
53648
|
+
let bitmap, a, b, c;
|
|
53649
|
+
let result = '', i = 0;
|
|
53650
|
+
const rest = input.length % 3; // To determine the final padding
|
|
53651
|
+
for (; i < input.length;) {
|
|
53652
|
+
if ((a = input.charCodeAt(i++)) > 255 ||
|
|
53653
|
+
(b = input.charCodeAt(i++)) > 255 ||
|
|
53654
|
+
(c = input.charCodeAt(i++)) > 255) {
|
|
53655
|
+
throw new TypeError('Failed base64ToAscii encoding: The string to be encoded contains characters outside of the Latin1 range. ' +
|
|
53656
|
+
input);
|
|
53657
|
+
}
|
|
53658
|
+
bitmap = (a << 16) | (b << 8) | c;
|
|
53659
|
+
result +=
|
|
53660
|
+
b64.charAt((bitmap >> 18) & 63) +
|
|
53661
|
+
b64.charAt((bitmap >> 12) & 63) +
|
|
53662
|
+
b64.charAt((bitmap >> 6) & 63) +
|
|
53663
|
+
b64.charAt(bitmap & 63);
|
|
53664
|
+
}
|
|
53665
|
+
// If there's need of padding, replace the last 'A's with equal signs
|
|
53666
|
+
return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
|
|
53667
|
+
}
|
|
53668
|
+
function atobPolyfill(data) {
|
|
53669
|
+
// atob can work with strings with whitespaces, even inside the encoded part,
|
|
53670
|
+
// but only \t, \n, \f, \r and ' ', which can be stripped.
|
|
53671
|
+
let string = String(data).replace(/[\t\n\f\r ]+/g, '');
|
|
53672
|
+
if (!b64re.test(string))
|
|
53673
|
+
throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
|
53674
|
+
// Adding the padding if missing, for semplicity
|
|
53675
|
+
string += '=='.slice(2 - (string.length & 3));
|
|
53676
|
+
var bitmap, result = '', r1, r2, i = 0;
|
|
53677
|
+
for (; i < string.length;) {
|
|
53678
|
+
bitmap =
|
|
53679
|
+
(b64.indexOf(string.charAt(i++)) << 18) |
|
|
53680
|
+
(b64.indexOf(string.charAt(i++)) << 12) |
|
|
53681
|
+
((r1 = b64.indexOf(string.charAt(i++))) << 6) |
|
|
53682
|
+
(r2 = b64.indexOf(string.charAt(i++)));
|
|
53683
|
+
result +=
|
|
53684
|
+
r1 === 64
|
|
53685
|
+
? String.fromCharCode((bitmap >> 16) & 255)
|
|
53686
|
+
: r2 === 64
|
|
53687
|
+
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
|
53688
|
+
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
|
53689
|
+
}
|
|
53690
|
+
return result;
|
|
53691
|
+
}
|
|
53692
|
+
const base64encode = typeof btoa === 'function' ? btoa : btoaPolyfill;
|
|
53693
|
+
const base64decode = typeof atob === 'function' ? atob : atobPolyfill;
|
|
53694
|
+
|
|
53695
|
+
function cursorResolver(source) {
|
|
53696
|
+
return encodeV1Cursor(source.index);
|
|
53697
|
+
}
|
|
53698
|
+
function pageInfoResolver(source) {
|
|
53699
|
+
if (source.length === 0) {
|
|
53700
|
+
return {
|
|
53701
|
+
startCursor: null,
|
|
53702
|
+
endCursor: null,
|
|
53703
|
+
};
|
|
53704
|
+
}
|
|
53705
|
+
let startIndex = source[0].index;
|
|
53706
|
+
let endIndex = source[source.length - 1].index;
|
|
53707
|
+
return {
|
|
53708
|
+
startCursor: encodeV1Cursor(startIndex),
|
|
53709
|
+
endCursor: encodeV1Cursor(endIndex),
|
|
53710
|
+
};
|
|
53711
|
+
}
|
|
53712
|
+
function pageResultCountResolver(source) {
|
|
53713
|
+
return source.length;
|
|
53714
|
+
}
|
|
53715
|
+
function encodeV1Cursor(index) {
|
|
53716
|
+
return base64encode(`v1:${index}`);
|
|
53717
|
+
}
|
|
53718
|
+
const cursorRegex = /^v1:(?<index>\d+)$/;
|
|
53719
|
+
function decodeV1Cursor(base64cursor) {
|
|
53720
|
+
const cursor = base64decode(base64cursor);
|
|
53721
|
+
if (!cursor) {
|
|
53722
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53723
|
+
throw new Error('Unable to parse cursor');
|
|
53724
|
+
}
|
|
53725
|
+
const found = cursor.match(cursorRegex);
|
|
53726
|
+
if (!found || !found.groups) {
|
|
53727
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
53728
|
+
throw new Error('Unable to parse cursor');
|
|
53729
|
+
}
|
|
53730
|
+
return Number(found.groups.index);
|
|
53731
|
+
}
|
|
53732
|
+
|
|
53638
53733
|
/*
|
|
53639
53734
|
resolves connections...
|
|
53640
53735
|
*/
|
|
53641
53736
|
async function connectionResolver(obj, args, context, info) {
|
|
53642
|
-
let { recordRepresentation: parentRecord, ingestionTimestamp } = obj;
|
|
53643
|
-
if (!ingestionTimestamp)
|
|
53644
|
-
ingestionTimestamp = 0;
|
|
53737
|
+
let { recordRepresentation: parentRecord, ingestionTimestamp = 0 } = obj;
|
|
53645
53738
|
if (!parentRecord && excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
53646
53739
|
// at our record query we fetch each ingestion time stamp and pass it down to each lower resolver to query against
|
|
53647
53740
|
ingestionTimestamp = await fetchIngestionTimeStampFromDatabase(info.fieldName, info, args, context.query);
|
|
@@ -53670,6 +53763,10 @@
|
|
|
53670
53763
|
];
|
|
53671
53764
|
const scopeJoins = scopeToJoins(args.scope, context.settings);
|
|
53672
53765
|
joins.push(...scopeJoins);
|
|
53766
|
+
let offset = 0;
|
|
53767
|
+
if (args.after) {
|
|
53768
|
+
offset = decodeV1Cursor(args.after) + 1;
|
|
53769
|
+
}
|
|
53673
53770
|
// Alias starts as entity's ApiName
|
|
53674
53771
|
const queryConfig = {
|
|
53675
53772
|
alias,
|
|
@@ -53677,18 +53774,20 @@
|
|
|
53677
53774
|
predicates,
|
|
53678
53775
|
orderBy: orderByToPredicate(args.orderBy, alias, alias, context.objectInfos),
|
|
53679
53776
|
limit: args.first,
|
|
53777
|
+
offset: offset,
|
|
53680
53778
|
ingestionTimestamp,
|
|
53681
53779
|
};
|
|
53682
53780
|
const { sql, bindings } = buildQuery(queryConfig);
|
|
53683
53781
|
const results = await query(sql, bindings);
|
|
53684
53782
|
//map each sql result with the ingestion timestamp to pass it down a level
|
|
53685
53783
|
return results.rows
|
|
53686
|
-
.map((row) => row[0])
|
|
53687
|
-
.map((
|
|
53784
|
+
.map((row) => parse$4(row[0]))
|
|
53785
|
+
.map((recordRepresentation, index) => {
|
|
53786
|
+
context.seenRecordIds.add(recordRepresentation.id);
|
|
53688
53787
|
return {
|
|
53689
|
-
|
|
53788
|
+
recordRepresentation,
|
|
53690
53789
|
ingestionTimestamp,
|
|
53691
|
-
index,
|
|
53790
|
+
index: index + offset,
|
|
53692
53791
|
};
|
|
53693
53792
|
});
|
|
53694
53793
|
}
|
|
@@ -53852,10 +53951,10 @@
|
|
|
53852
53951
|
field.resolve = passThroughResolver;
|
|
53853
53952
|
break;
|
|
53854
53953
|
case 'pageInfo':
|
|
53855
|
-
field.resolve =
|
|
53856
|
-
|
|
53857
|
-
|
|
53858
|
-
|
|
53954
|
+
field.resolve = pageInfoResolver;
|
|
53955
|
+
break;
|
|
53956
|
+
case 'pageResultCount':
|
|
53957
|
+
field.resolve = pageResultCountResolver;
|
|
53859
53958
|
break;
|
|
53860
53959
|
default:
|
|
53861
53960
|
field.resolve = defaultFieldResolver;
|
|
@@ -53878,17 +53977,10 @@
|
|
|
53878
53977
|
// }
|
|
53879
53978
|
for (const field of fields) {
|
|
53880
53979
|
if (field.name === 'node') {
|
|
53881
|
-
field.resolve =
|
|
53882
|
-
const { record, ingestionTimestamp } = obj;
|
|
53883
|
-
const recordRepresentation = parse$4(record);
|
|
53884
|
-
seenRecordIds.add(recordRepresentation.id);
|
|
53885
|
-
return { recordRepresentation, ingestionTimestamp };
|
|
53886
|
-
};
|
|
53980
|
+
field.resolve = passThroughResolver;
|
|
53887
53981
|
}
|
|
53888
53982
|
else if (field.name === 'cursor') {
|
|
53889
|
-
field.resolve =
|
|
53890
|
-
return base64encode(`v1:${index}`);
|
|
53891
|
-
};
|
|
53983
|
+
field.resolve = cursorResolver;
|
|
53892
53984
|
}
|
|
53893
53985
|
}
|
|
53894
53986
|
}
|
|
@@ -54247,7 +54339,7 @@
|
|
|
54247
54339
|
// handles child relationship
|
|
54248
54340
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
54249
54341
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
54250
|
-
const recordQueries = `${apiName}(first: Int, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54342
|
+
const recordQueries = `${apiName}(first: Int, after: String, where: ${apiName}_Filter, orderBy: ${apiName}_OrderBy, scope: SupportedScopes): ${apiName}Connection\n`;
|
|
54251
54343
|
const isServiceAppointment = apiName === 'ServiceAppointment';
|
|
54252
54344
|
const recordConnections = /* GraphQL */ `
|
|
54253
54345
|
${isServiceAppointment ? `scalar ${apiName.toUpperCase()}_SCOPE` : ''}
|
|
@@ -54269,6 +54361,7 @@
|
|
|
54269
54361
|
edges: [${apiName}Edge]
|
|
54270
54362
|
pageInfo: PageInfo!
|
|
54271
54363
|
totalCount: Int!
|
|
54364
|
+
pageResultCount: Int!
|
|
54272
54365
|
}
|
|
54273
54366
|
|
|
54274
54367
|
type ${apiName}Edge {
|
|
@@ -54350,7 +54443,7 @@
|
|
|
54350
54443
|
}
|
|
54351
54444
|
if (objectInfoMap[childObjectApiName] !== undefined &&
|
|
54352
54445
|
!existingParentRelationships.has(relationshipName)) {
|
|
54353
|
-
spanningRecordConnections += `${relationshipName}(first: Int, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54446
|
+
spanningRecordConnections += `${relationshipName}(first: Int, after: String, where: ${childObjectApiName}_Filter, orderBy: ${childObjectApiName}_OrderBy, scope: SupportedScopes): ${childObjectApiName}Connection \n`;
|
|
54354
54447
|
// if the record type has already been extended then these additional scalars have already been added
|
|
54355
54448
|
// to add them again would throw an error
|
|
54356
54449
|
const filterScalarType = schema.getType(`${childObjectApiName}_Filter`);
|
|
@@ -62562,7 +62655,7 @@
|
|
|
62562
62655
|
id: '@salesforce/lds-network-adapter',
|
|
62563
62656
|
instrument: instrument$2,
|
|
62564
62657
|
});
|
|
62565
|
-
// version: 1.
|
|
62658
|
+
// version: 1.294.0-06a44f23f
|
|
62566
62659
|
|
|
62567
62660
|
const { create: create$3, keys: keys$3 } = Object;
|
|
62568
62661
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -81017,6 +81110,11 @@
|
|
|
81017
81110
|
const parentRecordId = resolvedLink.recordId;
|
|
81018
81111
|
const totalEdges = source.edges !== undefined ? source.edges.length : 0;
|
|
81019
81112
|
const metadata = reader.resolveMetadata(source, PAGINATION_VERSION);
|
|
81113
|
+
if (metadata === undefined) {
|
|
81114
|
+
reader.markMissingLink(fieldData.__ref);
|
|
81115
|
+
reader.markMissing();
|
|
81116
|
+
return;
|
|
81117
|
+
}
|
|
81020
81118
|
const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
|
|
81021
81119
|
const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
|
|
81022
81120
|
const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
|
|
@@ -81027,7 +81125,7 @@
|
|
|
81027
81125
|
token: afterArgVal
|
|
81028
81126
|
};
|
|
81029
81127
|
let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
|
|
81030
|
-
const listIsComplete = (
|
|
81128
|
+
const listIsComplete = (metadata.__END__ !== undefined);
|
|
81031
81129
|
let trimmedEdges = [];
|
|
81032
81130
|
let maxOffset = undefined;
|
|
81033
81131
|
if (totalEdges === 0 && listIsComplete) {
|
|
@@ -81040,7 +81138,7 @@
|
|
|
81040
81138
|
}
|
|
81041
81139
|
}
|
|
81042
81140
|
else {
|
|
81043
|
-
if (
|
|
81141
|
+
if (startOffset === undefined || endOffset === undefined) {
|
|
81044
81142
|
reader.markMissingLink(fieldData.__ref);
|
|
81045
81143
|
reader.markMissing();
|
|
81046
81144
|
return;
|
|
@@ -82626,7 +82724,7 @@
|
|
|
82626
82724
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
82627
82725
|
instrument: instrument$1,
|
|
82628
82726
|
});
|
|
82629
|
-
// version: 1.
|
|
82727
|
+
// version: 1.294.0-e7eb16228
|
|
82630
82728
|
|
|
82631
82729
|
// On core the unstable adapters are re-exported with different names,
|
|
82632
82730
|
// we want to match them here.
|
|
@@ -84882,7 +84980,7 @@
|
|
|
84882
84980
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
84883
84981
|
graphQLImperative = ldsAdapter;
|
|
84884
84982
|
});
|
|
84885
|
-
// version: 1.
|
|
84983
|
+
// version: 1.294.0-e7eb16228
|
|
84886
84984
|
|
|
84887
84985
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
84888
84986
|
__proto__: null,
|
|
@@ -85620,7 +85718,7 @@
|
|
|
85620
85718
|
function register(r) {
|
|
85621
85719
|
callbacks$1.forEach((callback) => callback(r));
|
|
85622
85720
|
}
|
|
85623
|
-
// version: 1.
|
|
85721
|
+
// version: 1.294.0-06a44f23f
|
|
85624
85722
|
|
|
85625
85723
|
/**
|
|
85626
85724
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -90601,4 +90699,4 @@
|
|
|
90601
90699
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
90602
90700
|
|
|
90603
90701
|
}));
|
|
90604
|
-
// version: 1.
|
|
90702
|
+
// version: 1.294.0-06a44f23f
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.294.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-priming": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
46
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.294.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.294.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.294.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.294.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.294.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.294.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.294.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.294.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.294.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|