@salesforce/lds-adapters-uiapi 1.296.1 → 1.298.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/es/es2018/types/src/generated/graphql/types/Analytics__Analytics.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/graphql/types/Analytics__AnalyticsBrowse.d.ts +36 -0
- package/dist/es/es2018/types/src/generated/graphql/types/Analytics__AnalyticsEdge.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/graphql/types/Analytics__AnalyticsRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/graphql/types/Analytics__SortEnumType.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/graphql/types/Query.d.ts +3 -1
- package/dist/es/es2018/types/src/util/layouts.d.ts +5 -1
- package/dist/es/es2018/uiapi-records-service.js +5236 -4427
- package/package.json +12 -12
- package/sfdc/graphqlAdapters.js +3830 -3046
- package/sfdc/index.js +37 -12
- package/src/raml/uiapi.graphql +27 -1
package/sfdc/index.js
CHANGED
|
@@ -12421,6 +12421,7 @@ function getNameField(objectInfo, fieldApiName) {
|
|
|
12421
12421
|
}
|
|
12422
12422
|
function getQualifiedFieldApiNamesFromLayout(layout, objectInfo) {
|
|
12423
12423
|
const qualifiedFieldNames = [];
|
|
12424
|
+
const qualifiedOptionalFieldNames = [];
|
|
12424
12425
|
for (let a = 0, alen = layout.sections.length; a < alen; a++) {
|
|
12425
12426
|
const section = layout.sections[a];
|
|
12426
12427
|
for (let b = 0, blen = section.layoutRows.length; b < blen; b++) {
|
|
@@ -12436,7 +12437,8 @@ function getQualifiedFieldApiNamesFromLayout(layout, objectInfo) {
|
|
|
12436
12437
|
// By default, include the "Id" field on spanning records that are on the layout.
|
|
12437
12438
|
qualifiedFieldNames.push(`${objectInfo.apiName}.${relationshipFieldApiName}.${FIELD_ID}`);
|
|
12438
12439
|
const nameField = getNameField(objectInfo, apiName);
|
|
12439
|
-
|
|
12440
|
+
// W-15692973: Name field of referenced entites are moved to optionalFields since the Name field may not exist for few entites.
|
|
12441
|
+
qualifiedOptionalFieldNames.push(`${objectInfo.apiName}.${relationshipFieldApiName}.${nameField}`);
|
|
12440
12442
|
}
|
|
12441
12443
|
qualifiedFieldNames.push(`${objectInfo.apiName}.${component.apiName}`);
|
|
12442
12444
|
}
|
|
@@ -12444,7 +12446,10 @@ function getQualifiedFieldApiNamesFromLayout(layout, objectInfo) {
|
|
|
12444
12446
|
}
|
|
12445
12447
|
}
|
|
12446
12448
|
}
|
|
12447
|
-
return
|
|
12449
|
+
return {
|
|
12450
|
+
fields: qualifiedFieldNames,
|
|
12451
|
+
optionalFields: qualifiedOptionalFieldNames,
|
|
12452
|
+
};
|
|
12448
12453
|
}
|
|
12449
12454
|
|
|
12450
12455
|
function getMissingRecordLookupFields(record, objectInfo) {
|
|
@@ -12865,11 +12870,13 @@ function refresh$1(luvio, config) {
|
|
|
12865
12870
|
throw new Error(`RecordUi adapter resolved with a ${snapshot.state} snapshot with undefined data`);
|
|
12866
12871
|
}
|
|
12867
12872
|
const { layoutMap, objectInfo } = getLayoutMapAndObjectInfo(recordId, data);
|
|
12868
|
-
|
|
12873
|
+
// W-15692973: Name field of referenced entites are moved to optionalFields since the Name field may not exist for few entites.
|
|
12874
|
+
const { fields, optionalFields: layoutOptionalFields } = getFieldsFromLayoutMap(layoutMap, objectInfo);
|
|
12875
|
+
const mergedOptionalFields = dedupe(optionalFields.concat(layoutOptionalFields));
|
|
12869
12876
|
return buildCachedSnapshot$9(luvio, {
|
|
12870
12877
|
recordId,
|
|
12871
12878
|
fields,
|
|
12872
|
-
optionalFields,
|
|
12879
|
+
optionalFields: mergedOptionalFields,
|
|
12873
12880
|
}, refresh);
|
|
12874
12881
|
});
|
|
12875
12882
|
}
|
|
@@ -12930,6 +12937,7 @@ const recordLayoutFragmentSelector = [
|
|
|
12930
12937
|
];
|
|
12931
12938
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
12932
12939
|
let fields = [];
|
|
12940
|
+
let optionalFields = [];
|
|
12933
12941
|
const layoutTypes = keys(layoutMap);
|
|
12934
12942
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
12935
12943
|
const layoutType = layoutTypes[i];
|
|
@@ -12937,11 +12945,15 @@ function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
|
12937
12945
|
const modes = keys(modesMap);
|
|
12938
12946
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
12939
12947
|
const mode = modes[m];
|
|
12940
|
-
const
|
|
12941
|
-
fields = fields.concat(
|
|
12948
|
+
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
12949
|
+
fields = fields.concat(modeFields);
|
|
12950
|
+
optionalFields = optionalFields.concat(modeOptionalFields);
|
|
12942
12951
|
}
|
|
12943
12952
|
}
|
|
12944
|
-
return
|
|
12953
|
+
return {
|
|
12954
|
+
fields: dedupe(fields).sort(),
|
|
12955
|
+
optionalFields: dedupe(optionalFields).sort(),
|
|
12956
|
+
};
|
|
12945
12957
|
}
|
|
12946
12958
|
/**
|
|
12947
12959
|
* W-14696113
|
|
@@ -12958,8 +12970,12 @@ function convertToImplicitFields(fields, optionalFields) {
|
|
|
12958
12970
|
return implicitFields;
|
|
12959
12971
|
}
|
|
12960
12972
|
function getRecordForLayoutableEntities(luvio, refresh, recordId, layoutMap, objectInfo, configOptionalFields) {
|
|
12961
|
-
|
|
12962
|
-
|
|
12973
|
+
// W-15692973: Name field of referenced entites are moved to optionalFields since the Name field may not exist for few entites.
|
|
12974
|
+
let { fields, optionalFields } = getFieldsFromLayoutMap(layoutMap, objectInfo);
|
|
12975
|
+
if (configOptionalFields && configOptionalFields.length > 0) {
|
|
12976
|
+
optionalFields = dedupe(optionalFields.concat(configOptionalFields));
|
|
12977
|
+
}
|
|
12978
|
+
const implicitFields = convertToImplicitFields(fields, optionalFields);
|
|
12963
12979
|
return getRecord$1(luvio, refresh, recordId, [], implicitFields);
|
|
12964
12980
|
}
|
|
12965
12981
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
@@ -13221,8 +13237,15 @@ function buildRecordLayoutSnapshot(recordLayout, luvio, config, recordLayoutSnap
|
|
|
13221
13237
|
return;
|
|
13222
13238
|
}
|
|
13223
13239
|
// transform the layouts & object info into a set of fields
|
|
13224
|
-
|
|
13225
|
-
|
|
13240
|
+
// // W-15692973: Name field of referenced entites are moved to optionalFields since the Name field may not exist for few entites.
|
|
13241
|
+
const { fields, optionalFields } = getFieldsFromLayoutMap(layoutMap, objectInfoSnapshot.data);
|
|
13242
|
+
let configWithModifiedOptionalFields = {
|
|
13243
|
+
...config,
|
|
13244
|
+
optionalFields: config.optionalFields
|
|
13245
|
+
? dedupe(config.optionalFields.concat(optionalFields)).sort()
|
|
13246
|
+
: optionalFields,
|
|
13247
|
+
};
|
|
13248
|
+
return getRecordRepSnapshot(luvio, configWithModifiedOptionalFields, recordLayoutSnapshot, objectInfoSnapshot, fields, isRecordLayoutStale, context, storeLookup);
|
|
13226
13249
|
};
|
|
13227
13250
|
}
|
|
13228
13251
|
function buildRecordSnapshot(luvio, config, recordLayoutSnapshot, objectInfoSnapshot, fields) {
|
|
@@ -13251,6 +13274,8 @@ function getRecordRepSnapshot(luvio, config, recordLayoutSnapshot, objectInfoSna
|
|
|
13251
13274
|
// allow buildNetworkSnapshot() to use GetRecordFields if we were just missing some fields in L1
|
|
13252
13275
|
else if (isUnfulfilledSnapshot(recordRepSnapshot)) {
|
|
13253
13276
|
context.fields = fields;
|
|
13277
|
+
// W-15692973: Update optionalFields of config as the optional fields may have Name fields of referenced entities
|
|
13278
|
+
context.config.optionalFields = optionalFields;
|
|
13254
13279
|
}
|
|
13255
13280
|
// return however much of the record we were able to find in L1; cache policy decides if we
|
|
13256
13281
|
// should consult L2 or go to network
|
|
@@ -37123,4 +37148,4 @@ withDefaultLuvio((luvio) => {
|
|
|
37123
37148
|
});
|
|
37124
37149
|
|
|
37125
37150
|
export { API_NAMESPACE, InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$I as ObjectInfoDirectoryEntryRepresentationType, RepresentationType$N as ObjectInfoRepresentationType, RECORD_FIELDS_KEY_JUNCTION, RECORD_ID_PREFIX, RECORD_REPRESENTATION_NAME, RECORD_VIEW_ENTITY_ID_PREFIX, RECORD_VIEW_ENTITY_REPRESENTATION_NAME, RepresentationType$U as RecordRepresentationRepresentationType, TTL$y as RecordRepresentationTTL, RepresentationType$U as RecordRepresentationType, VERSION$1a as RecordRepresentationVersion, keyPrefix as UiApiNamespace, buildRecordRepKeyFromId, getFieldApiNamesArray as coerceFieldIdArray, getObjectApiName$1 as coerceObjectId, getObjectApiNamesArray as coerceObjectIdArray, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createLDSAdapterWithPrediction, createListInfo, createRecord, createRelatedListAdapterWithPrediction, deleteListInfo, deleteRecord, executeBatchRecordOperations, extractRecordIdFromStoreKey, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getFlexipageFormulaOverrides, getFlexipageFormulaOverrides_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListInfosByObjectName, getListInfosByObjectName_imperative, getListObjectInfo, getListObjectInfo_imperative, getListPreferences, getListPreferences_imperative, getListRecordsByName, getListRecordsByName_imperative, getListUi, getListUi_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfoDirectoryAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPathLayout, getPathLayout_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActionsAdapterFactory, getRecordActions_imperative, factory$f as getRecordAdapterFactory, getRecordAvatars, getRecordAvatarsAdapterFactory, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecordsAdapterFactory, getRecords_imperative, getRelatedListActions, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoBatch, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatch, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActionsAdapterFactory, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$W as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$G as ingestObjectInfo, ingest$A as ingestQuickActionExecutionRepresentation, ingest$N as ingestRecord, instrument, isStoreKeyRecordViewEntity, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$C as keyBuilderFromTypeRecordRepresentation, keyBuilder$1V as keyBuilderObjectInfo, keyBuilder$1O as keyBuilderQuickActionExecutionRepresentation, keyBuilder$26 as keyBuilderRecord, notifyAllListInfoSummaryUpdateAvailable, notifyAllListRecordUpdateAvailable, notifyListInfoSummaryUpdateAvailable, notifyListInfoUpdateAvailable, notifyListRecordCollectionUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, registerPrefetcher, updateLayoutUserState, updateListInfoByName, updateListPreferences, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
37126
|
-
// version: 1.
|
|
37151
|
+
// version: 1.298.0-6f15dc1ec
|
package/src/raml/uiapi.graphql
CHANGED
|
@@ -1521,17 +1521,20 @@ type RecordQuery {
|
|
|
1521
1521
|
|
|
1522
1522
|
# add browse family schema
|
|
1523
1523
|
type Analytics__Analytics {
|
|
1524
|
-
browse(orderBy: Analytics__AnalyticsOrderBy): Analytics__AnalyticsBrowse!
|
|
1524
|
+
browse(orderBy: Analytics__AnalyticsOrderBy, where: Analytics__AnalyticsFilter, assetTypes: Analytics__AnalyticsAssetTypeSelection, first: Int, after: String): Analytics__AnalyticsBrowse!
|
|
1525
1525
|
# Add other fields here if needed
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
1528
1528
|
type Analytics__AnalyticsBrowse {
|
|
1529
1529
|
edges: [Analytics__AnalyticsEdge]
|
|
1530
1530
|
totalCount: Int!
|
|
1531
|
+
pageResultCount: Int!
|
|
1532
|
+
pageInfo: PageInfo!
|
|
1531
1533
|
}
|
|
1532
1534
|
|
|
1533
1535
|
type Analytics__AnalyticsEdge {
|
|
1534
1536
|
node: Analytics__AnalyticsRepresentation
|
|
1537
|
+
cursor: String!
|
|
1535
1538
|
}
|
|
1536
1539
|
|
|
1537
1540
|
type Analytics__AnalyticsRepresentation {
|
|
@@ -1567,6 +1570,29 @@ enum Analytics__SortEnumType {
|
|
|
1567
1570
|
DESC
|
|
1568
1571
|
}
|
|
1569
1572
|
|
|
1573
|
+
input Analytics__AnalyticsFilter {
|
|
1574
|
+
Id: Setup__IdOperators
|
|
1575
|
+
MasterLabel: StringOperators
|
|
1576
|
+
CreatedById: Setup__IdOperators
|
|
1577
|
+
LastModifiedById: Setup__IdOperators
|
|
1578
|
+
LastModifiedDate: DateTimeOperators
|
|
1579
|
+
and: [Analytics__AnalyticsFilter]
|
|
1580
|
+
or: [Analytics__AnalyticsFilter]
|
|
1581
|
+
not: Analytics__AnalyticsFilter
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
# This enum type is defined dynamically on GraphQL schema
|
|
1585
|
+
# Includes all possible value here
|
|
1586
|
+
enum Analytics__AnalyticsAssetTypeSelection {
|
|
1587
|
+
TableauWorkbook
|
|
1588
|
+
AnalyticsDashboard
|
|
1589
|
+
AnalyticsVisualization
|
|
1590
|
+
Workspace
|
|
1591
|
+
ScopedMetric
|
|
1592
|
+
SemanticDataModel
|
|
1593
|
+
DMO
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1570
1596
|
directive @generic on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT
|
|
1571
1597
|
directive @fieldCategory on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
|
|
1572
1598
|
directive @category(name: String!) on FIELD
|