@salesforce/lds-runtime-mobile 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.
package/dist/main.js
CHANGED
|
@@ -28433,13 +28433,25 @@ function convertGraphQLToRaml(astNode, state) {
|
|
|
28433
28433
|
? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H)
|
|
28434
28434
|
: new Map();
|
|
28435
28435
|
const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
|
|
28436
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
28437
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
28438
|
+
const fieldName = 'RecordTypeId';
|
|
28439
|
+
fieldsBag[fieldName] = {
|
|
28440
|
+
value: recordTypeId,
|
|
28441
|
+
displayValue: null,
|
|
28442
|
+
};
|
|
28443
|
+
trie.children[fieldName] = {
|
|
28444
|
+
name: fieldName,
|
|
28445
|
+
children: {},
|
|
28446
|
+
};
|
|
28447
|
+
}
|
|
28436
28448
|
const recordRepresentation = {
|
|
28437
28449
|
apiName: data.ApiName,
|
|
28438
28450
|
eTag: '',
|
|
28439
28451
|
lastModifiedById: data.LastModifiedById.value,
|
|
28440
28452
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
28441
28453
|
systemModstamp: data.SystemModstamp.value,
|
|
28442
|
-
recordTypeId:
|
|
28454
|
+
recordTypeId: recordTypeId,
|
|
28443
28455
|
recordTypeInfo: null,
|
|
28444
28456
|
childRelationships: {},
|
|
28445
28457
|
id: data.Id,
|
|
@@ -42729,11 +42741,13 @@ class UiApiDraftRecordService {
|
|
|
42729
42741
|
|
|
42730
42742
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
42731
42743
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
42732
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
42744
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
42733
42745
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
42734
42746
|
this.draftRecordService = draftRecordService;
|
|
42735
42747
|
this.isDraftId = isDraftId;
|
|
42736
42748
|
this.sideEffectService = sideEffectService;
|
|
42749
|
+
this.objectInfoService = objectInfoService;
|
|
42750
|
+
this.getRecord = getRecord;
|
|
42737
42751
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
42738
42752
|
draftRecordService.registerRecordHandler(this);
|
|
42739
42753
|
}
|
|
@@ -42765,6 +42779,30 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
|
|
|
42765
42779
|
});
|
|
42766
42780
|
luvio.storeIngest(key, ingestQuickActionExecutionRepresentation, response);
|
|
42767
42781
|
}
|
|
42782
|
+
async handleActionCompleted(action, queueOperations) {
|
|
42783
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
42784
|
+
this.getLuvio();
|
|
42785
|
+
const canonicalId = action.response.body.id;
|
|
42786
|
+
this.buildTagForTargetId(canonicalId);
|
|
42787
|
+
const prefix = canonicalId.substring(0, 3);
|
|
42788
|
+
if (prefix.length !== 3) {
|
|
42789
|
+
// if we can't get a prefix, don't do the rest
|
|
42790
|
+
return;
|
|
42791
|
+
}
|
|
42792
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
42793
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
42794
|
+
if (!objectInfo) {
|
|
42795
|
+
return;
|
|
42796
|
+
}
|
|
42797
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
42798
|
+
}
|
|
42799
|
+
allFields(objectInfo) {
|
|
42800
|
+
let fields = [];
|
|
42801
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
42802
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
42803
|
+
});
|
|
42804
|
+
return fields;
|
|
42805
|
+
}
|
|
42768
42806
|
mergeRequestBody() {
|
|
42769
42807
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
42770
42808
|
}
|
|
@@ -44676,16 +44714,22 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
44676
44714
|
}
|
|
44677
44715
|
}
|
|
44678
44716
|
else {
|
|
44679
|
-
|
|
44680
|
-
|
|
44681
|
-
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
44682
|
-
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
44683
|
-
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
44717
|
+
if (value === null && dataType !== 'MultiPicklist') {
|
|
44718
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
|
|
44684
44719
|
}
|
|
44685
44720
|
else {
|
|
44686
|
-
|
|
44721
|
+
const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
|
|
44722
|
+
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
44723
|
+
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
44724
|
+
if (dataType === 'MultiPicklist' &&
|
|
44725
|
+
(operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
44726
|
+
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
44727
|
+
}
|
|
44728
|
+
else {
|
|
44729
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
|
|
44730
|
+
}
|
|
44731
|
+
binding.push(...valueBinding);
|
|
44687
44732
|
}
|
|
44688
|
-
binding.push(...valueBinding);
|
|
44689
44733
|
}
|
|
44690
44734
|
}
|
|
44691
44735
|
return { sql, binding };
|
|
@@ -54816,7 +54860,7 @@ class SideEffectService {
|
|
|
54816
54860
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
54817
54861
|
const recordFields = {};
|
|
54818
54862
|
for (const fieldName of keys$3(fields)) {
|
|
54819
|
-
const draftField = fields[fieldName];
|
|
54863
|
+
const draftField = fields[fieldName] ?? null;
|
|
54820
54864
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
54821
54865
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
54822
54866
|
if (fieldInfo) {
|
|
@@ -55373,7 +55417,7 @@ function getRuntime() {
|
|
|
55373
55417
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
55374
55418
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
55375
55419
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
55376
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
55420
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
55377
55421
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
55378
55422
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
55379
55423
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -55482,4 +55526,4 @@ register({
|
|
|
55482
55526
|
});
|
|
55483
55527
|
|
|
55484
55528
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
55485
|
-
// version: 1.332.0-
|
|
55529
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
1
|
+
import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
2
2
|
import { AbstractResourceRequestActionHandler } from '../AbstractResourceRequestActionHandler';
|
|
3
|
-
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
-
import
|
|
3
|
+
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
+
import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
5
|
+
import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
|
|
5
6
|
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
6
7
|
import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
|
|
7
8
|
import { type SideEffectService } from '../sideEffects/SideEffectService';
|
|
8
9
|
import { type SideEffect } from '../sideEffects';
|
|
10
|
+
import { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
9
11
|
export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
|
|
10
12
|
interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
|
|
11
13
|
body: PerformActionInputRepresentation;
|
|
@@ -15,14 +17,18 @@ export declare class QuickActionExecutionRepresentationHandler extends AbstractR
|
|
|
15
17
|
private readonly draftRecordService;
|
|
16
18
|
readonly isDraftId: (targetId: string) => boolean;
|
|
17
19
|
private readonly sideEffectService;
|
|
20
|
+
private readonly objectInfoService;
|
|
21
|
+
private readonly getRecord;
|
|
18
22
|
handlerId: string;
|
|
19
|
-
constructor(getLuvio: () => Luvio, draftRecordService: UiApiDraftRecordService, draftQueue: DraftQueue, networkAdapter: NetworkAdapter, isDraftId: (targetId: string) => boolean, sideEffectService: SideEffectService);
|
|
23
|
+
constructor(getLuvio: () => Luvio, draftRecordService: UiApiDraftRecordService, draftQueue: DraftQueue, networkAdapter: NetworkAdapter, isDraftId: (targetId: string) => boolean, sideEffectService: SideEffectService, objectInfoService: ObjectInfoService, getRecord: Adapter<GetRecordConfig, RecordRepresentation>);
|
|
20
24
|
draftActionToSideEffects(queueEntry: DraftAction<PerformQuickActionResourceRequest, QuickActionExecutionRepresentation>): Promise<SideEffect[]>;
|
|
21
25
|
getIdFromRequest(request: ResourceRequest): Promise<string>;
|
|
22
26
|
getIdFromResponseBody(responseBody: QuickActionExecutionRepresentation): string;
|
|
23
27
|
buildTagForTargetId(id: string): string;
|
|
24
28
|
buildCacheKeysFromResponse(_response: QuickActionExecutionRepresentation): DurableStoreKeyMetadataMap;
|
|
25
29
|
synchronousIngest(response: QuickActionExecutionRepresentation): void;
|
|
30
|
+
handleActionCompleted(action: CompletedDraftAction<ResourceRequest, QuickActionExecutionRepresentation>, queueOperations: QueueOperation[]): Promise<void>;
|
|
31
|
+
private allFields;
|
|
26
32
|
mergeRequestBody<T>(): T;
|
|
27
33
|
}
|
|
28
34
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.332.0-
|
|
3
|
+
"version": "1.332.0-dev11",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@salesforce/lds-adapters-uiapi": "^1.332.0-
|
|
36
|
-
"@salesforce/lds-bindings": "^1.332.0-
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.332.0-
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.332.0-dev11",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.332.0-dev11",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.332.0-dev11",
|
|
38
38
|
"@salesforce/user": "0.0.21",
|
|
39
39
|
"o11y": "250.7.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@salesforce/lds-adapters-graphql": "^1.332.0-
|
|
43
|
-
"@salesforce/lds-drafts": "^1.332.0-
|
|
44
|
-
"@salesforce/lds-durable-records": "^1.332.0-
|
|
45
|
-
"@salesforce/lds-network-adapter": "^1.332.0-
|
|
46
|
-
"@salesforce/lds-network-nimbus": "^1.332.0-
|
|
47
|
-
"@salesforce/lds-store-binary": "^1.332.0-
|
|
48
|
-
"@salesforce/lds-store-nimbus": "^1.332.0-
|
|
49
|
-
"@salesforce/lds-store-sql": "^1.332.0-
|
|
50
|
-
"@salesforce/lds-utils-adapters": "^1.332.0-
|
|
51
|
-
"@salesforce/nimbus-plugin-lds": "^1.332.0-
|
|
42
|
+
"@salesforce/lds-adapters-graphql": "^1.332.0-dev11",
|
|
43
|
+
"@salesforce/lds-drafts": "^1.332.0-dev11",
|
|
44
|
+
"@salesforce/lds-durable-records": "^1.332.0-dev11",
|
|
45
|
+
"@salesforce/lds-network-adapter": "^1.332.0-dev11",
|
|
46
|
+
"@salesforce/lds-network-nimbus": "^1.332.0-dev11",
|
|
47
|
+
"@salesforce/lds-store-binary": "^1.332.0-dev11",
|
|
48
|
+
"@salesforce/lds-store-nimbus": "^1.332.0-dev11",
|
|
49
|
+
"@salesforce/lds-store-sql": "^1.332.0-dev11",
|
|
50
|
+
"@salesforce/lds-utils-adapters": "^1.332.0-dev11",
|
|
51
|
+
"@salesforce/nimbus-plugin-lds": "^1.332.0-dev11",
|
|
52
52
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
53
53
|
"wait-for-expect": "^3.0.2"
|
|
54
54
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -28433,13 +28433,25 @@ function convertGraphQLToRaml(astNode, state) {
|
|
|
28433
28433
|
? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H)
|
|
28434
28434
|
: new Map();
|
|
28435
28435
|
const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
|
|
28436
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
28437
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
28438
|
+
const fieldName = 'RecordTypeId';
|
|
28439
|
+
fieldsBag[fieldName] = {
|
|
28440
|
+
value: recordTypeId,
|
|
28441
|
+
displayValue: null,
|
|
28442
|
+
};
|
|
28443
|
+
trie.children[fieldName] = {
|
|
28444
|
+
name: fieldName,
|
|
28445
|
+
children: {},
|
|
28446
|
+
};
|
|
28447
|
+
}
|
|
28436
28448
|
const recordRepresentation = {
|
|
28437
28449
|
apiName: data.ApiName,
|
|
28438
28450
|
eTag: '',
|
|
28439
28451
|
lastModifiedById: data.LastModifiedById.value,
|
|
28440
28452
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
28441
28453
|
systemModstamp: data.SystemModstamp.value,
|
|
28442
|
-
recordTypeId:
|
|
28454
|
+
recordTypeId: recordTypeId,
|
|
28443
28455
|
recordTypeInfo: null,
|
|
28444
28456
|
childRelationships: {},
|
|
28445
28457
|
id: data.Id,
|
|
@@ -42729,11 +42741,13 @@ class UiApiDraftRecordService {
|
|
|
42729
42741
|
|
|
42730
42742
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
42731
42743
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
42732
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
42744
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
42733
42745
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
42734
42746
|
this.draftRecordService = draftRecordService;
|
|
42735
42747
|
this.isDraftId = isDraftId;
|
|
42736
42748
|
this.sideEffectService = sideEffectService;
|
|
42749
|
+
this.objectInfoService = objectInfoService;
|
|
42750
|
+
this.getRecord = getRecord;
|
|
42737
42751
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
42738
42752
|
draftRecordService.registerRecordHandler(this);
|
|
42739
42753
|
}
|
|
@@ -42765,6 +42779,30 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
|
|
|
42765
42779
|
});
|
|
42766
42780
|
luvio.storeIngest(key, ingestQuickActionExecutionRepresentation, response);
|
|
42767
42781
|
}
|
|
42782
|
+
async handleActionCompleted(action, queueOperations) {
|
|
42783
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
42784
|
+
this.getLuvio();
|
|
42785
|
+
const canonicalId = action.response.body.id;
|
|
42786
|
+
this.buildTagForTargetId(canonicalId);
|
|
42787
|
+
const prefix = canonicalId.substring(0, 3);
|
|
42788
|
+
if (prefix.length !== 3) {
|
|
42789
|
+
// if we can't get a prefix, don't do the rest
|
|
42790
|
+
return;
|
|
42791
|
+
}
|
|
42792
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
42793
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
42794
|
+
if (!objectInfo) {
|
|
42795
|
+
return;
|
|
42796
|
+
}
|
|
42797
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
42798
|
+
}
|
|
42799
|
+
allFields(objectInfo) {
|
|
42800
|
+
let fields = [];
|
|
42801
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
42802
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
42803
|
+
});
|
|
42804
|
+
return fields;
|
|
42805
|
+
}
|
|
42768
42806
|
mergeRequestBody() {
|
|
42769
42807
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
42770
42808
|
}
|
|
@@ -44676,16 +44714,22 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
44676
44714
|
}
|
|
44677
44715
|
}
|
|
44678
44716
|
else {
|
|
44679
|
-
|
|
44680
|
-
|
|
44681
|
-
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
44682
|
-
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
44683
|
-
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
44717
|
+
if (value === null && dataType !== 'MultiPicklist') {
|
|
44718
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
|
|
44684
44719
|
}
|
|
44685
44720
|
else {
|
|
44686
|
-
|
|
44721
|
+
const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
|
|
44722
|
+
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
44723
|
+
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
44724
|
+
if (dataType === 'MultiPicklist' &&
|
|
44725
|
+
(operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
44726
|
+
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
44727
|
+
}
|
|
44728
|
+
else {
|
|
44729
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
|
|
44730
|
+
}
|
|
44731
|
+
binding.push(...valueBinding);
|
|
44687
44732
|
}
|
|
44688
|
-
binding.push(...valueBinding);
|
|
44689
44733
|
}
|
|
44690
44734
|
}
|
|
44691
44735
|
return { sql, binding };
|
|
@@ -54816,7 +54860,7 @@ class SideEffectService {
|
|
|
54816
54860
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
54817
54861
|
const recordFields = {};
|
|
54818
54862
|
for (const fieldName of keys$3(fields)) {
|
|
54819
|
-
const draftField = fields[fieldName];
|
|
54863
|
+
const draftField = fields[fieldName] ?? null;
|
|
54820
54864
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
54821
54865
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
54822
54866
|
if (fieldInfo) {
|
|
@@ -55373,7 +55417,7 @@ function getRuntime() {
|
|
|
55373
55417
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
55374
55418
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
55375
55419
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
55376
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
55420
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
55377
55421
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
55378
55422
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
55379
55423
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -55482,4 +55526,4 @@ register({
|
|
|
55482
55526
|
});
|
|
55483
55527
|
|
|
55484
55528
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
55485
|
-
// version: 1.332.0-
|
|
55529
|
+
// version: 1.332.0-dev11-dc267c447c
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
1
|
+
import type { CompletedDraftAction, QueueOperation, DraftAction, DraftQueue } from '@salesforce/lds-drafts';
|
|
2
2
|
import { AbstractResourceRequestActionHandler } from '../AbstractResourceRequestActionHandler';
|
|
3
|
-
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
-
import
|
|
3
|
+
import type { PerformActionInputRepresentation, QuickActionExecutionRepresentation, RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
4
|
+
import { GetRecordConfig } from '@salesforce/lds-adapters-uiapi';
|
|
5
|
+
import type { DurableStoreKeyMetadataMap, Luvio, NetworkAdapter, ResourceRequest, Adapter } from '@luvio/engine';
|
|
5
6
|
import type { UiApiDraftRecordService } from '../UiApiDraftRecordService';
|
|
6
7
|
import type { RecordEffectingHandler } from '../records/actionHandlers/RecordEffectingHandler';
|
|
7
8
|
import { type SideEffectService } from '../sideEffects/SideEffectService';
|
|
8
9
|
import { type SideEffect } from '../sideEffects';
|
|
10
|
+
import { ObjectInfoService } from './../../utils/ObjectInfoService';
|
|
9
11
|
export declare const QUICK_ACTION_HANDLER = "QUICK_ACTION_HANDLER";
|
|
10
12
|
interface PerformQuickActionResourceRequest extends Omit<ResourceRequest, 'body' | 'method'> {
|
|
11
13
|
body: PerformActionInputRepresentation;
|
|
@@ -15,14 +17,18 @@ export declare class QuickActionExecutionRepresentationHandler extends AbstractR
|
|
|
15
17
|
private readonly draftRecordService;
|
|
16
18
|
readonly isDraftId: (targetId: string) => boolean;
|
|
17
19
|
private readonly sideEffectService;
|
|
20
|
+
private readonly objectInfoService;
|
|
21
|
+
private readonly getRecord;
|
|
18
22
|
handlerId: string;
|
|
19
|
-
constructor(getLuvio: () => Luvio, draftRecordService: UiApiDraftRecordService, draftQueue: DraftQueue, networkAdapter: NetworkAdapter, isDraftId: (targetId: string) => boolean, sideEffectService: SideEffectService);
|
|
23
|
+
constructor(getLuvio: () => Luvio, draftRecordService: UiApiDraftRecordService, draftQueue: DraftQueue, networkAdapter: NetworkAdapter, isDraftId: (targetId: string) => boolean, sideEffectService: SideEffectService, objectInfoService: ObjectInfoService, getRecord: Adapter<GetRecordConfig, RecordRepresentation>);
|
|
20
24
|
draftActionToSideEffects(queueEntry: DraftAction<PerformQuickActionResourceRequest, QuickActionExecutionRepresentation>): Promise<SideEffect[]>;
|
|
21
25
|
getIdFromRequest(request: ResourceRequest): Promise<string>;
|
|
22
26
|
getIdFromResponseBody(responseBody: QuickActionExecutionRepresentation): string;
|
|
23
27
|
buildTagForTargetId(id: string): string;
|
|
24
28
|
buildCacheKeysFromResponse(_response: QuickActionExecutionRepresentation): DurableStoreKeyMetadataMap;
|
|
25
29
|
synchronousIngest(response: QuickActionExecutionRepresentation): void;
|
|
30
|
+
handleActionCompleted(action: CompletedDraftAction<ResourceRequest, QuickActionExecutionRepresentation>, queueOperations: QueueOperation[]): Promise<void>;
|
|
31
|
+
private allFields;
|
|
26
32
|
mergeRequestBody<T>(): T;
|
|
27
33
|
}
|
|
28
34
|
export {};
|