@salesforce/lwc-adapters-uiapi 1.287.0-dev7 → 1.287.0-dev9

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.
Files changed (2) hide show
  1. package/dist/main.js +62 -39
  2. package/package.json +3 -3
package/dist/main.js CHANGED
@@ -8780,6 +8780,17 @@ function getTypeCacheKeys$27(rootKeySet, luvio, input, fullPathFactory) {
8780
8780
  });
8781
8781
  }
8782
8782
 
8783
+ const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
8784
+ const keyParams = {
8785
+ listViewApiName: object.listReference.listViewApiName
8786
+ ? object.listReference.listViewApiName.toLowerCase()
8787
+ : object.listReference.listViewApiName,
8788
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
8789
+ type: object.listReference.type,
8790
+ };
8791
+ return keyBuilder$3o(luvio, keyParams);
8792
+ };
8793
+
8783
8794
  const TTL$G = 900000;
8784
8795
  const VERSION$2s = "c658fe1591386d570e214eaed0daadd1";
8785
8796
  function validate$1X(obj, path = 'ListInfoRepresentation') {
@@ -9008,14 +9019,6 @@ const RepresentationType$10 = 'ListInfoRepresentation';
9008
9019
  function keyBuilder$3o(luvio, config) {
9009
9020
  return keyPrefix + '::' + RepresentationType$10 + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
9010
9021
  }
9011
- function keyBuilderFromType$E(luvio, object) {
9012
- const keyParams = {
9013
- listViewApiName: object.listReference.listViewApiName,
9014
- objectApiName: object.listReference.objectApiName,
9015
- type: object.listReference.type
9016
- };
9017
- return keyBuilder$3o(luvio, keyParams);
9018
- }
9019
9022
  function normalize$U(input, existing, path, luvio, store, timestamp) {
9020
9023
  const input_displayColumns = input.displayColumns;
9021
9024
  const input_displayColumns_id = path.fullPath + '__displayColumns';
@@ -13832,6 +13835,19 @@ function revertPaginationOptimization(variables) {
13832
13835
  }
13833
13836
  }
13834
13837
 
13838
+ const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
13839
+ const keyParams = {
13840
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
13841
+ searchTerm: object.searchTerm,
13842
+ sortBy: object.sortBy,
13843
+ where: object.where,
13844
+ listViewApiName: object.listReference.listViewApiName
13845
+ ? object.listReference.listViewApiName.toLowerCase()
13846
+ : object.listReference.listViewApiName,
13847
+ };
13848
+ return keyBuilder$3k(luvio, keyParams);
13849
+ };
13850
+
13835
13851
  const TTL$D = 30000;
13836
13852
  const VERSION$2m = "e5c90c4081cd557f8ffec53028ede1e8";
13837
13853
  function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
@@ -14125,16 +14141,6 @@ const RepresentationType$Y = 'ListRecordCollectionRepresentation';
14125
14141
  function keyBuilder$3k(luvio, config) {
14126
14142
  return keyPrefix + '::' + RepresentationType$Y + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
14127
14143
  }
14128
- function keyBuilderFromType$B(luvio, object) {
14129
- const keyParams = {
14130
- objectApiName: object.listReference.objectApiName,
14131
- searchTerm: object.searchTerm,
14132
- sortBy: object.sortBy,
14133
- where: object.where,
14134
- listViewApiName: object.listReference.listViewApiName
14135
- };
14136
- return keyBuilder$3k(luvio, keyParams);
14137
- }
14138
14144
  function paginationKeyBuilder(luvio, config) {
14139
14145
  return keyBuilder$3k(luvio, config) + '__pagination';
14140
14146
  }
@@ -15426,7 +15432,7 @@ function buildListRefByIdContextKey(listViewId) {
15426
15432
  return `listReferenceById::${listViewId}`;
15427
15433
  }
15428
15434
  function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
15429
- return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
15435
+ return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
15430
15436
  }
15431
15437
  /**
15432
15438
  * Adds a list reference so it can be retrieved with #getListReference later.
@@ -15482,7 +15488,12 @@ const LIST_INFO_SELECTIONS_ETAG = [
15482
15488
  * @param luvio Luvio
15483
15489
  */
