@salesforce/lds-worker-api 1.131.4 → 1.132.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.
|
@@ -761,4 +761,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
764
|
-
// version: 1.
|
|
764
|
+
// version: 1.132.0-bbccbac3a
|
|
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
callbacks.push(callback);
|
|
3778
3778
|
}
|
|
3779
|
-
// version: 1.
|
|
3779
|
+
// version: 1.132.0-bbccbac3a
|
|
3780
3780
|
|
|
3781
3781
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3782
3782
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
|
|
|
15200
15200
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15201
15201
|
return luvioDocumentNode;
|
|
15202
15202
|
}
|
|
15203
|
-
// version: 1.
|
|
15203
|
+
// version: 1.132.0-bbccbac3a
|
|
15204
15204
|
|
|
15205
15205
|
function unwrap(data) {
|
|
15206
15206
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16113,7 +16113,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16113
16113
|
const { apiFamily, name } = metadata;
|
|
16114
16114
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16115
16115
|
}
|
|
16116
|
-
// version: 1.
|
|
16116
|
+
// version: 1.132.0-bbccbac3a
|
|
16117
16117
|
|
|
16118
16118
|
/**
|
|
16119
16119
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44413,7 +44413,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44413
44413
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44414
44414
|
});
|
|
44415
44415
|
});
|
|
44416
|
-
// version: 1.
|
|
44416
|
+
// version: 1.132.0-82978d015
|
|
44417
44417
|
|
|
44418
44418
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44419
44419
|
|
|
@@ -50678,16 +50678,23 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
50678
50678
|
|
|
50679
50679
|
const API_NAMESPACE = 'UiApi';
|
|
50680
50680
|
const RECORD_REPRESENTATION_NAME$1 = 'RecordRepresentation';
|
|
50681
|
+
const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
|
|
50681
50682
|
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME$1}:`;
|
|
50683
|
+
const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name`;
|
|
50682
50684
|
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
50683
50685
|
function isStoreKeyRecordId(key) {
|
|
50684
50686
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
|
|
50685
50687
|
}
|
|
50688
|
+
function isStoreKeyRecordViewEntity(key) {
|
|
50689
|
+
return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
|
|
50690
|
+
key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
|
|
50691
|
+
}
|
|
50686
50692
|
function isStoreKeyRecordField(key) {
|
|
50687
50693
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) > -1;
|
|
50688
50694
|
}
|
|
50689
50695
|
function extractRecordIdFromStoreKey(key) {
|
|
50690
|
-
if (key === undefined ||
|
|
50696
|
+
if (key === undefined ||
|
|
50697
|
+
(key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
|
|
50691
50698
|
return undefined;
|
|
50692
50699
|
}
|
|
50693
50700
|
const parts = key.split(':');
|
|
@@ -50702,7 +50709,8 @@ function isStoreRecordError(storeRecord) {
|
|
|
50702
50709
|
}
|
|
50703
50710
|
function isEntryDurableRecordRepresentation(entry, key) {
|
|
50704
50711
|
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
50705
|
-
return isStoreKeyRecordId(key)
|
|
50712
|
+
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity(key)) &&
|
|
50713
|
+
entry.data.__type === undefined);
|
|
50706
50714
|
}
|
|
50707
50715
|
|
|
50708
50716
|
/**
|
|
@@ -56209,6 +56217,15 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
56209
56217
|
links,
|
|
56210
56218
|
};
|
|
56211
56219
|
}
|
|
56220
|
+
function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
56221
|
+
// this will likely need to be handled when moving to structured keys
|
|
56222
|
+
// note record view entities dont have an associated keybuilder. They get ingested as records to a different key format
|
|
56223
|
+
// see the override for how they are handled packages/lds-adapters-uiapi/src/raml-artifacts/types/RecordRepresentation/keyBuilderFromType.ts
|
|
56224
|
+
if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
|
|
56225
|
+
return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
|
|
56226
|
+
}
|
|
56227
|
+
return keyBuilder$1Q(luvio, { recordId });
|
|
56228
|
+
}
|
|
56212
56229
|
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
56213
56230
|
const getEntries = function (entries, segment) {
|
|
56214
56231
|
// this HOF only inspects records in the default segment
|
|
@@ -56228,7 +56245,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56228
56245
|
const recordId = extractRecordIdFromStoreKey(id);
|
|
56229
56246
|
if (recordId !== undefined) {
|
|
56230
56247
|
if (recordEntries[recordId] === undefined) {
|
|
56231
|
-
const key =
|
|
56248
|
+
const key = getDenormalizedKey(id, recordId, luvio);
|
|
56232
56249
|
recordEntries[recordId] = true;
|
|
56233
56250
|
filteredEntryIds.push(key);
|
|
56234
56251
|
}
|
|
@@ -56272,7 +56289,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56272
56289
|
const recordId = extractRecordIdFromStoreKey(key);
|
|
56273
56290
|
// do not put normalized field values
|
|
56274
56291
|
if (recordId !== undefined) {
|
|
56275
|
-
const recordKey =
|
|
56292
|
+
const recordKey = getDenormalizedKey(key, recordId, luvio);
|
|
56276
56293
|
if (putRecords[recordId] === true) {
|
|
56277
56294
|
continue;
|
|
56278
56295
|
}
|
|
@@ -60025,7 +60042,7 @@ register({
|
|
|
60025
60042
|
id: '@salesforce/lds-network-adapter',
|
|
60026
60043
|
instrument: instrument$1,
|
|
60027
60044
|
});
|
|
60028
|
-
// version: 1.
|
|
60045
|
+
// version: 1.132.0-bbccbac3a
|
|
60029
60046
|
|
|
60030
60047
|
const { create: create$2, keys: keys$2 } = Object;
|
|
60031
60048
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74333,7 +74350,7 @@ register({
|
|
|
74333
74350
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74334
74351
|
instrument,
|
|
74335
74352
|
});
|
|
74336
|
-
// version: 1.
|
|
74353
|
+
// version: 1.132.0-82978d015
|
|
74337
74354
|
|
|
74338
74355
|
// On core the unstable adapters are re-exported with different names,
|
|
74339
74356
|
|
|
@@ -76462,7 +76479,7 @@ withDefaultLuvio((luvio) => {
|
|
|
76462
76479
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76463
76480
|
graphQLImperative = ldsAdapter;
|
|
76464
76481
|
});
|
|
76465
|
-
// version: 1.
|
|
76482
|
+
// version: 1.132.0-82978d015
|
|
76466
76483
|
|
|
76467
76484
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76468
76485
|
__proto__: null,
|
|
@@ -77154,4 +77171,4 @@ const { luvio } = getRuntime();
|
|
|
77154
77171
|
setDefaultLuvio({ luvio });
|
|
77155
77172
|
|
|
77156
77173
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
77157
|
-
// version: 1.
|
|
77174
|
+
// version: 1.132.0-bbccbac3a
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
}
|
|
3783
3783
|
callbacks.push(callback);
|
|
3784
3784
|
}
|
|
3785
|
-
// version: 1.
|
|
3785
|
+
// version: 1.132.0-bbccbac3a
|
|
3786
3786
|
|
|
3787
3787
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3788
3788
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15206,7 +15206,7 @@
|
|
|
15206
15206
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15207
15207
|
return luvioDocumentNode;
|
|
15208
15208
|
}
|
|
15209
|
-
// version: 1.
|
|
15209
|
+
// version: 1.132.0-bbccbac3a
|
|
15210
15210
|
|
|
15211
15211
|
function unwrap(data) {
|
|
15212
15212
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16119,7 +16119,7 @@
|
|
|
16119
16119
|
const { apiFamily, name } = metadata;
|
|
16120
16120
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16121
16121
|
}
|
|
16122
|
-
// version: 1.
|
|
16122
|
+
// version: 1.132.0-bbccbac3a
|
|
16123
16123
|
|
|
16124
16124
|
/**
|
|
16125
16125
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44419,7 +44419,7 @@
|
|
|
44419
44419
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44420
44420
|
});
|
|
44421
44421
|
});
|
|
44422
|
-
// version: 1.
|
|
44422
|
+
// version: 1.132.0-82978d015
|
|
44423
44423
|
|
|
44424
44424
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44425
44425
|
|
|
@@ -50684,16 +50684,23 @@
|
|
|
50684
50684
|
|
|
50685
50685
|
const API_NAMESPACE = 'UiApi';
|
|
50686
50686
|
const RECORD_REPRESENTATION_NAME$1 = 'RecordRepresentation';
|
|
50687
|
+
const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
|
|
50687
50688
|
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME$1}:`;
|
|
50689
|
+
const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name`;
|
|
50688
50690
|
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
50689
50691
|
function isStoreKeyRecordId(key) {
|
|
50690
50692
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
|
|
50691
50693
|
}
|
|
50694
|
+
function isStoreKeyRecordViewEntity(key) {
|
|
50695
|
+
return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
|
|
50696
|
+
key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
|
|
50697
|
+
}
|
|
50692
50698
|
function isStoreKeyRecordField(key) {
|
|
50693
50699
|
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) > -1;
|
|
50694
50700
|
}
|
|
50695
50701
|
function extractRecordIdFromStoreKey(key) {
|
|
50696
|
-
if (key === undefined ||
|
|
50702
|
+
if (key === undefined ||
|
|
50703
|
+
(key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
|
|
50697
50704
|
return undefined;
|
|
50698
50705
|
}
|
|
50699
50706
|
const parts = key.split(':');
|
|
@@ -50708,7 +50715,8 @@
|
|
|
50708
50715
|
}
|
|
50709
50716
|
function isEntryDurableRecordRepresentation(entry, key) {
|
|
50710
50717
|
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
50711
|
-
return isStoreKeyRecordId(key)
|
|
50718
|
+
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity(key)) &&
|
|
50719
|
+
entry.data.__type === undefined);
|
|
50712
50720
|
}
|
|
50713
50721
|
|
|
50714
50722
|
/**
|
|
@@ -56215,6 +56223,15 @@
|
|
|
56215
56223
|
links,
|
|
56216
56224
|
};
|
|
56217
56225
|
}
|
|
56226
|
+
function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
56227
|
+
// this will likely need to be handled when moving to structured keys
|
|
56228
|
+
// note record view entities dont have an associated keybuilder. They get ingested as records to a different key format
|
|
56229
|
+
// see the override for how they are handled packages/lds-adapters-uiapi/src/raml-artifacts/types/RecordRepresentation/keyBuilderFromType.ts
|
|
56230
|
+
if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
|
|
56231
|
+
return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
|
|
56232
|
+
}
|
|
56233
|
+
return keyBuilder$1Q(luvio, { recordId });
|
|
56234
|
+
}
|
|
56218
56235
|
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
56219
56236
|
const getEntries = function (entries, segment) {
|
|
56220
56237
|
// this HOF only inspects records in the default segment
|
|
@@ -56234,7 +56251,7 @@
|
|
|
56234
56251
|
const recordId = extractRecordIdFromStoreKey(id);
|
|
56235
56252
|
if (recordId !== undefined) {
|
|
56236
56253
|
if (recordEntries[recordId] === undefined) {
|
|
56237
|
-
const key =
|
|
56254
|
+
const key = getDenormalizedKey(id, recordId, luvio);
|
|
56238
56255
|
recordEntries[recordId] = true;
|
|
56239
56256
|
filteredEntryIds.push(key);
|
|
56240
56257
|
}
|
|
@@ -56278,7 +56295,7 @@
|
|
|
56278
56295
|
const recordId = extractRecordIdFromStoreKey(key);
|
|
56279
56296
|
// do not put normalized field values
|
|
56280
56297
|
if (recordId !== undefined) {
|
|
56281
|
-
const recordKey =
|
|
56298
|
+
const recordKey = getDenormalizedKey(key, recordId, luvio);
|
|
56282
56299
|
if (putRecords[recordId] === true) {
|
|
56283
56300
|
continue;
|
|
56284
56301
|
}
|
|
@@ -60031,7 +60048,7 @@
|
|
|
60031
60048
|
id: '@salesforce/lds-network-adapter',
|
|
60032
60049
|
instrument: instrument$1,
|
|
60033
60050
|
});
|
|
60034
|
-
// version: 1.
|
|
60051
|
+
// version: 1.132.0-bbccbac3a
|
|
60035
60052
|
|
|
60036
60053
|
const { create: create$2, keys: keys$2 } = Object;
|
|
60037
60054
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74339,7 +74356,7 @@
|
|
|
74339
74356
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74340
74357
|
instrument,
|
|
74341
74358
|
});
|
|
74342
|
-
// version: 1.
|
|
74359
|
+
// version: 1.132.0-82978d015
|
|
74343
74360
|
|
|
74344
74361
|
// On core the unstable adapters are re-exported with different names,
|
|
74345
74362
|
|
|
@@ -76468,7 +76485,7 @@
|
|
|
76468
76485
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76469
76486
|
graphQLImperative = ldsAdapter;
|
|
76470
76487
|
});
|
|
76471
|
-
// version: 1.
|
|
76488
|
+
// version: 1.132.0-82978d015
|
|
76472
76489
|
|
|
76473
76490
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76474
76491
|
__proto__: null,
|
|
@@ -77177,4 +77194,4 @@
|
|
|
77177
77194
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
77178
77195
|
|
|
77179
77196
|
}));
|
|
77180
|
-
// version: 1.
|
|
77197
|
+
// version: 1.132.0-bbccbac3a
|