@salesforce/lds-runtime-mobile 1.287.0-dev5 → 1.287.0-dev6
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 +24 -30
- package/package.json +16 -16
- package/sfdc/main.js +24 -30
package/dist/main.js
CHANGED
|
@@ -1189,7 +1189,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1189
1189
|
// because we do not want some other code attempting to use the
|
|
1190
1190
|
// in-memory values before the durable store onChanged handler
|
|
1191
1191
|
// calls back and revives the values to in-memory
|
|
1192
|
-
environment.
|
|
1192
|
+
environment.storeDealloc(key);
|
|
1193
1193
|
};
|
|
1194
1194
|
const publishStoreMetadata = function (recordId, storeMetadata) {
|
|
1195
1195
|
validateNotDisposed();
|
|
@@ -12577,7 +12577,7 @@ function applyReferenceLinksToDraft(record, draftMetadata) {
|
|
|
12577
12577
|
const referencedRecord = referencedRecords.get(key);
|
|
12578
12578
|
recordFields[relationshipName] = {
|
|
12579
12579
|
displayValue: null,
|
|
12580
|
-
value: createLink(key),
|
|
12580
|
+
value: createLink$1(key),
|
|
12581
12581
|
};
|
|
12582
12582
|
// for custom objects, we select the 'Name' field
|
|
12583
12583
|
// otherwise we check the object info for name fields.
|
|
@@ -12605,7 +12605,7 @@ function applyReferenceLinksToDraft(record, draftMetadata) {
|
|
|
12605
12605
|
}
|
|
12606
12606
|
return { ...record, fields: recordFields };
|
|
12607
12607
|
}
|
|
12608
|
-
function createLink(key) {
|
|
12608
|
+
function createLink$1(key) {
|
|
12609
12609
|
return { __ref: key };
|
|
12610
12610
|
}
|
|
12611
12611
|
function getReferenceInfoForKey(fieldName, field, luvio, objectInfo) {
|
|
@@ -12620,7 +12620,7 @@ function getReferenceInfoForKey(fieldName, field, luvio, objectInfo) {
|
|
|
12620
12620
|
referenceFieldName: relationshipName,
|
|
12621
12621
|
field: {
|
|
12622
12622
|
displayValue: null,
|
|
12623
|
-
value: createLink(key),
|
|
12623
|
+
value: createLink$1(key),
|
|
12624
12624
|
},
|
|
12625
12625
|
};
|
|
12626
12626
|
}
|
|
@@ -13083,6 +13083,9 @@ function isBackdatingFieldEditable(objectInfo, backdatingFieldName, attributeNam
|
|
|
13083
13083
|
!draftActionFieldNames.includes(backdatingFieldName));
|
|
13084
13084
|
}
|
|
13085
13085
|
|
|
13086
|
+
function createLink(key) {
|
|
13087
|
+
return { __ref: key };
|
|
13088
|
+
}
|
|
13086
13089
|
/**
|
|
13087
13090
|
* Records are stored in the durable store with scalar fields denormalized. This function takes that denoramlized
|
|
13088
13091
|
* durable store record representation and normalizes it back out into the format the the luvio store expects it
|
|
@@ -13093,26 +13096,25 @@ function isBackdatingFieldEditable(objectInfo, backdatingFieldName, attributeNam
|
|
|
13093
13096
|
function normalizeRecordFields(key, entry) {
|
|
13094
13097
|
const { data: record } = entry;
|
|
13095
13098
|
const { fields, links } = record;
|
|
13096
|
-
const
|
|
13099
|
+
const missingFieldLinks = keys$3(links);
|
|
13100
|
+
const fieldNames = keys$3(fields);
|
|
13097
13101
|
const normalizedFields = {};
|
|
13098
13102
|
const returnEntries = {};
|
|
13099
|
-
|
|
13100
|
-
|
|
13103
|
+
// restore fields
|
|
13104
|
+
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
13105
|
+
const fieldName = fieldNames[i];
|
|
13101
13106
|
const field = fields[fieldName];
|
|
13107
|
+
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
13108
|
+
returnEntries[fieldKey] = { data: field };
|
|
13109
|
+
normalizedFields[fieldName] = createLink(fieldKey);
|
|
13110
|
+
}
|
|
13111
|
+
// restore missing fields
|
|
13112
|
+
for (let i = 0, len = missingFieldLinks.length; i < len; i++) {
|
|
13113
|
+
const fieldName = missingFieldLinks[i];
|
|
13102
13114
|
const link = links[fieldName];
|
|
13103
|
-
// field is undefined for missing links
|
|
13104
|
-
if (field !== undefined) {
|
|
13105
|
-
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
13106
|
-
returnEntries[fieldKey] = { data: field };
|
|
13107
|
-
}
|
|
13108
|
-
// we need to restore the undefined __ref node as it is
|
|
13109
|
-
// lost during serialization
|
|
13110
13115
|
if (link.isMissing === true) {
|
|
13111
13116
|
normalizedFields[fieldName] = { ...link, __ref: undefined };
|
|
13112
13117
|
}
|
|
13113
|
-
else {
|
|
13114
|
-
normalizedFields[fieldName] = link;
|
|
13115
|
-
}
|
|
13116
13118
|
}
|
|
13117
13119
|
returnEntries[key] = {
|
|
13118
13120
|
data: assign$3(record, { fields: normalizedFields }),
|
|
@@ -13174,7 +13176,7 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
13174
13176
|
}
|
|
13175
13177
|
}
|
|
13176
13178
|
// we want to preserve fields that are missing nodes
|
|
13177
|
-
if (
|
|
13179
|
+
if (field.isMissing === true) {
|
|
13178
13180
|
links[fieldName] = field;
|
|
13179
13181
|
}
|
|
13180
13182
|
}
|
|
@@ -15962,9 +15964,11 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
|
|
|
15962
15964
|
let apiName = null;
|
|
15963
15965
|
let objectInfo;
|
|
15964
15966
|
if (dataIsRecord(key)) {
|
|
15967
|
+
incomingRecords.delete(key);
|
|
15965
15968
|
apiName = data.apiName;
|
|
15966
15969
|
}
|
|
15967
15970
|
else if (dataIsObjectInfo(key)) {
|
|
15971
|
+
incomingObjectInfos.delete(key);
|
|
15968
15972
|
apiName = data.apiName;
|
|
15969
15973
|
objectInfo = data;
|
|
15970
15974
|
}
|
|
@@ -17649,7 +17653,6 @@ class RecordLoaderGraphQL {
|
|
|
17649
17653
|
}, {});
|
|
17650
17654
|
fields['Id'] = { value: id, displayValue: null };
|
|
17651
17655
|
fields['RecordTypeId'] = { value: recordTypeId, displayValue: null };
|
|
17652
|
-
const links = this.generateFieldLinks(id, [...requestedFields, 'Id', 'RecordTypeId']);
|
|
17653
17656
|
return {
|
|
17654
17657
|
apiName: node[`${requiredPrefix}ApiName`],
|
|
17655
17658
|
childRelationships: {},
|
|
@@ -17671,18 +17674,9 @@ class RecordLoaderGraphQL {
|
|
|
17671
17674
|
: null,
|
|
17672
17675
|
weakEtag: node[`${requiredPrefix}WeakEtag`],
|
|
17673
17676
|
fields,
|
|
17674
|
-
links,
|
|
17677
|
+
links: {},
|
|
17675
17678
|
};
|
|
17676
17679
|
}
|
|
17677
|
-
generateFieldLinks(id, fields) {
|
|
17678
|
-
const links = {};
|
|
17679
|
-
for (const field of fields) {
|
|
17680
|
-
links[field] = {
|
|
17681
|
-
__ref: `UiApi::RecordRepresentation:${id}__fields__${field}`,
|
|
17682
|
-
};
|
|
17683
|
-
}
|
|
17684
|
-
return links;
|
|
17685
|
-
}
|
|
17686
17680
|
}
|
|
17687
17681
|
|
|
17688
17682
|
class RecordIngestor {
|
|
@@ -18281,4 +18275,4 @@ register({
|
|
|
18281
18275
|
});
|
|
18282
18276
|
|
|
18283
18277
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
18284
|
-
// version: 1.287.0-
|
|
18278
|
+
// version: 1.287.0-dev6-7a58207df
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.287.0-
|
|
3
|
+
"version": "1.287.0-dev6",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,25 +32,25 @@
|
|
|
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.287.0-
|
|
36
|
-
"@salesforce/lds-bindings": "^1.287.0-
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.287.0-
|
|
38
|
-
"@salesforce/lds-priming": "^1.287.0-
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.287.0-dev6",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.287.0-dev6",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.287.0-dev6",
|
|
38
|
+
"@salesforce/lds-priming": "^1.287.0-dev6",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "250.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.287.0-
|
|
44
|
-
"@salesforce/lds-drafts": "^1.287.0-
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.287.0-
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.287.0-
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.287.0-
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.287.0-
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.287.0-
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.287.0-
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.287.0-
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.287.0-
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.287.0-
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.287.0-dev6",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.287.0-dev6",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.287.0-dev6",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.287.0-dev6",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.287.0-dev6",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.287.0-dev6",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.287.0-dev6",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.287.0-dev6",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.287.0-dev6",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.287.0-dev6",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.287.0-dev6",
|
|
54
54
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
55
55
|
"wait-for-expect": "^3.0.2"
|
|
56
56
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -1189,7 +1189,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1189
1189
|
// because we do not want some other code attempting to use the
|
|
1190
1190
|
// in-memory values before the durable store onChanged handler
|
|
1191
1191
|
// calls back and revives the values to in-memory
|
|
1192
|
-
environment.
|
|
1192
|
+
environment.storeDealloc(key);
|
|
1193
1193
|
};
|
|
1194
1194
|
const publishStoreMetadata = function (recordId, storeMetadata) {
|
|
1195
1195
|
validateNotDisposed();
|
|
@@ -12577,7 +12577,7 @@ function applyReferenceLinksToDraft(record, draftMetadata) {
|
|
|
12577
12577
|
const referencedRecord = referencedRecords.get(key);
|
|
12578
12578
|
recordFields[relationshipName] = {
|
|
12579
12579
|
displayValue: null,
|
|
12580
|
-
value: createLink(key),
|
|
12580
|
+
value: createLink$1(key),
|
|
12581
12581
|
};
|
|
12582
12582
|
// for custom objects, we select the 'Name' field
|
|
12583
12583
|
// otherwise we check the object info for name fields.
|
|
@@ -12605,7 +12605,7 @@ function applyReferenceLinksToDraft(record, draftMetadata) {
|
|
|
12605
12605
|
}
|
|
12606
12606
|
return { ...record, fields: recordFields };
|
|
12607
12607
|
}
|
|
12608
|
-
function createLink(key) {
|
|
12608
|
+
function createLink$1(key) {
|
|
12609
12609
|
return { __ref: key };
|
|
12610
12610
|
}
|
|
12611
12611
|
function getReferenceInfoForKey(fieldName, field, luvio, objectInfo) {
|
|
@@ -12620,7 +12620,7 @@ function getReferenceInfoForKey(fieldName, field, luvio, objectInfo) {
|
|
|
12620
12620
|
referenceFieldName: relationshipName,
|
|
12621
12621
|
field: {
|
|
12622
12622
|
displayValue: null,
|
|
12623
|
-
value: createLink(key),
|
|
12623
|
+
value: createLink$1(key),
|
|
12624
12624
|
},
|
|
12625
12625
|
};
|
|
12626
12626
|
}
|
|
@@ -13083,6 +13083,9 @@ function isBackdatingFieldEditable(objectInfo, backdatingFieldName, attributeNam
|
|
|
13083
13083
|
!draftActionFieldNames.includes(backdatingFieldName));
|
|
13084
13084
|
}
|
|
13085
13085
|
|
|
13086
|
+
function createLink(key) {
|
|
13087
|
+
return { __ref: key };
|
|
13088
|
+
}
|
|
13086
13089
|
/**
|
|
13087
13090
|
* Records are stored in the durable store with scalar fields denormalized. This function takes that denoramlized
|
|
13088
13091
|
* durable store record representation and normalizes it back out into the format the the luvio store expects it
|
|
@@ -13093,26 +13096,25 @@ function isBackdatingFieldEditable(objectInfo, backdatingFieldName, attributeNam
|
|
|
13093
13096
|
function normalizeRecordFields(key, entry) {
|
|
13094
13097
|
const { data: record } = entry;
|
|
13095
13098
|
const { fields, links } = record;
|
|
13096
|
-
const
|
|
13099
|
+
const missingFieldLinks = keys$3(links);
|
|
13100
|
+
const fieldNames = keys$3(fields);
|
|
13097
13101
|
const normalizedFields = {};
|
|
13098
13102
|
const returnEntries = {};
|
|
13099
|
-
|
|
13100
|
-
|
|
13103
|
+
// restore fields
|
|
13104
|
+
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
13105
|
+
const fieldName = fieldNames[i];
|
|
13101
13106
|
const field = fields[fieldName];
|
|
13107
|
+
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
13108
|
+
returnEntries[fieldKey] = { data: field };
|
|
13109
|
+
normalizedFields[fieldName] = createLink(fieldKey);
|
|
13110
|
+
}
|
|
13111
|
+
// restore missing fields
|
|
13112
|
+
for (let i = 0, len = missingFieldLinks.length; i < len; i++) {
|
|
13113
|
+
const fieldName = missingFieldLinks[i];
|
|
13102
13114
|
const link = links[fieldName];
|
|
13103
|
-
// field is undefined for missing links
|
|
13104
|
-
if (field !== undefined) {
|
|
13105
|
-
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
13106
|
-
returnEntries[fieldKey] = { data: field };
|
|
13107
|
-
}
|
|
13108
|
-
// we need to restore the undefined __ref node as it is
|
|
13109
|
-
// lost during serialization
|
|
13110
13115
|
if (link.isMissing === true) {
|
|
13111
13116
|
normalizedFields[fieldName] = { ...link, __ref: undefined };
|
|
13112
13117
|
}
|
|
13113
|
-
else {
|
|
13114
|
-
normalizedFields[fieldName] = link;
|
|
13115
|
-
}
|
|
13116
13118
|
}
|
|
13117
13119
|
returnEntries[key] = {
|
|
13118
13120
|
data: assign$3(record, { fields: normalizedFields }),
|
|
@@ -13174,7 +13176,7 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
13174
13176
|
}
|
|
13175
13177
|
}
|
|
13176
13178
|
// we want to preserve fields that are missing nodes
|
|
13177
|
-
if (
|
|
13179
|
+
if (field.isMissing === true) {
|
|
13178
13180
|
links[fieldName] = field;
|
|
13179
13181
|
}
|
|
13180
13182
|
}
|
|
@@ -15962,9 +15964,11 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
|
|
|
15962
15964
|
let apiName = null;
|
|
15963
15965
|
let objectInfo;
|
|
15964
15966
|
if (dataIsRecord(key)) {
|
|
15967
|
+
incomingRecords.delete(key);
|
|
15965
15968
|
apiName = data.apiName;
|
|
15966
15969
|
}
|
|
15967
15970
|
else if (dataIsObjectInfo(key)) {
|
|
15971
|
+
incomingObjectInfos.delete(key);
|
|
15968
15972
|
apiName = data.apiName;
|
|
15969
15973
|
objectInfo = data;
|
|
15970
15974
|
}
|
|
@@ -17649,7 +17653,6 @@ class RecordLoaderGraphQL {
|
|
|
17649
17653
|
}, {});
|
|
17650
17654
|
fields['Id'] = { value: id, displayValue: null };
|
|
17651
17655
|
fields['RecordTypeId'] = { value: recordTypeId, displayValue: null };
|
|
17652
|
-
const links = this.generateFieldLinks(id, [...requestedFields, 'Id', 'RecordTypeId']);
|
|
17653
17656
|
return {
|
|
17654
17657
|
apiName: node[`${requiredPrefix}ApiName`],
|
|
17655
17658
|
childRelationships: {},
|
|
@@ -17671,18 +17674,9 @@ class RecordLoaderGraphQL {
|
|
|
17671
17674
|
: null,
|
|
17672
17675
|
weakEtag: node[`${requiredPrefix}WeakEtag`],
|
|
17673
17676
|
fields,
|
|
17674
|
-
links,
|
|
17677
|
+
links: {},
|
|
17675
17678
|
};
|
|
17676
17679
|
}
|
|
17677
|
-
generateFieldLinks(id, fields) {
|
|
17678
|
-
const links = {};
|
|
17679
|
-
for (const field of fields) {
|
|
17680
|
-
links[field] = {
|
|
17681
|
-
__ref: `UiApi::RecordRepresentation:${id}__fields__${field}`,
|
|
17682
|
-
};
|
|
17683
|
-
}
|
|
17684
|
-
return links;
|
|
17685
|
-
}
|
|
17686
17680
|
}
|
|
17687
17681
|
|
|
17688
17682
|
class RecordIngestor {
|
|
@@ -18281,4 +18275,4 @@ register({
|
|
|
18281
18275
|
});
|
|
18282
18276
|
|
|
18283
18277
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
18284
|
-
// version: 1.287.0-
|
|
18278
|
+
// version: 1.287.0-dev6-7a58207df
|