@salesforce/lds-ads-bridge 1.200.0 → 1.201.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 +142 -142
- package/dist/adsBridge.js +1 -1
- package/package.json +1 -1
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -387,7 +387,7 @@ const callbacks$1 = [];
|
|
|
387
387
|
function register(r) {
|
|
388
388
|
callbacks$1.forEach((callback) => callback(r));
|
|
389
389
|
}
|
|
390
|
-
// version: 1.
|
|
390
|
+
// version: 1.201.0-17060accd
|
|
391
391
|
|
|
392
392
|
/**
|
|
393
393
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -5436,8 +5436,8 @@ function createLink$1(ref) {
|
|
|
5436
5436
|
};
|
|
5437
5437
|
}
|
|
5438
5438
|
|
|
5439
|
-
const VERSION$
|
|
5440
|
-
function validate$
|
|
5439
|
+
const VERSION$2i = "d1e589a127fb1060c89070cdb6f500b2";
|
|
5440
|
+
function validate$1C(obj, path = 'RecordTypeInfoRepresentation') {
|
|
5441
5441
|
const v_error = (() => {
|
|
5442
5442
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5443
5443
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5470,10 +5470,10 @@ function validate$1z(obj, path = 'RecordTypeInfoRepresentation') {
|
|
|
5470
5470
|
})();
|
|
5471
5471
|
return v_error === undefined ? null : v_error;
|
|
5472
5472
|
}
|
|
5473
|
-
const select$
|
|
5473
|
+
const select$2Q = function RecordTypeInfoRepresentationSelect() {
|
|
5474
5474
|
return {
|
|
5475
5475
|
kind: 'Fragment',
|
|
5476
|
-
version: VERSION$
|
|
5476
|
+
version: VERSION$2i,
|
|
5477
5477
|
private: [],
|
|
5478
5478
|
selections: [
|
|
5479
5479
|
{
|
|
@@ -5499,7 +5499,7 @@ const select$2M = function RecordTypeInfoRepresentationSelect() {
|
|
|
5499
5499
|
]
|
|
5500
5500
|
};
|
|
5501
5501
|
};
|
|
5502
|
-
function equals$
|
|
5502
|
+
function equals$10(existing, incoming) {
|
|
5503
5503
|
const existing_available = existing.available;
|
|
5504
5504
|
const incoming_available = incoming.available;
|
|
5505
5505
|
if (!(existing_available === incoming_available)) {
|
|
@@ -5528,8 +5528,8 @@ function equals$Z(existing, incoming) {
|
|
|
5528
5528
|
return true;
|
|
5529
5529
|
}
|
|
5530
5530
|
|
|
5531
|
-
const VERSION$
|
|
5532
|
-
function validate$
|
|
5531
|
+
const VERSION$2h = "195d918987a35f45e1aa4dce9a11d8c5";
|
|
5532
|
+
function validate$1B(obj, path = 'FieldValueRepresentation') {
|
|
5533
5533
|
const v_error = (() => {
|
|
5534
5534
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5535
5535
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5619,11 +5619,11 @@ function validate$1y(obj, path = 'FieldValueRepresentation') {
|
|
|
5619
5619
|
})();
|
|
5620
5620
|
return v_error === undefined ? null : v_error;
|
|
5621
5621
|
}
|
|
5622
|
-
const RepresentationType$
|
|
5623
|
-
const select$
|
|
5622
|
+
const RepresentationType$V = 'FieldValueRepresentation';
|
|
5623
|
+
const select$2P = function FieldValueRepresentationSelect() {
|
|
5624
5624
|
return {
|
|
5625
5625
|
kind: 'Fragment',
|
|
5626
|
-
version: VERSION$
|
|
5626
|
+
version: VERSION$2h,
|
|
5627
5627
|
private: [],
|
|
5628
5628
|
selections: [
|
|
5629
5629
|
{
|
|
@@ -5634,12 +5634,12 @@ const select$2L = function FieldValueRepresentationSelect() {
|
|
|
5634
5634
|
name: 'value',
|
|
5635
5635
|
kind: 'Link',
|
|
5636
5636
|
nullable: true,
|
|
5637
|
-
fragment: select$
|
|
5637
|
+
fragment: select$2N()
|
|
5638
5638
|
}
|
|
5639
5639
|
]
|
|
5640
5640
|
};
|
|
5641
5641
|
};
|
|
5642
|
-
function equals
|
|
5642
|
+
function equals$$(existing, incoming) {
|
|
5643
5643
|
const existing_displayValue = existing.displayValue;
|
|
5644
5644
|
const incoming_displayValue = incoming.displayValue;
|
|
5645
5645
|
if (!(existing_displayValue === incoming_displayValue)) {
|
|
@@ -5657,16 +5657,16 @@ function equals$Y(existing, incoming) {
|
|
|
5657
5657
|
}
|
|
5658
5658
|
return true;
|
|
5659
5659
|
}
|
|
5660
|
-
function getTypeCacheKeys$
|
|
5660
|
+
function getTypeCacheKeys$1V(rootKeySet, luvio, input, fullPathFactory) {
|
|
5661
5661
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5662
5662
|
const rootKey = fullPathFactory();
|
|
5663
5663
|
rootKeySet.set(rootKey, {
|
|
5664
5664
|
namespace: keyPrefix,
|
|
5665
|
-
representationName: RepresentationType$
|
|
5665
|
+
representationName: RepresentationType$V,
|
|
5666
5666
|
mergeable: false
|
|
5667
5667
|
});
|
|
5668
5668
|
if (input.value !== null && typeof input.value === 'object') {
|
|
5669
|
-
getTypeCacheKeys$
|
|
5669
|
+
getTypeCacheKeys$1U(rootKeySet, luvio, input.value);
|
|
5670
5670
|
}
|
|
5671
5671
|
}
|
|
5672
5672
|
|
|
@@ -5677,12 +5677,12 @@ const { isArray } = Array;
|
|
|
5677
5677
|
const { concat, filter, includes, push: push$1, reduce } = Array.prototype;
|
|
5678
5678
|
|
|
5679
5679
|
// we override the generated so we can set "mergeable: true" on the root key
|
|
5680
|
-
const getTypeCacheKeys$
|
|
5680
|
+
const getTypeCacheKeys$1U = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
5681
5681
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5682
|
-
const rootKey = keyBuilderFromType$
|
|
5682
|
+
const rootKey = keyBuilderFromType$y(luvio, input);
|
|
5683
5683
|
rootKeySet.set(rootKey, {
|
|
5684
5684
|
namespace: keyPrefix,
|
|
5685
|
-
representationName: RepresentationType$
|
|
5685
|
+
representationName: RepresentationType$T,
|
|
5686
5686
|
mergeable: true,
|
|
5687
5687
|
});
|
|
5688
5688
|
const input_childRelationships = input.childRelationships;
|
|
@@ -5690,21 +5690,21 @@ const getTypeCacheKeys$1T = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
5690
5690
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
5691
5691
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
5692
5692
|
const key = input_childRelationships_keys[i];
|
|
5693
|
-
getTypeCacheKeys$
|
|
5693
|
+
getTypeCacheKeys$1T(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
5694
5694
|
}
|
|
5695
5695
|
const input_fields = input.fields;
|
|
5696
5696
|
const input_fields_keys = keys$1(input_fields);
|
|
5697
5697
|
const input_fields_length = input_fields_keys.length;
|
|
5698
5698
|
for (let i = 0; i < input_fields_length; i++) {
|
|
5699
5699
|
const key = input_fields_keys[i];
|
|
5700
|
-
getTypeCacheKeys$
|
|
5700
|
+
getTypeCacheKeys$1V(rootKeySet, luvio, input_fields[key], () => rootKey + '__fields__' + key);
|
|
5701
5701
|
}
|
|
5702
5702
|
return rootKeySet;
|
|
5703
5703
|
};
|
|
5704
5704
|
|
|
5705
|
-
const TTL$
|
|
5706
|
-
const VERSION$
|
|
5707
|
-
function validate$
|
|
5705
|
+
const TTL$C = 120000;
|
|
5706
|
+
const VERSION$2g = "79cb5ac9f44542f683d00245fdfe500d";
|
|
5707
|
+
function validate$1A(obj, path = 'RecordCollectionRepresentation') {
|
|
5708
5708
|
const v_error = (() => {
|
|
5709
5709
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5710
5710
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5864,14 +5864,14 @@ function validate$1x(obj, path = 'RecordCollectionRepresentation') {
|
|
|
5864
5864
|
})();
|
|
5865
5865
|
return v_error === undefined ? null : v_error;
|
|
5866
5866
|
}
|
|
5867
|
-
const RepresentationType$
|
|
5868
|
-
function normalize$
|
|
5867
|
+
const RepresentationType$U = 'RecordCollectionRepresentation';
|
|
5868
|
+
function normalize$M(input, existing, path, luvio, store, timestamp) {
|
|
5869
5869
|
const input_records = input.records;
|
|
5870
5870
|
const input_records_id = path.fullPath + '__records';
|
|
5871
5871
|
for (let i = 0; i < input_records.length; i++) {
|
|
5872
5872
|
const input_records_item = input_records[i];
|
|
5873
5873
|
let input_records_item_id = input_records_id + '__' + i;
|
|
5874
|
-
input_records[i] = ingest$
|
|
5874
|
+
input_records[i] = ingest$1P(input_records_item, {
|
|
5875
5875
|
fullPath: input_records_item_id,
|
|
5876
5876
|
propertyName: i,
|
|
5877
5877
|
parent: {
|
|
@@ -5884,10 +5884,10 @@ function normalize$L(input, existing, path, luvio, store, timestamp) {
|
|
|
5884
5884
|
}
|
|
5885
5885
|
return input;
|
|
5886
5886
|
}
|
|
5887
|
-
const select$
|
|
5887
|
+
const select$2O = function RecordCollectionRepresentationSelect() {
|
|
5888
5888
|
return {
|
|
5889
5889
|
kind: 'Fragment',
|
|
5890
|
-
version: VERSION$
|
|
5890
|
+
version: VERSION$2g,
|
|
5891
5891
|
private: [],
|
|
5892
5892
|
selections: [
|
|
5893
5893
|
{
|
|
@@ -5922,12 +5922,12 @@ const select$2K = function RecordCollectionRepresentationSelect() {
|
|
|
5922
5922
|
name: 'records',
|
|
5923
5923
|
kind: 'Link',
|
|
5924
5924
|
plural: true,
|
|
5925
|
-
fragment: select$
|
|
5925
|
+
fragment: select$2N()
|
|
5926
5926
|
}
|
|
5927
5927
|
]
|
|
5928
5928
|
};
|
|
5929
5929
|
};
|
|
5930
|
-
function equals$
|
|
5930
|
+
function equals$_(existing, incoming) {
|
|
5931
5931
|
const existing_count = existing.count;
|
|
5932
5932
|
const incoming_count = incoming.count;
|
|
5933
5933
|
if (!(existing_count === incoming_count)) {
|
|
@@ -5975,63 +5975,63 @@ function equals$X(existing, incoming) {
|
|
|
5975
5975
|
}
|
|
5976
5976
|
return true;
|
|
5977
5977
|
}
|
|
5978
|
-
const ingest$
|
|
5978
|
+
const ingest$1Q = function RecordCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5979
5979
|
if (process.env.NODE_ENV !== 'production') {
|
|
5980
|
-
const validateError = validate$
|
|
5980
|
+
const validateError = validate$1A(input);
|
|
5981
5981
|
if (validateError !== null) {
|
|
5982
5982
|
throw validateError;
|
|
5983
5983
|
}
|
|
5984
5984
|
}
|
|
5985
5985
|
const key = path.fullPath;
|
|
5986
5986
|
const existingRecord = store.readEntry(key);
|
|
5987
|
-
const ttlToUse = TTL$
|
|
5988
|
-
let incomingRecord = normalize$
|
|
5987
|
+
const ttlToUse = TTL$C;
|
|
5988
|
+
let incomingRecord = normalize$M(input, store.readEntry(key), {
|
|
5989
5989
|
fullPath: key,
|
|
5990
5990
|
parent: path.parent,
|
|
5991
5991
|
propertyName: path.propertyName,
|
|
5992
5992
|
ttl: ttlToUse
|
|
5993
5993
|
}, luvio, store, timestamp);
|
|
5994
|
-
if (existingRecord === undefined || equals$
|
|
5994
|
+
if (existingRecord === undefined || equals$_(existingRecord, incomingRecord) === false) {
|
|
5995
5995
|
luvio.storePublish(key, incomingRecord);
|
|
5996
5996
|
}
|
|
5997
5997
|
{
|
|
5998
5998
|
const storeMetadataParams = {
|
|
5999
5999
|
ttl: ttlToUse,
|
|
6000
6000
|
namespace: "UiApi",
|
|
6001
|
-
version: VERSION$
|
|
6002
|
-
representationName: RepresentationType$
|
|
6001
|
+
version: VERSION$2g,
|
|
6002
|
+
representationName: RepresentationType$U,
|
|
6003
6003
|
};
|
|
6004
6004
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
6005
6005
|
}
|
|
6006
6006
|
return createLink$1(key);
|
|
6007
6007
|
};
|
|
6008
|
-
function getTypeCacheKeys$
|
|
6008
|
+
function getTypeCacheKeys$1T(rootKeySet, luvio, input, fullPathFactory) {
|
|
6009
6009
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
6010
6010
|
const rootKey = fullPathFactory();
|
|
6011
6011
|
rootKeySet.set(rootKey, {
|
|
6012
6012
|
namespace: keyPrefix,
|
|
6013
|
-
representationName: RepresentationType$
|
|
6013
|
+
representationName: RepresentationType$U,
|
|
6014
6014
|
mergeable: false
|
|
6015
6015
|
});
|
|
6016
6016
|
const input_records_length = input.records.length;
|
|
6017
6017
|
for (let i = 0; i < input_records_length; i++) {
|
|
6018
|
-
getTypeCacheKeys$
|
|
6018
|
+
getTypeCacheKeys$1U(rootKeySet, luvio, input.records[i]);
|
|
6019
6019
|
}
|
|
6020
6020
|
}
|
|
6021
6021
|
|
|
6022
6022
|
const VIEW_ENTITY_API_NAME = 'Name';
|
|
6023
6023
|
const VIEW_ENTITY_KEY_PREFIX = `${keyPrefix}::RecordViewEntityRepresentation:${VIEW_ENTITY_API_NAME}:`;
|
|
6024
|
-
const keyBuilderFromType$
|
|
6024
|
+
const keyBuilderFromType$z = function RecordRepresentationKeyBuilderFromType(luvio, object) {
|
|
6025
6025
|
const { apiName, id } = object;
|
|
6026
6026
|
if (apiName === VIEW_ENTITY_API_NAME) {
|
|
6027
6027
|
return VIEW_ENTITY_KEY_PREFIX + id;
|
|
6028
6028
|
}
|
|
6029
|
-
return keyBuilderFromType$
|
|
6029
|
+
return keyBuilderFromType$y(luvio, object);
|
|
6030
6030
|
};
|
|
6031
6031
|
|
|
6032
|
-
const TTL$
|
|
6033
|
-
const VERSION$
|
|
6034
|
-
function validate$
|
|
6032
|
+
const TTL$B = 30000;
|
|
6033
|
+
const VERSION$2f = "98c5b18512e48ca8d28727549507e4ba";
|
|
6034
|
+
function validate$1z(obj, path = 'RecordRepresentation') {
|
|
6035
6035
|
const v_error = (() => {
|
|
6036
6036
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
6037
6037
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -6161,7 +6161,7 @@ function validate$1w(obj, path = 'RecordRepresentation') {
|
|
|
6161
6161
|
const path_recordTypeInfo = path + '.recordTypeInfo';
|
|
6162
6162
|
let obj_recordTypeInfo_union0 = null;
|
|
6163
6163
|
const obj_recordTypeInfo_union0_error = (() => {
|
|
6164
|
-
const referencepath_recordTypeInfoValidationError = validate$
|
|
6164
|
+
const referencepath_recordTypeInfoValidationError = validate$1C(obj_recordTypeInfo, path_recordTypeInfo);
|
|
6165
6165
|
if (referencepath_recordTypeInfoValidationError !== null) {
|
|
6166
6166
|
let message = 'Object doesn\'t match RecordTypeInfoRepresentation (at "' + path_recordTypeInfo + '")\n';
|
|
6167
6167
|
message += referencepath_recordTypeInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -6220,15 +6220,15 @@ function validate$1w(obj, path = 'RecordRepresentation') {
|
|
|
6220
6220
|
})();
|
|
6221
6221
|
return v_error === undefined ? null : v_error;
|
|
6222
6222
|
}
|
|
6223
|
-
const RepresentationType$
|
|
6224
|
-
function keyBuilder$
|
|
6225
|
-
return keyPrefix + '::' + RepresentationType$
|
|
6223
|
+
const RepresentationType$T = 'RecordRepresentation';
|
|
6224
|
+
function keyBuilder$34(luvio, config) {
|
|
6225
|
+
return keyPrefix + '::' + RepresentationType$T + ':' + config.recordId;
|
|
6226
6226
|
}
|
|
6227
|
-
function keyBuilderFromType$
|
|
6227
|
+
function keyBuilderFromType$y(luvio, object) {
|
|
6228
6228
|
const keyParams = {
|
|
6229
6229
|
recordId: object.id
|
|
6230
6230
|
};
|
|
6231
|
-
return keyBuilder$
|
|
6231
|
+
return keyBuilder$34(luvio, keyParams);
|
|
6232
6232
|
}
|
|
6233
6233
|
function dynamicNormalize$5(ingestParams) {
|
|
6234
6234
|
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
@@ -6273,11 +6273,11 @@ function dynamicNormalize$5(ingestParams) {
|
|
|
6273
6273
|
return input;
|
|
6274
6274
|
};
|
|
6275
6275
|
}
|
|
6276
|
-
const select$
|
|
6277
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
6276
|
+
const select$2N = function RecordRepresentationSelect() {
|
|
6277
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2Q();
|
|
6278
6278
|
return {
|
|
6279
6279
|
kind: 'Fragment',
|
|
6280
|
-
version: VERSION$
|
|
6280
|
+
version: VERSION$2f,
|
|
6281
6281
|
private: [
|
|
6282
6282
|
'eTag',
|
|
6283
6283
|
'weakEtag'
|
|
@@ -6291,13 +6291,13 @@ const select$2J = function RecordRepresentationSelect() {
|
|
|
6291
6291
|
name: 'childRelationships',
|
|
6292
6292
|
kind: 'Link',
|
|
6293
6293
|
map: true,
|
|
6294
|
-
fragment: select$
|
|
6294
|
+
fragment: select$2O()
|
|
6295
6295
|
},
|
|
6296
6296
|
{
|
|
6297
6297
|
name: 'fields',
|
|
6298
6298
|
kind: 'Link',
|
|
6299
6299
|
map: true,
|
|
6300
|
-
fragment: select$
|
|
6300
|
+
fragment: select$2P()
|
|
6301
6301
|
},
|
|
6302
6302
|
{
|
|
6303
6303
|
name: 'id',
|
|
@@ -6333,18 +6333,18 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
6333
6333
|
name: 'childRelationships',
|
|
6334
6334
|
kind: 'Link',
|
|
6335
6335
|
map: true,
|
|
6336
|
-
fragment: select$
|
|
6336
|
+
fragment: select$2O()
|
|
6337
6337
|
} : params.childRelationships;
|
|
6338
6338
|
const fieldsPathSelection = params.fields === undefined ? {
|
|
6339
6339
|
name: 'fields',
|
|
6340
6340
|
kind: 'Link',
|
|
6341
6341
|
map: true,
|
|
6342
|
-
fragment: select$
|
|
6342
|
+
fragment: select$2P()
|
|
6343
6343
|
} : params.fields;
|
|
6344
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
6344
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2Q();
|
|
6345
6345
|
return {
|
|
6346
6346
|
kind: 'Fragment',
|
|
6347
|
-
version: VERSION$
|
|
6347
|
+
version: VERSION$2f,
|
|
6348
6348
|
private: [
|
|
6349
6349
|
'eTag',
|
|
6350
6350
|
'weakEtag'
|
|
@@ -6385,7 +6385,7 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
6385
6385
|
]
|
|
6386
6386
|
};
|
|
6387
6387
|
};
|
|
6388
|
-
function equals$
|
|
6388
|
+
function equals$Z(existing, incoming) {
|
|
6389
6389
|
const existing_weakEtag = existing.weakEtag;
|
|
6390
6390
|
const incoming_weakEtag = incoming.weakEtag;
|
|
6391
6391
|
if (!(existing_weakEtag === incoming_weakEtag)) {
|
|
@@ -6446,7 +6446,7 @@ function equals$W(existing, incoming) {
|
|
|
6446
6446
|
if (!(existing_recordTypeInfo === incoming_recordTypeInfo
|
|
6447
6447
|
|| (existing_recordTypeInfo != null &&
|
|
6448
6448
|
incoming_recordTypeInfo != null &&
|
|
6449
|
-
equals$
|
|
6449
|
+
equals$10(existing_recordTypeInfo, incoming_recordTypeInfo)))) {
|
|
6450
6450
|
return false;
|
|
6451
6451
|
}
|
|
6452
6452
|
const existing_systemModstamp = existing.systemModstamp;
|
|
@@ -7912,7 +7912,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7912
7912
|
kind: 'Fragment',
|
|
7913
7913
|
private: ['eTag', 'weakEtag'],
|
|
7914
7914
|
selections: createRecordSelection(childFieldDefinition),
|
|
7915
|
-
version: VERSION$
|
|
7915
|
+
version: VERSION$2f,
|
|
7916
7916
|
},
|
|
7917
7917
|
};
|
|
7918
7918
|
}
|
|
@@ -7922,7 +7922,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
7922
7922
|
required: childFieldDefinition.optional === true ? false : undefined,
|
|
7923
7923
|
fragment: {
|
|
7924
7924
|
kind: 'Fragment',
|
|
7925
|
-
version: VERSION$
|
|
7925
|
+
version: VERSION$2h,
|
|
7926
7926
|
private: [],
|
|
7927
7927
|
selections: [DISPLAY_VALUE_SELECTION, fieldValueSelection],
|
|
7928
7928
|
},
|
|
@@ -8004,7 +8004,7 @@ const RECORD_REPRESENTATION_ERROR_VERSION = 'RECORD_REPRESENTATION_ERROR_VERSION
|
|
|
8004
8004
|
const RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS = {
|
|
8005
8005
|
representationName: '',
|
|
8006
8006
|
namespace: keyPrefix,
|
|
8007
|
-
ttl: TTL$
|
|
8007
|
+
ttl: TTL$B,
|
|
8008
8008
|
version: RECORD_REPRESENTATION_ERROR_VERSION,
|
|
8009
8009
|
};
|
|
8010
8010
|
function isGraphNode$1(node) {
|
|
@@ -8377,7 +8377,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
8377
8377
|
};
|
|
8378
8378
|
}
|
|
8379
8379
|
else {
|
|
8380
|
-
buildNetworkSnapshot$
|
|
8380
|
+
buildNetworkSnapshot$11(luvio, {
|
|
8381
8381
|
recordId: incoming.id,
|
|
8382
8382
|
optionalFields: convertTrieToFields(incomingTrackedFieldsTrieRoot),
|
|
8383
8383
|
});
|
|
@@ -8397,7 +8397,7 @@ function mergeRecordConflict(luvio, incoming, existing, recordConflictMap) {
|
|
|
8397
8397
|
name: existing.apiName,
|
|
8398
8398
|
children: {},
|
|
8399
8399
|
};
|
|
8400
|
-
const recordKey = keyBuilder$
|
|
8400
|
+
const recordKey = keyBuilder$34(luvio, {
|
|
8401
8401
|
recordId: incoming.id,
|
|
8402
8402
|
});
|
|
8403
8403
|
const trackedFieldsConfig = {
|
|
@@ -8542,7 +8542,7 @@ function fixDisplayValue(existing, incoming, path) {
|
|
|
8542
8542
|
}
|
|
8543
8543
|
}
|
|
8544
8544
|
|
|
8545
|
-
function normalize$
|
|
8545
|
+
function normalize$L(input, existing, path, luvio, store, timestamp, fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8546
8546
|
const input_value = input.value;
|
|
8547
8547
|
const input_value_id = path.fullPath + '__value';
|
|
8548
8548
|
if (input_value !== null && typeof input_value === 'object') {
|
|
@@ -8563,14 +8563,14 @@ function normalize$K(input, existing, path, luvio, store, timestamp, fieldsTrie,
|
|
|
8563
8563
|
function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8564
8564
|
return (input, path, luvio, store, timestamp) => {
|
|
8565
8565
|
if (process.env.NODE_ENV !== 'production') {
|
|
8566
|
-
const validateError = validate$
|
|
8566
|
+
const validateError = validate$1B(input);
|
|
8567
8567
|
if (validateError !== null) {
|
|
8568
8568
|
throw validateError;
|
|
8569
8569
|
}
|
|
8570
8570
|
}
|
|
8571
8571
|
const key = path.fullPath;
|
|
8572
8572
|
let existingRecord = store.readEntry(key);
|
|
8573
|
-
let incomingRecord = normalize$
|
|
8573
|
+
let incomingRecord = normalize$L(input, store.readEntry(key), {
|
|
8574
8574
|
fullPath: key,
|
|
8575
8575
|
parent: path.parent,
|
|
8576
8576
|
propertyName: path.propertyName,
|
|
@@ -8578,7 +8578,7 @@ function makeIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
|
8578
8578
|
// read again after children ingested in case of a circular ref
|
|
8579
8579
|
existingRecord = store.readEntry(key);
|
|
8580
8580
|
incomingRecord = merge$2(existingRecord, incomingRecord, luvio, path);
|
|
8581
|
-
if (existingRecord === undefined || equals
|
|
8581
|
+
if (existingRecord === undefined || equals$$(existingRecord, incomingRecord) === false) {
|
|
8582
8582
|
luvio.storePublish(key, incomingRecord);
|
|
8583
8583
|
}
|
|
8584
8584
|
return createLink$1(key);
|
|
@@ -8648,7 +8648,7 @@ function createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap
|
|
|
8648
8648
|
}
|
|
8649
8649
|
function createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap) {
|
|
8650
8650
|
return dynamicNormalize$5({
|
|
8651
|
-
childRelationships: ingest$
|
|
8651
|
+
childRelationships: ingest$1Q,
|
|
8652
8652
|
fields: createFieldsIngestion(fieldsTrie, optionalFieldsTrie, recordConflictMap),
|
|
8653
8653
|
});
|
|
8654
8654
|
}
|
|
@@ -8656,12 +8656,12 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8656
8656
|
const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
|
|
8657
8657
|
return (input, path, luvio, store, timestamp) => {
|
|
8658
8658
|
if (process.env.NODE_ENV !== 'production') {
|
|
8659
|
-
const validateError = validate$
|
|
8659
|
+
const validateError = validate$1z(input);
|
|
8660
8660
|
if (validateError !== null) {
|
|
8661
8661
|
throw validateError;
|
|
8662
8662
|
}
|
|
8663
8663
|
}
|
|
8664
|
-
const key = keyBuilderFromType$
|
|
8664
|
+
const key = keyBuilderFromType$z(luvio, input);
|
|
8665
8665
|
let existingRecord = store.readEntry(key);
|
|
8666
8666
|
const recordPath = {
|
|
8667
8667
|
fullPath: key,
|
|
@@ -8673,17 +8673,17 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8673
8673
|
existingRecord = store.readEntry(key);
|
|
8674
8674
|
incomingRecord = merge$3(existingRecord, incomingRecord, luvio, path, recordConflictMap);
|
|
8675
8675
|
if (existingRecord === undefined ||
|
|
8676
|
-
equals$
|
|
8676
|
+
equals$Z(existingRecord, incomingRecord) === false ||
|
|
8677
8677
|
// always publish if existing record has drafts
|
|
8678
8678
|
existingRecord.drafts !==
|
|
8679
8679
|
undefined) {
|
|
8680
8680
|
luvio.storePublish(key, incomingRecord);
|
|
8681
8681
|
}
|
|
8682
8682
|
luvio.publishStoreMetadata(key, {
|
|
8683
|
-
ttl: TTL$
|
|
8684
|
-
representationName: RepresentationType$
|
|
8683
|
+
ttl: TTL$B,
|
|
8684
|
+
representationName: RepresentationType$T,
|
|
8685
8685
|
namespace: keyPrefix,
|
|
8686
|
-
version: VERSION$
|
|
8686
|
+
version: VERSION$2f,
|
|
8687
8687
|
});
|
|
8688
8688
|
return createLink$1(key);
|
|
8689
8689
|
};
|
|
@@ -8766,22 +8766,22 @@ function isSingleRecordRequest(urlParams) {
|
|
|
8766
8766
|
return hasOwnProperty$1.call(urlParams, 'recordId');
|
|
8767
8767
|
}
|
|
8768
8768
|
|
|
8769
|
-
const createResourceRequest$
|
|
8769
|
+
const createResourceRequest$16 = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
|
|
8770
8770
|
return {
|
|
8771
|
-
...createResourceRequest$
|
|
8771
|
+
...createResourceRequest$15(config),
|
|
8772
8772
|
fulfill: fulfill,
|
|
8773
8773
|
};
|
|
8774
8774
|
};
|
|
8775
8775
|
|
|
8776
|
-
function keyBuilder$
|
|
8777
|
-
return keyBuilder$
|
|
8776
|
+
function keyBuilder$33(luvio, params) {
|
|
8777
|
+
return keyBuilder$34(luvio, {
|
|
8778
8778
|
recordId: params.urlParams.recordId
|
|
8779
8779
|
});
|
|
8780
8780
|
}
|
|
8781
|
-
function getResponseCacheKeys$
|
|
8782
|
-
getTypeCacheKeys$
|
|
8781
|
+
function getResponseCacheKeys$Z(storeKeyMap, luvio, resourceParams, response) {
|
|
8782
|
+
getTypeCacheKeys$1U(storeKeyMap, luvio, response);
|
|
8783
8783
|
}
|
|
8784
|
-
function createResourceRequest$
|
|
8784
|
+
function createResourceRequest$15(config) {
|
|
8785
8785
|
const headers = {};
|
|
8786
8786
|
return {
|
|
8787
8787
|
baseUri: '/services/data/v59.0',
|
|
@@ -8794,7 +8794,7 @@ function createResourceRequest$14(config) {
|
|
|
8794
8794
|
priority: 'normal',
|
|
8795
8795
|
};
|
|
8796
8796
|
}
|
|
8797
|
-
function createResourceParams$
|
|
8797
|
+
function createResourceParams$Y(config) {
|
|
8798
8798
|
const resourceParams = {
|
|
8799
8799
|
urlParams: {
|
|
8800
8800
|
recordId: config.recordId
|
|
@@ -8809,12 +8809,12 @@ function createResourceParams$X(config) {
|
|
|
8809
8809
|
// used by getUiApiRecordsBatchByRecordIds#selectChildResourceParams
|
|
8810
8810
|
function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
8811
8811
|
return {
|
|
8812
|
-
recordId: keyBuilder$
|
|
8812
|
+
recordId: keyBuilder$34(luvio, { recordId }),
|
|
8813
8813
|
node: {
|
|
8814
8814
|
kind: 'Fragment',
|
|
8815
8815
|
private: ['eTag', 'weakEtag'],
|
|
8816
8816
|
selections: buildSelectionFromFields(fields, optionalFields),
|
|
8817
|
-
version: VERSION$
|
|
8817
|
+
version: VERSION$2f,
|
|
8818
8818
|
},
|
|
8819
8819
|
variables: {},
|
|
8820
8820
|
};
|
|
@@ -8822,27 +8822,27 @@ function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
|
8822
8822
|
function buildSnapshotRefresh$5(luvio, config) {
|
|
8823
8823
|
return {
|
|
8824
8824
|
config,
|
|
8825
|
-
resolve: () => buildNetworkSnapshot$
|
|
8825
|
+
resolve: () => buildNetworkSnapshot$11(luvio, config),
|
|
8826
8826
|
};
|
|
8827
8827
|
}
|
|
8828
8828
|
function prepareRequest$6(luvio, config) {
|
|
8829
8829
|
const { recordId, fields } = config;
|
|
8830
8830
|
// Should this go into the coersion logic?
|
|
8831
|
-
const key = keyBuilder$
|
|
8831
|
+
const key = keyBuilder$33(luvio, createResourceParams$Y(config));
|
|
8832
8832
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
8833
8833
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8834
8834
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8835
8835
|
}, config.optionalFields);
|
|
8836
8836
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
8837
|
-
const resourceParams = createResourceParams$
|
|
8837
|
+
const resourceParams = createResourceParams$Y({
|
|
8838
8838
|
recordId,
|
|
8839
8839
|
fields,
|
|
8840
8840
|
optionalFields: optionalFields.length > 0 ? optionalFields : undefined,
|
|
8841
8841
|
});
|
|
8842
|
-
const request = createResourceRequest$
|
|
8842
|
+
const request = createResourceRequest$16(resourceParams);
|
|
8843
8843
|
return { request, key, allTrackedFields, resourceParams };
|
|
8844
8844
|
}
|
|
8845
|
-
function ingestSuccess$
|
|
8845
|
+
function ingestSuccess$O(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8846
8846
|
const { body } = response;
|
|
8847
8847
|
const fields = config.fields === undefined ? [] : config.fields;
|
|
8848
8848
|
const optionalFields = config.optionalFields === undefined ? [] : config.optionalFields;
|
|
@@ -8856,19 +8856,19 @@ function ingestSuccess$N(luvio, config, key, allTrackedFields, response, serverR
|
|
|
8856
8856
|
return luvio.storeLookup(buildRecordSelector(luvio, config.recordId, fields, optionalFields), buildSnapshotRefresh$5(luvio, config));
|
|
8857
8857
|
}
|
|
8858
8858
|
function onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8859
|
-
const snapshot = ingestSuccess$
|
|
8859
|
+
const snapshot = ingestSuccess$O(luvio, config, key, allTrackedFields, response, serverRequestCount);
|
|
8860
8860
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8861
8861
|
}
|
|
8862
|
-
function ingestError$
|
|
8862
|
+
function ingestError$L(luvio, config, key, err) {
|
|
8863
8863
|
const errorSnapshot = luvio.errorSnapshot(err, buildSnapshotRefresh$5(luvio, config));
|
|
8864
8864
|
luvio.storeIngestError(key, errorSnapshot, RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS);
|
|
8865
8865
|
return errorSnapshot;
|
|
8866
8866
|
}
|
|
8867
8867
|
function onResourceError(luvio, config, key, err) {
|
|
8868
|
-
const errorSnapshot = ingestError$
|
|
8868
|
+
const errorSnapshot = ingestError$L(luvio, config, key, err);
|
|
8869
8869
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
8870
8870
|
}
|
|
8871
|
-
function buildNetworkSnapshot$
|
|
8871
|
+
function buildNetworkSnapshot$11(luvio, config, serverRequestCount = 0, options) {
|
|
8872
8872
|
const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
|
|
8873
8873
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8874
8874
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -8885,7 +8885,7 @@ function buildNetworkSnapshot$10(luvio, config, serverRequestCount = 0, options)
|
|
|
8885
8885
|
return onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1);
|
|
8886
8886
|
}, () => {
|
|
8887
8887
|
const cache = new StoreKeyMap();
|
|
8888
|
-
getResponseCacheKeys$
|
|
8888
|
+
getResponseCacheKeys$Z(cache, luvio, resourceParams, response.body);
|
|
8889
8889
|
return cache;
|
|
8890
8890
|
});
|
|
8891
8891
|
}, (err) => {
|
|
@@ -8899,7 +8899,7 @@ function isSingleBatchRecordResponse(response) {
|
|
|
8899
8899
|
response.results.length === 1);
|
|
8900
8900
|
}
|
|
8901
8901
|
|
|
8902
|
-
const VERSION$
|
|
8902
|
+
const VERSION$2e = "98cce53b8d13b1883d001bbdaab24383";
|
|
8903
8903
|
|
|
8904
8904
|
const nonCachedErrors$7 = ObjectCreate$1(null);
|
|
8905
8905
|
function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount = 0) {
|
|
@@ -8909,7 +8909,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8909
8909
|
const now = Date.now();
|
|
8910
8910
|
for (let index = 0, len = childResourceParamsArray.length; index < len; index += 1) {
|
|
8911
8911
|
const childResourceParams = childResourceParamsArray[index];
|
|
8912
|
-
const childKey = keyBuilder$
|
|
8912
|
+
const childKey = keyBuilder$33(luvio, childResourceParams);
|
|
8913
8913
|
const result = childEnvelopes[index];
|
|
8914
8914
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
8915
8915
|
if (childStatusCode === 200) {
|
|
@@ -8924,7 +8924,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8924
8924
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8925
8925
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8926
8926
|
}, childResourceParams.queryParams.optionalFields);
|
|
8927
|
-
const childSnapshot = ingestSuccess$
|
|
8927
|
+
const childSnapshot = ingestSuccess$O(luvio, {
|
|
8928
8928
|
recordId: childResourceParams.urlParams.recordId,
|
|
8929
8929
|
fields: childResourceParams.queryParams.fields,
|
|
8930
8930
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8950,7 +8950,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8950
8950
|
headers: {},
|
|
8951
8951
|
errorType: 'fetchResponse',
|
|
8952
8952
|
};
|
|
8953
|
-
ingestError$
|
|
8953
|
+
ingestError$L(luvio, {
|
|
8954
8954
|
recordId: childResourceParams.urlParams.recordId,
|
|
8955
8955
|
fields: childResourceParams.queryParams.fields,
|
|
8956
8956
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8965,7 +8965,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8965
8965
|
// track non-cached responses so rebuilds work properly
|
|
8966
8966
|
if (childStatusCode !== 404 && childStatusCode !== 200) {
|
|
8967
8967
|
nonCachedErrors$7[childKey] = {
|
|
8968
|
-
expiration: now + TTL$
|
|
8968
|
+
expiration: now + TTL$B,
|
|
8969
8969
|
response: childBody,
|
|
8970
8970
|
status: childStatusCode,
|
|
8971
8971
|
};
|
|
@@ -8996,11 +8996,11 @@ function selectChildResourceParams$7(luvio, childResources, resourceParams) {
|
|
|
8996
8996
|
read: (reader) => {
|
|
8997
8997
|
// Top-level 404 lookup
|
|
8998
8998
|
const compositeSnapshot = luvio.storeLookup({
|
|
8999
|
-
recordId: keyBuilder$
|
|
8999
|
+
recordId: keyBuilder$32(luvio, resourceParams),
|
|
9000
9000
|
node: {
|
|
9001
9001
|
kind: 'Fragment',
|
|
9002
9002
|
private: [],
|
|
9003
|
-
version: VERSION$
|
|
9003
|
+
version: VERSION$2e,
|
|
9004
9004
|
},
|
|
9005
9005
|
variables: {},
|
|
9006
9006
|
});
|
|
@@ -9020,7 +9020,7 @@ function selectChildResourceParams$7(luvio, childResources, resourceParams) {
|
|
|
9020
9020
|
reader.enterPath(i);
|
|
9021
9021
|
reader.enterPath(envelopeBodyPath);
|
|
9022
9022
|
const childResource = childResources[i];
|
|
9023
|
-
const childKey = keyBuilder$
|
|
9023
|
+
const childKey = keyBuilder$33(luvio, childResource);
|
|
9024
9024
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
9025
9025
|
const childSnapshot = reader.read(buildRecordSelector(luvio, childResource.urlParams.recordId, childResource.queryParams.fields || [], childResource.queryParams.optionalFields || []));
|
|
9026
9026
|
reader.exitPath();
|
|
@@ -9120,10 +9120,10 @@ function createChildResourceParams$9(resourceParams) {
|
|
|
9120
9120
|
}
|
|
9121
9121
|
return childConfigs;
|
|
9122
9122
|
}
|
|
9123
|
-
function keyBuilder$
|
|
9123
|
+
function keyBuilder$32(luvio, params) {
|
|
9124
9124
|
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 + ')';
|
|
9125
9125
|
}
|
|
9126
|
-
function getResponseCacheKeys$
|
|
9126
|
+
function getResponseCacheKeys$Y(keys, luvio, resourceParams, response) {
|
|
9127
9127
|
const childEnvelopes = response.results;
|
|
9128
9128
|
const childResourceParamsArray = createChildResourceParams$9(resourceParams);
|
|
9129
9129
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -9137,25 +9137,25 @@ function getResponseCacheKeys$X(keys, luvio, resourceParams, response) {
|
|
|
9137
9137
|
const childResult = childEnvelopes[index];
|
|
9138
9138
|
const { statusCode: childStatusCode, result: childBody } = childResult;
|
|
9139
9139
|
if (childStatusCode === 200) {
|
|
9140
|
-
getResponseCacheKeys$
|
|
9140
|
+
getResponseCacheKeys$Z(keys, luvio, childResourceParams, childBody);
|
|
9141
9141
|
}
|
|
9142
9142
|
else if (childStatusCode === 404) {
|
|
9143
|
-
const childKey = keyBuilder$
|
|
9143
|
+
const childKey = keyBuilder$33(luvio, childResourceParams);
|
|
9144
9144
|
keys.set(childKey, {
|
|
9145
9145
|
namespace: keyPrefix,
|
|
9146
|
-
representationName: RepresentationType$
|
|
9146
|
+
representationName: RepresentationType$T,
|
|
9147
9147
|
mergeable: false
|
|
9148
9148
|
});
|
|
9149
9149
|
}
|
|
9150
9150
|
}
|
|
9151
9151
|
}
|
|
9152
|
-
function ingestError$
|
|
9153
|
-
const key = keyBuilder$
|
|
9152
|
+
function ingestError$K(luvio, params, error, snapshotRefresh) {
|
|
9153
|
+
const key = keyBuilder$32(luvio, params);
|
|
9154
9154
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
9155
9155
|
luvio.storeIngestError(key, errorSnapshot);
|
|
9156
9156
|
return errorSnapshot;
|
|
9157
9157
|
}
|
|
9158
|
-
function createResourceRequest$
|
|
9158
|
+
function createResourceRequest$14(config) {
|
|
9159
9159
|
const headers = {};
|
|
9160
9160
|
return {
|
|
9161
9161
|
baseUri: '/services/data/v59.0',
|
|
@@ -9169,7 +9169,7 @@ function createResourceRequest$13(config) {
|
|
|
9169
9169
|
};
|
|
9170
9170
|
}
|
|
9171
9171
|
|
|
9172
|
-
function createResourceParams$
|
|
9172
|
+
function createResourceParams$X(config) {
|
|
9173
9173
|
const { records: configRecords } = config;
|
|
9174
9174
|
const recordIds = [];
|
|
9175
9175
|
const resourceConfigFields = [];
|
|
@@ -9221,13 +9221,13 @@ function createChildResourceParams$8(config) {
|
|
|
9221
9221
|
return childResources;
|
|
9222
9222
|
}
|
|
9223
9223
|
|
|
9224
|
-
function adapterFragment$
|
|
9224
|
+
function adapterFragment$I(luvio, config) {
|
|
9225
9225
|
const childResources = createChildResourceParams$8(config);
|
|
9226
|
-
const resourceParams = createResourceParams$
|
|
9226
|
+
const resourceParams = createResourceParams$X(config);
|
|
9227
9227
|
return selectChildResourceParams$7(luvio, childResources, resourceParams);
|
|
9228
9228
|
}
|
|
9229
9229
|
|
|
9230
|
-
function onFetchResponseSuccess$
|
|
9230
|
+
function onFetchResponseSuccess$M(luvio, config, resourceParams, response, serverRequestCount = 0) {
|
|
9231
9231
|
const childEnvelopes = response.body.results;
|
|
9232
9232
|
const childResourceParamsArray = createChildResourceParams$8(config);
|
|
9233
9233
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -9239,7 +9239,7 @@ function onFetchResponseSuccess$L(luvio, config, resourceParams, response, serve
|
|
|
9239
9239
|
}
|
|
9240
9240
|
}
|
|
9241
9241
|
const snapshotStateFulfilled = 'Fulfilled';
|
|
9242
|
-
const key = keyBuilder$
|
|
9242
|
+
const key = keyBuilder$32(luvio, resourceParams);
|
|
9243
9243
|
const { childSnapshotData, seenRecords } = ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount);
|
|
9244
9244
|
const snapshot = {
|
|
9245
9245
|
recordId: key,
|
|
@@ -9248,36 +9248,36 @@ function onFetchResponseSuccess$L(luvio, config, resourceParams, response, serve
|
|
|
9248
9248
|
seenRecords: seenRecords,
|
|
9249
9249
|
select: {
|
|
9250
9250
|
recordId: key,
|
|
9251
|
-
node: adapterFragment$
|
|
9251
|
+
node: adapterFragment$I(luvio, config),
|
|
9252
9252
|
variables: {},
|
|
9253
9253
|
},
|
|
9254
9254
|
refresh: {
|
|
9255
9255
|
config,
|
|
9256
|
-
resolve: () => buildNetworkSnapshot
|
|
9256
|
+
resolve: () => buildNetworkSnapshot$10(luvio, config, serverRequestCount, snapshotRefreshOptions),
|
|
9257
9257
|
},
|
|
9258
9258
|
variables: {},
|
|
9259
9259
|
};
|
|
9260
9260
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
9261
9261
|
}
|
|
9262
9262
|
|
|
9263
|
-
function onFetchResponseError$
|
|
9264
|
-
const snapshot = ingestError$
|
|
9263
|
+
function onFetchResponseError$N(luvio, config, resourceParams, response) {
|
|
9264
|
+
const snapshot = ingestError$K(luvio, resourceParams, response, {
|
|
9265
9265
|
config,
|
|
9266
|
-
resolve: () => buildNetworkSnapshot
|
|
9266
|
+
resolve: () => buildNetworkSnapshot$10(luvio, config, 0, snapshotRefreshOptions),
|
|
9267
9267
|
});
|
|
9268
9268
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
9269
9269
|
}
|
|
9270
|
-
function buildNetworkSnapshot
|
|
9271
|
-
const resourceParams = createResourceParams$
|
|
9272
|
-
const request = createResourceRequest$
|
|
9270
|
+
function buildNetworkSnapshot$10(luvio, config, serverRequestCount = 0, options) {
|
|
9271
|
+
const resourceParams = createResourceParams$X(config);
|
|
9272
|
+
const request = createResourceRequest$14(resourceParams);
|
|
9273
9273
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
9274
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
9274
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$M(luvio, config, resourceParams, response, serverRequestCount + 1), () => {
|
|
9275
9275
|
const cache = new StoreKeyMap();
|
|
9276
|
-
getResponseCacheKeys$
|
|
9276
|
+
getResponseCacheKeys$Y(cache, luvio, resourceParams, response.body);
|
|
9277
9277
|
return cache;
|
|
9278
9278
|
});
|
|
9279
9279
|
}, (response) => {
|
|
9280
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
9280
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$N(luvio, config, resourceParams, response));
|
|
9281
9281
|
});
|
|
9282
9282
|
}
|
|
9283
9283
|
|
|
@@ -9294,7 +9294,7 @@ function resolveConflict(luvio, map) {
|
|
|
9294
9294
|
recordId,
|
|
9295
9295
|
optionalFields: convertTrieToFields(map.conflicts[recordId].trackedFields),
|
|
9296
9296
|
};
|
|
9297
|
-
buildNetworkSnapshot$
|
|
9297
|
+
buildNetworkSnapshot$11(luvio, config, map.serverRequestCount);
|
|
9298
9298
|
}
|
|
9299
9299
|
else {
|
|
9300
9300
|
const records = reduce.call(ids, (acc, id) => {
|
|
@@ -9306,10 +9306,10 @@ function resolveConflict(luvio, map) {
|
|
|
9306
9306
|
return acc;
|
|
9307
9307
|
}, []);
|
|
9308
9308
|
const config = { records };
|
|
9309
|
-
buildNetworkSnapshot
|
|
9309
|
+
buildNetworkSnapshot$10(luvio, config, map.serverRequestCount);
|
|
9310
9310
|
}
|
|
9311
9311
|
}
|
|
9312
|
-
const ingest$
|
|
9312
|
+
const ingest$1P = (input, path, luvio, store, timestamp) => {
|
|
9313
9313
|
const conflictMap = {
|
|
9314
9314
|
conflicts: {},
|
|
9315
9315
|
serverRequestCount: 0,
|
|
@@ -9375,9 +9375,9 @@ const getMruListUi_ConfigPropertyNames = {
|
|
|
9375
9375
|
],
|
|
9376
9376
|
},
|
|
9377
9377
|
});
|
|
9378
|
-
const RepresentationType$
|
|
9379
|
-
function keyBuilder$
|
|
9380
|
-
return keyPrefix + '::' + RepresentationType$
|
|
9378
|
+
const RepresentationType$O = 'ObjectInfoRepresentation';
|
|
9379
|
+
function keyBuilder$2R(luvio, config) {
|
|
9380
|
+
return keyPrefix + '::' + RepresentationType$O + ':' + config.apiName;
|
|
9381
9381
|
}
|
|
9382
9382
|
|
|
9383
9383
|
var DiscriminatorValues$4;
|
|
@@ -9705,7 +9705,7 @@ function getShallowRecord(luvio, storeRecordId) {
|
|
|
9705
9705
|
*/
|
|
9706
9706
|
function getObjectMetadata(luvio, record) {
|
|
9707
9707
|
const { data: objectInfo } = luvio.storeLookup({
|
|
9708
|
-
recordId: keyBuilder$
|
|
9708
|
+
recordId: keyBuilder$2R(luvio, { apiName: record.apiName }),
|
|
9709
9709
|
node: {
|
|
9710
9710
|
kind: 'Fragment',
|
|
9711
9711
|
private: ['eTag'],
|
|
@@ -9746,7 +9746,7 @@ function getObjectMetadata(luvio, record) {
|
|
|
9746
9746
|
function fixRecordTypes(luvio, record) {
|
|
9747
9747
|
// non-master record types should always be correct
|
|
9748
9748
|
if (record.recordTypeId === MASTER_RECORD_TYPE_ID) {
|
|
9749
|
-
const key = keyBuilder$
|
|
9749
|
+
const key = keyBuilder$34(luvio, { recordId: record.id });
|
|
9750
9750
|
const recordNode = luvio.getNode(key);
|
|
9751
9751
|
if (isGraphNode(recordNode) &&
|
|
9752
9752
|
recordNode.scalar('recordTypeId') !== MASTER_RECORD_TYPE_ID) {
|
|
@@ -9820,7 +9820,7 @@ class AdsBridge {
|
|
|
9820
9820
|
// Don't let incorrect ADS/RecordGVP recordTypeIds replace a valid record type in our store
|
|
9821
9821
|
// with the master record type. See W-7302870 for details.
|
|
9822
9822
|
fixRecordTypes(luvio, recordCopy);
|
|
9823
|
-
luvio.storeIngest(INGEST_KEY, ingest$
|
|
9823
|
+
luvio.storeIngest(INGEST_KEY, ingest$1P, recordCopy);
|
|
9824
9824
|
}
|
|
9825
9825
|
}
|
|
9826
9826
|
if (didIngestRecord === true) {
|
|
@@ -9833,7 +9833,7 @@ class AdsBridge {
|
|
|
9833
9833
|
*/
|
|
9834
9834
|
evict(recordId) {
|
|
9835
9835
|
const { luvio } = this;
|
|
9836
|
-
const key = keyBuilder$
|
|
9836
|
+
const key = keyBuilder$34(luvio, { recordId });
|
|
9837
9837
|
return this.lockLdsRecordEmit(() => {
|
|
9838
9838
|
luvio.storeEvict(key);
|
|
9839
9839
|
luvio.storeBroadcast();
|
|
@@ -9848,7 +9848,7 @@ class AdsBridge {
|
|
|
9848
9848
|
*/
|
|
9849
9849
|
getTrackedFieldsForRecord(recordId) {
|
|
9850
9850
|
const { luvio } = this;
|
|
9851
|
-
const storeRecordId = keyBuilder$
|
|
9851
|
+
const storeRecordId = keyBuilder$34(luvio, { recordId });
|
|
9852
9852
|
const recordNode = luvio.getNode(storeRecordId);
|
|
9853
9853
|
if (!isGraphNode(recordNode)) {
|
|
9854
9854
|
return Promise.resolve([]);
|
package/dist/adsBridge.js
CHANGED