@salesforce/lds-runtime-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.
@@ -11,11 +11,11 @@
11
11
  * Any changes made to this file in p4 will be automatically overwritten.
12
12
  * *******************************************************************************************
13
13
  */
14
- import { register, setDefaultLuvio } from 'force/ldsEngine';
14
+ import { setDefaultLuvio } from 'force/ldsEngine';
15
15
  import { setBypassDeepFreeze, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, InMemoryStore, Environment, Luvio } from 'force/luvioEngine';
16
16
  import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio } from 'force/ldsInstrumentation';
17
- import { instrument as instrument$1 } from 'force/ldsBindings';
18
- import 'force/ldsGraphqlParser';
17
+ import { instrument } from 'force/ldsBindings';
18
+ import { extractRecordIdFromStoreKey, RECORD_VIEW_ENTITY_ID_PREFIX, isStoreKeyRecordViewEntity, keyBuilderRecord, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION } from 'force/ldsAdaptersUiapi';
19
19
  import networkAdapter from 'force/ldsNetwork';
20
20
  import ldsEngineCreator from 'force/ldsEngineCreator';
21
21
 
@@ -41,7 +41,7 @@ const RedirectDurableSegment = 'REDIRECT_KEYS';
41
41
  const MessagingDurableSegment = 'MESSAGING';
42
42
  const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
43
43
 
44
- const { keys: keys$3, create: create$3, assign: assign$3, freeze: freeze$2 } = Object;
44
+ const { keys: keys$2, create: create$2, assign: assign$2, freeze: freeze$1 } = Object;
45
45
 
46
46
  //Durable store error instrumentation key
47
47
  const DURABLE_STORE_ERROR = 'durable-store-error';
@@ -91,7 +91,7 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
91
91
  if (durableRecords === undefined) {
92
92
  return { revivedKeys, hadUnexpectedShape };
93
93
  }
94
- const durableKeys = keys$3(durableRecords);
94
+ const durableKeys = keys$2(durableRecords);
95
95
  if (durableKeys.length === 0) {
96
96
  // no records to revive
97
97
  return { revivedKeys, hadUnexpectedShape };
@@ -276,7 +276,7 @@ class DurableTTLStore {
276
276
  overrides,
277
277
  };
278
278
  }
279
- const keys$1 = keys$3(entries);
279
+ const keys$1 = keys$2(entries);
280
280
  for (let i = 0, len = keys$1.length; i < len; i++) {
281
281
  const key = keys$1[i];
282
282
  const entry = entries[key];
@@ -298,14 +298,14 @@ class DurableTTLStore {
298
298
  }
299
299
 
300
300
  function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
301
- const durableRecords = create$3(null);
302
- const refreshedDurableRecords = create$3(null);
303
- const evictedRecords = create$3(null);
301
+ const durableRecords = create$2(null);
302
+ const refreshedDurableRecords = create$2(null);
303
+ const evictedRecords = create$2(null);
304
304
  const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
305
305
  // TODO: W-8909393 Once metadata is stored in its own segment we need to
306
306
  // call setEntries for the visitedIds on default segment and call setEntries
307
307
  // on the metadata segment for the refreshedIds
308
- const keys$1 = keys$3({ ...visitedIds, ...refreshedIds });
308
+ const keys$1 = keys$2({ ...visitedIds, ...refreshedIds });
309
309
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
310
310
  const key = keys$1[i];
311
311
  const canonicalKey = store.getCanonicalRecordId(key);
@@ -337,7 +337,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
337
337
  }
338
338
  }
339
339
  const durableStoreOperations = additionalDurableStoreOperations;
340
- const recordKeys = keys$3(durableRecords);
340
+ const recordKeys = keys$2(durableRecords);
341
341
  if (recordKeys.length > 0) {
342
342
  // publishes with data
343
343
  durableStoreOperations.push({
@@ -346,7 +346,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
346
346
  segment: DefaultDurableSegment,
347
347
  });
348
348
  }
349
- const refreshKeys = keys$3(refreshedDurableRecords);
349
+ const refreshKeys = keys$2(refreshedDurableRecords);
350
350
  if (refreshKeys.length > 0) {
351
351
  // publishes with only metadata updates
352
352
  durableStoreOperations.push({
@@ -368,7 +368,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
368
368
  });
369
369
  });
370
370
  // evicts
