@salesforce/lds-runtime-aura 1.266.0-dev17 → 1.266.0-dev19
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, instrument, configuration, InMemoryRecordRepresentationQueryEvaluator, UiApiNamespace, RecordRepresentationRepresentationType, registerPrefetcher } from 'force/ldsAdaptersUiapi';
|
|
18
|
+
import { getRecordAvatarsAdapterFactory, getRecordAdapterFactory, coerceFieldIdArray, getRecordsAdapterFactory, getRecordActionsAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, 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';
|
|
@@ -512,16 +512,14 @@ class GetRecordRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
512
512
|
if (request.config.fields === undefined && request.config.optionalFields === undefined) {
|
|
513
513
|
return request;
|
|
514
514
|
}
|
|
515
|
-
let
|
|
516
|
-
|
|
517
|
-
optionalFields = [optionalFields];
|
|
518
|
-
}
|
|
515
|
+
let fields = coerceFieldIdArray(request.config.fields) || [];
|
|
516
|
+
let optionalFields = coerceFieldIdArray(request.config.optionalFields) || [];
|
|
519
517
|
return {
|
|
520
518
|
...request,
|
|
521
519
|
config: {
|
|
522
520
|
...request.config,
|
|
523
521
|
fields: undefined,
|
|
524
|
-
optionalFields: [...
|
|
522
|
+
optionalFields: [...fields, ...optionalFields],
|
|
525
523
|
},
|
|
526
524
|
};
|
|
527
525
|
}
|
|
@@ -573,11 +571,17 @@ class GetRecordsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
573
571
|
}
|
|
574
572
|
|
|
575
573
|
function normalizeRecordIds(recordIds) {
|
|
576
|
-
if (!
|
|
574
|
+
if (!ArrayIsArray(recordIds)) {
|
|
577
575
|
return [recordIds];
|
|
578
576
|
}
|
|
579
577
|
return recordIds;
|
|
580
578
|
}
|
|
579
|
+
function normalizeApiNames(apiNames) {
|
|
580
|
+
if (apiNames === undefined || apiNames === null) {
|
|
581
|
+
return [];
|
|
582
|
+
}
|
|
583
|
+
return ArrayIsArray(apiNames) ? apiNames : [apiNames];
|
|
584
|
+
}
|
|
581
585
|
class GetRecordActionsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
582
586
|
constructor() {
|
|
583
587
|
super(...arguments);
|
|
@@ -622,7 +626,10 @@ class GetRecordActionsRequestStrategy extends LuvioAdapterRequestStrategy {
|
|
|
622
626
|
// let's merge the recordIds
|
|
623
627
|
combined.recordIds = Array.from(new Set([...normalizeRecordIds(reqA.recordIds), ...normalizeRecordIds(reqB.recordIds)]));
|
|
624
628
|
if (combined.retrievalMode === 'ALL') {
|
|
625
|
-
const combinedSet = new Set([
|
|
629
|
+
const combinedSet = new Set([
|
|
630
|
+
...normalizeApiNames(combined.apiNames),
|
|
631
|
+
...normalizeApiNames(reqB.apiNames),
|
|
632
|
+
]);
|
|
626
633
|
combined.apiNames = Array.from(combinedSet);
|
|
627
634
|
}
|
|
628
635
|
return combined;
|
|
@@ -726,6 +733,7 @@ const DEFAULT_STORAGE_OPTIONS = {
|
|
|
726
733
|
expiration: 12 * 60 * 60,
|
|
727
734
|
clearOnInit: false,
|
|
728
735
|
debugLogging: false,
|
|
736
|
+
version: 2,
|
|
729
737
|
};
|
|
730
738
|
function buildAuraPrefetchStorage(options = {}) {
|
|
731
739
|
const auraStorage = createStorage({
|
|
@@ -1615,4 +1623,4 @@ function ldsEngineCreator() {
|
|
|
1615
1623
|
}
|
|
1616
1624
|
|
|
1617
1625
|
export { buildPredictorForContext, ldsEngineCreator as default, initializeLDS, predictiveLoadPage };
|
|
1618
|
-
// version: 1.266.0-
|
|
1626
|
+
// version: 1.266.0-dev19-80cc21d89
|
|
@@ -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.266.0-
|
|
3
|
+
"version": "1.266.0-dev19",
|
|
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.266.0-
|
|
38
|
-
"@salesforce/lds-ads-bridge": "^1.266.0-
|
|
39
|
-
"@salesforce/lds-aura-storage": "^1.266.0-
|
|
40
|
-
"@salesforce/lds-bindings": "^1.266.0-
|
|
41
|
-
"@salesforce/lds-instrumentation": "^1.266.0-
|
|
42
|
-
"@salesforce/lds-network-aura": "^1.266.0-
|
|
43
|
-
"@salesforce/lds-network-fetch-with-jwt": "^1.266.0-
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev19",
|
|
38
|
+
"@salesforce/lds-ads-bridge": "^1.266.0-dev19",
|
|
39
|
+
"@salesforce/lds-aura-storage": "^1.266.0-dev19",
|
|
40
|
+
"@salesforce/lds-bindings": "^1.266.0-dev19",
|
|
41
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev19",
|
|
42
|
+
"@salesforce/lds-network-aura": "^1.266.0-dev19",
|
|
43
|
+
"@salesforce/lds-network-fetch-with-jwt": "^1.266.0-dev19"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@luvio/network-adapter-composable": "0.154.7-dev7"
|