@salesforce/lds-adapters-uiapi 1.369.0 → 1.370.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/es/es2018/types/src/configuration.d.ts +18 -9
- package/dist/es/es2018/types/src/main.d.ts +5 -1
- package/dist/es/es2018/types/src/sfdc_graphql.d.ts +1 -2
- package/dist/es/es2018/uiapi-records-service.js +20 -0
- package/package.json +8 -6
- package/sfdc/graphqlAdapters.js +273 -238
- package/sfdc/index.js +21 -1
- package/sfdc/uiapi-static-functions.js +20 -0
|
@@ -9,6 +9,7 @@ import type { DraftAwarePerformUpdateRecordQuickActionAdapter } from './wire/per
|
|
|
9
9
|
import type { DraftAwareGraphQLAdapter } from './wire/graphql/configurationTypes';
|
|
10
10
|
import type { EnvironmentAwareGraphQLBatchAdapter } from './wire/graphqlBatch/configurationTypes';
|
|
11
11
|
import type { WireAdapterConstructor } from '@lwc/engine-core';
|
|
12
|
+
import type { ImperativeAdapter, GraphQLImperativeAdapter } from './main';
|
|
12
13
|
/**
|
|
13
14
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
14
15
|
* Configuration for one store enabled REST adapters only.
|
|
@@ -18,6 +19,10 @@ export declare const configurationForOneStoreEnabledAdapters: {
|
|
|
18
19
|
getGetObjectInfoAdapter: () => WireAdapterConstructor | undefined;
|
|
19
20
|
setGetObjectInfosAdapter: (adapter: WireAdapterConstructor) => void;
|
|
20
21
|
getGetObjectInfosAdapter: () => WireAdapterConstructor | undefined;
|
|
22
|
+
setGraphQLWireAdapter: (adapter: WireAdapterConstructor) => void;
|
|
23
|
+
getGraphQLWireAdapter: () => WireAdapterConstructor | undefined;
|
|
24
|
+
setGraphQLImperativeQueryAdapter: (adapter: WireAdapterConstructor) => void;
|
|
25
|
+
getGraphQLImperativeQueryAdapter: () => WireAdapterConstructor | undefined;
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
@@ -25,7 +30,7 @@ export declare const configurationForOneStoreEnabledAdapters: {
|
|
|
25
30
|
* @param oneStoreAdapter - The one store bound adapter.
|
|
26
31
|
* @returns Luvio or one store wire adapter constructor.
|
|
27
32
|
*/
|
|
28
|
-
export declare function getLuvioOrOneStoreAdapter(luvioAdapter: WireAdapterConstructor, oneStoreAdapter: WireAdapterConstructor | undefined): WireAdapterConstructor
|
|
33
|
+
export declare function getLuvioOrOneStoreAdapter(luvioAdapter: WireAdapterConstructor | ImperativeAdapter<any, any> | GraphQLImperativeAdapter<any>, oneStoreAdapter: WireAdapterConstructor | ImperativeAdapter<any, any> | GraphQLImperativeAdapter<any> | undefined): WireAdapterConstructor | ImperativeAdapter<any, any> | GraphQLImperativeAdapter<any>;
|
|
29
34
|
import type { ResourceIngest } from '@luvio/engine';
|
|
30
35
|
export declare const configurationForEnvironmentFactoryOverrides: {
|
|
31
36
|
getKeywordSearchResultsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./generated/adapters/getKeywordSearchResults").GetKeywordSearchResultsConfig, import("./generated/types/KeywordSearchResultsSummaryRepresentation").KeywordSearchResultsSummaryRepresentation> | undefined;
|
|
@@ -50,10 +55,10 @@ export declare const configurationForEnvironmentFactoryOverrides: {
|
|
|
50
55
|
setGetRecordAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRecordConfig, import("./main").RecordRepresentation>) => void;
|
|
51
56
|
getRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRecordsConfig, import("./main").BatchRepresentation> | undefined;
|
|
52
57
|
setGetRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRecordsConfig, import("./main").BatchRepresentation>) => void;
|
|
53
|
-
getRelatedListRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./
|
|
54
|
-
setGetRelatedListRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./
|
|
55
|
-
getRelatedListRecordsBatchAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./
|
|
56
|
-
setGetRelatedListRecordsBatchAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./
|
|
58
|
+
getRelatedListRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsConfig, import("./main").RelatedListRecordCollectionRepresentation> | undefined;
|
|
59
|
+
setGetRelatedListRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsConfig, import("./main").RelatedListRecordCollectionRepresentation>) => void;
|
|
60
|
+
getRelatedListRecordsBatchAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsBatchConfig, import("./main").RelatedListRecordCollectionBatchRepresentation> | undefined;
|
|
61
|
+
setGetRelatedListRecordsBatchAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsBatchConfig, import("./main").RelatedListRecordCollectionBatchRepresentation>) => void;
|
|
57
62
|
getSearchResultsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./generated/adapters/getSearchResults").GetSearchResultsConfig, import("./generated/types/SearchResultsSummaryRepresentation").SearchResultsSummaryRepresentation> | undefined;
|
|
58
63
|
setGetSearchResultsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./generated/adapters/getSearchResults").GetSearchResultsConfig, import("./generated/types/SearchResultsSummaryRepresentation").SearchResultsSummaryRepresentation>) => void;
|
|
59
64
|
};
|
|
@@ -84,16 +89,20 @@ export declare const configurationForRestAdapters: {
|
|
|
84
89
|
setGetRecordAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRecordConfig, import("./main").RecordRepresentation>) => void;
|
|
85
90
|
getRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRecordsConfig, import("./main").BatchRepresentation> | undefined;
|
|
86
91
|
setGetRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRecordsConfig, import("./main").BatchRepresentation>) => void;
|
|
87
|
-
getRelatedListRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./
|
|
88
|
-
setGetRelatedListRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./
|
|
89
|
-
getRelatedListRecordsBatchAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./
|
|
90
|
-
setGetRelatedListRecordsBatchAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./
|
|
92
|
+
getRelatedListRecordsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsConfig, import("./main").RelatedListRecordCollectionRepresentation> | undefined;
|
|
93
|
+
setGetRelatedListRecordsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsConfig, import("./main").RelatedListRecordCollectionRepresentation>) => void;
|
|
94
|
+
getRelatedListRecordsBatchAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsBatchConfig, import("./main").RelatedListRecordCollectionBatchRepresentation> | undefined;
|
|
95
|
+
setGetRelatedListRecordsBatchAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./main").GetRelatedListRecordsBatchConfig, import("./main").RelatedListRecordCollectionBatchRepresentation>) => void;
|
|
91
96
|
getSearchResultsAdapterFactory: () => import("@luvio/engine").AdapterFactory<import("./generated/adapters/getSearchResults").GetSearchResultsConfig, import("./generated/types/SearchResultsSummaryRepresentation").SearchResultsSummaryRepresentation> | undefined;
|
|
92
97
|
setGetSearchResultsAdapterFactory: (value: import("@luvio/engine").AdapterFactory<import("./generated/adapters/getSearchResults").GetSearchResultsConfig, import("./generated/types/SearchResultsSummaryRepresentation").SearchResultsSummaryRepresentation>) => void;
|
|
93
98
|
setGetObjectInfoAdapter: (adapter: WireAdapterConstructor) => void;
|
|
94
99
|
getGetObjectInfoAdapter: () => WireAdapterConstructor | undefined;
|
|
95
100
|
setGetObjectInfosAdapter: (adapter: WireAdapterConstructor) => void;
|
|
96
101
|
getGetObjectInfosAdapter: () => WireAdapterConstructor | undefined;
|
|
102
|
+
setGraphQLWireAdapter: (adapter: WireAdapterConstructor) => void;
|
|
103
|
+
getGraphQLWireAdapter: () => WireAdapterConstructor | undefined;
|
|
104
|
+
setGraphQLImperativeQueryAdapter: (adapter: WireAdapterConstructor) => void;
|
|
105
|
+
getGraphQLImperativeQueryAdapter: () => WireAdapterConstructor | undefined;
|
|
97
106
|
setTrackedFieldDepthOnCacheMiss: (trackedFieldDepthOnCacheMissParam: number) => void;
|
|
98
107
|
getTrackedFieldDepthOnCacheMiss: () => number;
|
|
99
108
|
setTrackedFieldDepthOnCacheMergeConflict: (trackedFieldDepthOnCacheMergeConflictParam: number) => void;
|
|
@@ -95,6 +95,10 @@ export declare const configuration: {
|
|
|
95
95
|
getGetObjectInfoAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
96
96
|
setGetObjectInfosAdapter: (adapter: import("@lwc/engine-core").WireAdapterConstructor) => void;
|
|
97
97
|
getGetObjectInfosAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
98
|
+
setGraphQLWireAdapter: (adapter: import("@lwc/engine-core").WireAdapterConstructor) => void;
|
|
99
|
+
getGraphQLWireAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
100
|
+
setGraphQLImperativeQueryAdapter: (adapter: import("@lwc/engine-core").WireAdapterConstructor) => void;
|
|
101
|
+
getGraphQLImperativeQueryAdapter: () => import("@lwc/engine-core").WireAdapterConstructor | undefined;
|
|
98
102
|
getDraftAwareGraphQLAdapter: () => import("./wire/graphql/configurationTypes").DraftAwareGraphQLAdapter | undefined;
|
|
99
103
|
setDraftAwareGraphQLAdapter: (value: import("./wire/graphql/configurationTypes").DraftAwareGraphQLAdapter) => void;
|
|
100
104
|
getEnvironmentAwareGraphQLBatchAdapter: () => import("./wire/graphqlBatch/configurationTypes").EnvironmentAwareGraphQLBatchAdapter | undefined;
|
|
@@ -158,7 +162,7 @@ export declare const configuration: {
|
|
|
158
162
|
};
|
|
159
163
|
export { Instrument, instrument } from './instrumentation';
|
|
160
164
|
export type { CachePolicy, CachePolicyCacheAndNetwork, CachePolicyCacheThenNetwork, CachePolicyNoCache, CachePolicyOnlyIfCached, CachePolicyStaleWhileRevalidate, CachePolicyValidAt, } from '@luvio/engine';
|
|
161
|
-
export { DataCallback, DataCallbackTuple, ImperativeAdapter } from '@salesforce/lds-bindings';
|
|
165
|
+
export { DataCallback, DataCallbackTuple, ImperativeAdapter, GraphQLImperativeAdapter, } from '@salesforce/lds-bindings';
|
|
162
166
|
export { default as getRecordId18 } from './primitives/RecordId18/coerce';
|
|
163
167
|
export { default as getRecordId18Array } from './primitives/RecordId18Array/coerce';
|
|
164
168
|
export { default as coerceFieldIdArray } from './primitives/FieldIdArray/coerce';
|
|
@@ -2,12 +2,11 @@ export * from './generated/artifacts/sfdc_graphqlAdapters';
|
|
|
2
2
|
import { configurationForGraphQLAdapters } from './configuration';
|
|
3
3
|
import type { ConfigurationForGraphQLAdapters } from './configuration';
|
|
4
4
|
import type { Instrument } from './instrumentation';
|
|
5
|
-
import { refresh } from '@salesforce/lds-bindings';
|
|
6
5
|
export type Registration = {
|
|
7
6
|
id: '@salesforce/lds-adapters-uiapi/graphql';
|
|
8
7
|
configuration: ConfigurationForGraphQLAdapters;
|
|
9
8
|
instrument: Instrument;
|
|
10
9
|
};
|
|
11
10
|
export { ConfigurationForGraphQLAdapters as Configuration, configurationForGraphQLAdapters as configuration, };
|
|
12
|
-
export
|
|
11
|
+
export declare function refreshGraphQL(data: any): any;
|
|
13
12
|
export { graphqlAdapterFactory } from './main';
|
|
@@ -66,6 +66,14 @@ let oneStoreGetObjectInfoAdapter = undefined;
|
|
|
66
66
|
* One store enabled Get Object Infos adapter
|
|
67
67
|
*/
|
|
68
68
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
69
|
+
/**
|
|
70
|
+
* One store enabled GraphQL adapter
|
|
71
|
+
*/
|
|
72
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
73
|
+
/**
|
|
74
|
+
* One store enabled GraphQL imperative query adapter
|
|
75
|
+
*/
|
|
76
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
69
77
|
/**
|
|
70
78
|
* Determines when to include PDL strategies for Related Lists
|
|
71
79
|
*/
|
|
@@ -92,6 +100,18 @@ const configurationForOneStoreEnabledAdapters = {
|
|
|
92
100
|
getGetObjectInfosAdapter: function () {
|
|
93
101
|
return oneStoreGetObjectInfosAdapter;
|
|
94
102
|
},
|
|
103
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
104
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
105
|
+
},
|
|
106
|
+
getGraphQLWireAdapter: function () {
|
|
107
|
+
return oneStoreGraphQLWireAdapter;
|
|
108
|
+
},
|
|
109
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
110
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
111
|
+
},
|
|
112
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
113
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
114
|
+
},
|
|
95
115
|
};
|
|
96
116
|
const getKeywordSearchResultsFactory = new Configurable();
|
|
97
117
|
const getListRecordsByNameFactory = new Configurable();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.370.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Wire adapters for record related UI API endpoints",
|
|
6
6
|
"main": "dist/es/es2018/uiapi-records-service.js",
|
|
@@ -68,13 +68,15 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@salesforce/lds-bindings": "^1.
|
|
72
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
71
|
+
"@salesforce/lds-bindings": "^1.370.0",
|
|
72
|
+
"@salesforce/lds-default-luvio": "^1.370.0",
|
|
73
|
+
"luvio-graphql-parser": "npm:@luvio/graphql-parser@0.158.7",
|
|
74
|
+
"onestore-graphql-parser": "npm:@luvio/graphql-parser@5.44.0"
|
|
73
75
|
},
|
|
74
76
|
"devDependencies": {
|
|
75
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
76
|
-
"@salesforce/lds-jest": "^1.
|
|
77
|
-
"@salesforce/lds-store-binary": "^1.
|
|
77
|
+
"@salesforce/lds-compiler-plugins": "^1.370.0",
|
|
78
|
+
"@salesforce/lds-jest": "^1.370.0",
|
|
79
|
+
"@salesforce/lds-store-binary": "^1.370.0"
|
|
78
80
|
},
|
|
79
81
|
"luvioBundlesize": [
|
|
80
82
|
{
|
package/sfdc/graphqlAdapters.js
CHANGED
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { register, withDefaultLuvio } from 'force/ldsEngine';
|
|
16
16
|
import { print, visit, parse, astResolver } from 'force/ldsGraphqlParser';
|
|
17
|
-
import { createInstrumentedAdapter, createLDSAdapter, createGraphQLWireAdapterConstructor, createGraphQLImperativeAdapter } from 'force/ldsBindings';
|
|
18
|
-
export { refresh as refreshGraphQL } from 'force/ldsBindings';
|
|
17
|
+
import { createInstrumentedAdapter, createLDSAdapter, createGraphQLWireAdapterConstructor, createGraphQLImperativeAdapter, refresh } from 'force/ldsBindings';
|
|
19
18
|
import { serializeStructuredKey, resolveLink, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, StoreKeyMap, createResourceParams as createResourceParams$2, StoreKeySet } from 'force/luvioEngine';
|
|
20
19
|
import { getRequestedFieldsForType, buildFieldState, buildQueryTypeStringKey, serializeFieldArguments, deepMerge, getOperationFromDocument, createFragmentMap, applyMinimumFieldsToDocument } from 'force/luvioGraphql';
|
|
21
20
|
import { createIngestRecordWithFields } from 'force/ldsAdaptersUiapi';
|
|
@@ -160,6 +159,267 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
160
159
|
}
|
|
161
160
|
const keyPrefix = 'UiApi';
|
|
162
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
164
|
+
*/
|
|
165
|
+
// A holder for a configurable adapter override
|
|
166
|
+
class Configurable {
|
|
167
|
+
constructor() {
|
|
168
|
+
this.getAdapter = () => {
|
|
169
|
+
return this.adapter;
|
|
170
|
+
};
|
|
171
|
+
this.setAdapter = (value) => {
|
|
172
|
+
this.adapter = value;
|
|
173
|
+
};
|
|
174
|
+
this.adapter = undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Configurable adapters that can have environmental overrides
|
|
178
|
+
let configurableCreateRecordAdapter = new Configurable();
|
|
179
|
+
let configurableUpdateRecordAdapter = new Configurable();
|
|
180
|
+
let configurableDeleteRecordAdapter = new Configurable();
|
|
181
|
+
let configurablePerformQuickActionAdapter = new Configurable();
|
|
182
|
+
let configurablePerformUpdateRecordQuickActionAdapter = new Configurable();
|
|
183
|
+
let configurableCreateContentDocumentAndVersion = new Configurable();
|
|
184
|
+
let configurableCreateContentVersion = new Configurable();
|
|
185
|
+
/**
|
|
186
|
+
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
187
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
188
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
189
|
+
* @defaultValue '5', replicates the current behavior
|
|
190
|
+
*/
|
|
191
|
+
let trackedFieldDepthOnCacheMiss = 5;
|
|
192
|
+
/**
|
|
193
|
+
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
194
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
195
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
196
|
+
* @defaultValue '5', replicates the current behavior
|
|
197
|
+
*/
|
|
198
|
+
let trackedFieldDepthOnCacheMergeConflict = 5;
|
|
199
|
+
/**
|
|
200
|
+
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
201
|
+
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
202
|
+
* be reached by following 1 relationship from the root record, etc.
|
|
203
|
+
* @defaultValue '5', replicates the current behavior
|
|
204
|
+
*/
|
|
205
|
+
let trackedFieldDepthOnNotifyChange = 5;
|
|
206
|
+
/**
|
|
207
|
+
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
208
|
+
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
209
|
+
*/
|
|
210
|
+
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
211
|
+
/**
|
|
212
|
+
* One store enabled Get Object Info adapter
|
|
213
|
+
*/
|
|
214
|
+
let oneStoreGetObjectInfoAdapter = undefined;
|
|
215
|
+
/**
|
|
216
|
+
* One store enabled Get Object Infos adapter
|
|
217
|
+
*/
|
|
218
|
+
let oneStoreGetObjectInfosAdapter = undefined;
|
|
219
|
+
/**
|
|
220
|
+
* One store enabled GraphQL adapter
|
|
221
|
+
*/
|
|
222
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
223
|
+
/**
|
|
224
|
+
* One store enabled GraphQL imperative query adapter
|
|
225
|
+
*/
|
|
226
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
227
|
+
/**
|
|
228
|
+
* Determines when to include PDL strategies for Related Lists
|
|
229
|
+
*/
|
|
230
|
+
let relatedListsPredictionsEnabled = false;
|
|
231
|
+
/**
|
|
232
|
+
* Determines whether to include additional PDL strategies for Related Lists
|
|
233
|
+
*/
|
|
234
|
+
let relatedListsPlusPredictionsEnabled = false;
|
|
235
|
+
let recordRepresentationIngestionOverride = undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
238
|
+
* Configuration for one store enabled REST adapters only.
|
|
239
|
+
*/
|
|
240
|
+
const configurationForOneStoreEnabledAdapters = {
|
|
241
|
+
setGetObjectInfoAdapter: function (adapter) {
|
|
242
|
+
oneStoreGetObjectInfoAdapter = adapter;
|
|
243
|
+
},
|
|
244
|
+
getGetObjectInfoAdapter: function () {
|
|
245
|
+
return oneStoreGetObjectInfoAdapter;
|
|
246
|
+
},
|
|
247
|
+
setGetObjectInfosAdapter: function (adapter) {
|
|
248
|
+
oneStoreGetObjectInfosAdapter = adapter;
|
|
249
|
+
},
|
|
250
|
+
getGetObjectInfosAdapter: function () {
|
|
251
|
+
return oneStoreGetObjectInfosAdapter;
|
|
252
|
+
},
|
|
253
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
254
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
255
|
+
},
|
|
256
|
+
getGraphQLWireAdapter: function () {
|
|
257
|
+
return oneStoreGraphQLWireAdapter;
|
|
258
|
+
},
|
|
259
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
260
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
261
|
+
},
|
|
262
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
263
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
268
|
+
* @param luvioAdapter - The luvio bound adapter.
|
|
269
|
+
* @param oneStoreAdapter - The one store bound adapter.
|
|
270
|
+
* @returns Luvio or one store wire adapter constructor.
|
|
271
|
+
*/
|
|
272
|
+
function getLuvioOrOneStoreAdapter(luvioAdapter, oneStoreAdapter) {
|
|
273
|
+
return oneStoreAdapter ?? luvioAdapter;
|
|
274
|
+
}
|
|
275
|
+
const getKeywordSearchResultsFactory = new Configurable();
|
|
276
|
+
const getListRecordsByNameFactory = new Configurable();
|
|
277
|
+
const getListUiFactory = new Configurable();
|
|
278
|
+
const getLookupRecordsFactory = new Configurable();
|
|
279
|
+
const getQuickActionDefaultsFactory = new Configurable();
|
|
280
|
+
const getRecordCreateDefaultsFactory = new Configurable();
|
|
281
|
+
const getRecordTemplateCloneFactory = new Configurable();
|
|
282
|
+
const getRecordTemplateCreateFactory = new Configurable();
|
|
283
|
+
const getRecordUiFactory = new Configurable();
|
|
284
|
+
const getRecordFactory = new Configurable();
|
|
285
|
+
const getRecordsFactory = new Configurable();
|
|
286
|
+
const getRelatedListRecordsFactory = new Configurable();
|
|
287
|
+
const getRelatedListRecordsBatchFactory = new Configurable();
|
|
288
|
+
const getSearchResultsFactory = new Configurable();
|
|
289
|
+
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
290
|
+
// so they need to support having a custom factory provided by the mobile environment.
|
|
291
|
+
const configurationForEnvironmentFactoryOverrides = {
|
|
292
|
+
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.getAdapter,
|
|
293
|
+
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.setAdapter,
|
|
294
|
+
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory.getAdapter,
|
|
295
|
+
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory.setAdapter,
|
|
296
|
+
getListUiAdapterFactory: getListUiFactory.getAdapter,
|
|
297
|
+
setGetListUiAdapterFactory: getListUiFactory.setAdapter,
|
|
298
|
+
getLookupRecordsAdapterFactory: getLookupRecordsFactory.getAdapter,
|
|
299
|
+
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory.setAdapter,
|
|
300
|
+
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.getAdapter,
|
|
301
|
+
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.setAdapter,
|
|
302
|
+
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.getAdapter,
|
|
303
|
+
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.setAdapter,
|
|
304
|
+
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.getAdapter,
|
|
305
|
+
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.setAdapter,
|
|
306
|
+
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.getAdapter,
|
|
307
|
+
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.setAdapter,
|
|
308
|
+
getRecordUiAdapterFactory: getRecordUiFactory.getAdapter,
|
|
309
|
+
setGetRecordUiAdapterFactory: getRecordUiFactory.setAdapter,
|
|
310
|
+
getRecordAdapterFactory: getRecordFactory.getAdapter,
|
|
311
|
+
setGetRecordAdapterFactory: getRecordFactory.setAdapter,
|
|
312
|
+
getRecordsAdapterFactory: getRecordsFactory.getAdapter,
|
|
313
|
+
setGetRecordsAdapterFactory: getRecordsFactory.setAdapter,
|
|
314
|
+
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.getAdapter,
|
|
315
|
+
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.setAdapter,
|
|
316
|
+
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.getAdapter,
|
|
317
|
+
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.setAdapter,
|
|
318
|
+
getSearchResultsAdapterFactory: getSearchResultsFactory.getAdapter,
|
|
319
|
+
setGetSearchResultsAdapterFactory: getSearchResultsFactory.setAdapter,
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
323
|
+
* Configuration for REST adapters only.
|
|
324
|
+
*/
|
|
325
|
+
const configurationForRestAdapters = {
|
|
326
|
+
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
327
|
+
trackedFieldDepthOnCacheMiss = trackedFieldDepthOnCacheMissParam;
|
|
328
|
+
},
|
|
329
|
+
getTrackedFieldDepthOnCacheMiss: function () {
|
|
330
|
+
return trackedFieldDepthOnCacheMiss;
|
|
331
|
+
},
|
|
332
|
+
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
333
|
+
trackedFieldDepthOnCacheMergeConflict = trackedFieldDepthOnCacheMergeConflictParam;
|
|
334
|
+
},
|
|
335
|
+
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
336
|
+
return trackedFieldDepthOnCacheMergeConflict;
|
|
337
|
+
},
|
|
338
|
+
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
339
|
+
trackedFieldDepthOnNotifyChange = trackedFieldDepthOnNotifyChangeParam;
|
|
340
|
+
},
|
|
341
|
+
getTrackedFieldDepthOnNotifyChange: function () {
|
|
342
|
+
return trackedFieldDepthOnNotifyChange;
|
|
343
|
+
},
|
|
344
|
+
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
345
|
+
trackedFieldLeafNodeIdAndNameOnly = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
346
|
+
},
|
|
347
|
+
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
348
|
+
return trackedFieldLeafNodeIdAndNameOnly;
|
|
349
|
+
},
|
|
350
|
+
setRelatedListsPredictionsEnabled: function (f) {
|
|
351
|
+
relatedListsPredictionsEnabled = f;
|
|
352
|
+
},
|
|
353
|
+
areRelatedListsPredictionsEnabled: function () {
|
|
354
|
+
return relatedListsPredictionsEnabled === true;
|
|
355
|
+
},
|
|
356
|
+
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
357
|
+
relatedListsPlusPredictionsEnabled = f;
|
|
358
|
+
},
|
|
359
|
+
areRelatedListsPlusPredictionsEnabled: function () {
|
|
360
|
+
return relatedListsPlusPredictionsEnabled === true;
|
|
361
|
+
},
|
|
362
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
363
|
+
recordRepresentationIngestionOverride = ingest;
|
|
364
|
+
},
|
|
365
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
366
|
+
return recordRepresentationIngestionOverride;
|
|
367
|
+
},
|
|
368
|
+
// createRecord
|
|
369
|
+
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.getAdapter,
|
|
370
|
+
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.setAdapter,
|
|
371
|
+
// updateRecord
|
|
372
|
+
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.getAdapter,
|
|
373
|
+
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.setAdapter,
|
|
374
|
+
// deleteRecord
|
|
375
|
+
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.getAdapter,
|
|
376
|
+
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.setAdapter,
|
|
377
|
+
// performQuickAction
|
|
378
|
+
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.getAdapter,
|
|
379
|
+
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.setAdapter,
|
|
380
|
+
// performRecordUpdateQuickAction
|
|
381
|
+
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.getAdapter,
|
|
382
|
+
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.setAdapter,
|
|
383
|
+
// createContentDocumentAndVersion
|
|
384
|
+
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.getAdapter,
|
|
385
|
+
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.setAdapter,
|
|
386
|
+
// createContentVersion
|
|
387
|
+
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.getAdapter,
|
|
388
|
+
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.setAdapter,
|
|
389
|
+
...configurationForOneStoreEnabledAdapters,
|
|
390
|
+
...configurationForEnvironmentFactoryOverrides,
|
|
391
|
+
};
|
|
392
|
+
let configurableGraphQLAdapter = new Configurable();
|
|
393
|
+
let configurableGraphQLBatchAdapter = new Configurable();
|
|
394
|
+
/**
|
|
395
|
+
* Defines the configuration API and is exposed internally as well as externally.
|
|
396
|
+
* Configuration for GraphQL adapters only.
|
|
397
|
+
*/
|
|
398
|
+
const configurationForGraphQLAdapters = {
|
|
399
|
+
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter.getAdapter,
|
|
400
|
+
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter.setAdapter,
|
|
401
|
+
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.getAdapter,
|
|
402
|
+
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.setAdapter,
|
|
403
|
+
};
|
|
404
|
+
const registrations = new Set();
|
|
405
|
+
/**
|
|
406
|
+
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
407
|
+
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
408
|
+
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
409
|
+
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
410
|
+
* take care of registration) but we don't want to double register either.
|
|
411
|
+
*
|
|
412
|
+
* So we make this function that memoizes if it's been called before and only
|
|
413
|
+
* actually registers once.
|
|
414
|
+
*/
|
|
415
|
+
function ensureRegisteredOnce(registration) {
|
|
416
|
+
const { id } = registration;
|
|
417
|
+
if (!registrations.has(id)) {
|
|
418
|
+
register(registration);
|
|
419
|
+
registrations.add(id);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
163
423
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
164
424
|
function equalsObject(a, b, equalsProp) {
|
|
165
425
|
const aKeys = ObjectKeys(a).sort();
|
|
@@ -24505,238 +24765,6 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
24505
24765
|
return cacheSnapshot;
|
|
24506
24766
|
}
|
|
24507
24767
|
|
|
24508
|
-
/**
|
|
24509
|
-
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
24510
|
-
*/
|
|
24511
|
-
// A holder for a configurable adapter override
|
|
24512
|
-
class Configurable {
|
|
24513
|
-
constructor() {
|
|
24514
|
-
this.getAdapter = () => {
|
|
24515
|
-
return this.adapter;
|
|
24516
|
-
};
|
|
24517
|
-
this.setAdapter = (value) => {
|
|
24518
|
-
this.adapter = value;
|
|
24519
|
-
};
|
|
24520
|
-
this.adapter = undefined;
|
|
24521
|
-
}
|
|
24522
|
-
}
|
|
24523
|
-
// Configurable adapters that can have environmental overrides
|
|
24524
|
-
let configurableCreateRecordAdapter = new Configurable();
|
|
24525
|
-
let configurableUpdateRecordAdapter = new Configurable();
|
|
24526
|
-
let configurableDeleteRecordAdapter = new Configurable();
|
|
24527
|
-
let configurablePerformQuickActionAdapter = new Configurable();
|
|
24528
|
-
let configurablePerformUpdateRecordQuickActionAdapter = new Configurable();
|
|
24529
|
-
let configurableCreateContentDocumentAndVersion = new Configurable();
|
|
24530
|
-
let configurableCreateContentVersion = new Configurable();
|
|
24531
|
-
/**
|
|
24532
|
-
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
24533
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
24534
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
24535
|
-
* @defaultValue '5', replicates the current behavior
|
|
24536
|
-
*/
|
|
24537
|
-
let trackedFieldDepthOnCacheMiss = 5;
|
|
24538
|
-
/**
|
|
24539
|
-
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
24540
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
24541
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
24542
|
-
* @defaultValue '5', replicates the current behavior
|
|
24543
|
-
*/
|
|
24544
|
-
let trackedFieldDepthOnCacheMergeConflict = 5;
|
|
24545
|
-
/**
|
|
24546
|
-
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
24547
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
24548
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
24549
|
-
* @defaultValue '5', replicates the current behavior
|
|
24550
|
-
*/
|
|
24551
|
-
let trackedFieldDepthOnNotifyChange = 5;
|
|
24552
|
-
/**
|
|
24553
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
24554
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
24555
|
-
*/
|
|
24556
|
-
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
24557
|
-
/**
|
|
24558
|
-
* One store enabled Get Object Info adapter
|
|
24559
|
-
*/
|
|
24560
|
-
let oneStoreGetObjectInfoAdapter = undefined;
|
|
24561
|
-
/**
|
|
24562
|
-
* One store enabled Get Object Infos adapter
|
|
24563
|
-
*/
|
|
24564
|
-
let oneStoreGetObjectInfosAdapter = undefined;
|
|
24565
|
-
/**
|
|
24566
|
-
* Determines when to include PDL strategies for Related Lists
|
|
24567
|
-
*/
|
|
24568
|
-
let relatedListsPredictionsEnabled = false;
|
|
24569
|
-
/**
|
|
24570
|
-
* Determines whether to include additional PDL strategies for Related Lists
|
|
24571
|
-
*/
|
|
24572
|
-
let relatedListsPlusPredictionsEnabled = false;
|
|
24573
|
-
let recordRepresentationIngestionOverride = undefined;
|
|
24574
|
-
/**
|
|
24575
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
24576
|
-
* Configuration for one store enabled REST adapters only.
|
|
24577
|
-
*/
|
|
24578
|
-
const configurationForOneStoreEnabledAdapters = {
|
|
24579
|
-
setGetObjectInfoAdapter: function (adapter) {
|
|
24580
|
-
oneStoreGetObjectInfoAdapter = adapter;
|
|
24581
|
-
},
|
|
24582
|
-
getGetObjectInfoAdapter: function () {
|
|
24583
|
-
return oneStoreGetObjectInfoAdapter;
|
|
24584
|
-
},
|
|
24585
|
-
setGetObjectInfosAdapter: function (adapter) {
|
|
24586
|
-
oneStoreGetObjectInfosAdapter = adapter;
|
|
24587
|
-
},
|
|
24588
|
-
getGetObjectInfosAdapter: function () {
|
|
24589
|
-
return oneStoreGetObjectInfosAdapter;
|
|
24590
|
-
},
|
|
24591
|
-
};
|
|
24592
|
-
const getKeywordSearchResultsFactory = new Configurable();
|
|
24593
|
-
const getListRecordsByNameFactory = new Configurable();
|
|
24594
|
-
const getListUiFactory = new Configurable();
|
|
24595
|
-
const getLookupRecordsFactory = new Configurable();
|
|
24596
|
-
const getQuickActionDefaultsFactory = new Configurable();
|
|
24597
|
-
const getRecordCreateDefaultsFactory = new Configurable();
|
|
24598
|
-
const getRecordTemplateCloneFactory = new Configurable();
|
|
24599
|
-
const getRecordTemplateCreateFactory = new Configurable();
|
|
24600
|
-
const getRecordUiFactory = new Configurable();
|
|
24601
|
-
const getRecordFactory = new Configurable();
|
|
24602
|
-
const getRecordsFactory = new Configurable();
|
|
24603
|
-
const getRelatedListRecordsFactory = new Configurable();
|
|
24604
|
-
const getRelatedListRecordsBatchFactory = new Configurable();
|
|
24605
|
-
const getSearchResultsFactory = new Configurable();
|
|
24606
|
-
// The following set of adapters all touch RecordRepresentation directly or indirectly,
|
|
24607
|
-
// so they need to support having a custom factory provided by the mobile environment.
|
|
24608
|
-
const configurationForEnvironmentFactoryOverrides = {
|
|
24609
|
-
getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.getAdapter,
|
|
24610
|
-
setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.setAdapter,
|
|
24611
|
-
getListRecordsByNameAdapterFactory: getListRecordsByNameFactory.getAdapter,
|
|
24612
|
-
setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory.setAdapter,
|
|
24613
|
-
getListUiAdapterFactory: getListUiFactory.getAdapter,
|
|
24614
|
-
setGetListUiAdapterFactory: getListUiFactory.setAdapter,
|
|
24615
|
-
getLookupRecordsAdapterFactory: getLookupRecordsFactory.getAdapter,
|
|
24616
|
-
setGetLookupRecordsAdapterFactory: getLookupRecordsFactory.setAdapter,
|
|
24617
|
-
getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.getAdapter,
|
|
24618
|
-
setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.setAdapter,
|
|
24619
|
-
getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.getAdapter,
|
|
24620
|
-
setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.setAdapter,
|
|
24621
|
-
getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.getAdapter,
|
|
24622
|
-
setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.setAdapter,
|
|
24623
|
-
getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.getAdapter,
|
|
24624
|
-
setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.setAdapter,
|
|
24625
|
-
getRecordUiAdapterFactory: getRecordUiFactory.getAdapter,
|
|
24626
|
-
setGetRecordUiAdapterFactory: getRecordUiFactory.setAdapter,
|
|
24627
|
-
getRecordAdapterFactory: getRecordFactory.getAdapter,
|
|
24628
|
-
setGetRecordAdapterFactory: getRecordFactory.setAdapter,
|
|
24629
|
-
getRecordsAdapterFactory: getRecordsFactory.getAdapter,
|
|
24630
|
-
setGetRecordsAdapterFactory: getRecordsFactory.setAdapter,
|
|
24631
|
-
getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.getAdapter,
|
|
24632
|
-
setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.setAdapter,
|
|
24633
|
-
getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.getAdapter,
|
|
24634
|
-
setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.setAdapter,
|
|
24635
|
-
getSearchResultsAdapterFactory: getSearchResultsFactory.getAdapter,
|
|
24636
|
-
setGetSearchResultsAdapterFactory: getSearchResultsFactory.setAdapter,
|
|
24637
|
-
};
|
|
24638
|
-
/**
|
|
24639
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
24640
|
-
* Configuration for REST adapters only.
|
|
24641
|
-
*/
|
|
24642
|
-
const configurationForRestAdapters = {
|
|
24643
|
-
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
24644
|
-
trackedFieldDepthOnCacheMiss = trackedFieldDepthOnCacheMissParam;
|
|
24645
|
-
},
|
|
24646
|
-
getTrackedFieldDepthOnCacheMiss: function () {
|
|
24647
|
-
return trackedFieldDepthOnCacheMiss;
|
|
24648
|
-
},
|
|
24649
|
-
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
24650
|
-
trackedFieldDepthOnCacheMergeConflict = trackedFieldDepthOnCacheMergeConflictParam;
|
|
24651
|
-
},
|
|
24652
|
-
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
24653
|
-
return trackedFieldDepthOnCacheMergeConflict;
|
|
24654
|
-
},
|
|
24655
|
-
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
24656
|
-
trackedFieldDepthOnNotifyChange = trackedFieldDepthOnNotifyChangeParam;
|
|
24657
|
-
},
|
|
24658
|
-
getTrackedFieldDepthOnNotifyChange: function () {
|
|
24659
|
-
return trackedFieldDepthOnNotifyChange;
|
|
24660
|
-
},
|
|
24661
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
24662
|
-
trackedFieldLeafNodeIdAndNameOnly = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
24663
|
-
},
|
|
24664
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
24665
|
-
return trackedFieldLeafNodeIdAndNameOnly;
|
|
24666
|
-
},
|
|
24667
|
-
setRelatedListsPredictionsEnabled: function (f) {
|
|
24668
|
-
relatedListsPredictionsEnabled = f;
|
|
24669
|
-
},
|
|
24670
|
-
areRelatedListsPredictionsEnabled: function () {
|
|
24671
|
-
return relatedListsPredictionsEnabled === true;
|
|
24672
|
-
},
|
|
24673
|
-
setRelatedListsPlusPredictionsEnabled: function (f) {
|
|
24674
|
-
relatedListsPlusPredictionsEnabled = f;
|
|
24675
|
-
},
|
|
24676
|
-
areRelatedListsPlusPredictionsEnabled: function () {
|
|
24677
|
-
return relatedListsPlusPredictionsEnabled === true;
|
|
24678
|
-
},
|
|
24679
|
-
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
24680
|
-
recordRepresentationIngestionOverride = ingest;
|
|
24681
|
-
},
|
|
24682
|
-
getRecordRepresentationIngestionOverride: function () {
|
|
24683
|
-
return recordRepresentationIngestionOverride;
|
|
24684
|
-
},
|
|
24685
|
-
// createRecord
|
|
24686
|
-
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.getAdapter,
|
|
24687
|
-
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.setAdapter,
|
|
24688
|
-
// updateRecord
|
|
24689
|
-
getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.getAdapter,
|
|
24690
|
-
setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.setAdapter,
|
|
24691
|
-
// deleteRecord
|
|
24692
|
-
getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.getAdapter,
|
|
24693
|
-
setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.setAdapter,
|
|
24694
|
-
// performQuickAction
|
|
24695
|
-
getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.getAdapter,
|
|
24696
|
-
setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.setAdapter,
|
|
24697
|
-
// performRecordUpdateQuickAction
|
|
24698
|
-
getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.getAdapter,
|
|
24699
|
-
setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.setAdapter,
|
|
24700
|
-
// createContentDocumentAndVersion
|
|
24701
|
-
getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.getAdapter,
|
|
24702
|
-
setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.setAdapter,
|
|
24703
|
-
// createContentVersion
|
|
24704
|
-
getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.getAdapter,
|
|
24705
|
-
setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.setAdapter,
|
|
24706
|
-
...configurationForOneStoreEnabledAdapters,
|
|
24707
|
-
...configurationForEnvironmentFactoryOverrides,
|
|
24708
|
-
};
|
|
24709
|
-
let configurableGraphQLAdapter = new Configurable();
|
|
24710
|
-
let configurableGraphQLBatchAdapter = new Configurable();
|
|
24711
|
-
/**
|
|
24712
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
24713
|
-
* Configuration for GraphQL adapters only.
|
|
24714
|
-
*/
|
|
24715
|
-
const configurationForGraphQLAdapters = {
|
|
24716
|
-
getDraftAwareGraphQLAdapter: configurableGraphQLAdapter.getAdapter,
|
|
24717
|
-
setDraftAwareGraphQLAdapter: configurableGraphQLAdapter.setAdapter,
|
|
24718
|
-
getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.getAdapter,
|
|
24719
|
-
setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.setAdapter,
|
|
24720
|
-
};
|
|
24721
|
-
const registrations = new Set();
|
|
24722
|
-
/**
|
|
24723
|
-
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
24724
|
-
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
24725
|
-
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
24726
|
-
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
24727
|
-
* take care of registration) but we don't want to double register either.
|
|
24728
|
-
*
|
|
24729
|
-
* So we make this function that memoizes if it's been called before and only
|
|
24730
|
-
* actually registers once.
|
|
24731
|
-
*/
|
|
24732
|
-
function ensureRegisteredOnce(registration) {
|
|
24733
|
-
const { id } = registration;
|
|
24734
|
-
if (!registrations.has(id)) {
|
|
24735
|
-
register(registration);
|
|
24736
|
-
registrations.add(id);
|
|
24737
|
-
}
|
|
24738
|
-
}
|
|
24739
|
-
|
|
24740
24768
|
function validateAdapterConfig$1(untrustedConfig, _configPropertyNames) {
|
|
24741
24769
|
if (untrustedConfig !== null && typeof untrustedConfig === 'object') {
|
|
24742
24770
|
const operationNameIsDefinedAsUndefined = ObjectPrototypeHasOwnProperty.call(untrustedConfig, 'operationName') &&
|
|
@@ -25224,11 +25252,11 @@ function bindExportsTo(luvio) {
|
|
|
25224
25252
|
const graphqlBatch_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'graphqlBatch', factory), graphqlBatchMetadata);
|
|
25225
25253
|
return {
|
|
25226
25254
|
// Wire Adapters
|
|
25227
|
-
graphql: createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
25228
25255
|
graphqlBatch: createGraphQLWireAdapterConstructor(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
25229
25256
|
// One Store Enabled Adapters
|
|
25257
|
+
graphql: getLuvioOrOneStoreAdapter(createGraphQLWireAdapterConstructor(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters.getGraphQLWireAdapter()),
|
|
25258
|
+
graphql_imperative: getLuvioOrOneStoreAdapter(createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver), configurationForOneStoreEnabledAdapters.getGraphQLImperativeQueryAdapter()),
|
|
25230
25259
|
// Imperative Adapters
|
|
25231
|
-
graphql_imperative: createGraphQLImperativeAdapter(luvio, graphql_ldsAdapter, graphqlMetadata, astResolver),
|
|
25232
25260
|
graphqlBatch_imperative: createGraphQLImperativeAdapter(luvio, graphqlBatch_ldsAdapter, graphqlBatchMetadata, astResolver),
|
|
25233
25261
|
};
|
|
25234
25262
|
}
|
|
@@ -25749,6 +25777,13 @@ register({
|
|
|
25749
25777
|
configuration: { ...configurationForGraphQLAdapters },
|
|
25750
25778
|
instrument,
|
|
25751
25779
|
});
|
|
25780
|
+
function refreshGraphQL(data) {
|
|
25781
|
+
// If OneStore data, call its refresh instead
|
|
25782
|
+
if (typeof data.refresh === 'function') {
|
|
25783
|
+
return data.refresh();
|
|
25784
|
+
}
|
|
25785
|
+
return refresh(data, 'refreshUiApi');
|
|
25786
|
+
}
|
|
25752
25787
|
|
|
25753
|
-
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
|
|
25754
|
-
// version: 1.
|
|
25788
|
+
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative, refreshGraphQL };
|
|
25789
|
+
// version: 1.370.0-7c1df2520b
|
package/sfdc/index.js
CHANGED
|
@@ -114,6 +114,14 @@ let oneStoreGetObjectInfoAdapter = undefined;
|
|
|
114
114
|
* One store enabled Get Object Infos adapter
|
|
115
115
|
*/
|
|
116
116
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
117
|
+
/**
|
|
118
|
+
* One store enabled GraphQL adapter
|
|
119
|
+
*/
|
|
120
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
121
|
+
/**
|
|
122
|
+
* One store enabled GraphQL imperative query adapter
|
|
123
|
+
*/
|
|
124
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
117
125
|
/**
|
|
118
126
|
* Determines when to include PDL strategies for Related Lists
|
|
119
127
|
*/
|
|
@@ -140,6 +148,18 @@ const configurationForOneStoreEnabledAdapters = {
|
|
|
140
148
|
getGetObjectInfosAdapter: function () {
|
|
141
149
|
return oneStoreGetObjectInfosAdapter;
|
|
142
150
|
},
|
|
151
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
152
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
153
|
+
},
|
|
154
|
+
getGraphQLWireAdapter: function () {
|
|
155
|
+
return oneStoreGraphQLWireAdapter;
|
|
156
|
+
},
|
|
157
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
158
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
159
|
+
},
|
|
160
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
161
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
162
|
+
},
|
|
143
163
|
};
|
|
144
164
|
/**
|
|
145
165
|
* Helper function to return the one store adapter if it's defined, otherwise return the luvio adapter.
|
|
@@ -39030,4 +39050,4 @@ withDefaultLuvio((luvio) => {
|
|
|
39030
39050
|
});
|
|
39031
39051
|
|
|
39032
39052
|
export { API_NAMESPACE, InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$J as ObjectInfoDirectoryEntryRepresentationType, RepresentationType$O as ObjectInfoRepresentationType, RECORD_FIELDS_KEY_JUNCTION, RECORD_ID_PREFIX, RECORD_REPRESENTATION_NAME, RECORD_VIEW_ENTITY_ID_PREFIX, RECORD_VIEW_ENTITY_REPRESENTATION_NAME, RepresentationType$V as RecordRepresentationRepresentationType, TTL$z as RecordRepresentationTTL, RepresentationType$V as RecordRepresentationType, VERSION$1g as RecordRepresentationVersion, keyPrefix as UiApiNamespace, buildRecordRepKeyFromId, getFieldApiNamesArray as coerceFieldIdArray, getObjectApiName$1 as coerceObjectId, getObjectApiNamesArray as coerceObjectIdArray, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createLDSAdapterWithPrediction, createListInfo, createRecord, createRelatedListAdapterWithPrediction, createRelatedListPlusAdapterWithPrediction, deleteListInfo, deleteRecord, executeBatchRecordOperations, extractRecordIdFromStoreKey, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getFlexipageFormulaOverrides, getFlexipageFormulaOverrides_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByNameAdapterFactory, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListInfosByObjectName, getListInfosByObjectNameAdapterFactory, getListInfosByObjectName_imperative, getListObjectInfo, getListObjectInfoAdapterFactory, getListObjectInfo_imperative, getListPreferences, getListPreferences_imperative, getListRecordsByName, factory$a as getListRecordsByNameAdapterFactory, getListRecordsByName_imperative, getListUi, getListUi_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfoDirectoryAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPathLayout, getPathLayout_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionInfo, getQuickActionInfo_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActionsAdapterFactory, getRecordActions_imperative, factory$f as getRecordAdapterFactory, getRecordAvatars, getRecordAvatarsAdapterFactory, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordId18Array, getRecordIngestionOverride, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecordsAdapterFactory, getRecords_imperative, getRelatedListActions, getRelatedListActionsAdapterFactory, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoAdapterFactory, getRelatedListInfoBatch, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatch, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActionsAdapterFactory, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfoAdapterFactory, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$X as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$H as ingestObjectInfo, ingest$B as ingestQuickActionExecutionRepresentation, ingest$O as ingestRecord, instrument, isStoreKeyRecordViewEntity, isSupportedEntity, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$D as keyBuilderFromTypeRecordRepresentation, keyBuilder$1Y as keyBuilderObjectInfo, keyBuilder$1R as keyBuilderQuickActionExecutionRepresentation, keyBuilder$29 as keyBuilderRecord, notifyAllListInfoSummaryUpdateAvailable, notifyAllListRecordUpdateAvailable, notifyListInfoSummaryUpdateAvailable, notifyListInfoUpdateAvailable, notifyListRecordCollectionUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, registerPrefetcher, updateLayoutUserState, updateListInfoByName, updateListPreferences, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
39033
|
-
// version: 1.
|
|
39053
|
+
// version: 1.370.0-7c1df2520b
|
|
@@ -208,6 +208,14 @@ let oneStoreGetObjectInfoAdapter = undefined;
|
|
|
208
208
|
* One store enabled Get Object Infos adapter
|
|
209
209
|
*/
|
|
210
210
|
let oneStoreGetObjectInfosAdapter = undefined;
|
|
211
|
+
/**
|
|
212
|
+
* One store enabled GraphQL adapter
|
|
213
|
+
*/
|
|
214
|
+
let oneStoreGraphQLWireAdapter = undefined;
|
|
215
|
+
/**
|
|
216
|
+
* One store enabled GraphQL imperative query adapter
|
|
217
|
+
*/
|
|
218
|
+
let oneStoreGraphQLImperativeQueryAdapter = undefined;
|
|
211
219
|
/**
|
|
212
220
|
* Determines when to include PDL strategies for Related Lists
|
|
213
221
|
*/
|
|
@@ -234,6 +242,18 @@ const configurationForOneStoreEnabledAdapters = {
|
|
|
234
242
|
getGetObjectInfosAdapter: function () {
|
|
235
243
|
return oneStoreGetObjectInfosAdapter;
|
|
236
244
|
},
|
|
245
|
+
setGraphQLWireAdapter: function (adapter) {
|
|
246
|
+
oneStoreGraphQLWireAdapter = adapter;
|
|
247
|
+
},
|
|
248
|
+
getGraphQLWireAdapter: function () {
|
|
249
|
+
return oneStoreGraphQLWireAdapter;
|
|
250
|
+
},
|
|
251
|
+
setGraphQLImperativeQueryAdapter: function (adapter) {
|
|
252
|
+
oneStoreGraphQLImperativeQueryAdapter = adapter;
|
|
253
|
+
},
|
|
254
|
+
getGraphQLImperativeQueryAdapter: function () {
|
|
255
|
+
return oneStoreGraphQLImperativeQueryAdapter;
|
|
256
|
+
},
|
|
237
257
|
};
|
|
238
258
|
const getKeywordSearchResultsFactory = new Configurable();
|
|
239
259
|
const getListRecordsByNameFactory = new Configurable();
|