@salesforce/lwc-adapters-uiapi 1.229.0-dev4 → 1.229.0-dev6
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 +47 -27
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -364,6 +364,37 @@ var FragmentReadResultState;
|
|
|
364
364
|
({
|
|
365
365
|
state: FragmentReadResultState.Missing,
|
|
366
366
|
});
|
|
367
|
+
function resolveLink(reader, storeLink, version) {
|
|
368
|
+
const { StoreLinkStateValues } = reader;
|
|
369
|
+
const linkState = reader.getLinkState(storeLink);
|
|
370
|
+
switch (linkState.state) {
|
|
371
|
+
case StoreLinkStateValues.RefNotPresent:
|
|
372
|
+
case StoreLinkStateValues.NotPresent:
|
|
373
|
+
case StoreLinkStateValues.Missing:
|
|
374
|
+
reader.markMissingLink(storeLink.__ref);
|
|
375
|
+
reader.markMissing();
|
|
376
|
+
return;
|
|
377
|
+
case StoreLinkStateValues.Pending:
|
|
378
|
+
reader.markPending();
|
|
379
|
+
return;
|
|
380
|
+
case StoreLinkStateValues.Null:
|
|
381
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
382
|
+
throw new Error(`TODO: Invalid Link State. Link on "${reader.currentPath.fullPath}"`);
|
|
383
|
+
}
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
const { key: __ref } = linkState;
|
|
387
|
+
return reader.read({
|
|
388
|
+
recordId: __ref,
|
|
389
|
+
node: {
|
|
390
|
+
kind: 'Fragment',
|
|
391
|
+
private: [],
|
|
392
|
+
opaque: true,
|
|
393
|
+
version,
|
|
394
|
+
},
|
|
395
|
+
variables: {},
|
|
396
|
+
});
|
|
397
|
+
}
|
|
367
398
|
|
|
368
399
|
var ResourceParamType;
|
|
369
400
|
(function (ResourceParamType) {
|
|
@@ -533,7 +564,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
533
564
|
}
|
|
534
565
|
return resourceParams;
|
|
535
566
|
}
|
|
536
|
-
// engine version: 0.146.0-
|
|
567
|
+
// engine version: 0.146.0-dev4-c265089a
|
|
537
568
|
|
|
538
569
|
/**
|
|
539
570
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -8398,7 +8429,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
8398
8429
|
}
|
|
8399
8430
|
const keyPrefix = 'UiApi';
|
|
8400
8431
|
|
|
8401
|
-
const { assign, create, freeze, keys } = Object;
|
|
8432
|
+
const { assign, create, freeze, isFrozen, keys } = Object;
|
|
8402
8433
|
const { hasOwnProperty } = Object.prototype;
|
|
8403
8434
|
const { split, endsWith } = String.prototype;
|
|
8404
8435
|
const { isArray } = Array;
|
|
@@ -12603,7 +12634,11 @@ function markNulledOutPath(record, path) {
|
|
|
12603
12634
|
}
|
|
12604
12635
|
const link = fieldValueRepresentation.link(fieldName);
|
|
12605
12636
|
const resolved = link.follow();
|
|
12606
|
-
if (isGraphNode(resolved) &&
|
|
12637
|
+
if (isGraphNode(resolved) &&
|
|
12638
|
+
resolved.isScalar('value') &&
|
|
12639
|
+
path.length > 0 &&
|
|
12640
|
+
// TODO [W-14082782]: temporary fix
|
|
12641
|
+
!isFrozen(link.data)) {
|
|
12607
12642
|
const linkState = link.linkData();
|
|
12608
12643
|
const fields = linkState === undefined ? [] : linkState.fields;
|
|
12609
12644
|
link.writeLinkData({
|
|
@@ -50428,17 +50463,8 @@ function buildSelectionForField$7(source, reader, sel, variables, fragments, isC
|
|
|
50428
50463
|
return sink;
|
|
50429
50464
|
}
|
|
50430
50465
|
function selectTypeLink(sel, fieldData, reader, key, sink, variables, fragments, version, selectFn, isCursorConnection) {
|
|
50431
|
-
const resolvedLink = reader
|
|
50432
|
-
|
|
50433
|
-
node: {
|
|
50434
|
-
kind: 'Fragment',
|
|
50435
|
-
private: [],
|
|
50436
|
-
opaque: true,
|
|
50437
|
-
version,
|
|
50438
|
-
},
|
|
50439
|
-
variables: {}
|
|
50440
|
-
});
|
|
50441
|
-
if (resolvedLink.data !== undefined) {
|
|
50466
|
+
const resolvedLink = resolveLink(reader, fieldData, version);
|
|
50467
|
+
if (resolvedLink && resolvedLink.data !== undefined) {
|
|
50442
50468
|
if (isCursorConnection) {
|
|
50443
50469
|
selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key, sink, variables, fragments, selectFn);
|
|
50444
50470
|
}
|
|
@@ -51020,19 +51046,11 @@ function selectType$6(typename, sel, fieldData, reader, key, sink, variables, fr
|
|
|
51020
51046
|
}
|
|
51021
51047
|
case 'PolymorphicParentRelationship':
|
|
51022
51048
|
case 'RecordRepresentation': {
|
|
51023
|
-
const spanningFieldLink = reader
|
|
51024
|
-
|
|
51025
|
-
|
|
51026
|
-
kind: 'Fragment',
|
|
51027
|
-
private: [],
|
|
51028
|
-
opaque: true,
|
|
51029
|
-
version: VERSION$2i,
|
|
51030
|
-
},
|
|
51031
|
-
variables: {},
|
|
51032
|
-
});
|
|
51033
|
-
reader.markSeenId(fieldData.__ref);
|
|
51034
|
-
const resolvedSpanningFieldValue = spanningFieldLink.data;
|
|
51049
|
+
const spanningFieldLink = resolveLink(reader, fieldData, VERSION$2i);
|
|
51050
|
+
const resolvedSpanningFieldValue = spanningFieldLink && spanningFieldLink.data;
|
|
51051
|
+
const fieldDataRef = fieldData.__ref;
|
|
51035
51052
|
if (resolvedSpanningFieldValue !== undefined) {
|
|
51053
|
+
reader.markSeenId(fieldDataRef);
|
|
51036
51054
|
const { value: spanningFieldResult } = resolvedSpanningFieldValue;
|
|
51037
51055
|
// Handle null values - graphql will return it at the field level, not return nested { value: null }
|
|
51038
51056
|
if (spanningFieldResult === null || typeof spanningFieldResult !== 'object') {
|
|
@@ -51056,7 +51074,9 @@ function selectType$6(typename, sel, fieldData, reader, key, sink, variables, fr
|
|
|
51056
51074
|
}
|
|
51057
51075
|
}
|
|
51058
51076
|
else {
|
|
51059
|
-
|
|
51077
|
+
if (fieldDataRef !== undefined) {
|
|
51078
|
+
reader.markMissingLink(fieldDataRef);
|
|
51079
|
+
}
|
|
51060
51080
|
reader.markMissing();
|
|
51061
51081
|
}
|
|
51062
51082
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.229.0-
|
|
3
|
+
"version": "1.229.0-dev6",
|
|
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.229.0-
|
|
34
|
+
"@salesforce/lds-adapters-uiapi": "1.229.0-dev6"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@luvio/lwc-luvio": "0.146.0-
|
|
38
|
-
"@salesforce/lds-default-luvio": "1.229.0-
|
|
37
|
+
"@luvio/lwc-luvio": "0.146.0-dev4",
|
|
38
|
+
"@salesforce/lds-default-luvio": "1.229.0-dev6"
|
|
39
39
|
}
|
|
40
40
|
}
|