@salesforce/lds-runtime-bridge 1.266.0-dev17 → 1.266.0-dev19
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/ldsRuntimeBridge.js +26 -10
- package/package.json +8 -8
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -3349,6 +3349,12 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
3349
3349
|
break;
|
|
3350
3350
|
case 'LastModifiedDate':
|
|
3351
3351
|
field.resolve = ({ recordRepresentation: record }) => {
|
|
3352
|
+
// In UIAPI record reps, LastModifiedDate might be present as a field,
|
|
3353
|
+
// which will include both the value and displayValue
|
|
3354
|
+
if (record.fields['LastModifiedDate']) {
|
|
3355
|
+
return record.fields['LastModifiedDate'];
|
|
3356
|
+
}
|
|
3357
|
+
// If the field is not present, just return the value of the root property
|
|
3352
3358
|
return record.lastModifiedDate
|
|
3353
3359
|
? { value: record.lastModifiedDate }
|
|
3354
3360
|
: null;
|
|
@@ -3383,16 +3389,26 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
3383
3389
|
: null;
|
|
3384
3390
|
};
|
|
3385
3391
|
const { recordRepresentation: record, ingestionTimestamp } = obj;
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
if (
|
|
3392
|
+
let id = undefined;
|
|
3393
|
+
if (field.name === 'RecordType') {
|
|
3394
|
+
// RecordTypeId has special handling during ingest and is
|
|
3395
|
+
// not in record.fields, so check for it at the UIAPI root property location
|
|
3396
|
+
id = record.recordTypeId;
|
|
3397
|
+
}
|
|
3398
|
+
else if (field.name.endsWith('__r')) {
|
|
3399
|
+
// Custom relationships end in `__r` and the corresponding ID field should be `__c`
|
|
3400
|
+
let fieldName = field.name.replace('__r', '__c');
|
|
3401
|
+
id = record.fields[fieldName] && record.fields[fieldName].value;
|
|
3402
|
+
}
|
|
3403
|
+
else {
|
|
3404
|
+
// Standard relationships are just FieldNameId
|
|
3405
|
+
let fieldName = field.name + 'Id';
|
|
3406
|
+
id = record.fields[fieldName] && record.fields[fieldName].value;
|
|
3407
|
+
}
|
|
3408
|
+
if (!id || typeof id !== 'string') {
|
|
3409
|
+
// possibly field injection did not inject the necessary Id field
|
|
3410
|
+
// for the relationship, or we found a non-string value.
|
|
3393
3411
|
return null;
|
|
3394
|
-
if (id['__ref'] !== undefined) {
|
|
3395
|
-
return fetchRecordOrNull(record.fields[`${field.name}Id`].value);
|
|
3396
3412
|
}
|
|
3397
3413
|
seenRecordIds.add(id);
|
|
3398
3414
|
return fetchRecordOrNull(id);
|
|
@@ -3987,4 +4003,4 @@ function ldsRuntimeBridge() {
|
|
|
3987
4003
|
}
|
|
3988
4004
|
|
|
3989
4005
|
export { ldsRuntimeBridge as default };
|
|
3990
|
-
// version: 1.266.0-
|
|
4006
|
+
// version: 1.266.0-dev19-80cc21d89
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-bridge",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev19",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for bridge.app.",
|
|
6
6
|
"main": "dist/ldsRuntimeBridge.js",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-bridge"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@salesforce/lds-adapters-uiapi": "^1.266.0-
|
|
38
|
-
"@salesforce/lds-instrumentation": "^1.266.0-
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev19",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev19",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "244.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-
|
|
44
|
-
"@salesforce/lds-network-aura": "^1.266.0-
|
|
45
|
-
"@salesforce/lds-runtime-aura": "^1.266.0-
|
|
46
|
-
"@salesforce/lds-store-nimbus": "^1.266.0-
|
|
47
|
-
"@salesforce/nimbus-plugin-lds": "^1.266.0-
|
|
43
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-dev19",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.266.0-dev19",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.266.0-dev19",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.266.0-dev19",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev19",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|