371
- const evictedKeys = keys$3(evictedRecords);
371
+ const evictedKeys = keys$2(evictedRecords);
372
372
  if (evictedKeys.length > 0) {
373
373
  durableStoreOperations.push({
374
374
  type: 'evictEntries',
@@ -472,7 +472,7 @@ function buildRevivingStagingStore(upstreamStore) {
472
472
  // A reviving store is only "active" during a call to `environment.storeLookup`, and will
473
473
  // be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
474
474
  // the reviving store becomes inactive other than receiving change notifications.
475
- return create$3(upstreamStore, {
475
+ return create$2(upstreamStore, {
476
476
  readEntry: { value: readEntry },
477
477
  markStale: { value: markStale },
478
478
  clearStale: { value: clearStale },
@@ -484,7 +484,7 @@ const AdapterContextSegment = 'ADAPTER-CONTEXT';
484
484
  const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
485
485
  async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
486
486
  // initialize empty context store
487
- contextStores[adapterId] = create$3(null);
487
+ contextStores[adapterId] = create$2(null);
488
488
  const context = {
489
489
  set(key, value) {
490
490
  contextStores[adapterId][key] = value;
@@ -549,7 +549,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
549
549
  const revivingStores = new Set();
550
550
  // redirects that need to be flushed to the durable store
551
551
  const pendingStoreRedirects = new Map();
552
- const contextStores = create$3(null);
552
+ const contextStores = create$2(null);
553
553
  let initializationPromise = new Promise((resolve) => {
554
554
  const finish = () => {
555
555
  resolve();
@@ -626,7 +626,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
626
626
  try {
627
627
  const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
628
628
  if (entries !== undefined) {
629
- const entryKeys = keys$3(entries);
629
+ const entryKeys = keys$2(entries);
630
630
  for (let i = 0, len = entryKeys.length; i < len; i++) {
631
631
  const entryKey = entryKeys[i];
632
632
  const entry = entries[entryKey];
@@ -661,7 +661,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
661
661
  if (filteredKeys.length > 0) {
662
662
  const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
663
663
  if (entries !== undefined) {
664
- const entryKeys = keys$3(entries);
664
+ const entryKeys = keys$2(entries);
665
665
  for (let i = 0, len = entryKeys.length; i < len; i++) {
666
666
  const entryKey = entryKeys[i];
667
667
  const { metadata } = entries[entryKey];
@@ -1033,7 +1033,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1033
1033
  validateNotDisposed();
1034
1034
  const entryKeys = keys$1.map(serializeStructuredKey);
1035
1035
  const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
1036
- if (entries === undefined || keys$3(entries).length === 0) {
1036
+ if (entries === undefined || keys$2(entries).length === 0) {
1037
1037
  return environment.notifyStoreUpdateAvailable(keys$1);
1038
1038
  }
1039
1039
  const now = Date.now();
@@ -1085,7 +1085,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1085
1085
  const metadataKeys = keys$1.map(serializeStructuredKey);
1086
1086
  const now = Date.now();
1087
1087
  const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
1088
- if (entries === undefined || keys$3(entries).length === 0) {
1088
+ if (entries === undefined || keys$2(entries).length === 0) {
1089
1089
  return environment.expirePossibleStaleRecords(keys$1);
1090
1090
  }
1091
1091
  let metaDataChanged = false;
@@ -1111,7 +1111,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1111
1111
  type: 'stale-while-revalidate',
1112
1112
  staleDurationSeconds: Number.MAX_SAFE_INTEGER,
1113
1113
  });
1114
- return create$3(environment, {
1114
+ return create$2(environment, {
1115
1115
  publishStoreMetadata: { value: publishStoreMetadata },
1116
1116
  storeIngest: { value: storeIngest },
1117
1117
  storeIngestError: { value: storeIngestError },
@@ -1142,7 +1142,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1142
1142
  });
1143
1143
  }
1144
1144
 
1145
- const { keys: keys$2, create: create$2, assign: assign$2, entries: entries$1, values: values$1 } = Object;
1145
+ const { keys: keys$1, create: create$1, assign: assign$1, entries: entries$1, values: values$1 } = Object;
1146
1146
  const { stringify, parse } = JSON;
1147
1147
 
1148
1148
  function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
@@ -1209,7 +1209,7 @@ class LdsDataTable {
1209
1209
  },
1210
1210
  conflictColumns: this.conflictColumnNames,
1211
1211
  columns: this.columnNames,
1212
- rows: keys$2(entries).reduce((rows, key) => {
1212
+ rows: keys$1(entries).reduce((rows, key) => {
1213
1213
  const entry = entries[key];
1214
1214
  const { data, metadata } = entry;
1215
1215
  const row = [key, stringify(data), metadata ? stringify(metadata) : null];
@@ -1228,7 +1228,7 @@ class LdsDataTable {
1228
1228
  type: 'setMetadata',
1229
1229
  },
1230
1230
  columns: [COLUMN_NAME_METADATA$1],
1231
- values: keys$2(entries).reduce((values, key) => {
1231
+ values: keys$1(entries).reduce((values, key) => {
1232
1232
  const { metadata } = entries[key];
1233
1233
  const row = [metadata ? stringify(metadata) : null];
1234
1234
  values[key] = row;
@@ -1318,7 +1318,7 @@ class LdsInternalDataTable {
1318
1318
  },
1319
1319
  conflictColumns: this.conflictColumnNames,
1320
1320
  columns: this.columnNames,
1321
- rows: keys$2(entries).reduce((rows, key) => {
1321
+ rows: keys$1(entries).reduce((rows, key) => {
1322
1322
  const entry = entries[key];
1323
1323
  const { data, metadata } = entry;
1324
1324
  const row = [key, stringify(data)];
@@ -1344,7 +1344,7 @@ class LdsInternalDataTable {
1344
1344
  type: 'setMetadata',
1345
1345
  },
1346
1346
  columns: [COLUMN_NAME_METADATA],
1347
- values: keys$2(entries).reduce((values, key) => {
1347
+ values: keys$1(entries).reduce((values, key) => {
1348
1348
  const { metadata } = entries[key];
1349
1349
  const row = [metadata ? stringify(metadata) : null];
1350
1350
  values[key] = row;
@@ -1353,7 +1353,7 @@ class LdsInternalDataTable {
1353
1353
  };
1354
1354
  }
1355
1355
  metadataToUpdateSQLQueries(entries, segment) {
1356
- return keys$2(entries).reduce((accu, key) => {
1356
+ return keys$1(entries).reduce((accu, key) => {
1357
1357
  const { metadata } = entries[key];
1358
1358
  if (metadata !== undefined) {
1359
1359
  accu.push({
@@ -1424,7 +1424,7 @@ class NimbusSqliteStore {
1424
1424
  return this.getTable(segment).getAll(segment);
1425
1425
  }
1426
1426
  setEntries(entries, segment) {
1427
- if (keys$2(entries).length === 0) {
1427
+ if (keys$1(entries).length === 0) {
1428
1428
  return Promise.resolve();
1429
1429
  }
1430
1430
  const table = this.getTable(segment);
@@ -1432,7 +1432,7 @@ class NimbusSqliteStore {
1432
1432
  return this.batchOperationAsPromise([upsertOperation]);
1433
1433
  }
1434
1434
  setMetadata(entries, segment) {
1435
- if (keys$2(entries).length === 0) {
1435
+ if (keys$1(entries).length === 0) {
1436
1436
  return Promise.resolve();
1437
1437
  }
1438
1438
  const table = this.getTable(segment);
@@ -1451,13 +1451,13 @@ class NimbusSqliteStore {
1451
1451
  batchOperations(operations) {
1452
1452
  const sqliteOperations = operations.reduce((acc, cur) => {
1453
1453
  if (cur.type === 'setEntries') {
1454
- if (keys$2(cur.entries).length > 0) {
1454
+ if (keys$1(cur.entries).length > 0) {
1455
1455
  const table = this.getTable(cur.segment);
1456
1456
  acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
1457
1457
  }
1458
1458
  }
1459
1459
  else if (cur.type === 'setMetadata') {
1460
- if (keys$2(cur.entries).length > 0) {
1460
+ if (keys$1(cur.entries).length > 0) {
1461
1461
  const table = this.getTable(cur.segment);
1462
1462
  if (this.supportsBatchUpdates) {
1463
1463
  acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
@@ -1565,7 +1565,7 @@ function instrumentAdapter(adapter, metadata) {
1565
1565
  }
1566
1566
  function setupMobileInstrumentation(luvio, store) {
1567
1567
  setupInstrumentation(luvio, store);
1568
- instrument$1({ instrumentAdapter });
1568
+ instrument({ instrumentAdapter });
1569
1569
  }
1570
1570
 
1571
1571
  /**
@@ -1575,773 +1575,6 @@ function setupMobileInstrumentation(luvio, store) {
1575
1575
  */
1576
1576
 
1577
1577
 
1578
- /**
1579
- * Defines configuration for the module with a default value which can be overridden by the runtime environment.
1580
- */
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();
1601
- /**
1602
- * Depth to which tracked fields will be added to a request that results from a cache miss.
1603
- * A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
1604
- * be reached by following 1 relationship from the root record, etc.
1605
- * @defaultValue '5', replicates the current behavior
1606
- */
1607
- let trackedFieldDepthOnCacheMiss = 5;
1608
- /**
1609
- * Depth to which tracked fields will be added to a request that results from a merge conflict
1610
- * A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
1611
- * be reached by following 1 relationship from the root record, etc.
1612
- * @defaultValue '5', replicates the current behavior
1613
- */
1614
- let trackedFieldDepthOnCacheMergeConflict = 5;
1615
- /**
1616
- * Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
1617
- * A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
1618
- * be reached by following 1 relationship from the root record, etc.
1619
- * @defaultValue '5', replicates the current behavior
1620
- */
1621
- let trackedFieldDepthOnNotifyChange = 5;
1622
- /**
1623
- * Determines if we will only fetch the 'Id' field for the leaf relationship record
1624
- * @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
1625
- */
1626
- let trackedFieldLeafNodeIdAndNameOnly = false;
1627
- /**
1628
- * One store enabled Get Object Info adapter
1629
- */
1630
- let oneStoreGetObjectInfoAdapter = undefined;
1631
- /**
1632
- * One store enabled Get Object Infos adapter
1633
- */
1634
- let oneStoreGetObjectInfosAdapter = undefined;
1635
- /**
1636
- * Determines when to include PDL strategies for Related Lists
1637
- */
1638
- let relatedListsPredictionsEnabled = false;
1639
- /**
1640
- * Defines the configuration API and is exposed internally as well as externally.
1641
- * Configuration for one store enabled REST adapters only.
1642
- */
1643
- const configurationForOneStoreEnabledAdapters = {
1644
- setGetObjectInfoAdapter: function (adapter) {
1645
- oneStoreGetObjectInfoAdapter = adapter;
1646
- },
1647
- getGetObjectInfoAdapter: function () {
1648
- return oneStoreGetObjectInfoAdapter;
1649
- },
1650
- setGetObjectInfosAdapter: function (adapter) {
1651
- oneStoreGetObjectInfosAdapter = adapter;
1652
- },
1653
- getGetObjectInfosAdapter: function () {
1654
- return oneStoreGetObjectInfosAdapter;
1655
- },
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
- };
1703
- /**
1704
- * Defines the configuration API and is exposed internally as well as externally.
1705
- * Configuration for REST adapters only.
1706
- */
1707
- const configurationForRestAdapters = {
1708
- setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
1709
- trackedFieldDepthOnCacheMiss = trackedFieldDepthOnCacheMissParam;
1710
- },
1711
- getTrackedFieldDepthOnCacheMiss: function () {
1712
- return trackedFieldDepthOnCacheMiss;
1713
- },
1714
- setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
1715
- trackedFieldDepthOnCacheMergeConflict = trackedFieldDepthOnCacheMergeConflictParam;
1716
- },
1717
- getTrackedFieldDepthOnCacheMergeConflict: function () {
1718
- return trackedFieldDepthOnCacheMergeConflict;
1719
- },
1720
- setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
1721
- trackedFieldDepthOnNotifyChange = trackedFieldDepthOnNotifyChangeParam;
1722
- },
1723
- getTrackedFieldDepthOnNotifyChange: function () {
1724
- return trackedFieldDepthOnNotifyChange;
1725
- },
1726
- setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
1727
- trackedFieldLeafNodeIdAndNameOnly = trackedFieldLeafNodeIdAndNameOnlyParam;
1728
- },
1729
- getTrackedFieldLeafNodeIdAndNameOnly: function () {
1730
- return trackedFieldLeafNodeIdAndNameOnly;
1731
- },
1732
- setRelatedListsPredictionsEnabled: function (f) {
1733
- relatedListsPredictionsEnabled = f;
1734
- },
1735
- areRelatedListsPredictionsEnabled: function () {
1736
- return relatedListsPredictionsEnabled === true;
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,
1756
- // createContentVersion
1757
- getDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.getAdapter,
1758
- setDraftAwareCreateContentVersionAdapter: configurableCreateContentVersion.setAdapter,
1759
- ...configurationForOneStoreEnabledAdapters,
1760
- ...configurationForEnvironmentFactoryOverrides,
1761
- };
1762
- let configurableGraphQLAdapter = new Configurable();
1763
- let configurableGraphQLBatchAdapter = new Configurable();
1764
- /**
1765
- * Defines the configuration API and is exposed internally as well as externally.
1766
- * Configuration for GraphQL adapters only.
1767
- */
1768
- const configurationForGraphQLAdapters = {
1769
- getDraftAwareGraphQLAdapter: configurableGraphQLAdapter.getAdapter,
1770
- setDraftAwareGraphQLAdapter: configurableGraphQLAdapter.setAdapter,
1771
- getEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.getAdapter,
1772
- setEnvironmentAwareGraphQLBatchAdapter: configurableGraphQLBatchAdapter.setAdapter,
1773
- };
1774
- const registrations = new Set();
1775
- /**
1776
- * lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
1777
- * yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
1778
- * both REST and GQL configs. We want each SFDC bundle to register (we don't want one
1779
- * SFDC bundle to assume the other is being loaded and therefore the other one will
1780
- * take care of registration) but we don't want to double register either.
1781
- *
1782
- * So we make this function that memoizes if it's been called before and only
1783
- * actually registers once.
1784
- */
1785
- function ensureRegisteredOnce(registration) {
1786
- const { id } = registration;
1787
- if (!registrations.has(id)) {
1788
- register(registration);
1789
- registrations.add(id);
1790
- }
1791
- }
1792
-
1793
- // For use by callers within this module to instrument interesting things.
1794
- let instrumentation = {
1795
- /**
1796
- * Called when a set of record conflicts has been fully resolved. The
1797
- * parameter indicates the number of server requests that were needed
1798
- * to fully resolve all the record conflicts.
1799
- */
1800
- recordConflictsResolved: (_serverRequestCount) => { },
1801
- /**
1802
- * Called during merging of incoming and existing FieldValues.
1803
- * Called when the incoming FieldValue display value is null.
1804
- *
1805
- * Note: Temporary instrumentation to capture distribution and frequency, W-8990630
1806
- * Flipped to counter metric due to W-9611107
1807
- */
1808
- nullDisplayValueConflict: (_fieldInfo) => { },
1809
- /**
1810
- * SFDC Throttling
1811
- * getRecordNotifyChange and notifyRecordUpdateAvailable are both throttled
1812
- */
1813
- getRecordNotifyChangeAllowed: () => { },
1814
- getRecordNotifyChangeDropped: () => { },
1815
- notifyRecordUpdateAvailableAllowed: () => { },
1816
- notifyRecordUpdateAvailableDropped: () => { },
1817
- /**
1818
- * RecordRepresentation merge
1819
- * Called when records change apiName
1820
- */
1821
- recordApiNameChanged: (_existingApiName, _incomingApiName) => { },
1822
- recordTypeIdIsNull: (_apiName) => { },
1823
- /**
1824
- * RecordRepresentation merge
1825
- * Called when either incoming or existing RecordRepresentation has a weakEtag=0
1826
- */
1827
- weakEtagZero: (_incomingWeakEtagZero, _existingWeakEtagZero, _apiName) => { },
1828
- /**
1829
- * getRecord notifyChangeFactory
1830
- * Called when dispatchResourceRequest is resolved/rejected
1831
- */
1832
- getRecordNotifyChangeNetworkResult: (_uniqueWeakEtags, _error) => { },
1833
- };
1834
- /**
1835
- * Allows external modules (typically a runtime environment) to set
1836
- * instrumentation hooks for this module. Note that the hooks are
1837
- * incremental - hooks not suppiled in newInstrumentation will retain
1838
- * their previous values. The default instrumentation hooks are no-ops.
1839
- *
1840
- * @param newInstrumentation instrumentation hooks to be overridden
1841
- */
1842
- function instrument(newInstrumentation) {
1843
- instrumentation = Object.assign(instrumentation, newInstrumentation);
1844
- }
1845
- const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
1846
- function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
1847
- return {
1848
- name,
1849
- required,
1850
- resourceType,
1851
- typeCheckShape,
1852
- isArrayShape,
1853
- coerceFn,
1854
- };
1855
- }
1856
- function buildAdapterValidationConfig(displayName, paramsMeta) {
1857
- const required = paramsMeta.filter(p => p.required).map(p => p.name);
1858
- const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
1859
- return {
1860
- displayName,
1861
- parameters: {
1862
- required,
1863
- optional,
1864
- }
1865
- };
1866
- }
1867
- const keyPrefix = 'UiApi';
1868
-
1869
- const { assign: assign$1, create: create$1, freeze: freeze$1, isFrozen, keys: keys$1 } = Object;
1870
- const { isArray } = Array;
1871
- const { concat, filter, includes, push, reduce } = Array.prototype;
1872
-
1873
- function isString(value) {
1874
- return typeof value === 'string';
1875
- }
1876
- /**
1877
- * @param value The array to dedupe
1878
- * @returns An array without duplicates.
1879
- */
1880
- function dedupe(value) {
1881
- const result = {};
1882
- for (let i = 0, len = value.length; i < len; i += 1) {
1883
- result[value[i]] = true;
1884
- }
1885
- return keys$1(result);
1886
- }
1887
-
1888
- function isObjectId(unknown) {
1889
- if (typeof unknown !== 'object' || unknown === null) {
1890
- return false;
1891
- }
1892
- return isString(unknown.objectApiName);
1893
- }
1894
-
1895
- /**
1896
- * Returns the object API name.
1897
- * @param value The value from which to get the object API name.
1898
- * @returns The object API name.
1899
- */
1900
- function getObjectApiName$1(value) {
1901
- // Note: tightening validation logic changes behavior from userland getting
1902
- // a server-provided error to the adapter noop'ing. In 224 we decided to not
1903
- // change the behavior.
1904
- if (typeof value === 'string') {
1905
- const trimmed = value.trim();
1906
- if (trimmed.length > 0) {
1907
- return trimmed;
1908
- }
1909
- }
1910
- else if (isObjectId(value)) {
1911
- return value.objectApiName.trim();
1912
- }
1913
- return undefined;
1914
- }
1915
-
1916
- function isFieldId(unknown) {
1917
- if (typeof unknown !== 'object' || unknown === null) {
1918
- return false;
1919
- }
1920
- const value = unknown;
1921
- return isString(value.objectApiName) && isString(value.fieldApiName);
1922
- }
1923
-
1924
- /**
1925
- * Returns the field API name, qualified with an object name if possible.
1926
- * @param value The value from which to get the qualified field API name.
1927
- * @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
1928
- * @return The qualified field API name.
1929
- */
1930
- function getFieldApiName(value, onlyQualifiedFieldNames = false) {
1931
- // Note: tightening validation logic changes behavior from userland getting
1932
- // a server-provided error to the adapter noop'ing. In 224 we decided to not
1933
- // change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
1934
- // optionally to avoid issues with persisted invalid field names.
1935
- if (isString(value)) {
1936
- const trimmed = value.trim();
1937
- if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
1938
- return trimmed;
1939
- }
1940
- }
1941
- else if (isFieldId(value)) {
1942
- return value.objectApiName + '.' + value.fieldApiName;
1943
- }
1944
- return undefined;
1945
- }
1946
-
1947
- /**
1948
- * Returns the field API name.
1949
- * @param value The value from which to get the field API name.
1950
- * @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
1951
- * @returns The field API name.
1952
- */
1953
- function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
1954
- const valueArray = isArray(value) ? value : [value];
1955
- const array = [];
1956
- for (let i = 0, len = valueArray.length; i < len; i += 1) {
1957
- const item = valueArray[i];
1958
- const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
1959
- if (apiName === undefined) {
1960
- if (options.onlyQualifiedFieldNames) {
1961
- continue; // Just skips invalid field names rather than failing to return an array at all
1962
- }
1963
- return undefined;
1964
- }
1965
- push.call(array, apiName);
1966
- }
1967
- if (array.length === 0) {
1968
- return undefined;
1969
- }
1970
- return dedupe(array).sort();
1971
- }
1972
- const RepresentationType$_ = 'RecordRepresentation';
1973
- function keyBuilder$3A(luvio, config) {
1974
- return keyPrefix + '::' + RepresentationType$_ + ':' + config.recordId;
1975
- }
1976
- freeze$1({
1977
- name: '',
1978
- children: {},
1979
- });
1980
-
1981
- ObjectCreate$1(null);
1982
-
1983
- ObjectCreate$1(null);
1984
-
1985
- const adapterName$10 = 'getListUiByApiName';
1986
- const getListUiByApiName_ConfigPropertyMetadata = [
1987
- generateParamConfigMetadata('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
1988
- generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
1989
- generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
1990
- generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
1991
- generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
1992
- generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
1993
- generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
1994
- ];
1995
- const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$10, getListUiByApiName_ConfigPropertyMetadata);
1996
-
1997
- const adapterName$$ = 'getListUiByListViewId';
1998
- const getListUiByListViewId_ConfigPropertyMetadata = [
1999
- generateParamConfigMetadata('listViewId', true, 0 /* UrlParameter */, 0 /* String */),
2000
- generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2001
- generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2002
- generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
2003
- generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
2004
- generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2005
- ];
2006
- const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$$, getListUiByListViewId_ConfigPropertyMetadata);
2007
-
2008
- const adapterName$Z = 'getMruListUi';
2009
- const getMruListUi_ConfigPropertyMetadata = [
2010
- generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
2011
- generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2012
- generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2013
- generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
2014
- generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
2015
- generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
2016
- ];
2017
- const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$Z, getMruListUi_ConfigPropertyMetadata);
2018
- // make local copies of the adapter configs so we can ignore other getListUi config parameters to match
2019
- // lds222 behavior
2020
- ({
2021
- ...getMruListUi_ConfigPropertyNames,
2022
- parameters: {
2023
- ...getMruListUi_ConfigPropertyNames.parameters,
2024
- optional: [
2025
- ...getMruListUi_ConfigPropertyNames.parameters.optional,
2026
- 'listViewApiName',
2027
- 'listViewId',
2028
- ],
2029
- },
2030
- });
2031
- // make local copies of the adapter configs so we can have them ignore each other's config parameters
2032
- // to match lds222 behavior
2033
- ({
2034
- ...getListUiByApiName_ConfigPropertyNames,
2035
- parameters: {
2036
- ...getListUiByApiName_ConfigPropertyNames.parameters,
2037
- optional: [...getListUiByApiName_ConfigPropertyNames.parameters.optional, 'listViewId'],
2038
- },
2039
- });
2040
- ({
2041
- ...getListUiByListViewId_ConfigPropertyNames,
2042
- parameters: {
2043
- ...getListUiByListViewId_ConfigPropertyNames.parameters,
2044
- optional: [
2045
- ...getListUiByListViewId_ConfigPropertyNames.parameters.optional,
2046
- 'listViewApiName',
2047
- 'objectApiName',
2048
- ],
2049
- },
2050
- });
2051
-
2052
- var DiscriminatorValues$5;
2053
- (function (DiscriminatorValues) {
2054
- DiscriminatorValues["EmptySpace"] = "EmptySpace";
2055
- DiscriminatorValues["ReportChart"] = "ReportChart";
2056
- DiscriminatorValues["VisualforcePage"] = "VisualforcePage";
2057
- DiscriminatorValues["Canvas"] = "Canvas";
2058
- DiscriminatorValues["Field"] = "Field";
2059
- DiscriminatorValues["CustomLink"] = "CustomLink";
2060
- })(DiscriminatorValues$5 || (DiscriminatorValues$5 = {}));
2061
-
2062
- var LayoutMode;
2063
- (function (LayoutMode) {
2064
- LayoutMode["View"] = "View";
2065
- LayoutMode["Edit"] = "Edit";
2066
- LayoutMode["Create"] = "Create";
2067
- })(LayoutMode || (LayoutMode = {}));
2068
-
2069
- LayoutMode.View;
2070
-
2071
- var FormFactor;
2072
- (function (FormFactor) {
2073
- FormFactor["Large"] = "Large";
2074
- FormFactor["Medium"] = "Medium";
2075
- FormFactor["Small"] = "Small";
2076
- })(FormFactor || (FormFactor = {}));
2077
-
2078
- ObjectCreate$1(null);
2079
-
2080
- var LayoutType;
2081
- (function (LayoutType) {
2082
- LayoutType["Full"] = "Full";
2083
- LayoutType["Compact"] = "Compact";
2084
- })(LayoutType || (LayoutType = {}));
2085
-
2086
- ObjectCreate$1(null);
2087
-
2088
- ObjectCreate$1(null);
2089
-
2090
- const VERSION$1_ = "8d2032474fb4fabdf5cf4042be9042d9";
2091
- const select$2c = function WorkStepPicklistValueAttributeRepresentationSelect() {
2092
- const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
2093
- return {
2094
- kind: 'Fragment',
2095
- version: VERSION$1_,
2096
- private: [],
2097
- selections: [
2098
- ...AbstractPicklistValueAttributesRepresentationSelections,
2099
- {
2100
- name: 'sortOrder',
2101
- kind: 'Scalar'
2102
- },
2103
- {
2104
- name: 'statusCode',
2105
- kind: 'Scalar'
2106
- }
2107
- ]
2108
- };
2109
- };
2110
-
2111
- const VERSION$1Z = "53893a219bc0888951863f2c44317cac";
2112
- const select$2b = function LeadStatusPicklistValueAttributesRepresentationSelect() {
2113
- const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
2114
- return {
2115
- kind: 'Fragment',
2116
- version: VERSION$1Z,
2117
- private: [],
2118
- selections: [
2119
- ...AbstractPicklistValueAttributesRepresentationSelections,
2120
- {
2121
- name: 'converted',
2122
- kind: 'Scalar'
2123
- }
2124
- ]
2125
- };
2126
- };
2127
-
2128
- const VERSION$1Y = "4818ec07c499784571c1012ead048c88";
2129
- const select$2a = function CaseStatusPicklistValueAttributesRepresentationSelect() {
2130
- const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
2131
- return {
2132
- kind: 'Fragment',
2133
- version: VERSION$1Y,
2134
- private: [],
2135
- selections: [
2136
- ...AbstractPicklistValueAttributesRepresentationSelections,
2137
- {
2138
- name: 'closed',
2139
- kind: 'Scalar'
2140
- }
2141
- ]
2142
- };
2143
- };
2144
-
2145
- const VERSION$1X = "950a3a962acbd2b128f937d4c055a9d6";
2146
- const select$29 = function OpportunityStagePicklistValueAttributesRepresentationSelect() {
2147
- const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
2148
- return {
2149
- kind: 'Fragment',
2150
- version: VERSION$1X,
2151
- private: [],
2152
- selections: [
2153
- ...AbstractPicklistValueAttributesRepresentationSelections,
2154
- {
2155
- name: 'closed',
2156
- kind: 'Scalar'
2157
- },
2158
- {
2159
- name: 'defaultProbability',
2160
- kind: 'Scalar'
2161
- },
2162
- {
2163
- name: 'forecastCategoryName',
2164
- kind: 'Scalar'
2165
- },
2166
- {
2167
- name: 'won',
2168
- kind: 'Scalar'
2169
- }
2170
- ]
2171
- };
2172
- };
2173
-
2174
- var DiscriminatorValues$4;
2175
- (function (DiscriminatorValues) {
2176
- DiscriminatorValues["WorkStepStatus"] = "WorkStepStatus";
2177
- DiscriminatorValues["LeadStatus"] = "LeadStatus";
2178
- DiscriminatorValues["CaseStatus"] = "CaseStatus";
2179
- DiscriminatorValues["OpportunityStage"] = "OpportunityStage";
2180
- })(DiscriminatorValues$4 || (DiscriminatorValues$4 = {}));
2181
- const VERSION$1W = "bd523b2343366edfc25a2dbee2c4e986";
2182
- const selectChildren$2 = function AbstractPicklistValueAttributesRepresentationSelectChildren() {
2183
- const workStepPicklistValueAttributeRepresentationSelections = select$2c();
2184
- const leadStatusPicklistValueAttributesRepresentationSelections = select$2b();
2185
- const caseStatusPicklistValueAttributesRepresentationSelections = select$2a();
2186
- const opportunityStagePicklistValueAttributesRepresentationSelections = select$29();
2187
- return {
2188
- kind: 'Fragment',
2189
- union: true,
2190
- discriminator: 'picklistAtrributesValueType',
2191
- unionSelections: {
2192
- [DiscriminatorValues$4.WorkStepStatus]: workStepPicklistValueAttributeRepresentationSelections,
2193
- [DiscriminatorValues$4.LeadStatus]: leadStatusPicklistValueAttributesRepresentationSelections,
2194
- [DiscriminatorValues$4.CaseStatus]: caseStatusPicklistValueAttributesRepresentationSelections,
2195
- [DiscriminatorValues$4.OpportunityStage]: opportunityStagePicklistValueAttributesRepresentationSelections
2196
- }
2197
- };
2198
- };
2199
- const select$28 = function AbstractPicklistValueAttributesRepresentationSelect() {
2200
- return {
2201
- kind: 'Fragment',
2202
- version: VERSION$1W,
2203
- private: [],
2204
- selections: [
2205
- {
2206
- name: 'picklistAtrributesValueType',
2207
- kind: 'Scalar'
2208
- }
2209
- ]
2210
- };
2211
- };
2212
-
2213
- const VERSION$1V = "9e2a16a80378487f557124c771201cf9";
2214
- const select$27 = function PicklistValueRepresentationSelect() {
2215
- const AbstractPicklistValueAttributesRepresentation__unionSelections = selectChildren$2();
2216
- return {
2217
- kind: 'Fragment',
2218
- version: VERSION$1V,
2219
- private: [],
2220
- selections: [
2221
- {
2222
- kind: 'Object',
2223
- name: 'attributes',
2224
- discriminator: AbstractPicklistValueAttributesRepresentation__unionSelections.discriminator,
2225
- union: true,
2226
- nullable: true,
2227
- unionSelections: AbstractPicklistValueAttributesRepresentation__unionSelections.unionSelections
2228
- },
2229
- {
2230
- name: 'label',
2231
- kind: 'Scalar'
2232
- },
2233
- {
2234
- name: 'validFor',
2235
- kind: 'Scalar',
2236
- plural: true
2237
- },
2238
- {
2239
- name: 'value',
2240
- kind: 'Scalar'
2241
- }
2242
- ]
2243
- };
2244
- };
2245
- const VERSION$1U = "0a361a49370acb4c6a31721a2057649a";
2246
- const select$26 = function PicklistValuesRepresentationSelect() {
2247
- const { selections: PicklistValueRepresentation__selections, opaque: PicklistValueRepresentation__opaque, } = select$27();
2248
- return {
2249
- kind: 'Fragment',
2250
- version: VERSION$1U,
2251
- private: [
2252
- 'eTag'
2253
- ],
2254
- selections: [
2255
- {
2256
- name: 'controllerValues',
2257
- kind: 'Scalar',
2258
- map: true
2259
- },
2260
- {
2261
- name: 'defaultValue',
2262
- kind: 'Object',
2263
- nullable: true,
2264
- selections: PicklistValueRepresentation__selections
2265
- },
2266
- {
2267
- name: 'url',
2268
- kind: 'Scalar'
2269
- },
2270
- {
2271
- name: 'values',
2272
- kind: 'Object',
2273
- plural: true,
2274
- selections: PicklistValueRepresentation__selections
2275
- }
2276
- ]
2277
- };
2278
- };
2279
-
2280
- select$26().selections;
2281
-
2282
- var DiscriminatorValues$3;
2283
- (function (DiscriminatorValues) {
2284
- DiscriminatorValues["Photo"] = "Photo";
2285
- DiscriminatorValues["Theme"] = "Theme";
2286
- })(DiscriminatorValues$3 || (DiscriminatorValues$3 = {}));
2287
-
2288
- ObjectCreate$1(null);
2289
-
2290
- ObjectCreate$1(null);
2291
-
2292
- ObjectCreate$1(null);
2293
-
2294
- ObjectCreate$1(null);
2295
-
2296
- var DiscriminatorValues$1;
2297
- (function (DiscriminatorValues) {
2298
- DiscriminatorValues["Text"] = "Text";
2299
- DiscriminatorValues["Select"] = "Select";
2300
- })(DiscriminatorValues$1 || (DiscriminatorValues$1 = {}));
2301
-
2302
- var DiscriminatorValues;
2303
- (function (DiscriminatorValues) {
2304
- DiscriminatorValues["Field"] = "Field";
2305
- DiscriminatorValues["DataCategory"] = "DataCategory";
2306
- })(DiscriminatorValues || (DiscriminatorValues = {}));
2307
-
2308
- const API_NAMESPACE = 'UiApi';
2309
- const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
2310
- const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
2311
- const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
2312
- const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name:`;
2313
- const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
2314
- function extractRecordIdFromStoreKey(key) {
2315
- if (key === undefined ||
2316
- (key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
2317
- return undefined;
2318
- }
2319
- const parts = key.split(':');
2320
- return parts[parts.length - 1].split('_')[0];
2321
- }
2322
- function isStoreKeyRecordViewEntity(key) {
2323
- return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
2324
- key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
2325
- }
2326
- // The rest of this is copy-pasted. Sorry.
2327
- ObjectCreate$1(null);
2328
- ensureRegisteredOnce({
2329
- id: '@salesforce/lds-adapters-uiapi',
2330
- configuration: {
2331
- ...configurationForRestAdapters,
2332
- ...configurationForGraphQLAdapters,
2333
- ...configurationForOneStoreEnabledAdapters,
2334
- },
2335
- instrument,
2336
- });
2337
-
2338
- /**
2339
- * Copyright (c) 2022, Salesforce, Inc.,
2340
- * All rights reserved.
2341
- * For full license text, see the LICENSE.txt file
2342
- */
2343
-
2344
-
2345
1578
  const { keys, values, create, assign, freeze, entries } = Object;
2346
1579
 
2347
1580
  function buildRecordFieldStoreKey(recordKey, fieldName) {
@@ -2474,7 +1707,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
2474
1707
  if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
2475
1708
  return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
2476
1709
  }
2477
- return keyBuilder$3A(luvio, { recordId });
1710
+ return keyBuilderRecord(luvio, { recordId });
2478
1711
  }
2479
1712
  function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
2480
1713
  const getEntries = function (entries, segment) {
@@ -2756,4 +1989,4 @@ function ldsRuntimeBridge() {
2756
1989
  }
2757
1990
 
2758
1991
  export { ldsRuntimeBridge as default };
2759
- // version: 1.314.0-5a451c78cd
1992
+ // version: 1.316.0-fd56ed976d
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-bridge",
3
- "version": "1.314.0",
3
+ "version": "1.316.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.314.0",
38
- "@salesforce/lds-durable-records": "^1.314.0",
39
- "@salesforce/lds-instrumentation": "^1.314.0",
37
+ "@salesforce/lds-bindings": "^1.316.0",
38
+ "@salesforce/lds-durable-records": "^1.316.0",
39
+ "@salesforce/lds-instrumentation": "^1.316.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.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",
44
+ "@salesforce/lds-network-aura": "^1.316.0",
45
+ "@salesforce/lds-runtime-aura": "^1.316.0",
46
+ "@salesforce/lds-store-nimbus": "^1.316.0",
47
+ "@salesforce/nimbus-plugin-lds": "^1.316.0",
48
48
  "babel-plugin-dynamic-import-node": "^2.3.3"
49
49
  },
50
50
  "luvioBundlesize": [