15484
15490
  function getListInfo(luvio, listRef, storeLookup) {
15485
- const key = keyBuilder$3o(luvio, { ...listRef });
15491
+ let mutatedListRef = { ...listRef };
15492
+ mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
15493
+ mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
15494
+ ? mutatedListRef.listViewApiName.toLowerCase()
15495
+ : mutatedListRef.listViewApiName;
15496
+ const key = keyBuilder$3o(luvio, { ...mutatedListRef });
15486
15497
  return storeLookup({
15487
15498
  recordId: key,
15488
15499
  node: {
@@ -15496,7 +15507,7 @@ function getListInfo(luvio, listRef, storeLookup) {
15496
15507
  }
15497
15508
  function buildDefaultsKey(listRef) {
15498
15509
  const { objectApiName, listViewApiName } = listRef;
15499
- return `defaults::${objectApiName}:${listViewApiName}`;
15510
+ return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
15500
15511
  }
15501
15512
  /**
15502
15513
  * Update the default values based on a server response.
@@ -15657,9 +15668,11 @@ function setContext$1(adapterContext) {
15657
15668
  context$1 = adapterContext;
15658
15669
  }
15659
15670
  function keyBuilder$3c(luvio, params) {
15671
+ // lists data can now be fetched using case insensitive urlParams therefore
15672
+ // also changing contextStore to use lowercase caching
15660
15673
  const query = {
15661
- objectApiName: params.urlParams.objectApiName,
15662
- listViewApiName: params.urlParams.listViewApiName,
15674
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
15675
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
15663
15676
  };
15664
15677
  // Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
15665
15678
  const listReference = getListReference(query, context$1);
@@ -15669,8 +15682,10 @@ function keyBuilder$3c(luvio, params) {
15669
15682
  const defaults = getServerDefaults(config, context$1);
15670
15683
  // Use default values when sortBy is undefined or an empty Array []
15671
15684
  return keyBuilder$3k(luvio, {
15672
- objectApiName: listReference.objectApiName,
15673
- listViewApiName: listReference.listViewApiName,
15685
+ objectApiName: listReference.objectApiName.toLowerCase(),
15686
+ listViewApiName: listReference.listViewApiName
15687
+ ? listReference.listViewApiName.toLowerCase()
15688
+ : listReference.listViewApiName,
15674
15689
  // # removing listViewId from key only supporing getting records using api name
15675
15690
  // listViewId: listReference.id,
15676
15691
  searchTerm: params.body.searchTerm || null,
@@ -15683,8 +15698,8 @@ function keyBuilder$3c(luvio, params) {
15683
15698
  // If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
15684
15699
  // Assuming that listViewId is empty and continue on
15685
15700
  return keyBuilder$3k(luvio, {
15686
- objectApiName: params.urlParams.objectApiName,
15687
- listViewApiName: params.urlParams.listViewApiName,
15701
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
15702
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
15688
15703
  // # removing listViewId from key only supporing getting records using api name
15689
15704
  // listViewId: '',
15690
15705
  searchTerm: params.body.searchTerm || null,
@@ -16888,8 +16903,10 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
16888
16903
  searchTerm: null,
16889
16904
  where: null,
16890
16905
  sortBy: config.sortBy === undefined ? null : config.sortBy,
16891
- objectApiName: listInfo.listReference.objectApiName,
16892
- listViewApiName: listInfo.listReference.listViewApiName,
16906
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
16907
+ listViewApiName: listInfo.listReference.listViewApiName
16908
+ ? listInfo.listReference.listViewApiName.toLowerCase()
16909
+ : listInfo.listReference.listViewApiName,
16893
16910
  });
16894
16911
  const selector = {
16895
16912
  recordId: paginationKey,
@@ -16936,8 +16953,10 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
16936
16953
  searchTerm: null,
16937
16954
  where: null,
16938
16955
  sortBy: body.sortBy,
16939
- objectApiName: listInfo.listReference.objectApiName,
16940
- listViewApiName: listInfo.listReference.listViewApiName,
16956
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
16957
+ listViewApiName: listInfo.listReference.listViewApiName
16958
+ ? listInfo.listReference.listViewApiName.toLowerCase()
16959
+ : listInfo.listReference.listViewApiName,
16941
16960
  }), ingest$1_, body);
16942
16961
  const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
16943
16962
  return luvio.storeBroadcast().then(() => snapshot);
@@ -16985,7 +17004,7 @@ function buildCachedListInfoSnapshot$1(context, storeLookup, luvio) {
16985
17004
  return getListInfo(luvio, {
16986
17005
  id: null,
16987
17006
  listViewApiName: null,
16988
- objectApiName: config.objectApiName,
17007
+ objectApiName: config.objectApiName.toLowerCase(),
16989
17008
  type: 'mru',
16990
17009
  }, storeLookup);
16991
17010
  }
@@ -17271,8 +17290,10 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
17271
17290
  searchTerm: null,
17272
17291
  where: null,
17273
17292
  sortBy: getSortBy(config, context),
17274
- objectApiName: listInfo.listReference.objectApiName,
17275
- listViewApiName: listInfo.listReference.listViewApiName,
17293
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
17294
+ listViewApiName: listInfo.listReference.listViewApiName
17295
+ ? listInfo.listReference.listViewApiName.toLowerCase()
17296
+ : listInfo.listReference.listViewApiName,
17276
17297
  });
17277
17298
  const selector = {
17278
17299
  recordId: paginationKey,
@@ -17322,8 +17343,10 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
17322
17343
  searchTerm: null,
17323
17344
  where: null,
17324
17345
  sortBy: body.sortBy,
17325
- objectApiName: listInfo.listReference.objectApiName,
17326
- listViewApiName: listInfo.listReference.listViewApiName,
17346
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
17347
+ listViewApiName: listInfo.listReference.listViewApiName
17348
+ ? listInfo.listReference.listViewApiName.toLowerCase()
17349
+ : listInfo.listReference.listViewApiName,
17327
17350
  }), ingest$1_, body);
17328
17351
  const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
17329
17352
  releaseKeys();
@@ -26579,9 +26602,9 @@ const getLayoutUserStateAdapterFactory = (luvio) => function UiApi__getLayoutUse
26579
26602
 
26580
26603
  function keyBuilder$2n(luvio, params) {
26581
26604
  return keyBuilder$3o(luvio, {
26582
- objectApiName: params.urlParams.objectApiName,
26583
- listViewApiName: params.urlParams.listViewApiName,
26584
- type: params.urlParams.listViewApiName === '__Recent' ? 'mru' : 'listView',
26605
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
26606
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
26607
+ type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
26585
26608
  });
26586
26609
  }
26587
26610
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lwc-adapters-uiapi",
3
- "version": "1.287.0-dev7",
3
+ "version": "1.287.0-dev9",
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.287.0-dev7"
34
+ "@salesforce/lds-adapters-uiapi": "^1.287.0-dev9"
35
35
  },
36
36
  "dependencies": {
37
37
  "@luvio/lwc-luvio": "0.154.17-dev2",
38
- "@salesforce/lds-default-luvio": "^1.287.0-dev7"
38
+ "@salesforce/lds-default-luvio": "^1.287.0-dev9"
39
39
  }
40
40
  }