@salesforce/lds-ads-bridge 1.297.0 → 1.299.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 +145 -145
- package/dist/adsBridge.js +1 -1
- package/package.json +3 -3
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -481,7 +481,7 @@ const callbacks$1 = [];
|
|
|
481
481
|
function register(r) {
|
|
482
482
|
callbacks$1.forEach((callback) => callback(r));
|
|
483
483
|
}
|
|
484
|
-
// version: 1.
|
|
484
|
+
// version: 1.299.0-83936bf1de
|
|
485
485
|
|
|
486
486
|
/**
|
|
487
487
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -4975,8 +4975,8 @@ function toSortedStringArray(value) {
|
|
|
4975
4975
|
return undefined;
|
|
4976
4976
|
}
|
|
4977
4977
|
|
|
4978
|
-
const VERSION$
|
|
4979
|
-
function validate$
|
|
4978
|
+
const VERSION$2z = "d1e589a127fb1060c89070cdb6f500b2";
|
|
4979
|
+
function validate$1_(obj, path = 'RecordTypeInfoRepresentation') {
|
|
4980
4980
|
const v_error = (() => {
|
|
4981
4981
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4982
4982
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5009,10 +5009,10 @@ function validate$1W(obj, path = 'RecordTypeInfoRepresentation') {
|
|
|
5009
5009
|
})();
|
|
5010
5010
|
return v_error === undefined ? null : v_error;
|
|
5011
5011
|
}
|
|
5012
|
-
const select$
|
|
5012
|
+
const select$3e = function RecordTypeInfoRepresentationSelect() {
|
|
5013
5013
|
return {
|
|
5014
5014
|
kind: 'Fragment',
|
|
5015
|
-
version: VERSION$
|
|
5015
|
+
version: VERSION$2z,
|
|
5016
5016
|
private: [],
|
|
5017
5017
|
selections: [
|
|
5018
5018
|
{
|
|
@@ -5038,7 +5038,7 @@ const select$39 = function RecordTypeInfoRepresentationSelect() {
|
|
|
5038
5038
|
]
|
|
5039
5039
|
};
|
|
5040
5040
|
};
|
|
5041
|
-
function equals$
|
|
5041
|
+
function equals$1a(existing, incoming) {
|
|
5042
5042
|
const existing_available = existing.available;
|
|
5043
5043
|
const incoming_available = incoming.available;
|
|
5044
5044
|
if (!(existing_available === incoming_available)) {
|
|
@@ -5067,8 +5067,8 @@ function equals$16(existing, incoming) {
|
|
|
5067
5067
|
return true;
|
|
5068
5068
|
}
|
|
5069
5069
|
|
|
5070
|
-
const VERSION$
|
|
5071
|
-
function validate$
|
|
5070
|
+
const VERSION$2y = "195d918987a35f45e1aa4dce9a11d8c5";
|
|
5071
|
+
function validate$1Z(obj, path = 'FieldValueRepresentation') {
|
|
5072
5072
|
const v_error = (() => {
|
|
5073
5073
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5074
5074
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5158,11 +5158,11 @@ function validate$1V(obj, path = 'FieldValueRepresentation') {
|
|
|
5158
5158
|
})();
|
|
5159
5159
|
return v_error === undefined ? null : v_error;
|
|
5160
5160
|
}
|
|
5161
|
-
const RepresentationType
|
|
5162
|
-
const select$
|
|
5161
|
+
const RepresentationType$10 = 'FieldValueRepresentation';
|
|
5162
|
+
const select$3d = function FieldValueRepresentationSelect() {
|
|
5163
5163
|
return {
|
|
5164
5164
|
kind: 'Fragment',
|
|
5165
|
-
version: VERSION$
|
|
5165
|
+
version: VERSION$2y,
|
|
5166
5166
|
private: [],
|
|
5167
5167
|
selections: [
|
|
5168
5168
|
{
|
|
@@ -5173,12 +5173,12 @@ const select$38 = function FieldValueRepresentationSelect() {
|
|
|
5173
5173
|
name: 'value',
|
|
5174
5174
|
kind: 'Link',
|
|
5175
5175
|
nullable: true,
|
|
5176
|
-
fragment: select$
|
|
5176
|
+
fragment: select$3b()
|
|
5177
5177
|
}
|
|
5178
5178
|
]
|
|
5179
5179
|
};
|
|
5180
5180
|
};
|
|
5181
|
-
function equals$
|
|
5181
|
+
function equals$19(existing, incoming) {
|
|
5182
5182
|
const existing_displayValue = existing.displayValue;
|
|
5183
5183
|
const incoming_displayValue = incoming.displayValue;
|
|
5184
5184
|
if (!(existing_displayValue === incoming_displayValue)) {
|
|
@@ -5196,26 +5196,26 @@ function equals$15(existing, incoming) {
|
|
|
5196
5196
|
}
|
|
5197
5197
|
return true;
|
|
5198
5198
|
}
|
|
5199
|
-
function getTypeCacheKeys$
|
|
5199
|
+
function getTypeCacheKeys$2a(rootKeySet, luvio, input, fullPathFactory) {
|
|
5200
5200
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5201
5201
|
const rootKey = fullPathFactory();
|
|
5202
5202
|
rootKeySet.set(rootKey, {
|
|
5203
5203
|
namespace: keyPrefix,
|
|
5204
|
-
representationName: RepresentationType
|
|
5204
|
+
representationName: RepresentationType$10,
|
|
5205
5205
|
mergeable: false
|
|
5206
5206
|
});
|
|
5207
5207
|
if (input.value !== null && typeof input.value === 'object') {
|
|
5208
|
-
getTypeCacheKeys$
|
|
5208
|
+
getTypeCacheKeys$29(rootKeySet, luvio, input.value);
|
|
5209
5209
|
}
|
|
5210
5210
|
}
|
|
5211
5211
|
|
|
5212
5212
|
// we override the generated so we can set "mergeable: true" on the root key
|
|
5213
|
-
const getTypeCacheKeys$
|
|
5213
|
+
const getTypeCacheKeys$29 = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
5214
5214
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5215
|
-
const rootKey = keyBuilderFromType$
|
|
5215
|
+
const rootKey = keyBuilderFromType$D(luvio, input);
|
|
5216
5216
|
rootKeySet.set(rootKey, {
|
|
5217
5217
|
namespace: keyPrefix,
|
|
5218
|
-
representationName: RepresentationType$
|
|
5218
|
+
representationName: RepresentationType$_,
|
|
5219
5219
|
mergeable: true,
|
|
5220
5220
|
});
|
|
5221
5221
|
const input_childRelationships = input.childRelationships;
|
|
@@ -5223,21 +5223,21 @@ const getTypeCacheKeys$28 = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
5223
5223
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
5224
5224
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
5225
5225
|
const key = input_childRelationships_keys[i];
|
|
5226
|
-
getTypeCacheKeys$
|
|
5226
|
+
getTypeCacheKeys$28(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
5227
5227
|
}
|
|
5228
5228
|
const input_fields = input.fields;
|
|
5229
5229
|
const input_fields_keys = keys$2(input_fields);
|
|
5230
5230
|
const input_fields_length = input_fields_keys.length;
|
|
5231
5231
|
for (let i = 0; i < input_fields_length; i++) {
|
|
5232
5232
|
const key = input_fields_keys[i];
|
|
5233
|
-
getTypeCacheKeys$
|
|
5233
|
+
getTypeCacheKeys$2a(rootKeySet, luvio, input_fields[key], () => rootKey + '__fields__' + key);
|
|
5234
5234
|
}
|
|
5235
5235
|
return rootKeySet;
|
|
5236
5236
|
};
|
|
5237
5237
|
|
|
5238
|
-
const TTL$
|
|
5239
|
-
const VERSION$
|
|
5240
|
-
function validate$
|
|
5238
|
+
const TTL$G = 120000;
|
|
5239
|
+
const VERSION$2x = "79cb5ac9f44542f683d00245fdfe500d";
|
|
5240
|
+
function validate$1Y(obj, path = 'RecordCollectionRepresentation') {
|
|
5241
5241
|
const v_error = (() => {
|
|
5242
5242
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5243
5243
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5397,14 +5397,14 @@ function validate$1U(obj, path = 'RecordCollectionRepresentation') {
|
|
|
5397
5397
|
})();
|
|
5398
5398
|
return v_error === undefined ? null : v_error;
|
|
5399
5399
|
}
|
|
5400
|
-
const RepresentationType
|
|
5401
|
-
function normalize$
|
|
5400
|
+
const RepresentationType$$ = 'RecordCollectionRepresentation';
|
|
5401
|
+
function normalize$T(input, existing, path, luvio, store, timestamp) {
|
|
5402
5402
|
const input_records = input.records;
|
|
5403
5403
|
const input_records_id = path.fullPath + '__records';
|
|
5404
5404
|
for (let i = 0; i < input_records.length; i++) {
|
|
5405
5405
|
const input_records_item = input_records[i];
|
|
5406
5406
|
let input_records_item_id = input_records_id + '__' + i;
|
|
5407
|
-
input_records[i] = ingest$
|
|
5407
|
+
input_records[i] = ingest$24(input_records_item, {
|
|
5408
5408
|
fullPath: input_records_item_id,
|
|
5409
5409
|
propertyName: i,
|
|
5410
5410
|
parent: {
|
|
@@ -5417,10 +5417,10 @@ function normalize$S(input, existing, path, luvio, store, timestamp) {
|
|
|
5417
5417
|
}
|
|
5418
5418
|
return input;
|
|
5419
5419
|
}
|
|
5420
|
-
const select$
|
|
5420
|
+
const select$3c = function RecordCollectionRepresentationSelect() {
|
|
5421
5421
|
return {
|
|
5422
5422
|
kind: 'Fragment',
|
|
5423
|
-
version: VERSION$
|
|
5423
|
+
version: VERSION$2x,
|
|
5424
5424
|
private: [],
|
|
5425
5425
|
selections: [
|
|
5426
5426
|
{
|
|
@@ -5455,12 +5455,12 @@ const select$37 = function RecordCollectionRepresentationSelect() {
|
|
|
5455
5455
|
name: 'records',
|
|
5456
5456
|
kind: 'Link',
|
|
5457
5457
|
plural: true,
|
|
5458
|
-
fragment: select$
|
|
5458
|
+
fragment: select$3b()
|
|
5459
5459
|
}
|
|
5460
5460
|
]
|
|
5461
5461
|
};
|
|
5462
5462
|
};
|
|
5463
|
-
function equals$
|
|
5463
|
+
function equals$18(existing, incoming) {
|
|
5464
5464
|
const existing_count = existing.count;
|
|
5465
5465
|
const incoming_count = incoming.count;
|
|
5466
5466
|
if (!(existing_count === incoming_count)) {
|
|
@@ -5508,45 +5508,45 @@ function equals$14(existing, incoming) {
|
|
|
5508
5508
|
}
|
|
5509
5509
|
return true;
|
|
5510
5510
|
}
|
|
5511
|
-
const ingest$
|
|
5511
|
+
const ingest$25 = function RecordCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5512
5512
|
if (process.env.NODE_ENV !== 'production') {
|
|
5513
|
-
const validateError = validate$
|
|
5513
|
+
const validateError = validate$1Y(input);
|
|
5514
5514
|
if (validateError !== null) {
|
|
5515
5515
|
throw validateError;
|
|
5516
5516
|
}
|
|
5517
5517
|
}
|
|
5518
5518
|
const key = path.fullPath;
|
|
5519
|
-
const ttlToUse = TTL$
|
|
5520
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5519
|
+
const ttlToUse = TTL$G;
|
|
5520
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$T, "UiApi", VERSION$2x, RepresentationType$$, equals$18);
|
|
5521
5521
|
return createLink$1(key);
|
|
5522
5522
|
};
|
|
5523
|
-
function getTypeCacheKeys$
|
|
5523
|
+
function getTypeCacheKeys$28(rootKeySet, luvio, input, fullPathFactory) {
|
|
5524
5524
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5525
5525
|
const rootKey = fullPathFactory();
|
|
5526
5526
|
rootKeySet.set(rootKey, {
|
|
5527
5527
|
namespace: keyPrefix,
|
|
5528
|
-
representationName: RepresentationType
|
|
5528
|
+
representationName: RepresentationType$$,
|
|
5529
5529
|
mergeable: false
|
|
5530
5530
|
});
|
|
5531
5531
|
const input_records_length = input.records.length;
|
|
5532
5532
|
for (let i = 0; i < input_records_length; i++) {
|
|
5533
|
-
getTypeCacheKeys$
|
|
5533
|
+
getTypeCacheKeys$29(rootKeySet, luvio, input.records[i]);
|
|
5534
5534
|
}
|
|
5535
5535
|
}
|
|
5536
5536
|
|
|
5537
5537
|
const VIEW_ENTITY_API_NAME = 'Name';
|
|
5538
5538
|
const VIEW_ENTITY_KEY_PREFIX = `${keyPrefix}::RecordViewEntityRepresentation:${VIEW_ENTITY_API_NAME}:`;
|
|
5539
|
-
const keyBuilderFromType$
|
|
5539
|
+
const keyBuilderFromType$E = function RecordRepresentationKeyBuilderFromType(luvio, object) {
|
|
5540
5540
|
const { apiName, id } = object;
|
|
5541
5541
|
if (apiName === VIEW_ENTITY_API_NAME) {
|
|
5542
5542
|
return VIEW_ENTITY_KEY_PREFIX + id;
|
|
5543
5543
|
}
|
|
5544
|
-
return keyBuilderFromType$
|
|
5544
|
+
return keyBuilderFromType$D(luvio, object);
|
|
5545
5545
|
};
|
|
5546
5546
|
|
|
5547
|
-
const TTL$
|
|
5548
|
-
const VERSION$
|
|
5549
|
-
function validate$
|
|
5547
|
+
const TTL$F = 30000;
|
|
5548
|
+
const VERSION$2w = "98c5b18512e48ca8d28727549507e4ba";
|
|
5549
|
+
function validate$1X(obj, path = 'RecordRepresentation') {
|
|
5550
5550
|
const v_error = (() => {
|
|
5551
5551
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5552
5552
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5676,7 +5676,7 @@ function validate$1T(obj, path = 'RecordRepresentation') {
|
|
|
5676
5676
|
const path_recordTypeInfo = path + '.recordTypeInfo';
|
|
5677
5677
|
let obj_recordTypeInfo_union0 = null;
|
|
5678
5678
|
const obj_recordTypeInfo_union0_error = (() => {
|
|
5679
|
-
const referencepath_recordTypeInfoValidationError = validate$
|
|
5679
|
+
const referencepath_recordTypeInfoValidationError = validate$1_(obj_recordTypeInfo, path_recordTypeInfo);
|
|
5680
5680
|
if (referencepath_recordTypeInfoValidationError !== null) {
|
|
5681
5681
|
let message = 'Object doesn\'t match RecordTypeInfoRepresentation (at "' + path_recordTypeInfo + '")\n';
|
|
5682
5682
|
message += referencepath_recordTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5735,15 +5735,15 @@ function validate$1T(obj, path = 'RecordRepresentation') {
|
|
|
5735
5735
|
})();
|
|
5736
5736
|
return v_error === undefined ? null : v_error;
|
|
5737
5737
|
}
|
|
5738
|
-
const RepresentationType$
|
|
5739
|
-
function keyBuilder$
|
|
5740
|
-
return keyPrefix + '::' + RepresentationType$
|
|
5738
|
+
const RepresentationType$_ = 'RecordRepresentation';
|
|
5739
|
+
function keyBuilder$3u(luvio, config) {
|
|
5740
|
+
return keyPrefix + '::' + RepresentationType$_ + ':' + config.recordId;
|
|
5741
5741
|
}
|
|
5742
|
-
function keyBuilderFromType$
|
|
5742
|
+
function keyBuilderFromType$D(luvio, object) {
|
|
5743
5743
|
const keyParams = {
|
|
5744
5744
|
recordId: object.id
|
|
5745
5745
|
};
|
|
5746
|
-
return keyBuilder$
|
|
5746
|
+
return keyBuilder$3u(luvio, keyParams);
|
|
5747
5747
|
}
|
|
5748
5748
|
function dynamicNormalize$5(ingestParams) {
|
|
5749
5749
|
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
@@ -5788,11 +5788,11 @@ function dynamicNormalize$5(ingestParams) {
|
|
|
5788
5788
|
return input;
|
|
5789
5789
|
};
|
|
5790
5790
|
}
|
|
5791
|
-
const select$
|
|
5792
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
5791
|
+
const select$3b = function RecordRepresentationSelect() {
|
|
5792
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$3e();
|
|
5793
5793
|
return {
|
|
5794
5794
|
kind: 'Fragment',
|
|
5795
|
-
version: VERSION$
|
|
5795
|
+
version: VERSION$2w,
|
|
5796
5796
|
private: [
|
|
5797
5797
|
'eTag',
|
|
5798
5798
|
'weakEtag'
|
|
@@ -5806,13 +5806,13 @@ const select$36 = function RecordRepresentationSelect() {
|
|
|
5806
5806
|
name: 'childRelationships',
|
|
5807
5807
|
kind: 'Link',
|
|
5808
5808
|
map: true,
|
|
5809
|
-
fragment: select$
|
|
5809
|
+
fragment: select$3c()
|
|
5810
5810
|
},
|
|
5811
5811
|
{
|
|
5812
5812
|
name: 'fields',
|
|
5813
5813
|
kind: 'Link',
|
|
5814
5814
|
map: true,
|
|
5815
|
-
fragment: select$
|
|
5815
|
+
fragment: select$3d()
|
|
5816
5816
|
},
|
|
5817
5817
|
{
|
|
5818
5818
|
name: 'id',
|
|
@@ -5848,18 +5848,18 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
5848
5848
|
name: 'childRelationships',
|
|
5849
5849
|
kind: 'Link',
|
|
5850
5850
|
map: true,
|
|
5851
|
-
fragment: select$
|
|
5851
|
+
fragment: select$3c()
|
|
5852
5852
|
} : params.childRelationships;
|
|
5853
5853
|
const fieldsPathSelection = params.fields === undefined ? {
|
|
5854
5854
|
name: 'fields',
|
|
5855
5855
|
kind: 'Link',
|
|
5856
5856
|
map: true,
|
|
5857
|
-
fragment: select$
|
|
5857
|
+
fragment: select$3d()
|
|
5858
5858
|
} : params.fields;
|
|
5859
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
5859
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$3e();
|
|
5860
5860
|
return {
|
|
5861
5861
|
kind: 'Fragment',
|
|
5862
|
-
version: VERSION$
|
|
5862
|
+
version: VERSION$2w,
|
|
5863
5863
|
private: [
|
|
5864
5864
|
'eTag',
|
|
5865
5865
|
'weakEtag'
|
|
@@ -5900,7 +5900,7 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
5900
5900
|
]
|
|
5901
5901
|
};
|
|
5902
5902
|
};
|
|
5903
|
-
function equals$
|
|
5903
|
+
function equals$17(existing, incoming) {
|
|
5904
5904
|
const existing_weakEtag = existing.weakEtag;
|
|
5905
5905
|
const incoming_weakEtag = incoming.weakEtag;
|
|
5906
5906
|
if (!(existing_weakEtag === incoming_weakEtag)) {
|
|
@@ -5961,7 +5961,7 @@ function equals$13(existing, incoming) {
|
|
|
5961
5961
|
if (!(existing_recordTypeInfo === incoming_recordTypeInfo
|
|
5962
5962
|
|| (existing_recordTypeInfo != null &&
|
|
5963
5963
|
incoming_recordTypeInfo != null &&
|
|
5964
|
-
equals$
|
|
5964
|
+
equals$1a(existing_recordTypeInfo, incoming_recordTypeInfo)))) {
|
|
5965
5965
|
return false;
|
|
5966
5966
|
}
|
|
5967
5967
|
const existing_systemModstamp = existing.systemModstamp;
|
|
@@ -7477,7 +7477,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7477
7477
|
kind: 'Fragment',
|
|
7478
7478
|
private: ['eTag', 'weakEtag'],
|
|
7479
7479
|
selections: createRecordSelection(childFieldDefinition),
|
|
7480
|
-
version: VERSION$
|
|
7480
|
+
version: VERSION$2w,
|
|
7481
7481
|
},
|
|
7482
7482
|
};
|
|
7483
7483
|
}
|
|
@@ -7487,7 +7487,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7487
7487
|
required: childFieldDefinition.optional === true ? false : undefined,
|
|
7488
7488
|
fragment: {
|
|
7489
7489
|
kind: 'Fragment',
|
|
7490
|
-
version: VERSION$
|
|
7490
|
+
version: VERSION$2y,
|
|
7491
7491
|
private: [],
|
|
7492
7492
|
selections: [DISPLAY_VALUE_SELECTION, fieldValueSelection],
|
|
7493
7493
|
},
|
|
@@ -7569,7 +7569,7 @@ const RECORD_REPRESENTATION_ERROR_VERSION = 'RECORD_REPRESENTATION_ERROR_VERSION
|
|
|
7569
7569
|
const RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS = {
|
|
7570
7570
|
representationName: '',
|
|
7571
7571
|
namespace: keyPrefix,
|
|
7572
|
-
ttl: TTL$
|
|
7572
|
+
ttl: TTL$F,
|
|
7573
7573
|
version: RECORD_REPRESENTATION_ERROR_VERSION,
|
|
7574
7574
|
};
|
|
7575
7575
|
function isGraphNode$1(node) {
|
|
@@ -7948,7 +7948,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
7948
7948
|
};
|
|
7949
7949
|
}
|
|
7950
7950
|
else {
|
|
7951
|
-
buildNetworkSnapshot$
|
|
7951
|
+
buildNetworkSnapshot$1b(luvio, {
|
|
7952
7952
|
recordId: incoming.id,
|
|
7953
7953
|
optionalFields: convertTrieToFields(incomingTrackedFieldsTrieRoot),
|
|
7954
7954
|
});
|
|
@@ -7958,7 +7958,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
7958
7958
|
return existing;
|
|
7959
7959
|
}
|
|
7960
7960
|
function mergeRecordConflict(luvio, incoming, existing, recordConflictMap) {
|
|
7961
|
-
const recordKey = keyBuilder$
|
|
7961
|
+
const recordKey = keyBuilder$3u(luvio, {
|
|
7962
7962
|
recordId: incoming.id,
|
|
7963
7963
|
});
|
|
7964
7964
|
const incomingNode = luvio.wrapNormalizedGraphNode(incoming, recordKey);
|
|
@@ -8113,7 +8113,7 @@ function fixDisplayValue(existing, incoming, path) {
|
|
|
8113
8113
|
}
|
|
8114
8114
|
}
|
|
8115
8115
|
|
|
8116
|
-
function normalize$
|
|
8116
|
+
function normalize$S(input, existing, path, luvio, store, timestamp, fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8117
8117
|
const input_value = input.value;
|
|
8118
8118
|
const input_value_id = path.fullPath + '__value';
|
|
8119
8119
|
if (input_value !== null && typeof input_value === 'object') {
|
|
@@ -8134,14 +8134,14 @@ function normalize$R(input, existing, path, luvio, store, timestamp, fieldsTrie,
|
|
|
8134
8134
|
function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8135
8135
|
return (input, path, luvio, store, timestamp) => {
|
|
8136
8136
|
if (process.env.NODE_ENV !== 'production') {
|
|
8137
|
-
const validateError = validate$
|
|
8137
|
+
const validateError = validate$1Z(input);
|
|
8138
8138
|
if (validateError !== null) {
|
|
8139
8139
|
throw validateError;
|
|
8140
8140
|
}
|
|
8141
8141
|
}
|
|
8142
8142
|
const key = path.fullPath;
|
|
8143
8143
|
let existingRecord = store.readEntry(key);
|
|
8144
|
-
let incomingRecord = normalize$
|
|
8144
|
+
let incomingRecord = normalize$S(input, store.readEntry(key), {
|
|
8145
8145
|
fullPath: key,
|
|
8146
8146
|
parent: path.parent,
|
|
8147
8147
|
propertyName: path.propertyName,
|
|
@@ -8149,7 +8149,7 @@ function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
|
8149
8149
|
// read again after children ingested in case of a circular ref
|
|
8150
8150
|
existingRecord = store.readEntry(key);
|
|
8151
8151
|
incomingRecord = merge$2(existingRecord, incomingRecord, luvio, path);
|
|
8152
|
-
if (existingRecord === undefined || equals$
|
|
8152
|
+
if (existingRecord === undefined || equals$19(existingRecord, incomingRecord) === false) {
|
|
8153
8153
|
luvio.storePublish(key, incomingRecord);
|
|
8154
8154
|
}
|
|
8155
8155
|
return createLink$1(key);
|
|
@@ -8219,7 +8219,7 @@ function createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap
|
|
|
8219
8219
|
}
|
|
8220
8220
|
function createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8221
8221
|
return dynamicNormalize$5({
|
|
8222
|
-
childRelationships: ingest$
|
|
8222
|
+
childRelationships: ingest$25,
|
|
8223
8223
|
fields: createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap),
|
|
8224
8224
|
});
|
|
8225
8225
|
}
|
|
@@ -8227,13 +8227,13 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8227
8227
|
const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
|
|
8228
8228
|
return (input, path, luvio, store, timestamp) => {
|
|
8229
8229
|
if (process.env.NODE_ENV !== 'production') {
|
|
8230
|
-
const validateError = validate$
|
|
8230
|
+
const validateError = validate$1X(input);
|
|
8231
8231
|
if (validateError !== null) {
|
|
8232
8232
|
throw validateError;
|
|
8233
8233
|
}
|
|
8234
8234
|
}
|
|
8235
8235
|
input.eTag = ''; //[W-13724550] Record Reps ALWAYS have '' etag, to be consistent with GraphQL, as it is not queryable via GraphQL.
|
|
8236
|
-
const key = keyBuilderFromType$
|
|
8236
|
+
const key = keyBuilderFromType$E(luvio, input);
|
|
8237
8237
|
let existingRecord = store.readEntry(key);
|
|
8238
8238
|
const recordPath = {
|
|
8239
8239
|
fullPath: key,
|
|
@@ -8245,17 +8245,17 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8245
8245
|
existingRecord = store.readEntry(key);
|
|
8246
8246
|
incomingRecord = merge$3(existingRecord, incomingRecord, luvio, path, recordConflictMap);
|
|
8247
8247
|
if (existingRecord === undefined ||
|
|
8248
|
-
equals$
|
|
8248
|
+
equals$17(existingRecord, incomingRecord) === false ||
|
|
8249
8249
|
// always publish if existing record has drafts
|
|
8250
8250
|
existingRecord.drafts !==
|
|
8251
8251
|
undefined) {
|
|
8252
8252
|
luvio.storePublish(key, incomingRecord);
|
|
8253
8253
|
}
|
|
8254
8254
|
luvio.publishStoreMetadata(key, {
|
|
8255
|
-
ttl: TTL$
|
|
8256
|
-
representationName: RepresentationType$
|
|
8255
|
+
ttl: TTL$F,
|
|
8256
|
+
representationName: RepresentationType$_,
|
|
8257
8257
|
namespace: keyPrefix,
|
|
8258
|
-
version: VERSION$
|
|
8258
|
+
version: VERSION$2w,
|
|
8259
8259
|
ingestionTimestamp: timestamp,
|
|
8260
8260
|
});
|
|
8261
8261
|
return createLink$1(key);
|
|
@@ -8345,22 +8345,22 @@ function isRestrictedPathCondition(existingPath, path) {
|
|
|
8345
8345
|
(existingPath.includes('/records') && path.includes('/record-ui')));
|
|
8346
8346
|
}
|
|
8347
8347
|
|
|
8348
|
-
const createResourceRequest$
|
|
8348
|
+
const createResourceRequest$1g = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
8349
8349
|
return {
|
|
8350
|
-
...createResourceRequest$
|
|
8350
|
+
...createResourceRequest$1f(config),
|
|
8351
8351
|
fulfill: fulfill,
|
|
8352
8352
|
};
|
|
8353
8353
|
};
|
|
8354
8354
|
|
|
8355
|
-
function keyBuilder$
|
|
8356
|
-
return keyBuilder$
|
|
8355
|
+
function keyBuilder$3t(luvio, params) {
|
|
8356
|
+
return keyBuilder$3u(luvio, {
|
|
8357
8357
|
recordId: params.urlParams.recordId
|
|
8358
8358
|
});
|
|
8359
8359
|
}
|
|
8360
|
-
function getResponseCacheKeys$
|
|
8361
|
-
getTypeCacheKeys$
|
|
8360
|
+
function getResponseCacheKeys$17(storeKeyMap, luvio, resourceParams, response) {
|
|
8361
|
+
getTypeCacheKeys$29(storeKeyMap, luvio, response);
|
|
8362
8362
|
}
|
|
8363
|
-
function createResourceRequest$
|
|
8363
|
+
function createResourceRequest$1f(config) {
|
|
8364
8364
|
const headers = {};
|
|
8365
8365
|
return {
|
|
8366
8366
|
baseUri: '/services/data/v62.0',
|
|
@@ -8384,17 +8384,17 @@ const getRecord_ConfigPropertyMetadata = [
|
|
|
8384
8384
|
generateParamConfigMetadata$1('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
8385
8385
|
generateParamConfigMetadata$1('updateMru', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
8386
8386
|
];
|
|
8387
|
-
const createResourceParams$
|
|
8387
|
+
const createResourceParams$15 = /*#__PURE__*/ createResourceParams(getRecord_ConfigPropertyMetadata);
|
|
8388
8388
|
|
|
8389
8389
|
// used by getUiApiRecordsBatchByRecordIds#selectChildResourceParams
|
|
8390
8390
|
function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
8391
8391
|
return {
|
|
8392
|
-
recordId: keyBuilder$
|
|
8392
|
+
recordId: keyBuilder$3u(luvio, { recordId }),
|
|
8393
8393
|
node: {
|
|
8394
8394
|
kind: 'Fragment',
|
|
8395
8395
|
private: ['eTag', 'weakEtag'],
|
|
8396
8396
|
selections: buildSelectionFromFields(fields, optionalFields),
|
|
8397
|
-
version: VERSION$
|
|
8397
|
+
version: VERSION$2w,
|
|
8398
8398
|
},
|
|
8399
8399
|
variables: {},
|
|
8400
8400
|
};
|
|
@@ -8402,27 +8402,27 @@ function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
|
8402
8402
|
function buildSnapshotRefresh$5(luvio, config) {
|
|
8403
8403
|
return {
|
|
8404
8404
|
config,
|
|
8405
|
-
resolve: () => buildNetworkSnapshot$
|
|
8405
|
+
resolve: () => buildNetworkSnapshot$1b(luvio, config),
|
|
8406
8406
|
};
|
|
8407
8407
|
}
|
|
8408
8408
|
function prepareRequest$7(luvio, config) {
|
|
8409
8409
|
const { recordId, fields } = config;
|
|
8410
8410
|
// Should this go into the coersion logic?
|
|
8411
|
-
const key = keyBuilder$
|
|
8411
|
+
const key = keyBuilder$3t(luvio, createResourceParams$15(config));
|
|
8412
8412
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
8413
8413
|
maxDepth: configurationForRestAdapters$1.getTrackedFieldDepthOnCacheMiss(),
|
|
8414
8414
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters$1.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8415
8415
|
}, config.optionalFields);
|
|
8416
8416
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
8417
|
-
const resourceParams = createResourceParams$
|
|
8417
|
+
const resourceParams = createResourceParams$15({
|
|
8418
8418
|
recordId,
|
|
8419
8419
|
fields,
|
|
8420
8420
|
optionalFields: optionalFields.length > 0 ? optionalFields : undefined,
|
|
8421
8421
|
});
|
|
8422
|
-
const request = createResourceRequest$
|
|
8422
|
+
const request = createResourceRequest$1g(resourceParams);
|
|
8423
8423
|
return { request, key, allTrackedFields, resourceParams };
|
|
8424
8424
|
}
|
|
8425
|
-
function ingestSuccess$
|
|
8425
|
+
function ingestSuccess$X(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8426
8426
|
const { body } = response;
|
|
8427
8427
|
const fields = config.fields === undefined ? [] : config.fields;
|
|
8428
8428
|
const optionalFields = config.optionalFields === undefined ? [] : config.optionalFields;
|
|
@@ -8436,19 +8436,19 @@ function ingestSuccess$W(luvio, config, key, allTrackedFields, response, serverR
|
|
|
8436
8436
|
return luvio.storeLookup(buildRecordSelector(luvio, config.recordId, fields, optionalFields), buildSnapshotRefresh$5(luvio, config));
|
|
8437
8437
|
}
|
|
8438
8438
|
function onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8439
|
-
const snapshot = ingestSuccess$
|
|
8439
|
+
const snapshot = ingestSuccess$X(luvio, config, key, allTrackedFields, response, serverRequestCount);
|
|
8440
8440
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8441
8441
|
}
|
|
8442
|
-
function ingestError$
|
|
8442
|
+
function ingestError$R(luvio, config, key, err) {
|
|
8443
8443
|
const errorSnapshot = luvio.errorSnapshot(err, buildSnapshotRefresh$5(luvio, config));
|
|
8444
8444
|
luvio.storeIngestError(key, errorSnapshot, RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS);
|
|
8445
8445
|
return errorSnapshot;
|
|
8446
8446
|
}
|
|
8447
8447
|
function onResourceError(luvio, config, key, err) {
|
|
8448
|
-
const errorSnapshot = ingestError$
|
|
8448
|
+
const errorSnapshot = ingestError$R(luvio, config, key, err);
|
|
8449
8449
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
8450
8450
|
}
|
|
8451
|
-
function buildNetworkSnapshot$
|
|
8451
|
+
function buildNetworkSnapshot$1b(luvio, config, serverRequestCount = 0, options) {
|
|
8452
8452
|
const { request, key, allTrackedFields, resourceParams } = prepareRequest$7(luvio, config);
|
|
8453
8453
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8454
8454
|
// W-11964675 - Condition to dedupe a very specific set of requests for
|
|
@@ -8467,7 +8467,7 @@ function buildNetworkSnapshot$1a(luvio, config, serverRequestCount = 0, options)
|
|
|
8467
8467
|
return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
|
|
8468
8468
|
}, () => {
|
|
8469
8469
|
const cache = new StoreKeyMap();
|
|
8470
|
-
getResponseCacheKeys$
|
|
8470
|
+
getResponseCacheKeys$17(cache, luvio, resourceParams, response.body);
|
|
8471
8471
|
return cache;
|
|
8472
8472
|
});
|
|
8473
8473
|
}, (err) => {
|
|
@@ -8481,7 +8481,7 @@ function isSingleBatchRecordResponse(response) {
|
|
|
8481
8481
|
response.results.length === 1);
|
|
8482
8482
|
}
|
|
8483
8483
|
|
|
8484
|
-
const VERSION$
|
|
8484
|
+
const VERSION$2v = "98cce53b8d13b1883d001bbdaab24383";
|
|
8485
8485
|
|
|
8486
8486
|
const nonCachedErrors$8 = ObjectCreate$1$1(null);
|
|
8487
8487
|
function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount = 0) {
|
|
@@ -8491,7 +8491,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8491
8491
|
const now = Date.now();
|
|
8492
8492
|
for (let index = 0, len = childResourceParamsArray.length; index < len; index += 1) {
|
|
8493
8493
|
const childResourceParams = childResourceParamsArray[index];
|
|
8494
|
-
const childKey = keyBuilder$
|
|
8494
|
+
const childKey = keyBuilder$3t(luvio, childResourceParams);
|
|
8495
8495
|
const result = childEnvelopes[index];
|
|
8496
8496
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
8497
8497
|
if (childStatusCode === 200) {
|
|
@@ -8506,7 +8506,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8506
8506
|
maxDepth: configurationForRestAdapters$1.getTrackedFieldDepthOnCacheMiss(),
|
|
8507
8507
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters$1.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8508
8508
|
}, childResourceParams.queryParams.optionalFields);
|
|
8509
|
-
const childSnapshot = ingestSuccess$
|
|
8509
|
+
const childSnapshot = ingestSuccess$X(luvio, {
|
|
8510
8510
|
recordId: childResourceParams.urlParams.recordId,
|
|
8511
8511
|
fields: childResourceParams.queryParams.fields,
|
|
8512
8512
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8532,7 +8532,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8532
8532
|
headers: {},
|
|
8533
8533
|
errorType: 'fetchResponse',
|
|
8534
8534
|
};
|
|
8535
|
-
ingestError$
|
|
8535
|
+
ingestError$R(luvio, {
|
|
8536
8536
|
recordId: childResourceParams.urlParams.recordId,
|
|
8537
8537
|
fields: childResourceParams.queryParams.fields,
|
|
8538
8538
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8547,7 +8547,7 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
8547
8547
|
// track non-cached responses so rebuilds work properly
|
|
8548
8548
|
if (childStatusCode !== 404 && childStatusCode !== 200) {
|
|
8549
8549
|
nonCachedErrors$8[childKey] = {
|
|
8550
|
-
expiration: now + TTL$
|
|
8550
|
+
expiration: now + TTL$F,
|
|
8551
8551
|
response: childBody,
|
|
8552
8552
|
status: childStatusCode,
|
|
8553
8553
|
};
|
|
@@ -8578,11 +8578,11 @@ function selectChildResourceParams$8(luvio, childResources, resourceParams) {
|
|
|
8578
8578
|
read: (reader) => {
|
|
8579
8579
|
// Top-level 404 lookup
|
|
8580
8580
|
const compositeSnapshot = luvio.storeLookup({
|
|
8581
|
-
recordId: keyBuilder$
|
|
8581
|
+
recordId: keyBuilder$3s(luvio, resourceParams),
|
|
8582
8582
|
node: {
|
|
8583
8583
|
kind: 'Fragment',
|
|
8584
8584
|
private: [],
|
|
8585
|
-
version: VERSION$
|
|
8585
|
+
version: VERSION$2v,
|
|
8586
8586
|
},
|
|
8587
8587
|
variables: {},
|
|
8588
8588
|
});
|
|
@@ -8602,7 +8602,7 @@ function selectChildResourceParams$8(luvio, childResources, resourceParams) {
|
|
|
8602
8602
|
reader.enterPath(i);
|
|
8603
8603
|
reader.enterPath(envelopeBodyPath);
|
|
8604
8604
|
const childResource = childResources[i];
|
|
8605
|
-
const childKey = keyBuilder$
|
|
8605
|
+
const childKey = keyBuilder$3t(luvio, childResource);
|
|
8606
8606
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
8607
8607
|
const childSnapshot = reader.read(buildRecordSelector(luvio, childResource.urlParams.recordId, childResource.queryParams.fields || [], childResource.queryParams.optionalFields || []));
|
|
8608
8608
|
reader.exitPath();
|
|
@@ -8702,10 +8702,10 @@ function createChildResourceParams$c(resourceParams) {
|
|
|
8702
8702
|
}
|
|
8703
8703
|
return childConfigs;
|
|
8704
8704
|
}
|
|
8705
|
-
function keyBuilder$
|
|
8705
|
+
function keyBuilder$3s(luvio, params) {
|
|
8706
8706
|
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 + ')';
|
|
8707
8707
|
}
|
|
8708
|
-
function getResponseCacheKeys$
|
|
8708
|
+
function getResponseCacheKeys$16(keys, luvio, resourceParams, response) {
|
|
8709
8709
|
const childEnvelopes = response.results;
|
|
8710
8710
|
const childResourceParamsArray = createChildResourceParams$c(resourceParams);
|
|
8711
8711
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -8719,25 +8719,25 @@ function getResponseCacheKeys$15(keys, luvio, resourceParams, response) {
|
|
|
8719
8719
|
const childResult = childEnvelopes[index];
|
|
8720
8720
|
const { statusCode: childStatusCode, result: childBody } = childResult;
|
|
8721
8721
|
if (childStatusCode === 200) {
|
|
8722
|
-
getResponseCacheKeys$
|
|
8722
|
+
getResponseCacheKeys$17(keys, luvio, childResourceParams, childBody);
|
|
8723
8723
|
}
|
|
8724
8724
|
else if (childStatusCode === 404) {
|
|
8725
|
-
const childKey = keyBuilder$
|
|
8725
|
+
const childKey = keyBuilder$3t(luvio, childResourceParams);
|
|
8726
8726
|
keys.set(childKey, {
|
|
8727
8727
|
namespace: keyPrefix,
|
|
8728
|
-
representationName: RepresentationType$
|
|
8728
|
+
representationName: RepresentationType$_,
|
|
8729
8729
|
mergeable: false
|
|
8730
8730
|
});
|
|
8731
8731
|
}
|
|
8732
8732
|
}
|
|
8733
8733
|
}
|
|
8734
|
-
function ingestError$
|
|
8735
|
-
const key = keyBuilder$
|
|
8734
|
+
function ingestError$Q(luvio, params, error, snapshotRefresh) {
|
|
8735
|
+
const key = keyBuilder$3s(luvio, params);
|
|
8736
8736
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
8737
8737
|
luvio.storeIngestError(key, errorSnapshot);
|
|
8738
8738
|
return errorSnapshot;
|
|
8739
8739
|
}
|
|
8740
|
-
function createResourceRequest$
|
|
8740
|
+
function createResourceRequest$1e(config) {
|
|
8741
8741
|
const headers = {};
|
|
8742
8742
|
return {
|
|
8743
8743
|
baseUri: '/services/data/v62.0',
|
|
@@ -8751,7 +8751,7 @@ function createResourceRequest$1d(config) {
|
|
|
8751
8751
|
};
|
|
8752
8752
|
}
|
|
8753
8753
|
|
|
8754
|
-
function createResourceParams$
|
|
8754
|
+
function createResourceParams$14(config) {
|
|
8755
8755
|
const { records: configRecords } = config;
|
|
8756
8756
|
const recordIds = [];
|
|
8757
8757
|
const resourceConfigFields = [];
|
|
@@ -8803,13 +8803,13 @@ function createChildResourceParams$b(config) {
|
|
|
8803
8803
|
return childResources;
|
|
8804
8804
|
}
|
|
8805
8805
|
|
|
8806
|
-
function adapterFragment$
|
|
8806
|
+
function adapterFragment$O(luvio, config) {
|
|
8807
8807
|
const childResources = createChildResourceParams$b(config);
|
|
8808
|
-
const resourceParams = createResourceParams$
|
|
8808
|
+
const resourceParams = createResourceParams$14(config);
|
|
8809
8809
|
return selectChildResourceParams$8(luvio, childResources, resourceParams);
|
|
8810
8810
|
}
|
|
8811
8811
|
|
|
8812
|
-
function onFetchResponseSuccess$
|
|
8812
|
+
function onFetchResponseSuccess$S(luvio, config, resourceParams, response, serverRequestCount = 0) {
|
|
8813
8813
|
const childEnvelopes = response.body.results;
|
|
8814
8814
|
const childResourceParamsArray = createChildResourceParams$b(config);
|
|
8815
8815
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -8821,7 +8821,7 @@ function onFetchResponseSuccess$R(luvio, config, resourceParams, response, serve
|
|
|
8821
8821
|
}
|
|
8822
8822
|
}
|
|
8823
8823
|
const snapshotStateFulfilled = 'Fulfilled';
|
|
8824
|
-
const key = keyBuilder$
|
|
8824
|
+
const key = keyBuilder$3s(luvio, resourceParams);
|
|
8825
8825
|
const { childSnapshotData, seenRecords } = ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount);
|
|
8826
8826
|
const snapshot = {
|
|
8827
8827
|
recordId: key,
|
|
@@ -8830,36 +8830,36 @@ function onFetchResponseSuccess$R(luvio, config, resourceParams, response, serve
|
|
|
8830
8830
|
seenRecords: seenRecords,
|
|
8831
8831
|
select: {
|
|
8832
8832
|
recordId: key,
|
|
8833
|
-
node: adapterFragment$
|
|
8833
|
+
node: adapterFragment$O(luvio, config),
|
|
8834
8834
|
variables: {},
|
|
8835
8835
|
},
|
|
8836
8836
|
refresh: {
|
|
8837
8837
|
config,
|
|
8838
|
-
resolve: () => buildNetworkSnapshot$
|
|
8838
|
+
resolve: () => buildNetworkSnapshot$1a(luvio, config, serverRequestCount, snapshotRefreshOptions),
|
|
8839
8839
|
},
|
|
8840
8840
|
variables: {},
|
|
8841
8841
|
};
|
|
8842
8842
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8843
8843
|
}
|
|
8844
8844
|
|
|
8845
|
-
function onFetchResponseError$
|
|
8846
|
-
const snapshot = ingestError$
|
|
8845
|
+
function onFetchResponseError$T(luvio, config, resourceParams, response) {
|
|
8846
|
+
const snapshot = ingestError$Q(luvio, resourceParams, response, {
|
|
8847
8847
|
config,
|
|
8848
|
-
resolve: () => buildNetworkSnapshot$
|
|
8848
|
+
resolve: () => buildNetworkSnapshot$1a(luvio, config, 0, snapshotRefreshOptions),
|
|
8849
8849
|
});
|
|
8850
8850
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8851
8851
|
}
|
|
8852
|
-
function buildNetworkSnapshot$
|
|
8853
|
-
const resourceParams = createResourceParams$
|
|
8854
|
-
const request = createResourceRequest$
|
|
8852
|
+
function buildNetworkSnapshot$1a(luvio, config, serverRequestCount = 0, options) {
|
|
8853
|
+
const resourceParams = createResourceParams$14(config);
|
|
8854
|
+
const request = createResourceRequest$1e(resourceParams);
|
|
8855
8855
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8856
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
8856
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$S(luvio, config, resourceParams, response, serverRequestCount + 1), () => {
|
|
8857
8857
|
const cache = new StoreKeyMap();
|
|
8858
|
-
getResponseCacheKeys$
|
|
8858
|
+
getResponseCacheKeys$16(cache, luvio, resourceParams, response.body);
|
|
8859
8859
|
return cache;
|
|
8860
8860
|
});
|
|
8861
8861
|
}, (response) => {
|
|
8862
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
8862
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$T(luvio, config, resourceParams, response));
|
|
8863
8863
|
});
|
|
8864
8864
|
}
|
|
8865
8865
|
|
|
@@ -8876,7 +8876,7 @@ function resolveConflict(luvio, map) {
|
|
|
8876
8876
|
recordId,
|
|
8877
8877
|
optionalFields: convertTrieToFields(map.conflicts[recordId].trackedFields),
|
|
8878
8878
|
};
|
|
8879
|
-
buildNetworkSnapshot$
|
|
8879
|
+
buildNetworkSnapshot$1b(luvio, config, map.serverRequestCount);
|
|
8880
8880
|
}
|
|
8881
8881
|
else {
|
|
8882
8882
|
const records = reduce$1.call(ids, (acc, id) => {
|
|
@@ -8888,10 +8888,10 @@ function resolveConflict(luvio, map) {
|
|
|
8888
8888
|
return acc;
|
|
8889
8889
|
}, []);
|
|
8890
8890
|
const config = { records };
|
|
8891
|
-
buildNetworkSnapshot$
|
|
8891
|
+
buildNetworkSnapshot$1a(luvio, config, map.serverRequestCount);
|
|
8892
8892
|
}
|
|
8893
8893
|
}
|
|
8894
|
-
const ingest$
|
|
8894
|
+
const ingest$24 = (input, path, luvio, store, timestamp) => {
|
|
8895
8895
|
const conflictMap = {
|
|
8896
8896
|
conflicts: {},
|
|
8897
8897
|
serverRequestCount: 0,
|
|
@@ -8902,7 +8902,7 @@ const ingest$23 = (input, path, luvio, store, timestamp) => {
|
|
|
8902
8902
|
return result;
|
|
8903
8903
|
};
|
|
8904
8904
|
|
|
8905
|
-
const adapterName
|
|
8905
|
+
const adapterName$10 = 'getListUiByApiName';
|
|
8906
8906
|
const getListUiByApiName_ConfigPropertyMetadata$1 = [
|
|
8907
8907
|
generateParamConfigMetadata$1('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
8908
8908
|
generateParamConfigMetadata$1('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
@@ -8912,9 +8912,9 @@ const getListUiByApiName_ConfigPropertyMetadata$1 = [
|
|
|
8912
8912
|
generateParamConfigMetadata$1('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8913
8913
|
generateParamConfigMetadata$1('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$1),
|
|
8914
8914
|
];
|
|
8915
|
-
const getListUiByApiName_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName
|
|
8915
|
+
const getListUiByApiName_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName$10, getListUiByApiName_ConfigPropertyMetadata$1);
|
|
8916
8916
|
|
|
8917
|
-
const adapterName
|
|
8917
|
+
const adapterName$$$1 = 'getListUiByListViewId';
|
|
8918
8918
|
const getListUiByListViewId_ConfigPropertyMetadata$1 = [
|
|
8919
8919
|
generateParamConfigMetadata$1('listViewId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
8920
8920
|
generateParamConfigMetadata$1('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$1),
|
|
@@ -8923,9 +8923,9 @@ const getListUiByListViewId_ConfigPropertyMetadata$1 = [
|
|
|
8923
8923
|
generateParamConfigMetadata$1('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8924
8924
|
generateParamConfigMetadata$1('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$1),
|
|
8925
8925
|
];
|
|
8926
|
-
const getListUiByListViewId_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName
|
|
8926
|
+
const getListUiByListViewId_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName$$$1, getListUiByListViewId_ConfigPropertyMetadata$1);
|
|
8927
8927
|
|
|
8928
|
-
const adapterName$
|
|
8928
|
+
const adapterName$Z = 'getMruListUi';
|
|
8929
8929
|
const getMruListUi_ConfigPropertyMetadata$1 = [
|
|
8930
8930
|
generateParamConfigMetadata$1('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
8931
8931
|
generateParamConfigMetadata$1('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$1),
|
|
@@ -8934,7 +8934,7 @@ const getMruListUi_ConfigPropertyMetadata$1 = [
|
|
|
8934
8934
|
generateParamConfigMetadata$1('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
8935
8935
|
generateParamConfigMetadata$1('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray$1),
|
|
8936
8936
|
];
|
|
8937
|
-
const getMruListUi_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName$
|
|
8937
|
+
const getMruListUi_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationConfig$1(adapterName$Z, getMruListUi_ConfigPropertyMetadata$1);
|
|
8938
8938
|
// make local copies of the adapter configs so we can ignore other getListUi config parameters to match
|
|
8939
8939
|
// lds222 behavior
|
|
8940
8940
|
({
|
|
@@ -8968,9 +8968,9 @@ const getMruListUi_ConfigPropertyNames$1 = /*#__PURE__*/ buildAdapterValidationC
|
|
|
8968
8968
|
],
|
|
8969
8969
|
},
|
|
8970
8970
|
});
|
|
8971
|
-
const RepresentationType$
|
|
8972
|
-
function keyBuilder$
|
|
8973
|
-
return keyPrefix + '::' + RepresentationType$
|
|
8971
|
+
const RepresentationType$T = 'ObjectInfoRepresentation';
|
|
8972
|
+
function keyBuilder$3d(luvio, config) {
|
|
8973
|
+
return keyPrefix + '::' + RepresentationType$T + ':' + config.apiName;
|
|
8974
8974
|
}
|
|
8975
8975
|
|
|
8976
8976
|
var DiscriminatorValues$5$1;
|
|
@@ -10059,7 +10059,7 @@ function getShallowRecord(luvio, storeRecordId) {
|
|
|
10059
10059
|
*/
|
|
10060
10060
|
function getObjectMetadata(luvio, record) {
|
|
10061
10061
|
const { data: objectInfo } = luvio.storeLookup({
|
|
10062
|
-
recordId: keyBuilder$
|
|
10062
|
+
recordId: keyBuilder$3d(luvio, { apiName: record.apiName }),
|
|
10063
10063
|
node: {
|
|
10064
10064
|
kind: 'Fragment',
|
|
10065
10065
|
private: ['eTag'],
|
|
@@ -10100,7 +10100,7 @@ function getObjectMetadata(luvio, record) {
|
|
|
10100
10100
|
function fixRecordTypes(luvio, record) {
|
|
10101
10101
|
// non-master record types should always be correct
|
|
10102
10102
|
if (record.recordTypeId === MAIN_RECORD_TYPE_ID) {
|
|
10103
|
-
const key = keyBuilder$
|
|
10103
|
+
const key = keyBuilder$3u(luvio, { recordId: record.id });
|
|
10104
10104
|
const recordNode = luvio.getNode(key);
|
|
10105
10105
|
if (isGraphNode(recordNode) && recordNode.scalar('recordTypeId') !== MAIN_RECORD_TYPE_ID) {
|
|
10106
10106
|
// ignore bogus incoming record type information & keep what we have
|
|
@@ -10173,7 +10173,7 @@ class AdsBridge {
|
|
|
10173
10173
|
// Don't let incorrect ADS/RecordGVP recordTypeIds replace a valid record type in our store
|
|
10174
10174
|
// with the master record type. See W-7302870 for details.
|
|
10175
10175
|
fixRecordTypes(luvio, recordCopy);
|
|
10176
|
-
luvio.storeIngest(INGEST_KEY, ingest$
|
|
10176
|
+
luvio.storeIngest(INGEST_KEY, ingest$24, recordCopy);
|
|
10177
10177
|
}
|
|
10178
10178
|
}
|
|
10179
10179
|
if (didIngestRecord === true) {
|
|
@@ -10186,7 +10186,7 @@ class AdsBridge {
|
|
|
10186
10186
|
*/
|
|
10187
10187
|
evict(recordId) {
|
|
10188
10188
|
const { luvio } = this;
|
|
10189
|
-
const key = keyBuilder$
|
|
10189
|
+
const key = keyBuilder$3u(luvio, { recordId });
|
|
10190
10190
|
return this.lockLdsRecordEmit(() => {
|
|
10191
10191
|
luvio.storeEvict(key);
|
|
10192
10192
|
luvio.storeBroadcast();
|
|
@@ -10201,7 +10201,7 @@ class AdsBridge {
|
|
|
10201
10201
|
*/
|
|
10202
10202
|
getTrackedFieldsForRecord(recordId) {
|
|
10203
10203
|
const { luvio } = this;
|
|
10204
|
-
const storeRecordId = keyBuilder$
|
|
10204
|
+
const storeRecordId = keyBuilder$3u(luvio, { recordId });
|
|
10205
10205
|
const recordNode = luvio.getNode(storeRecordId);
|
|
10206
10206
|
if (!isGraphNode(recordNode)) {
|
|
10207
10207
|
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.299.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,8 +29,8 @@
|
|
|
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-mobile": "^1.
|
|
32
|
+
"@salesforce/lds-adapters-uiapi": "^1.299.0",
|
|
33
|
+
"@salesforce/lds-uiapi-record-utils-mobile": "^1.299.0"
|
|
34
34
|
},
|
|
35
35
|
"volta": {
|
|
36
36
|
"extends": "../../package.json"
|