@salesforce/lds-runtime-aura 1.278.0 → 1.280.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 +1666 -1268
- package/dist/types/__mocks__/@luvio/runtime.d.ts +25 -0
- package/dist/types/__mocks__/@salesforce/lds-instrumentation.d.ts +5 -0
- package/dist/types/__mocks__/aura.d.ts +3 -0
- package/dist/types/aura-instrumentation/main.d.ts +2 -2
- package/dist/types/main.d.ts +9 -24
- package/dist/types/predictive-loading/prefetcher/predictive-prefetcher.d.ts +4 -0
- package/dist/types/predictive-loading/repository/prefetch-repository.d.ts +1 -1
- package/dist/types/predictive-loading/request-strategy/get-related-list-records-batch-request-strategy.d.ts +1 -0
- package/dist/types/predictive-loading/request-strategy/get-related-list-records-request-strategy.d.ts +15 -0
- package/package.json +14 -12
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum KeySubscriptionServiceInfo {
|
|
2
|
+
NAME = "keySubscription",
|
|
3
|
+
VERSION = "1.0"
|
|
4
|
+
}
|
|
5
|
+
export declare enum MetadataRepositoryServiceInfo {
|
|
6
|
+
NAME = "metadataRepository",
|
|
7
|
+
VERSION = "1.0"
|
|
8
|
+
}
|
|
9
|
+
export declare enum StoreServiceInfo {
|
|
10
|
+
NAME = "store",
|
|
11
|
+
VERSION = "1.0"
|
|
12
|
+
}
|
|
13
|
+
export declare enum TypeRegistryServiceInfo {
|
|
14
|
+
NAME = "typeRegistry",
|
|
15
|
+
VERSION = "1.0"
|
|
16
|
+
}
|
|
17
|
+
export declare enum AuraNetworkServiceInfo {
|
|
18
|
+
NAME = "auraNetwork",
|
|
19
|
+
VERSION = "1.0"
|
|
20
|
+
}
|
|
21
|
+
export declare function buildDefaultKeySubscriptionService(): void;
|
|
22
|
+
export declare function buildInMemoryMetadataRepositoryService(): void;
|
|
23
|
+
export declare function buildInMemoryStoreService(): void;
|
|
24
|
+
export declare function buildDefaultTypeRegistryService(): void;
|
|
25
|
+
export declare function buildAuraNetworkService(): void;
|
|
@@ -8,3 +8,8 @@ export declare function instrumentStoreMethods(): void;
|
|
|
8
8
|
export declare function setLdsAdaptersUiapiInstrumentation(): void;
|
|
9
9
|
export declare function setLdsNetworkAdapterInstrumentation(): void;
|
|
10
10
|
export declare function logObjectInfoChanged(): void;
|
|
11
|
+
export declare function executeAsyncActivity(_name: string, execute: (act: any) => Promise<void>, _options?: any): Promise<void>;
|
|
12
|
+
export declare const METRIC_KEYS: {
|
|
13
|
+
PREDICTIVE_DATA_LOADING_PREDICT: string;
|
|
14
|
+
PREDICTIVE_DATA_LOADING_SAVE_REQUEST: string;
|
|
15
|
+
};
|
|
@@ -2,8 +2,8 @@ import type { FetchResponse, Luvio, InMemoryStore, Adapter, UnfulfilledSnapshot
|
|
|
2
2
|
import type { AdapterMetadata } from '@salesforce/lds-bindings';
|
|
3
3
|
import { ADAPTER_UNFULFILLED_ERROR } from '@salesforce/lds-bindings';
|
|
4
4
|
import type { CacheStatsLogger, Timer } from 'instrumentation/service';
|
|
5
|
-
import { onIdleDetected } from '@salesforce/lds-instrumentation';
|
|
6
|
-
export { onIdleDetected };
|
|
5
|
+
import { onIdleDetected, executeAsyncActivity } from '@salesforce/lds-instrumentation';
|
|
6
|
+
export { onIdleDetected, executeAsyncActivity };
|
|
7
7
|
export interface AdapterUnfulfilledError {
|
|
8
8
|
[ADAPTER_UNFULFILLED_ERROR]: boolean;
|
|
9
9
|
adapterName: string;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
import { type RecordHomePageContext } from './predictive-loading';
|
|
2
|
-
type PreloadProps = {
|
|
3
|
-
context: {
|
|
4
|
-
objectApiName: string;
|
|
5
|
-
};
|
|
6
|
-
pageReference: LexPageReference;
|
|
7
|
-
};
|
|
8
|
-
type LexPageReference = {
|
|
9
|
-
attributes: {
|
|
10
|
-
actionName: string;
|
|
11
|
-
objectApiName: string;
|
|
12
|
-
recordId: string;
|
|
13
|
-
};
|
|
14
|
-
state: any;
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated This function is deprecated in favor of `buildPredictorForContext`.
|
|
19
|
-
* We only keep it so if the lds.usePredictiveLoading gate is open the existing functionality
|
|
20
|
-
* on LASR don't break.
|
|
21
|
-
* Note: we don't want to make it a noop either because then the gate toggle will be meaningless.
|
|
22
|
-
*/
|
|
23
|
-
export declare function predictiveLoadPage(preloadProps: PreloadProps, runPredictions: true): Promise<void>;
|
|
24
2
|
/**
|
|
25
3
|
* @typedef {Object} RecordHomePageContext
|
|
26
4
|
* @property {string} objectApiName - The API name of the object.
|
|
@@ -37,19 +15,26 @@ export declare function predictiveLoadPage(preloadProps: PreloadProps, runPredic
|
|
|
37
15
|
* @returns {{
|
|
38
16
|
* hasPredictions: () => boolean,
|
|
39
17
|
* watchPageLoadForPredictions: () => void,
|
|
40
|
-
* runPredictions: () => ReturnType<Promise<void
|
|
18
|
+
* runPredictions: () => ReturnType<Promise<void>>,
|
|
19
|
+
* getPredictionSummary: () => Map<String,Number>
|
|
41
20
|
* }} An object containing methods to handle predictions:
|
|
42
21
|
* - hasPredictions: Checks if there are any predictions available.
|
|
43
22
|
* - watchPageLoadForPredictions: Starts recording the page request for prediction purposes.
|
|
44
23
|
* - runPredictions: Executes the predictions based on the recorded data and returns a promise
|
|
45
24
|
* of when those predictions are completed.
|
|
25
|
+
* - getPredictionSummary: Returns the count of exact and similar prediction requests
|
|
46
26
|
*/
|
|
47
27
|
export declare function buildPredictorForContext(context: RecordHomePageContext): {
|
|
48
28
|
hasPredictions(): boolean;
|
|
49
29
|
watchPageLoadForPredictions(): void;
|
|
50
|
-
runPredictions(): Promise<
|
|
30
|
+
runPredictions(): Promise<unknown>;
|
|
31
|
+
getPredictionSummary(): {
|
|
32
|
+
exact: number;
|
|
33
|
+
similar: number;
|
|
34
|
+
};
|
|
51
35
|
} | undefined;
|
|
52
36
|
export declare function initializeLDS(): void;
|
|
37
|
+
export declare function initializeOneStore(): void;
|
|
53
38
|
declare function ldsEngineCreator(): {
|
|
54
39
|
name: string;
|
|
55
40
|
};
|
|
@@ -16,6 +16,10 @@ export declare abstract class ApplicationPredictivePrefetcher<Request, Context e
|
|
|
16
16
|
startRecording(): void;
|
|
17
17
|
saveRequest(request: Request): Promise<void>;
|
|
18
18
|
predict(): Promise<void>;
|
|
19
|
+
getPredictionSummary(): {
|
|
20
|
+
exact: number;
|
|
21
|
+
similar: number;
|
|
22
|
+
};
|
|
19
23
|
hasPredictions(): boolean;
|
|
20
24
|
getSimilarPageRequests(): Request[];
|
|
21
25
|
}
|
|
@@ -7,6 +7,7 @@ export type GetRelatedListRecordsBatchRequest = {
|
|
|
7
7
|
type GetRelatedListRecordsBatchContext = {
|
|
8
8
|
recordId: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const GET_RELATED_LIST_RECORDS_BATCH_ADAPTER_NAME = "getRelatedListRecordsBatch";
|
|
10
11
|
export declare class GetRelatedListRecordsBatchRequestStrategy extends LuvioAdapterRequestStrategy<GetRelatedListRecordsBatchConfig, GetRelatedListRecordsBatchRequest, GetRelatedListRecordsBatchContext> {
|
|
11
12
|
adapterName: string;
|
|
12
13
|
adapterFactory: import("@luvio/engine").AdapterFactory<GetRelatedListRecordsBatchConfig, import("@salesforce/lds-adapters-uiapi").RelatedListRecordCollectionBatchRepresentation>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GetRelatedListRecordsConfig } from '@salesforce/lds-adapters-uiapi';
|
|
2
|
+
import type { LuvioAdapterRequest } from './luvio-adapter-request';
|
|
2
3
|
import { LuvioAdapterRequestStrategy } from './luvio-adapter-request-strategy';
|
|
3
4
|
export type GetRelatedListRecordsRequest = {
|
|
4
5
|
adapterName: 'getRelatedListRecords';
|
|
@@ -11,6 +12,20 @@ export declare class GetRelatedListRecordsRequestStrategy extends LuvioAdapterRe
|
|
|
11
12
|
adapterName: string;
|
|
12
13
|
adapterFactory: import("@luvio/engine").AdapterFactory<GetRelatedListRecordsConfig, import("@salesforce/lds-adapters-uiapi").RelatedListRecordCollectionRepresentation>;
|
|
13
14
|
buildConcreteRequest(similarRequest: GetRelatedListRecordsRequest, context: GetRelatedListRecordsContext): GetRelatedListRecordsRequest;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* This method returns GetRelatedListRecordsRequest[] that won't be part of a batch request.
|
|
18
|
+
*
|
|
19
|
+
* ADG currently handles the batching of GetRelatedListRecords -> GetRelatedListRecordsBatch
|
|
20
|
+
* https://gitcore.soma.salesforce.com/core-2206/core-public/blob/p4/main/core/ui-laf-components/modules/laf/batchingPortable/reducers/RelatedListRecordsBatchReducer.js
|
|
21
|
+
*
|
|
22
|
+
* For performance reasons (fear to overfetch), we only check that the Single relatedListId is not present in any of the Batch requests,
|
|
23
|
+
* but we don't check for any other parameters.
|
|
24
|
+
*
|
|
25
|
+
* @param unfilteredRequests All of the request available for predictions.
|
|
26
|
+
* @returns GetRelatedListRecordsRequest[] That should be a prediction.
|
|
27
|
+
*/
|
|
28
|
+
reduce(unfilteredRequests: LuvioAdapterRequest<unknown>[]): GetRelatedListRecordsRequest[];
|
|
14
29
|
buildSaveRequestData<C extends GetRelatedListRecordsContext>(similarContext: C, context: C, request: GetRelatedListRecordsRequest): {
|
|
15
30
|
request: GetRelatedListRecordsRequest;
|
|
16
31
|
context: C;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.280.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,24 +34,26 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@salesforce/lds-
|
|
40
|
-
"@salesforce/lds-
|
|
41
|
-
"@salesforce/lds-
|
|
42
|
-
"@salesforce/lds-
|
|
43
|
-
"@salesforce/lds-
|
|
37
|
+
"@luvio/registry": "^3.0.0",
|
|
38
|
+
"@luvio/runtime": "3.4.3",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.280.0",
|
|
40
|
+
"@salesforce/lds-ads-bridge": "^1.280.0",
|
|
41
|
+
"@salesforce/lds-aura-storage": "^1.280.0",
|
|
42
|
+
"@salesforce/lds-bindings": "^1.280.0",
|
|
43
|
+
"@salesforce/lds-instrumentation": "^1.280.0",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.280.0",
|
|
45
|
+
"@salesforce/lds-network-fetch-with-jwt": "^1.280.0"
|
|
44
46
|
},
|
|
45
47
|
"dependencies": {
|
|
46
|
-
"@luvio/network-adapter-composable": "0.154.
|
|
48
|
+
"@luvio/network-adapter-composable": "0.154.14"
|
|
47
49
|
},
|
|
48
50
|
"luvioBundlesize": [
|
|
49
51
|
{
|
|
50
52
|
"path": "./dist/ldsEngineCreator.js",
|
|
51
53
|
"maxSize": {
|
|
52
|
-
"none": "
|
|
53
|
-
"min": "
|
|
54
|
-
"compressed": "
|
|
54
|
+
"none": "86.7 kB",
|
|
55
|
+
"min": "36.6 kB",
|
|
56
|
+
"compressed": "16 kB"
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
],
|