@salesforce/lds-runtime-bridge 1.313.0 → 1.315.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.
- package/dist/ldsRuntimeBridge.js +34 -782
- package/package.json +8 -8
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* Any changes made to this file in p4 will be automatically overwritten.
|
|
12
12
|
* *******************************************************************************************
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
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
|
|
18
|
-
import 'force/
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
302
|
-
const refreshedDurableRecords = create$
|
|
303
|
-
const evictedRecords = create$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
1568
|
+
instrument({ instrumentAdapter });
|
|
1569
1569
|
}
|
|
1570
1570
|
|
|
1571
1571
|
/**
|
|
@@ -1575,754 +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
|
-
/**
|
|
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;
|
|
1609
|
-
/**
|
|
1610
|
-
* Depth to which tracked fields will be added to a request that results from a cache miss.
|
|
1611
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
1612
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
1613
|
-
* @defaultValue '5', replicates the current behavior
|
|
1614
|
-
*/
|
|
1615
|
-
let trackedFieldDepthOnCacheMiss = 5;
|
|
1616
|
-
/**
|
|
1617
|
-
* Depth to which tracked fields will be added to a request that results from a merge conflict
|
|
1618
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
1619
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
1620
|
-
* @defaultValue '5', replicates the current behavior
|
|
1621
|
-
*/
|
|
1622
|
-
let trackedFieldDepthOnCacheMergeConflict = 5;
|
|
1623
|
-
/**
|
|
1624
|
-
* Depth to which tracked fields will be added to a request that results from a notify change invocation by the consumer
|
|
1625
|
-
* A value of 0 inhibits the addition of tracked fields, 1 will add tracked fields that can
|
|
1626
|
-
* be reached by following 1 relationship from the root record, etc.
|
|
1627
|
-
* @defaultValue '5', replicates the current behavior
|
|
1628
|
-
*/
|
|
1629
|
-
let trackedFieldDepthOnNotifyChange = 5;
|
|
1630
|
-
/**
|
|
1631
|
-
* Determines if we will only fetch the 'Id' field for the leaf relationship record
|
|
1632
|
-
* @defaultValue 'false', replicates the current behavior and fetches all fields in the store for the leaf relationship record
|
|
1633
|
-
*/
|
|
1634
|
-
let trackedFieldLeafNodeIdAndNameOnly = false;
|
|
1635
|
-
/**
|
|
1636
|
-
* One store enabled Get Object Info adapter
|
|
1637
|
-
*/
|
|
1638
|
-
let oneStoreGetObjectInfoAdapter = undefined;
|
|
1639
|
-
/**
|
|
1640
|
-
* One store enabled Get Object Infos adapter
|
|
1641
|
-
*/
|
|
1642
|
-
let oneStoreGetObjectInfosAdapter = undefined;
|
|
1643
|
-
/**
|
|
1644
|
-
* Determines when to include PDL strategies for Related Lists
|
|
1645
|
-
*/
|
|
1646
|
-
let relatedListsPredictionsEnabled = false;
|
|
1647
|
-
/**
|
|
1648
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
1649
|
-
* Configuration for one store enabled REST adapters only.
|
|
1650
|
-
*/
|
|
1651
|
-
const configurationForOneStoreEnabledAdapters = {
|
|
1652
|
-
setGetObjectInfoAdapter: function (adapter) {
|
|
1653
|
-
oneStoreGetObjectInfoAdapter = adapter;
|
|
1654
|
-
},
|
|
1655
|
-
getGetObjectInfoAdapter: function () {
|
|
1656
|
-
return oneStoreGetObjectInfoAdapter;
|
|
1657
|
-
},
|
|
1658
|
-
setGetObjectInfosAdapter: function (adapter) {
|
|
1659
|
-
oneStoreGetObjectInfosAdapter = adapter;
|
|
1660
|
-
},
|
|
1661
|
-
getGetObjectInfosAdapter: function () {
|
|
1662
|
-
return oneStoreGetObjectInfosAdapter;
|
|
1663
|
-
},
|
|
1664
|
-
};
|
|
1665
|
-
/**
|
|
1666
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
1667
|
-
* Configuration for REST adapters only.
|
|
1668
|
-
*/
|
|
1669
|
-
const configurationForRestAdapters = {
|
|
1670
|
-
setTrackedFieldDepthOnCacheMiss: function (trackedFieldDepthOnCacheMissParam) {
|
|
1671
|
-
trackedFieldDepthOnCacheMiss = trackedFieldDepthOnCacheMissParam;
|
|
1672
|
-
},
|
|
1673
|
-
getTrackedFieldDepthOnCacheMiss: function () {
|
|
1674
|
-
return trackedFieldDepthOnCacheMiss;
|
|
1675
|
-
},
|
|
1676
|
-
setTrackedFieldDepthOnCacheMergeConflict: function (trackedFieldDepthOnCacheMergeConflictParam) {
|
|
1677
|
-
trackedFieldDepthOnCacheMergeConflict = trackedFieldDepthOnCacheMergeConflictParam;
|
|
1678
|
-
},
|
|
1679
|
-
getTrackedFieldDepthOnCacheMergeConflict: function () {
|
|
1680
|
-
return trackedFieldDepthOnCacheMergeConflict;
|
|
1681
|
-
},
|
|
1682
|
-
setTrackedFieldDepthOnNotifyChange: function (trackedFieldDepthOnNotifyChangeParam) {
|
|
1683
|
-
trackedFieldDepthOnNotifyChange = trackedFieldDepthOnNotifyChangeParam;
|
|
1684
|
-
},
|
|
1685
|
-
getTrackedFieldDepthOnNotifyChange: function () {
|
|
1686
|
-
return trackedFieldDepthOnNotifyChange;
|
|
1687
|
-
},
|
|
1688
|
-
setTrackedFieldLeafNodeIdAndNameOnly: function (trackedFieldLeafNodeIdAndNameOnlyParam) {
|
|
1689
|
-
trackedFieldLeafNodeIdAndNameOnly = trackedFieldLeafNodeIdAndNameOnlyParam;
|
|
1690
|
-
},
|
|
1691
|
-
getTrackedFieldLeafNodeIdAndNameOnly: function () {
|
|
1692
|
-
return trackedFieldLeafNodeIdAndNameOnly;
|
|
1693
|
-
},
|
|
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
|
-
setRelatedListsPredictionsEnabled: function (f) {
|
|
1723
|
-
relatedListsPredictionsEnabled = f;
|
|
1724
|
-
},
|
|
1725
|
-
areRelatedListsPredictionsEnabled: function () {
|
|
1726
|
-
return relatedListsPredictionsEnabled === true;
|
|
1727
|
-
},
|
|
1728
|
-
// createContentVersion
|
|
1729
|
-
setDraftAwareCreateContentVersionAdapter: function (adapter) {
|
|
1730
|
-
draftAwareCreateContentVersionAdapter = adapter;
|
|
1731
|
-
},
|
|
1732
|
-
getDraftAwareCreateContentVersionAdapter: function () {
|
|
1733
|
-
return draftAwareCreateContentVersionAdapter;
|
|
1734
|
-
},
|
|
1735
|
-
...configurationForOneStoreEnabledAdapters,
|
|
1736
|
-
};
|
|
1737
|
-
/**
|
|
1738
|
-
* Defines the configuration API and is exposed internally as well as externally.
|
|
1739
|
-
* Configuration for GraphQL adapters only.
|
|
1740
|
-
*/
|
|
1741
|
-
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
|
-
},
|
|
1754
|
-
};
|
|
1755
|
-
const registrations = new Set();
|
|
1756
|
-
/**
|
|
1757
|
-
* lds-adapter-uiapi is special. The non-SFDC bundle combines REST and GQL adapters,
|
|
1758
|
-
* yet for SFDC those are separate bundles. So non-SFDC bundle (./main.ts) registers
|
|
1759
|
-
* both REST and GQL configs. We want each SFDC bundle to register (we don't want one
|
|
1760
|
-
* SFDC bundle to assume the other is being loaded and therefore the other one will
|
|
1761
|
-
* take care of registration) but we don't want to double register either.
|
|
1762
|
-
*
|
|
1763
|
-
* So we make this function that memoizes if it's been called before and only
|
|
1764
|
-
* actually registers once.
|
|
1765
|
-
*/
|
|
1766
|
-
function ensureRegisteredOnce(registration) {
|
|
1767
|
-
const { id } = registration;
|
|
1768
|
-
if (!registrations.has(id)) {
|
|
1769
|
-
register(registration);
|
|
1770
|
-
registrations.add(id);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
// For use by callers within this module to instrument interesting things.
|
|
1775
|
-
let instrumentation = {
|
|
1776
|
-
/**
|
|
1777
|
-
* Called when a set of record conflicts has been fully resolved. The
|
|
1778
|
-
* parameter indicates the number of server requests that were needed
|
|
1779
|
-
* to fully resolve all the record conflicts.
|
|
1780
|
-
*/
|
|
1781
|
-
recordConflictsResolved: (_serverRequestCount) => { },
|
|
1782
|
-
/**
|
|
1783
|
-
* Called during merging of incoming and existing FieldValues.
|
|
1784
|
-
* Called when the incoming FieldValue display value is null.
|
|
1785
|
-
*
|
|
1786
|
-
* Note: Temporary instrumentation to capture distribution and frequency, W-8990630
|
|
1787
|
-
* Flipped to counter metric due to W-9611107
|
|
1788
|
-
*/
|
|
1789
|
-
nullDisplayValueConflict: (_fieldInfo) => { },
|
|
1790
|
-
/**
|
|
1791
|
-
* SFDC Throttling
|
|
1792
|
-
* getRecordNotifyChange and notifyRecordUpdateAvailable are both throttled
|
|
1793
|
-
*/
|
|
1794
|
-
getRecordNotifyChangeAllowed: () => { },
|
|
1795
|
-
getRecordNotifyChangeDropped: () => { },
|
|
1796
|
-
notifyRecordUpdateAvailableAllowed: () => { },
|
|
1797
|
-
notifyRecordUpdateAvailableDropped: () => { },
|
|
1798
|
-
/**
|
|
1799
|
-
* RecordRepresentation merge
|
|
1800
|
-
* Called when records change apiName
|
|
1801
|
-
*/
|
|
1802
|
-
recordApiNameChanged: (_existingApiName, _incomingApiName) => { },
|
|
1803
|
-
recordTypeIdIsNull: (_apiName) => { },
|
|
1804
|
-
/**
|
|
1805
|
-
* RecordRepresentation merge
|
|
1806
|
-
* Called when either incoming or existing RecordRepresentation has a weakEtag=0
|
|
1807
|
-
*/
|
|
1808
|
-
weakEtagZero: (_incomingWeakEtagZero, _existingWeakEtagZero, _apiName) => { },
|
|
1809
|
-
/**
|
|
1810
|
-
* getRecord notifyChangeFactory
|
|
1811
|
-
* Called when dispatchResourceRequest is resolved/rejected
|
|
1812
|
-
*/
|
|
1813
|
-
getRecordNotifyChangeNetworkResult: (_uniqueWeakEtags, _error) => { },
|
|
1814
|
-
};
|
|
1815
|
-
/**
|
|
1816
|
-
* Allows external modules (typically a runtime environment) to set
|
|
1817
|
-
* instrumentation hooks for this module. Note that the hooks are
|
|
1818
|
-
* incremental - hooks not suppiled in newInstrumentation will retain
|
|
1819
|
-
* their previous values. The default instrumentation hooks are no-ops.
|
|
1820
|
-
*
|
|
1821
|
-
* @param newInstrumentation instrumentation hooks to be overridden
|
|
1822
|
-
*/
|
|
1823
|
-
function instrument(newInstrumentation) {
|
|
1824
|
-
instrumentation = Object.assign(instrumentation, newInstrumentation);
|
|
1825
|
-
}
|
|
1826
|
-
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
1827
|
-
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
1828
|
-
return {
|
|
1829
|
-
name,
|
|
1830
|
-
required,
|
|
1831
|
-
resourceType,
|
|
1832
|
-
typeCheckShape,
|
|
1833
|
-
isArrayShape,
|
|
1834
|
-
coerceFn,
|
|
1835
|
-
};
|
|
1836
|
-
}
|
|
1837
|
-
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
1838
|
-
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
1839
|
-
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
1840
|
-
return {
|
|
1841
|
-
displayName,
|
|
1842
|
-
parameters: {
|
|
1843
|
-
required,
|
|
1844
|
-
optional,
|
|
1845
|
-
}
|
|
1846
|
-
};
|
|
1847
|
-
}
|
|
1848
|
-
const keyPrefix = 'UiApi';
|
|
1849
|
-
|
|
1850
|
-
const { assign: assign$1, create: create$1, freeze: freeze$1, isFrozen, keys: keys$1 } = Object;
|
|
1851
|
-
const { isArray } = Array;
|
|
1852
|
-
const { concat, filter, includes, push, reduce } = Array.prototype;
|
|
1853
|
-
|
|
1854
|
-
function isString(value) {
|
|
1855
|
-
return typeof value === 'string';
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* @param value The array to dedupe
|
|
1859
|
-
* @returns An array without duplicates.
|
|
1860
|
-
*/
|
|
1861
|
-
function dedupe(value) {
|
|
1862
|
-
const result = {};
|
|
1863
|
-
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
1864
|
-
result[value[i]] = true;
|
|
1865
|
-
}
|
|
1866
|
-
return keys$1(result);
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
function isObjectId(unknown) {
|
|
1870
|
-
if (typeof unknown !== 'object' || unknown === null) {
|
|
1871
|
-
return false;
|
|
1872
|
-
}
|
|
1873
|
-
return isString(unknown.objectApiName);
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Returns the object API name.
|
|
1878
|
-
* @param value The value from which to get the object API name.
|
|
1879
|
-
* @returns The object API name.
|
|
1880
|
-
*/
|
|
1881
|
-
function getObjectApiName$1(value) {
|
|
1882
|
-
// Note: tightening validation logic changes behavior from userland getting
|
|
1883
|
-
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
1884
|
-
// change the behavior.
|
|
1885
|
-
if (typeof value === 'string') {
|
|
1886
|
-
const trimmed = value.trim();
|
|
1887
|
-
if (trimmed.length > 0) {
|
|
1888
|
-
return trimmed;
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
else if (isObjectId(value)) {
|
|
1892
|
-
return value.objectApiName.trim();
|
|
1893
|
-
}
|
|
1894
|
-
return undefined;
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
function isFieldId(unknown) {
|
|
1898
|
-
if (typeof unknown !== 'object' || unknown === null) {
|
|
1899
|
-
return false;
|
|
1900
|
-
}
|
|
1901
|
-
const value = unknown;
|
|
1902
|
-
return isString(value.objectApiName) && isString(value.fieldApiName);
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
/**
|
|
1906
|
-
* Returns the field API name, qualified with an object name if possible.
|
|
1907
|
-
* @param value The value from which to get the qualified field API name.
|
|
1908
|
-
* @param onlyQualifiedFieldNames - Whether or not this function should skip fieldApiName that do not include the delimiter '.'
|
|
1909
|
-
* @return The qualified field API name.
|
|
1910
|
-
*/
|
|
1911
|
-
function getFieldApiName(value, onlyQualifiedFieldNames = false) {
|
|
1912
|
-
// Note: tightening validation logic changes behavior from userland getting
|
|
1913
|
-
// a server-provided error to the adapter noop'ing. In 224 we decided to not
|
|
1914
|
-
// change the behavior. In 250 we decided to add the 'onlyQualifiedFieldName' flag to tighten the logic
|
|
1915
|
-
// optionally to avoid issues with persisted invalid field names.
|
|
1916
|
-
if (isString(value)) {
|
|
1917
|
-
const trimmed = value.trim();
|
|
1918
|
-
if (trimmed.length > 0 && (onlyQualifiedFieldNames ? trimmed.indexOf('.') > -1 : true)) {
|
|
1919
|
-
return trimmed;
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
else if (isFieldId(value)) {
|
|
1923
|
-
return value.objectApiName + '.' + value.fieldApiName;
|
|
1924
|
-
}
|
|
1925
|
-
return undefined;
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
/**
|
|
1929
|
-
* Returns the field API name.
|
|
1930
|
-
* @param value The value from which to get the field API name.
|
|
1931
|
-
* @param options Option bag. onlyQualifiedFieldNames is a boolean that allows this function to skip returning invalid FieldApiNames.
|
|
1932
|
-
* @returns The field API name.
|
|
1933
|
-
*/
|
|
1934
|
-
function getFieldApiNamesArray(value, options = { onlyQualifiedFieldNames: false }) {
|
|
1935
|
-
const valueArray = isArray(value) ? value : [value];
|
|
1936
|
-
const array = [];
|
|
1937
|
-
for (let i = 0, len = valueArray.length; i < len; i += 1) {
|
|
1938
|
-
const item = valueArray[i];
|
|
1939
|
-
const apiName = getFieldApiName(item, options.onlyQualifiedFieldNames);
|
|
1940
|
-
if (apiName === undefined) {
|
|
1941
|
-
if (options.onlyQualifiedFieldNames) {
|
|
1942
|
-
continue; // Just skips invalid field names rather than failing to return an array at all
|
|
1943
|
-
}
|
|
1944
|
-
return undefined;
|
|
1945
|
-
}
|
|
1946
|
-
push.call(array, apiName);
|
|
1947
|
-
}
|
|
1948
|
-
if (array.length === 0) {
|
|
1949
|
-
return undefined;
|
|
1950
|
-
}
|
|
1951
|
-
return dedupe(array).sort();
|
|
1952
|
-
}
|
|
1953
|
-
const RepresentationType$_ = 'RecordRepresentation';
|
|
1954
|
-
function keyBuilder$3A(luvio, config) {
|
|
1955
|
-
return keyPrefix + '::' + RepresentationType$_ + ':' + config.recordId;
|
|
1956
|
-
}
|
|
1957
|
-
freeze$1({
|
|
1958
|
-
name: '',
|
|
1959
|
-
children: {},
|
|
1960
|
-
});
|
|
1961
|
-
|
|
1962
|
-
ObjectCreate$1(null);
|
|
1963
|
-
|
|
1964
|
-
ObjectCreate$1(null);
|
|
1965
|
-
|
|
1966
|
-
const adapterName$10 = 'getListUiByApiName';
|
|
1967
|
-
const getListUiByApiName_ConfigPropertyMetadata = [
|
|
1968
|
-
generateParamConfigMetadata('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1969
|
-
generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
|
|
1970
|
-
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1971
|
-
generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1972
|
-
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1973
|
-
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1974
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1975
|
-
];
|
|
1976
|
-
const getListUiByApiName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$10, getListUiByApiName_ConfigPropertyMetadata);
|
|
1977
|
-
|
|
1978
|
-
const adapterName$$ = 'getListUiByListViewId';
|
|
1979
|
-
const getListUiByListViewId_ConfigPropertyMetadata = [
|
|
1980
|
-
generateParamConfigMetadata('listViewId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1981
|
-
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1982
|
-
generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1983
|
-
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1984
|
-
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1985
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1986
|
-
];
|
|
1987
|
-
const getListUiByListViewId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$$, getListUiByListViewId_ConfigPropertyMetadata);
|
|
1988
|
-
|
|
1989
|
-
const adapterName$Z = 'getMruListUi';
|
|
1990
|
-
const getMruListUi_ConfigPropertyMetadata = [
|
|
1991
|
-
generateParamConfigMetadata('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1),
|
|
1992
|
-
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1993
|
-
generateParamConfigMetadata('optionalFields', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1994
|
-
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1995
|
-
generateParamConfigMetadata('pageToken', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1996
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */, true, getFieldApiNamesArray),
|
|
1997
|
-
];
|
|
1998
|
-
const getMruListUi_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$Z, getMruListUi_ConfigPropertyMetadata);
|
|
1999
|
-
// make local copies of the adapter configs so we can ignore other getListUi config parameters to match
|
|
2000
|
-
// lds222 behavior
|
|
2001
|
-
({
|
|
2002
|
-
...getMruListUi_ConfigPropertyNames,
|
|
2003
|
-
parameters: {
|
|
2004
|
-
...getMruListUi_ConfigPropertyNames.parameters,
|
|
2005
|
-
optional: [
|
|
2006
|
-
...getMruListUi_ConfigPropertyNames.parameters.optional,
|
|
2007
|
-
'listViewApiName',
|
|
2008
|
-
'listViewId',
|
|
2009
|
-
],
|
|
2010
|
-
},
|
|
2011
|
-
});
|
|
2012
|
-
// make local copies of the adapter configs so we can have them ignore each other's config parameters
|
|
2013
|
-
// to match lds222 behavior
|
|
2014
|
-
({
|
|
2015
|
-
...getListUiByApiName_ConfigPropertyNames,
|
|
2016
|
-
parameters: {
|
|
2017
|
-
...getListUiByApiName_ConfigPropertyNames.parameters,
|
|
2018
|
-
optional: [...getListUiByApiName_ConfigPropertyNames.parameters.optional, 'listViewId'],
|
|
2019
|
-
},
|
|
2020
|
-
});
|
|
2021
|
-
({
|
|
2022
|
-
...getListUiByListViewId_ConfigPropertyNames,
|
|
2023
|
-
parameters: {
|
|
2024
|
-
...getListUiByListViewId_ConfigPropertyNames.parameters,
|
|
2025
|
-
optional: [
|
|
2026
|
-
...getListUiByListViewId_ConfigPropertyNames.parameters.optional,
|
|
2027
|
-
'listViewApiName',
|
|
2028
|
-
'objectApiName',
|
|
2029
|
-
],
|
|
2030
|
-
},
|
|
2031
|
-
});
|
|
2032
|
-
|
|
2033
|
-
var DiscriminatorValues$5;
|
|
2034
|
-
(function (DiscriminatorValues) {
|
|
2035
|
-
DiscriminatorValues["EmptySpace"] = "EmptySpace";
|
|
2036
|
-
DiscriminatorValues["ReportChart"] = "ReportChart";
|
|
2037
|
-
DiscriminatorValues["VisualforcePage"] = "VisualforcePage";
|
|
2038
|
-
DiscriminatorValues["Canvas"] = "Canvas";
|
|
2039
|
-
DiscriminatorValues["Field"] = "Field";
|
|
2040
|
-
DiscriminatorValues["CustomLink"] = "CustomLink";
|
|
2041
|
-
})(DiscriminatorValues$5 || (DiscriminatorValues$5 = {}));
|
|
2042
|
-
|
|
2043
|
-
var LayoutMode;
|
|
2044
|
-
(function (LayoutMode) {
|
|
2045
|
-
LayoutMode["View"] = "View";
|
|
2046
|
-
LayoutMode["Edit"] = "Edit";
|
|
2047
|
-
LayoutMode["Create"] = "Create";
|
|
2048
|
-
})(LayoutMode || (LayoutMode = {}));
|
|
2049
|
-
|
|
2050
|
-
LayoutMode.View;
|
|
2051
|
-
|
|
2052
|
-
var FormFactor;
|
|
2053
|
-
(function (FormFactor) {
|
|
2054
|
-
FormFactor["Large"] = "Large";
|
|
2055
|
-
FormFactor["Medium"] = "Medium";
|
|
2056
|
-
FormFactor["Small"] = "Small";
|
|
2057
|
-
})(FormFactor || (FormFactor = {}));
|
|
2058
|
-
|
|
2059
|
-
ObjectCreate$1(null);
|
|
2060
|
-
|
|
2061
|
-
var LayoutType;
|
|
2062
|
-
(function (LayoutType) {
|
|
2063
|
-
LayoutType["Full"] = "Full";
|
|
2064
|
-
LayoutType["Compact"] = "Compact";
|
|
2065
|
-
})(LayoutType || (LayoutType = {}));
|
|
2066
|
-
|
|
2067
|
-
ObjectCreate$1(null);
|
|
2068
|
-
|
|
2069
|
-
ObjectCreate$1(null);
|
|
2070
|
-
|
|
2071
|
-
const VERSION$1_ = "8d2032474fb4fabdf5cf4042be9042d9";
|
|
2072
|
-
const select$2c = function WorkStepPicklistValueAttributeRepresentationSelect() {
|
|
2073
|
-
const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
|
|
2074
|
-
return {
|
|
2075
|
-
kind: 'Fragment',
|
|
2076
|
-
version: VERSION$1_,
|
|
2077
|
-
private: [],
|
|
2078
|
-
selections: [
|
|
2079
|
-
...AbstractPicklistValueAttributesRepresentationSelections,
|
|
2080
|
-
{
|
|
2081
|
-
name: 'sortOrder',
|
|
2082
|
-
kind: 'Scalar'
|
|
2083
|
-
},
|
|
2084
|
-
{
|
|
2085
|
-
name: 'statusCode',
|
|
2086
|
-
kind: 'Scalar'
|
|
2087
|
-
}
|
|
2088
|
-
]
|
|
2089
|
-
};
|
|
2090
|
-
};
|
|
2091
|
-
|
|
2092
|
-
const VERSION$1Z = "53893a219bc0888951863f2c44317cac";
|
|
2093
|
-
const select$2b = function LeadStatusPicklistValueAttributesRepresentationSelect() {
|
|
2094
|
-
const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
|
|
2095
|
-
return {
|
|
2096
|
-
kind: 'Fragment',
|
|
2097
|
-
version: VERSION$1Z,
|
|
2098
|
-
private: [],
|
|
2099
|
-
selections: [
|
|
2100
|
-
...AbstractPicklistValueAttributesRepresentationSelections,
|
|
2101
|
-
{
|
|
2102
|
-
name: 'converted',
|
|
2103
|
-
kind: 'Scalar'
|
|
2104
|
-
}
|
|
2105
|
-
]
|
|
2106
|
-
};
|
|
2107
|
-
};
|
|
2108
|
-
|
|
2109
|
-
const VERSION$1Y = "4818ec07c499784571c1012ead048c88";
|
|
2110
|
-
const select$2a = function CaseStatusPicklistValueAttributesRepresentationSelect() {
|
|
2111
|
-
const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
|
|
2112
|
-
return {
|
|
2113
|
-
kind: 'Fragment',
|
|
2114
|
-
version: VERSION$1Y,
|
|
2115
|
-
private: [],
|
|
2116
|
-
selections: [
|
|
2117
|
-
...AbstractPicklistValueAttributesRepresentationSelections,
|
|
2118
|
-
{
|
|
2119
|
-
name: 'closed',
|
|
2120
|
-
kind: 'Scalar'
|
|
2121
|
-
}
|
|
2122
|
-
]
|
|
2123
|
-
};
|
|
2124
|
-
};
|
|
2125
|
-
|
|
2126
|
-
const VERSION$1X = "950a3a962acbd2b128f937d4c055a9d6";
|
|
2127
|
-
const select$29 = function OpportunityStagePicklistValueAttributesRepresentationSelect() {
|
|
2128
|
-
const { selections: AbstractPicklistValueAttributesRepresentationSelections } = select$28();
|
|
2129
|
-
return {
|
|
2130
|
-
kind: 'Fragment',
|
|
2131
|
-
version: VERSION$1X,
|
|
2132
|
-
private: [],
|
|
2133
|
-
selections: [
|
|
2134
|
-
...AbstractPicklistValueAttributesRepresentationSelections,
|
|
2135
|
-
{
|
|
2136
|
-
name: 'closed',
|
|
2137
|
-
kind: 'Scalar'
|
|
2138
|
-
},
|
|
2139
|
-
{
|
|
2140
|
-
name: 'defaultProbability',
|
|
2141
|
-
kind: 'Scalar'
|
|
2142
|
-
},
|
|
2143
|
-
{
|
|
2144
|
-
name: 'forecastCategoryName',
|
|
2145
|
-
kind: 'Scalar'
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
name: 'won',
|
|
2149
|
-
kind: 'Scalar'
|
|
2150
|
-
}
|
|
2151
|
-
]
|
|
2152
|
-
};
|
|
2153
|
-
};
|
|
2154
|
-
|
|
2155
|
-
var DiscriminatorValues$4;
|
|
2156
|
-
(function (DiscriminatorValues) {
|
|
2157
|
-
DiscriminatorValues["WorkStepStatus"] = "WorkStepStatus";
|
|
2158
|
-
DiscriminatorValues["LeadStatus"] = "LeadStatus";
|
|
2159
|
-
DiscriminatorValues["CaseStatus"] = "CaseStatus";
|
|
2160
|
-
DiscriminatorValues["OpportunityStage"] = "OpportunityStage";
|
|
2161
|
-
})(DiscriminatorValues$4 || (DiscriminatorValues$4 = {}));
|
|
2162
|
-
const VERSION$1W = "bd523b2343366edfc25a2dbee2c4e986";
|
|
2163
|
-
const selectChildren$2 = function AbstractPicklistValueAttributesRepresentationSelectChildren() {
|
|
2164
|
-
const workStepPicklistValueAttributeRepresentationSelections = select$2c();
|
|
2165
|
-
const leadStatusPicklistValueAttributesRepresentationSelections = select$2b();
|
|
2166
|
-
const caseStatusPicklistValueAttributesRepresentationSelections = select$2a();
|
|
2167
|
-
const opportunityStagePicklistValueAttributesRepresentationSelections = select$29();
|
|
2168
|
-
return {
|
|
2169
|
-
kind: 'Fragment',
|
|
2170
|
-
union: true,
|
|
2171
|
-
discriminator: 'picklistAtrributesValueType',
|
|
2172
|
-
unionSelections: {
|
|
2173
|
-
[DiscriminatorValues$4.WorkStepStatus]: workStepPicklistValueAttributeRepresentationSelections,
|
|
2174
|
-
[DiscriminatorValues$4.LeadStatus]: leadStatusPicklistValueAttributesRepresentationSelections,
|
|
2175
|
-
[DiscriminatorValues$4.CaseStatus]: caseStatusPicklistValueAttributesRepresentationSelections,
|
|
2176
|
-
[DiscriminatorValues$4.OpportunityStage]: opportunityStagePicklistValueAttributesRepresentationSelections
|
|
2177
|
-
}
|
|
2178
|
-
};
|
|
2179
|
-
};
|
|
2180
|
-
const select$28 = function AbstractPicklistValueAttributesRepresentationSelect() {
|
|
2181
|
-
return {
|
|
2182
|
-
kind: 'Fragment',
|
|
2183
|
-
version: VERSION$1W,
|
|
2184
|
-
private: [],
|
|
2185
|
-
selections: [
|
|
2186
|
-
{
|
|
2187
|
-
name: 'picklistAtrributesValueType',
|
|
2188
|
-
kind: 'Scalar'
|
|
2189
|
-
}
|
|
2190
|
-
]
|
|
2191
|
-
};
|
|
2192
|
-
};
|
|
2193
|
-
|
|
2194
|
-
const VERSION$1V = "9e2a16a80378487f557124c771201cf9";
|
|
2195
|
-
const select$27 = function PicklistValueRepresentationSelect() {
|
|
2196
|
-
const AbstractPicklistValueAttributesRepresentation__unionSelections = selectChildren$2();
|
|
2197
|
-
return {
|
|
2198
|
-
kind: 'Fragment',
|
|
2199
|
-
version: VERSION$1V,
|
|
2200
|
-
private: [],
|
|
2201
|
-
selections: [
|
|
2202
|
-
{
|
|
2203
|
-
kind: 'Object',
|
|
2204
|
-
name: 'attributes',
|
|
2205
|
-
discriminator: AbstractPicklistValueAttributesRepresentation__unionSelections.discriminator,
|
|
2206
|
-
union: true,
|
|
2207
|
-
nullable: true,
|
|
2208
|
-
unionSelections: AbstractPicklistValueAttributesRepresentation__unionSelections.unionSelections
|
|
2209
|
-
},
|
|
2210
|
-
{
|
|
2211
|
-
name: 'label',
|
|
2212
|
-
kind: 'Scalar'
|
|
2213
|
-
},
|
|
2214
|
-
{
|
|
2215
|
-
name: 'validFor',
|
|
2216
|
-
kind: 'Scalar',
|
|
2217
|
-
plural: true
|
|
2218
|
-
},
|
|
2219
|
-
{
|
|
2220
|
-
name: 'value',
|
|
2221
|
-
kind: 'Scalar'
|
|
2222
|
-
}
|
|
2223
|
-
]
|
|
2224
|
-
};
|
|
2225
|
-
};
|
|
2226
|
-
const VERSION$1U = "0a361a49370acb4c6a31721a2057649a";
|
|
2227
|
-
const select$26 = function PicklistValuesRepresentationSelect() {
|
|
2228
|
-
const { selections: PicklistValueRepresentation__selections, opaque: PicklistValueRepresentation__opaque, } = select$27();
|
|
2229
|
-
return {
|
|
2230
|
-
kind: 'Fragment',
|
|
2231
|
-
version: VERSION$1U,
|
|
2232
|
-
private: [
|
|
2233
|
-
'eTag'
|
|
2234
|
-
],
|
|
2235
|
-
selections: [
|
|
2236
|
-
{
|
|
2237
|
-
name: 'controllerValues',
|
|
2238
|
-
kind: 'Scalar',
|
|
2239
|
-
map: true
|
|
2240
|
-
},
|
|
2241
|
-
{
|
|
2242
|
-
name: 'defaultValue',
|
|
2243
|
-
kind: 'Object',
|
|
2244
|
-
nullable: true,
|
|
2245
|
-
selections: PicklistValueRepresentation__selections
|
|
2246
|
-
},
|
|
2247
|
-
{
|
|
2248
|
-
name: 'url',
|
|
2249
|
-
kind: 'Scalar'
|
|
2250
|
-
},
|
|
2251
|
-
{
|
|
2252
|
-
name: 'values',
|
|
2253
|
-
kind: 'Object',
|
|
2254
|
-
plural: true,
|
|
2255
|
-
selections: PicklistValueRepresentation__selections
|
|
2256
|
-
}
|
|
2257
|
-
]
|
|
2258
|
-
};
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
|
-
select$26().selections;
|
|
2262
|
-
|
|
2263
|
-
var DiscriminatorValues$3;
|
|
2264
|
-
(function (DiscriminatorValues) {
|
|
2265
|
-
DiscriminatorValues["Photo"] = "Photo";
|
|
2266
|
-
DiscriminatorValues["Theme"] = "Theme";
|
|
2267
|
-
})(DiscriminatorValues$3 || (DiscriminatorValues$3 = {}));
|
|
2268
|
-
|
|
2269
|
-
ObjectCreate$1(null);
|
|
2270
|
-
|
|
2271
|
-
ObjectCreate$1(null);
|
|
2272
|
-
|
|
2273
|
-
ObjectCreate$1(null);
|
|
2274
|
-
|
|
2275
|
-
ObjectCreate$1(null);
|
|
2276
|
-
|
|
2277
|
-
var DiscriminatorValues$1;
|
|
2278
|
-
(function (DiscriminatorValues) {
|
|
2279
|
-
DiscriminatorValues["Text"] = "Text";
|
|
2280
|
-
DiscriminatorValues["Select"] = "Select";
|
|
2281
|
-
})(DiscriminatorValues$1 || (DiscriminatorValues$1 = {}));
|
|
2282
|
-
|
|
2283
|
-
var DiscriminatorValues;
|
|
2284
|
-
(function (DiscriminatorValues) {
|
|
2285
|
-
DiscriminatorValues["Field"] = "Field";
|
|
2286
|
-
DiscriminatorValues["DataCategory"] = "DataCategory";
|
|
2287
|
-
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
2288
|
-
|
|
2289
|
-
const API_NAMESPACE = 'UiApi';
|
|
2290
|
-
const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
|
|
2291
|
-
const RECORD_VIEW_ENTITY_REPRESENTATION_NAME = 'RecordViewEntityRepresentation';
|
|
2292
|
-
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
|
|
2293
|
-
const RECORD_VIEW_ENTITY_ID_PREFIX = `${API_NAMESPACE}::${RECORD_VIEW_ENTITY_REPRESENTATION_NAME}:Name:`;
|
|
2294
|
-
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
2295
|
-
function extractRecordIdFromStoreKey(key) {
|
|
2296
|
-
if (key === undefined ||
|
|
2297
|
-
(key.indexOf(RECORD_ID_PREFIX) === -1 && key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) === -1)) {
|
|
2298
|
-
return undefined;
|
|
2299
|
-
}
|
|
2300
|
-
const parts = key.split(':');
|
|
2301
|
-
return parts[parts.length - 1].split('_')[0];
|
|
2302
|
-
}
|
|
2303
|
-
function isStoreKeyRecordViewEntity(key) {
|
|
2304
|
-
return (key.indexOf(RECORD_VIEW_ENTITY_ID_PREFIX) > -1 &&
|
|
2305
|
-
key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1);
|
|
2306
|
-
}
|
|
2307
|
-
// The rest of this is copy-pasted. Sorry.
|
|
2308
|
-
ObjectCreate$1(null);
|
|
2309
|
-
ensureRegisteredOnce({
|
|
2310
|
-
id: '@salesforce/lds-adapters-uiapi',
|
|
2311
|
-
configuration: {
|
|
2312
|
-
...configurationForRestAdapters,
|
|
2313
|
-
...configurationForGraphQLAdapters,
|
|
2314
|
-
...configurationForOneStoreEnabledAdapters,
|
|
2315
|
-
},
|
|
2316
|
-
instrument,
|
|
2317
|
-
});
|
|
2318
|
-
|
|
2319
|
-
/**
|
|
2320
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
2321
|
-
* All rights reserved.
|
|
2322
|
-
* For full license text, see the LICENSE.txt file
|
|
2323
|
-
*/
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
1578
|
const { keys, values, create, assign, freeze, entries } = Object;
|
|
2327
1579
|
|
|
2328
1580
|
function buildRecordFieldStoreKey(recordKey, fieldName) {
|
|
@@ -2455,7 +1707,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
2455
1707
|
if (originalKey.startsWith(RECORD_VIEW_ENTITY_ID_PREFIX)) {
|
|
2456
1708
|
return RECORD_VIEW_ENTITY_ID_PREFIX + recordId;
|
|
2457
1709
|
}
|
|
2458
|
-
return
|
|
1710
|
+
return keyBuilderRecord(luvio, { recordId });
|
|
2459
1711
|
}
|
|
2460
1712
|
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore, sqlStore) {
|
|
2461
1713
|
const getEntries = function (entries, segment) {
|
|
@@ -2737,4 +1989,4 @@ function ldsRuntimeBridge() {
|
|
|
2737
1989
|
}
|
|
2738
1990
|
|
|
2739
1991
|
export { ldsRuntimeBridge as default };
|
|
2740
|
-
// version: 1.
|
|
1992
|
+
// version: 1.315.0-8ef4c90baf
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.315.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.
|
|
38
|
-
"@salesforce/lds-durable-records": "^1.
|
|
39
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
37
|
+
"@salesforce/lds-bindings": "^1.315.0",
|
|
38
|
+
"@salesforce/lds-durable-records": "^1.315.0",
|
|
39
|
+
"@salesforce/lds-instrumentation": "^1.315.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.
|
|
45
|
-
"@salesforce/lds-runtime-aura": "^1.
|
|
46
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
47
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.315.0",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.315.0",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.315.0",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.315.0",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|