@salesforce/lwc-adapters-uiapi 1.281.0 → 1.282.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 +75 -36
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -24,7 +24,9 @@ const WeakSetCtor = WeakSet;
|
|
|
24
24
|
const deeplyFrozen = new WeakSetCtor();
|
|
25
25
|
function deepFreeze(value) {
|
|
26
26
|
// No need to freeze primitives or already frozen stuff
|
|
27
|
-
if (typeof value !== 'object' ||
|
|
27
|
+
if (typeof value !== 'object' ||
|
|
28
|
+
value === null ||
|
|
29
|
+
deeplyFrozen.has(value)) {
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
32
|
deeplyFrozen.add(value);
|
|
@@ -570,7 +572,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
570
572
|
}
|
|
571
573
|
return resourceParams;
|
|
572
574
|
}
|
|
573
|
-
// engine version: 0.154.
|
|
575
|
+
// engine version: 0.154.15-db466bed
|
|
574
576
|
|
|
575
577
|
/**
|
|
576
578
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -13788,7 +13790,7 @@ function revertPaginationOptimization(variables) {
|
|
|
13788
13790
|
}
|
|
13789
13791
|
|
|
13790
13792
|
const TTL$C = 30000;
|
|
13791
|
-
const VERSION$2m = "
|
|
13793
|
+
const VERSION$2m = "e635ab62cb633d32aeeb183e568bb2c7";
|
|
13792
13794
|
function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
|
|
13793
13795
|
const v_error = (() => {
|
|
13794
13796
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -14078,7 +14080,7 @@ function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
|
|
|
14078
14080
|
}
|
|
14079
14081
|
const RepresentationType$Y = 'ListRecordCollectionRepresentation';
|
|
14080
14082
|
function keyBuilder$3k(luvio, config) {
|
|
14081
|
-
return keyPrefix + '::' + RepresentationType$Y + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.listViewId === null ? '' : config.listViewId) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
14083
|
+
return keyPrefix + '::' + RepresentationType$Y + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.listViewId === null ? '' : config.listViewId) + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
|
|
14082
14084
|
}
|
|
14083
14085
|
function keyBuilderFromType$B(luvio, object) {
|
|
14084
14086
|
const keyParams = {
|
|
@@ -14086,6 +14088,7 @@ function keyBuilderFromType$B(luvio, object) {
|
|
|
14086
14088
|
searchTerm: object.searchTerm,
|
|
14087
14089
|
sortBy: object.sortBy,
|
|
14088
14090
|
listViewId: object.listInfoETag,
|
|
14091
|
+
where: object.where,
|
|
14089
14092
|
listViewApiName: object.listReference.listViewApiName
|
|
14090
14093
|
};
|
|
14091
14094
|
return keyBuilder$3k(luvio, keyParams);
|
|
@@ -15568,6 +15571,7 @@ function listFields(luvio, { fields = [], optionalFields = [], sortBy, }, listIn
|
|
|
15568
15571
|
listViewId: listInfo.eTag,
|
|
15569
15572
|
sortBy: sortBy || null,
|
|
15570
15573
|
searchTerm: null,
|
|
15574
|
+
where: null,
|
|
15571
15575
|
objectApiName: listInfo.listReference.objectApiName,
|
|
15572
15576
|
listViewApiName: listInfo.listReference.listViewApiName,
|
|
15573
15577
|
}) + '__fieldstatus';
|
|
@@ -15619,17 +15623,18 @@ function keyBuilder$3c(luvio, params) {
|
|
|
15619
15623
|
const listReference = getListReference(query, context$1);
|
|
15620
15624
|
if (listReference !== undefined) {
|
|
15621
15625
|
// Check and use any default values returned from the server (i.e. sortBy)
|
|
15622
|
-
const config = { ...params.urlParams, ...params.
|
|
15626
|
+
const config = { ...params.urlParams, ...params.body };
|
|
15623
15627
|
const defaults = getServerDefaults(config, context$1);
|
|
15624
15628
|
// Use default values when sortBy is undefined or an empty Array []
|
|
15625
15629
|
return keyBuilder$3k(luvio, {
|
|
15626
15630
|
objectApiName: listReference.objectApiName,
|
|
15627
15631
|
listViewApiName: listReference.listViewApiName,
|
|
15628
15632
|
listViewId: listReference.id,
|
|
15629
|
-
searchTerm: params.
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
+
searchTerm: params.body.searchTerm || null,
|
|
15634
|
+
where: params.body.where || null,
|
|
15635
|
+
sortBy: params.body.sortBy !== undefined && params.body.sortBy.length <= 0
|
|
15636
|
+
? defaults.sortBy || params.body.sortBy || []
|
|
15637
|
+
: params.body.sortBy || defaults.sortBy || [],
|
|
15633
15638
|
});
|
|
15634
15639
|
}
|
|
15635
15640
|
// If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
|
|
@@ -15638,13 +15643,14 @@ function keyBuilder$3c(luvio, params) {
|
|
|
15638
15643
|
objectApiName: params.urlParams.objectApiName,
|
|
15639
15644
|
listViewApiName: params.urlParams.listViewApiName,
|
|
15640
15645
|
listViewId: '',
|
|
15641
|
-
searchTerm: params.
|
|
15642
|
-
|
|
15646
|
+
searchTerm: params.body.searchTerm || null,
|
|
15647
|
+
where: params.body.where || null,
|
|
15648
|
+
sortBy: params.body.sortBy || [],
|
|
15643
15649
|
});
|
|
15644
15650
|
}
|
|
15645
15651
|
|
|
15646
15652
|
function select$2X(luvio, params) {
|
|
15647
|
-
const { fields = [], optionalFields = [] } = params.
|
|
15653
|
+
const { fields = [], optionalFields = [] } = params.body;
|
|
15648
15654
|
return dynamicSelect$7({
|
|
15649
15655
|
records: {
|
|
15650
15656
|
name: 'records',
|
|
@@ -15662,7 +15668,7 @@ function ingestSuccess$T(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
15662
15668
|
const { body } = response;
|
|
15663
15669
|
const key = keyBuilder$3c(luvio, resourceParams);
|
|
15664
15670
|
luvio.storeIngest(key, ingest$1_, body);
|
|
15665
|
-
const optionalFields = resourceParams.
|
|
15671
|
+
const optionalFields = resourceParams.body.optionalFields;
|
|
15666
15672
|
if (optionalFields && optionalFields.length > 0) {
|
|
15667
15673
|
const normalized = body;
|
|
15668
15674
|
markMissingOptionalFieldsOnRecords$1(luvio, normalized, optionalFields);
|
|
@@ -15687,10 +15693,10 @@ function markMissingOptionalFieldsOnRecords$1(luvio, nomalized, optionalFields)
|
|
|
15687
15693
|
}
|
|
15688
15694
|
|
|
15689
15695
|
function createPaginationParams$4(params) {
|
|
15690
|
-
const {
|
|
15696
|
+
const { body } = params;
|
|
15691
15697
|
return {
|
|
15692
|
-
token:
|
|
15693
|
-
pageSize:
|
|
15698
|
+
token: body.pageToken,
|
|
15699
|
+
pageSize: body.pageSize === undefined ? 50 : body.pageSize
|
|
15694
15700
|
};
|
|
15695
15701
|
}
|
|
15696
15702
|
function getResponseCacheKeys$12(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -15713,10 +15719,10 @@ function createResourceRequest$19(config) {
|
|
|
15713
15719
|
return {
|
|
15714
15720
|
baseUri: '/services/data/v61.0',
|
|
15715
15721
|
basePath: '/ui-api/list-records/' + config.urlParams.objectApiName + '/' + config.urlParams.listViewApiName + '',
|
|
15716
|
-
method: '
|
|
15717
|
-
body:
|
|
15722
|
+
method: 'post',
|
|
15723
|
+
body: config.body,
|
|
15718
15724
|
urlParams: config.urlParams,
|
|
15719
|
-
queryParams:
|
|
15725
|
+
queryParams: {},
|
|
15720
15726
|
headers,
|
|
15721
15727
|
priority: 'normal',
|
|
15722
15728
|
};
|
|
@@ -16836,6 +16842,7 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
|
|
|
16836
16842
|
const paginationKey = paginationKeyBuilder(luvio, {
|
|
16837
16843
|
listViewId: listInfo.eTag,
|
|
16838
16844
|
searchTerm: null,
|
|
16845
|
+
where: null,
|
|
16839
16846
|
sortBy: config.sortBy === undefined ? null : config.sortBy,
|
|
16840
16847
|
objectApiName: listInfo.listReference.objectApiName,
|
|
16841
16848
|
listViewApiName: listInfo.listReference.listViewApiName,
|
|
@@ -16883,6 +16890,7 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
|
|
|
16883
16890
|
luvio.storeIngest(keyBuilder$3k(luvio, {
|
|
16884
16891
|
listViewId: listInfoETag,
|
|
16885
16892
|
searchTerm: null,
|
|
16893
|
+
where: null,
|
|
16886
16894
|
sortBy: body.sortBy,
|
|
16887
16895
|
objectApiName: listInfo.listReference.objectApiName,
|
|
16888
16896
|
listViewApiName: listInfo.listReference.listViewApiName,
|
|
@@ -17178,6 +17186,13 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
|
|
|
17178
17186
|
pageToken,
|
|
17179
17187
|
sortBy,
|
|
17180
17188
|
};
|
|
17189
|
+
const body = {
|
|
17190
|
+
fields,
|
|
17191
|
+
optionalFields,
|
|
17192
|
+
pageSize,
|
|
17193
|
+
pageToken,
|
|
17194
|
+
sortBy,
|
|
17195
|
+
};
|
|
17181
17196
|
let request;
|
|
17182
17197
|
if (isGetListUiByApiNameConfig(config)) {
|
|
17183
17198
|
request = createResourceRequest$19({
|
|
@@ -17185,7 +17200,7 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
|
|
|
17185
17200
|
listViewApiName: config.listViewApiName,
|
|
17186
17201
|
objectApiName: config.objectApiName,
|
|
17187
17202
|
},
|
|
17188
|
-
|
|
17203
|
+
body,
|
|
17189
17204
|
});
|
|
17190
17205
|
}
|
|
17191
17206
|
else if (isGetListUiByListViewIdConfig(config)) {
|
|
@@ -17210,6 +17225,7 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
|
|
|
17210
17225
|
const paginationKey = paginationKeyBuilder(luvio, {
|
|
17211
17226
|
listViewId: listInfo.eTag,
|
|
17212
17227
|
searchTerm: null,
|
|
17228
|
+
where: null,
|
|
17213
17229
|
sortBy: getSortBy(config, context),
|
|
17214
17230
|
objectApiName: listInfo.listReference.objectApiName,
|
|
17215
17231
|
listViewApiName: listInfo.listReference.listViewApiName,
|
|
@@ -17260,6 +17276,7 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
|
|
|
17260
17276
|
luvio.storeIngest(keyBuilder$3k(luvio, {
|
|
17261
17277
|
listViewId: listInfoETag,
|
|
17262
17278
|
searchTerm: null,
|
|
17279
|
+
where: null,
|
|
17263
17280
|
sortBy: body.sortBy,
|
|
17264
17281
|
objectApiName: listInfo.listReference.objectApiName,
|
|
17265
17282
|
listViewApiName: listInfo.listReference.listViewApiName,
|
|
@@ -24665,7 +24682,7 @@ function getTypeCacheKeys$1J(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
24665
24682
|
}
|
|
24666
24683
|
|
|
24667
24684
|
const TTL$s = 300000;
|
|
24668
|
-
const VERSION$20 = "
|
|
24685
|
+
const VERSION$20 = "b33c534240965bedfcf073228d48b940";
|
|
24669
24686
|
function validate$1j(obj, path = 'AppRepresentation') {
|
|
24670
24687
|
const v_error = (() => {
|
|
24671
24688
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -24747,8 +24764,29 @@ function validate$1j(obj, path = 'AppRepresentation') {
|
|
|
24747
24764
|
}
|
|
24748
24765
|
const obj_headerColor = obj.headerColor;
|
|
24749
24766
|
const path_headerColor = path + '.headerColor';
|
|
24750
|
-
|
|
24751
|
-
|
|
24767
|
+
let obj_headerColor_union0 = null;
|
|
24768
|
+
const obj_headerColor_union0_error = (() => {
|
|
24769
|
+
if (typeof obj_headerColor !== 'string') {
|
|
24770
|
+
return new TypeError('Expected "string" but received "' + typeof obj_headerColor + '" (at "' + path_headerColor + '")');
|
|
24771
|
+
}
|
|
24772
|
+
})();
|
|
24773
|
+
if (obj_headerColor_union0_error != null) {
|
|
24774
|
+
obj_headerColor_union0 = obj_headerColor_union0_error.message;
|
|
24775
|
+
}
|
|
24776
|
+
let obj_headerColor_union1 = null;
|
|
24777
|
+
const obj_headerColor_union1_error = (() => {
|
|
24778
|
+
if (obj_headerColor !== null) {
|
|
24779
|
+
return new TypeError('Expected "null" but received "' + typeof obj_headerColor + '" (at "' + path_headerColor + '")');
|
|
24780
|
+
}
|
|
24781
|
+
})();
|
|
24782
|
+
if (obj_headerColor_union1_error != null) {
|
|
24783
|
+
obj_headerColor_union1 = obj_headerColor_union1_error.message;
|
|
24784
|
+
}
|
|
24785
|
+
if (obj_headerColor_union0 && obj_headerColor_union1) {
|
|
24786
|
+
let message = 'Object doesn\'t match union (at "' + path_headerColor + '")';
|
|
24787
|
+
message += '\n' + obj_headerColor_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
24788
|
+
message += '\n' + obj_headerColor_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
24789
|
+
return new TypeError(message);
|
|
24752
24790
|
}
|
|
24753
24791
|
const obj_iconUrl = obj.iconUrl;
|
|
24754
24792
|
const path_iconUrl = path + '.iconUrl';
|
|
@@ -25029,11 +25067,6 @@ function equals$I(existing, incoming) {
|
|
|
25029
25067
|
if (!(existing_eTag === incoming_eTag)) {
|
|
25030
25068
|
return false;
|
|
25031
25069
|
}
|
|
25032
|
-
const existing_headerColor = existing.headerColor;
|
|
25033
|
-
const incoming_headerColor = incoming.headerColor;
|
|
25034
|
-
if (!(existing_headerColor === incoming_headerColor)) {
|
|
25035
|
-
return false;
|
|
25036
|
-
}
|
|
25037
25070
|
const existing_label = existing.label;
|
|
25038
25071
|
const incoming_label = incoming.label;
|
|
25039
25072
|
if (!(existing_label === incoming_label)) {
|
|
@@ -25074,6 +25107,11 @@ function equals$I(existing, incoming) {
|
|
|
25074
25107
|
if (equals_formFactors_items === false) {
|
|
25075
25108
|
return false;
|
|
25076
25109
|
}
|
|
25110
|
+
const existing_headerColor = existing.headerColor;
|
|
25111
|
+
const incoming_headerColor = incoming.headerColor;
|
|
25112
|
+
if (!(existing_headerColor === incoming_headerColor)) {
|
|
25113
|
+
return false;
|
|
25114
|
+
}
|
|
25077
25115
|
const existing_iconUrl = existing.iconUrl;
|
|
25078
25116
|
const incoming_iconUrl = incoming.iconUrl;
|
|
25079
25117
|
if (!(existing_iconUrl === incoming_iconUrl)) {
|
|
@@ -36053,7 +36091,7 @@ function createPaginationParams(params) {
|
|
|
36053
36091
|
function keyBuilder$1D(luvio, params) {
|
|
36054
36092
|
return keyBuilder$1E(luvio, {
|
|
36055
36093
|
sortBy: params.body.sortBy || [],
|
|
36056
|
-
where: params.body.where ||
|
|
36094
|
+
where: params.body.where || null,
|
|
36057
36095
|
parentRecordId: params.urlParams.parentRecordId,
|
|
36058
36096
|
relatedListId: params.urlParams.relatedListId
|
|
36059
36097
|
});
|
|
@@ -57843,12 +57881,13 @@ const adapterName$6 = 'getListRecordsByName';
|
|
|
57843
57881
|
const getListRecordsByName_ConfigPropertyMetadata = [
|
|
57844
57882
|
generateParamConfigMetadata('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
57845
57883
|
generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
57846
|
-
generateParamConfigMetadata('fields', false,
|
|
57847
|
-
generateParamConfigMetadata('optionalFields', false,
|
|
57848
|
-
generateParamConfigMetadata('pageSize', false,
|
|
57849
|
-
generateParamConfigMetadata('pageToken', false,
|
|
57850
|
-
generateParamConfigMetadata('searchTerm', false,
|
|
57851
|
-
generateParamConfigMetadata('sortBy', false,
|
|
57884
|
+
generateParamConfigMetadata('fields', false, 2 /* Body */, 0 /* String */, true),
|
|
57885
|
+
generateParamConfigMetadata('optionalFields', false, 2 /* Body */, 0 /* String */, true),
|
|
57886
|
+
generateParamConfigMetadata('pageSize', false, 2 /* Body */, 3 /* Integer */),
|
|
57887
|
+
generateParamConfigMetadata('pageToken', false, 2 /* Body */, 0 /* String */),
|
|
57888
|
+
generateParamConfigMetadata('searchTerm', false, 2 /* Body */, 0 /* String */),
|
|
57889
|
+
generateParamConfigMetadata('sortBy', false, 2 /* Body */, 0 /* String */, true),
|
|
57890
|
+
generateParamConfigMetadata('where', false, 2 /* Body */, 0 /* String */),
|
|
57852
57891
|
];
|
|
57853
57892
|
const getListRecordsByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getListRecordsByName_ConfigPropertyMetadata);
|
|
57854
57893
|
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$k(getListRecordsByName_ConfigPropertyMetadata);
|
|
@@ -57968,7 +58007,7 @@ function getPaginationMetadata(luvio, resourceParams) {
|
|
|
57968
58007
|
return node.data.__metadata;
|
|
57969
58008
|
}
|
|
57970
58009
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
57971
|
-
return buildNetworkSnapshotCachePolicy$s(context, coercedAdapterRequestContext, buildNetworkSnapshot$9,
|
|
58010
|
+
return buildNetworkSnapshotCachePolicy$s(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, 'get', true);
|
|
57972
58011
|
}
|
|
57973
58012
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
57974
58013
|
const { luvio, config } = context;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lwc-adapters-uiapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.282.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.282.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@luvio/lwc-luvio": "0.154.
|
|
38
|
-
"@salesforce/lds-default-luvio": "^1.
|
|
37
|
+
"@luvio/lwc-luvio": "0.154.15",
|
|
38
|
+
"@salesforce/lds-default-luvio": "^1.282.0"
|
|
39
39
|
}
|
|
40
40
|
}
|