@salesforce/lds-worker-api 1.124.5 → 1.124.7
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/sfdc/es/ldsWorkerApi.js +1 -1
- package/dist/standalone/es/lds-worker-api.js +33 -18
- package/dist/standalone/umd/lds-worker-api.js +33 -18
- package/package.json +1 -1
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/objectInfos/Aircraft-objectInfo.network-mock.json +33 -0
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue-nonIntl-fallback-response.adapter-snapshot.result.json +4 -0
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue-response.adapter-snapshot.result.json +4 -0
- package/src/__tests__/data-driven-tests/fixtures/adapter-testcases/createRecord/scalar-displayValue.adapter-testcase.json +1 -0
|
@@ -751,4 +751,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
754
|
-
// version: 1.124.
|
|
754
|
+
// version: 1.124.7-ce8012bd1
|
|
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
callbacks.push(callback);
|
|
3778
3778
|
}
|
|
3779
|
-
// version: 1.124.
|
|
3779
|
+
// version: 1.124.7-ce8012bd1
|
|
3780
3780
|
|
|
3781
3781
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3782
3782
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
|
|
|
15200
15200
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15201
15201
|
return luvioDocumentNode;
|
|
15202
15202
|
}
|
|
15203
|
-
// version: 1.124.
|
|
15203
|
+
// version: 1.124.7-ce8012bd1
|
|
15204
15204
|
|
|
15205
15205
|
function unwrap(data) {
|
|
15206
15206
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16113,7 +16113,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16113
16113
|
const { apiFamily, name } = metadata;
|
|
16114
16114
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16115
16115
|
}
|
|
16116
|
-
// version: 1.124.
|
|
16116
|
+
// version: 1.124.7-ce8012bd1
|
|
16117
16117
|
|
|
16118
16118
|
/**
|
|
16119
16119
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44347,7 +44347,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44347
44347
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44348
44348
|
});
|
|
44349
44349
|
});
|
|
44350
|
-
// version: 1.124.
|
|
44350
|
+
// version: 1.124.7-c25b7f2a6
|
|
44351
44351
|
|
|
44352
44352
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44353
44353
|
|
|
@@ -53291,17 +53291,22 @@ async function evaluate(config, observers, settings, objectInfos, store, snapsho
|
|
|
53291
53291
|
if (requestsDraftsField(node))
|
|
53292
53292
|
return undefined;
|
|
53293
53293
|
// inject the drafts node for local evaluation since server does not have the 'draft' concept
|
|
53294
|
-
|
|
53295
|
-
|
|
53296
|
-
|
|
53297
|
-
|
|
53298
|
-
|
|
53299
|
-
|
|
53300
|
-
|
|
53294
|
+
return {
|
|
53295
|
+
...node,
|
|
53296
|
+
selectionSet: {
|
|
53297
|
+
...node.selectionSet,
|
|
53298
|
+
selections: [
|
|
53299
|
+
...node.selectionSet.selections,
|
|
53300
|
+
{
|
|
53301
|
+
kind: 'Field',
|
|
53302
|
+
name: {
|
|
53303
|
+
kind: 'Name',
|
|
53304
|
+
value: '_drafts',
|
|
53305
|
+
},
|
|
53306
|
+
},
|
|
53307
|
+
],
|
|
53301
53308
|
},
|
|
53302
|
-
|
|
53303
|
-
];
|
|
53304
|
-
return node;
|
|
53309
|
+
};
|
|
53305
53310
|
},
|
|
53306
53311
|
},
|
|
53307
53312
|
});
|
|
@@ -55498,6 +55503,16 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
|
|
|
55498
55503
|
if (fieldInfo !== undefined) {
|
|
55499
55504
|
const { dataType, relationshipName, referenceToInfos } = fieldInfo;
|
|
55500
55505
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
55506
|
+
if (dataType === 'DateTime' &&
|
|
55507
|
+
draftField !== null &&
|
|
55508
|
+
typeof draftField === 'string') {
|
|
55509
|
+
try {
|
|
55510
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
55511
|
+
}
|
|
55512
|
+
catch (e) {
|
|
55513
|
+
throw Error('date field value not valid');
|
|
55514
|
+
}
|
|
55515
|
+
}
|
|
55501
55516
|
if (dataType === 'Reference' && relationshipName !== null && draftField !== null) {
|
|
55502
55517
|
if (typeof draftField !== 'string') {
|
|
55503
55518
|
throw Error('reference field value is not a string');
|
|
@@ -59840,7 +59855,7 @@ register({
|
|
|
59840
59855
|
id: '@salesforce/lds-network-adapter',
|
|
59841
59856
|
instrument: instrument$1,
|
|
59842
59857
|
});
|
|
59843
|
-
// version: 1.124.
|
|
59858
|
+
// version: 1.124.7-ce8012bd1
|
|
59844
59859
|
|
|
59845
59860
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59846
59861
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74105,7 +74120,7 @@ register({
|
|
|
74105
74120
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74106
74121
|
instrument,
|
|
74107
74122
|
});
|
|
74108
|
-
// version: 1.124.
|
|
74123
|
+
// version: 1.124.7-c25b7f2a6
|
|
74109
74124
|
|
|
74110
74125
|
// On core the unstable adapters are re-exported with different names,
|
|
74111
74126
|
|
|
@@ -76234,7 +76249,7 @@ withDefaultLuvio((luvio) => {
|
|
|
76234
76249
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76235
76250
|
graphQLImperative = ldsAdapter;
|
|
76236
76251
|
});
|
|
76237
|
-
// version: 1.124.
|
|
76252
|
+
// version: 1.124.7-c25b7f2a6
|
|
76238
76253
|
|
|
76239
76254
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76240
76255
|
__proto__: null,
|
|
@@ -76916,4 +76931,4 @@ const { luvio } = getRuntime();
|
|
|
76916
76931
|
setDefaultLuvio({ luvio });
|
|
76917
76932
|
|
|
76918
76933
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
76919
|
-
// version: 1.124.
|
|
76934
|
+
// version: 1.124.7-ce8012bd1
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
}
|
|
3783
3783
|
callbacks.push(callback);
|
|
3784
3784
|
}
|
|
3785
|
-
// version: 1.124.
|
|
3785
|
+
// version: 1.124.7-ce8012bd1
|
|
3786
3786
|
|
|
3787
3787
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3788
3788
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15206,7 +15206,7 @@
|
|
|
15206
15206
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15207
15207
|
return luvioDocumentNode;
|
|
15208
15208
|
}
|
|
15209
|
-
// version: 1.124.
|
|
15209
|
+
// version: 1.124.7-ce8012bd1
|
|
15210
15210
|
|
|
15211
15211
|
function unwrap(data) {
|
|
15212
15212
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16119,7 +16119,7 @@
|
|
|
16119
16119
|
const { apiFamily, name } = metadata;
|
|
16120
16120
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16121
16121
|
}
|
|
16122
|
-
// version: 1.124.
|
|
16122
|
+
// version: 1.124.7-ce8012bd1
|
|
16123
16123
|
|
|
16124
16124
|
/**
|
|
16125
16125
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44353,7 +44353,7 @@
|
|
|
44353
44353
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44354
44354
|
});
|
|
44355
44355
|
});
|
|
44356
|
-
// version: 1.124.
|
|
44356
|
+
// version: 1.124.7-c25b7f2a6
|
|
44357
44357
|
|
|
44358
44358
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44359
44359
|
|
|
@@ -53297,17 +53297,22 @@
|
|
|
53297
53297
|
if (requestsDraftsField(node))
|
|
53298
53298
|
return undefined;
|
|
53299
53299
|
// inject the drafts node for local evaluation since server does not have the 'draft' concept
|
|
53300
|
-
|
|
53301
|
-
|
|
53302
|
-
|
|
53303
|
-
|
|
53304
|
-
|
|
53305
|
-
|
|
53306
|
-
|
|
53300
|
+
return {
|
|
53301
|
+
...node,
|
|
53302
|
+
selectionSet: {
|
|
53303
|
+
...node.selectionSet,
|
|
53304
|
+
selections: [
|
|
53305
|
+
...node.selectionSet.selections,
|
|
53306
|
+
{
|
|
53307
|
+
kind: 'Field',
|
|
53308
|
+
name: {
|
|
53309
|
+
kind: 'Name',
|
|
53310
|
+
value: '_drafts',
|
|
53311
|
+
},
|
|
53312
|
+
},
|
|
53313
|
+
],
|
|
53307
53314
|
},
|
|
53308
|
-
|
|
53309
|
-
];
|
|
53310
|
-
return node;
|
|
53315
|
+
};
|
|
53311
53316
|
},
|
|
53312
53317
|
},
|
|
53313
53318
|
});
|
|
@@ -55504,6 +55509,16 @@
|
|
|
55504
55509
|
if (fieldInfo !== undefined) {
|
|
55505
55510
|
const { dataType, relationshipName, referenceToInfos } = fieldInfo;
|
|
55506
55511
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
55512
|
+
if (dataType === 'DateTime' &&
|
|
55513
|
+
draftField !== null &&
|
|
55514
|
+
typeof draftField === 'string') {
|
|
55515
|
+
try {
|
|
55516
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
55517
|
+
}
|
|
55518
|
+
catch (e) {
|
|
55519
|
+
throw Error('date field value not valid');
|
|
55520
|
+
}
|
|
55521
|
+
}
|
|
55507
55522
|
if (dataType === 'Reference' && relationshipName !== null && draftField !== null) {
|
|
55508
55523
|
if (typeof draftField !== 'string') {
|
|
55509
55524
|
throw Error('reference field value is not a string');
|
|
@@ -59846,7 +59861,7 @@
|
|
|
59846
59861
|
id: '@salesforce/lds-network-adapter',
|
|
59847
59862
|
instrument: instrument$1,
|
|
59848
59863
|
});
|
|
59849
|
-
// version: 1.124.
|
|
59864
|
+
// version: 1.124.7-ce8012bd1
|
|
59850
59865
|
|
|
59851
59866
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59852
59867
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74111,7 +74126,7 @@
|
|
|
74111
74126
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74112
74127
|
instrument,
|
|
74113
74128
|
});
|
|
74114
|
-
// version: 1.124.
|
|
74129
|
+
// version: 1.124.7-c25b7f2a6
|
|
74115
74130
|
|
|
74116
74131
|
// On core the unstable adapters are re-exported with different names,
|
|
74117
74132
|
|
|
@@ -76240,7 +76255,7 @@
|
|
|
76240
76255
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76241
76256
|
graphQLImperative = ldsAdapter;
|
|
76242
76257
|
});
|
|
76243
|
-
// version: 1.124.
|
|
76258
|
+
// version: 1.124.7-c25b7f2a6
|
|
76244
76259
|
|
|
76245
76260
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76246
76261
|
__proto__: null,
|
|
@@ -76939,4 +76954,4 @@
|
|
|
76939
76954
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
76940
76955
|
|
|
76941
76956
|
}));
|
|
76942
|
-
// version: 1.124.
|
|
76957
|
+
// version: 1.124.7-ce8012bd1
|
package/package.json
CHANGED
|
@@ -320,6 +320,39 @@
|
|
|
320
320
|
"unique": false,
|
|
321
321
|
"updateable": true
|
|
322
322
|
},
|
|
323
|
+
"LastFaultDateTime": {
|
|
324
|
+
"apiName": "LastFaultDateTime",
|
|
325
|
+
"calculated": false,
|
|
326
|
+
"compound": false,
|
|
327
|
+
"compoundComponentName": null,
|
|
328
|
+
"compoundFieldName": null,
|
|
329
|
+
"controllerName": null,
|
|
330
|
+
"controllingFields": [],
|
|
331
|
+
"createable": true,
|
|
332
|
+
"custom": true,
|
|
333
|
+
"dataType": "DateTime",
|
|
334
|
+
"extraTypeInfo": null,
|
|
335
|
+
"filterable": true,
|
|
336
|
+
"filteredLookupInfo": null,
|
|
337
|
+
"highScaleNumber": false,
|
|
338
|
+
"htmlFormatted": false,
|
|
339
|
+
"inlineHelpText": null,
|
|
340
|
+
"label": "Last Fault Date Time",
|
|
341
|
+
"length": 0,
|
|
342
|
+
"nameField": false,
|
|
343
|
+
"polymorphicForeignKey": false,
|
|
344
|
+
"precision": 0,
|
|
345
|
+
"reference": false,
|
|
346
|
+
"referenceTargetField": null,
|
|
347
|
+
"referenceToInfos": [],
|
|
348
|
+
"relationshipName": null,
|
|
349
|
+
"required": false,
|
|
350
|
+
"scale": 0,
|
|
351
|
+
"searchPrefilterable": false,
|
|
352
|
+
"sortable": true,
|
|
353
|
+
"unique": false,
|
|
354
|
+
"updateable": true
|
|
355
|
+
},
|
|
323
356
|
"ManufacturedDate": {
|
|
324
357
|
"apiName": "ManufacturedDate",
|
|
325
358
|
"calculated": false,
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"displayValue": "formatted",
|
|
20
20
|
"value": "2021-10-11T06:53:20.000Z"
|
|
21
21
|
},
|
|
22
|
+
"LastFaultDateTime": {
|
|
23
|
+
"displayValue": "formatted",
|
|
24
|
+
"value": "2023-03-16T18:00:00.000Z"
|
|
25
|
+
},
|
|
22
26
|
"LastFlightTime": {
|
|
23
27
|
"displayValue": "formatted",
|
|
24
28
|
"value": "12:45:30"
|