@salesforce/lds-worker-api 1.308.0-dev1 → 1.309.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.
|
@@ -1071,4 +1071,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1074
|
-
// version: 1.
|
|
1074
|
+
// version: 1.309.0-e7611a7fb5
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.
|
|
4268
|
+
// version: 1.309.0-e7611a7fb5
|
|
4269
4269
|
|
|
4270
4270
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4271
4271
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15764,7 +15764,7 @@ function gql(literals, ...subs) {
|
|
|
15764
15764
|
}
|
|
15765
15765
|
return superResult;
|
|
15766
15766
|
}
|
|
15767
|
-
// version: 1.
|
|
15767
|
+
// version: 1.309.0-e7611a7fb5
|
|
15768
15768
|
|
|
15769
15769
|
function unwrap(data) {
|
|
15770
15770
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16693,7 +16693,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16693
16693
|
const { apiFamily, name } = metadata;
|
|
16694
16694
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16695
16695
|
}
|
|
16696
|
-
// version: 1.
|
|
16696
|
+
// version: 1.309.0-e7611a7fb5
|
|
16697
16697
|
|
|
16698
16698
|
/**
|
|
16699
16699
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44798,7 +44798,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44798
44798
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44799
44799
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44800
44800
|
});
|
|
44801
|
-
// version: 1.
|
|
44801
|
+
// version: 1.309.0-3ac0e022f5
|
|
44802
44802
|
|
|
44803
44803
|
var ldsIdempotencyWriteDisabled = {
|
|
44804
44804
|
isOpen: function (e) {
|
|
@@ -50184,7 +50184,8 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
|
|
|
50184
50184
|
resourceRequestCopy.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
50185
50185
|
}
|
|
50186
50186
|
// enable return extra fields for record creation and record update http call
|
|
50187
|
-
if (resourceRequest.basePath === '
|
|
50187
|
+
if (typeof resourceRequest.basePath === 'string' &&
|
|
50188
|
+
resourceRequest.basePath.startsWith('/ui-api/records') &&
|
|
50188
50189
|
(resourceRequest.method === 'post' || resourceRequest.method === 'patch')) {
|
|
50189
50190
|
resourceRequestCopy.queryParams = resourceRequestCopy.queryParams || {};
|
|
50190
50191
|
resourceRequestCopy.queryParams['includeFieldsInBody'] = true;
|
|
@@ -51993,10 +51994,49 @@ const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
|
51993
51994
|
const { shift } = Array.prototype;
|
|
51994
51995
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
51995
51996
|
|
|
51997
|
+
/**
|
|
51998
|
+
* Retrieves a denormalized record from the store
|
|
51999
|
+
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
52000
|
+
* @param recordKey record key
|
|
52001
|
+
* @param durableStore the durable store
|
|
52002
|
+
* @returns a DraftRecordRepresentation containing the requested fields
|
|
52003
|
+
*/
|
|
52004
|
+
function getDenormalizedRecord(recordKey, durableStore) {
|
|
52005
|
+
return durableStore
|
|
52006
|
+
.getEntries([recordKey], DefaultDurableSegment)
|
|
52007
|
+
.then((entries) => {
|
|
52008
|
+
if (entries === undefined) {
|
|
52009
|
+
return undefined;
|
|
52010
|
+
}
|
|
52011
|
+
const denormalizedEntry = entries[recordKey];
|
|
52012
|
+
if (denormalizedEntry === undefined) {
|
|
52013
|
+
return undefined;
|
|
52014
|
+
}
|
|
52015
|
+
// don't include link information
|
|
52016
|
+
const denormalizedRecord = denormalizedEntry.data;
|
|
52017
|
+
if (isStoreRecordError(denormalizedRecord)) {
|
|
52018
|
+
return undefined;
|
|
52019
|
+
}
|
|
52020
|
+
return denormalizedRecord;
|
|
52021
|
+
});
|
|
52022
|
+
}
|
|
52023
|
+
function isStoreRecordError(storeRecord) {
|
|
52024
|
+
return storeRecord.__type === 'error';
|
|
52025
|
+
}
|
|
52026
|
+
function isDraftFieldPending(field) {
|
|
52027
|
+
return !!(field.__state && field.__state.pending === true);
|
|
52028
|
+
}
|
|
52029
|
+
function isDraftFieldMissing(field) {
|
|
52030
|
+
return !!(field.__state && field.__state.isMissing === true);
|
|
52031
|
+
}
|
|
52032
|
+
|
|
51996
52033
|
function isFieldLink(field) {
|
|
51997
52034
|
const { value } = field;
|
|
51998
52035
|
return value !== null && typeof value === 'object' && value.__ref !== undefined;
|
|
51999
52036
|
}
|
|
52037
|
+
function isPendingOrMissing(field) {
|
|
52038
|
+
return isDraftFieldMissing(field) || isDraftFieldPending(field);
|
|
52039
|
+
}
|
|
52000
52040
|
|
|
52001
52041
|
const RECORD_ENDPOINT_REGEX$1 = /^\/ui-api\/records\/?(([a-zA-Z0-9]+))?$/;
|
|
52002
52042
|
/**
|
|
@@ -52053,12 +52093,12 @@ function getRecordKeyForId(luvio, recordId) {
|
|
|
52053
52093
|
* @param record draft record representation
|
|
52054
52094
|
* @returns flattened record representation
|
|
52055
52095
|
*/
|
|
52056
|
-
function
|
|
52096
|
+
function filterOutReferenceNonScalarFields(record) {
|
|
52057
52097
|
const filteredFields = {};
|
|
52058
52098
|
const fieldNames = keys$5(record.fields);
|
|
52059
52099
|
for (const fieldName of fieldNames) {
|
|
52060
52100
|
const field = record.fields[fieldName];
|
|
52061
|
-
if (isFieldLink(field) === false) {
|
|
52101
|
+
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
52062
52102
|
filteredFields[fieldName] = field;
|
|
52063
52103
|
}
|
|
52064
52104
|
}
|
|
@@ -52072,42 +52112,6 @@ function filterOutReferenceFieldsAndLinks(record) {
|
|
|
52072
52112
|
return filteredRecords;
|
|
52073
52113
|
}
|
|
52074
52114
|
|
|
52075
|
-
/**
|
|
52076
|
-
* Retrieves a denormalized record from the store
|
|
52077
|
-
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
52078
|
-
* @param recordKey record key
|
|
52079
|
-
* @param durableStore the durable store
|
|
52080
|
-
* @returns a DraftRecordRepresentation containing the requested fields
|
|
52081
|
-
*/
|
|
52082
|
-
function getDenormalizedRecord(recordKey, durableStore) {
|
|
52083
|
-
return durableStore
|
|
52084
|
-
.getEntries([recordKey], DefaultDurableSegment)
|
|
52085
|
-
.then((entries) => {
|
|
52086
|
-
if (entries === undefined) {
|
|
52087
|
-
return undefined;
|
|
52088
|
-
}
|
|
52089
|
-
const denormalizedEntry = entries[recordKey];
|
|
52090
|
-
if (denormalizedEntry === undefined) {
|
|
52091
|
-
return undefined;
|
|
52092
|
-
}
|
|
52093
|
-
// don't include link information
|
|
52094
|
-
const denormalizedRecord = denormalizedEntry.data;
|
|
52095
|
-
if (isStoreRecordError(denormalizedRecord)) {
|
|
52096
|
-
return undefined;
|
|
52097
|
-
}
|
|
52098
|
-
return denormalizedRecord;
|
|
52099
|
-
});
|
|
52100
|
-
}
|
|
52101
|
-
function isStoreRecordError(storeRecord) {
|
|
52102
|
-
return storeRecord.__type === 'error';
|
|
52103
|
-
}
|
|
52104
|
-
function isDraftFieldPending(field) {
|
|
52105
|
-
return !!(field.__state && field.__state.pending === true);
|
|
52106
|
-
}
|
|
52107
|
-
function isDraftFieldMissing(field) {
|
|
52108
|
-
return !!(field.__state && field.__state.isMissing === true);
|
|
52109
|
-
}
|
|
52110
|
-
|
|
52111
52115
|
/**
|
|
52112
52116
|
* Checks if a resource request is a GET method on the record endpoint
|
|
52113
52117
|
* @param request the resource request
|
|
@@ -52184,7 +52188,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableStore }) {
|
|
|
52184
52188
|
}));
|
|
52185
52189
|
}
|
|
52186
52190
|
return Promise.reject(createBadRequestResponse({
|
|
52187
|
-
message: '
|
|
52191
|
+
message: 'Cannot fetch draft-created record from network',
|
|
52188
52192
|
}));
|
|
52189
52193
|
}
|
|
52190
52194
|
// a canonical mapping exists for the draft id passed in, we can create a new resource
|
|
@@ -53145,7 +53149,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
53145
53149
|
if (recordWithDrafts === undefined) {
|
|
53146
53150
|
return undefined;
|
|
53147
53151
|
}
|
|
53148
|
-
return
|
|
53152
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
53149
53153
|
}
|
|
53150
53154
|
const record = await getDenormalizedRecord(key, this.durableStore);
|
|
53151
53155
|
if (record === undefined) {
|
|
@@ -53156,7 +53160,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
53156
53160
|
if (recordWithDrafts === undefined) {
|
|
53157
53161
|
return recordWithDrafts;
|
|
53158
53162
|
}
|
|
53159
|
-
return
|
|
53163
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
53160
53164
|
}
|
|
53161
53165
|
applyDraftsToIncomingData(key, data, draftMetadata, publishData) {
|
|
53162
53166
|
if (draftMetadata === undefined) {
|
|
@@ -54052,9 +54056,9 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
54052
54056
|
return undefined;
|
|
54053
54057
|
}
|
|
54054
54058
|
// finally we resolve all references for each record
|
|
54055
|
-
const contentDocResolved = await
|
|
54056
|
-
const contentDocLinkResolved = await
|
|
54057
|
-
const contentVersionResolved = await
|
|
54059
|
+
const contentDocResolved = await filterOutReferenceNonScalarFields(contentDocRecord);
|
|
54060
|
+
const contentDocLinkResolved = await filterOutReferenceNonScalarFields(contentDocLink);
|
|
54061
|
+
const contentVersionResolved = await filterOutReferenceNonScalarFields(contentVersion);
|
|
54058
54062
|
return {
|
|
54059
54063
|
contentDocument: contentDocResolved,
|
|
54060
54064
|
contentDocumentLinks: [contentDocLinkResolved],
|
|
@@ -63926,7 +63930,7 @@ register$1({
|
|
|
63926
63930
|
id: '@salesforce/lds-network-adapter',
|
|
63927
63931
|
instrument: instrument$2,
|
|
63928
63932
|
});
|
|
63929
|
-
// version: 1.
|
|
63933
|
+
// version: 1.309.0-e7611a7fb5
|
|
63930
63934
|
|
|
63931
63935
|
const { create: create$3, keys: keys$3 } = Object;
|
|
63932
63936
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -83962,7 +83966,7 @@ register$1({
|
|
|
83962
83966
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
83963
83967
|
instrument: instrument$1,
|
|
83964
83968
|
});
|
|
83965
|
-
// version: 1.
|
|
83969
|
+
// version: 1.309.0-3ac0e022f5
|
|
83966
83970
|
|
|
83967
83971
|
// On core the unstable adapters are re-exported with different names,
|
|
83968
83972
|
// we want to match them here.
|
|
@@ -86218,7 +86222,7 @@ withDefaultLuvio((luvio) => {
|
|
|
86218
86222
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
86219
86223
|
graphQLImperative = ldsAdapter;
|
|
86220
86224
|
});
|
|
86221
|
-
// version: 1.
|
|
86225
|
+
// version: 1.309.0-3ac0e022f5
|
|
86222
86226
|
|
|
86223
86227
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
86224
86228
|
__proto__: null,
|
|
@@ -86953,7 +86957,7 @@ const callbacks$1 = [];
|
|
|
86953
86957
|
function register(r) {
|
|
86954
86958
|
callbacks$1.forEach((callback) => callback(r));
|
|
86955
86959
|
}
|
|
86956
|
-
// version: 1.
|
|
86960
|
+
// version: 1.309.0-e7611a7fb5
|
|
86957
86961
|
|
|
86958
86962
|
/**
|
|
86959
86963
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -91915,4 +91919,4 @@ const { luvio } = getRuntime();
|
|
|
91915
91919
|
setDefaultLuvio({ luvio });
|
|
91916
91920
|
|
|
91917
91921
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
91918
|
-
// version: 1.
|
|
91922
|
+
// version: 1.309.0-e7611a7fb5
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.309.0-e7611a7fb5
|
|
4275
4275
|
|
|
4276
4276
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4277
4277
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15770,7 +15770,7 @@
|
|
|
15770
15770
|
}
|
|
15771
15771
|
return superResult;
|
|
15772
15772
|
}
|
|
15773
|
-
// version: 1.
|
|
15773
|
+
// version: 1.309.0-e7611a7fb5
|
|
15774
15774
|
|
|
15775
15775
|
function unwrap(data) {
|
|
15776
15776
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16699,7 +16699,7 @@
|
|
|
16699
16699
|
const { apiFamily, name } = metadata;
|
|
16700
16700
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16701
16701
|
}
|
|
16702
|
-
// version: 1.
|
|
16702
|
+
// version: 1.309.0-e7611a7fb5
|
|
16703
16703
|
|
|
16704
16704
|
/**
|
|
16705
16705
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44804,7 +44804,7 @@
|
|
|
44804
44804
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44805
44805
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44806
44806
|
});
|
|
44807
|
-
// version: 1.
|
|
44807
|
+
// version: 1.309.0-3ac0e022f5
|
|
44808
44808
|
|
|
44809
44809
|
var ldsIdempotencyWriteDisabled = {
|
|
44810
44810
|
isOpen: function (e) {
|
|
@@ -50190,7 +50190,8 @@
|
|
|
50190
50190
|
resourceRequestCopy.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
50191
50191
|
}
|
|
50192
50192
|
// enable return extra fields for record creation and record update http call
|
|
50193
|
-
if (resourceRequest.basePath === '
|
|
50193
|
+
if (typeof resourceRequest.basePath === 'string' &&
|
|
50194
|
+
resourceRequest.basePath.startsWith('/ui-api/records') &&
|
|
50194
50195
|
(resourceRequest.method === 'post' || resourceRequest.method === 'patch')) {
|
|
50195
50196
|
resourceRequestCopy.queryParams = resourceRequestCopy.queryParams || {};
|
|
50196
50197
|
resourceRequestCopy.queryParams['includeFieldsInBody'] = true;
|
|
@@ -51999,10 +52000,49 @@
|
|
|
51999
52000
|
const { shift } = Array.prototype;
|
|
52000
52001
|
const { isArray: isArray$2$1, from: from$2 } = Array;
|
|
52001
52002
|
|
|
52003
|
+
/**
|
|
52004
|
+
* Retrieves a denormalized record from the store
|
|
52005
|
+
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
52006
|
+
* @param recordKey record key
|
|
52007
|
+
* @param durableStore the durable store
|
|
52008
|
+
* @returns a DraftRecordRepresentation containing the requested fields
|
|
52009
|
+
*/
|
|
52010
|
+
function getDenormalizedRecord(recordKey, durableStore) {
|
|
52011
|
+
return durableStore
|
|
52012
|
+
.getEntries([recordKey], DefaultDurableSegment)
|
|
52013
|
+
.then((entries) => {
|
|
52014
|
+
if (entries === undefined) {
|
|
52015
|
+
return undefined;
|
|
52016
|
+
}
|
|
52017
|
+
const denormalizedEntry = entries[recordKey];
|
|
52018
|
+
if (denormalizedEntry === undefined) {
|
|
52019
|
+
return undefined;
|
|
52020
|
+
}
|
|
52021
|
+
// don't include link information
|
|
52022
|
+
const denormalizedRecord = denormalizedEntry.data;
|
|
52023
|
+
if (isStoreRecordError(denormalizedRecord)) {
|
|
52024
|
+
return undefined;
|
|
52025
|
+
}
|
|
52026
|
+
return denormalizedRecord;
|
|
52027
|
+
});
|
|
52028
|
+
}
|
|
52029
|
+
function isStoreRecordError(storeRecord) {
|
|
52030
|
+
return storeRecord.__type === 'error';
|
|
52031
|
+
}
|
|
52032
|
+
function isDraftFieldPending(field) {
|
|
52033
|
+
return !!(field.__state && field.__state.pending === true);
|
|
52034
|
+
}
|
|
52035
|
+
function isDraftFieldMissing(field) {
|
|
52036
|
+
return !!(field.__state && field.__state.isMissing === true);
|
|
52037
|
+
}
|
|
52038
|
+
|
|
52002
52039
|
function isFieldLink(field) {
|
|
52003
52040
|
const { value } = field;
|
|
52004
52041
|
return value !== null && typeof value === 'object' && value.__ref !== undefined;
|
|
52005
52042
|
}
|
|
52043
|
+
function isPendingOrMissing(field) {
|
|
52044
|
+
return isDraftFieldMissing(field) || isDraftFieldPending(field);
|
|
52045
|
+
}
|
|
52006
52046
|
|
|
52007
52047
|
const RECORD_ENDPOINT_REGEX$1 = /^\/ui-api\/records\/?(([a-zA-Z0-9]+))?$/;
|
|
52008
52048
|
/**
|
|
@@ -52059,12 +52099,12 @@
|
|
|
52059
52099
|
* @param record draft record representation
|
|
52060
52100
|
* @returns flattened record representation
|
|
52061
52101
|
*/
|
|
52062
|
-
function
|
|
52102
|
+
function filterOutReferenceNonScalarFields(record) {
|
|
52063
52103
|
const filteredFields = {};
|
|
52064
52104
|
const fieldNames = keys$5(record.fields);
|
|
52065
52105
|
for (const fieldName of fieldNames) {
|
|
52066
52106
|
const field = record.fields[fieldName];
|
|
52067
|
-
if (isFieldLink(field) === false) {
|
|
52107
|
+
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
52068
52108
|
filteredFields[fieldName] = field;
|
|
52069
52109
|
}
|
|
52070
52110
|
}
|
|
@@ -52078,42 +52118,6 @@
|
|
|
52078
52118
|
return filteredRecords;
|
|
52079
52119
|
}
|
|
52080
52120
|
|
|
52081
|
-
/**
|
|
52082
|
-
* Retrieves a denormalized record from the store
|
|
52083
|
-
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
52084
|
-
* @param recordKey record key
|
|
52085
|
-
* @param durableStore the durable store
|
|
52086
|
-
* @returns a DraftRecordRepresentation containing the requested fields
|
|
52087
|
-
*/
|
|
52088
|
-
function getDenormalizedRecord(recordKey, durableStore) {
|
|
52089
|
-
return durableStore
|
|
52090
|
-
.getEntries([recordKey], DefaultDurableSegment)
|
|
52091
|
-
.then((entries) => {
|
|
52092
|
-
if (entries === undefined) {
|
|
52093
|
-
return undefined;
|
|
52094
|
-
}
|
|
52095
|
-
const denormalizedEntry = entries[recordKey];
|
|
52096
|
-
if (denormalizedEntry === undefined) {
|
|
52097
|
-
return undefined;
|
|
52098
|
-
}
|
|
52099
|
-
// don't include link information
|
|
52100
|
-
const denormalizedRecord = denormalizedEntry.data;
|
|
52101
|
-
if (isStoreRecordError(denormalizedRecord)) {
|
|
52102
|
-
return undefined;
|
|
52103
|
-
}
|
|
52104
|
-
return denormalizedRecord;
|
|
52105
|
-
});
|
|
52106
|
-
}
|
|
52107
|
-
function isStoreRecordError(storeRecord) {
|
|
52108
|
-
return storeRecord.__type === 'error';
|
|
52109
|
-
}
|
|
52110
|
-
function isDraftFieldPending(field) {
|
|
52111
|
-
return !!(field.__state && field.__state.pending === true);
|
|
52112
|
-
}
|
|
52113
|
-
function isDraftFieldMissing(field) {
|
|
52114
|
-
return !!(field.__state && field.__state.isMissing === true);
|
|
52115
|
-
}
|
|
52116
|
-
|
|
52117
52121
|
/**
|
|
52118
52122
|
* Checks if a resource request is a GET method on the record endpoint
|
|
52119
52123
|
* @param request the resource request
|
|
@@ -52190,7 +52194,7 @@
|
|
|
52190
52194
|
}));
|
|
52191
52195
|
}
|
|
52192
52196
|
return Promise.reject(createBadRequestResponse({
|
|
52193
|
-
message: '
|
|
52197
|
+
message: 'Cannot fetch draft-created record from network',
|
|
52194
52198
|
}));
|
|
52195
52199
|
}
|
|
52196
52200
|
// a canonical mapping exists for the draft id passed in, we can create a new resource
|
|
@@ -53151,7 +53155,7 @@
|
|
|
53151
53155
|
if (recordWithDrafts === undefined) {
|
|
53152
53156
|
return undefined;
|
|
53153
53157
|
}
|
|
53154
|
-
return
|
|
53158
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
53155
53159
|
}
|
|
53156
53160
|
const record = await getDenormalizedRecord(key, this.durableStore);
|
|
53157
53161
|
if (record === undefined) {
|
|
@@ -53162,7 +53166,7 @@
|
|
|
53162
53166
|
if (recordWithDrafts === undefined) {
|
|
53163
53167
|
return recordWithDrafts;
|
|
53164
53168
|
}
|
|
53165
|
-
return
|
|
53169
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
53166
53170
|
}
|
|
53167
53171
|
applyDraftsToIncomingData(key, data, draftMetadata, publishData) {
|
|
53168
53172
|
if (draftMetadata === undefined) {
|
|
@@ -54058,9 +54062,9 @@
|
|
|
54058
54062
|
return undefined;
|
|
54059
54063
|
}
|
|
54060
54064
|
// finally we resolve all references for each record
|
|
54061
|
-
const contentDocResolved = await
|
|
54062
|
-
const contentDocLinkResolved = await
|
|
54063
|
-
const contentVersionResolved = await
|
|
54065
|
+
const contentDocResolved = await filterOutReferenceNonScalarFields(contentDocRecord);
|
|
54066
|
+
const contentDocLinkResolved = await filterOutReferenceNonScalarFields(contentDocLink);
|
|
54067
|
+
const contentVersionResolved = await filterOutReferenceNonScalarFields(contentVersion);
|
|
54064
54068
|
return {
|
|
54065
54069
|
contentDocument: contentDocResolved,
|
|
54066
54070
|
contentDocumentLinks: [contentDocLinkResolved],
|
|
@@ -63932,7 +63936,7 @@
|
|
|
63932
63936
|
id: '@salesforce/lds-network-adapter',
|
|
63933
63937
|
instrument: instrument$2,
|
|
63934
63938
|
});
|
|
63935
|
-
// version: 1.
|
|
63939
|
+
// version: 1.309.0-e7611a7fb5
|
|
63936
63940
|
|
|
63937
63941
|
const { create: create$3, keys: keys$3 } = Object;
|
|
63938
63942
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -83968,7 +83972,7 @@
|
|
|
83968
83972
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
83969
83973
|
instrument: instrument$1,
|
|
83970
83974
|
});
|
|
83971
|
-
// version: 1.
|
|
83975
|
+
// version: 1.309.0-3ac0e022f5
|
|
83972
83976
|
|
|
83973
83977
|
// On core the unstable adapters are re-exported with different names,
|
|
83974
83978
|
// we want to match them here.
|
|
@@ -86224,7 +86228,7 @@
|
|
|
86224
86228
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
86225
86229
|
graphQLImperative = ldsAdapter;
|
|
86226
86230
|
});
|
|
86227
|
-
// version: 1.
|
|
86231
|
+
// version: 1.309.0-3ac0e022f5
|
|
86228
86232
|
|
|
86229
86233
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
86230
86234
|
__proto__: null,
|
|
@@ -86959,7 +86963,7 @@
|
|
|
86959
86963
|
function register(r) {
|
|
86960
86964
|
callbacks$1.forEach((callback) => callback(r));
|
|
86961
86965
|
}
|
|
86962
|
-
// version: 1.
|
|
86966
|
+
// version: 1.309.0-e7611a7fb5
|
|
86963
86967
|
|
|
86964
86968
|
/**
|
|
86965
86969
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -91940,4 +91944,4 @@
|
|
|
91940
91944
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
91941
91945
|
|
|
91942
91946
|
}));
|
|
91943
|
-
// version: 1.
|
|
91947
|
+
// version: 1.309.0-e7611a7fb5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.309.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.309.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.309.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.309.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.309.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.309.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.309.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.309.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.309.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.309.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|