@salesforce/lwc-adapters-uiapi 1.315.0 → 1.316.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 +39 -5
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -7767,6 +7767,13 @@ function difference(source, compare) {
|
|
|
7767
7767
|
}
|
|
7768
7768
|
return strings;
|
|
7769
7769
|
}
|
|
7770
|
+
/**
|
|
7771
|
+
* @param word The string to title case
|
|
7772
|
+
* @returns The sames string but in title case
|
|
7773
|
+
*/
|
|
7774
|
+
function toTitleCase(word) {
|
|
7775
|
+
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
7776
|
+
}
|
|
7770
7777
|
|
|
7771
7778
|
function isObjectId(unknown) {
|
|
7772
7779
|
if (typeof unknown !== 'object' || unknown === null) {
|
|
@@ -9242,6 +9249,17 @@ function getRecordId18(value) {
|
|
|
9242
9249
|
return undefined;
|
|
9243
9250
|
}
|
|
9244
9251
|
|
|
9252
|
+
// Copy of SortedStringArray but calls toTitleCase
|
|
9253
|
+
function toSortedStringArrayTitleCase(value) {
|
|
9254
|
+
const valueArray = isArray(value) ? value : [value];
|
|
9255
|
+
if (valueArray.length !== 0 && isArrayOfNonEmptyStrings(valueArray)) {
|
|
9256
|
+
return dedupe(valueArray)
|
|
9257
|
+
.sort()
|
|
9258
|
+
.map((value) => toTitleCase(value));
|
|
9259
|
+
}
|
|
9260
|
+
return undefined;
|
|
9261
|
+
}
|
|
9262
|
+
|
|
9245
9263
|
function toSortedStringArray(value) {
|
|
9246
9264
|
const valueArray = isArray(value) ? value : [value];
|
|
9247
9265
|
if (valueArray.length !== 0 && isArrayOfNonEmptyStrings(valueArray)) {
|
|
@@ -13189,7 +13207,7 @@ const getRecord_ConfigPropertyMetadata = [
|
|
|
13189
13207
|
generateParamConfigMetadata('childRelationships', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
13190
13208
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
13191
13209
|
generateParamConfigMetadata('forms', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
13192
|
-
generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true,
|
|
13210
|
+
generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArrayTitleCase),
|
|
13193
13211
|
generateParamConfigMetadata('modes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray),
|
|
13194
13212
|
generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
13195
13213
|
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -19755,7 +19773,7 @@ const getRecordUi_ConfigPropertyMetadata = [
|
|
|
19755
19773
|
generateParamConfigMetadata('recordIds', true, 0 /* UrlParameter */, 0 /* String */, true, getRecordId18Array),
|
|
19756
19774
|
generateParamConfigMetadata('childRelationships', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
19757
19775
|
generateParamConfigMetadata('formFactor', false, 1 /* QueryParameter */, 0 /* String */),
|
|
19758
|
-
generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true,
|
|
19776
|
+
generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArrayTitleCase),
|
|
19759
19777
|
generateParamConfigMetadata('modes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray),
|
|
19760
19778
|
generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
19761
19779
|
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -62078,7 +62096,8 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
62078
62096
|
}
|
|
62079
62097
|
|
|
62080
62098
|
function keyBuilder$8(luvio, params) {
|
|
62081
|
-
|
|
62099
|
+
var _a, _b, _c, _d, _e;
|
|
62100
|
+
return keyPrefix + '::LookupValuesRepresentation:(' + 'dependentFieldBindings:' + params.queryParams.dependentFieldBindings + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'q:' + params.queryParams.q + ',' + 'searchType:' + params.queryParams.searchType + ',' + 'sourceRecordId:' + params.queryParams.sourceRecordId + ',' + 'targetApiName:' + params.queryParams.targetApiName + ',' + 'fieldApiName:' + params.urlParams.fieldApiName + ',' + 'objectApiName:' + params.urlParams.objectApiName + ',' + (((_a = params.body.sourceRecord) === null || _a === void 0 ? void 0 : _a.allowSaveOnDuplicate) === undefined ? 'sourceRecord.allowSaveOnDuplicate' : 'sourceRecord.allowSaveOnDuplicate:' + ((_b = params.body.sourceRecord) === null || _b === void 0 ? void 0 : _b.allowSaveOnDuplicate)) + '::' + (((_c = params.body.sourceRecord) === null || _c === void 0 ? void 0 : _c.apiName) === undefined ? 'sourceRecord.apiName' : 'sourceRecord.apiName:' + ((_d = params.body.sourceRecord) === null || _d === void 0 ? void 0 : _d.apiName)) + '::' + stableJSONStringify((_e = params.body.sourceRecord) === null || _e === void 0 ? void 0 : _e.fields) + '::' + (params.body.orderBy === undefined ? undefined : ('[' + params.body.orderBy.map(element => 'orderBy.fieldApiName:' + element.fieldApiName + '::' + 'orderBy.isAscending:' + element.isAscending).join(',') + ']')) + ')';
|
|
62082
62101
|
}
|
|
62083
62102
|
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
62084
62103
|
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
@@ -62108,6 +62127,7 @@ const getLookupRecords_ConfigPropertyMetadata = [
|
|
|
62108
62127
|
generateParamConfigMetadata('sourceRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
62109
62128
|
generateParamConfigMetadata('targetApiName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
62110
62129
|
generateParamConfigMetadata('sourceRecord', false, 2 /* Body */, 4 /* Unsupported */),
|
|
62130
|
+
generateParamConfigMetadata('orderBy', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
62111
62131
|
];
|
|
62112
62132
|
function typeCheckConfig$a(untrustedConfig) {
|
|
62113
62133
|
const config = {};
|
|
@@ -62117,8 +62137,17 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
62117
62137
|
if (referenceRecordInputRepresentationValidationError === null) {
|
|
62118
62138
|
config.sourceRecord = untrustedConfig_sourceRecord;
|
|
62119
62139
|
}
|
|
62120
|
-
|
|
62121
|
-
|
|
62140
|
+
const untrustedConfig_orderBy = untrustedConfig.orderBy;
|
|
62141
|
+
if (ArrayIsArray$1(untrustedConfig_orderBy)) {
|
|
62142
|
+
const untrustedConfig_orderBy_array = [];
|
|
62143
|
+
for (let i = 0, arrayLength = untrustedConfig_orderBy.length; i < arrayLength; i++) {
|
|
62144
|
+
const untrustedConfig_orderBy_item = untrustedConfig_orderBy[i];
|
|
62145
|
+
const referenceListOrderedByInfoInputRepresentationValidationError = validate$14(untrustedConfig_orderBy_item);
|
|
62146
|
+
if (referenceListOrderedByInfoInputRepresentationValidationError === null) {
|
|
62147
|
+
untrustedConfig_orderBy_array.push(untrustedConfig_orderBy_item);
|
|
62148
|
+
}
|
|
62149
|
+
}
|
|
62150
|
+
config.orderBy = untrustedConfig_orderBy_array;
|
|
62122
62151
|
}
|
|
62123
62152
|
return config;
|
|
62124
62153
|
}
|
|
@@ -62182,6 +62211,10 @@ function coerceRequestParams(untrusted) {
|
|
|
62182
62211
|
if (sourceRecord !== undefined) {
|
|
62183
62212
|
coercedConfig.sourceRecord = sourceRecord;
|
|
62184
62213
|
}
|
|
62214
|
+
const orderBy = requestParams.orderBy;
|
|
62215
|
+
if (orderBy !== undefined) {
|
|
62216
|
+
coercedConfig.orderBy = orderBy;
|
|
62217
|
+
}
|
|
62185
62218
|
return coercedConfig;
|
|
62186
62219
|
}
|
|
62187
62220
|
function coerceConfigWithDefaults$1(untrusted) {
|
|
@@ -62231,6 +62264,7 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
62231
62264
|
},
|
|
62232
62265
|
body: {
|
|
62233
62266
|
sourceRecord: config.sourceRecord,
|
|
62267
|
+
orderBy: config.orderBy,
|
|
62234
62268
|
},
|
|
62235
62269
|
};
|
|
62236
62270
|
const request = createResourceRequest$a(resourceParams);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.316.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "UIAPI adapters with LWC bindings",
|
|
6
6
|
"module": "dist/main.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rm -rf dist src/generated"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
34
|
+
"@salesforce/lds-adapters-uiapi": "^1.316.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@luvio/lwc-luvio": "0.156.4",
|
|
38
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
38
|
+
"@salesforce/lds-default-luvio": "^1.316.0"
|
|
39
39
|
}
|
|
40
40
|
}
|