@salesforce/lds-ads-bridge 1.314.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.
@@ -481,7 +481,7 @@ const callbacks$1 = [];
481
481
  function register(r) {
482
482
  callbacks$1.forEach((callback) => callback(r));
483
483
  }
484
- // version: 1.314.0-5a451c78cd
484
+ // version: 1.316.0-fd56ed976d
485
485
 
486
486
  /**
487
487
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
@@ -4808,6 +4808,13 @@ function difference(source, compare) {
4808
4808
  }
4809
4809
  return strings;
4810
4810
  }
4811
+ /**
4812
+ * @param word The string to title case
4813
+ * @returns The sames string but in title case
4814
+ */
4815
+ function toTitleCase(word) {
4816
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
4817
+ }
4811
4818
 
4812
4819
  function isObjectId(unknown) {
4813
4820
  if (typeof unknown !== 'object' || unknown === null) {
@@ -4986,6 +4993,17 @@ function getRecordId18(value) {
4986
4993
  return undefined;
4987
4994
  }
4988
4995
 
4996
+ // Copy of SortedStringArray but calls toTitleCase
4997
+ function toSortedStringArrayTitleCase(value) {
4998
+ const valueArray = isArray(value) ? value : [value];
4999
+ if (valueArray.length !== 0 && isArrayOfNonEmptyStrings(valueArray)) {
5000
+ return dedupe(valueArray)
5001
+ .sort()
5002
+ .map((value) => toTitleCase(value));
5003
+ }
5004
+ return undefined;
5005
+ }
5006
+
4989
5007
  function toSortedStringArray(value) {
4990
5008
  const valueArray = isArray(value) ? value : [value];
4991
5009
  if (valueArray.length !== 0 && isArrayOfNonEmptyStrings(valueArray)) {
@@ -8490,9 +8508,9 @@ function isRestrictedPathCondition(existingPath, path) {
8490
8508
  (existingPath.includes('/records') && path.includes('/record-ui')));
8491
8509
  }
8492
8510
 
8493
- const createResourceRequest$1g = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
8511
+ const createResourceRequest$1h = function getUiApiRecordsByRecordIdCreateResourceRequest(config) {
8494
8512
  return {
8495
- ...createResourceRequest$1f(config),
8513
+ ...createResourceRequest$1g(config),
8496
8514
  fulfill: fulfill,
8497
8515
  };
8498
8516
  };
@@ -8505,7 +8523,7 @@ function keyBuilder$3z(luvio, params) {
8505
8523
  function getResponseCacheKeys$17(storeKeyMap, luvio, resourceParams, response) {
8506
8524
  getTypeCacheKeys$2h(storeKeyMap, luvio, response);
8507
8525
  }
8508
- function createResourceRequest$1f(config) {
8526
+ function createResourceRequest$1g(config) {
8509
8527
  const headers = {};
8510
8528
  return {
8511
8529
  baseUri: '/services/data/v63.0',
@@ -8523,7 +8541,7 @@ const getRecord_ConfigPropertyMetadata = [
8523
8541
  generateParamConfigMetadata('childRelationships', false, 1 /* QueryParameter */, 0 /* String */, true),
8524
8542
  generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
8525
8543
  generateParamConfigMetadata('forms', false, 1 /* QueryParameter */, 0 /* String */, true),
8526
- generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray),
8544
+ generateParamConfigMetadata('layoutTypes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArrayTitleCase),
8527
8545
  generateParamConfigMetadata('modes', false, 1 /* QueryParameter */, 0 /* String */, true, toSortedStringArray),
8528
8546
  generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
8529
8547
  generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
@@ -8564,7 +8582,7 @@ function prepareRequest$7(luvio, config) {
8564
8582
  fields,
8565
8583
  optionalFields: optionalFields.length > 0 ? optionalFields : undefined,
8566
8584
  });
8567
- const request = createResourceRequest$1g(resourceParams);
8585
+ const request = createResourceRequest$1h(resourceParams);
8568
8586
  return { request, key, allTrackedFields, resourceParams };
8569
8587
  }
8570
8588
  function ingestSuccess$X(luvio, config, key, allTrackedFields, response, serverRequestCount) {
@@ -8882,7 +8900,7 @@ function ingestError$Q(luvio, params, error, snapshotRefresh) {
8882
8900
  luvio.storeIngestError(key, errorSnapshot);
8883
8901
  return errorSnapshot;
8884
8902
  }
8885
- function createResourceRequest$1e(config) {
8903
+ function createResourceRequest$1f(config) {
8886
8904
  const headers = {};
8887
8905
  return {
8888
8906
  baseUri: '/services/data/v63.0',
@@ -8996,7 +9014,7 @@ function onFetchResponseError$T(luvio, config, resourceParams, response) {
8996
9014
  }
8997
9015
  function buildNetworkSnapshot$1a(luvio, config, serverRequestCount = 0, options) {
8998
9016
  const resourceParams = createResourceParams$14(config);
8999
- const request = createResourceRequest$1e(resourceParams);
9017
+ const request = createResourceRequest$1f(resourceParams);
9000
9018
  return luvio.dispatchResourceRequest(request, options).then((response) => {
9001
9019
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$S(luvio, config, resourceParams, response, serverRequestCount + 1), () => {
9002
9020
  const cache = new StoreKeyMap();
@@ -9047,7 +9065,7 @@ const ingest$2c = (input, path, luvio, store, timestamp) => {
9047
9065
  return result;
9048
9066
  };
9049
9067
 
9050
- const adapterName$10 = 'getListUiByApiName';
9068
+ const adapterName$_ = 'getListUiByApiName';
9051
9069
  const getListUiByApiName_ConfigPropertyMetadata = [
9052
9070
  generateParamConfigMetadata('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
9053
9071
  generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
@@ -9057,9 +9075,9 @@ const getListUiByApiName_ConfigPropertyMetadata = [
9057
9075
  generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
9058
9076
  generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
9059
9077
  ];
9060
- const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$10, getListUiByApiName_ConfigPropertyMetadata);
9078
+ const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$_, getListUiByApiName_ConfigPropertyMetadata);
9061
9079
 
9062
- const adapterName$$ = 'getListUiByListViewId';
9080
+ const adapterName$Z = 'getListUiByListViewId';
9063
9081
  const getListUiByListViewId_ConfigPropertyMetadata = [
9064
9082
  generateParamConfigMetadata('listViewId', true, 0 /* UrlParameter */, 0 /* String */),
9065
9083
  generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
@@ -9068,9 +9086,9 @@ const getListUiByListViewId_ConfigPropertyMetadata = [
9068
9086
  generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
9069
9087
  generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
9070
9088
  ];
9071
- const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$$, getListUiByListViewId_ConfigPropertyMetadata);
9089
+ const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$Z, getListUiByListViewId_ConfigPropertyMetadata);
9072
9090
 
9073
- const adapterName$Z = 'getMruListUi';
9091
+ const adapterName$X = 'getMruListUi';
9074
9092
  const getMruListUi_ConfigPropertyMetadata = [
9075
9093
  generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
9076
9094
  generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
@@ -9079,7 +9097,7 @@ const getMruListUi_ConfigPropertyMetadata = [
9079
9097
  generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
9080
9098
  generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
9081
9099
  ];
9082
- const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$Z, getMruListUi_ConfigPropertyMetadata);
9100
+ const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$X, getMruListUi_ConfigPropertyMetadata);
9083
9101
  // make local copies of the adapter configs so we can ignore other getListUi config parameters to match
9084
9102
  // lds222 behavior
9085
9103
  ({
package/dist/adsBridge.js CHANGED
@@ -367,4 +367,4 @@ function withAdsBridge(callback) {
367
367
  }
368
368
 
369
369
  export { instrument, withAdsBridge };
370
- // version: 1.314.0-5a451c78cd
370
+ // version: 1.316.0-fd56ed976d
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-ads-bridge",
3
- "version": "1.314.0",
3
+ "version": "1.316.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Bridge to sync data between LDS and ADS",
6
6
  "main": "dist/adsBridge.js",
@@ -30,8 +30,8 @@
30
30
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
31
31
  },
32
32
  "devDependencies": {
33
- "@salesforce/lds-adapters-uiapi": "^1.314.0",
34
- "@salesforce/lds-uiapi-record-utils-mobile": "^1.314.0"
33
+ "@salesforce/lds-adapters-uiapi": "^1.316.0",
34
+ "@salesforce/lds-uiapi-record-utils-mobile": "^1.316.0"
35
35
  },
36
36
  "volta": {
37
37
  "extends": "../../package.json"