@salesforce/lds-runtime-mobile 1.308.0 → 1.310.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 +62 -50
- package/package.json +18 -18
- package/sfdc/main.js +62 -50
package/dist/main.js
CHANGED
|
@@ -5271,7 +5271,8 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
|
|
|
5271
5271
|
resourceRequestCopy.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
5272
5272
|
}
|
|
5273
5273
|
// enable return extra fields for record creation and record update http call
|
|
5274
|
-
if (resourceRequest.basePath === '
|
|
5274
|
+
if (typeof resourceRequest.basePath === 'string' &&
|
|
5275
|
+
resourceRequest.basePath.startsWith('/ui-api/records') &&
|
|
5275
5276
|
(resourceRequest.method === 'post' || resourceRequest.method === 'patch')) {
|
|
5276
5277
|
resourceRequestCopy.queryParams = resourceRequestCopy.queryParams || {};
|
|
5277
5278
|
resourceRequestCopy.queryParams['includeFieldsInBody'] = true;
|
|
@@ -7094,10 +7095,49 @@ const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
|
7094
7095
|
const { shift } = Array.prototype;
|
|
7095
7096
|
const { isArray: isArray$2, from: from$2 } = Array;
|
|
7096
7097
|
|
|
7098
|
+
/**
|
|
7099
|
+
* Retrieves a denormalized record from the store
|
|
7100
|
+
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
7101
|
+
* @param recordKey record key
|
|
7102
|
+
* @param durableStore the durable store
|
|
7103
|
+
* @returns a DraftRecordRepresentation containing the requested fields
|
|
7104
|
+
*/
|
|
7105
|
+
function getDenormalizedRecord(recordKey, durableStore) {
|
|
7106
|
+
return durableStore
|
|
7107
|
+
.getEntries([recordKey], DefaultDurableSegment)
|
|
7108
|
+
.then((entries) => {
|
|
7109
|
+
if (entries === undefined) {
|
|
7110
|
+
return undefined;
|
|
7111
|
+
}
|
|
7112
|
+
const denormalizedEntry = entries[recordKey];
|
|
7113
|
+
if (denormalizedEntry === undefined) {
|
|
7114
|
+
return undefined;
|
|
7115
|
+
}
|
|
7116
|
+
// don't include link information
|
|
7117
|
+
const denormalizedRecord = denormalizedEntry.data;
|
|
7118
|
+
if (isStoreRecordError(denormalizedRecord)) {
|
|
7119
|
+
return undefined;
|
|
7120
|
+
}
|
|
7121
|
+
return denormalizedRecord;
|
|
7122
|
+
});
|
|
7123
|
+
}
|
|
7124
|
+
function isStoreRecordError(storeRecord) {
|
|
7125
|
+
return storeRecord.__type === 'error';
|
|
7126
|
+
}
|
|
7127
|
+
function isDraftFieldPending(field) {
|
|
7128
|
+
return !!(field.__state && field.__state.pending === true);
|
|
7129
|
+
}
|
|
7130
|
+
function isDraftFieldMissing(field) {
|
|
7131
|
+
return !!(field.__state && field.__state.isMissing === true);
|
|
7132
|
+
}
|
|
7133
|
+
|
|
7097
7134
|
function isFieldLink(field) {
|
|
7098
7135
|
const { value } = field;
|
|
7099
7136
|
return value !== null && typeof value === 'object' && value.__ref !== undefined;
|
|
7100
7137
|
}
|
|
7138
|
+
function isPendingOrMissing(field) {
|
|
7139
|
+
return isDraftFieldMissing(field) || isDraftFieldPending(field);
|
|
7140
|
+
}
|
|
7101
7141
|
|
|
7102
7142
|
const RECORD_ENDPOINT_REGEX$1 = /^\/ui-api\/records\/?(([a-zA-Z0-9]+))?$/;
|
|
7103
7143
|
/**
|
|
@@ -7154,12 +7194,12 @@ function getRecordKeyForId(luvio, recordId) {
|
|
|
7154
7194
|
* @param record draft record representation
|
|
7155
7195
|
* @returns flattened record representation
|
|
7156
7196
|
*/
|
|
7157
|
-
function
|
|
7197
|
+
function filterOutReferenceNonScalarFields(record) {
|
|
7158
7198
|
const filteredFields = {};
|
|
7159
7199
|
const fieldNames = keys$5(record.fields);
|
|
7160
7200
|
for (const fieldName of fieldNames) {
|
|
7161
7201
|
const field = record.fields[fieldName];
|
|
7162
|
-
if (isFieldLink(field) === false) {
|
|
7202
|
+
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
7163
7203
|
filteredFields[fieldName] = field;
|
|
7164
7204
|
}
|
|
7165
7205
|
}
|
|
@@ -7173,42 +7213,6 @@ function filterOutReferenceFieldsAndLinks(record) {
|
|
|
7173
7213
|
return filteredRecords;
|
|
7174
7214
|
}
|
|
7175
7215
|
|
|
7176
|
-
/**
|
|
7177
|
-
* Retrieves a denormalized record from the store
|
|
7178
|
-
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
7179
|
-
* @param recordKey record key
|
|
7180
|
-
* @param durableStore the durable store
|
|
7181
|
-
* @returns a DraftRecordRepresentation containing the requested fields
|
|
7182
|
-
*/
|
|
7183
|
-
function getDenormalizedRecord(recordKey, durableStore) {
|
|
7184
|
-
return durableStore
|
|
7185
|
-
.getEntries([recordKey], DefaultDurableSegment)
|
|
7186
|
-
.then((entries) => {
|
|
7187
|
-
if (entries === undefined) {
|
|
7188
|
-
return undefined;
|
|
7189
|
-
}
|
|
7190
|
-
const denormalizedEntry = entries[recordKey];
|
|
7191
|
-
if (denormalizedEntry === undefined) {
|
|
7192
|
-
return undefined;
|
|
7193
|
-
}
|
|
7194
|
-
// don't include link information
|
|
7195
|
-
const denormalizedRecord = denormalizedEntry.data;
|
|
7196
|
-
if (isStoreRecordError(denormalizedRecord)) {
|
|
7197
|
-
return undefined;
|
|
7198
|
-
}
|
|
7199
|
-
return denormalizedRecord;
|
|
7200
|
-
});
|
|
7201
|
-
}
|
|
7202
|
-
function isStoreRecordError(storeRecord) {
|
|
7203
|
-
return storeRecord.__type === 'error';
|
|
7204
|
-
}
|
|
7205
|
-
function isDraftFieldPending(field) {
|
|
7206
|
-
return !!(field.__state && field.__state.pending === true);
|
|
7207
|
-
}
|
|
7208
|
-
function isDraftFieldMissing(field) {
|
|
7209
|
-
return !!(field.__state && field.__state.isMissing === true);
|
|
7210
|
-
}
|
|
7211
|
-
|
|
7212
7216
|
/**
|
|
7213
7217
|
* Checks if a resource request is a GET method on the record endpoint
|
|
7214
7218
|
* @param request the resource request
|
|
@@ -7285,7 +7289,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableStore }) {
|
|
|
7285
7289
|
}));
|
|
7286
7290
|
}
|
|
7287
7291
|
return Promise.reject(createBadRequestResponse({
|
|
7288
|
-
message: '
|
|
7292
|
+
message: 'Cannot fetch draft-created record from network',
|
|
7289
7293
|
}));
|
|
7290
7294
|
}
|
|
7291
7295
|
// a canonical mapping exists for the draft id passed in, we can create a new resource
|
|
@@ -7792,14 +7796,22 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
|
|
|
7792
7796
|
if (fieldInfo !== undefined) {
|
|
7793
7797
|
const { dataType } = fieldInfo;
|
|
7794
7798
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
7799
|
+
// for a DateTime field, we are going to convert the string to an ISOString value.
|
|
7795
7800
|
if (dataType === 'DateTime' &&
|
|
7796
7801
|
draftField !== null &&
|
|
7797
7802
|
typeof draftField === 'string') {
|
|
7798
|
-
|
|
7799
|
-
|
|
7803
|
+
// if it is empty string, then convert it to null.
|
|
7804
|
+
if (draftField === '') {
|
|
7805
|
+
recordFields[fieldName].value = null;
|
|
7800
7806
|
}
|
|
7801
|
-
|
|
7802
|
-
|
|
7807
|
+
else {
|
|
7808
|
+
// attempt to convert it to ISO string value
|
|
7809
|
+
try {
|
|
7810
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
7811
|
+
}
|
|
7812
|
+
catch (e) {
|
|
7813
|
+
throw Error('date field value not valid');
|
|
7814
|
+
}
|
|
7803
7815
|
}
|
|
7804
7816
|
}
|
|
7805
7817
|
}
|
|
@@ -8246,7 +8258,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
8246
8258
|
if (recordWithDrafts === undefined) {
|
|
8247
8259
|
return undefined;
|
|
8248
8260
|
}
|
|
8249
|
-
return
|
|
8261
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
8250
8262
|
}
|
|
8251
8263
|
const record = await getDenormalizedRecord(key, this.durableStore);
|
|
8252
8264
|
if (record === undefined) {
|
|
@@ -8257,7 +8269,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
8257
8269
|
if (recordWithDrafts === undefined) {
|
|
8258
8270
|
return recordWithDrafts;
|
|
8259
8271
|
}
|
|
8260
|
-
return
|
|
8272
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
8261
8273
|
}
|
|
8262
8274
|
applyDraftsToIncomingData(key, data, draftMetadata, publishData) {
|
|
8263
8275
|
if (draftMetadata === undefined) {
|
|
@@ -9153,9 +9165,9 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
9153
9165
|
return undefined;
|
|
9154
9166
|
}
|
|
9155
9167
|
// finally we resolve all references for each record
|
|
9156
|
-
const contentDocResolved = await
|
|
9157
|
-
const contentDocLinkResolved = await
|
|
9158
|
-
const contentVersionResolved = await
|
|
9168
|
+
const contentDocResolved = await filterOutReferenceNonScalarFields(contentDocRecord);
|
|
9169
|
+
const contentDocLinkResolved = await filterOutReferenceNonScalarFields(contentDocLink);
|
|
9170
|
+
const contentVersionResolved = await filterOutReferenceNonScalarFields(contentVersion);
|
|
9159
9171
|
return {
|
|
9160
9172
|
contentDocument: contentDocResolved,
|
|
9161
9173
|
contentDocumentLinks: [contentDocLinkResolved],
|
|
@@ -19176,4 +19188,4 @@ register({
|
|
|
19176
19188
|
});
|
|
19177
19189
|
|
|
19178
19190
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
19179
|
-
// version: 1.
|
|
19191
|
+
// version: 1.310.0-6f61f12f95
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.310.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,27 +32,27 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@salesforce/lds-adapters-uiapi-mobile": "^1.
|
|
36
|
-
"@salesforce/lds-bindings": "^1.
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
38
|
-
"@salesforce/lds-priming": "^1.
|
|
35
|
+
"@salesforce/lds-adapters-uiapi-mobile": "^1.310.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.310.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.310.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.310.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "250.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
44
|
-
"@salesforce/lds-drafts": "^1.
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
46
|
-
"@salesforce/lds-durable-records": "^1.
|
|
47
|
-
"@salesforce/lds-graphql-eval": "^1.
|
|
48
|
-
"@salesforce/lds-graphql-local-evaluation": "^1.
|
|
49
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
50
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
51
|
-
"@salesforce/lds-store-binary": "^1.
|
|
52
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
53
|
-
"@salesforce/lds-store-sql": "^1.
|
|
54
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
55
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.310.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.310.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.310.0",
|
|
46
|
+
"@salesforce/lds-durable-records": "^1.310.0",
|
|
47
|
+
"@salesforce/lds-graphql-eval": "^1.310.0",
|
|
48
|
+
"@salesforce/lds-graphql-local-evaluation": "^1.310.0",
|
|
49
|
+
"@salesforce/lds-network-adapter": "^1.310.0",
|
|
50
|
+
"@salesforce/lds-network-nimbus": "^1.310.0",
|
|
51
|
+
"@salesforce/lds-store-binary": "^1.310.0",
|
|
52
|
+
"@salesforce/lds-store-nimbus": "^1.310.0",
|
|
53
|
+
"@salesforce/lds-store-sql": "^1.310.0",
|
|
54
|
+
"@salesforce/lds-utils-adapters": "^1.310.0",
|
|
55
|
+
"@salesforce/nimbus-plugin-lds": "^1.310.0",
|
|
56
56
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
57
57
|
"wait-for-expect": "^3.0.2"
|
|
58
58
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -5271,7 +5271,8 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
|
|
|
5271
5271
|
resourceRequestCopy.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
5272
5272
|
}
|
|
5273
5273
|
// enable return extra fields for record creation and record update http call
|
|
5274
|
-
if (resourceRequest.basePath === '
|
|
5274
|
+
if (typeof resourceRequest.basePath === 'string' &&
|
|
5275
|
+
resourceRequest.basePath.startsWith('/ui-api/records') &&
|
|
5275
5276
|
(resourceRequest.method === 'post' || resourceRequest.method === 'patch')) {
|
|
5276
5277
|
resourceRequestCopy.queryParams = resourceRequestCopy.queryParams || {};
|
|
5277
5278
|
resourceRequestCopy.queryParams['includeFieldsInBody'] = true;
|
|
@@ -7094,10 +7095,49 @@ const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
|
7094
7095
|
const { shift } = Array.prototype;
|
|
7095
7096
|
const { isArray: isArray$2, from: from$2 } = Array;
|
|
7096
7097
|
|
|
7098
|
+
/**
|
|
7099
|
+
* Retrieves a denormalized record from the store
|
|
7100
|
+
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
7101
|
+
* @param recordKey record key
|
|
7102
|
+
* @param durableStore the durable store
|
|
7103
|
+
* @returns a DraftRecordRepresentation containing the requested fields
|
|
7104
|
+
*/
|
|
7105
|
+
function getDenormalizedRecord(recordKey, durableStore) {
|
|
7106
|
+
return durableStore
|
|
7107
|
+
.getEntries([recordKey], DefaultDurableSegment)
|
|
7108
|
+
.then((entries) => {
|
|
7109
|
+
if (entries === undefined) {
|
|
7110
|
+
return undefined;
|
|
7111
|
+
}
|
|
7112
|
+
const denormalizedEntry = entries[recordKey];
|
|
7113
|
+
if (denormalizedEntry === undefined) {
|
|
7114
|
+
return undefined;
|
|
7115
|
+
}
|
|
7116
|
+
// don't include link information
|
|
7117
|
+
const denormalizedRecord = denormalizedEntry.data;
|
|
7118
|
+
if (isStoreRecordError(denormalizedRecord)) {
|
|
7119
|
+
return undefined;
|
|
7120
|
+
}
|
|
7121
|
+
return denormalizedRecord;
|
|
7122
|
+
});
|
|
7123
|
+
}
|
|
7124
|
+
function isStoreRecordError(storeRecord) {
|
|
7125
|
+
return storeRecord.__type === 'error';
|
|
7126
|
+
}
|
|
7127
|
+
function isDraftFieldPending(field) {
|
|
7128
|
+
return !!(field.__state && field.__state.pending === true);
|
|
7129
|
+
}
|
|
7130
|
+
function isDraftFieldMissing(field) {
|
|
7131
|
+
return !!(field.__state && field.__state.isMissing === true);
|
|
7132
|
+
}
|
|
7133
|
+
|
|
7097
7134
|
function isFieldLink(field) {
|
|
7098
7135
|
const { value } = field;
|
|
7099
7136
|
return value !== null && typeof value === 'object' && value.__ref !== undefined;
|
|
7100
7137
|
}
|
|
7138
|
+
function isPendingOrMissing(field) {
|
|
7139
|
+
return isDraftFieldMissing(field) || isDraftFieldPending(field);
|
|
7140
|
+
}
|
|
7101
7141
|
|
|
7102
7142
|
const RECORD_ENDPOINT_REGEX$1 = /^\/ui-api\/records\/?(([a-zA-Z0-9]+))?$/;
|
|
7103
7143
|
/**
|
|
@@ -7154,12 +7194,12 @@ function getRecordKeyForId(luvio, recordId) {
|
|
|
7154
7194
|
* @param record draft record representation
|
|
7155
7195
|
* @returns flattened record representation
|
|
7156
7196
|
*/
|
|
7157
|
-
function
|
|
7197
|
+
function filterOutReferenceNonScalarFields(record) {
|
|
7158
7198
|
const filteredFields = {};
|
|
7159
7199
|
const fieldNames = keys$5(record.fields);
|
|
7160
7200
|
for (const fieldName of fieldNames) {
|
|
7161
7201
|
const field = record.fields[fieldName];
|
|
7162
|
-
if (isFieldLink(field) === false) {
|
|
7202
|
+
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
7163
7203
|
filteredFields[fieldName] = field;
|
|
7164
7204
|
}
|
|
7165
7205
|
}
|
|
@@ -7173,42 +7213,6 @@ function filterOutReferenceFieldsAndLinks(record) {
|
|
|
7173
7213
|
return filteredRecords;
|
|
7174
7214
|
}
|
|
7175
7215
|
|
|
7176
|
-
/**
|
|
7177
|
-
* Retrieves a denormalized record from the store
|
|
7178
|
-
* NOTE: do no use this if you don't know what you're doing, this can still contain normalized record references
|
|
7179
|
-
* @param recordKey record key
|
|
7180
|
-
* @param durableStore the durable store
|
|
7181
|
-
* @returns a DraftRecordRepresentation containing the requested fields
|
|
7182
|
-
*/
|
|
7183
|
-
function getDenormalizedRecord(recordKey, durableStore) {
|
|
7184
|
-
return durableStore
|
|
7185
|
-
.getEntries([recordKey], DefaultDurableSegment)
|
|
7186
|
-
.then((entries) => {
|
|
7187
|
-
if (entries === undefined) {
|
|
7188
|
-
return undefined;
|
|
7189
|
-
}
|
|
7190
|
-
const denormalizedEntry = entries[recordKey];
|
|
7191
|
-
if (denormalizedEntry === undefined) {
|
|
7192
|
-
return undefined;
|
|
7193
|
-
}
|
|
7194
|
-
// don't include link information
|
|
7195
|
-
const denormalizedRecord = denormalizedEntry.data;
|
|
7196
|
-
if (isStoreRecordError(denormalizedRecord)) {
|
|
7197
|
-
return undefined;
|
|
7198
|
-
}
|
|
7199
|
-
return denormalizedRecord;
|
|
7200
|
-
});
|
|
7201
|
-
}
|
|
7202
|
-
function isStoreRecordError(storeRecord) {
|
|
7203
|
-
return storeRecord.__type === 'error';
|
|
7204
|
-
}
|
|
7205
|
-
function isDraftFieldPending(field) {
|
|
7206
|
-
return !!(field.__state && field.__state.pending === true);
|
|
7207
|
-
}
|
|
7208
|
-
function isDraftFieldMissing(field) {
|
|
7209
|
-
return !!(field.__state && field.__state.isMissing === true);
|
|
7210
|
-
}
|
|
7211
|
-
|
|
7212
7216
|
/**
|
|
7213
7217
|
* Checks if a resource request is a GET method on the record endpoint
|
|
7214
7218
|
* @param request the resource request
|
|
@@ -7285,7 +7289,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableStore }) {
|
|
|
7285
7289
|
}));
|
|
7286
7290
|
}
|
|
7287
7291
|
return Promise.reject(createBadRequestResponse({
|
|
7288
|
-
message: '
|
|
7292
|
+
message: 'Cannot fetch draft-created record from network',
|
|
7289
7293
|
}));
|
|
7290
7294
|
}
|
|
7291
7295
|
// a canonical mapping exists for the draft id passed in, we can create a new resource
|
|
@@ -7792,14 +7796,22 @@ function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fie
|
|
|
7792
7796
|
if (fieldInfo !== undefined) {
|
|
7793
7797
|
const { dataType } = fieldInfo;
|
|
7794
7798
|
recordFields[fieldName].displayValue = formatDisplayValue(draftField, dataType);
|
|
7799
|
+
// for a DateTime field, we are going to convert the string to an ISOString value.
|
|
7795
7800
|
if (dataType === 'DateTime' &&
|
|
7796
7801
|
draftField !== null &&
|
|
7797
7802
|
typeof draftField === 'string') {
|
|
7798
|
-
|
|
7799
|
-
|
|
7803
|
+
// if it is empty string, then convert it to null.
|
|
7804
|
+
if (draftField === '') {
|
|
7805
|
+
recordFields[fieldName].value = null;
|
|
7800
7806
|
}
|
|
7801
|
-
|
|
7802
|
-
|
|
7807
|
+
else {
|
|
7808
|
+
// attempt to convert it to ISO string value
|
|
7809
|
+
try {
|
|
7810
|
+
recordFields[fieldName].value = new Date(draftField).toISOString();
|
|
7811
|
+
}
|
|
7812
|
+
catch (e) {
|
|
7813
|
+
throw Error('date field value not valid');
|
|
7814
|
+
}
|
|
7803
7815
|
}
|
|
7804
7816
|
}
|
|
7805
7817
|
}
|
|
@@ -8246,7 +8258,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
8246
8258
|
if (recordWithDrafts === undefined) {
|
|
8247
8259
|
return undefined;
|
|
8248
8260
|
}
|
|
8249
|
-
return
|
|
8261
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
8250
8262
|
}
|
|
8251
8263
|
const record = await getDenormalizedRecord(key, this.durableStore);
|
|
8252
8264
|
if (record === undefined) {
|
|
@@ -8257,7 +8269,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
8257
8269
|
if (recordWithDrafts === undefined) {
|
|
8258
8270
|
return recordWithDrafts;
|
|
8259
8271
|
}
|
|
8260
|
-
return
|
|
8272
|
+
return filterOutReferenceNonScalarFields(recordWithDrafts);
|
|
8261
8273
|
}
|
|
8262
8274
|
applyDraftsToIncomingData(key, data, draftMetadata, publishData) {
|
|
8263
8275
|
if (draftMetadata === undefined) {
|
|
@@ -9153,9 +9165,9 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
9153
9165
|
return undefined;
|
|
9154
9166
|
}
|
|
9155
9167
|
// finally we resolve all references for each record
|
|
9156
|
-
const contentDocResolved = await
|
|
9157
|
-
const contentDocLinkResolved = await
|
|
9158
|
-
const contentVersionResolved = await
|
|
9168
|
+
const contentDocResolved = await filterOutReferenceNonScalarFields(contentDocRecord);
|
|
9169
|
+
const contentDocLinkResolved = await filterOutReferenceNonScalarFields(contentDocLink);
|
|
9170
|
+
const contentVersionResolved = await filterOutReferenceNonScalarFields(contentVersion);
|
|
9159
9171
|
return {
|
|
9160
9172
|
contentDocument: contentDocResolved,
|
|
9161
9173
|
contentDocumentLinks: [contentDocLinkResolved],
|
|
@@ -19176,4 +19188,4 @@ register({
|
|
|
19176
19188
|
});
|
|
19177
19189
|
|
|
19178
19190
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
19179
|
-
// version: 1.
|
|
19191
|
+
// version: 1.310.0-6f61f12f95
|