@salesforce/lds-worker-api 1.309.0 → 1.311.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.
|
@@ -1071,4 +1071,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1074
|
-
// version: 1.
|
|
1074
|
+
// version: 1.311.0-167623b638
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.
|
|
4268
|
+
// version: 1.311.0-167623b638
|
|
4269
4269
|
|
|
4270
4270
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4271
4271
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15764,7 +15764,7 @@ function gql(literals, ...subs) {
|
|
|
15764
15764
|
}
|
|
15765
15765
|
return superResult;
|
|
15766
15766
|
}
|
|
15767
|
-
// version: 1.
|
|
15767
|
+
// version: 1.311.0-167623b638
|
|
15768
15768
|
|
|
15769
15769
|
function unwrap(data) {
|
|
15770
15770
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16693,7 +16693,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16693
16693
|
const { apiFamily, name } = metadata;
|
|
16694
16694
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16695
16695
|
}
|
|
16696
|
-
// version: 1.
|
|
16696
|
+
// version: 1.311.0-167623b638
|
|
16697
16697
|
|
|
16698
16698
|
/**
|
|
16699
16699
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -40966,7 +40966,7 @@ const performUpdateRecordQuickAction_ConfigPropertyMetadata = [
|
|
|
40966
40966
|
generateParamConfigMetadata$2('actionApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
40967
40967
|
generateParamConfigMetadata$2('allowSaveOnDuplicate', false, 2 /* Body */, 1 /* Boolean */),
|
|
40968
40968
|
generateParamConfigMetadata$2('apiName', true, 2 /* Body */, 0 /* String */),
|
|
40969
|
-
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String
|
|
40969
|
+
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String */, false, getRecordId18),
|
|
40970
40970
|
generateParamConfigMetadata$2('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
40971
40971
|
];
|
|
40972
40972
|
const performUpdateRecordQuickAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$8, performUpdateRecordQuickAction_ConfigPropertyMetadata);
|
|
@@ -41012,7 +41012,8 @@ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
|
41012
41012
|
if (!untrustedIsObject$2(untrustedConfig)) {
|
|
41013
41013
|
return null;
|
|
41014
41014
|
}
|
|
41015
|
-
const
|
|
41015
|
+
const coercedConfig = coerceConfig$1(untrustedConfig, performUpdateRecordQuickAction_ConfigPropertyMetadata);
|
|
41016
|
+
const config = typeCheckConfig$d(coercedConfig);
|
|
41016
41017
|
if (!areRequiredParametersPresent$1(config, configPropertyNames)) {
|
|
41017
41018
|
return null;
|
|
41018
41019
|
}
|
|
@@ -41086,7 +41087,7 @@ const performQuickAction_ConfigPropertyMetadata = [
|
|
|
41086
41087
|
generateParamConfigMetadata$2('actionApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
41087
41088
|
generateParamConfigMetadata$2('allowSaveOnDuplicate', false, 2 /* Body */, 1 /* Boolean */),
|
|
41088
41089
|
generateParamConfigMetadata$2('apiName', true, 2 /* Body */, 0 /* String */),
|
|
41089
|
-
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String
|
|
41090
|
+
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String */, false, getRecordId18),
|
|
41090
41091
|
generateParamConfigMetadata$2('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
41091
41092
|
];
|
|
41092
41093
|
const performQuickAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$7, performQuickAction_ConfigPropertyMetadata);
|
|
@@ -41132,7 +41133,8 @@ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
|
41132
41133
|
if (!untrustedIsObject$2(untrustedConfig)) {
|
|
41133
41134
|
return null;
|
|
41134
41135
|
}
|
|
41135
|
-
const
|
|
41136
|
+
const coercedConfig = coerceConfig$1(untrustedConfig, performQuickAction_ConfigPropertyMetadata);
|
|
41137
|
+
const config = typeCheckConfig$c(coercedConfig);
|
|
41136
41138
|
if (!areRequiredParametersPresent$1(config, configPropertyNames)) {
|
|
41137
41139
|
return null;
|
|
41138
41140
|
}
|
|
@@ -44798,7 +44800,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44798
44800
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44799
44801
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44800
44802
|
});
|
|
44801
|
-
// version: 1.
|
|
44803
|
+
// version: 1.311.0-5f03b383b7
|
|
44802
44804
|
|
|
44803
44805
|
var ldsIdempotencyWriteDisabled = {
|
|
44804
44806
|
isOpen: function (e) {
|
|
@@ -52695,14 +52697,22 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
|
|
|
52695
52697
|
if (fieldInfo !== undefined) {
|
|
52696
52698
|
const { dataType } = fieldInfo;
|
|
52697
52699
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
52700
|
+
// for a DateTime field, we are going to convert the string to an ISOString value.
|
|
52698
52701
|
if (dataType === 'DateTime' &&
|
|
52699
52702
|
draftField !== null &&
|
|
52700
52703
|
typeof draftField === 'string') {
|
|
52701
|
-
|
|
52702
|
-
|
|
52704
|
+
// if it is empty string, then convert it to null.
|
|
52705
|
+
if (draftField === '') {
|
|
52706
|
+
recordFields[fieldName].value = null;
|
|
52703
52707
|
}
|
|
52704
|
-
|
|
52705
|
-
|
|
52708
|
+
else {
|
|
52709
|
+
// attempt to convert it to ISO string value
|
|
52710
|
+
try {
|
|
52711
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
52712
|
+
}
|
|
52713
|
+
catch (e) {
|
|
52714
|
+
throw Error('date field value not valid');
|
|
52715
|
+
}
|
|
52706
52716
|
}
|
|
52707
52717
|
}
|
|
52708
52718
|
}
|
|
@@ -55678,6 +55688,11 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
55678
55688
|
let { alias, leftPath, operator, value, dataType, isCaseSensitive } = predicate;
|
|
55679
55689
|
let binding = [];
|
|
55680
55690
|
let boundValue = extractPredicateValue(value, dataType);
|
|
55691
|
+
// using != does not include null values
|
|
55692
|
+
// using IS NOT predicate will include null values as null also is not the value
|
|
55693
|
+
if (operator === '!=') {
|
|
55694
|
+
operator = 'IS NOT';
|
|
55695
|
+
}
|
|
55681
55696
|
// Handles boolean type field
|
|
55682
55697
|
if (dataType === 'Boolean') {
|
|
55683
55698
|
if (boundValue === null) {
|
|
@@ -55693,13 +55708,8 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
|
|
|
55693
55708
|
boundValue = 0;
|
|
55694
55709
|
}
|
|
55695
55710
|
}
|
|
55696
|
-
if (boundValue === null) {
|
|
55697
|
-
|
|
55698
|
-
operator = 'IS';
|
|
55699
|
-
}
|
|
55700
|
-
else if (operator === '!=') {
|
|
55701
|
-
operator = 'IS NOT';
|
|
55702
|
-
}
|
|
55711
|
+
if (boundValue === null && operator === '=') {
|
|
55712
|
+
operator = 'IS';
|
|
55703
55713
|
}
|
|
55704
55714
|
alias = !alias ? defaultAlias : alias;
|
|
55705
55715
|
let sql;
|
|
@@ -55851,7 +55861,13 @@ function extractPredicateValue(value, dataType) {
|
|
|
55851
55861
|
return value;
|
|
55852
55862
|
}
|
|
55853
55863
|
if (typeof value !== 'object') {
|
|
55854
|
-
|
|
55864
|
+
// GraphQL server treats empty string value as null
|
|
55865
|
+
if (typeof value === 'string' && value.length === 0) {
|
|
55866
|
+
return null;
|
|
55867
|
+
}
|
|
55868
|
+
else if (typeof value === 'string' ||
|
|
55869
|
+
typeof value === 'number' ||
|
|
55870
|
+
typeof value === 'boolean') {
|
|
55855
55871
|
return value;
|
|
55856
55872
|
}
|
|
55857
55873
|
else {
|
|
@@ -63021,7 +63037,11 @@ class PrimingSession extends EventEmitter {
|
|
|
63021
63037
|
const unavailableTypes = apiNames.filter((x) => !objectInfoMap[x]);
|
|
63022
63038
|
const availableTypes = apiNames.filter((x) => objectInfoMap[x]);
|
|
63023
63039
|
const unavilableBatches = batches.filter((x) => unavailableTypes.includes(x.type));
|
|
63024
|
-
const availableBatches = batches
|
|
63040
|
+
const availableBatches = batches
|
|
63041
|
+
.filter((x) => !unavailableTypes.includes(x.type))
|
|
63042
|
+
.map((x) => {
|
|
63043
|
+
return { ...x, objectInfo: objectInfoMap[x.type] };
|
|
63044
|
+
});
|
|
63025
63045
|
const unavailableIds = unavilableBatches.reduce((acc, x) => {
|
|
63026
63046
|
acc.push(...x.ids);
|
|
63027
63047
|
return acc;
|
|
@@ -63043,7 +63063,7 @@ const requiredFieldMap = {
|
|
|
63043
63063
|
Id: 'Id',
|
|
63044
63064
|
LastModifiedById: 'LastModifiedById { value }',
|
|
63045
63065
|
LastModifiedDate: 'LastModifiedDate { value }',
|
|
63046
|
-
RecordTypeId: 'RecordTypeId { value }',
|
|
63066
|
+
RecordTypeId: 'RecordTypeId(fallback: true) { value }',
|
|
63047
63067
|
SystemModstamp: 'SystemModstamp { value }',
|
|
63048
63068
|
WeakEtag: 'WeakEtag',
|
|
63049
63069
|
};
|
|
@@ -63110,9 +63130,10 @@ class RecordLoaderGraphQL {
|
|
|
63110
63130
|
missingIds: batchInput.ids,
|
|
63111
63131
|
};
|
|
63112
63132
|
}
|
|
63133
|
+
const objectInfo = batchInput.objectInfo;
|
|
63113
63134
|
const seenRecords = new Set(batchInput.ids);
|
|
63114
63135
|
const records = data.uiapi.query[batchInput.type].edges.map((edge) => {
|
|
63115
|
-
const record = this.generateDurableRecordRepresentation(edge.node);
|
|
63136
|
+
const record = this.generateDurableRecordRepresentation(edge.node, objectInfo);
|
|
63116
63137
|
seenRecords.delete(record.id);
|
|
63117
63138
|
return record;
|
|
63118
63139
|
});
|
|
@@ -63163,7 +63184,7 @@ class RecordLoaderGraphQL {
|
|
|
63163
63184
|
}
|
|
63164
63185
|
`;
|
|
63165
63186
|
}
|
|
63166
|
-
generateDurableRecordRepresentation(node) {
|
|
63187
|
+
generateDurableRecordRepresentation(node, objectInfo) {
|
|
63167
63188
|
const standardRecordFields = new Set(Object.keys(requiredFieldMap).map((x) => `${requiredPrefix}${x}`));
|
|
63168
63189
|
const id = node[`${requiredPrefix}Id`];
|
|
63169
63190
|
const recordTypeId = node[`${requiredPrefix}RecordTypeId`].value;
|
|
@@ -63178,6 +63199,16 @@ class RecordLoaderGraphQL {
|
|
|
63178
63199
|
}, {});
|
|
63179
63200
|
fields['Id'] = { value: id, displayValue: null };
|
|
63180
63201
|
fields['RecordTypeId'] = { value: recordTypeId, displayValue: null };
|
|
63202
|
+
let recordTypeInfo = null;
|
|
63203
|
+
if (recordTypeId !== null &&
|
|
63204
|
+
objectInfo.recordTypeInfos &&
|
|
63205
|
+
objectInfo.recordTypeInfos[recordTypeId]) {
|
|
63206
|
+
const appliedRecordTypeInfo = objectInfo.recordTypeInfos[recordTypeId];
|
|
63207
|
+
// ui-api only applies the record type if its not the default type, otherwise it sets it to null
|
|
63208
|
+
if (appliedRecordTypeInfo.defaultRecordTypeMapping === false) {
|
|
63209
|
+
recordTypeInfo = appliedRecordTypeInfo;
|
|
63210
|
+
}
|
|
63211
|
+
}
|
|
63181
63212
|
return {
|
|
63182
63213
|
apiName: node[`${requiredPrefix}ApiName`],
|
|
63183
63214
|
childRelationships: {},
|
|
@@ -63192,7 +63223,7 @@ class RecordLoaderGraphQL {
|
|
|
63192
63223
|
? node[`${requiredPrefix}LastModifiedDate`].value
|
|
63193
63224
|
: null,
|
|
63194
63225
|
recordTypeId,
|
|
63195
|
-
recordTypeInfo:
|
|
63226
|
+
recordTypeInfo: recordTypeInfo,
|
|
63196
63227
|
systemModstamp: node[`${requiredPrefix}SystemModstamp`] &&
|
|
63197
63228
|
node[`${requiredPrefix}SystemModstamp`].value
|
|
63198
63229
|
? node[`${requiredPrefix}SystemModstamp`].value
|
|
@@ -63930,7 +63961,7 @@ register$1({
|
|
|
63930
63961
|
id: '@salesforce/lds-network-adapter',
|
|
63931
63962
|
instrument: instrument$2,
|
|
63932
63963
|
});
|
|
63933
|
-
// version: 1.
|
|
63964
|
+
// version: 1.311.0-167623b638
|
|
63934
63965
|
|
|
63935
63966
|
const { create: create$3, keys: keys$3 } = Object;
|
|
63936
63967
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -83966,7 +83997,7 @@ register$1({
|
|
|
83966
83997
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
83967
83998
|
instrument: instrument$1,
|
|
83968
83999
|
});
|
|
83969
|
-
// version: 1.
|
|
84000
|
+
// version: 1.311.0-5f03b383b7
|
|
83970
84001
|
|
|
83971
84002
|
// On core the unstable adapters are re-exported with different names,
|
|
83972
84003
|
// we want to match them here.
|
|
@@ -86222,7 +86253,7 @@ withDefaultLuvio((luvio) => {
|
|
|
86222
86253
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
86223
86254
|
graphQLImperative = ldsAdapter;
|
|
86224
86255
|
});
|
|
86225
|
-
// version: 1.
|
|
86256
|
+
// version: 1.311.0-5f03b383b7
|
|
86226
86257
|
|
|
86227
86258
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
86228
86259
|
__proto__: null,
|
|
@@ -86957,7 +86988,7 @@ const callbacks$1 = [];
|
|
|
86957
86988
|
function register(r) {
|
|
86958
86989
|
callbacks$1.forEach((callback) => callback(r));
|
|
86959
86990
|
}
|
|
86960
|
-
// version: 1.
|
|
86991
|
+
// version: 1.311.0-167623b638
|
|
86961
86992
|
|
|
86962
86993
|
/**
|
|
86963
86994
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -91919,4 +91950,4 @@ const { luvio } = getRuntime();
|
|
|
91919
91950
|
setDefaultLuvio({ luvio });
|
|
91920
91951
|
|
|
91921
91952
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
91922
|
-
// version: 1.
|
|
91953
|
+
// version: 1.311.0-167623b638
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.311.0-167623b638
|
|
4275
4275
|
|
|
4276
4276
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4277
4277
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15770,7 +15770,7 @@
|
|
|
15770
15770
|
}
|
|
15771
15771
|
return superResult;
|
|
15772
15772
|
}
|
|
15773
|
-
// version: 1.
|
|
15773
|
+
// version: 1.311.0-167623b638
|
|
15774
15774
|
|
|
15775
15775
|
function unwrap(data) {
|
|
15776
15776
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16699,7 +16699,7 @@
|
|
|
16699
16699
|
const { apiFamily, name } = metadata;
|
|
16700
16700
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16701
16701
|
}
|
|
16702
|
-
// version: 1.
|
|
16702
|
+
// version: 1.311.0-167623b638
|
|
16703
16703
|
|
|
16704
16704
|
/**
|
|
16705
16705
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -40972,7 +40972,7 @@
|
|
|
40972
40972
|
generateParamConfigMetadata$2('actionApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
40973
40973
|
generateParamConfigMetadata$2('allowSaveOnDuplicate', false, 2 /* Body */, 1 /* Boolean */),
|
|
40974
40974
|
generateParamConfigMetadata$2('apiName', true, 2 /* Body */, 0 /* String */),
|
|
40975
|
-
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String
|
|
40975
|
+
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String */, false, getRecordId18),
|
|
40976
40976
|
generateParamConfigMetadata$2('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
40977
40977
|
];
|
|
40978
40978
|
const performUpdateRecordQuickAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$8, performUpdateRecordQuickAction_ConfigPropertyMetadata);
|
|
@@ -41018,7 +41018,8 @@
|
|
|
41018
41018
|
if (!untrustedIsObject$2(untrustedConfig)) {
|
|
41019
41019
|
return null;
|
|
41020
41020
|
}
|
|
41021
|
-
const
|
|
41021
|
+
const coercedConfig = coerceConfig$1(untrustedConfig, performUpdateRecordQuickAction_ConfigPropertyMetadata);
|
|
41022
|
+
const config = typeCheckConfig$d(coercedConfig);
|
|
41022
41023
|
if (!areRequiredParametersPresent$1(config, configPropertyNames)) {
|
|
41023
41024
|
return null;
|
|
41024
41025
|
}
|
|
@@ -41092,7 +41093,7 @@
|
|
|
41092
41093
|
generateParamConfigMetadata$2('actionApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
41093
41094
|
generateParamConfigMetadata$2('allowSaveOnDuplicate', false, 2 /* Body */, 1 /* Boolean */),
|
|
41094
41095
|
generateParamConfigMetadata$2('apiName', true, 2 /* Body */, 0 /* String */),
|
|
41095
|
-
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String
|
|
41096
|
+
generateParamConfigMetadata$2('contextId', false, 2 /* Body */, 0 /* String */, false, getRecordId18),
|
|
41096
41097
|
generateParamConfigMetadata$2('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
41097
41098
|
];
|
|
41098
41099
|
const performQuickAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$7, performQuickAction_ConfigPropertyMetadata);
|
|
@@ -41138,7 +41139,8 @@
|
|
|
41138
41139
|
if (!untrustedIsObject$2(untrustedConfig)) {
|
|
41139
41140
|
return null;
|
|
41140
41141
|
}
|
|
41141
|
-
const
|
|
41142
|
+
const coercedConfig = coerceConfig$1(untrustedConfig, performQuickAction_ConfigPropertyMetadata);
|
|
41143
|
+
const config = typeCheckConfig$c(coercedConfig);
|
|
41142
41144
|
if (!areRequiredParametersPresent$1(config, configPropertyNames)) {
|
|
41143
41145
|
return null;
|
|
41144
41146
|
}
|
|
@@ -44804,7 +44806,7 @@
|
|
|
44804
44806
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
44805
44807
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
44806
44808
|
});
|
|
44807
|
-
// version: 1.
|
|
44809
|
+
// version: 1.311.0-5f03b383b7
|
|
44808
44810
|
|
|
44809
44811
|
var ldsIdempotencyWriteDisabled = {
|
|
44810
44812
|
isOpen: function (e) {
|
|
@@ -52701,14 +52703,22 @@
|
|
|
52701
52703
|
if (fieldInfo !== undefined) {
|
|
52702
52704
|
const { dataType } = fieldInfo;
|
|
52703
52705
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
52706
|
+
// for a DateTime field, we are going to convert the string to an ISOString value.
|
|
52704
52707
|
if (dataType === 'DateTime' &&
|
|
52705
52708
|
draftField !== null &&
|
|
52706
52709
|
typeof draftField === 'string') {
|
|
52707
|
-
|
|
52708
|
-
|
|
52710
|
+
// if it is empty string, then convert it to null.
|
|
52711
|
+
if (draftField === '') {
|
|
52712
|
+
recordFields[fieldName].value = null;
|
|
52709
52713
|
}
|
|
52710
|
-
|
|
52711
|
-
|
|
52714
|
+
else {
|
|
52715
|
+
// attempt to convert it to ISO string value
|
|
52716
|
+
try {
|
|
52717
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
52718
|
+
}
|
|
52719
|
+
catch (e) {
|
|
52720
|
+
throw Error('date field value not valid');
|
|
52721
|
+
}
|
|
52712
52722
|
}
|
|
52713
52723
|
}
|
|
52714
52724
|
}
|
|
@@ -55684,6 +55694,11 @@
|
|
|
55684
55694
|
let { alias, leftPath, operator, value, dataType, isCaseSensitive } = predicate;
|
|
55685
55695
|
let binding = [];
|
|
55686
55696
|
let boundValue = extractPredicateValue(value, dataType);
|
|
55697
|
+
// using != does not include null values
|
|
55698
|
+
// using IS NOT predicate will include null values as null also is not the value
|
|
55699
|
+
if (operator === '!=') {
|
|
55700
|
+
operator = 'IS NOT';
|
|
55701
|
+
}
|
|
55687
55702
|
// Handles boolean type field
|
|
55688
55703
|
if (dataType === 'Boolean') {
|
|
55689
55704
|
if (boundValue === null) {
|
|
@@ -55699,13 +55714,8 @@
|
|
|
55699
55714
|
boundValue = 0;
|
|
55700
55715
|
}
|
|
55701
55716
|
}
|
|
55702
|
-
if (boundValue === null) {
|
|
55703
|
-
|
|
55704
|
-
operator = 'IS';
|
|
55705
|
-
}
|
|
55706
|
-
else if (operator === '!=') {
|
|
55707
|
-
operator = 'IS NOT';
|
|
55708
|
-
}
|
|
55717
|
+
if (boundValue === null && operator === '=') {
|
|
55718
|
+
operator = 'IS';
|
|
55709
55719
|
}
|
|
55710
55720
|
alias = !alias ? defaultAlias : alias;
|
|
55711
55721
|
let sql;
|
|
@@ -55857,7 +55867,13 @@
|
|
|
55857
55867
|
return value;
|
|
55858
55868
|
}
|
|
55859
55869
|
if (typeof value !== 'object') {
|
|
55860
|
-
|
|
55870
|
+
// GraphQL server treats empty string value as null
|
|
55871
|
+
if (typeof value === 'string' && value.length === 0) {
|
|
55872
|
+
return null;
|
|
55873
|
+
}
|
|
55874
|
+
else if (typeof value === 'string' ||
|
|
55875
|
+
typeof value === 'number' ||
|
|
55876
|
+
typeof value === 'boolean') {
|
|
55861
55877
|
return value;
|
|
55862
55878
|
}
|
|
55863
55879
|
else {
|
|
@@ -63027,7 +63043,11 @@
|
|
|
63027
63043
|
const unavailableTypes = apiNames.filter((x) => !objectInfoMap[x]);
|
|
63028
63044
|
const availableTypes = apiNames.filter((x) => objectInfoMap[x]);
|
|
63029
63045
|
const unavilableBatches = batches.filter((x) => unavailableTypes.includes(x.type));
|
|
63030
|
-
const availableBatches = batches
|
|
63046
|
+
const availableBatches = batches
|
|
63047
|
+
.filter((x) => !unavailableTypes.includes(x.type))
|
|
63048
|
+
.map((x) => {
|
|
63049
|
+
return { ...x, objectInfo: objectInfoMap[x.type] };
|
|
63050
|
+
});
|
|
63031
63051
|
const unavailableIds = unavilableBatches.reduce((acc, x) => {
|
|
63032
63052
|
acc.push(...x.ids);
|
|
63033
63053
|
return acc;
|
|
@@ -63049,7 +63069,7 @@
|
|
|
63049
63069
|
Id: 'Id',
|
|
63050
63070
|
LastModifiedById: 'LastModifiedById { value }',
|
|
63051
63071
|
LastModifiedDate: 'LastModifiedDate { value }',
|
|
63052
|
-
RecordTypeId: 'RecordTypeId { value }',
|
|
63072
|
+
RecordTypeId: 'RecordTypeId(fallback: true) { value }',
|
|
63053
63073
|
SystemModstamp: 'SystemModstamp { value }',
|
|
63054
63074
|
WeakEtag: 'WeakEtag',
|
|
63055
63075
|
};
|
|
@@ -63116,9 +63136,10 @@
|
|
|
63116
63136
|
missingIds: batchInput.ids,
|
|
63117
63137
|
};
|
|
63118
63138
|
}
|
|
63139
|
+
const objectInfo = batchInput.objectInfo;
|
|
63119
63140
|
const seenRecords = new Set(batchInput.ids);
|
|
63120
63141
|
const records = data.uiapi.query[batchInput.type].edges.map((edge) => {
|
|
63121
|
-
const record = this.generateDurableRecordRepresentation(edge.node);
|
|
63142
|
+
const record = this.generateDurableRecordRepresentation(edge.node, objectInfo);
|
|
63122
63143
|
seenRecords.delete(record.id);
|
|
63123
63144
|
return record;
|
|
63124
63145
|
});
|
|
@@ -63169,7 +63190,7 @@
|
|
|
63169
63190
|
}
|
|
63170
63191
|
`;
|
|
63171
63192
|
}
|
|
63172
|
-
generateDurableRecordRepresentation(node) {
|
|
63193
|
+
generateDurableRecordRepresentation(node, objectInfo) {
|
|
63173
63194
|
const standardRecordFields = new Set(Object.keys(requiredFieldMap).map((x) => `${requiredPrefix}${x}`));
|
|
63174
63195
|
const id = node[`${requiredPrefix}Id`];
|
|
63175
63196
|
const recordTypeId = node[`${requiredPrefix}RecordTypeId`].value;
|
|
@@ -63184,6 +63205,16 @@
|
|
|
63184
63205
|
}, {});
|
|
63185
63206
|
fields['Id'] = { value: id, displayValue: null };
|
|
63186
63207
|
fields['RecordTypeId'] = { value: recordTypeId, displayValue: null };
|
|
63208
|
+
let recordTypeInfo = null;
|
|
63209
|
+
if (recordTypeId !== null &&
|
|
63210
|
+
objectInfo.recordTypeInfos &&
|
|
63211
|
+
objectInfo.recordTypeInfos[recordTypeId]) {
|
|
63212
|
+
const appliedRecordTypeInfo = objectInfo.recordTypeInfos[recordTypeId];
|
|
63213
|
+
// ui-api only applies the record type if its not the default type, otherwise it sets it to null
|
|
63214
|
+
if (appliedRecordTypeInfo.defaultRecordTypeMapping === false) {
|
|
63215
|
+
recordTypeInfo = appliedRecordTypeInfo;
|
|
63216
|
+
}
|
|
63217
|
+
}
|
|
63187
63218
|
return {
|
|
63188
63219
|
apiName: node[`${requiredPrefix}ApiName`],
|
|
63189
63220
|
childRelationships: {},
|
|
@@ -63198,7 +63229,7 @@
|
|
|
63198
63229
|
? node[`${requiredPrefix}LastModifiedDate`].value
|
|
63199
63230
|
: null,
|
|
63200
63231
|
recordTypeId,
|
|
63201
|
-
recordTypeInfo:
|
|
63232
|
+
recordTypeInfo: recordTypeInfo,
|
|
63202
63233
|
systemModstamp: node[`${requiredPrefix}SystemModstamp`] &&
|
|
63203
63234
|
node[`${requiredPrefix}SystemModstamp`].value
|
|
63204
63235
|
? node[`${requiredPrefix}SystemModstamp`].value
|
|
@@ -63936,7 +63967,7 @@
|
|
|
63936
63967
|
id: '@salesforce/lds-network-adapter',
|
|
63937
63968
|
instrument: instrument$2,
|
|
63938
63969
|
});
|
|
63939
|
-
// version: 1.
|
|
63970
|
+
// version: 1.311.0-167623b638
|
|
63940
63971
|
|
|
63941
63972
|
const { create: create$3, keys: keys$3 } = Object;
|
|
63942
63973
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -83972,7 +84003,7 @@
|
|
|
83972
84003
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
83973
84004
|
instrument: instrument$1,
|
|
83974
84005
|
});
|
|
83975
|
-
// version: 1.
|
|
84006
|
+
// version: 1.311.0-5f03b383b7
|
|
83976
84007
|
|
|
83977
84008
|
// On core the unstable adapters are re-exported with different names,
|
|
83978
84009
|
// we want to match them here.
|
|
@@ -86228,7 +86259,7 @@
|
|
|
86228
86259
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
86229
86260
|
graphQLImperative = ldsAdapter;
|
|
86230
86261
|
});
|
|
86231
|
-
// version: 1.
|
|
86262
|
+
// version: 1.311.0-5f03b383b7
|
|
86232
86263
|
|
|
86233
86264
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
86234
86265
|
__proto__: null,
|
|
@@ -86963,7 +86994,7 @@
|
|
|
86963
86994
|
function register(r) {
|
|
86964
86995
|
callbacks$1.forEach((callback) => callback(r));
|
|
86965
86996
|
}
|
|
86966
|
-
// version: 1.
|
|
86997
|
+
// version: 1.311.0-167623b638
|
|
86967
86998
|
|
|
86968
86999
|
/**
|
|
86969
87000
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -91944,4 +91975,4 @@
|
|
|
91944
91975
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
91945
91976
|
|
|
91946
91977
|
}));
|
|
91947
|
-
// version: 1.
|
|
91978
|
+
// version: 1.311.0-167623b638
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-worker-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.311.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/standalone/es/lds-worker-api.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
|
|
38
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
40
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
41
|
-
"@salesforce/lds-drafts": "^1.
|
|
42
|
-
"@salesforce/lds-graphql-parser": "^1.
|
|
43
|
-
"@salesforce/lds-luvio-engine": "^1.
|
|
44
|
-
"@salesforce/lds-priming": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-mobile": "^1.
|
|
46
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-graphql": "^1.311.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.311.0",
|
|
40
|
+
"@salesforce/lds-default-luvio": "^1.311.0",
|
|
41
|
+
"@salesforce/lds-drafts": "^1.311.0",
|
|
42
|
+
"@salesforce/lds-graphql-parser": "^1.311.0",
|
|
43
|
+
"@salesforce/lds-luvio-engine": "^1.311.0",
|
|
44
|
+
"@salesforce/lds-priming": "^1.311.0",
|
|
45
|
+
"@salesforce/lds-runtime-mobile": "^1.311.0",
|
|
46
|
+
"@salesforce/nimbus-plugin-lds": "^1.311.0",
|
|
47
47
|
"ajv": "^8.11.0",
|
|
48
48
|
"glob": "^7.1.5",
|
|
49
49
|
"nimbus-types": "^2.0.0-alpha1",
|