@salesforce/lds-runtime-aura 1.277.0 → 1.278.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/ldsEngineCreator.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { HttpStatusCode, InMemoryStore, Environment, Luvio, InMemoryStoreQueryEvaluator } from 'force/luvioEngine';
|
|
16
16
|
import ldsTrackedFieldsBehaviorGate from '@salesforce/gate/lds.useNewTrackedFieldBehavior';
|
|
17
17
|
import usePredictiveLoading from '@salesforce/gate/lds.usePredictiveLoading';
|
|
18
|
-
import { getRecordAvatarsAdapterFactory, getRecordAdapterFactory, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatchAdapterFactory, instrument, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
|
|
18
|
+
import { getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, getRelatedListsActionsAdapterFactory, getRelatedListInfoBatchAdapterFactory, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatchAdapterFactory, instrument, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
|
|
19
19
|
import { createStorage, clearStorages } from 'force/ldsStorage';
|
|
20
20
|
import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
|
|
21
21
|
import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, instrument as instrument$2 } from 'force/ldsBindings';
|
|
@@ -543,16 +543,14 @@ class GetRecordRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
543
543
|
if (request.config.fields === undefined && request.config.optionalFields === undefined) {
|
|
544
544
|
return request;
|
|
545
545
|
}
|
|
546
|
-
let
|
|
547
|
-
|
|
548
|
-
optionalFields = [optionalFields];
|
|
549
|
-
}
|
|
546
|
+
let fields = coerceFieldIdArray(request.config.fields) || [];
|
|
547
|
+
let optionalFields = coerceFieldIdArray(request.config.optionalFields) || [];
|
|
550
548
|
return {
|
|
551
549
|
...request,
|
|
552
550
|
config: {
|
|
553
551
|
...request.config,
|
|
554
552
|
fields: undefined,
|
|
555
|
-
optionalFields: [...
|
|
553
|
+
optionalFields: [...fields, ...optionalFields],
|
|
556
554
|
},
|
|
557
555
|
};
|
|
558
556
|
}
|
|
@@ -652,11 +650,17 @@ class GetRecordsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
652
650
|
}
|
|
653
651
|
|
|
654
652
|
function normalizeRecordIds(recordIds) {
|
|
655
|
-
if (!
|
|
653
|
+
if (!ArrayIsArray$1(recordIds)) {
|
|
656
654
|
return [recordIds];
|
|
657
655
|
}
|
|
658
656
|
return recordIds;
|
|
659
657
|
}
|
|
658
|
+
function normalizeApiNames(apiNames) {
|
|
659
|
+
if (apiNames === undefined || apiNames === null) {
|
|
660
|
+
return [];
|
|
661
|
+
}
|
|
662
|
+
return ArrayIsArray$1(apiNames) ? apiNames : [apiNames];
|
|
663
|
+
}
|
|
660
664
|
class GetRecordActionsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
661
665
|
constructor() {
|
|
662
666
|
super(...arguments);
|
|
@@ -701,7 +705,10 @@ class GetRecordActionsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
701
705
|
// let's merge the recordIds
|
|
702
706
|
combined.recordIds = Array.from(new Set([...normalizeRecordIds(reqA.recordIds), ...normalizeRecordIds(reqB.recordIds)]));
|
|
703
707
|
if (combined.retrievalMode === 'ALL') {
|
|
704
|
-
const combinedSet = new Set([
|
|
708
|
+
const combinedSet = new Set([
|
|
709
|
+
...normalizeApiNames(combined.apiNames),
|
|
710
|
+
...normalizeApiNames(reqB.apiNames),
|
|
711
|
+
]);
|
|
705
712
|
combined.apiNames = Array.from(combinedSet);
|
|
706
713
|
}
|
|
707
714
|
return combined;
|
|
@@ -1015,6 +1022,7 @@ const DEFAULT_STORAGE_OPTIONS = {
|
|
|
1015
1022
|
expiration: 12 * 60 * 60,
|
|
1016
1023
|
clearOnInit: false,
|
|
1017
1024
|
debugLogging: false,
|
|
1025
|
+
version: 2,
|
|
1018
1026
|
};
|
|
1019
1027
|
function buildAuraPrefetchStorage(options = {}) {
|
|
1020
1028
|
const auraStorage = createStorage({
|
|
@@ -1908,4 +1916,4 @@ function ldsEngineCreator() {
|
|
|
1908
1916
|
}
|
|
1909
1917
|
|
|
1910
1918
|
export { buildPredictorForContext, ldsEngineCreator as default, initializeLDS, predictiveLoadPage };
|
|
1911
|
-
// version: 1.
|
|
1919
|
+
// version: 1.278.0-f0e8ebcd6
|
|
@@ -8,6 +8,7 @@ export declare const DEFAULT_STORAGE_OPTIONS: {
|
|
|
8
8
|
expiration: number;
|
|
9
9
|
clearOnInit: boolean;
|
|
10
10
|
debugLogging: boolean;
|
|
11
|
+
version: number;
|
|
11
12
|
};
|
|
12
13
|
export declare function buildAuraPrefetchStorage(options?: Partial<AuraStorageConfig>): PrefetchStorage;
|
|
13
14
|
export declare class AuraPrefetchStorage implements PrefetchStorage {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.278.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
38
|
-
"@salesforce/lds-ads-bridge": "^1.
|
|
39
|
-
"@salesforce/lds-aura-storage": "^1.
|
|
40
|
-
"@salesforce/lds-bindings": "^1.
|
|
41
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
42
|
-
"@salesforce/lds-network-aura": "^1.
|
|
43
|
-
"@salesforce/lds-network-fetch-with-jwt": "^1.
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.278.0",
|
|
38
|
+
"@salesforce/lds-ads-bridge": "^1.278.0",
|
|
39
|
+
"@salesforce/lds-aura-storage": "^1.278.0",
|
|
40
|
+
"@salesforce/lds-bindings": "^1.278.0",
|
|
41
|
+
"@salesforce/lds-instrumentation": "^1.278.0",
|
|
42
|
+
"@salesforce/lds-network-aura": "^1.278.0",
|
|
43
|
+
"@salesforce/lds-network-fetch-with-jwt": "^1.278.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@luvio/network-adapter-composable": "0.154.12"
|