@salesforce/lds-ads-bridge 1.273.1 → 1.274.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/ads-bridge-perf.js +141 -141
- package/dist/adsBridge.js +1 -1
- package/package.json +3 -3
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -479,7 +479,7 @@ const callbacks$1 = [];
|
|
|
479
479
|
function register(r) {
|
|
480
480
|
callbacks$1.forEach((callback) => callback(r));
|
|
481
481
|
}
|
|
482
|
-
// version: 1.
|
|
482
|
+
// version: 1.274.0-67da496e8
|
|
483
483
|
|
|
484
484
|
/**
|
|
485
485
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -4920,8 +4920,8 @@ function toSortedStringArray(value) {
|
|
|
4920
4920
|
return undefined;
|
|
4921
4921
|
}
|
|
4922
4922
|
|
|
4923
|
-
const VERSION$
|
|
4924
|
-
function validate$
|
|
4923
|
+
const VERSION$2l = "d1e589a127fb1060c89070cdb6f500b2";
|
|
4924
|
+
function validate$1S(obj, path = 'RecordTypeInfoRepresentation') {
|
|
4925
4925
|
const v_error = (() => {
|
|
4926
4926
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4927
4927
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4954,10 +4954,10 @@ function validate$1Q(obj, path = 'RecordTypeInfoRepresentation') {
|
|
|
4954
4954
|
})();
|
|
4955
4955
|
return v_error === undefined ? null : v_error;
|
|
4956
4956
|
}
|
|
4957
|
-
const select$
|
|
4957
|
+
const select$2_ = function RecordTypeInfoRepresentationSelect() {
|
|
4958
4958
|
return {
|
|
4959
4959
|
kind: 'Fragment',
|
|
4960
|
-
version: VERSION$
|
|
4960
|
+
version: VERSION$2l,
|
|
4961
4961
|
private: [],
|
|
4962
4962
|
selections: [
|
|
4963
4963
|
{
|
|
@@ -4983,7 +4983,7 @@ const select$2X = function RecordTypeInfoRepresentationSelect() {
|
|
|
4983
4983
|
]
|
|
4984
4984
|
};
|
|
4985
4985
|
};
|
|
4986
|
-
function equals$
|
|
4986
|
+
function equals$16(existing, incoming) {
|
|
4987
4987
|
const existing_available = existing.available;
|
|
4988
4988
|
const incoming_available = incoming.available;
|
|
4989
4989
|
if (!(existing_available === incoming_available)) {
|
|
@@ -5012,8 +5012,8 @@ function equals$14(existing, incoming) {
|
|
|
5012
5012
|
return true;
|
|
5013
5013
|
}
|
|
5014
5014
|
|
|
5015
|
-
const VERSION$
|
|
5016
|
-
function validate$
|
|
5015
|
+
const VERSION$2k = "195d918987a35f45e1aa4dce9a11d8c5";
|
|
5016
|
+
function validate$1R(obj, path = 'FieldValueRepresentation') {
|
|
5017
5017
|
const v_error = (() => {
|
|
5018
5018
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5019
5019
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5103,11 +5103,11 @@ function validate$1P(obj, path = 'FieldValueRepresentation') {
|
|
|
5103
5103
|
})();
|
|
5104
5104
|
return v_error === undefined ? null : v_error;
|
|
5105
5105
|
}
|
|
5106
|
-
const RepresentationType
|
|
5107
|
-
const select$
|
|
5106
|
+
const RepresentationType$$ = 'FieldValueRepresentation';
|
|
5107
|
+
const select$2Z = function FieldValueRepresentationSelect() {
|
|
5108
5108
|
return {
|
|
5109
5109
|
kind: 'Fragment',
|
|
5110
|
-
version: VERSION$
|
|
5110
|
+
version: VERSION$2k,
|
|
5111
5111
|
private: [],
|
|
5112
5112
|
selections: [
|
|
5113
5113
|
{
|
|
@@ -5118,12 +5118,12 @@ const select$2W = function FieldValueRepresentationSelect() {
|
|
|
5118
5118
|
name: 'value',
|
|
5119
5119
|
kind: 'Link',
|
|
5120
5120
|
nullable: true,
|
|
5121
|
-
fragment: select$
|
|
5121
|
+
fragment: select$2X()
|
|
5122
5122
|
}
|
|
5123
5123
|
]
|
|
5124
5124
|
};
|
|
5125
5125
|
};
|
|
5126
|
-
function equals$
|
|
5126
|
+
function equals$15(existing, incoming) {
|
|
5127
5127
|
const existing_displayValue = existing.displayValue;
|
|
5128
5128
|
const incoming_displayValue = incoming.displayValue;
|
|
5129
5129
|
if (!(existing_displayValue === incoming_displayValue)) {
|
|
@@ -5141,26 +5141,26 @@ function equals$13(existing, incoming) {
|
|
|
5141
5141
|
}
|
|
5142
5142
|
return true;
|
|
5143
5143
|
}
|
|
5144
|
-
function getTypeCacheKeys$
|
|
5144
|
+
function getTypeCacheKeys$1$(rootKeySet, luvio, input, fullPathFactory) {
|
|
5145
5145
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5146
5146
|
const rootKey = fullPathFactory();
|
|
5147
5147
|
rootKeySet.set(rootKey, {
|
|
5148
5148
|
namespace: keyPrefix,
|
|
5149
|
-
representationName: RepresentationType
|
|
5149
|
+
representationName: RepresentationType$$,
|
|
5150
5150
|
mergeable: false
|
|
5151
5151
|
});
|
|
5152
5152
|
if (input.value !== null && typeof input.value === 'object') {
|
|
5153
|
-
getTypeCacheKeys$
|
|
5153
|
+
getTypeCacheKeys$1_(rootKeySet, luvio, input.value);
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
5156
5156
|
|
|
5157
5157
|
// we override the generated so we can set "mergeable: true" on the root key
|
|
5158
|
-
const getTypeCacheKeys$
|
|
5158
|
+
const getTypeCacheKeys$1_ = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
5159
5159
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5160
|
-
const rootKey = keyBuilderFromType$
|
|
5160
|
+
const rootKey = keyBuilderFromType$C(luvio, input);
|
|
5161
5161
|
rootKeySet.set(rootKey, {
|
|
5162
5162
|
namespace: keyPrefix,
|
|
5163
|
-
representationName: RepresentationType$
|
|
5163
|
+
representationName: RepresentationType$Z,
|
|
5164
5164
|
mergeable: true,
|
|
5165
5165
|
});
|
|
5166
5166
|
const input_childRelationships = input.childRelationships;
|
|
@@ -5168,21 +5168,21 @@ const getTypeCacheKeys$1Y = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
5168
5168
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
5169
5169
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
5170
5170
|
const key = input_childRelationships_keys[i];
|
|
5171
|
-
getTypeCacheKeys$
|
|
5171
|
+
getTypeCacheKeys$1Z(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
5172
5172
|
}
|
|
5173
5173
|
const input_fields = input.fields;
|
|
5174
5174
|
const input_fields_keys = keys$1(input_fields);
|
|
5175
5175
|
const input_fields_length = input_fields_keys.length;
|
|
5176
5176
|
for (let i = 0; i < input_fields_length; i++) {
|
|
5177
5177
|
const key = input_fields_keys[i];
|
|
5178
|
-
getTypeCacheKeys$
|
|
5178
|
+
getTypeCacheKeys$1$(rootKeySet, luvio, input_fields[key], () => rootKey + '__fields__' + key);
|
|
5179
5179
|
}
|
|
5180
5180
|
return rootKeySet;
|
|
5181
5181
|
};
|
|
5182
5182
|
|
|
5183
5183
|
const TTL$E = 120000;
|
|
5184
|
-
const VERSION$
|
|
5185
|
-
function validate$
|
|
5184
|
+
const VERSION$2j = "79cb5ac9f44542f683d00245fdfe500d";
|
|
5185
|
+
function validate$1Q(obj, path = 'RecordCollectionRepresentation') {
|
|
5186
5186
|
const v_error = (() => {
|
|
5187
5187
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5188
5188
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5342,14 +5342,14 @@ function validate$1O(obj, path = 'RecordCollectionRepresentation') {
|
|
|
5342
5342
|
})();
|
|
5343
5343
|
return v_error === undefined ? null : v_error;
|
|
5344
5344
|
}
|
|
5345
|
-
const RepresentationType$
|
|
5346
|
-
function normalize$
|
|
5345
|
+
const RepresentationType$_ = 'RecordCollectionRepresentation';
|
|
5346
|
+
function normalize$S(input, existing, path, luvio, store, timestamp) {
|
|
5347
5347
|
const input_records = input.records;
|
|
5348
5348
|
const input_records_id = path.fullPath + '__records';
|
|
5349
5349
|
for (let i = 0; i < input_records.length; i++) {
|
|
5350
5350
|
const input_records_item = input_records[i];
|
|
5351
5351
|
let input_records_item_id = input_records_id + '__' + i;
|
|
5352
|
-
input_records[i] = ingest$
|
|
5352
|
+
input_records[i] = ingest$1V(input_records_item, {
|
|
5353
5353
|
fullPath: input_records_item_id,
|
|
5354
5354
|
propertyName: i,
|
|
5355
5355
|
parent: {
|
|
@@ -5362,10 +5362,10 @@ function normalize$Q(input, existing, path, luvio, store, timestamp) {
|
|
|
5362
5362
|
}
|
|
5363
5363
|
return input;
|
|
5364
5364
|
}
|
|
5365
|
-
const select$
|
|
5365
|
+
const select$2Y = function RecordCollectionRepresentationSelect() {
|
|
5366
5366
|
return {
|
|
5367
5367
|
kind: 'Fragment',
|
|
5368
|
-
version: VERSION$
|
|
5368
|
+
version: VERSION$2j,
|
|
5369
5369
|
private: [],
|
|
5370
5370
|
selections: [
|
|
5371
5371
|
{
|
|
@@ -5400,12 +5400,12 @@ const select$2V = function RecordCollectionRepresentationSelect() {
|
|
|
5400
5400
|
name: 'records',
|
|
5401
5401
|
kind: 'Link',
|
|
5402
5402
|
plural: true,
|
|
5403
|
-
fragment: select$
|
|
5403
|
+
fragment: select$2X()
|
|
5404
5404
|
}
|
|
5405
5405
|
]
|
|
5406
5406
|
};
|
|
5407
5407
|
};
|
|
5408
|
-
function equals$
|
|
5408
|
+
function equals$14(existing, incoming) {
|
|
5409
5409
|
const existing_count = existing.count;
|
|
5410
5410
|
const incoming_count = incoming.count;
|
|
5411
5411
|
if (!(existing_count === incoming_count)) {
|
|
@@ -5453,45 +5453,45 @@ function equals$12(existing, incoming) {
|
|
|
5453
5453
|
}
|
|
5454
5454
|
return true;
|
|
5455
5455
|
}
|
|
5456
|
-
const ingest$
|
|
5456
|
+
const ingest$1W = function RecordCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5457
5457
|
if (process.env.NODE_ENV !== 'production') {
|
|
5458
|
-
const validateError = validate$
|
|
5458
|
+
const validateError = validate$1Q(input);
|
|
5459
5459
|
if (validateError !== null) {
|
|
5460
5460
|
throw validateError;
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
const key = path.fullPath;
|
|
5464
5464
|
const ttlToUse = TTL$E;
|
|
5465
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5465
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$S, "UiApi", VERSION$2j, RepresentationType$_, equals$14);
|
|
5466
5466
|
return createLink$1(key);
|
|
5467
5467
|
};
|
|
5468
|
-
function getTypeCacheKeys$
|
|
5468
|
+
function getTypeCacheKeys$1Z(rootKeySet, luvio, input, fullPathFactory) {
|
|
5469
5469
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5470
5470
|
const rootKey = fullPathFactory();
|
|
5471
5471
|
rootKeySet.set(rootKey, {
|
|
5472
5472
|
namespace: keyPrefix,
|
|
5473
|
-
representationName: RepresentationType$
|
|
5473
|
+
representationName: RepresentationType$_,
|
|
5474
5474
|
mergeable: false
|
|
5475
5475
|
});
|
|
5476
5476
|
const input_records_length = input.records.length;
|
|
5477
5477
|
for (let i = 0; i < input_records_length; i++) {
|
|
5478
|
-
getTypeCacheKeys$
|
|
5478
|
+
getTypeCacheKeys$1_(rootKeySet, luvio, input.records[i]);
|
|
5479
5479
|
}
|
|
5480
5480
|
}
|
|
5481
5481
|
|
|
5482
5482
|
const VIEW_ENTITY_API_NAME = 'Name';
|
|
5483
5483
|
const VIEW_ENTITY_KEY_PREFIX = `${keyPrefix}::RecordViewEntityRepresentation:${VIEW_ENTITY_API_NAME}:`;
|
|
5484
|
-
const keyBuilderFromType$
|
|
5484
|
+
const keyBuilderFromType$D = function RecordRepresentationKeyBuilderFromType(luvio, object) {
|
|
5485
5485
|
const { apiName, id } = object;
|
|
5486
5486
|
if (apiName === VIEW_ENTITY_API_NAME) {
|
|
5487
5487
|
return VIEW_ENTITY_KEY_PREFIX + id;
|
|
5488
5488
|
}
|
|
5489
|
-
return keyBuilderFromType$
|
|
5489
|
+
return keyBuilderFromType$C(luvio, object);
|
|
5490
5490
|
};
|
|
5491
5491
|
|
|
5492
5492
|
const TTL$D = 30000;
|
|
5493
|
-
const VERSION$
|
|
5494
|
-
function validate$
|
|
5493
|
+
const VERSION$2i = "98c5b18512e48ca8d28727549507e4ba";
|
|
5494
|
+
function validate$1P(obj, path = 'RecordRepresentation') {
|
|
5495
5495
|
const v_error = (() => {
|
|
5496
5496
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5497
5497
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5621,7 +5621,7 @@ function validate$1N(obj, path = 'RecordRepresentation') {
|
|
|
5621
5621
|
const path_recordTypeInfo = path + '.recordTypeInfo';
|
|
5622
5622
|
let obj_recordTypeInfo_union0 = null;
|
|
5623
5623
|
const obj_recordTypeInfo_union0_error = (() => {
|
|
5624
|
-
const referencepath_recordTypeInfoValidationError = validate$
|
|
5624
|
+
const referencepath_recordTypeInfoValidationError = validate$1S(obj_recordTypeInfo, path_recordTypeInfo);
|
|
5625
5625
|
if (referencepath_recordTypeInfoValidationError !== null) {
|
|
5626
5626
|
let message = 'Object doesn\'t match RecordTypeInfoRepresentation (at "' + path_recordTypeInfo + '")\n';
|
|
5627
5627
|
message += referencepath_recordTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5680,15 +5680,15 @@ function validate$1N(obj, path = 'RecordRepresentation') {
|
|
|
5680
5680
|
})();
|
|
5681
5681
|
return v_error === undefined ? null : v_error;
|
|
5682
5682
|
}
|
|
5683
|
-
const RepresentationType$
|
|
5684
|
-
function keyBuilder$
|
|
5685
|
-
return keyPrefix + '::' + RepresentationType$
|
|
5683
|
+
const RepresentationType$Z = 'RecordRepresentation';
|
|
5684
|
+
function keyBuilder$3g(luvio, config) {
|
|
5685
|
+
return keyPrefix + '::' + RepresentationType$Z + ':' + config.recordId;
|
|
5686
5686
|
}
|
|
5687
|
-
function keyBuilderFromType$
|
|
5687
|
+
function keyBuilderFromType$C(luvio, object) {
|
|
5688
5688
|
const keyParams = {
|
|
5689
5689
|
recordId: object.id
|
|
5690
5690
|
};
|
|
5691
|
-
return keyBuilder$
|
|
5691
|
+
return keyBuilder$3g(luvio, keyParams);
|
|
5692
5692
|
}
|
|
5693
5693
|
function dynamicNormalize$5(ingestParams) {
|
|
5694
5694
|
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
@@ -5733,11 +5733,11 @@ function dynamicNormalize$5(ingestParams) {
|
|
|
5733
5733
|
return input;
|
|
5734
5734
|
};
|
|
5735
5735
|
}
|
|
5736
|
-
const select$
|
|
5737
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
5736
|
+
const select$2X = function RecordRepresentationSelect() {
|
|
5737
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2_();
|
|
5738
5738
|
return {
|
|
5739
5739
|
kind: 'Fragment',
|
|
5740
|
-
version: VERSION$
|
|
5740
|
+
version: VERSION$2i,
|
|
5741
5741
|
private: [
|
|
5742
5742
|
'eTag',
|
|
5743
5743
|
'weakEtag'
|
|
@@ -5751,13 +5751,13 @@ const select$2U = function RecordRepresentationSelect() {
|
|
|
5751
5751
|
name: 'childRelationships',
|
|
5752
5752
|
kind: 'Link',
|
|
5753
5753
|
map: true,
|
|
5754
|
-
fragment: select$
|
|
5754
|
+
fragment: select$2Y()
|
|
5755
5755
|
},
|
|
5756
5756
|
{
|
|
5757
5757
|
name: 'fields',
|
|
5758
5758
|
kind: 'Link',
|
|
5759
5759
|
map: true,
|
|
5760
|
-
fragment: select$
|
|
5760
|
+
fragment: select$2Z()
|
|
5761
5761
|
},
|
|
5762
5762
|
{
|
|
5763
5763
|
name: 'id',
|
|
@@ -5793,18 +5793,18 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
5793
5793
|
name: 'childRelationships',
|
|
5794
5794
|
kind: 'Link',
|
|
5795
5795
|
map: true,
|
|
5796
|
-
fragment: select$
|
|
5796
|
+
fragment: select$2Y()
|
|
5797
5797
|
} : params.childRelationships;
|
|
5798
5798
|
const fieldsPathSelection = params.fields === undefined ? {
|
|
5799
5799
|
name: 'fields',
|
|
5800
5800
|
kind: 'Link',
|
|
5801
5801
|
map: true,
|
|
5802
|
-
fragment: select$
|
|
5802
|
+
fragment: select$2Z()
|
|
5803
5803
|
} : params.fields;
|
|
5804
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
5804
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2_();
|
|
5805
5805
|
return {
|
|
5806
5806
|
kind: 'Fragment',
|
|
5807
|
-
version: VERSION$
|
|
5807
|
+
version: VERSION$2i,
|
|
5808
5808
|
private: [
|
|
5809
5809
|
'eTag',
|
|
5810
5810
|
'weakEtag'
|
|
@@ -5845,7 +5845,7 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
5845
5845
|
]
|
|
5846
5846
|
};
|
|
5847
5847
|
};
|
|
5848
|
-
function equals$
|
|
5848
|
+
function equals$13(existing, incoming) {
|
|
5849
5849
|
const existing_weakEtag = existing.weakEtag;
|
|
5850
5850
|
const incoming_weakEtag = incoming.weakEtag;
|
|
5851
5851
|
if (!(existing_weakEtag === incoming_weakEtag)) {
|
|
@@ -5906,7 +5906,7 @@ function equals$11(existing, incoming) {
|
|
|
5906
5906
|
if (!(existing_recordTypeInfo === incoming_recordTypeInfo
|
|
5907
5907
|
|| (existing_recordTypeInfo != null &&
|
|
5908
5908
|
incoming_recordTypeInfo != null &&
|
|
5909
|
-
equals$
|
|
5909
|
+
equals$16(existing_recordTypeInfo, incoming_recordTypeInfo)))) {
|
|
5910
5910
|
return false;
|
|
5911
5911
|
}
|
|
5912
5912
|
const existing_systemModstamp = existing.systemModstamp;
|
|
@@ -7422,7 +7422,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7422
7422
|
kind: 'Fragment',
|
|
7423
7423
|
private: ['eTag', 'weakEtag'],
|
|
7424
7424
|
selections: createRecordSelection(childFieldDefinition),
|
|
7425
|
-
version: VERSION$
|
|
7425
|
+
version: VERSION$2i,
|
|
7426
7426
|
},
|
|
7427
7427
|
};
|
|
7428
7428
|
}
|
|
@@ -7432,7 +7432,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7432
7432
|
required: childFieldDefinition.optional === true ? false : undefined,
|
|
7433
7433
|
fragment: {
|
|
7434
7434
|
kind: 'Fragment',
|
|
7435
|
-
version: VERSION$
|
|
7435
|
+
version: VERSION$2k,
|
|
7436
7436
|
private: [],
|
|
7437
7437
|
selections: [DISPLAY_VALUE_SELECTION, fieldValueSelection],
|
|
7438
7438
|
},
|
|
@@ -7893,7 +7893,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
7893
7893
|
};
|
|
7894
7894
|
}
|
|
7895
7895
|
else {
|
|
7896
|
-
buildNetworkSnapshot$
|
|
7896
|
+
buildNetworkSnapshot$19(luvio, {
|
|
7897
7897
|
recordId: incoming.id,
|
|
7898
7898
|
optionalFields: convertTrieToFields(incomingTrackedFieldsTrieRoot),
|
|
7899
7899
|
});
|
|
@@ -7903,7 +7903,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
7903
7903
|
return existing;
|
|
7904
7904
|
}
|
|
7905
7905
|
function mergeRecordConflict(luvio, incoming, existing, recordConflictMap) {
|
|
7906
|
-
const recordKey = keyBuilder$
|
|
7906
|
+
const recordKey = keyBuilder$3g(luvio, {
|
|
7907
7907
|
recordId: incoming.id,
|
|
7908
7908
|
});
|
|
7909
7909
|
const incomingNode = luvio.wrapNormalizedGraphNode(incoming, recordKey);
|
|
@@ -8058,7 +8058,7 @@ function fixDisplayValue(existing, incoming, path) {
|
|
|
8058
8058
|
}
|
|
8059
8059
|
}
|
|
8060
8060
|
|
|
8061
|
-
function normalize$
|
|
8061
|
+
function normalize$R(input, existing, path, luvio, store, timestamp, fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8062
8062
|
const input_value = input.value;
|
|
8063
8063
|
const input_value_id = path.fullPath + '__value';
|
|
8064
8064
|
if (input_value !== null && typeof input_value === 'object') {
|
|
@@ -8079,14 +8079,14 @@ function normalize$P(input, existing, path, luvio, store, timestamp, fieldsTrie,
|
|
|
8079
8079
|
function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8080
8080
|
return (input, path, luvio, store, timestamp) => {
|
|
8081
8081
|
if (process.env.NODE_ENV !== 'production') {
|
|
8082
|
-
const validateError = validate$
|
|
8082
|
+
const validateError = validate$1R(input);
|
|
8083
8083
|
if (validateError !== null) {
|
|
8084
8084
|
throw validateError;
|
|
8085
8085
|
}
|
|
8086
8086
|
}
|
|
8087
8087
|
const key = path.fullPath;
|
|
8088
8088
|
let existingRecord = store.readEntry(key);
|
|
8089
|
-
let incomingRecord = normalize$
|
|
8089
|
+
let incomingRecord = normalize$R(input, store.readEntry(key), {
|
|
8090
8090
|
fullPath: key,
|
|
8091
8091
|
parent: path.parent,
|
|
8092
8092
|
propertyName: path.propertyName,
|
|
@@ -8094,7 +8094,7 @@ function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
|
8094
8094
|
// read again after children ingested in case of a circular ref
|
|
8095
8095
|
existingRecord = store.readEntry(key);
|
|
8096
8096
|
incomingRecord = merge$2(existingRecord, incomingRecord, luvio, path);
|
|
8097
|
-
if (existingRecord === undefined || equals$
|
|
8097
|
+
if (existingRecord === undefined || equals$15(existingRecord, incomingRecord) === false) {
|
|
8098
8098
|
luvio.storePublish(key, incomingRecord);
|
|
8099
8099
|
}
|
|
8100
8100
|
return createLink$1(key);
|
|
@@ -8164,7 +8164,7 @@ function createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap
|
|
|
8164
8164
|
}
|
|
8165
8165
|
function createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8166
8166
|
return dynamicNormalize$5({
|
|
8167
|
-
childRelationships: ingest$
|
|
8167
|
+
childRelationships: ingest$1W,
|
|
8168
8168
|
fields: createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap),
|
|
8169
8169
|
});
|
|
8170
8170
|
}
|
|
@@ -8172,13 +8172,13 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8172
8172
|
const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
|
|
8173
8173
|
return (input, path, luvio, store, timestamp) => {
|
|
8174
8174
|
if (process.env.NODE_ENV !== 'production') {
|
|
8175
|
-
const validateError = validate$
|
|
8175
|
+
const validateError = validate$1P(input);
|
|
8176
8176
|
if (validateError !== null) {
|
|
8177
8177
|
throw validateError;
|
|
8178
8178
|
}
|
|
8179
8179
|
}
|
|
8180
8180
|
input.eTag = ''; //[W-13724550] Record Reps ALWAYS have '' etag, to be consistent with GraphQL, as it is not queryable via GraphQL.
|
|
8181
|
-
const key = keyBuilderFromType$
|
|
8181
|
+
const key = keyBuilderFromType$D(luvio, input);
|
|
8182
8182
|
let existingRecord = store.readEntry(key);
|
|
8183
8183
|
const recordPath = {
|
|
8184
8184
|
fullPath: key,
|
|
@@ -8190,7 +8190,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8190
8190
|
existingRecord = store.readEntry(key);
|
|
8191
8191
|
incomingRecord = merge$3(existingRecord, incomingRecord, luvio, path, recordConflictMap);
|
|
8192
8192
|
if (existingRecord === undefined ||
|
|
8193
|
-
equals$
|
|
8193
|
+
equals$13(existingRecord, incomingRecord) === false ||
|
|
8194
8194
|
// always publish if existing record has drafts
|
|
8195
8195
|
existingRecord.drafts !==
|
|
8196
8196
|
undefined) {
|
|
@@ -8198,9 +8198,9 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8198
8198
|
}
|
|
8199
8199
|
luvio.publishStoreMetadata(key, {
|
|
8200
8200
|
ttl: TTL$D,
|
|
8201
|
-
representationName: RepresentationType$
|
|
8201
|
+
representationName: RepresentationType$Z,
|
|
8202
8202
|
namespace: keyPrefix,
|
|
8203
|
-
version: VERSION$
|
|
8203
|
+
version: VERSION$2i,
|
|
8204
8204
|
ingestionTimestamp: timestamp,
|
|
8205
8205
|
});
|
|
8206
8206
|
return createLink$1(key);
|
|
@@ -8290,22 +8290,22 @@ function isRestrictedPathCondition(existingPath, path) {
|
|
|
8290
8290
|
(existingPath.includes('/records') && path.includes('/record-ui')));
|
|
8291
8291
|
}
|
|
8292
8292
|
|
|
8293
|
-
const createResourceRequest$
|
|
8293
|
+
const createResourceRequest$1e = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
8294
8294
|
return {
|
|
8295
|
-
...createResourceRequest$
|
|
8295
|
+
...createResourceRequest$1d(config),
|
|
8296
8296
|
fulfill: fulfill,
|
|
8297
8297
|
};
|
|
8298
8298
|
};
|
|
8299
8299
|
|
|
8300
|
-
function keyBuilder$
|
|
8301
|
-
return keyBuilder$
|
|
8300
|
+
function keyBuilder$3f(luvio, params) {
|
|
8301
|
+
return keyBuilder$3g(luvio, {
|
|
8302
8302
|
recordId: params.urlParams.recordId
|
|
8303
8303
|
});
|
|
8304
8304
|
}
|
|
8305
|
-
function getResponseCacheKeys$
|
|
8306
|
-
getTypeCacheKeys$
|
|
8305
|
+
function getResponseCacheKeys$15(storeKeyMap, luvio, resourceParams, response) {
|
|
8306
|
+
getTypeCacheKeys$1_(storeKeyMap, luvio, response);
|
|
8307
8307
|
}
|
|
8308
|
-
function createResourceRequest$
|
|
8308
|
+
function createResourceRequest$1d(config) {
|
|
8309
8309
|
const headers = {};
|
|
8310
8310
|
return {
|
|
8311
8311
|
baseUri: '/services/data/v61.0',
|
|
@@ -8329,17 +8329,17 @@ const getRecord_ConfigPropertyMetadata = [
|
|
|
8329
8329
|
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
8330
8330
|
generateParamConfigMetadata('updateMru', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
8331
8331
|
];
|
|
8332
|
-
const createResourceParams$
|
|
8332
|
+
const createResourceParams$13 = /*#__PURE__*/ createResourceParams(getRecord_ConfigPropertyMetadata);
|
|
8333
8333
|
|
|
8334
8334
|
// used by getUiApiRecordsBatchByRecordIds#selectChildResourceParams
|
|
8335
8335
|
function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
8336
8336
|
return {
|
|
8337
|
-
recordId: keyBuilder$
|
|
8337
|
+
recordId: keyBuilder$3g(luvio, { recordId }),
|
|
8338
8338
|
node: {
|
|
8339
8339
|
kind: 'Fragment',
|
|
8340
8340
|
private: ['eTag', 'weakEtag'],
|
|
8341
8341
|
selections: buildSelectionFromFields(fields, optionalFields),
|
|
8342
|
-
version: VERSION$
|
|
8342
|
+
version: VERSION$2i,
|
|
8343
8343
|
},
|
|
8344
8344
|
variables: {},
|
|
8345
8345
|
};
|
|
@@ -8347,27 +8347,27 @@ function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
|
8347
8347
|
function buildSnapshotRefresh$5(luvio, config) {
|
|
8348
8348
|
return {
|
|
8349
8349
|
config,
|
|
8350
|
-
resolve: () => buildNetworkSnapshot$
|
|
8350
|
+
resolve: () => buildNetworkSnapshot$19(luvio, config),
|
|
8351
8351
|
};
|
|
8352
8352
|
}
|
|
8353
|
-
function prepareRequest$
|
|
8353
|
+
function prepareRequest$7(luvio, config) {
|
|
8354
8354
|
const { recordId, fields } = config;
|
|
8355
8355
|
// Should this go into the coersion logic?
|
|
8356
|
-
const key = keyBuilder$
|
|
8356
|
+
const key = keyBuilder$3f(luvio, createResourceParams$13(config));
|
|
8357
8357
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
8358
8358
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8359
8359
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8360
8360
|
}, config.optionalFields);
|
|
8361
8361
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
8362
|
-
const resourceParams = createResourceParams$
|
|
8362
|
+
const resourceParams = createResourceParams$13({
|
|
8363
8363
|
recordId,
|
|
8364
8364
|
fields,
|
|
8365
8365
|
optionalFields: optionalFields.length > 0 ? optionalFields : undefined,
|
|
8366
8366
|
});
|
|
8367
|
-
const request = createResourceRequest$
|
|
8367
|
+
const request = createResourceRequest$1e(resourceParams);
|
|
8368
8368
|
return { request, key, allTrackedFields, resourceParams };
|
|
8369
8369
|
}
|
|
8370
|
-
function ingestSuccess$
|
|
8370
|
+
function ingestSuccess$V(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8371
8371
|
const { body } = response;
|
|
8372
8372
|
const fields = config.fields === undefined ? [] : config.fields;
|
|
8373
8373
|
const optionalFields = config.optionalFields === undefined ? [] : config.optionalFields;
|
|
@@ -8381,20 +8381,20 @@ function ingestSuccess$U(luvio, config, key, allTrackedFields, response, serverR
|
|
|
8381
8381
|
return luvio.storeLookup(buildRecordSelector(luvio, config.recordId, fields, optionalFields), buildSnapshotRefresh$5(luvio, config));
|
|
8382
8382
|
}
|
|
8383
8383
|
function onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8384
|
-
const snapshot = ingestSuccess$
|
|
8384
|
+
const snapshot = ingestSuccess$V(luvio, config, key, allTrackedFields, response, serverRequestCount);
|
|
8385
8385
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8386
8386
|
}
|
|
8387
|
-
function ingestError$
|
|
8387
|
+
function ingestError$P(luvio, config, key, err) {
|
|
8388
8388
|
const errorSnapshot = luvio.errorSnapshot(err, buildSnapshotRefresh$5(luvio, config));
|
|
8389
8389
|
luvio.storeIngestError(key, errorSnapshot, RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS);
|
|
8390
8390
|
return errorSnapshot;
|
|
8391
8391
|
}
|
|
8392
8392
|
function onResourceError(luvio, config, key, err) {
|
|
8393
|
-
const errorSnapshot = ingestError$
|
|
8393
|
+
const errorSnapshot = ingestError$P(luvio, config, key, err);
|
|
8394
8394
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
8395
8395
|
}
|
|
8396
|
-
function buildNetworkSnapshot$
|
|
8397
|
-
const { request, key, allTrackedFields, resourceParams } = prepareRequest$
|
|
8396
|
+
function buildNetworkSnapshot$19(luvio, config, serverRequestCount = 0, options) {
|
|
8397
|
+
const { request, key, allTrackedFields, resourceParams } = prepareRequest$7(luvio, config);
|
|
8398
8398
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8399
8399
|
// W-11964675 - Condition to dedupe a very specific set of requests for
|
|
8400
8400
|
// Komaci - a batch record request with a single record followed by a single
|
|
@@ -8412,7 +8412,7 @@ function buildNetworkSnapshot$18(luvio, config, serverRequestCount = 0, options)
|
|
|
8412
8412
|
return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
|
|
8413
8413
|
}, () => {
|
|
8414
8414
|
const cache = new StoreKeyMap();
|
|
8415
|
-
getResponseCacheKeys$
|
|
8415
|
+
getResponseCacheKeys$15(cache, luvio, resourceParams, response.body);
|
|
8416
8416
|
return cache;
|
|
8417
8417
|
});
|
|
8418
8418
|
}, (err) => {
|
|
@@ -8426,7 +8426,7 @@ function isSingleBatchRecordResponse(response) {
|
|
|
8426
8426
|
response.results.length === 1);
|
|
8427
8427
|
}
|
|
8428
8428
|
|
|
8429
|
-
const VERSION$
|
|
8429
|
+
const VERSION$2h = "98cce53b8d13b1883d001bbdaab24383";
|
|
8430
8430
|
|
|
8431
8431
|
const nonCachedErrors$8 = ObjectCreate$1(null);
|
|
8432
8432
|
function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount = 0) {
|
|
@@ -8436,7 +8436,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8436
8436
|
const now = Date.now();
|
|
8437
8437
|
for (let index = 0, len = childResourceParamsArray.length; index < len; index += 1) {
|
|
8438
8438
|
const childResourceParams = childResourceParamsArray[index];
|
|
8439
|
-
const childKey = keyBuilder$
|
|
8439
|
+
const childKey = keyBuilder$3f(luvio, childResourceParams);
|
|
8440
8440
|
const result = childEnvelopes[index];
|
|
8441
8441
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
8442
8442
|
if (childStatusCode === 200) {
|
|
@@ -8451,7 +8451,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8451
8451
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8452
8452
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8453
8453
|
}, childResourceParams.queryParams.optionalFields);
|
|
8454
|
-
const childSnapshot = ingestSuccess$
|
|
8454
|
+
const childSnapshot = ingestSuccess$V(luvio, {
|
|
8455
8455
|
recordId: childResourceParams.urlParams.recordId,
|
|
8456
8456
|
fields: childResourceParams.queryParams.fields,
|
|
8457
8457
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8477,7 +8477,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8477
8477
|
headers: {},
|
|
8478
8478
|
errorType: 'fetchResponse',
|
|
8479
8479
|
};
|
|
8480
|
-
ingestError$
|
|
8480
|
+
ingestError$P(luvio, {
|
|
8481
8481
|
recordId: childResourceParams.urlParams.recordId,
|
|
8482
8482
|
fields: childResourceParams.queryParams.fields,
|
|
8483
8483
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8523,11 +8523,11 @@ function selectChildResourceParams$8(luvio, childResources, resourceParams) {
|
|
|
8523
8523
|
read: (reader) => {
|
|
8524
8524
|
// Top-level 404 lookup
|
|
8525
8525
|
const compositeSnapshot = luvio.storeLookup({
|
|
8526
|
-
recordId: keyBuilder$
|
|
8526
|
+
recordId: keyBuilder$3e(luvio, resourceParams),
|
|
8527
8527
|
node: {
|
|
8528
8528
|
kind: 'Fragment',
|
|
8529
8529
|
private: [],
|
|
8530
|
-
version: VERSION$
|
|
8530
|
+
version: VERSION$2h,
|
|
8531
8531
|
},
|
|
8532
8532
|
variables: {},
|
|
8533
8533
|
});
|
|
@@ -8547,7 +8547,7 @@ function selectChildResourceParams$8(luvio, childResources, resourceParams) {
|
|
|
8547
8547
|
reader.enterPath(i);
|
|
8548
8548
|
reader.enterPath(envelopeBodyPath);
|
|
8549
8549
|
const childResource = childResources[i];
|
|
8550
|
-
const childKey = keyBuilder$
|
|
8550
|
+
const childKey = keyBuilder$3f(luvio, childResource);
|
|
8551
8551
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
8552
8552
|
const childSnapshot = reader.read(buildRecordSelector(luvio, childResource.urlParams.recordId, childResource.queryParams.fields || [], childResource.queryParams.optionalFields || []));
|
|
8553
8553
|
reader.exitPath();
|
|
@@ -8647,10 +8647,10 @@ function createChildResourceParams$c(resourceParams) {
|
|
|
8647
8647
|
}
|
|
8648
8648
|
return childConfigs;
|
|
8649
8649
|
}
|
|
8650
|
-
function keyBuilder$
|
|
8650
|
+
function keyBuilder$3e(luvio, params) {
|
|
8651
8651
|
return keyPrefix + '::BatchRepresentation:(' + 'childRelationships:' + params.queryParams.childRelationships + ',' + 'fields:' + params.queryParams.fields + ',' + 'layoutTypes:' + params.queryParams.layoutTypes + ',' + 'modes:' + params.queryParams.modes + ',' + 'optionalFields:' + params.queryParams.optionalFields + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'updateMru:' + params.queryParams.updateMru + ',' + 'recordIds:' + params.urlParams.recordIds + ')';
|
|
8652
8652
|
}
|
|
8653
|
-
function getResponseCacheKeys$
|
|
8653
|
+
function getResponseCacheKeys$14(keys, luvio, resourceParams, response) {
|
|
8654
8654
|
const childEnvelopes = response.results;
|
|
8655
8655
|
const childResourceParamsArray = createChildResourceParams$c(resourceParams);
|
|
8656
8656
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -8664,25 +8664,25 @@ function getResponseCacheKeys$13(keys, luvio, resourceParams, response) {
|
|
|
8664
8664
|
const childResult = childEnvelopes[index];
|
|
8665
8665
|
const { statusCode: childStatusCode, result: childBody } = childResult;
|
|
8666
8666
|
if (childStatusCode === 200) {
|
|
8667
|
-
getResponseCacheKeys$
|
|
8667
|
+
getResponseCacheKeys$15(keys, luvio, childResourceParams, childBody);
|
|
8668
8668
|
}
|
|
8669
8669
|
else if (childStatusCode === 404) {
|
|
8670
|
-
const childKey = keyBuilder$
|
|
8670
|
+
const childKey = keyBuilder$3f(luvio, childResourceParams);
|
|
8671
8671
|
keys.set(childKey, {
|
|
8672
8672
|
namespace: keyPrefix,
|
|
8673
|
-
representationName: RepresentationType$
|
|
8673
|
+
representationName: RepresentationType$Z,
|
|
8674
8674
|
mergeable: false
|
|
8675
8675
|
});
|
|
8676
8676
|
}
|
|
8677
8677
|
}
|
|
8678
8678
|
}
|
|
8679
|
-
function ingestError$
|
|
8680
|
-
const key = keyBuilder$
|
|
8679
|
+
function ingestError$O(luvio, params, error, snapshotRefresh) {
|
|
8680
|
+
const key = keyBuilder$3e(luvio, params);
|
|
8681
8681
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
8682
8682
|
luvio.storeIngestError(key, errorSnapshot);
|
|
8683
8683
|
return errorSnapshot;
|
|
8684
8684
|
}
|
|
8685
|
-
function createResourceRequest$
|
|
8685
|
+
function createResourceRequest$1c(config) {
|
|
8686
8686
|
const headers = {};
|
|
8687
8687
|
return {
|
|
8688
8688
|
baseUri: '/services/data/v61.0',
|
|
@@ -8696,7 +8696,7 @@ function createResourceRequest$1b(config) {
|
|
|
8696
8696
|
};
|
|
8697
8697
|
}
|
|
8698
8698
|
|
|
8699
|
-
function createResourceParams$
|
|
8699
|
+
function createResourceParams$12(config) {
|
|
8700
8700
|
const { records: configRecords } = config;
|
|
8701
8701
|
const recordIds = [];
|
|
8702
8702
|
const resourceConfigFields = [];
|
|
@@ -8748,13 +8748,13 @@ function createChildResourceParams$b(config) {
|
|
|
8748
8748
|
return childResources;
|
|
8749
8749
|
}
|
|
8750
8750
|
|
|
8751
|
-
function adapterFragment$
|
|
8751
|
+
function adapterFragment$M(luvio, config) {
|
|
8752
8752
|
const childResources = createChildResourceParams$b(config);
|
|
8753
|
-
const resourceParams = createResourceParams$
|
|
8753
|
+
const resourceParams = createResourceParams$12(config);
|
|
8754
8754
|
return selectChildResourceParams$8(luvio, childResources, resourceParams);
|
|
8755
8755
|
}
|
|
8756
8756
|
|
|
8757
|
-
function onFetchResponseSuccess$
|
|
8757
|
+
function onFetchResponseSuccess$Q(luvio, config, resourceParams, response, serverRequestCount = 0) {
|
|
8758
8758
|
const childEnvelopes = response.body.results;
|
|
8759
8759
|
const childResourceParamsArray = createChildResourceParams$b(config);
|
|
8760
8760
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -8766,7 +8766,7 @@ function onFetchResponseSuccess$P(luvio, config, resourceParams, response, serve
|
|
|
8766
8766
|
}
|
|
8767
8767
|
}
|
|
8768
8768
|
const snapshotStateFulfilled = 'Fulfilled';
|
|
8769
|
-
const key = keyBuilder$
|
|
8769
|
+
const key = keyBuilder$3e(luvio, resourceParams);
|
|
8770
8770
|
const { childSnapshotData, seenRecords } = ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount);
|
|
8771
8771
|
const snapshot = {
|
|
8772
8772
|
recordId: key,
|
|
@@ -8775,36 +8775,36 @@ function onFetchResponseSuccess$P(luvio, config, resourceParams, response, serve
|
|
|
8775
8775
|
seenRecords: seenRecords,
|
|
8776
8776
|
select: {
|
|
8777
8777
|
recordId: key,
|
|
8778
|
-
node: adapterFragment$
|
|
8778
|
+
node: adapterFragment$M(luvio, config),
|
|
8779
8779
|
variables: {},
|
|
8780
8780
|
},
|
|
8781
8781
|
refresh: {
|
|
8782
8782
|
config,
|
|
8783
|
-
resolve: () => buildNetworkSnapshot$
|
|
8783
|
+
resolve: () => buildNetworkSnapshot$18(luvio, config, serverRequestCount, snapshotRefreshOptions),
|
|
8784
8784
|
},
|
|
8785
8785
|
variables: {},
|
|
8786
8786
|
};
|
|
8787
8787
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8788
8788
|
}
|
|
8789
8789
|
|
|
8790
|
-
function onFetchResponseError$
|
|
8791
|
-
const snapshot = ingestError$
|
|
8790
|
+
function onFetchResponseError$R(luvio, config, resourceParams, response) {
|
|
8791
|
+
const snapshot = ingestError$O(luvio, resourceParams, response, {
|
|
8792
8792
|
config,
|
|
8793
|
-
resolve: () => buildNetworkSnapshot$
|
|
8793
|
+
resolve: () => buildNetworkSnapshot$18(luvio, config, 0, snapshotRefreshOptions),
|
|
8794
8794
|
});
|
|
8795
8795
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8796
8796
|
}
|
|
8797
|
-
function buildNetworkSnapshot$
|
|
8798
|
-
const resourceParams = createResourceParams$
|
|
8799
|
-
const request = createResourceRequest$
|
|
8797
|
+
function buildNetworkSnapshot$18(luvio, config, serverRequestCount = 0, options) {
|
|
8798
|
+
const resourceParams = createResourceParams$12(config);
|
|
8799
|
+
const request = createResourceRequest$1c(resourceParams);
|
|
8800
8800
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8801
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
8801
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$Q(luvio, config, resourceParams, response, serverRequestCount + 1), () => {
|
|
8802
8802
|
const cache = new StoreKeyMap();
|
|
8803
|
-
getResponseCacheKeys$
|
|
8803
|
+
getResponseCacheKeys$14(cache, luvio, resourceParams, response.body);
|
|
8804
8804
|
return cache;
|
|
8805
8805
|
});
|
|
8806
8806
|
}, (response) => {
|
|
8807
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
8807
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$R(luvio, config, resourceParams, response));
|
|
8808
8808
|
});
|
|
8809
8809
|
}
|
|
8810
8810
|
|
|
@@ -8821,7 +8821,7 @@ function resolveConflict(luvio, map) {
|
|
|
8821
8821
|
recordId,
|
|
8822
8822
|
optionalFields: convertTrieToFields(map.conflicts[recordId].trackedFields),
|
|
8823
8823
|
};
|
|
8824
|
-
buildNetworkSnapshot$
|
|
8824
|
+
buildNetworkSnapshot$19(luvio, config, map.serverRequestCount);
|
|
8825
8825
|
}
|
|
8826
8826
|
else {
|
|
8827
8827
|
const records = reduce.call(ids, (acc, id) => {
|
|
@@ -8833,10 +8833,10 @@ function resolveConflict(luvio, map) {
|
|
|
8833
8833
|
return acc;
|
|
8834
8834
|
}, []);
|
|
8835
8835
|
const config = { records };
|
|
8836
|
-
buildNetworkSnapshot$
|
|
8836
|
+
buildNetworkSnapshot$18(luvio, config, map.serverRequestCount);
|
|
8837
8837
|
}
|
|
8838
8838
|
}
|
|
8839
|
-
const ingest$
|
|
8839
|
+
const ingest$1V = (input, path, luvio, store, timestamp) => {
|
|
8840
8840
|
const conflictMap = {
|
|
8841
8841
|
conflicts: {},
|
|
8842
8842
|
serverRequestCount: 0,
|
|
@@ -8847,7 +8847,7 @@ const ingest$1T = (input, path, luvio, store, timestamp) => {
|
|
|
8847
8847
|
return result;
|
|
8848
8848
|
};
|
|
8849
8849
|
|
|
8850
|
-
const adapterName$
|
|
8850
|
+
const adapterName$_ = 'getListUiByApiName';
|
|
8851
8851
|
const getListUiByApiName_ConfigPropertyMetadata = [
|
|
8852
8852
|
generateParamConfigMetadata('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
8853
8853
|
generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
|
|
@@ -8857,9 +8857,9 @@ const getListUiByApiName_ConfigPropertyMetadata = [
|
|
|
8857
8857
|
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8858
8858
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
8859
8859
|
];
|
|
8860
|
-
const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
8860
|
+
const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$_, getListUiByApiName_ConfigPropertyMetadata);
|
|
8861
8861
|
|
|
8862
|
-
const adapterName$
|
|
8862
|
+
const adapterName$Z = 'getListUiByListViewId';
|
|
8863
8863
|
const getListUiByListViewId_ConfigPropertyMetadata = [
|
|
8864
8864
|
generateParamConfigMetadata('listViewId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
8865
8865
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
@@ -8868,9 +8868,9 @@ const getListUiByListViewId_ConfigPropertyMetadata = [
|
|
|
8868
8868
|
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8869
8869
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
8870
8870
|
];
|
|
8871
|
-
const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
8871
|
+
const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$Z, getListUiByListViewId_ConfigPropertyMetadata);
|
|
8872
8872
|
|
|
8873
|
-
const adapterName$
|
|
8873
|
+
const adapterName$X = 'getMruListUi';
|
|
8874
8874
|
const getMruListUi_ConfigPropertyMetadata = [
|
|
8875
8875
|
generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
|
|
8876
8876
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
@@ -8879,7 +8879,7 @@ const getMruListUi_ConfigPropertyMetadata = [
|
|
|
8879
8879
|
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8880
8880
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
8881
8881
|
];
|
|
8882
|
-
const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
8882
|
+
const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$X, getMruListUi_ConfigPropertyMetadata);
|
|
8883
8883
|
// make local copies of the adapter configs so we can ignore other getListUi config parameters to match
|
|
8884
8884
|
// lds222 behavior
|
|
8885
8885
|
({
|
|
@@ -8913,9 +8913,9 @@ const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationCon
|
|
|
8913
8913
|
],
|
|
8914
8914
|
},
|
|
8915
8915
|
});
|
|
8916
|
-
const RepresentationType$
|
|
8917
|
-
function keyBuilder$
|
|
8918
|
-
return keyPrefix + '::' + RepresentationType$
|
|
8916
|
+
const RepresentationType$U = 'ObjectInfoRepresentation';
|
|
8917
|
+
function keyBuilder$31(luvio, config) {
|
|
8918
|
+
return keyPrefix + '::' + RepresentationType$U + ':' + config.apiName;
|
|
8919
8919
|
}
|
|
8920
8920
|
|
|
8921
8921
|
var DiscriminatorValues$5;
|
|
@@ -9276,7 +9276,7 @@ function getShallowRecord(luvio, storeRecordId) {
|
|
|
9276
9276
|
*/
|
|
9277
9277
|
function getObjectMetadata(luvio, record) {
|
|
9278
9278
|
const { data: objectInfo } = luvio.storeLookup({
|
|
9279
|
-
recordId: keyBuilder$
|
|
9279
|
+
recordId: keyBuilder$31(luvio, { apiName: record.apiName }),
|
|
9280
9280
|
node: {
|
|
9281
9281
|
kind: 'Fragment',
|
|
9282
9282
|
private: ['eTag'],
|
|
@@ -9317,7 +9317,7 @@ function getObjectMetadata(luvio, record) {
|
|
|
9317
9317
|
function fixRecordTypes(luvio, record) {
|
|
9318
9318
|
// non-master record types should always be correct
|
|
9319
9319
|
if (record.recordTypeId === MAIN_RECORD_TYPE_ID) {
|
|
9320
|
-
const key = keyBuilder$
|
|
9320
|
+
const key = keyBuilder$3g(luvio, { recordId: record.id });
|
|
9321
9321
|
const recordNode = luvio.getNode(key);
|
|
9322
9322
|
if (isGraphNode(recordNode) && recordNode.scalar('recordTypeId') !== MAIN_RECORD_TYPE_ID) {
|
|
9323
9323
|
// ignore bogus incoming record type information & keep what we have
|
|
@@ -9390,7 +9390,7 @@ class AdsBridge {
|
|
|
9390
9390
|
// Don't let incorrect ADS/RecordGVP recordTypeIds replace a valid record type in our store
|
|
9391
9391
|
// with the master record type. See W-7302870 for details.
|
|
9392
9392
|
fixRecordTypes(luvio, recordCopy);
|
|
9393
|
-
luvio.storeIngest(INGEST_KEY, ingest$
|
|
9393
|
+
luvio.storeIngest(INGEST_KEY, ingest$1V, recordCopy);
|
|
9394
9394
|
}
|
|
9395
9395
|
}
|
|
9396
9396
|
if (didIngestRecord === true) {
|
|
@@ -9403,7 +9403,7 @@ class AdsBridge {
|
|
|
9403
9403
|
*/
|
|
9404
9404
|
evict(recordId) {
|
|
9405
9405
|
const { luvio } = this;
|
|
9406
|
-
const key = keyBuilder$
|
|
9406
|
+
const key = keyBuilder$3g(luvio, { recordId });
|
|
9407
9407
|
return this.lockLdsRecordEmit(() => {
|
|
9408
9408
|
luvio.storeEvict(key);
|
|
9409
9409
|
luvio.storeBroadcast();
|
|
@@ -9418,7 +9418,7 @@ class AdsBridge {
|
|
|
9418
9418
|
*/
|
|
9419
9419
|
getTrackedFieldsForRecord(recordId) {
|
|
9420
9420
|
const { luvio } = this;
|
|
9421
|
-
const storeRecordId = keyBuilder$
|
|
9421
|
+
const storeRecordId = keyBuilder$3g(luvio, { recordId });
|
|
9422
9422
|
const recordNode = luvio.getNode(storeRecordId);
|
|
9423
9423
|
if (!isGraphNode(recordNode)) {
|
|
9424
9424
|
return Promise.resolve([]);
|
package/dist/adsBridge.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-ads-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.274.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Bridge to sync data between LDS and ADS",
|
|
6
6
|
"main": "dist/adsBridge.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
33
|
-
"@salesforce/lds-uiapi-record-utils": "^1.
|
|
32
|
+
"@salesforce/lds-adapters-uiapi": "^1.274.0",
|
|
33
|
+
"@salesforce/lds-uiapi-record-utils": "^1.274.0"
|
|
34
34
|
}
|
|
35
35
|
}
|