@salesforce/lwc-adapters-uiapi 1.433.0 → 1.434.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/main.js +16 -43
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -7440,28 +7440,23 @@ let configurableCreateContentVersion = new Configurable();
|
|
|
7440
7440
|
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
7441
7441
|
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
7442
7442
|
* be reached by following 1 relationship from the root record, etc.
|
|
7443
|
-
* @defaultValue '
|
|
7443
|
+
* @defaultValue '1'
|
|
7444
7444
|
*/
|
|
7445
|
-
let trackedFieldDepthOnCacheMiss =
|
|
7445
|
+
let trackedFieldDepthOnCacheMiss = 1;
|
|
7446
7446
|
/**
|
|
7447
7447
|
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
7448
7448
|
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
7449
7449
|
* be reached by following 1 relationship from the root record, etc.
|
|
7450
|
-
* @defaultValue '
|
|
7450
|
+
* @defaultValue '1'
|
|
7451
7451
|
*/
|
|
7452
|
-
let trackedFieldDepthOnCacheMergeConflict =
|
|
7452
|
+
let trackedFieldDepthOnCacheMergeConflict = 1;
|
|
7453
7453
|
/**
|
|
7454
7454
|
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
7455
7455
|
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
7456
7456
|
* be reached by following 1 relationship from the root record, etc.
|
|
7457
|
-
* @defaultValue '
|
|
7457
|
+
* @defaultValue '1'
|
|
7458
7458
|
*/
|
|
7459
|
-
let trackedFieldDepthOnNotifyChange =
|
|
7460
|
-
/**
|
|
7461
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
7462
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
7463
|
-
*/
|
|
7464
|
-
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
7459
|
+
let trackedFieldDepthOnNotifyChange = 1;
|
|
7465
7460
|
/**
|
|
7466
7461
|
* One store enabled Get Object Info adapter
|
|
7467
7462
|
*/
|
|
@@ -7558,12 +7553,6 @@ const configurationForRestAdapters = {
|
|
|
7558
7553
|
getTrackedFieldDepthOnNotifyChange: function () {
|
|
7559
7554
|
return trackedFieldDepthOnNotifyChange;
|
|
7560
7555
|
},
|
|
7561
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
7562
|
-
trackedFieldLeafNodeIdAndNameOnly = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
7563
|
-
},
|
|
7564
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
7565
|
-
return trackedFieldLeafNodeIdAndNameOnly;
|
|
7566
|
-
},
|
|
7567
7556
|
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
7568
7557
|
recordRepresentationIngestionOverride = ingest;
|
|
7569
7558
|
},
|
|
@@ -10717,6 +10706,9 @@ function buildSelectionFromRecord(record) {
|
|
|
10717
10706
|
return [...sel.selections, DRAFTS_SELECTION];
|
|
10718
10707
|
}
|
|
10719
10708
|
|
|
10709
|
+
// Unused suffixes, but leaving in as comments to avoid eslint errors
|
|
10710
|
+
// const CUSTOM_API_NAME_SUFFIX = '__c';
|
|
10711
|
+
// const DMO_API_NAME_SUFFIX = '__dlm';
|
|
10720
10712
|
const CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX = '__x';
|
|
10721
10713
|
const RECORD_REPRESENTATION_ERROR_VERSION = 'RECORD_REPRESENTATION_ERROR_VERSION_1';
|
|
10722
10714
|
const RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS = {
|
|
@@ -10743,7 +10735,7 @@ function addScalarField(current, leafNodeFieldKey) {
|
|
|
10743
10735
|
}
|
|
10744
10736
|
}
|
|
10745
10737
|
function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordIds = {}, depth = 0) {
|
|
10746
|
-
var _a
|
|
10738
|
+
var _a;
|
|
10747
10739
|
// Filter Error and null nodes
|
|
10748
10740
|
if (!isGraphNode(node)) {
|
|
10749
10741
|
return;
|
|
@@ -10781,13 +10773,11 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
|
|
|
10781
10773
|
if (!isGraphNode(field)) {
|
|
10782
10774
|
continue;
|
|
10783
10775
|
}
|
|
10784
|
-
const { maxDepth
|
|
10776
|
+
const { maxDepth } = config;
|
|
10785
10777
|
if (field.isScalar('value') === false && !Array.isArray((_a = field.data) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
10786
10778
|
if (depth + 1 > maxDepth) {
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
addScalarFieldName(current);
|
|
10790
|
-
}
|
|
10779
|
+
addScalarFieldId(current);
|
|
10780
|
+
addScalarFieldName(current);
|
|
10791
10781
|
continue;
|
|
10792
10782
|
}
|
|
10793
10783
|
const spanningLink = field.link('value');
|
|
@@ -10809,19 +10799,10 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
|
|
|
10809
10799
|
current.children[key] = next;
|
|
10810
10800
|
}
|
|
10811
10801
|
else {
|
|
10812
|
-
// Skip the field, if its value is null at the max level depth.
|
|
10813
|
-
// Ideally, it should only skip relationship field. However,
|
|
10814
|
-
// on the client, there is not a reliable way to determine the
|
|
10815
|
-
// the field type.
|
|
10816
10802
|
if (depth === maxDepth) {
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
continue;
|
|
10821
|
-
}
|
|
10822
|
-
if (field.scalar('value') === null && !Array.isArray((_b = field.data) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
10823
|
-
continue;
|
|
10824
|
-
}
|
|
10803
|
+
addScalarFieldId(current);
|
|
10804
|
+
addScalarFieldName(current);
|
|
10805
|
+
continue;
|
|
10825
10806
|
}
|
|
10826
10807
|
const state = fieldValueRep.linkData();
|
|
10827
10808
|
if (state !== undefined) {
|
|
@@ -11399,7 +11380,6 @@ function mergeRecordConflict(luvio, incoming, existing, recordConflictMap) {
|
|
|
11399
11380
|
};
|
|
11400
11381
|
const trackedFieldsConfig = {
|
|
11401
11382
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMergeConflict(),
|
|
11402
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
11403
11383
|
};
|
|
11404
11384
|
extractTrackedFieldsToTrie(recordKey, incomingNode, incomingTrackedFieldsTrieRoot, trackedFieldsConfig);
|
|
11405
11385
|
extractTrackedFieldsToTrie(recordKey, existingNode, existingTrackedFieldsTrieRoot, trackedFieldsConfig);
|
|
@@ -11868,7 +11848,6 @@ function prepareRequest$7(luvio, config) {
|
|
|
11868
11848
|
const key = keyBuilder$3T(luvio, createResourceParams$15(config));
|
|
11869
11849
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
11870
11850
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
11871
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
11872
11851
|
}, config.optionalFields);
|
|
11873
11852
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
11874
11853
|
const resourceParams = createResourceParams$15({
|
|
@@ -11995,7 +11974,6 @@ function ingestSuccessChildResourceParams$9(luvio, childResourceParamsArray, chi
|
|
|
11995
11974
|
};
|
|
11996
11975
|
const childTrackedFields = getTrackedFields(childKey, luvio.getNode(childKey), {
|
|
11997
11976
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
11998
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
11999
11977
|
}, childResourceParams.queryParams.optionalFields);
|
|
12000
11978
|
const childSnapshot = ingestSuccess$X(luvio, {
|
|
12001
11979
|
recordId: childResourceParams.urlParams.recordId,
|
|
@@ -19477,7 +19455,6 @@ const notifyChangeFactory = (luvio) => {
|
|
|
19477
19455
|
const node = luvio.wrapNormalizedGraphNode(record, key);
|
|
19478
19456
|
const optionalFields = getTrackedFields(key, node, {
|
|
19479
19457
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnNotifyChange(),
|
|
19480
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
19481
19458
|
});
|
|
19482
19459
|
const refreshRequest = createResourceRequestFromRepresentation(record, optionalFields);
|
|
19483
19460
|
const existingWeakEtag = record.weakEtag;
|
|
@@ -23199,7 +23176,6 @@ function buildNetworkSnapshot$Y(luvio, config, options) {
|
|
|
23199
23176
|
const key = keyBuilder$3b(luvio, config);
|
|
23200
23177
|
const trackedFieldsConfig = {
|
|
23201
23178
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
23202
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly()
|
|
23203
23179
|
};
|
|
23204
23180
|
const optionalFieldsTrie = convertFieldsToTrie(getTrackedFields(key, luvio.getNode(key), trackedFieldsConfig, config.optionalFields));
|
|
23205
23181
|
const fieldsTrie = BLANK_RECORD_FIELDS_TRIE;
|
|
@@ -69350,7 +69326,6 @@ const buildNetworkSnapshot$6 = (luvio, context, config, options) => {
|
|
|
69350
69326
|
...resourceRequest.queryParams,
|
|
69351
69327
|
optionalFields: getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
69352
69328
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
69353
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
69354
69329
|
}, config.optionalFields),
|
|
69355
69330
|
},
|
|
69356
69331
|
});
|
|
@@ -69985,7 +69960,6 @@ function prepareRequest(luvio, context, config) {
|
|
|
69985
69960
|
...resourceRequest.queryParams,
|
|
69986
69961
|
optionalFields: getTrackedFields(recordTemplateKey, luvio.getNode(recordTemplateKey), {
|
|
69987
69962
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
69988
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
69989
69963
|
}, config.optionalFields),
|
|
69990
69964
|
},
|
|
69991
69965
|
});
|
|
@@ -70005,7 +69979,6 @@ function onFetchResponseSuccess(luvio, context, config, request, response, resou
|
|
|
70005
69979
|
});
|
|
70006
69980
|
const allTrackedFields = getTrackedFields(templateRecordKey, luvio.getNode(templateRecordKey), {
|
|
70007
69981
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
70008
|
-
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
70009
69982
|
}, optionalFields);
|
|
70010
69983
|
const allTrackedFieldsTrie = convertFieldsToTrie(allTrackedFields, true);
|
|
70011
69984
|
const ingest = createFieldsIngestSuccess({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.434.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "UIAPI adapters with LWC bindings",
|
|
6
6
|
"module": "dist/main.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rm -rf dist src/generated"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
34
|
+
"@salesforce/lds-adapters-uiapi": "^1.434.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@luvio/lwc-luvio": "0.160.4",
|
|
38
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
38
|
+
"@salesforce/lds-default-luvio": "^1.434.0"
|
|
39
39
|
}
|
|
40
40
|
}
|