@salesforce/lds-adapters-uiapi 1.293.0 → 1.295.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.
@@ -0,0 +1,2 @@
1
+ import type { keyBuilderFromType as generatedKeyBuilderFromType } from '../../../generated/types/ListInfoRepresentation';
2
+ export declare const keyBuilderFromType: typeof generatedKeyBuilderFromType;
@@ -0,0 +1,2 @@
1
+ import type { keyBuilderFromType as generatedKeyBuilderFromType } from '../../../generated/types/ListRecordCollectionRepresentation';
2
+ export declare const keyBuilderFromType: typeof generatedKeyBuilderFromType;
@@ -1531,6 +1531,17 @@ function getTypeCacheKeys$27(rootKeySet, luvio, input, fullPathFactory) {
1531
1531
  });
1532
1532
  }
1533
1533
 
1534
+ const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
1535
+ const keyParams = {
1536
+ listViewApiName: object.listReference.listViewApiName
1537
+ ? object.listReference.listViewApiName.toLowerCase()
1538
+ : object.listReference.listViewApiName,
1539
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
1540
+ type: object.listReference.type,
1541
+ };
1542
+ return keyBuilder$3o(luvio, keyParams);
1543
+ };
1544
+
1534
1545
  const TTL$G = 900000;
1535
1546
  const VERSION$2s = "c658fe1591386d570e214eaed0daadd1";
1536
1547
  function validate$1X(obj, path = 'ListInfoRepresentation') {
@@ -1759,14 +1770,6 @@ const RepresentationType$10 = 'ListInfoRepresentation';
1759
1770
  function keyBuilder$3o(luvio, config) {
1760
1771
  return keyPrefix + '::' + RepresentationType$10 + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
1761
1772
  }
1762
- function keyBuilderFromType$E(luvio, object) {
1763
- const keyParams = {
1764
- listViewApiName: object.listReference.listViewApiName,
1765
- objectApiName: object.listReference.objectApiName,
1766
- type: object.listReference.type
1767
- };
1768
- return keyBuilder$3o(luvio, keyParams);
1769
- }
1770
1773
  function normalize$U(input, existing, path, luvio, store, timestamp) {
1771
1774
  const input_displayColumns = input.displayColumns;
1772
1775
  const input_displayColumns_id = path.fullPath + '__displayColumns';
@@ -6597,6 +6600,19 @@ function revertPaginationOptimization(variables) {
6597
6600
  }
6598
6601
  }
6599
6602
 
6603
+ const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
6604
+ const keyParams = {
6605
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
6606
+ searchTerm: object.searchTerm,
6607
+ sortBy: object.sortBy,
6608
+ where: object.where,
6609
+ listViewApiName: object.listReference.listViewApiName
6610
+ ? object.listReference.listViewApiName.toLowerCase()
6611
+ : object.listReference.listViewApiName,
6612
+ };
6613
+ return keyBuilder$3k(luvio, keyParams);
6614
+ };
6615
+
6600
6616
  const TTL$D = 30000;
6601
6617
  const VERSION$2m = "e5c90c4081cd557f8ffec53028ede1e8";
6602
6618
  function validate$1S(obj, path = 'ListRecordCollectionRepresentation') {
@@ -6890,16 +6906,6 @@ const RepresentationType$Y = 'ListRecordCollectionRepresentation';
6890
6906
  function keyBuilder$3k(luvio, config) {
6891
6907
  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);
6892
6908
  }
6893
- function keyBuilderFromType$B(luvio, object) {
6894
- const keyParams = {
6895
- objectApiName: object.listReference.objectApiName,
6896
- searchTerm: object.searchTerm,
6897
- sortBy: object.sortBy,
6898
- where: object.where,
6899
- listViewApiName: object.listReference.listViewApiName
6900
- };
6901
- return keyBuilder$3k(luvio, keyParams);
6902
- }
6903
6909
  function paginationKeyBuilder(luvio, config) {
6904
6910
  return keyBuilder$3k(luvio, config) + '__pagination';
6905
6911
  }
@@ -8439,7 +8445,7 @@ function buildListRefByIdContextKey(listViewId) {
8439
8445
  return `listReferenceById::${listViewId}`;
8440
8446
  }
8441
8447
  function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
8442
- return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
8448
+ return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
8443
8449
  }
8444
8450
  /**
8445
8451
  * Adds a list reference so it can be retrieved with #getListReference later.
@@ -8495,7 +8501,12 @@ const LIST_INFO_SELECTIONS_ETAG = [
8495
8501
  * @param luvio Luvio
8496
8502
  */
