@salesforce/lds-worker-api 1.332.0-dev1 → 1.332.0-dev11
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.
|
@@ -449,7 +449,16 @@ function invokeAdapterWithMetadata(adapterId, config, metadata, onResponse, nati
|
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
451
|
if (adapterId === 'deleteRecord') {
|
|
452
|
-
|
|
452
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
453
|
+
return new Promise((resolve) => {
|
|
454
|
+
const onResponseWrapper = (response) => {
|
|
455
|
+
resolve(response);
|
|
456
|
+
};
|
|
457
|
+
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponseWrapper, nativeAdapterRequestContext);
|
|
458
|
+
}).then((callbackValue) => {
|
|
459
|
+
onResponse(callbackValue);
|
|
460
|
+
});
|
|
461
|
+
});
|
|
453
462
|
}
|
|
454
463
|
else {
|
|
455
464
|
draftManager.stopQueueWhileRunning(() => {
|
|
@@ -597,9 +606,7 @@ function removeDraftNodeActionId(targetDraftId, responseValue) {
|
|
|
597
606
|
...responseValue.data.drafts,
|
|
598
607
|
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
599
608
|
};
|
|
600
|
-
return
|
|
601
|
-
data: { drafts: recordDraftsNode },
|
|
602
|
-
});
|
|
609
|
+
return { ...responseValue, data: { ...responseValue.data, drafts: recordDraftsNode } };
|
|
603
610
|
}
|
|
604
611
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
605
612
|
let message = defaultMessage;
|
|
@@ -1121,4 +1128,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1121
1128
|
}
|
|
1122
1129
|
|
|
1123
1130
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1124
|
-
// version: 1.332.0-
|
|
1131
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.332.0-
|
|
4268
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
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) {
|
|
@@ -5213,7 +5213,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5213
5213
|
const { apiFamily, name } = metadata;
|
|
5214
5214
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5215
5215
|
}
|
|
5216
|
-
// version: 1.332.0-
|
|
5216
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
5217
5217
|
|
|
5218
5218
|
/**
|
|
5219
5219
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33850,7 +33850,7 @@ withDefaultLuvio((luvio) => {
|
|
|
33850
33850
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33851
33851
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33852
33852
|
});
|
|
33853
|
-
// version: 1.332.0-
|
|
33853
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
33854
33854
|
|
|
33855
33855
|
/**
|
|
33856
33856
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -65842,13 +65842,25 @@ function convertGraphQLToRaml$1(astNode, state) {
|
|
|
65842
65842
|
? getRequestedFieldsForType$1(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H$1)
|
|
65843
65843
|
: new Map();
|
|
65844
65844
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65845
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65846
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65847
|
+
const fieldName = 'RecordTypeId';
|
|
65848
|
+
fieldsBag[fieldName] = {
|
|
65849
|
+
value: recordTypeId,
|
|
65850
|
+
displayValue: null,
|
|
65851
|
+
};
|
|
65852
|
+
trie.children[fieldName] = {
|
|
65853
|
+
name: fieldName,
|
|
65854
|
+
children: {},
|
|
65855
|
+
};
|
|
65856
|
+
}
|
|
65845
65857
|
const recordRepresentation = {
|
|
65846
65858
|
apiName: data.ApiName,
|
|
65847
65859
|
eTag: '',
|
|
65848
65860
|
lastModifiedById: data.LastModifiedById.value,
|
|
65849
65861
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
65850
65862
|
systemModstamp: data.SystemModstamp.value,
|
|
65851
|
-
recordTypeId:
|
|
65863
|
+
recordTypeId: recordTypeId,
|
|
65852
65864
|
recordTypeInfo: null,
|
|
65853
65865
|
childRelationships: {},
|
|
65854
65866
|
id: data.Id,
|
|
@@ -80117,11 +80129,13 @@ class UiApiDraftRecordService {
|
|
|
80117
80129
|
|
|
80118
80130
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80119
80131
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80120
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80132
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80121
80133
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80122
80134
|
this.draftRecordService = draftRecordService;
|
|
80123
80135
|
this.isDraftId = isDraftId;
|
|
80124
80136
|
this.sideEffectService = sideEffectService;
|
|
80137
|
+
this.objectInfoService = objectInfoService;
|
|
80138
|
+
this.getRecord = getRecord;
|
|
80125
80139
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80126
80140
|
draftRecordService.registerRecordHandler(this);
|
|
80127
80141
|
}
|
|
@@ -80153,6 +80167,30 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
|
|
|
80153
80167
|
});
|
|
80154
80168
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80155
80169
|
}
|
|
80170
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80171
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80172
|
+
this.getLuvio();
|
|
80173
|
+
const canonicalId = action.response.body.id;
|
|
80174
|
+
this.buildTagForTargetId(canonicalId);
|
|
80175
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80176
|
+
if (prefix.length !== 3) {
|
|
80177
|
+
// if we can't get a prefix, don't do the rest
|
|
80178
|
+
return;
|
|
80179
|
+
}
|
|
80180
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80181
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80182
|
+
if (!objectInfo) {
|
|
80183
|
+
return;
|
|
80184
|
+
}
|
|
80185
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80186
|
+
}
|
|
80187
|
+
allFields(objectInfo) {
|
|
80188
|
+
let fields = [];
|
|
80189
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80190
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80191
|
+
});
|
|
80192
|
+
return fields;
|
|
80193
|
+
}
|
|
80156
80194
|
mergeRequestBody() {
|
|
80157
80195
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80158
80196
|
}
|
|
@@ -82060,16 +82098,22 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
82060
82098
|
}
|
|
82061
82099
|
}
|
|
82062
82100
|
else {
|
|
82063
|
-
|
|
82064
|
-
|
|
82065
|
-
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82066
|
-
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82067
|
-
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82101
|
+
if (value === null && dataType !== 'MultiPicklist') {
|
|
82102
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
|
|
82068
82103
|
}
|
|
82069
82104
|
else {
|
|
82070
|
-
|
|
82105
|
+
const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
|
|
82106
|
+
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
82107
|
+
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82108
|
+
if (dataType === 'MultiPicklist' &&
|
|
82109
|
+
(operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82110
|
+
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82111
|
+
}
|
|
82112
|
+
else {
|
|
82113
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
|
|
82114
|
+
}
|
|
82115
|
+
binding.push(...valueBinding);
|
|
82071
82116
|
}
|
|
82072
|
-
binding.push(...valueBinding);
|
|
82073
82117
|
}
|
|
82074
82118
|
}
|
|
82075
82119
|
return { sql, binding };
|
|
@@ -92166,7 +92210,7 @@ class SideEffectService {
|
|
|
92166
92210
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92167
92211
|
const recordFields = {};
|
|
92168
92212
|
for (const fieldName of keys$3(fields)) {
|
|
92169
|
-
const draftField = fields[fieldName];
|
|
92213
|
+
const draftField = fields[fieldName] ?? null;
|
|
92170
92214
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92171
92215
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
92172
92216
|
if (fieldInfo) {
|
|
@@ -92723,7 +92767,7 @@ function getRuntime() {
|
|
|
92723
92767
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
92724
92768
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
92725
92769
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
92726
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92770
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
92727
92771
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92728
92772
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
92729
92773
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -92829,7 +92873,7 @@ register$1({
|
|
|
92829
92873
|
id: '@salesforce/lds-network-adapter',
|
|
92830
92874
|
instrument: instrument$2,
|
|
92831
92875
|
});
|
|
92832
|
-
// version: 1.332.0-
|
|
92876
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
92833
92877
|
|
|
92834
92878
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92835
92879
|
const { stringify, parse } = JSON;
|
|
@@ -115396,7 +115440,7 @@ register$1({
|
|
|
115396
115440
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115397
115441
|
instrument: instrument$1,
|
|
115398
115442
|
});
|
|
115399
|
-
// version: 1.332.0-
|
|
115443
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
115400
115444
|
|
|
115401
115445
|
// On core the unstable adapters are re-exported with different names,
|
|
115402
115446
|
// we want to match them here.
|
|
@@ -115548,7 +115592,7 @@ withDefaultLuvio((luvio) => {
|
|
|
115548
115592
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115549
115593
|
graphQLImperative = ldsAdapter;
|
|
115550
115594
|
});
|
|
115551
|
-
// version: 1.332.0-
|
|
115595
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
115552
115596
|
|
|
115553
115597
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115554
115598
|
__proto__: null,
|
|
@@ -115961,7 +116005,16 @@ function invokeAdapterWithMetadata(adapterId, config, metadata, onResponse, nati
|
|
|
115961
116005
|
return;
|
|
115962
116006
|
}
|
|
115963
116007
|
if (adapterId === 'deleteRecord') {
|
|
115964
|
-
|
|
116008
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
116009
|
+
return new Promise((resolve) => {
|
|
116010
|
+
const onResponseWrapper = (response) => {
|
|
116011
|
+
resolve(response);
|
|
116012
|
+
};
|
|
116013
|
+
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponseWrapper, nativeAdapterRequestContext);
|
|
116014
|
+
}).then((callbackValue) => {
|
|
116015
|
+
onResponse(callbackValue);
|
|
116016
|
+
});
|
|
116017
|
+
});
|
|
115965
116018
|
}
|
|
115966
116019
|
else {
|
|
115967
116020
|
draftManager.stopQueueWhileRunning(() => {
|
|
@@ -116109,9 +116162,7 @@ function removeDraftNodeActionId(targetDraftId, responseValue) {
|
|
|
116109
116162
|
...responseValue.data.drafts,
|
|
116110
116163
|
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
116111
116164
|
};
|
|
116112
|
-
return
|
|
116113
|
-
data: { drafts: recordDraftsNode },
|
|
116114
|
-
});
|
|
116165
|
+
return { ...responseValue, data: { ...responseValue.data, drafts: recordDraftsNode } };
|
|
116115
116166
|
}
|
|
116116
116167
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
116117
116168
|
let message = defaultMessage;
|
|
@@ -116333,7 +116384,7 @@ const callbacks$1 = [];
|
|
|
116333
116384
|
function register(r) {
|
|
116334
116385
|
callbacks$1.forEach((callback) => callback(r));
|
|
116335
116386
|
}
|
|
116336
|
-
// version: 1.332.0-
|
|
116387
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
116337
116388
|
|
|
116338
116389
|
/**
|
|
116339
116390
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117396,4 +117447,4 @@ const { luvio } = getRuntime();
|
|
|
117396
117447
|
setDefaultLuvio({ luvio });
|
|
117397
117448
|
|
|
117398
117449
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
117399
|
-
// version: 1.332.0-
|
|
117450
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.332.0-
|
|
4274
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
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) {
|
|
@@ -5219,7 +5219,7 @@
|
|
|
5219
5219
|
const { apiFamily, name } = metadata;
|
|
5220
5220
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5221
5221
|
}
|
|
5222
|
-
// version: 1.332.0-
|
|
5222
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
5223
5223
|
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -33856,7 +33856,7 @@
|
|
|
33856
33856
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33857
33857
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33858
33858
|
});
|
|
33859
|
-
// version: 1.332.0-
|
|
33859
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
33860
33860
|
|
|
33861
33861
|
/**
|
|
33862
33862
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -65848,13 +65848,25 @@
|
|
|
65848
65848
|
? getRequestedFieldsForType$1(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H$1)
|
|
65849
65849
|
: new Map();
|
|
65850
65850
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65851
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65852
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65853
|
+
const fieldName = 'RecordTypeId';
|
|
65854
|
+
fieldsBag[fieldName] = {
|
|
65855
|
+
value: recordTypeId,
|
|
65856
|
+
displayValue: null,
|
|
65857
|
+
};
|
|
65858
|
+
trie.children[fieldName] = {
|
|
65859
|
+
name: fieldName,
|
|
65860
|
+
children: {},
|
|
65861
|
+
};
|
|
65862
|
+
}
|
|
65851
65863
|
const recordRepresentation = {
|
|
65852
65864
|
apiName: data.ApiName,
|
|
65853
65865
|
eTag: '',
|
|
65854
65866
|
lastModifiedById: data.LastModifiedById.value,
|
|
65855
65867
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
65856
65868
|
systemModstamp: data.SystemModstamp.value,
|
|
65857
|
-
recordTypeId:
|
|
65869
|
+
recordTypeId: recordTypeId,
|
|
65858
65870
|
recordTypeInfo: null,
|
|
65859
65871
|
childRelationships: {},
|
|
65860
65872
|
id: data.Id,
|
|
@@ -80123,11 +80135,13 @@
|
|
|
80123
80135
|
|
|
80124
80136
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80125
80137
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80126
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80138
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80127
80139
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80128
80140
|
this.draftRecordService = draftRecordService;
|
|
80129
80141
|
this.isDraftId = isDraftId;
|
|
80130
80142
|
this.sideEffectService = sideEffectService;
|
|
80143
|
+
this.objectInfoService = objectInfoService;
|
|
80144
|
+
this.getRecord = getRecord;
|
|
80131
80145
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80132
80146
|
draftRecordService.registerRecordHandler(this);
|
|
80133
80147
|
}
|
|
@@ -80159,6 +80173,30 @@
|
|
|
80159
80173
|
});
|
|
80160
80174
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80161
80175
|
}
|
|
80176
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80177
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80178
|
+
this.getLuvio();
|
|
80179
|
+
const canonicalId = action.response.body.id;
|
|
80180
|
+
this.buildTagForTargetId(canonicalId);
|
|
80181
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80182
|
+
if (prefix.length !== 3) {
|
|
80183
|
+
// if we can't get a prefix, don't do the rest
|
|
80184
|
+
return;
|
|
80185
|
+
}
|
|
80186
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80187
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80188
|
+
if (!objectInfo) {
|
|
80189
|
+
return;
|
|
80190
|
+
}
|
|
80191
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80192
|
+
}
|
|
80193
|
+
allFields(objectInfo) {
|
|
80194
|
+
let fields = [];
|
|
80195
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80196
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80197
|
+
});
|
|
80198
|
+
return fields;
|
|
80199
|
+
}
|
|
80162
80200
|
mergeRequestBody() {
|
|
80163
80201
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80164
80202
|
}
|
|
@@ -82066,16 +82104,22 @@
|
|
|
82066
82104
|
}
|
|
82067
82105
|
}
|
|
82068
82106
|
else {
|
|
82069
|
-
|
|
82070
|
-
|
|
82071
|
-
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82072
|
-
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82073
|
-
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82107
|
+
if (value === null && dataType !== 'MultiPicklist') {
|
|
82108
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
|
|
82074
82109
|
}
|
|
82075
82110
|
else {
|
|
82076
|
-
|
|
82111
|
+
const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
|
|
82112
|
+
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
82113
|
+
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82114
|
+
if (dataType === 'MultiPicklist' &&
|
|
82115
|
+
(operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82116
|
+
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82117
|
+
}
|
|
82118
|
+
else {
|
|
82119
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
|
|
82120
|
+
}
|
|
82121
|
+
binding.push(...valueBinding);
|
|
82077
82122
|
}
|
|
82078
|
-
binding.push(...valueBinding);
|
|
82079
82123
|
}
|
|
82080
82124
|
}
|
|
82081
82125
|
return { sql, binding };
|
|
@@ -92172,7 +92216,7 @@
|
|
|
92172
92216
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92173
92217
|
const recordFields = {};
|
|
92174
92218
|
for (const fieldName of keys$3(fields)) {
|
|
92175
|
-
const draftField = fields[fieldName];
|
|
92219
|
+
const draftField = fields[fieldName] ?? null;
|
|
92176
92220
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92177
92221
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
92178
92222
|
if (fieldInfo) {
|
|
@@ -92729,7 +92773,7 @@
|
|
|
92729
92773
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
92730
92774
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
92731
92775
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
92732
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92776
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
92733
92777
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92734
92778
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
92735
92779
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -92835,7 +92879,7 @@
|
|
|
92835
92879
|
id: '@salesforce/lds-network-adapter',
|
|
92836
92880
|
instrument: instrument$2,
|
|
92837
92881
|
});
|
|
92838
|
-
// version: 1.332.0-
|
|
92882
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
92839
92883
|
|
|
92840
92884
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92841
92885
|
const { stringify, parse } = JSON;
|
|
@@ -115402,7 +115446,7 @@
|
|
|
115402
115446
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115403
115447
|
instrument: instrument$1,
|
|
115404
115448
|
});
|
|
115405
|
-
// version: 1.332.0-
|
|
115449
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
115406
115450
|
|
|
115407
115451
|
// On core the unstable adapters are re-exported with different names,
|
|
115408
115452
|
// we want to match them here.
|
|
@@ -115554,7 +115598,7 @@
|
|
|
115554
115598
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115555
115599
|
graphQLImperative = ldsAdapter;
|
|
115556
115600
|
});
|
|
115557
|
-
// version: 1.332.0-
|
|
115601
|
+
// version: 1.332.0-dev11-db48bc45f8
|
|
115558
115602
|
|
|
115559
115603
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115560
115604
|
__proto__: null,
|
|
@@ -115967,7 +116011,16 @@
|
|
|
115967
116011
|
return;
|
|
115968
116012
|
}
|
|
115969
116013
|
if (adapterId === 'deleteRecord') {
|
|
115970
|
-
|
|
116014
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
116015
|
+
return new Promise((resolve) => {
|
|
116016
|
+
const onResponseWrapper = (response) => {
|
|
116017
|
+
resolve(response);
|
|
116018
|
+
};
|
|
116019
|
+
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponseWrapper, nativeAdapterRequestContext);
|
|
116020
|
+
}).then((callbackValue) => {
|
|
116021
|
+
onResponse(callbackValue);
|
|
116022
|
+
});
|
|
116023
|
+
});
|
|
115971
116024
|
}
|
|
115972
116025
|
else {
|
|
115973
116026
|
draftManager.stopQueueWhileRunning(() => {
|
|
@@ -116115,9 +116168,7 @@
|
|
|
116115
116168
|
...responseValue.data.drafts,
|
|
116116
116169
|
draftActionIds: responseValue.data.drafts.draftActionIds.filter((x) => x !== targetDraftId),
|
|
116117
116170
|
};
|
|
116118
|
-
return
|
|
116119
|
-
data: { drafts: recordDraftsNode },
|
|
116120
|
-
});
|
|
116171
|
+
return { ...responseValue, data: { ...responseValue.data, drafts: recordDraftsNode } };
|
|
116121
116172
|
}
|
|
116122
116173
|
function convertErrorIntoNativeFetchError(error, defaultMessage) {
|
|
116123
116174
|
let message = defaultMessage;
|
|
@@ -116339,7 +116390,7 @@
|
|
|
116339
116390
|
function register(r) {
|
|
116340
116391
|
callbacks$1.forEach((callback) => callback(r));
|
|
116341
116392
|
}
|
|
116342
|
-
// version: 1.332.0-
|
|
116393
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
116343
116394
|
|
|
116344
116395
|
/**
|
|
116345
116396
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117421,4 +117472,4 @@
|
|
|
117421
117472
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
117422
117473
|
|
|
117423
117474
|
}));
|
|
117424
|
-
// version: 1.332.0-
|
|
117475
|
+
// version: 1.332.0-dev11-dc267c447c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.332.0-
|
|
3
|
+
"version": "1.332.0-dev11",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.332.0-
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.332.0-
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.332.0-
|
|
41
|
-
"@salesforce/lds-drafts": "^1.332.0-
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.332.0-
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.332.0-
|
|
44
|
-
"@salesforce/lds-runtime-mobile": "^1.332.0-
|
|
45
|
-
"@salesforce/nimbus-plugin-lds": "^1.332.0-
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.332.0-dev11",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.332.0-dev11",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.332.0-dev11",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.332.0-dev11",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.332.0-dev11",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.332.0-dev11",
|
|
44
|
+
"@salesforce/lds-runtime-mobile": "^1.332.0-dev11",
|
|
45
|
+
"@salesforce/nimbus-plugin-lds": "^1.332.0-dev11",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
47
47
|
"glob": "^7.1.5",
|
|
48
48
|
"nimbus-types": "^2.0.0-alpha1",
|