@salesforce/lds-runtime-mobile 1.335.0 → 1.337.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +40 -12
- package/package.json +14 -14
- package/sfdc/main.js +40 -12
package/dist/main.js
CHANGED
|
@@ -19,6 +19,7 @@ import { withRegistration, register } from '@salesforce/lds-default-luvio';
|
|
|
19
19
|
import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation } from '@salesforce/lds-instrumentation';
|
|
20
20
|
import { HttpStatusCode, setBypassDeepFreeze, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, ingestShape, coerceConfig as coerceConfig$1, typeCheckConfig as typeCheckConfig$h, createResourceParams as createResourceParams$h, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$f, resolveLink, createCustomAdapterEventEmitter, isFileReference, Environment, Luvio, InMemoryStore } from '@luvio/engine';
|
|
21
21
|
import { isSupportedEntity, configuration, getObjectInfoAdapterFactory, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, isStoreKeyRecordViewEntity, extractRecordIdFromStoreKey, buildRecordRepKeyFromId, keyBuilderRecord, RecordRepresentationTTL, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, getRecordId18 as getRecordId18$1, getRecordsAdapterFactory as getRecordsAdapterFactory$1, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getObjectInfosAdapterFactory, getObjectInfoDirectoryAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationVersion } from '@salesforce/lds-adapters-uiapi';
|
|
22
|
+
import graphqlRecordTypeIdFixGate from '@salesforce/gate/lmr.graphqlRecordTypeIdFix';
|
|
22
23
|
import { Kind as Kind$1, visit as visit$1, isObjectType, defaultFieldResolver, buildSchema, parse as parse$5, extendSchema, isScalarType, execute, print } from '@luvio/graphql-parser';
|
|
23
24
|
import FIRST_DAY_OF_WEEK from '@salesforce/i18n/firstDayOfWeek';
|
|
24
25
|
import graphqQueryFieldLimit from '@salesforce/gate/lmr.graphqQueryFieldLimit';
|
|
@@ -28433,13 +28434,27 @@ function convertGraphQLToRaml(astNode, state) {
|
|
|
28433
28434
|
? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H)
|
|
28434
28435
|
: new Map();
|
|
28435
28436
|
const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
|
|
28437
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
28438
|
+
if (graphqlRecordTypeIdFixGate.isOpen({ fallback: false }) &&
|
|
28439
|
+
recordTypeId &&
|
|
28440
|
+
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
28441
|
+
const fieldName = 'RecordTypeId';
|
|
28442
|
+
fieldsBag[fieldName] = {
|
|
28443
|
+
value: recordTypeId,
|
|
28444
|
+
displayValue: null,
|
|
28445
|
+
};
|
|
28446
|
+
trie.children[fieldName] = {
|
|
28447
|
+
name: fieldName,
|
|
28448
|
+
children: {},
|
|
28449
|
+
};
|
|
28450
|
+
}
|
|
28436
28451
|
const recordRepresentation = {
|
|
28437
28452
|
apiName: data.ApiName,
|
|
28438
28453
|
eTag: '',
|
|
28439
28454
|
lastModifiedById: data.LastModifiedById.value,
|
|
28440
28455
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
28441
28456
|
systemModstamp: data.SystemModstamp.value,
|
|
28442
|
-
recordTypeId:
|
|
28457
|
+
recordTypeId: recordTypeId,
|
|
28443
28458
|
recordTypeInfo: null,
|
|
28444
28459
|
childRelationships: {},
|
|
28445
28460
|
id: data.Id,
|
|
@@ -50408,9 +50423,9 @@ function buildLdsResponse(response) {
|
|
|
50408
50423
|
|
|
50409
50424
|
// so eslint doesn't complain about nimbus
|
|
50410
50425
|
/* global __nimbus */
|
|
50411
|
-
const tasker = idleDetector.declareNotifierTaskMulti('NimbusNetworkAdapter');
|
|
50426
|
+
const tasker$1 = idleDetector.declareNotifierTaskMulti('NimbusNetworkAdapter');
|
|
50412
50427
|
const NimbusNetworkAdapter = (request, resourceRequestContext) => {
|
|
50413
|
-
tasker.add();
|
|
50428
|
+
tasker$1.add();
|
|
50414
50429
|
return new Promise((resolve, reject) => {
|
|
50415
50430
|
try {
|
|
50416
50431
|
__nimbus.plugins.LdsNetworkAdapter.sendRequest(buildNimbusNetworkPluginRequest(request, resourceRequestContext), (response) => {
|
|
@@ -50431,7 +50446,7 @@ const NimbusNetworkAdapter = (request, resourceRequestContext) => {
|
|
|
50431
50446
|
// fails to parse the request), and call reject
|
|
50432
50447
|
reject(error);
|
|
50433
50448
|
}
|
|
50434
|
-
}).finally(() => tasker.done());
|
|
50449
|
+
}).finally(() => tasker$1.done());
|
|
50435
50450
|
};
|
|
50436
50451
|
|
|
50437
50452
|
/**
|
|
@@ -51964,6 +51979,7 @@ class LdsInternalDataTable {
|
|
|
51964
51979
|
}
|
|
51965
51980
|
}
|
|
51966
51981
|
|
|
51982
|
+
const tasker = idleDetector.declareNotifierTaskMulti('NimbusSqliteStore');
|
|
51967
51983
|
class NimbusSqliteStore {
|
|
51968
51984
|
constructor(plugin, additionalTableMap = {}) {
|
|
51969
51985
|
this.plugin = plugin;
|
|
@@ -51977,26 +51993,37 @@ class NimbusSqliteStore {
|
|
|
51977
51993
|
return true;
|
|
51978
51994
|
}
|
|
51979
51995
|
query(sql, params) {
|
|
51996
|
+
tasker.add();
|
|
51980
51997
|
return new Promise((resolve, reject) => {
|
|
51981
51998
|
this.plugin.query(sql, params, (result) => {
|
|
51982
51999
|
resolve(result);
|
|
51983
52000
|
}, (error) => {
|
|
51984
52001
|
reject(error);
|
|
51985
52002
|
});
|
|
51986
|
-
});
|
|
52003
|
+
}).finally(() => tasker.done());
|
|
51987
52004
|
}
|
|
51988
52005
|
batchQuery(queries) {
|
|
51989
52006
|
const promises = queries.map((q) => this.query(q.sql, q.params));
|
|
51990
|
-
|
|
52007
|
+
tasker.add();
|
|
52008
|
+
return Promise.all(promises).finally(() => tasker.done());
|
|
51991
52009
|
}
|
|
51992
52010
|
async getEntries(entryIds, segment) {
|
|
51993
|
-
|
|
52011
|
+
tasker.add();
|
|
52012
|
+
return this.getTable(segment)
|
|
52013
|
+
.getByKeys(entryIds, segment)
|
|
52014
|
+
.finally(() => tasker.done());
|
|
51994
52015
|
}
|
|
51995
52016
|
async getMetadata(entryIds, segment) {
|
|
51996
|
-
|
|
52017
|
+
tasker.add();
|
|
52018
|
+
return this.getTable(segment)
|
|
52019
|
+
.getMetadataByKeys(entryIds, segment)
|
|
52020
|
+
.finally(() => tasker.done());
|
|
51997
52021
|
}
|
|
51998
52022
|
getAllEntries(segment) {
|
|
51999
|
-
|
|
52023
|
+
tasker.add();
|
|
52024
|
+
return this.getTable(segment)
|
|
52025
|
+
.getAll(segment)
|
|
52026
|
+
.finally(() => tasker.done());
|
|
52000
52027
|
}
|
|
52001
52028
|
setEntries(entries, segment) {
|
|
52002
52029
|
if (keys$1(entries).length === 0) {
|
|
@@ -52092,6 +52119,7 @@ class NimbusSqliteStore {
|
|
|
52092
52119
|
};
|
|
52093
52120
|
}
|
|
52094
52121
|
batchOperationAsPromise(sqliteOperations) {
|
|
52122
|
+
tasker.add();
|
|
52095
52123
|
return new Promise((resolve, reject) => {
|
|
52096
52124
|
this.plugin.batchOperations(sqliteOperations, (error) => {
|
|
52097
52125
|
if (error && error !== null) {
|
|
@@ -52101,7 +52129,7 @@ class NimbusSqliteStore {
|
|
|
52101
52129
|
resolve();
|
|
52102
52130
|
}
|
|
52103
52131
|
});
|
|
52104
|
-
});
|
|
52132
|
+
}).finally(() => tasker.done());
|
|
52105
52133
|
}
|
|
52106
52134
|
}
|
|
52107
52135
|
|
|
@@ -54659,7 +54687,7 @@ class SideEffectService {
|
|
|
54659
54687
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
54660
54688
|
const recordFields = {};
|
|
54661
54689
|
for (const fieldName of keys$3(fields)) {
|
|
54662
|
-
const draftField = fields[fieldName];
|
|
54690
|
+
const draftField = fields[fieldName] ?? null;
|
|
54663
54691
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
54664
54692
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
54665
54693
|
if (fieldInfo) {
|
|
@@ -55325,4 +55353,4 @@ register({
|
|
|
55325
55353
|
});
|
|
55326
55354
|
|
|
55327
55355
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
55328
|
-
// version: 1.
|
|
55356
|
+
// version: 1.337.0-d91af1f460
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.337.0",
|
|
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.
|
|
36
|
-
"@salesforce/lds-bindings": "^1.
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.337.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.337.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.337.0",
|
|
38
38
|
"@salesforce/user": "0.0.21",
|
|
39
39
|
"o11y": "250.7.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
43
|
-
"@salesforce/lds-drafts": "^1.
|
|
44
|
-
"@salesforce/lds-durable-records": "^1.
|
|
45
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
46
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
47
|
-
"@salesforce/lds-store-binary": "^1.
|
|
48
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
49
|
-
"@salesforce/lds-store-sql": "^1.
|
|
50
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
51
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
42
|
+
"@salesforce/lds-adapters-graphql": "^1.337.0",
|
|
43
|
+
"@salesforce/lds-drafts": "^1.337.0",
|
|
44
|
+
"@salesforce/lds-durable-records": "^1.337.0",
|
|
45
|
+
"@salesforce/lds-network-adapter": "^1.337.0",
|
|
46
|
+
"@salesforce/lds-network-nimbus": "^1.337.0",
|
|
47
|
+
"@salesforce/lds-store-binary": "^1.337.0",
|
|
48
|
+
"@salesforce/lds-store-nimbus": "^1.337.0",
|
|
49
|
+
"@salesforce/lds-store-sql": "^1.337.0",
|
|
50
|
+
"@salesforce/lds-utils-adapters": "^1.337.0",
|
|
51
|
+
"@salesforce/nimbus-plugin-lds": "^1.337.0",
|
|
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
|
@@ -19,6 +19,7 @@ import { withRegistration, register } from 'force/ldsEngine';
|
|
|
19
19
|
import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation } from 'force/ldsInstrumentation';
|
|
20
20
|
import { HttpStatusCode, setBypassDeepFreeze, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, ingestShape, coerceConfig as coerceConfig$1, typeCheckConfig as typeCheckConfig$h, createResourceParams as createResourceParams$h, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$f, resolveLink, createCustomAdapterEventEmitter, isFileReference, Environment, Luvio, InMemoryStore } from 'force/luvioEngine';
|
|
21
21
|
import { isSupportedEntity, configuration, getObjectInfoAdapterFactory, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, isStoreKeyRecordViewEntity, extractRecordIdFromStoreKey, buildRecordRepKeyFromId, keyBuilderRecord, RecordRepresentationTTL, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, getRecordId18 as getRecordId18$1, getRecordsAdapterFactory as getRecordsAdapterFactory$1, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getObjectInfosAdapterFactory, getObjectInfoDirectoryAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
|
|
22
|
+
import graphqlRecordTypeIdFixGate from '@salesforce/gate/lmr.graphqlRecordTypeIdFix';
|
|
22
23
|
import { Kind as Kind$1, visit as visit$1, isObjectType, defaultFieldResolver, buildSchema, parse as parse$5, extendSchema, isScalarType, execute, print } from 'force/ldsGraphqlParser';
|
|
23
24
|
import FIRST_DAY_OF_WEEK from '@salesforce/i18n/firstDayOfWeek';
|
|
24
25
|
import graphqQueryFieldLimit from '@salesforce/gate/lmr.graphqQueryFieldLimit';
|
|
@@ -28433,13 +28434,27 @@ function convertGraphQLToRaml(astNode, state) {
|
|
|
28433
28434
|
? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H)
|
|
28434
28435
|
: new Map();
|
|
28435
28436
|
const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
|
|
28437
|
+
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
28438
|
+
if (graphqlRecordTypeIdFixGate.isOpen({ fallback: false }) &&
|
|
28439
|
+
recordTypeId &&
|
|
28440
|
+
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
28441
|
+
const fieldName = 'RecordTypeId';
|
|
28442
|
+
fieldsBag[fieldName] = {
|
|
28443
|
+
value: recordTypeId,
|
|
28444
|
+
displayValue: null,
|
|
28445
|
+
};
|
|
28446
|
+
trie.children[fieldName] = {
|
|
28447
|
+
name: fieldName,
|
|
28448
|
+
children: {},
|
|
28449
|
+
};
|
|
28450
|
+
}
|
|
28436
28451
|
const recordRepresentation = {
|
|
28437
28452
|
apiName: data.ApiName,
|
|
28438
28453
|
eTag: '',
|
|
28439
28454
|
lastModifiedById: data.LastModifiedById.value,
|
|
28440
28455
|
lastModifiedDate: data.LastModifiedDate.value,
|
|
28441
28456
|
systemModstamp: data.SystemModstamp.value,
|
|
28442
|
-
recordTypeId:
|
|
28457
|
+
recordTypeId: recordTypeId,
|
|
28443
28458
|
recordTypeInfo: null,
|
|
28444
28459
|
childRelationships: {},
|
|
28445
28460
|
id: data.Id,
|
|
@@ -50408,9 +50423,9 @@ function buildLdsResponse(response) {
|
|
|
50408
50423
|
|
|
50409
50424
|
// so eslint doesn't complain about nimbus
|
|
50410
50425
|
/* global __nimbus */
|
|
50411
|
-
const tasker = idleDetector.declareNotifierTaskMulti('NimbusNetworkAdapter');
|
|
50426
|
+
const tasker$1 = idleDetector.declareNotifierTaskMulti('NimbusNetworkAdapter');
|
|
50412
50427
|
const NimbusNetworkAdapter = (request, resourceRequestContext) => {
|
|
50413
|
-
tasker.add();
|
|
50428
|
+
tasker$1.add();
|
|
50414
50429
|
return new Promise((resolve, reject) => {
|
|
50415
50430
|
try {
|
|
50416
50431
|
__nimbus.plugins.LdsNetworkAdapter.sendRequest(buildNimbusNetworkPluginRequest(request, resourceRequestContext), (response) => {
|
|
@@ -50431,7 +50446,7 @@ const NimbusNetworkAdapter = (request, resourceRequestContext) => {
|
|
|
50431
50446
|
// fails to parse the request), and call reject
|
|
50432
50447
|
reject(error);
|
|
50433
50448
|
}
|
|
50434
|
-
}).finally(() => tasker.done());
|
|
50449
|
+
}).finally(() => tasker$1.done());
|
|
50435
50450
|
};
|
|
50436
50451
|
|
|
50437
50452
|
/**
|
|
@@ -51964,6 +51979,7 @@ class LdsInternalDataTable {
|
|
|
51964
51979
|
}
|
|
51965
51980
|
}
|
|
51966
51981
|
|
|
51982
|
+
const tasker = idleDetector.declareNotifierTaskMulti('NimbusSqliteStore');
|
|
51967
51983
|
class NimbusSqliteStore {
|
|
51968
51984
|
constructor(plugin, additionalTableMap = {}) {
|
|
51969
51985
|
this.plugin = plugin;
|
|
@@ -51977,26 +51993,37 @@ class NimbusSqliteStore {
|
|
|
51977
51993
|
return true;
|
|
51978
51994
|
}
|
|
51979
51995
|
query(sql, params) {
|
|
51996
|
+
tasker.add();
|
|
51980
51997
|
return new Promise((resolve, reject) => {
|
|
51981
51998
|
this.plugin.query(sql, params, (result) => {
|
|
51982
51999
|
resolve(result);
|
|
51983
52000
|
}, (error) => {
|
|
51984
52001
|
reject(error);
|
|
51985
52002
|
});
|
|
51986
|
-
});
|
|
52003
|
+
}).finally(() => tasker.done());
|
|
51987
52004
|
}
|
|
51988
52005
|
batchQuery(queries) {
|
|
51989
52006
|
const promises = queries.map((q) => this.query(q.sql, q.params));
|
|
51990
|
-
|
|
52007
|
+
tasker.add();
|
|
52008
|
+
return Promise.all(promises).finally(() => tasker.done());
|
|
51991
52009
|
}
|
|
51992
52010
|
async getEntries(entryIds, segment) {
|
|
51993
|
-
|
|
52011
|
+
tasker.add();
|
|
52012
|
+
return this.getTable(segment)
|
|
52013
|
+
.getByKeys(entryIds, segment)
|
|
52014
|
+
.finally(() => tasker.done());
|
|
51994
52015
|
}
|
|
51995
52016
|
async getMetadata(entryIds, segment) {
|
|
51996
|
-
|
|
52017
|
+
tasker.add();
|
|
52018
|
+
return this.getTable(segment)
|
|
52019
|
+
.getMetadataByKeys(entryIds, segment)
|
|
52020
|
+
.finally(() => tasker.done());
|
|
51997
52021
|
}
|
|
51998
52022
|
getAllEntries(segment) {
|
|
51999
|
-
|
|
52023
|
+
tasker.add();
|
|
52024
|
+
return this.getTable(segment)
|
|
52025
|
+
.getAll(segment)
|
|
52026
|
+
.finally(() => tasker.done());
|
|
52000
52027
|
}
|
|
52001
52028
|
setEntries(entries, segment) {
|
|
52002
52029
|
if (keys$1(entries).length === 0) {
|
|
@@ -52092,6 +52119,7 @@ class NimbusSqliteStore {
|
|
|
52092
52119
|
};
|
|
52093
52120
|
}
|
|
52094
52121
|
batchOperationAsPromise(sqliteOperations) {
|
|
52122
|
+
tasker.add();
|
|
52095
52123
|
return new Promise((resolve, reject) => {
|
|
52096
52124
|
this.plugin.batchOperations(sqliteOperations, (error) => {
|
|
52097
52125
|
if (error && error !== null) {
|
|
@@ -52101,7 +52129,7 @@ class NimbusSqliteStore {
|
|
|
52101
52129
|
resolve();
|
|
52102
52130
|
}
|
|
52103
52131
|
});
|
|
52104
|
-
});
|
|
52132
|
+
}).finally(() => tasker.done());
|
|
52105
52133
|
}
|
|
52106
52134
|
}
|
|
52107
52135
|
|
|
@@ -54659,7 +54687,7 @@ class SideEffectService {
|
|
|
54659
54687
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
54660
54688
|
const recordFields = {};
|
|
54661
54689
|
for (const fieldName of keys$3(fields)) {
|
|
54662
|
-
const draftField = fields[fieldName];
|
|
54690
|
+
const draftField = fields[fieldName] ?? null;
|
|
54663
54691
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
54664
54692
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
54665
54693
|
if (fieldInfo) {
|
|
@@ -55325,4 +55353,4 @@ register({
|
|
|
55325
55353
|
});
|
|
55326
55354
|
|
|
55327
55355
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
55328
|
-
// version: 1.
|
|
55356
|
+
// version: 1.337.0-d91af1f460
|