8497
8503
  function getListInfo(luvio, listRef, storeLookup) {
8498
- const key = keyBuilder$3o(luvio, { ...listRef });
8504
+ let mutatedListRef = { ...listRef };
8505
+ mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
8506
+ mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
8507
+ ? mutatedListRef.listViewApiName.toLowerCase()
8508
+ : mutatedListRef.listViewApiName;
8509
+ const key = keyBuilder$3o(luvio, { ...mutatedListRef });
8499
8510
  return storeLookup({
8500
8511
  recordId: key,
8501
8512
  node: {
@@ -8509,7 +8520,7 @@ function getListInfo(luvio, listRef, storeLookup) {
8509
8520
  }
8510
8521
  function buildDefaultsKey(listRef) {
8511
8522
  const { objectApiName, listViewApiName } = listRef;
8512
- return `defaults::${objectApiName}:${listViewApiName}`;
8523
+ return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
8513
8524
  }
8514
8525
  /**
8515
8526
  * Update the default values based on a server response.
@@ -8670,9 +8681,11 @@ function setContext$1(adapterContext) {
8670
8681
  context$1 = adapterContext;
8671
8682
  }
8672
8683
  function keyBuilder$3c(luvio, params) {
8684
+ // lists data can now be fetched using case insensitive urlParams therefore
8685
+ // also changing contextStore to use lowercase caching
8673
8686
  const query = {
8674
- objectApiName: params.urlParams.objectApiName,
8675
- listViewApiName: params.urlParams.listViewApiName,
8687
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
8688
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
8676
8689
  };
8677
8690
  // Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
8678
8691
  const listReference = getListReference(query, context$1);
@@ -8682,8 +8695,10 @@ function keyBuilder$3c(luvio, params) {
8682
8695
  const defaults = getServerDefaults(config, context$1);
8683
8696
  // Use default values when sortBy is undefined or an empty Array []
8684
8697
  return keyBuilder$3k(luvio, {
8685
- objectApiName: listReference.objectApiName,
8686
- listViewApiName: listReference.listViewApiName,
8698
+ objectApiName: listReference.objectApiName.toLowerCase(),
8699
+ listViewApiName: listReference.listViewApiName
8700
+ ? listReference.listViewApiName.toLowerCase()
8701
+ : listReference.listViewApiName,
8687
8702
  // # removing listViewId from key only supporing getting records using api name
8688
8703
  // listViewId: listReference.id,
8689
8704
  searchTerm: params.body.searchTerm || null,
@@ -8696,8 +8711,8 @@ function keyBuilder$3c(luvio, params) {
8696
8711
  // If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
8697
8712
  // Assuming that listViewId is empty and continue on
8698
8713
  return keyBuilder$3k(luvio, {
8699
- objectApiName: params.urlParams.objectApiName,
8700
- listViewApiName: params.urlParams.listViewApiName,
8714
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
8715
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
8701
8716
  // # removing listViewId from key only supporing getting records using api name
8702
8717
  // listViewId: '',
8703
8718
  searchTerm: params.body.searchTerm || null,
@@ -9915,8 +9930,10 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
9915
9930
  searchTerm: null,
9916
9931
  where: null,
9917
9932
  sortBy: config.sortBy === undefined ? null : config.sortBy,
9918
- objectApiName: listInfo.listReference.objectApiName,
9919
- listViewApiName: listInfo.listReference.listViewApiName,
9933
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
9934
+ listViewApiName: listInfo.listReference.listViewApiName
9935
+ ? listInfo.listReference.listViewApiName.toLowerCase()
9936
+ : listInfo.listReference.listViewApiName,
9920
9937
  });
9921
9938
  const selector = {
9922
9939
  recordId: paginationKey,
@@ -9963,8 +9980,10 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
9963
9980
  searchTerm: null,
9964
9981
  where: null,
9965
9982
  sortBy: body.sortBy,
9966
- objectApiName: listInfo.listReference.objectApiName,
9967
- listViewApiName: listInfo.listReference.listViewApiName,
9983
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
9984
+ listViewApiName: listInfo.listReference.listViewApiName
9985
+ ? listInfo.listReference.listViewApiName.toLowerCase()
9986
+ : listInfo.listReference.listViewApiName,
9968
9987
  }), ingest$1_, body);
9969
9988
  const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
9970
9989
  return luvio.storeBroadcast().then(() => snapshot);
@@ -10012,7 +10031,7 @@ function buildCachedListInfoSnapshot$1(context, storeLookup, luvio) {
10012
10031
  return getListInfo(luvio, {
10013
10032
  id: null,
10014
10033
  listViewApiName: null,
10015
- objectApiName: config.objectApiName,
10034
+ objectApiName: config.objectApiName.toLowerCase(),
10016
10035
  type: 'mru',
10017
10036
  }, storeLookup);
10018
10037
  }
@@ -10298,8 +10317,10 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
10298
10317
  searchTerm: null,
10299
10318
  where: null,
10300
10319
  sortBy: getSortBy(config, context),
10301
- objectApiName: listInfo.listReference.objectApiName,
10302
- listViewApiName: listInfo.listReference.listViewApiName,
10320
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
10321
+ listViewApiName: listInfo.listReference.listViewApiName
10322
+ ? listInfo.listReference.listViewApiName.toLowerCase()
10323
+ : listInfo.listReference.listViewApiName,
10303
10324
  });
10304
10325
  const selector = {
10305
10326
  recordId: paginationKey,
@@ -10349,8 +10370,10 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
10349
10370
  searchTerm: null,
10350
10371
  where: null,
10351
10372
  sortBy: body.sortBy,
10352
- objectApiName: listInfo.listReference.objectApiName,
10353
- listViewApiName: listInfo.listReference.listViewApiName,
10373
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
10374
+ listViewApiName: listInfo.listReference.listViewApiName
10375
+ ? listInfo.listReference.listViewApiName.toLowerCase()
10376
+ : listInfo.listReference.listViewApiName,
10354
10377
  }), ingest$1_, body);
10355
10378
  const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
10356
10379
  releaseKeys();
@@ -13712,8 +13735,14 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
13712
13735
  // We automatically set the type based on the listViewApiName, and we need to do the same
13713
13736
  // here for key matching and validation
13714
13737
  configs.forEach((config) => {
13738
+ config.listViewApiName = config.listViewApiName
13739
+ ? config.listViewApiName.toLowerCase()
13740
+ : config.listViewApiName;
13741
+ config.objectApiName = config.objectApiName
13742
+ ? config.objectApiName.toLowerCase()
13743
+ : config.objectApiName;
13715
13744
  if (!config.type) {
13716
- config.type = config.listViewApiName === '__Recent' ? 'mru' : 'listView';
13745
+ config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
13717
13746
  }
13718
13747
  });
13719
13748
  return generated_notifyUpdateAvailable(configs);
@@ -20116,9 +20145,9 @@ const getLayoutUserStateAdapterFactory = (luvio) => function UiApi__getLayoutUse
20116
20145
 
20117
20146
  function keyBuilder$2n(luvio, params) {
20118
20147
  return keyBuilder$3o(luvio, {
20119
- objectApiName: params.urlParams.objectApiName,
20120
- listViewApiName: params.urlParams.listViewApiName,
20121
- type: params.urlParams.listViewApiName === '__Recent' ? 'mru' : 'listView',
20148
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
20149
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
20150
+ type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
20122
20151
  });
20123
20152
  }
20124
20153
 
@@ -50499,6 +50528,11 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
50499
50528
  const parentRecordId = resolvedLink.recordId;
50500
50529
  const totalEdges = source.edges !== undefined ? source.edges.length : 0;
50501
50530
  const metadata = reader.resolveMetadata(source, PAGINATION_VERSION$1);
50531
+ if (metadata === undefined) {
50532
+ reader.markMissingLink(fieldData.__ref);
50533
+ reader.markMissing();
50534
+ return;
50535
+ }
50502
50536
  const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
50503
50537
  const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
50504
50538
  const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
@@ -50509,7 +50543,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
50509
50543
  token: afterArgVal
50510
50544
  };
50511
50545
  let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
50512
- const listIsComplete = ((metadata === null || metadata === void 0 ? void 0 : metadata.__END__) !== undefined);
50546
+ const listIsComplete = (metadata.__END__ !== undefined);
50513
50547
  let trimmedEdges = [];
50514
50548
  let maxOffset = undefined;
50515
50549
  if (process.env.NODE_ENV !== 'production') {
@@ -50528,7 +50562,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
50528
50562
  }
50529
50563
  }
50530
50564
  else {
50531
- if (metadata === undefined || startOffset === undefined || endOffset === undefined) {
50565
+ if (startOffset === undefined || endOffset === undefined) {
50532
50566
  reader.markMissingLink(fieldData.__ref);
50533
50567
  reader.markMissing();
50534
50568
  return;
@@ -54931,11 +54965,23 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
54931
54965
  return config;
54932
54966
  }
54933
54967
 
54968
+ const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
54934
54969
  function getHeaders(clientOptions) {
54935
54970
  const headers = {};
54936
54971
  if (untrustedIsObject(clientOptions)) {
54937
54972
  if (typeof clientOptions.ifUnmodifiedSince === 'string') {
54938
54973
  headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
54974
+ // HTTP standard format date is expected by UI-API
54975
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
54976
+ // A component built for Connect API must use If-Unmodified-Since
54977
+ // dates formatted as ISO 8601, which does not match the HTTP spec.
54978
+ // For compatibility, convert the date to match the standard.
54979
+ if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
54980
+ const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
54981
+ if (utcString !== 'Invalid Date') {
54982
+ headers.ifUnmodifiedSince = utcString;
54983
+ }
54984
+ }
54939
54985
  }
54940
54986
  }
54941
54987
  return headers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-uiapi",
3
- "version": "1.293.0",
3
+ "version": "1.295.0",
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",
@@ -61,21 +61,21 @@
61
61
  "artifacts": {
62
62
  "graphqlAdapters.js": {
63
63
  "output": {
64
- "path": "ui-force-components/modules/force/ldsAdaptersUiapiGraphql/ldsAdaptersUiapiGraphql.js"
64
+ "path": "ui-bridge-components/modules/native/ldsAdaptersUiapiMobileGraphql/ldsAdaptersUiapiMobileGraphql.js"
65
65
  }
66
66
  }
67
67
  }
68
68
  }
69
69
  },
70
70
  "dependencies": {
71
- "@salesforce/lds-bindings": "^1.293.0",
72
- "@salesforce/lds-default-luvio": "^1.293.0"
71
+ "@salesforce/lds-bindings": "^1.295.0",
72
+ "@salesforce/lds-default-luvio": "^1.295.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@databases/sqlite": "^3.0.0",
76
- "@salesforce/lds-compiler-plugins": "^1.293.0",
77
- "@salesforce/lds-jest": "^1.293.0",
78
- "@salesforce/lds-store-binary": "^1.293.0"
76
+ "@salesforce/lds-compiler-plugins": "^1.295.0",
77
+ "@salesforce/lds-jest": "^1.295.0",
78
+ "@salesforce/lds-store-binary": "^1.295.0"
79
79
  },
80
80
  "luvioBundlesize": [
81
81
  {
@@ -18094,6 +18094,11 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
18094
18094
  const parentRecordId = resolvedLink.recordId;
18095
18095
  const totalEdges = source.edges !== undefined ? source.edges.length : 0;
18096
18096
  const metadata = reader.resolveMetadata(source, PAGINATION_VERSION);
18097
+ if (metadata === undefined) {
18098
+ reader.markMissingLink(fieldData.__ref);
18099
+ reader.markMissing();
18100
+ return;
18101
+ }
18097
18102
  const firstArg = (_a = sel.arguments) === null || _a === void 0 ? void 0 : _a.find(argument => { return argument.name.value === 'first'; });
18098
18103
  const firstArgVal = evaluateArgumentValue(firstArg, 'IntValue', variables);
18099
18104
  const pageSize = firstArgVal !== undefined ? firstArgVal : totalEdges;
@@ -18104,7 +18109,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
18104
18109
  token: afterArgVal
18105
18110
  };
18106
18111
  let { startOffset, endOffset } = getPageMetadata(metadata, paginationParams);
18107
- const listIsComplete = ((metadata === null || metadata === void 0 ? void 0 : metadata.__END__) !== undefined);
18112
+ const listIsComplete = (metadata.__END__ !== undefined);
18108
18113
  let trimmedEdges = [];
18109
18114
  let maxOffset = undefined;
18110
18115
  if (process.env.NODE_ENV !== 'production') {
@@ -18123,7 +18128,7 @@ function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key,
18123
18128
  }
18124
18129
  }
18125
18130
  else {
18126
- if (metadata === undefined || startOffset === undefined || endOffset === undefined) {
18131
+ if (startOffset === undefined || endOffset === undefined) {
18127
18132
  reader.markMissingLink(fieldData.__ref);
18128
18133
  reader.markMissing();
18129
18134
  return;
@@ -19744,4 +19749,4 @@ register({
19744
19749
  });
19745
19750
 
19746
19751
  export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
19747
- // version: 1.293.0-c036bce5d
19752
+ // version: 1.295.0-e85f207c7
package/sfdc/index.js CHANGED
@@ -1588,6 +1588,17 @@ function getTypeCacheKeys$Z(rootKeySet, luvio, input, fullPathFactory) {
1588
1588
  });
1589
1589
  }
1590
1590
 
1591
+ const keyBuilderFromType$E = function ListInfoRepresentationKeyBuilderFromType(luvio, object) {
1592
+ const keyParams = {
1593
+ listViewApiName: object.listReference.listViewApiName
1594
+ ? object.listReference.listViewApiName.toLowerCase()
1595
+ : object.listReference.listViewApiName,
1596
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
1597
+ type: object.listReference.type,
1598
+ };
1599
+ return keyBuilder$27(luvio, keyParams);
1600
+ };
1601
+
1591
1602
  const TTL$A = 900000;
1592
1603
  const VERSION$1e = "c658fe1591386d570e214eaed0daadd1";
1593
1604
  function validate$1T(obj, path = 'ListInfoRepresentation') {
@@ -1816,14 +1827,6 @@ const RepresentationType$X = 'ListInfoRepresentation';
1816
1827
  function keyBuilder$27(luvio, config) {
1817
1828
  return keyPrefix + '::' + RepresentationType$X + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
1818
1829
  }
1819
- function keyBuilderFromType$E(luvio, object) {
1820
- const keyParams = {
1821
- listViewApiName: object.listReference.listViewApiName,
1822
- objectApiName: object.listReference.objectApiName,
1823
- type: object.listReference.type
1824
- };
1825
- return keyBuilder$27(luvio, keyParams);
1826
- }
1827
1830
  function normalize$Q(input, existing, path, luvio, store, timestamp) {
1828
1831
  const input_displayColumns = input.displayColumns;
1829
1832
  const input_displayColumns_id = path.fullPath + '__displayColumns';
@@ -6358,6 +6361,19 @@ function tokenForAtMost(paginationMetadata, maxOffset) {
6358
6361
  return [tokenResult, offsetResult];
6359
6362
  }
6360
6363
 
6364
+ const keyBuilderFromType$B = function ListRecordCollectionRepresentationKeyBuilderFromType(luvio, object) {
6365
+ const keyParams = {
6366
+ objectApiName: object.listReference.objectApiName.toLowerCase(),
6367
+ searchTerm: object.searchTerm,
6368
+ sortBy: object.sortBy,
6369
+ where: object.where,
6370
+ listViewApiName: object.listReference.listViewApiName
6371
+ ? object.listReference.listViewApiName.toLowerCase()
6372
+ : object.listReference.listViewApiName,
6373
+ };
6374
+ return keyBuilder$23(luvio, keyParams);
6375
+ };
6376
+
6361
6377
  const TTL$x = 30000;
6362
6378
  const VERSION$18 = "e5c90c4081cd557f8ffec53028ede1e8";
6363
6379
  function validate$1O(obj, path = 'ListRecordCollectionRepresentation') {
@@ -6651,16 +6667,6 @@ const RepresentationType$T = 'ListRecordCollectionRepresentation';
6651
6667
  function keyBuilder$23(luvio, config) {
6652
6668
  return keyPrefix + '::' + RepresentationType$T + ':' + config.objectApiName + ':' + (config.searchTerm === null ? '' : config.searchTerm) + ':' + (config.sortBy === null ? '' : '[' + config.sortBy.join(',') + ']') + ':' + (config.where === null ? '' : config.where) + ':' + (config.listViewApiName === null ? '' : config.listViewApiName);
6653
6669
  }
6654
- function keyBuilderFromType$B(luvio, object) {
6655
- const keyParams = {
6656
- objectApiName: object.listReference.objectApiName,
6657
- searchTerm: object.searchTerm,
6658
- sortBy: object.sortBy,
6659
- where: object.where,
6660
- listViewApiName: object.listReference.listViewApiName
6661
- };
6662
- return keyBuilder$23(luvio, keyParams);
6663
- }
6664
6670
  function paginationKeyBuilder(luvio, config) {
6665
6671
  return keyBuilder$23(luvio, config) + '__pagination';
6666
6672
  }
@@ -7984,8 +7990,8 @@ const LIST_SUMMARY_PREFIX = keyPrefix + '::' + RepresentationType$Q;
7984
7990
  let listRecordCollectionCache = new Map();
7985
7991
  let listSummaryCollectionCache = new Map();
7986
7992
  function getListRecordCollectionKeys(objectApiName, listViewApiName) {
7987
- const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
7988
- const keys = cacheEntriesByObjectApiName.get(listViewApiName) || [];
7993
+ const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
7994
+ const keys = cacheEntriesByObjectApiName.get(listViewApiName.toLowerCase()) || [];
7989
7995
  return [...keys];
7990
7996
  }
7991
7997
  function getListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
@@ -8017,8 +8023,8 @@ function addListSummaryCollectionKey(objectApiName, recentLists, key) {
8017
8023
  keys.add(key);
8018
8024
  }
8019
8025
  function removeListRecordCollectionKeys(objectApiName, listViewApiName) {
8020
- const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName) || new Map();
8021
- cacheEntriesByObjectApiName.delete(listViewApiName);
8026
+ const cacheEntriesByObjectApiName = listRecordCollectionCache.get(objectApiName.toLowerCase()) || new Map();
8027
+ cacheEntriesByObjectApiName.delete(listViewApiName.toLowerCase());
8022
8028
  }
8023
8029
  function removeListSummaryCollectionKeys(objectApiName, recentLists = undefined) {
8024
8030
  const cacheEntriesByObjectApiName = listSummaryCollectionCache.get(objectApiName) || new Map();
@@ -8070,7 +8076,7 @@ function buildListRefByIdContextKey(listViewId) {
8070
8076
  return `listReferenceById::${listViewId}`;
8071
8077
  }
8072
8078
  function buildListRefByApiNameContextKey(objectApiName, listViewApiName) {
8073
- return `listReferenceByApiName::${objectApiName}:${listViewApiName}`;
8079
+ return `listReferenceByApiName::${objectApiName.toLowerCase()}:${listViewApiName.toLowerCase()}`;
8074
8080
  }
8075
8081
  /**
8076
8082
  * Adds a list reference so it can be retrieved with #getListReference later.
@@ -8126,7 +8132,12 @@ const LIST_INFO_SELECTIONS_ETAG = [
8126
8132
  * @param luvio Luvio
8127
8133
  */
8128
8134
  function getListInfo(luvio, listRef, storeLookup) {
8129
- const key = keyBuilder$27(luvio, { ...listRef });
8135
+ let mutatedListRef = { ...listRef };
8136
+ mutatedListRef.objectApiName = mutatedListRef.objectApiName.toLowerCase();
8137
+ mutatedListRef.listViewApiName = mutatedListRef.listViewApiName
8138
+ ? mutatedListRef.listViewApiName.toLowerCase()
8139
+ : mutatedListRef.listViewApiName;
8140
+ const key = keyBuilder$27(luvio, { ...mutatedListRef });
8130
8141
  return storeLookup({
8131
8142
  recordId: key,
8132
8143
  node: {
@@ -8140,7 +8151,7 @@ function getListInfo(luvio, listRef, storeLookup) {
8140
8151
  }
8141
8152
  function buildDefaultsKey(listRef) {
8142
8153
  const { objectApiName, listViewApiName } = listRef;
8143
- return `defaults::${objectApiName}:${listViewApiName}`;
8154
+ return `defaults::${objectApiName.toLowerCase()}:${listViewApiName ? listViewApiName.toLowerCase() : listViewApiName}`;
8144
8155
  }
8145
8156
  /**
8146
8157
  * Update the default values based on a server response.
@@ -8315,9 +8326,11 @@ function setContext$1(adapterContext) {
8315
8326
  context$1 = adapterContext;
8316
8327
  }
8317
8328
  function keyBuilder$1$(luvio, params) {
8329
+ // lists data can now be fetched using case insensitive urlParams therefore
8330
+ // also changing contextStore to use lowercase caching
8318
8331
  const query = {
8319
- objectApiName: params.urlParams.objectApiName,
8320
- listViewApiName: params.urlParams.listViewApiName,
8332
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
8333
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
8321
8334
  };
8322
8335
  // Fetch listReference from internal store to better ensure a cache hit regardless of listViewApiName or listViewId
8323
8336
  const listReference = getListReference(query, context$1);
@@ -8327,8 +8340,10 @@ function keyBuilder$1$(luvio, params) {
8327
8340
  const defaults = getServerDefaults(config, context$1);
8328
8341
  // Use default values when sortBy is undefined or an empty Array []
8329
8342
  return keyBuilder$23(luvio, {
8330
- objectApiName: listReference.objectApiName,
8331
- listViewApiName: listReference.listViewApiName,
8343
+ objectApiName: listReference.objectApiName.toLowerCase(),
8344
+ listViewApiName: listReference.listViewApiName
8345
+ ? listReference.listViewApiName.toLowerCase()
8346
+ : listReference.listViewApiName,
8332
8347
  // # removing listViewId from key only supporing getting records using api name
8333
8348
  // listViewId: listReference.id,
8334
8349
  searchTerm: params.body.searchTerm || null,
@@ -8341,8 +8356,8 @@ function keyBuilder$1$(luvio, params) {
8341
8356
  // If there are no matching entries in the store, then we haven't fetched any data for this list view yet.
8342
8357
  // Assuming that listViewId is empty and continue on
8343
8358
  return keyBuilder$23(luvio, {
8344
- objectApiName: params.urlParams.objectApiName,
8345
- listViewApiName: params.urlParams.listViewApiName,
8359
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
8360
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
8346
8361
  // # removing listViewId from key only supporing getting records using api name
8347
8362
  // listViewId: '',
8348
8363
  searchTerm: params.body.searchTerm || null,
@@ -9560,8 +9575,10 @@ function prepareRequest_getMruListRecords(luvio, config, listInfo, snapshot) {
9560
9575
  searchTerm: null,
9561
9576
  where: null,
9562
9577
  sortBy: config.sortBy === undefined ? null : config.sortBy,
9563
- objectApiName: listInfo.listReference.objectApiName,
9564
- listViewApiName: listInfo.listReference.listViewApiName,
9578
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
9579
+ listViewApiName: listInfo.listReference.listViewApiName
9580
+ ? listInfo.listReference.listViewApiName.toLowerCase()
9581
+ : listInfo.listReference.listViewApiName,
9565
9582
  });
9566
9583
  const selector = {
9567
9584
  recordId: paginationKey,
@@ -9608,8 +9625,10 @@ function onResourceSuccess_getMruListRecords(luvio, config, listInfo, response)
9608
9625
  searchTerm: null,
9609
9626
  where: null,
9610
9627
  sortBy: body.sortBy,
9611
- objectApiName: listInfo.listReference.objectApiName,
9612
- listViewApiName: listInfo.listReference.listViewApiName,
9628
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
9629
+ listViewApiName: listInfo.listReference.listViewApiName
9630
+ ? listInfo.listReference.listViewApiName.toLowerCase()
9631
+ : listInfo.listReference.listViewApiName,
9613
9632
  }), ingest$M, body);
9614
9633
  const snapshot = buildCachedSnapshot$8(luvio, luvio.storeLookup.bind(luvio), config, listInfo, fields);
9615
9634
  return luvio.storeBroadcast().then(() => snapshot);
@@ -9657,7 +9676,7 @@ function buildCachedListInfoSnapshot$1(context, storeLookup, luvio) {
9657
9676
  return getListInfo(luvio, {
9658
9677
  id: null,
9659
9678
  listViewApiName: null,
9660
- objectApiName: config.objectApiName,
9679
+ objectApiName: config.objectApiName.toLowerCase(),
9661
9680
  type: 'mru',
9662
9681
  }, storeLookup);
9663
9682
  }
@@ -9943,8 +9962,10 @@ function prepareRequest_getListRecords(luvio, context, config, listInfo, snapsho
9943
9962
  searchTerm: null,
9944
9963
  where: null,
9945
9964
  sortBy: getSortBy(config, context),
9946
- objectApiName: listInfo.listReference.objectApiName,
9947
- listViewApiName: listInfo.listReference.listViewApiName,
9965
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
9966
+ listViewApiName: listInfo.listReference.listViewApiName
9967
+ ? listInfo.listReference.listViewApiName.toLowerCase()
9968
+ : listInfo.listReference.listViewApiName,
9948
9969
  });
9949
9970
  const selector = {
9950
9971
  recordId: paginationKey,
@@ -9994,8 +10015,10 @@ function onResourceSuccess_getListRecords(luvio, context, config, listInfo, resp
9994
10015
  searchTerm: null,
9995
10016
  where: null,
9996
10017
  sortBy: body.sortBy,
9997
- objectApiName: listInfo.listReference.objectApiName,
9998
- listViewApiName: listInfo.listReference.listViewApiName,
10018
+ objectApiName: listInfo.listReference.objectApiName.toLowerCase(),
10019
+ listViewApiName: listInfo.listReference.listViewApiName
10020
+ ? listInfo.listReference.listViewApiName.toLowerCase()
10021
+ : listInfo.listReference.listViewApiName,
9999
10022
  }), ingest$M, body);
10000
10023
  const snapshot = buildCachedSnapshot$7(luvio, luvio.storeLookup.bind(luvio), context, config, listInfo, fields);
10001
10024
  releaseKeys();
@@ -13357,8 +13380,14 @@ const notifyUpdateAvailableFactory$1 = (luvio) => {
13357
13380
  // We automatically set the type based on the listViewApiName, and we need to do the same
13358
13381
  // here for key matching and validation
13359
13382
  configs.forEach((config) => {
13383
+ config.listViewApiName = config.listViewApiName
13384
+ ? config.listViewApiName.toLowerCase()
13385
+ : config.listViewApiName;
13386
+ config.objectApiName = config.objectApiName
13387
+ ? config.objectApiName.toLowerCase()
13388
+ : config.objectApiName;
13360
13389
  if (!config.type) {
13361
- config.type = config.listViewApiName === '__Recent' ? 'mru' : 'listView';
13390
+ config.type = config.listViewApiName === '__recent' ? 'mru' : 'listView';
13362
13391
  }
13363
13392
  });
13364
13393
  return generated_notifyUpdateAvailable(configs);
@@ -19624,9 +19653,9 @@ const getLayoutUserStateAdapterFactory = (luvio) => function UiApi__getLayoutUse
19624
19653
 
19625
19654
  function keyBuilder$1c(luvio, params) {
19626
19655
  return keyBuilder$27(luvio, {
19627
- objectApiName: params.urlParams.objectApiName,
19628
- listViewApiName: params.urlParams.listViewApiName,
19629
- type: params.urlParams.listViewApiName === '__Recent' ? 'mru' : 'listView',
19656
+ objectApiName: params.urlParams.objectApiName.toLowerCase(),
19657
+ listViewApiName: params.urlParams.listViewApiName.toLowerCase(),
19658
+ type: params.urlParams.listViewApiName.toLowerCase() === '__recent' ? 'mru' : 'listView',
19630
19659
  });
19631
19660
  }
19632
19661
 
@@ -35917,11 +35946,23 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
35917
35946
  return config;
35918
35947
  }
35919
35948
 
35949
+ const ISO8601_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$/;
35920
35950
  function getHeaders(clientOptions) {
35921
35951
  const headers = {};
35922
35952
  if (untrustedIsObject(clientOptions)) {
35923
35953
  if (typeof clientOptions.ifUnmodifiedSince === 'string') {
35924
35954
  headers.ifUnmodifiedSince = clientOptions.ifUnmodifiedSince;
35955
+ // HTTP standard format date is expected by UI-API
35956
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
35957
+ // A component built for Connect API must use If-Unmodified-Since
35958
+ // dates formatted as ISO 8601, which does not match the HTTP spec.
35959
+ // For compatibility, convert the date to match the standard.
35960
+ if (headers.ifUnmodifiedSince.match(ISO8601_DATE_REGEX)) {
35961
+ const utcString = new Date(headers.ifUnmodifiedSince).toUTCString();
35962
+ if (utcString !== 'Invalid Date') {
35963
+ headers.ifUnmodifiedSince = utcString;
35964
+ }
35965
+ }
35925
35966
  }
35926
35967
  }
35927
35968
  return headers;
@@ -37082,4 +37123,4 @@ withDefaultLuvio((luvio) => {
37082
37123
  });
37083
37124
 
37084
37125
  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 };
37085
- // version: 1.293.0-c036bce5d
37126
+ // version: 1.295.0-e85f207c7
@@ -95,7 +95,7 @@ var TypeCheckShapes;
95
95
  TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
96
96
  TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
97
97
  })(TypeCheckShapes || (TypeCheckShapes = {}));
98
- // engine version: 0.154.19-8ff414af
98
+ // engine version: 0.154.20-1c52d927
99
99
 
100
100
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
101
101
 
@@ -50,6 +50,7 @@ type StringAggregate implements FieldValue {
50
50
  type Query {
51
51
  uiapi: UIAPI!
52
52
  setup: Setup__Setup!
53
+ analytics: Analytics__Analytics!
53
54
  }
54
55
 
55
56
  input EmailOperators {
@@ -1518,6 +1519,54 @@ type RecordQuery {
1518
1519
  recordQuery(first: Int, after: String, where: RecordFilter, orderBy: RecordOrderBy, scope: String, upperBound: Int): RecordConnection @fieldCategory
1519
1520
  }
1520
1521
 
1522
+ # add browse family schema
1523
+ type Analytics__Analytics {
1524
+ browse(orderBy: Analytics__AnalyticsOrderBy): Analytics__AnalyticsBrowse!
1525
+ # Add other fields here if needed
1526
+ }
1527
+
1528
+ type Analytics__AnalyticsBrowse {
1529
+ edges: [Analytics__AnalyticsEdge]
1530
+ totalCount: Int!
1531
+ }
1532
+
1533
+ type Analytics__AnalyticsEdge {
1534
+ node: Analytics__AnalyticsRepresentation
1535
+ }
1536
+
1537
+ type Analytics__AnalyticsRepresentation {
1538
+ MasterLabel: StringValue
1539
+ CreatedById: IDValue
1540
+ LastModifiedDate: DateTimeValue
1541
+ Id: ID!
1542
+ ApiName: String!
1543
+ }
1544
+
1545
+ input Analytics__AnalyticsOrderBy {
1546
+ MasterLabel: Analytics__OrderByInput
1547
+ Id: Analytics__OrderByInput
1548
+ ApiName: Analytics__OrderByInput
1549
+ CreatedById: Analytics__OrderByInput
1550
+ LastModifiedDate: Analytics__OrderByInput
1551
+ }
1552
+
1553
+ input Analytics__OrderByInput {
1554
+ MasterLabel: Analytics__OrderByEnum
1555
+ id: Analytics__OrderByEnum
1556
+ apiName: Analytics__OrderByEnum
1557
+ CreatedById: Analytics__OrderByEnum
1558
+ LastModifiedDate: Analytics__OrderByEnum
1559
+ }
1560
+
1561
+ input Analytics__OrderByEnum {
1562
+ order: Analytics__SortEnumType
1563
+ }
1564
+
1565
+ enum Analytics__SortEnumType {
1566
+ ASC
1567
+ DESC
1568
+ }
1569
+
1521
1570
  directive @generic on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT
1522
1571
  directive @fieldCategory on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
1523
1572
  directive @category(name: String!) on FIELD