@salesforce/lds-runtime-bridge 1.313.0 → 1.314.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.
@@ -1578,34 +1578,26 @@ function setupMobileInstrumentation(luvio, store) {
1578
1578
  /**
1579
1579
  * Defines configuration for the module with a default value which can be overridden by the runtime environment.
1580
1580
  */
1581
- /**
1582
- * Environment Aware GraphQLBatch adapter
1583
- */
1584
- let environmentAwareGraphQLBatchAdapter = undefined;
1585
- /**
1586
- * Draft-aware GraphQL adapter
1587
- */
1588
- let draftAwareGraphQLAdapter = undefined;
1589
- /**
1590
- * Draft-aware createRecord adapter
1591
- */
1592
- let draftAwareCreateRecordAdapter = undefined;
1593
- /**
1594
- * Draft-aware updateRecord adapter
1595
- */
1596
- let draftAwareUpdateRecordAdapter = undefined;
1597
- /**
1598
- * Draft-aware deleteRecord adapter
1599
- */
1600
- let draftAwareDeleteRecordAdapter = undefined;
1601
- /**
1602
- * Draft-aware createContentDocumentAndVersion adapter
1603
- */
1604
- let draftAwareCreateContentDocumentAndVersionAdapter = undefined;
1605
- /**
1606
- * Draft-aware createContentVersion adapter
1607
- */
1608
- let draftAwareCreateContentVersionAdapter = undefined;
1581
+ // A holder for a configurable adapter override
1582
+ class Configurable {
1583
+ constructor() {
1584
+ this.getAdapter = () => {
1585
+ return this.adapter;
1586
+ };
1587
+ this.setAdapter = (value) => {
1588
+ this.adapter = value;
1589
+ };
1590
+ this.adapter = undefined;
1591
+ }
1592
+ }
1593
+ // Configurable adapters that can have environmental overrides
1594
+ let configurableCreateRecordAdapter = new Configurable();
1595
+ let configurableUpdateRecordAdapter = new Configurable();
1596
+ let configurableDeleteRecordAdapter = new Configurable();
1597
+ let configurablePerformQuickActionAdapter = new Configurable();
1598
+ let configurablePerformUpdateRecordQuickActionAdapter = new Configurable();
1599
+ let configurableCreateContentDocumentAndVersion = new Configurable();
1600
+ let configurableCreateContentVersion = new Configurable();
1609
1601
  /**
1610
1602
  * Depth to which tracked fields will be added to a request that results from a cache miss.
1611
1603
  * A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
@@ -1662,6 +1654,52 @@ const configurationForOneStoreEnabledAdapters = {
1662
1654
  return oneStoreGetObjectInfosAdapter;
1663
1655
  },
1664
1656
  };
1657
+ const getKeywordSearchResultsFactory = new Configurable();
1658
+ const getListRecordsByNameFactory = new Configurable();
1659
+ const getListUiFactory = new Configurable();
1660
+ const getLookupRecordsFactory = new Configurable();
1661
+ const getQuickActionDefaultsFactory = new Configurable();
1662
+ const getRecordCreateDefaultsFactory = new Configurable();
1663
+ const getRecordTemplateCloneFactory = new Configurable();
1664
+ const getRecordTemplateCreateFactory = new Configurable();
1665
+ const getRecordUiFactory = new Configurable();
1666
+ const getRecordFactory = new Configurable();
1667
+ const getRecordsFactory = new Configurable();
1668
+ const getRelatedListRecordsFactory = new Configurable();
1669
+ const getRelatedListRecordsBatchFactory = new Configurable();
1670
+ const getSearchResultsFactory = new Configurable();
1671
+ // The following set of adapters all touch RecordRepresentation directly or indirectly,
1672
+ // so they need to support having a custom factory provided by the mobile environment.
1673
+ const configurationForEnvironmentFactoryOverrides = {
1674
+ getKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.getAdapter,
1675
+ setGetKeywordSearchResultsAdapterFactory: getKeywordSearchResultsFactory.setAdapter,
1676
+ getListRecordsByNameAdapterFactory: getListRecordsByNameFactory.getAdapter,
1677
+ setGetListRecordsByNameAdapterFactory: getListRecordsByNameFactory.setAdapter,
1678
+ getListUiAdapterFactory: getListUiFactory.getAdapter,
1679
+ setGetListUiAdapterFactory: getListUiFactory.setAdapter,
1680
+ getLookupRecordsAdapterFactory: getLookupRecordsFactory.getAdapter,
1681
+ setGetLookupRecordsAdapterFactory: getLookupRecordsFactory.setAdapter,
1682
+ getQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.getAdapter,
1683
+ setGetQuickActionDefaultsAdapterFactory: getQuickActionDefaultsFactory.setAdapter,
1684
+ getRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.getAdapter,
1685
+ setGetRecordCreateDefaultsAdapterFactory: getRecordCreateDefaultsFactory.setAdapter,
1686
+ getRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.getAdapter,
1687
+ setGetRecordTemplateCloneAdapterFactory: getRecordTemplateCloneFactory.setAdapter,
1688
+ getRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.getAdapter,
1689
+ setGetRecordTemplateCreateAdapterFactory: getRecordTemplateCreateFactory.setAdapter,
1690
+ getRecordUiAdapterFactory: getRecordUiFactory.getAdapter,
1691
+ setGetRecordUiAdapterFactory: getRecordUiFactory.setAdapter,
1692
+ getRecordAdapterFactory: getRecordFactory.getAdapter,
1693
+ setGetRecordAdapterFactory: getRecordFactory.setAdapter,
1694
+ getRecordsAdapterFactory: getRecordsFactory.getAdapter,
1695
+ setGetRecordsAdapterFactory: getRecordsFactory.setAdapter,
1696
+ getRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.getAdapter,
1697
+ setGetRelatedListRecordsAdapterFactory: getRelatedListRecordsFactory.setAdapter,
1698
+ getRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.getAdapter,
1699
+ setGetRelatedListRecordsBatchAdapterFactory: getRelatedListRecordsBatchFactory.setAdapter,
1700
+ getSearchResultsAdapterFactory: getSearchResultsFactory.getAdapter,
1701
+ setGetSearchResultsAdapterFactory: getSearchResultsFactory.setAdapter,
1702
+ };
1665
1703
  /**
1666
1704
  * Defines the configuration API and is exposed internally as well as externally.
1667
1705
  * Configuration for REST adapters only.
@@ -1691,66 +1729,47 @@ const configurationForRestAdapters = {
1691
1729
  getTrackedFieldLeafNodeIdAndNameOnly: function () {
1692
1730
  return trackedFieldLeafNodeIdAndNameOnly;
1693
1731
  },
1694
- // createRecord
1695
- setDraftAwareCreateRecordAdapter: function (adapter) {
1696
- draftAwareCreateRecordAdapter = adapter;
1697
- },
1698
- getDraftAwareCreateRecordAdapter: function () {
1699
- return draftAwareCreateRecordAdapter;
1700
- },
1701
- // updateRecord
1702
- setDraftAwareUpdateRecordAdapter: function (adapter) {
1703
- draftAwareUpdateRecordAdapter = adapter;
1704
- },
1705
- getDraftAwareUpdateRecordAdapter: function () {
1706
- return draftAwareUpdateRecordAdapter;
1707
- },
1708
- // deleteRecord
1709
- setDraftAwareDeleteRecordAdapter: function (adapter) {
1710
- draftAwareDeleteRecordAdapter = adapter;
1711
- },
1712
- getDraftAwareDeleteRecordAdapter: function () {
1713
- return draftAwareDeleteRecordAdapter;
1714
- },
1715
- // createContentDocumentAndVersion
1716
- setDraftAwareCreateContentDocumentAndVersionAdapter: function (adapter) {
1717
- draftAwareCreateContentDocumentAndVersionAdapter = adapter;
1718
- },
1719
- getDraftAwareCreateContentDocumentAndVersionAdapter: function () {
1720
- return draftAwareCreateContentDocumentAndVersionAdapter;
1721
- },
1722
1732
  setRelatedListsPredictionsEnabled: function (f) {
1723
1733
  relatedListsPredictionsEnabled = f;
1724
1734
  },
1725
1735
  areRelatedListsPredictionsEnabled: function () {
1726
1736
  return relatedListsPredictionsEnabled === true;
1727
1737
  },
1738
+ // createRecord
1739
+ getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.getAdapter,
1740
+ setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.setAdapter,
1741
+ // updateRecord
1742
+ getDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.getAdapter,
1743
+ setDraftAwareUpdateRecordAdapter: configurableUpdateRecordAdapter.setAdapter,
1744
+ // deleteRecord
1745
+ getDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.getAdapter,
1746
+ setDraftAwareDeleteRecordAdapter: configurableDeleteRecordAdapter.setAdapter,
1747
+ // performQuickAction
1748
+ getDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.getAdapter,
1749
+ setDraftAwarePerformQuickActionAdapter: configurablePerformQuickActionAdapter.setAdapter,
1750
+ // performRecordUpdateQuickAction
1751
+ getDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.getAdapter,
1752
+ setDraftAwarePerformUpdateRecordQuickActionAdapter: configurablePerformUpdateRecordQuickActionAdapter.setAdapter,
1753
+ // createContentDocumentAndVersion
1754
+ getDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.getAdapter,
1755
+ setDraftAwareCreateContentDocumentAndVersionAdapter: configurableCreateContentDocumentAndVersion.setAdapter,
1728
1756
  // createContentVersion
1729
- setDraftAwareCreateContentVersionAdapter: function (adapter) {
1730
- draftAwareCreateContentVersionAdapter = adapter;
1731
- },
1732
- getDraftAwareCreateContentVersionAdapter: function () {
1733
- return draftAwareCreateContentVersionAdapter;
1734
- },
1757
+ getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.getAdapter,
1758
+ setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.setAdapter,
1735
1759
  ...configurationForOneStoreEnabledAdapters,
1760
+ ...configurationForEnvironmentFactoryOverrides,
1736
1761
  };
1762
+ let configurableGraphQLAdapter = new Configurable();
1763
+ let configurableGraphQLBatchAdapter = new Configurable();
1737
1764
  /**
1738
1765
  * Defines the configuration API and is exposed internally as well as externally.
1739
1766
  * Configuration for GraphQL adapters only.
1740
1767
  */
1741
1768
  const configurationForGraphQLAdapters = {
1742
- setDraftAwareGraphQLAdapter: function (adapter) {
1743
- draftAwareGraphQLAdapter = adapter;
1744
- },
1745
- getDraftAwareGraphQLAdapter: function () {
1746
- return draftAwareGraphQLAdapter;
1747
- },
1748
- setEnvironmentAwareGraphQLBatchAdapter: function (adapter) {
1749
- environmentAwareGraphQLBatchAdapter = adapter;
1750
- },
1751
- getEnvironmentAwareGraphQLBatchAdapter: function () {
1752
- return environmentAwareGraphQLBatchAdapter;
1753
- },
1769
+ getDraftAwareGraphQLAdapter: configurableGraphQLAdapter.getAdapter,
1770
+ setDraftAwareGraphQLAdapter: configurableGraphQLAdapter.setAdapter,
1771
+ getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.getAdapter,
1772
+ setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.setAdapter,
1754
1773
  };
1755
1774
  const registrations = new Set();
1756
1775
  /**
@@ -2737,4 +2756,4 @@ function ldsRuntimeBridge() {
2737
2756
  }
2738
2757
 
2739
2758
  export { ldsRuntimeBridge as default };
2740
- // version: 1.313.0-bf88d762e3
2759
+ // version: 1.314.0-5a451c78cd
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-bridge",
3
- "version": "1.313.0",
3
+ "version": "1.314.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for bridge.app.",
6
6
  "main": "dist/ldsRuntimeBridge.js",
@@ -34,17 +34,17 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-bridge"
35
35
  },
36
36
  "dependencies": {
37
- "@salesforce/lds-bindings": "^1.313.0",
38
- "@salesforce/lds-durable-records": "^1.313.0",
39
- "@salesforce/lds-instrumentation": "^1.313.0",
37
+ "@salesforce/lds-bindings": "^1.314.0",
38
+ "@salesforce/lds-durable-records": "^1.314.0",
39
+ "@salesforce/lds-instrumentation": "^1.314.0",
40
40
  "@salesforce/user": "0.0.21",
41
41
  "o11y": "250.7.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@salesforce/lds-network-aura": "^1.313.0",
45
- "@salesforce/lds-runtime-aura": "^1.313.0",
46
- "@salesforce/lds-store-nimbus": "^1.313.0",
47
- "@salesforce/nimbus-plugin-lds": "^1.313.0",
44
+ "@salesforce/lds-network-aura": "^1.314.0",
45
+ "@salesforce/lds-runtime-aura": "^1.314.0",
46
+ "@salesforce/lds-store-nimbus": "^1.314.0",
47
+ "@salesforce/nimbus-plugin-lds": "^1.314.0",
48
48
  "babel-plugin-dynamic-import-node": "^2.3.3"
49
49
  },
50
50
  "luvioBundlesize": [