@salesforce/lds-adapters-uiapi 1.266.0-dev20 → 1.266.0-dev21
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/primitives/FieldId/coerce.d.ts +2 -1
- package/dist/es/es2018/types/src/primitives/FieldIdArray/coerce.d.ts +4 -1
- package/dist/es/es2018/uiapi-records-service.js +11 -5
- package/package.json +7 -7
- package/sfdc/graphqlAdapters.js +12 -6
- package/sfdc/index.js +12 -6
- package/sfdc/uiapi-static-functions.js +5 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the field API name, qualified with an object name if possible.
|
|
3
3
|
* @param value The value from which to get the qualified field API name.
|
|
4
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
4
5
|
* @return The qualified field API name.
|
|
5
6
|
*/
|
|
6
|
-
export default function getFieldApiName(value: unknown): string | undefined;
|
|
7
|
+
export default function getFieldApiName(value: unknown, onlyQualifiedFieldNames?: boolean): string | undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the field API name.
|
|
3
3
|
* @param value The value from which to get the field API name.
|
|
4
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
4
5
|
* @returns The field API name.
|
|
5
6
|
*/
|
|
6
|
-
export default function getFieldApiNamesArray(value: unknown
|
|
7
|
+
export default function getFieldApiNamesArray(value: unknown, options?: {
|
|
8
|
+
onlyQualifiedFieldNames: boolean;
|
|
9
|
+
}): Array<string> | undefined;
|
|
@@ -516,15 +516,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
516
516
|
/**
|
|
517
517
|
* Returns the field API name, qualified with an object name if possible.
|
|
518
518
|
* @param value The value from which to get the qualified field API name.
|
|
519
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
519
520
|
* @return The qualified field API name.
|
|
520
521
|
*/
|
|
521
|
-
function getFieldApiName(value) {
|
|
522
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
522
523
|
// Note: tightening validation logic changes behavior from userland getting
|
|
523
524
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
524
|
-
// change the behavior.
|
|
525
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
526
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
525
527
|
if (isString(value)) {
|
|
526
528
|
const trimmed = value.trim();
|
|
527
|
-
if (trimmed.length > 0) {
|
|
529
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
528
530
|
return trimmed;
|
|
529
531
|
}
|
|
530
532
|
}
|
|
@@ -537,15 +539,19 @@ function getFieldApiName(value) {
|
|
|
537
539
|
/**
|
|
538
540
|
* Returns the field API name.
|
|
539
541
|
* @param value The value from which to get the field API name.
|
|
542
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
540
543
|
* @returns The field API name.
|
|
541
544
|
*/
|
|
542
|
-
function getFieldApiNamesArray(value) {
|
|
545
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
543
546
|
const valueArray = isArray(value) ? value : [value];
|
|
544
547
|
const array = [];
|
|
545
548
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
546
549
|
const item = valueArray[i];
|
|
547
|
-
const apiName = getFieldApiName(item);
|
|
550
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
548
551
|
if (apiName === undefined) {
|
|
552
|
+
if (options.onlyQualifiedFieldNames) {
|
|
553
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
554
|
+
}
|
|
549
555
|
return undefined;
|
|
550
556
|
}
|
|
551
557
|
push.call(array, apiName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-uiapi",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev21",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Wire adapters for record related UI API endpoints",
|
|
6
6
|
"main": "dist/es/es2018/uiapi-records-service.js",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@salesforce/lds-bindings": "^1.266.0-
|
|
72
|
-
"@salesforce/lds-default-luvio": "^1.266.0-
|
|
71
|
+
"@salesforce/lds-bindings": "^1.266.0-dev21",
|
|
72
|
+
"@salesforce/lds-default-luvio": "^1.266.0-dev21"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@databases/sqlite": "^3.0.0",
|
|
76
|
-
"@salesforce/lds-compiler-plugins": "^1.266.0-
|
|
77
|
-
"@salesforce/lds-jest": "^1.266.0-
|
|
78
|
-
"@salesforce/lds-store-binary": "^1.266.0-
|
|
76
|
+
"@salesforce/lds-compiler-plugins": "^1.266.0-dev21",
|
|
77
|
+
"@salesforce/lds-jest": "^1.266.0-dev21",
|
|
78
|
+
"@salesforce/lds-store-binary": "^1.266.0-dev21"
|
|
79
79
|
},
|
|
80
80
|
"luvioBundlesize": [
|
|
81
81
|
{
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"maxSize": {
|
|
84
84
|
"none": "1.60 MB",
|
|
85
85
|
"min": "800 kB",
|
|
86
|
-
"compressed": "
|
|
86
|
+
"compressed": "111 kB"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
{
|
package/sfdc/graphqlAdapters.js
CHANGED
|
@@ -17677,15 +17677,17 @@ function isFieldId(unknown) {
|
|
|
17677
17677
|
/**
|
|
17678
17678
|
* Returns the field API name, qualified with an object name if possible.
|
|
17679
17679
|
* @param value The value from which to get the qualified field API name.
|
|
17680
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
17680
17681
|
* @return The qualified field API name.
|
|
17681
17682
|
*/
|
|
17682
|
-
function getFieldApiName(value) {
|
|
17683
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
17683
17684
|
// Note: tightening validation logic changes behavior from userland getting
|
|
17684
17685
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
17685
|
-
// change the behavior.
|
|
17686
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
17687
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
17686
17688
|
if (isString(value)) {
|
|
17687
17689
|
const trimmed = value.trim();
|
|
17688
|
-
if (trimmed.length > 0) {
|
|
17690
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
17689
17691
|
return trimmed;
|
|
17690
17692
|
}
|
|
17691
17693
|
}
|
|
@@ -17698,15 +17700,19 @@ function getFieldApiName(value) {
|
|
|
17698
17700
|
/**
|
|
17699
17701
|
* Returns the field API name.
|
|
17700
17702
|
* @param value The value from which to get the field API name.
|
|
17703
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
17701
17704
|
* @returns The field API name.
|
|
17702
17705
|
*/
|
|
17703
|
-
function getFieldApiNamesArray(value) {
|
|
17706
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
17704
17707
|
const valueArray = isArray(value) ? value : [value];
|
|
17705
17708
|
const array = [];
|
|
17706
17709
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
17707
17710
|
const item = valueArray[i];
|
|
17708
|
-
const apiName = getFieldApiName(item);
|
|
17711
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
17709
17712
|
if (apiName === undefined) {
|
|
17713
|
+
if (options.onlyQualifiedFieldNames) {
|
|
17714
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
17715
|
+
}
|
|
17710
17716
|
return undefined;
|
|
17711
17717
|
}
|
|
17712
17718
|
push.call(array, apiName);
|
|
@@ -18069,4 +18075,4 @@ register({
|
|
|
18069
18075
|
});
|
|
18070
18076
|
|
|
18071
18077
|
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
|
|
18072
|
-
// version: 1.266.0-
|
|
18078
|
+
// version: 1.266.0-dev21-7d5715511
|
package/sfdc/index.js
CHANGED
|
@@ -564,15 +564,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
564
564
|
/**
|
|
565
565
|
* Returns the field API name, qualified with an object name if possible.
|
|
566
566
|
* @param value The value from which to get the qualified field API name.
|
|
567
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
567
568
|
* @return The qualified field API name.
|
|
568
569
|
*/
|
|
569
|
-
function getFieldApiName(value) {
|
|
570
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
570
571
|
// Note: tightening validation logic changes behavior from userland getting
|
|
571
572
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
572
|
-
// change the behavior.
|
|
573
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
574
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
573
575
|
if (isString(value)) {
|
|
574
576
|
const trimmed = value.trim();
|
|
575
|
-
if (trimmed.length > 0) {
|
|
577
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
576
578
|
return trimmed;
|
|
577
579
|
}
|
|
578
580
|
}
|
|
@@ -585,15 +587,19 @@ function getFieldApiName(value) {
|
|
|
585
587
|
/**
|
|
586
588
|
* Returns the field API name.
|
|
587
589
|
* @param value The value from which to get the field API name.
|
|
590
|
+
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
588
591
|
* @returns The field API name.
|
|
589
592
|
*/
|
|
590
|
-
function getFieldApiNamesArray(value) {
|
|
593
|
+
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
591
594
|
const valueArray = isArray(value) ? value : [value];
|
|
592
595
|
const array = [];
|
|
593
596
|
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
594
597
|
const item = valueArray[i];
|
|
595
|
-
const apiName = getFieldApiName(item);
|
|
598
|
+
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
596
599
|
if (apiName === undefined) {
|
|
600
|
+
if (options.onlyQualifiedFieldNames) {
|
|
601
|
+
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
602
|
+
}
|
|
597
603
|
return undefined;
|
|
598
604
|
}
|
|
599
605
|
push.call(array, apiName);
|
|
@@ -35666,4 +35672,4 @@ withDefaultLuvio((luvio) => {
|
|
|
35666
35672
|
});
|
|
35667
35673
|
|
|
35668
35674
|
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$S as RecordRepresentationRepresentationType, TTL$y as RecordRepresentationTTL, RepresentationType$S as RecordRepresentationType, VERSION$18 as RecordRepresentationVersion, keyPrefix as UiApiNamespace, buildRecordRepKeyFromId, getFieldApiNamesArray as coerceFieldIdArray, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createLDSAdapterWithPrediction, createListInfo, createRecord, 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, 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, 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, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsBatch, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$U as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$G as ingestObjectInfo, ingest$A as ingestQuickActionExecutionRepresentation, ingest$L as ingestRecord, instrument, isStoreKeyRecordViewEntity, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$A as keyBuilderFromTypeRecordRepresentation, keyBuilder$1R as keyBuilderObjectInfo, keyBuilder$1K as keyBuilderQuickActionExecutionRepresentation, keyBuilder$20 as keyBuilderRecord, notifyListInfoUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, registerPrefetcher, updateLayoutUserState, updateListInfoByName, updateListPreferences, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
35669
|
-
// version: 1.266.0-
|
|
35675
|
+
// version: 1.266.0-dev21-7d5715511
|
|
@@ -131,15 +131,17 @@ function splitQualifiedFieldApiName(fieldApiName) {
|
|
|
131
131
|
/**
|
|
132
132
|
* Returns the field API name, qualified with an object name if possible.
|
|
133
133
|
* @param value The value from which to get the qualified field API name.
|
|
134
|
+
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
134
135
|
* @return The qualified field API name.
|
|
135
136
|
*/
|
|
136
|
-
function getFieldApiName(value) {
|
|
137
|
+
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
137
138
|
// Note: tightening validation logic changes behavior from userland getting
|
|
138
139
|
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
139
|
-
// change the behavior.
|
|
140
|
+
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
141
|
+
// optionally to avoid issues with persisted invalid field names.
|
|
140
142
|
if (isString(value)) {
|
|
141
143
|
const trimmed = value.trim();
|
|
142
|
-
if (trimmed.length > 0) {
|
|
144
|
+
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
143
145
|
return trimmed;
|
|
144
146
|
}
|
|
145
147
|
}
|