@salesforce/lds-worker-api 1.199.0 → 1.200.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.
|
@@ -20,11 +20,11 @@ var SnapshotState$3;
|
|
|
20
20
|
SnapshotState["Stale"] = "Stale";
|
|
21
21
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
22
22
|
|
|
23
|
-
const { create: create$
|
|
23
|
+
const { create: create$b, entries: entries$5, freeze: freeze$5, keys: keys$c, values: values$4 } = Object;
|
|
24
24
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
25
25
|
const { isArray: isArray$9 } = Array;
|
|
26
26
|
const { push: push$4, indexOf, slice: slice$2 } = Array.prototype;
|
|
27
|
-
const { parse: parse$
|
|
27
|
+
const { parse: parse$a, stringify: stringify$a } = JSON;
|
|
28
28
|
|
|
29
29
|
function deepFreeze(value) {
|
|
30
30
|
// No need to freeze primitives
|
|
@@ -37,7 +37,7 @@ function deepFreeze(value) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
const keys$1 = keys$
|
|
40
|
+
const keys$1 = keys$c(value);
|
|
41
41
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
42
42
|
deepFreeze(value[keys$1[i]]);
|
|
43
43
|
}
|
|
@@ -281,7 +281,7 @@ function stableJSONStringify$3(node) {
|
|
|
281
281
|
return isFinite(node) ? '' + node : 'null';
|
|
282
282
|
}
|
|
283
283
|
if (typeof node !== 'object') {
|
|
284
|
-
return stringify$
|
|
284
|
+
return stringify$a(node);
|
|
285
285
|
}
|
|
286
286
|
let i;
|
|
287
287
|
let out;
|
|
@@ -298,7 +298,7 @@ function stableJSONStringify$3(node) {
|
|
|
298
298
|
if (node === null) {
|
|
299
299
|
return 'null';
|
|
300
300
|
}
|
|
301
|
-
const keys$1 = keys$
|
|
301
|
+
const keys$1 = keys$c(node).sort();
|
|
302
302
|
out = '';
|
|
303
303
|
for (i = 0; i < keys$1.length; i++) {
|
|
304
304
|
const key = keys$1[i];
|
|
@@ -309,7 +309,7 @@ function stableJSONStringify$3(node) {
|
|
|
309
309
|
if (out) {
|
|
310
310
|
out += ',';
|
|
311
311
|
}
|
|
312
|
-
out += stringify$
|
|
312
|
+
out += stringify$a(key) + ':' + value;
|
|
313
313
|
}
|
|
314
314
|
return '{' + out + '}';
|
|
315
315
|
}
|
|
@@ -546,13 +546,13 @@ function getTTLOverride$1(ttlOverrideKey, ttlOverrides, defaultTTLOverride) {
|
|
|
546
546
|
class StringKeyInMemoryStore {
|
|
547
547
|
constructor(options = {}) {
|
|
548
548
|
// public, in memory properties
|
|
549
|
-
this.records = create$
|
|
550
|
-
this.metadata = create$
|
|
551
|
-
this.visitedIds = create$
|
|
552
|
-
this.refreshedIds = create$
|
|
553
|
-
this.redirectKeys = create$
|
|
554
|
-
this.retainedIds = create$
|
|
555
|
-
this.ttlOverrides = create$
|
|
549
|
+
this.records = create$b(null);
|
|
550
|
+
this.metadata = create$b(null);
|
|
551
|
+
this.visitedIds = create$b(null);
|
|
552
|
+
this.refreshedIds = create$b(null);
|
|
553
|
+
this.redirectKeys = create$b(null);
|
|
554
|
+
this.retainedIds = create$b(null);
|
|
555
|
+
this.ttlOverrides = create$b(null);
|
|
556
556
|
this.snapshotSubscriptions = [];
|
|
557
557
|
this.trimTask = null;
|
|
558
558
|
this.pendingTrimKeys = new Set();
|
|
@@ -560,8 +560,8 @@ class StringKeyInMemoryStore {
|
|
|
560
560
|
this.watchSubscriptions = [];
|
|
561
561
|
this.eventObservers = [];
|
|
562
562
|
// private/protected
|
|
563
|
-
this.insertedIds = create$
|
|
564
|
-
this.reverseRedirectKeys = create$
|
|
563
|
+
this.insertedIds = create$b(null);
|
|
564
|
+
this.reverseRedirectKeys = create$b(null);
|
|
565
565
|
this.scheduler = options.scheduler || buildDefaultScheduler();
|
|
566
566
|
}
|
|
567
567
|
// interface methods
|
|
@@ -569,13 +569,13 @@ class StringKeyInMemoryStore {
|
|
|
569
569
|
return this.records[this.getCanonicalRecordId(key)];
|
|
570
570
|
}
|
|
571
571
|
getNumEntries() {
|
|
572
|
-
return keys$
|
|
572
|
+
return keys$c(this.records).length;
|
|
573
573
|
}
|
|
574
574
|
readMetadata(key) {
|
|
575
575
|
return this.metadata[this.getCanonicalRecordId(key)];
|
|
576
576
|
}
|
|
577
577
|
readMetadataWhere(query) {
|
|
578
|
-
const keys$1 = keys$
|
|
578
|
+
const keys$1 = keys$c(this.metadata);
|
|
579
579
|
const results = [];
|
|
580
580
|
const hasNamespaceQuery = hasOwnProperty$3.call(query, 'namespace');
|
|
581
581
|
const hasRepresentationNameQuery = hasOwnProperty$3.call(query, 'representationName');
|
|
@@ -672,8 +672,8 @@ class StringKeyInMemoryStore {
|
|
|
672
672
|
// Note: we should always get the subscription references from this at the beginning
|
|
673
673
|
// of the function, in case the reference changes (because of an unsubscribe)
|
|
674
674
|
const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
|
|
675
|
-
const allVisitedIds = keys$
|
|
676
|
-
const allRefreshedIds = keys$
|
|
675
|
+
const allVisitedIds = keys$c(visitedIds);
|
|
676
|
+
const allRefreshedIds = keys$c(refreshedIds);
|
|
677
677
|
// Early exit if nothing has changed
|
|
678
678
|
if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
|
|
679
679
|
return Promise.resolve();
|
|
@@ -710,9 +710,9 @@ class StringKeyInMemoryStore {
|
|
|
710
710
|
callback(watchCallbackEntries);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
this.visitedIds = create$
|
|
714
|
-
this.refreshedIds = create$
|
|
715
|
-
this.insertedIds = create$
|
|
713
|
+
this.visitedIds = create$b(null);
|
|
714
|
+
this.refreshedIds = create$b(null);
|
|
715
|
+
this.insertedIds = create$b(null);
|
|
716
716
|
// the .then removes the return of an array of voids to a single void
|
|
717
717
|
return Promise.all(snapshotSubPromises).then(() => { });
|
|
718
718
|
}
|
|
@@ -877,18 +877,18 @@ class StringKeyInMemoryStore {
|
|
|
877
877
|
return this.defaultTTLOverride;
|
|
878
878
|
}
|
|
879
879
|
reset() {
|
|
880
|
-
this.records = create$
|
|
880
|
+
this.records = create$b(null);
|
|
881
881
|
this.snapshotSubscriptions = [];
|
|
882
882
|
this.watchSubscriptions = [];
|
|
883
|
-
this.visitedIds = create$
|
|
884
|
-
this.refreshedIds = create$
|
|
885
|
-
this.insertedIds = create$
|
|
886
|
-
this.redirectKeys = create$
|
|
887
|
-
this.reverseRedirectKeys = create$
|
|
888
|
-
this.retainedIds = create$
|
|
889
|
-
this.ttlOverrides = create$
|
|
883
|
+
this.visitedIds = create$b(null);
|
|
884
|
+
this.refreshedIds = create$b(null);
|
|
885
|
+
this.insertedIds = create$b(null);
|
|
886
|
+
this.redirectKeys = create$b(null);
|
|
887
|
+
this.reverseRedirectKeys = create$b(null);
|
|
888
|
+
this.retainedIds = create$b(null);
|
|
889
|
+
this.ttlOverrides = create$b(null);
|
|
890
890
|
this.trimTask = null;
|
|
891
|
-
this.metadata = create$
|
|
891
|
+
this.metadata = create$b(null);
|
|
892
892
|
this.defaultTTLOverride = undefined;
|
|
893
893
|
emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
|
|
894
894
|
}
|
|
@@ -1120,7 +1120,7 @@ function isPendingSnapshotWithNoOverlappingIds(snapshot, visitedIds, refreshedId
|
|
|
1120
1120
|
hasOverlappingIds(snapshot, visitedIds) === false);
|
|
1121
1121
|
}
|
|
1122
1122
|
function getMatchingIds(partialKey, visitedIds) {
|
|
1123
|
-
const keys$1 = keys$
|
|
1123
|
+
const keys$1 = keys$c(partialKey);
|
|
1124
1124
|
return visitedIds.filter((visitedId) => {
|
|
1125
1125
|
return keys$1.every((key) => {
|
|
1126
1126
|
return partialKey[key] === visitedId[key];
|
|
@@ -1747,8 +1747,8 @@ class InMemoryStore {
|
|
|
1747
1747
|
} while (redirectKey !== undefined);
|
|
1748
1748
|
}
|
|
1749
1749
|
isUsingStringKeys() {
|
|
1750
|
-
return (keys$
|
|
1751
|
-
keys$
|
|
1750
|
+
return (keys$c(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
|
|
1751
|
+
keys$c(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
|
|
1752
1752
|
}
|
|
1753
1753
|
delegateToFallbackStringKeyStore(snapshot) {
|
|
1754
1754
|
return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
|
|
@@ -1790,7 +1790,7 @@ class InMemoryStore {
|
|
|
1790
1790
|
buildKeySchema(keyMetadata) {
|
|
1791
1791
|
// pull NamespacedType type out of NormalizedKeyMetadata
|
|
1792
1792
|
const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
|
|
1793
|
-
const keySchema = keys$
|
|
1793
|
+
const keySchema = keys$c(keyParamValues).sort();
|
|
1794
1794
|
return ['namespace', 'representationName', ...keySchema];
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
@@ -2078,7 +2078,7 @@ class GraphNode {
|
|
|
2078
2078
|
return value;
|
|
2079
2079
|
}
|
|
2080
2080
|
keys() {
|
|
2081
|
-
return keys$
|
|
2081
|
+
return keys$c(this.data);
|
|
2082
2082
|
}
|
|
2083
2083
|
isScalar(propertyName) {
|
|
2084
2084
|
// TODO W-6900046 - merge.ts casts these to any and manually sets `data`
|
|
@@ -2119,7 +2119,7 @@ function formatStorageKey(name, argValues) {
|
|
|
2119
2119
|
if (hasOwnProperty$3.call(argValues, _argName)) {
|
|
2120
2120
|
var value = argValues[_argName];
|
|
2121
2121
|
if (value !== null || value !== undefined) {
|
|
2122
|
-
values.push(_argName + ':' + stringify$
|
|
2122
|
+
values.push(_argName + ':' + stringify$a(value));
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
@@ -2457,7 +2457,7 @@ class Reader {
|
|
|
2457
2457
|
}
|
|
2458
2458
|
}
|
|
2459
2459
|
selectAllObject(record, data, visitedKeys) {
|
|
2460
|
-
const recordKeys = keys$
|
|
2460
|
+
const recordKeys = keys$c(record);
|
|
2461
2461
|
const { length } = recordKeys;
|
|
2462
2462
|
for (let i = 0; i < length; i += 1) {
|
|
2463
2463
|
const key = recordKeys[i];
|
|
@@ -2540,7 +2540,7 @@ class Reader {
|
|
|
2540
2540
|
this.readScalar(propertyName, source, sink);
|
|
2541
2541
|
return;
|
|
2542
2542
|
}
|
|
2543
|
-
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$
|
|
2543
|
+
throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$a(selection, null, 2)}`);
|
|
2544
2544
|
case StoreLinkStateValues$2.Pending:
|
|
2545
2545
|
this.markPending();
|
|
2546
2546
|
return;
|
|
@@ -2638,7 +2638,7 @@ class Reader {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
const { baseSnapshotValue } = this.currentPath;
|
|
2640
2640
|
if (isDefined$1(baseSnapshotValue)) {
|
|
2641
|
-
this.snapshotChanged = keys$1.length !== keys$
|
|
2641
|
+
this.snapshotChanged = keys$1.length !== keys$c(baseSnapshotValue).length;
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
2644
|
checkIfChanged(value) {
|
|
@@ -2676,7 +2676,7 @@ class Reader {
|
|
|
2676
2676
|
return this.markMissing();
|
|
2677
2677
|
}
|
|
2678
2678
|
const sink = (data[propertyName] = {});
|
|
2679
|
-
const keys$1 = keys$
|
|
2679
|
+
const keys$1 = keys$c(obj);
|
|
2680
2680
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2681
2681
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
2682
2682
|
const key = keys$1[i];
|
|
@@ -2687,7 +2687,7 @@ class Reader {
|
|
|
2687
2687
|
}
|
|
2688
2688
|
readLinkMap(propertyName, selection, record, data) {
|
|
2689
2689
|
const map = record[propertyName];
|
|
2690
|
-
const keys$1 = keys$
|
|
2690
|
+
const keys$1 = keys$c(map);
|
|
2691
2691
|
const sink = {};
|
|
2692
2692
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2693
2693
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
@@ -2815,7 +2815,7 @@ class Reader {
|
|
|
2815
2815
|
return;
|
|
2816
2816
|
}
|
|
2817
2817
|
const sink = (data[propertyName] = {});
|
|
2818
|
-
const keys$1 = keys$
|
|
2818
|
+
const keys$1 = keys$c(obj);
|
|
2819
2819
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2820
2820
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
2821
2821
|
const key = keys$1[i];
|
|
@@ -3037,7 +3037,7 @@ function normalizeNetworkAdapterError(error) {
|
|
|
3037
3037
|
return error;
|
|
3038
3038
|
}
|
|
3039
3039
|
// anything else should get turned into an Error with the errorType set
|
|
3040
|
-
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$
|
|
3040
|
+
const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$a(error)}`);
|
|
3041
3041
|
normalizedError.errorType = 'networkAdapterError';
|
|
3042
3042
|
return normalizedError;
|
|
3043
3043
|
}
|
|
@@ -3048,8 +3048,8 @@ class Environment {
|
|
|
3048
3048
|
this.defaultCachePolicy = { type: 'cache-then-network' };
|
|
3049
3049
|
this.store = store;
|
|
3050
3050
|
this.networkAdapter = networkAdapter;
|
|
3051
|
-
this.adapterContextMap = create$
|
|
3052
|
-
this.typeQueryEvaluatorMap = create$
|
|
3051
|
+
this.adapterContextMap = create$b(null);
|
|
3052
|
+
this.typeQueryEvaluatorMap = create$b(null);
|
|
3053
3053
|
// bind these methods so when they get passed into the
|
|
3054
3054
|
// Store, the this reference is preserved
|
|
3055
3055
|
this.createSnapshot = this.createSnapshot.bind(this);
|
|
@@ -3243,7 +3243,7 @@ class Environment {
|
|
|
3243
3243
|
// retrieve from adapterContextMap if contextId is supplied
|
|
3244
3244
|
// we will only track context of adapters that explicitly provide a contextId
|
|
3245
3245
|
if (this.adapterContextMap[contextId] === undefined) {
|
|
3246
|
-
this.adapterContextMap[contextId] = create$
|
|
3246
|
+
this.adapterContextMap[contextId] = create$b(null);
|
|
3247
3247
|
}
|
|
3248
3248
|
const contextStore = this.adapterContextMap[contextId];
|
|
3249
3249
|
const context = {
|
|
@@ -3499,13 +3499,13 @@ class Luvio {
|
|
|
3499
3499
|
// undefined values on the injected networkAdapter. So we do it here, on
|
|
3500
3500
|
// the API that those adapters call to dispatch their ResourceRequests.
|
|
3501
3501
|
const { queryParams, urlParams } = mergedResourceRequest;
|
|
3502
|
-
for (const paramKey of keys$
|
|
3502
|
+
for (const paramKey of keys$c(queryParams)) {
|
|
3503
3503
|
const value = queryParams[paramKey];
|
|
3504
3504
|
if (value === undefined) {
|
|
3505
3505
|
delete queryParams[paramKey];
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
|
-
for (const paramKey of keys$
|
|
3508
|
+
for (const paramKey of keys$c(urlParams)) {
|
|
3509
3509
|
const value = urlParams[paramKey];
|
|
3510
3510
|
if (value === undefined) {
|
|
3511
3511
|
delete urlParams[paramKey];
|
|
@@ -3799,7 +3799,7 @@ function withDefaultLuvio(callback) {
|
|
|
3799
3799
|
}
|
|
3800
3800
|
callbacks.push(callback);
|
|
3801
3801
|
}
|
|
3802
|
-
// version: 1.
|
|
3802
|
+
// version: 1.200.0-c4cb94fd9
|
|
3803
3803
|
|
|
3804
3804
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3805
3805
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5452,7 +5452,7 @@ function isNameStart(code) {
|
|
|
5452
5452
|
* Given a GraphQL source, parses it into a Document.
|
|
5453
5453
|
* Throws GraphQLError if a syntax error is encountered.
|
|
5454
5454
|
*/
|
|
5455
|
-
function parse$
|
|
5455
|
+
function parse$9(source, options) {
|
|
5456
5456
|
var parser = new Parser(source, options);
|
|
5457
5457
|
return parser.parseDocument();
|
|
5458
5458
|
}
|
|
@@ -14414,7 +14414,7 @@ function buildASTSchema(documentAST, options) {
|
|
|
14414
14414
|
*/
|
|
14415
14415
|
|
|
14416
14416
|
function buildSchema(source, options) {
|
|
14417
|
-
var document = parse$
|
|
14417
|
+
var document = parse$9(source, {
|
|
14418
14418
|
noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
|
|
14419
14419
|
allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
|
|
14420
14420
|
allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
|
|
@@ -14965,7 +14965,7 @@ function parseDocument(inputString) {
|
|
|
14965
14965
|
return cachedDoc;
|
|
14966
14966
|
}
|
|
14967
14967
|
// parse throws an GraphQLError in case of invalid query, should this be in try/catch?
|
|
14968
|
-
const parsedDoc = parse$
|
|
14968
|
+
const parsedDoc = parse$9(inputString, { noLocation: true });
|
|
14969
14969
|
if (!parsedDoc || parsedDoc.kind !== 'Document') {
|
|
14970
14970
|
return null;
|
|
14971
14971
|
}
|
|
@@ -15223,7 +15223,7 @@ function metaschemaMapper(doc) {
|
|
|
15223
15223
|
* @deprecated In favor of gql tagged template literal
|
|
15224
15224
|
*/
|
|
15225
15225
|
function parseAndVisit(source) {
|
|
15226
|
-
const ast = parse$
|
|
15226
|
+
const ast = parse$9(source, { noLocation: true });
|
|
15227
15227
|
const luvioDocumentNode = transform$c(ast);
|
|
15228
15228
|
// In-place substitution of metaschema annotations
|
|
15229
15229
|
metaschemaMapper(ast);
|
|
@@ -15232,7 +15232,7 @@ function parseAndVisit(source) {
|
|
|
15232
15232
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15233
15233
|
return luvioDocumentNode;
|
|
15234
15234
|
}
|
|
15235
|
-
// version: 1.
|
|
15235
|
+
// version: 1.200.0-c4cb94fd9
|
|
15236
15236
|
|
|
15237
15237
|
function unwrap(data) {
|
|
15238
15238
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -15334,7 +15334,7 @@ function refreshData(data, dataToTuple, luvio) {
|
|
|
15334
15334
|
});
|
|
15335
15335
|
}
|
|
15336
15336
|
const { isArray: isArray$8 } = Array;
|
|
15337
|
-
const { stringify: stringify$
|
|
15337
|
+
const { stringify: stringify$9 } = JSON;
|
|
15338
15338
|
|
|
15339
15339
|
function isPromise$1(value) {
|
|
15340
15340
|
// check for Thenable due to test frameworks using custom Promise impls
|
|
@@ -15352,7 +15352,7 @@ function throwAnnotatedError(error, messagePrefix) {
|
|
|
15352
15352
|
error.message = `${messagePrefix}\n[${error.message}]`;
|
|
15353
15353
|
throw error;
|
|
15354
15354
|
}
|
|
15355
|
-
throw new Error(`${messagePrefix}\n[${stringify$
|
|
15355
|
+
throw new Error(`${messagePrefix}\n[${stringify$9(error)}]`);
|
|
15356
15356
|
}
|
|
15357
15357
|
|
|
15358
15358
|
class Sanitizer {
|
|
@@ -15368,7 +15368,7 @@ class Sanitizer {
|
|
|
15368
15368
|
}
|
|
15369
15369
|
sanitize() {
|
|
15370
15370
|
const sanitizer = this;
|
|
15371
|
-
stringify$
|
|
15371
|
+
stringify$9(this.obj, function (key, value) {
|
|
15372
15372
|
if (key === '') {
|
|
15373
15373
|
return value;
|
|
15374
15374
|
}
|
|
@@ -15810,7 +15810,7 @@ function createLDSAdapter(luvio, name, factory) {
|
|
|
15810
15810
|
return factory(luvio);
|
|
15811
15811
|
}
|
|
15812
15812
|
|
|
15813
|
-
const { create: create$
|
|
15813
|
+
const { create: create$a, defineProperty, defineProperties } = Object;
|
|
15814
15814
|
|
|
15815
15815
|
var SnapshotState$2;
|
|
15816
15816
|
(function (SnapshotState) {
|
|
@@ -16145,7 +16145,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16145
16145
|
const { apiFamily, name } = metadata;
|
|
16146
16146
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16147
16147
|
}
|
|
16148
|
-
// version: 1.
|
|
16148
|
+
// version: 1.200.0-c4cb94fd9
|
|
16149
16149
|
|
|
16150
16150
|
/**
|
|
16151
16151
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16232,7 +16232,7 @@ var FragmentReadResultState;
|
|
|
16232
16232
|
|
|
16233
16233
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16234
16234
|
|
|
16235
|
-
const { assign: assign$
|
|
16235
|
+
const { assign: assign$9, create: create$9, freeze: freeze$4, keys: keys$b } = Object;
|
|
16236
16236
|
|
|
16237
16237
|
ObjectCreate$3(null);
|
|
16238
16238
|
|
|
@@ -17300,12 +17300,12 @@ function getTypeCacheKeys$Q$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
17300
17300
|
}
|
|
17301
17301
|
}
|
|
17302
17302
|
|
|
17303
|
-
const { assign: assign$
|
|
17303
|
+
const { assign: assign$8, create: create$8, freeze: freeze$3, keys: keys$a } = Object;
|
|
17304
17304
|
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
17305
17305
|
const { split, endsWith } = String.prototype;
|
|
17306
17306
|
const { isArray: isArray$7 } = Array;
|
|
17307
17307
|
const { concat, filter: filter$1, includes: includes$1, push: push$3, reduce } = Array.prototype;
|
|
17308
|
-
const { parse: parse$
|
|
17308
|
+
const { parse: parse$8, stringify: stringify$8 } = JSON;
|
|
17309
17309
|
|
|
17310
17310
|
// we override the generated so we can set "mergeable: true" on the root key
|
|
17311
17311
|
const getTypeCacheKeys$P$1 = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
@@ -17317,14 +17317,14 @@ const getTypeCacheKeys$P$1 = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
17317
17317
|
mergeable: true,
|
|
17318
17318
|
});
|
|
17319
17319
|
const input_childRelationships = input.childRelationships;
|
|
17320
|
-
const input_childRelationships_keys = keys$
|
|
17320
|
+
const input_childRelationships_keys = keys$a(input_childRelationships);
|
|
17321
17321
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
17322
17322
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
17323
17323
|
const key = input_childRelationships_keys[i];
|
|
17324
17324
|
getTypeCacheKeys$O$1(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
17325
17325
|
}
|
|
17326
17326
|
const input_fields = input.fields;
|
|
17327
|
-
const input_fields_keys = keys$
|
|
17327
|
+
const input_fields_keys = keys$a(input_fields);
|
|
17328
17328
|
const input_fields_length = input_fields_keys.length;
|
|
17329
17329
|
for (let i = 0; i < input_fields_length; i++) {
|
|
17330
17330
|
const key = input_fields_keys[i];
|
|
@@ -17784,7 +17784,7 @@ function dedupe(value) {
|
|
|
17784
17784
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
17785
17785
|
result[value[i]] = true;
|
|
17786
17786
|
}
|
|
17787
|
-
return keys$
|
|
17787
|
+
return keys$a(result);
|
|
17788
17788
|
}
|
|
17789
17789
|
/**
|
|
17790
17790
|
* @param source The array of string to filter
|
|
@@ -19232,7 +19232,7 @@ function convertRecordFieldsArrayToTrie(fields, optionalFields = []) {
|
|
|
19232
19232
|
function createPathSelection(propertyName, fieldDefinition) {
|
|
19233
19233
|
const fieldsSelection = [];
|
|
19234
19234
|
const { children } = fieldDefinition;
|
|
19235
|
-
const childrenKeys = keys$
|
|
19235
|
+
const childrenKeys = keys$a(children);
|
|
19236
19236
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
19237
19237
|
const childKey = childrenKeys[i];
|
|
19238
19238
|
const childFieldDefinition = children[childKey];
|
|
@@ -19277,7 +19277,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
19277
19277
|
*/
|
|
19278
19278
|
function createPathSelectionFromValue(fields) {
|
|
19279
19279
|
const fieldsSelection = [];
|
|
19280
|
-
const fieldNames = keys$
|
|
19280
|
+
const fieldNames = keys$a(fields);
|
|
19281
19281
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
19282
19282
|
const fieldName = fieldNames[i];
|
|
19283
19283
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -19316,7 +19316,7 @@ function createPathSelectionFromValue(fields) {
|
|
|
19316
19316
|
}
|
|
19317
19317
|
function extractRecordFieldsRecursively(record) {
|
|
19318
19318
|
const fields = [];
|
|
19319
|
-
const fieldNames = keys$
|
|
19319
|
+
const fieldNames = keys$a(record.fields);
|
|
19320
19320
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
19321
19321
|
const fieldName = fieldNames[i];
|
|
19322
19322
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -19504,7 +19504,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
|
|
|
19504
19504
|
continue;
|
|
19505
19505
|
}
|
|
19506
19506
|
extractTrackedFieldsToTrie(spanningLink.data.__ref, spanning, next, config, spanningVisitedRecordIds, depth + 1);
|
|
19507
|
-
if (keys$
|
|
19507
|
+
if (keys$a(next.children).length > 0) {
|
|
19508
19508
|
current.children[key] = next;
|
|
19509
19509
|
}
|
|
19510
19510
|
else {
|
|
@@ -19556,13 +19556,13 @@ function isExternalLookupFieldKey(spanningNode) {
|
|
|
19556
19556
|
return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
|
|
19557
19557
|
}
|
|
19558
19558
|
function convertTrieToFields(root) {
|
|
19559
|
-
if (keys$
|
|
19559
|
+
if (keys$a(root.children).length === 0) {
|
|
19560
19560
|
return [];
|
|
19561
19561
|
}
|
|
19562
19562
|
return convertTrieToFieldsRecursively(root);
|
|
19563
19563
|
}
|
|
19564
19564
|
function convertTrieToFieldsRecursively(root) {
|
|
19565
|
-
const childKeys = keys$
|
|
19565
|
+
const childKeys = keys$a(root.children);
|
|
19566
19566
|
if (childKeys.length === 0) {
|
|
19567
19567
|
if (root.name === '') {
|
|
19568
19568
|
return [];
|
|
@@ -19599,7 +19599,7 @@ const getObjectNameFromField = (field) => {
|
|
|
19599
19599
|
function mergeFieldsTries(rootA, rootB) {
|
|
19600
19600
|
const rootAchildren = rootA.children;
|
|
19601
19601
|
const rootBchildren = rootB.children;
|
|
19602
|
-
const childBKeys = keys$
|
|
19602
|
+
const childBKeys = keys$a(rootBchildren);
|
|
19603
19603
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
19604
19604
|
const childBKey = childBKeys[i];
|
|
19605
19605
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -19752,8 +19752,8 @@ function isSuperRecordFieldTrie(a, b) {
|
|
|
19752
19752
|
}
|
|
19753
19753
|
const childrenA = a.children;
|
|
19754
19754
|
const childrenB = b.children;
|
|
19755
|
-
const childKeysA = keys$
|
|
19756
|
-
const childKeysB = keys$
|
|
19755
|
+
const childKeysA = keys$a(childrenA);
|
|
19756
|
+
const childKeysB = keys$a(childrenB);
|
|
19757
19757
|
const childKeysBLength = childKeysB.length;
|
|
19758
19758
|
if (childKeysBLength > childKeysA.length) {
|
|
19759
19759
|
return false;
|
|
@@ -19777,7 +19777,7 @@ function mergePendingFields(newRecord, oldRecord) {
|
|
|
19777
19777
|
// RecordRepresentationNormalized['fields'] to include `pending:true` property
|
|
19778
19778
|
const mergedFields = { ...newRecord.fields };
|
|
19779
19779
|
const merged = { ...newRecord, fields: mergedFields };
|
|
19780
|
-
const existingFields = keys$
|
|
19780
|
+
const existingFields = keys$a(oldRecord.fields);
|
|
19781
19781
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
19782
19782
|
const spanningFieldName = existingFields[i];
|
|
19783
19783
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -19910,7 +19910,7 @@ function merge$3(existing, incoming, luvio, _path, recordConflictMap) {
|
|
|
19910
19910
|
if (isGraphNode(node)) {
|
|
19911
19911
|
const dependencies = node.retrieve();
|
|
19912
19912
|
if (dependencies !== null) {
|
|
19913
|
-
const depKeys = keys$
|
|
19913
|
+
const depKeys = keys$a(dependencies);
|
|
19914
19914
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
19915
19915
|
luvio.storeEvict(depKeys[i]);
|
|
19916
19916
|
}
|
|
@@ -20057,7 +20057,7 @@ function addFieldsToStoreLink(fieldsTrie, optionalFieldsTrie, storeLink) {
|
|
|
20057
20057
|
}
|
|
20058
20058
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
20059
20059
|
const subtrie = fieldSubtries[i];
|
|
20060
|
-
const fieldNames = keys$
|
|
20060
|
+
const fieldNames = keys$a(subtrie.children);
|
|
20061
20061
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
20062
20062
|
const fieldName = fieldNames[i];
|
|
20063
20063
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -20169,9 +20169,9 @@ function fulfill(existing, incoming) {
|
|
|
20169
20169
|
return false;
|
|
20170
20170
|
}
|
|
20171
20171
|
}
|
|
20172
|
-
const headersKeys = keys$
|
|
20172
|
+
const headersKeys = keys$a(headers);
|
|
20173
20173
|
const headersKeyLength = headersKeys.length;
|
|
20174
|
-
if (headersKeyLength !== keys$
|
|
20174
|
+
if (headersKeyLength !== keys$a(existingHeaders).length) {
|
|
20175
20175
|
return false;
|
|
20176
20176
|
}
|
|
20177
20177
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -20947,7 +20947,7 @@ function buildNetworkSnapshot$W(luvio, config, serverRequestCount = 0, options)
|
|
|
20947
20947
|
|
|
20948
20948
|
// iterate through the map to build configs for network calls
|
|
20949
20949
|
function resolveConflict(luvio, map) {
|
|
20950
|
-
const ids = keys$
|
|
20950
|
+
const ids = keys$a(map.conflicts);
|
|
20951
20951
|
if (ids.length === 0) {
|
|
20952
20952
|
instrumentation$2.recordConflictsResolved(map.serverRequestCount);
|
|
20953
20953
|
return;
|
|
@@ -22121,18 +22121,18 @@ function listFields(luvio, { fields = [], optionalFields = [], sortBy, }, listIn
|
|
|
22121
22121
|
return {
|
|
22122
22122
|
getRecordSelectionFieldSets() {
|
|
22123
22123
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
22124
|
-
const fields = keys$
|
|
22124
|
+
const fields = keys$a(defaultFields_);
|
|
22125
22125
|
for (let i = 0; i < fields.length; ++i) {
|
|
22126
22126
|
const field = fields[i];
|
|
22127
22127
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
22128
22128
|
optionalPlusDefaultFields[field] = true;
|
|
22129
22129
|
}
|
|
22130
22130
|
}
|
|
22131
|
-
return [keys$
|
|
22131
|
+
return [keys$a(fields_).sort(), keys$a(optionalPlusDefaultFields).sort()];
|
|
22132
22132
|
},
|
|
22133
22133
|
processRecords(records) {
|
|
22134
22134
|
const { missingFields } = defaultServerFieldStatus;
|
|
22135
|
-
const fields = keys$
|
|
22135
|
+
const fields = keys$a(missingFields);
|
|
22136
22136
|
for (let i = 0; i < fields.length; ++i) {
|
|
22137
22137
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
22138
22138
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -24885,7 +24885,7 @@ function getMissingRecordLookupFields(record, objectInfo) {
|
|
|
24885
24885
|
const lookupFields = {};
|
|
24886
24886
|
const { apiName, fields: recordFields } = record;
|
|
24887
24887
|
const { fields: objectInfoFields } = objectInfo;
|
|
24888
|
-
const objectInfoFieldNames = keys$
|
|
24888
|
+
const objectInfoFieldNames = keys$a(objectInfoFields);
|
|
24889
24889
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
24890
24890
|
const fieldName = objectInfoFieldNames[i];
|
|
24891
24891
|
const field = objectInfoFields[fieldName];
|
|
@@ -24904,12 +24904,12 @@ function getMissingRecordLookupFields(record, objectInfo) {
|
|
|
24904
24904
|
const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
|
|
24905
24905
|
lookupFields[nameField] = true;
|
|
24906
24906
|
}
|
|
24907
|
-
return keys$
|
|
24907
|
+
return keys$a(lookupFields);
|
|
24908
24908
|
}
|
|
24909
24909
|
function getRecordUiMissingRecordLookupFields(recordUi) {
|
|
24910
24910
|
const { records, objectInfos } = recordUi;
|
|
24911
24911
|
const recordLookupFields = {};
|
|
24912
|
-
const recordIds = keys$
|
|
24912
|
+
const recordIds = keys$a(records);
|
|
24913
24913
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
24914
24914
|
const recordId = recordIds[i];
|
|
24915
24915
|
const recordData = records[recordId];
|
|
@@ -24947,19 +24947,19 @@ function buildCachedSelectorKey(key) {
|
|
|
24947
24947
|
}
|
|
24948
24948
|
function eachLayout(recordUi, cb) {
|
|
24949
24949
|
const { layouts } = recordUi;
|
|
24950
|
-
const layoutApiNames = keys$
|
|
24950
|
+
const layoutApiNames = keys$a(layouts);
|
|
24951
24951
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
24952
24952
|
const apiName = layoutApiNames[a];
|
|
24953
24953
|
const apiNameData = layouts[apiName];
|
|
24954
|
-
const recordTypeIds = keys$
|
|
24954
|
+
const recordTypeIds = keys$a(apiNameData);
|
|
24955
24955
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
24956
24956
|
const recordTypeId = recordTypeIds[b];
|
|
24957
24957
|
const recordTypeData = apiNameData[recordTypeId];
|
|
24958
|
-
const layoutTypes = keys$
|
|
24958
|
+
const layoutTypes = keys$a(recordTypeData);
|
|
24959
24959
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
24960
24960
|
const layoutType = layoutTypes[c];
|
|
24961
24961
|
const layoutTypeData = recordTypeData[layoutType];
|
|
24962
|
-
const modes = keys$
|
|
24962
|
+
const modes = keys$a(layoutTypeData);
|
|
24963
24963
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
24964
24964
|
const mode = modes[d];
|
|
24965
24965
|
const layout = layoutTypeData[mode];
|
|
@@ -25035,7 +25035,7 @@ function prepareRequest$4(luvio, config) {
|
|
|
25035
25035
|
// we have to run ingest code and look at the resulting snapshot's seenRecords.
|
|
25036
25036
|
function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
|
|
25037
25037
|
const { recordIds, layoutTypes, modes } = config;
|
|
25038
|
-
const responseBody = parse$
|
|
25038
|
+
const responseBody = parse$8(stringify$8(originalResponseBody));
|
|
25039
25039
|
eachLayout(responseBody, (apiName, recordTypeId, layout) => {
|
|
25040
25040
|
if (layout.id === null) {
|
|
25041
25041
|
return;
|
|
@@ -25165,14 +25165,14 @@ function buildNetworkSnapshot$T(luvio, config, dispatchContext) {
|
|
|
25165
25165
|
function publishDependencies(luvio, recordIds, depKeys) {
|
|
25166
25166
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
25167
25167
|
const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
|
|
25168
|
-
const dependencies = create$
|
|
25168
|
+
const dependencies = create$8(null);
|
|
25169
25169
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
25170
25170
|
dependencies[depKeys[j]] = true;
|
|
25171
25171
|
}
|
|
25172
25172
|
const node = luvio.getNode(recordDepKey);
|
|
25173
25173
|
if (isGraphNode(node)) {
|
|
25174
25174
|
const recordDeps = node.retrieve();
|
|
25175
|
-
assign$
|
|
25175
|
+
assign$8(dependencies, recordDeps);
|
|
25176
25176
|
}
|
|
25177
25177
|
luvio.storePublish(recordDepKey, dependencies);
|
|
25178
25178
|
}
|
|
@@ -25355,11 +25355,11 @@ const recordLayoutFragmentSelector = [
|
|
|
25355
25355
|
];
|
|
25356
25356
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
25357
25357
|
let fields = [];
|
|
25358
|
-
const layoutTypes = keys$
|
|
25358
|
+
const layoutTypes = keys$a(layoutMap);
|
|
25359
25359
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
25360
25360
|
const layoutType = layoutTypes[i];
|
|
25361
25361
|
const modesMap = layoutMap[layoutType];
|
|
25362
|
-
const modes = keys$
|
|
25362
|
+
const modes = keys$a(modesMap);
|
|
25363
25363
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
25364
25364
|
const mode = modes[m];
|
|
25365
25365
|
const modeKeys = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
@@ -25373,7 +25373,7 @@ function getRecordForLayoutableEntities(luvio, refresh, recordId, layoutMap, obj
|
|
|
25373
25373
|
return getRecord$1(luvio, refresh, recordId, fields, configOptionalFields);
|
|
25374
25374
|
}
|
|
25375
25375
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
25376
|
-
const fields = keys$
|
|
25376
|
+
const fields = keys$a(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
25377
25377
|
// W-12697744
|
|
25378
25378
|
// Set the implicit fields received from the server in adapter context
|
|
25379
25379
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -25601,7 +25601,7 @@ function makeRecordLayoutMap(luvio, config, apiName, recordTypeId, layoutTypes,
|
|
|
25601
25601
|
}
|
|
25602
25602
|
const { layoutType, mode, snapshot } = container;
|
|
25603
25603
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
25604
|
-
wrapper.layoutMap = assign$
|
|
25604
|
+
wrapper.layoutMap = assign$8({}, wrapper.layoutMap, {
|
|
25605
25605
|
[layoutType]: {},
|
|
25606
25606
|
});
|
|
25607
25607
|
}
|
|
@@ -34623,7 +34623,7 @@ function typeCheckConfig$u(untrustedConfig) {
|
|
|
34623
34623
|
}
|
|
34624
34624
|
}
|
|
34625
34625
|
if (records.length > 0) {
|
|
34626
|
-
assign$
|
|
34626
|
+
assign$8(config, { records });
|
|
34627
34627
|
}
|
|
34628
34628
|
}
|
|
34629
34629
|
return config;
|
|
@@ -40592,7 +40592,7 @@ function ingestAndBroadcast(luvio, key, config, body) {
|
|
|
40592
40592
|
});
|
|
40593
40593
|
}
|
|
40594
40594
|
function clone$2(userLayoutState) {
|
|
40595
|
-
return parse$
|
|
40595
|
+
return parse$8(stringify$8(userLayoutState));
|
|
40596
40596
|
}
|
|
40597
40597
|
// Applies optimisticUpdate to layoutUserState
|
|
40598
40598
|
// If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
|
|
@@ -40604,7 +40604,7 @@ function optimisticUpdate(cachedLayoutUserState, layoutUserStateInput) {
|
|
|
40604
40604
|
let clonedLayoutUserStateSections;
|
|
40605
40605
|
const { sectionUserStates } = layoutUserStateInput;
|
|
40606
40606
|
const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
|
|
40607
|
-
const sectionUserStateKeys = keys$
|
|
40607
|
+
const sectionUserStateKeys = keys$a(sectionUserStates);
|
|
40608
40608
|
for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
|
|
40609
40609
|
const sectionId = sectionUserStateKeys[i];
|
|
40610
40610
|
if (cachedSectionUserStates[sectionId] === undefined) {
|
|
@@ -40627,7 +40627,7 @@ function coerceConfigWithDefaults$2(untrusted, layoutUserStateInput) {
|
|
|
40627
40627
|
const config = validateAdapterConfig$E(untrusted, getLayoutUserState_ConfigPropertyNames);
|
|
40628
40628
|
if (config === null) {
|
|
40629
40629
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
40630
|
-
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$
|
|
40630
|
+
throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$8(untrusted)}`);
|
|
40631
40631
|
}
|
|
40632
40632
|
// This will throw if layoutUserStateInput is not a valid input
|
|
40633
40633
|
validate$7(layoutUserStateInput, 'layoutUserStateInput');
|
|
@@ -44508,7 +44508,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44508
44508
|
});
|
|
44509
44509
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
|
|
44510
44510
|
});
|
|
44511
|
-
// version: 1.
|
|
44511
|
+
// version: 1.200.0-dab735b42
|
|
44512
44512
|
|
|
44513
44513
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44514
44514
|
|
|
@@ -44640,10 +44640,10 @@ var ldsPrimingGraphqlBatch = {
|
|
|
44640
44640
|
* For full license text, see the LICENSE.txt file
|
|
44641
44641
|
*/
|
|
44642
44642
|
|
|
44643
|
-
const { parse: parse$
|
|
44643
|
+
const { parse: parse$6, stringify: stringify$6 } = JSON;
|
|
44644
44644
|
const { join: join$2, push: push$2, unshift } = Array.prototype;
|
|
44645
44645
|
const { isArray: isArray$5 } = Array;
|
|
44646
|
-
const { entries: entries$
|
|
44646
|
+
const { entries: entries$4, keys: keys$8 } = Object;
|
|
44647
44647
|
|
|
44648
44648
|
const UI_API_BASE_URI = '/services/data/v59.0/ui-api';
|
|
44649
44649
|
|
|
@@ -44708,7 +44708,7 @@ function isSpanningRecord$1(fieldValue) {
|
|
|
44708
44708
|
function mergeRecordFields$1(first, second) {
|
|
44709
44709
|
const { fields: targetFields } = first;
|
|
44710
44710
|
const { fields: sourceFields } = second;
|
|
44711
|
-
const fieldNames = keys$
|
|
44711
|
+
const fieldNames = keys$8(sourceFields);
|
|
44712
44712
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
44713
44713
|
const fieldName = fieldNames[i];
|
|
44714
44714
|
const sourceField = sourceFields[fieldName];
|
|
@@ -44938,10 +44938,10 @@ function getTransactionKey(req) {
|
|
|
44938
44938
|
const { resourceRequest } = req;
|
|
44939
44939
|
const { baseUri, basePath, queryParams, headers } = resourceRequest;
|
|
44940
44940
|
const path = `${baseUri}${basePath}`;
|
|
44941
|
-
const queryParamsString = queryParams ? stringify$
|
|
44942
|
-
const headersString = stringify$
|
|
44941
|
+
const queryParamsString = queryParams ? stringify$6(queryParams) : EMPTY_STRING;
|
|
44942
|
+
const headersString = stringify$6(headers);
|
|
44943
44943
|
const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
|
|
44944
|
-
? stringify$
|
|
44944
|
+
? stringify$6(resourceRequest.body)
|
|
44945
44945
|
: EMPTY_STRING;
|
|
44946
44946
|
return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
|
|
44947
44947
|
}
|
|
@@ -44950,7 +44950,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
44950
44950
|
if (fulfill === undefined) {
|
|
44951
44951
|
return null;
|
|
44952
44952
|
}
|
|
44953
|
-
const handlersMap = entries$
|
|
44953
|
+
const handlersMap = entries$4(inflightRequests);
|
|
44954
44954
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
44955
44955
|
const [transactionKey, handlers] = handlersMap[i];
|
|
44956
44956
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -45007,7 +45007,7 @@ const dedupeRequest = (req) => {
|
|
|
45007
45007
|
// extra clone (particularly when there's only 1 handler).
|
|
45008
45008
|
for (let i = 1, len = handlers.length; i < len; i++) {
|
|
45009
45009
|
const handler = handlers[i];
|
|
45010
|
-
handler.resolve(parse$
|
|
45010
|
+
handler.resolve(parse$6(stringify$6(response)));
|
|
45011
45011
|
}
|
|
45012
45012
|
handlers[0].resolve(response);
|
|
45013
45013
|
}, (error) => {
|
|
@@ -45113,7 +45113,7 @@ function isDeprecatedDurableStoreEntry(durableRecord) {
|
|
|
45113
45113
|
const DefaultDurableSegment = 'DEFAULT';
|
|
45114
45114
|
const RedirectDurableSegment = 'REDIRECT_KEYS';
|
|
45115
45115
|
|
|
45116
|
-
const { keys: keys$
|
|
45116
|
+
const { keys: keys$7, create: create$6, assign: assign$6, freeze: freeze$1$1 } = Object;
|
|
45117
45117
|
|
|
45118
45118
|
//Durable store error instrumentation key
|
|
45119
45119
|
const DURABLE_STORE_ERROR = 'durable-store-error';
|
|
@@ -45157,7 +45157,7 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
|
|
|
45157
45157
|
if (durableRecords === undefined) {
|
|
45158
45158
|
return { revivedKeys, hadUnexpectedShape };
|
|
45159
45159
|
}
|
|
45160
|
-
const durableKeys = keys$
|
|
45160
|
+
const durableKeys = keys$7(durableRecords);
|
|
45161
45161
|
if (durableKeys.length === 0) {
|
|
45162
45162
|
// no records to revive
|
|
45163
45163
|
return { revivedKeys, hadUnexpectedShape };
|
|
@@ -45331,7 +45331,7 @@ class DurableTTLStore {
|
|
|
45331
45331
|
overrides,
|
|
45332
45332
|
};
|
|
45333
45333
|
}
|
|
45334
|
-
const keys$1 = keys$
|
|
45334
|
+
const keys$1 = keys$7(entries);
|
|
45335
45335
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
45336
45336
|
const key = keys$1[i];
|
|
45337
45337
|
const entry = entries[key];
|
|
@@ -45353,13 +45353,13 @@ class DurableTTLStore {
|
|
|
45353
45353
|
}
|
|
45354
45354
|
|
|
45355
45355
|
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = []) {
|
|
45356
|
-
const durableRecords = create$
|
|
45357
|
-
const evictedRecords = create$
|
|
45356
|
+
const durableRecords = create$6(null);
|
|
45357
|
+
const evictedRecords = create$6(null);
|
|
45358
45358
|
const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
|
|
45359
45359
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
45360
45360
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
45361
45361
|
// on the metadata segment for the refreshedIds
|
|
45362
|
-
const keys$1 = keys$
|
|
45362
|
+
const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
|
|
45363
45363
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
45364
45364
|
const key = keys$1[i];
|
|
45365
45365
|
const record = records[key];
|
|
@@ -45381,7 +45381,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
45381
45381
|
}
|
|
45382
45382
|
const durableStoreOperations = additionalDurableStoreOperations;
|
|
45383
45383
|
// publishes
|
|
45384
|
-
const recordKeys = keys$
|
|
45384
|
+
const recordKeys = keys$7(durableRecords);
|
|
45385
45385
|
if (recordKeys.length > 0) {
|
|
45386
45386
|
durableStoreOperations.push({
|
|
45387
45387
|
type: 'setEntries',
|
|
@@ -45402,7 +45402,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
45402
45402
|
});
|
|
45403
45403
|
});
|
|
45404
45404
|
// evicts
|
|
45405
|
-
const evictedKeys = keys$
|
|
45405
|
+
const evictedKeys = keys$7(evictedRecords);
|
|
45406
45406
|
if (evictedKeys.length > 0) {
|
|
45407
45407
|
durableStoreOperations.push({
|
|
45408
45408
|
type: 'evictEntries',
|
|
@@ -45463,7 +45463,7 @@ const AdapterContextSegment = 'ADAPTER-CONTEXT';
|
|
|
45463
45463
|
const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
|
|
45464
45464
|
async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
|
|
45465
45465
|
// initialize empty context store
|
|
45466
|
-
contextStores[adapterId] = create$
|
|
45466
|
+
contextStores[adapterId] = create$6(null);
|
|
45467
45467
|
const context = {
|
|
45468
45468
|
set(key, value) {
|
|
45469
45469
|
contextStores[adapterId][key] = value;
|
|
@@ -45524,7 +45524,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
45524
45524
|
const pendingContextStoreKeys = new Set();
|
|
45525
45525
|
// redirects that need to be flushed to the durable store
|
|
45526
45526
|
const pendingStoreRedirects = new Map();
|
|
45527
|
-
const contextStores = create$
|
|
45527
|
+
const contextStores = create$6(null);
|
|
45528
45528
|
let initializationPromise = new Promise((resolve) => {
|
|
45529
45529
|
const finish = () => {
|
|
45530
45530
|
resolve();
|
|
@@ -45591,7 +45591,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
45591
45591
|
try {
|
|
45592
45592
|
const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
|
|
45593
45593
|
if (entries !== undefined) {
|
|
45594
|
-
const entryKeys = keys$
|
|
45594
|
+
const entryKeys = keys$7(entries);
|
|
45595
45595
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
45596
45596
|
const entryKey = entryKeys[i];
|
|
45597
45597
|
const entry = entries[entryKey];
|
|
@@ -45960,7 +45960,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
45960
45960
|
type: 'stale-while-revalidate',
|
|
45961
45961
|
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
45962
45962
|
});
|
|
45963
|
-
return create$
|
|
45963
|
+
return create$6(environment, {
|
|
45964
45964
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
45965
45965
|
storeIngest: { value: storeIngest },
|
|
45966
45966
|
storeIngestError: { value: storeIngestError },
|
|
@@ -47199,7 +47199,7 @@ function compoundOperatorToSql(operator) {
|
|
|
47199
47199
|
}
|
|
47200
47200
|
|
|
47201
47201
|
const { isArray: isArray$4 } = Array;
|
|
47202
|
-
const { keys: keys$
|
|
47202
|
+
const { keys: keys$6 } = Object;
|
|
47203
47203
|
|
|
47204
47204
|
function isListValueNode(node) {
|
|
47205
47205
|
return node.kind === 'ListValue';
|
|
@@ -48831,7 +48831,7 @@ function generateVariableSubQuery(valueNode, name, type, variables) {
|
|
|
48831
48831
|
switch (valueNode.kind) {
|
|
48832
48832
|
case Kind.OBJECT: {
|
|
48833
48833
|
// For example, `{ Id: { eq: $draftId } }` is a `ObjectValueNode`, which has field keys 'Id'
|
|
48834
|
-
const resultQuery = keys$
|
|
48834
|
+
const resultQuery = keys$6(valueNode.fields)
|
|
48835
48835
|
.map((key) => generateVariableSubQuery(valueNode.fields[key], key, type, variables))
|
|
48836
48836
|
.filter((subquery) => subquery.length > 0)
|
|
48837
48837
|
.join(',');
|
|
@@ -48907,7 +48907,7 @@ function swapArgumentWithVariableNodes(swapped, original) {
|
|
|
48907
48907
|
}
|
|
48908
48908
|
function swapValueNodeWithVariableNodes(original, swapped) {
|
|
48909
48909
|
if (original.kind === Kind.OBJECT) {
|
|
48910
|
-
for (const key of keys$
|
|
48910
|
+
for (const key of keys$6(original.fields)) {
|
|
48911
48911
|
if (isObjectValueNode$1(swapped) && swapped.fields[key]) {
|
|
48912
48912
|
if (is(original.fields[key], 'Variable')) {
|
|
48913
48913
|
original.fields[key] = swapped.fields[key];
|
|
@@ -49489,12 +49489,12 @@ function createDraftSynthesisErrorResponse(message = 'failed to synthesize draft
|
|
|
49489
49489
|
return new DraftErrorFetchResponse(HttpStatusCode$1.BadRequest, error);
|
|
49490
49490
|
}
|
|
49491
49491
|
|
|
49492
|
-
const { keys: keys$
|
|
49493
|
-
const { stringify: stringify$
|
|
49492
|
+
const { keys: keys$5, create: create$5, assign: assign$5, values: values$2 } = Object;
|
|
49493
|
+
const { stringify: stringify$5, parse: parse$5 } = JSON;
|
|
49494
49494
|
const { isArray: isArray$3 } = Array;
|
|
49495
49495
|
|
|
49496
49496
|
function clone$1(obj) {
|
|
49497
|
-
return parse$
|
|
49497
|
+
return parse$5(stringify$5(obj));
|
|
49498
49498
|
}
|
|
49499
49499
|
|
|
49500
49500
|
/**
|
|
@@ -49601,13 +49601,13 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
|
|
|
49601
49601
|
}
|
|
49602
49602
|
softEvict(key);
|
|
49603
49603
|
};
|
|
49604
|
-
return create$
|
|
49604
|
+
return create$5(luvio, {
|
|
49605
49605
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
49606
49606
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
49607
49607
|
storeEvict: { value: storeEvict },
|
|
49608
49608
|
});
|
|
49609
49609
|
}
|
|
49610
|
-
return create$
|
|
49610
|
+
return create$5(luvio, {
|
|
49611
49611
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
49612
49612
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
49613
49613
|
});
|
|
@@ -49641,7 +49641,7 @@ async function getDraftIdMappings(durableStore, mappingIds) {
|
|
|
49641
49641
|
if (entries === undefined) {
|
|
49642
49642
|
return mappings;
|
|
49643
49643
|
}
|
|
49644
|
-
const keys$1 = keys$
|
|
49644
|
+
const keys$1 = keys$5(entries);
|
|
49645
49645
|
for (const key of keys$1) {
|
|
49646
49646
|
const entry = entries[key].data;
|
|
49647
49647
|
if (isLegacyDraftIdMapping(key)) {
|
|
@@ -49659,7 +49659,7 @@ async function getDraftIdMappings(durableStore, mappingIds) {
|
|
|
49659
49659
|
async function clearDraftIdSegment(durableStore) {
|
|
49660
49660
|
const entries = await durableStore.getAllEntries(DRAFT_ID_MAPPINGS_SEGMENT);
|
|
49661
49661
|
if (entries) {
|
|
49662
|
-
const keys$1 = keys$
|
|
49662
|
+
const keys$1 = keys$5(entries);
|
|
49663
49663
|
if (keys$1.length > 0) {
|
|
49664
49664
|
await durableStore.evictEntries(keys$1, DRAFT_ID_MAPPINGS_SEGMENT);
|
|
49665
49665
|
}
|
|
@@ -50066,7 +50066,7 @@ class DurableDraftQueue {
|
|
|
50066
50066
|
return this.replaceOrMergeActions(targetActionId, sourceActionId, true);
|
|
50067
50067
|
}
|
|
50068
50068
|
async setMetadata(actionId, metadata) {
|
|
50069
|
-
const keys$1 = keys$
|
|
50069
|
+
const keys$1 = keys$5(metadata);
|
|
50070
50070
|
const compatibleKeys = keys$1.filter((key) => {
|
|
50071
50071
|
const value = metadata[key];
|
|
50072
50072
|
return typeof key === 'string' && typeof value === 'string';
|
|
@@ -50216,7 +50216,7 @@ class DurableDraftStore {
|
|
|
50216
50216
|
const waitForOngoingSync = this.syncPromise || Promise.resolve();
|
|
50217
50217
|
return waitForOngoingSync.then(() => {
|
|
50218
50218
|
const { draftStore } = this;
|
|
50219
|
-
const keys$1 = keys$
|
|
50219
|
+
const keys$1 = keys$5(draftStore);
|
|
50220
50220
|
const actionArray = [];
|
|
50221
50221
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
50222
50222
|
const key = keys$1[i];
|
|
@@ -50240,7 +50240,7 @@ class DurableDraftStore {
|
|
|
50240
50240
|
deleteByTag(tag) {
|
|
50241
50241
|
const deleteAction = () => {
|
|
50242
50242
|
const { draftStore } = this;
|
|
50243
|
-
const keys$1 = keys$
|
|
50243
|
+
const keys$1 = keys$5(draftStore);
|
|
50244
50244
|
const durableKeys = [];
|
|
50245
50245
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
50246
50246
|
const key = keys$1[i];
|
|
@@ -50330,7 +50330,7 @@ class DurableDraftStore {
|
|
|
50330
50330
|
return this.runQueuedOperations();
|
|
50331
50331
|
}
|
|
50332
50332
|
const { draftStore } = this;
|
|
50333
|
-
const keys$1 = keys$
|
|
50333
|
+
const keys$1 = keys$5(durableEntries);
|
|
50334
50334
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
50335
50335
|
const entry = durableEntries[keys$1[i]];
|
|
50336
50336
|
const action = entry.data;
|
|
@@ -50500,7 +50500,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
50500
50500
|
let updatedActionTargetId = undefined;
|
|
50501
50501
|
const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
|
|
50502
50502
|
let { basePath, body } = queueActionRequest;
|
|
50503
|
-
let stringifiedBody = stringify$
|
|
50503
|
+
let stringifiedBody = stringify$5(body);
|
|
50504
50504
|
// for each redirected ID/key we loop over the operation to see if it needs
|
|
50505
50505
|
// to be updated
|
|
50506
50506
|
for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
|
|
@@ -50525,7 +50525,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
50525
50525
|
data: {
|
|
50526
50526
|
...queueActionRequest,
|
|
50527
50527
|
basePath: basePath,
|
|
50528
|
-
body: parse$
|
|
50528
|
+
body: parse$5(stringifiedBody),
|
|
50529
50529
|
},
|
|
50530
50530
|
};
|
|
50531
50531
|
// item needs to be replaced with a new item at the new record key
|
|
@@ -50544,7 +50544,7 @@ class AbstractResourceRequestActionHandler {
|
|
|
50544
50544
|
data: {
|
|
50545
50545
|
...queueActionRequest,
|
|
50546
50546
|
basePath: basePath,
|
|
50547
|
-
body: parse$
|
|
50547
|
+
body: parse$5(stringifiedBody),
|
|
50548
50548
|
},
|
|
50549
50549
|
};
|
|
50550
50550
|
// item needs to be updated
|
|
@@ -50954,7 +50954,7 @@ class DraftManager {
|
|
|
50954
50954
|
// We should always return an array, if the body is just a dictionary,
|
|
50955
50955
|
// stick it in an array
|
|
50956
50956
|
const body = isArray$3(action.error.body) ? action.error.body : [action.error.body];
|
|
50957
|
-
const bodyString = stringify$
|
|
50957
|
+
const bodyString = stringify$5(body);
|
|
50958
50958
|
item.error = {
|
|
50959
50959
|
status: action.error.status || 0,
|
|
50960
50960
|
ok: action.error.ok || false,
|
|
@@ -51119,7 +51119,7 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
|
|
|
51119
51119
|
decrementRefCount(key);
|
|
51120
51120
|
};
|
|
51121
51121
|
// note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
|
|
51122
|
-
return create$
|
|
51122
|
+
return create$5(env, {
|
|
51123
51123
|
storePublish: { value: storePublish },
|
|
51124
51124
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
51125
51125
|
softEvict: { value: softEvict },
|
|
@@ -51400,8 +51400,8 @@ function isArrayLike(x) {
|
|
|
51400
51400
|
(x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
|
|
51401
51401
|
}
|
|
51402
51402
|
|
|
51403
|
-
const { create: create$
|
|
51404
|
-
const { stringify: stringify$
|
|
51403
|
+
const { create: create$4, keys: keys$4, values: values$1, entries: entries$3, assign: assign$4 } = Object;
|
|
51404
|
+
const { stringify: stringify$4, parse: parse$4 } = JSON;
|
|
51405
51405
|
const { isArray: isArray$2 } = Array;
|
|
51406
51406
|
|
|
51407
51407
|
function recordLoaderFactory(query) {
|
|
@@ -51413,7 +51413,7 @@ function recordLoaderFactory(query) {
|
|
|
51413
51413
|
rows.forEach((row) => {
|
|
51414
51414
|
if (!row[0])
|
|
51415
51415
|
return null;
|
|
51416
|
-
const record = parse$
|
|
51416
|
+
const record = parse$4(row[0]);
|
|
51417
51417
|
if (record.id === id) {
|
|
51418
51418
|
foundRow = record;
|
|
51419
51419
|
}
|
|
@@ -51743,11 +51743,11 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
51743
51743
|
return dateTimeRange(range, operator, field, alias);
|
|
51744
51744
|
}
|
|
51745
51745
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
51746
|
-
throw new Error(`Where filter ${stringify$
|
|
51746
|
+
throw new Error(`Where filter ${stringify$4(input)} is not supported`);
|
|
51747
51747
|
}
|
|
51748
51748
|
function dateTimeRange(input, op, field, alias) {
|
|
51749
51749
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
51750
|
-
const key = keys$
|
|
51750
|
+
const key = keys$4(input)[0];
|
|
51751
51751
|
let operator = op;
|
|
51752
51752
|
if (operator === '=')
|
|
51753
51753
|
operator = 'BETWEEN';
|
|
@@ -51853,7 +51853,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
51853
51853
|
if (!where)
|
|
51854
51854
|
return [];
|
|
51855
51855
|
let predicates = [];
|
|
51856
|
-
const fields = keys$
|
|
51856
|
+
const fields = keys$4(where);
|
|
51857
51857
|
for (const field of fields) {
|
|
51858
51858
|
if (field === 'and' || field === 'or') {
|
|
51859
51859
|
predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
|
|
@@ -51902,7 +51902,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
51902
51902
|
}
|
|
51903
51903
|
else {
|
|
51904
51904
|
// @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
|
|
51905
|
-
const entityNames = keys$
|
|
51905
|
+
const entityNames = keys$4(where[field]);
|
|
51906
51906
|
const polyPredicatesGroups = entityNames
|
|
51907
51907
|
.filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
|
|
51908
51908
|
.map((entityName) => {
|
|
@@ -51932,7 +51932,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
51932
51932
|
}
|
|
51933
51933
|
else {
|
|
51934
51934
|
//`field` match the filedInfo's apiName
|
|
51935
|
-
for (const [op, value] of entries$
|
|
51935
|
+
for (const [op, value] of entries$3(where[field])) {
|
|
51936
51936
|
const operator = operatorToSql(op);
|
|
51937
51937
|
/**
|
|
51938
51938
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -53042,7 +53042,7 @@ function depth(json, currentLevel = 0) {
|
|
|
53042
53042
|
if (typeof json !== 'object') {
|
|
53043
53043
|
return currentLevel;
|
|
53044
53044
|
}
|
|
53045
|
-
const keys$1 = keys$
|
|
53045
|
+
const keys$1 = keys$4(json);
|
|
53046
53046
|
if (keys$1.length === 0)
|
|
53047
53047
|
return 0;
|
|
53048
53048
|
const depths = keys$1.map((key) => {
|
|
@@ -53071,7 +53071,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
|
|
|
53071
53071
|
return predicates;
|
|
53072
53072
|
const isSpanning = depth(orderBy) > 2;
|
|
53073
53073
|
if (isSpanning) {
|
|
53074
|
-
const keys$1 = keys$
|
|
53074
|
+
const keys$1 = keys$4(orderBy);
|
|
53075
53075
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
53076
53076
|
const key = keys$1[i];
|
|
53077
53077
|
const parentFields = objectInfoMap[recordType].fields;
|
|
@@ -53101,7 +53101,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
|
|
|
53101
53101
|
}
|
|
53102
53102
|
}
|
|
53103
53103
|
else {
|
|
53104
|
-
const keys$1 = keys$
|
|
53104
|
+
const keys$1 = keys$4(orderBy);
|
|
53105
53105
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
53106
53106
|
const key = keys$1[i];
|
|
53107
53107
|
if (!objectInfoMap[recordType])
|
|
@@ -53335,7 +53335,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
53335
53335
|
if (field.name === 'node') {
|
|
53336
53336
|
field.resolve = function nodeResolver(obj, _args, { seenRecordIds }) {
|
|
53337
53337
|
const { record, ingestionTimestamp } = obj;
|
|
53338
|
-
const recordRepresentation = parse$
|
|
53338
|
+
const recordRepresentation = parse$4(record);
|
|
53339
53339
|
seenRecordIds.add(recordRepresentation.id);
|
|
53340
53340
|
return { recordRepresentation, ingestionTimestamp };
|
|
53341
53341
|
};
|
|
@@ -53553,7 +53553,7 @@ function buildKeyStringForRecordQuery(operation, variables, argumentNodes, curre
|
|
|
53553
53553
|
variables,
|
|
53554
53554
|
fragmentMap: {},
|
|
53555
53555
|
});
|
|
53556
|
-
const filteredArgumentNodes = assign$
|
|
53556
|
+
const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
53557
53557
|
const argumentString = filteredArgumentNodes.length > 0
|
|
53558
53558
|
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
53559
53559
|
: '';
|
|
@@ -53608,7 +53608,7 @@ const baseTypeDefinitions = uiapiSchemaString + additionalSchemaDefinitions;
|
|
|
53608
53608
|
* @returns Type definition string and entity type names which support polymorphism.
|
|
53609
53609
|
*/
|
|
53610
53610
|
function generateTypeDefinitions(objectInfos) {
|
|
53611
|
-
if (keys$
|
|
53611
|
+
if (keys$4(objectInfos).length === 0)
|
|
53612
53612
|
return { typeDefs: baseTypeDefinitions, polyFieldTypeNames: [] };
|
|
53613
53613
|
const { recordQueries, recordConnections, polyFieldTypeNameArr } = generateRecordQueries(objectInfos);
|
|
53614
53614
|
const typeDefs = `
|
|
@@ -54359,7 +54359,7 @@ async function resolveObjectInfos(objectInfotree, objectInfoApiMap, startNodes,
|
|
|
54359
54359
|
// eslint-disable-next-line
|
|
54360
54360
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
54361
54361
|
}
|
|
54362
|
-
if (keys$
|
|
54362
|
+
if (keys$4(objectInfos).length < startNodes.size) {
|
|
54363
54363
|
// eslint-disable-next-line
|
|
54364
54364
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
54365
54365
|
}
|
|
@@ -55316,7 +55316,7 @@ function removeSyntheticFields(result, query) {
|
|
|
55316
55316
|
// so we keep any other results that are not included in a record query
|
|
55317
55317
|
const output = { ...result };
|
|
55318
55318
|
const outputApiParent = output.data.uiapi.query;
|
|
55319
|
-
const keys$1 = keys$
|
|
55319
|
+
const keys$1 = keys$4(nodeJson);
|
|
55320
55320
|
keys$1.forEach((recordName) => {
|
|
55321
55321
|
const outputApi = {};
|
|
55322
55322
|
// Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
|
|
@@ -55336,7 +55336,7 @@ function removeSyntheticFields(result, query) {
|
|
|
55336
55336
|
* @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
|
|
55337
55337
|
*/
|
|
55338
55338
|
function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
55339
|
-
const keys$1 = keys$
|
|
55339
|
+
const keys$1 = keys$4(jsonInput);
|
|
55340
55340
|
if (selection.selectionSet) {
|
|
55341
55341
|
createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
|
|
55342
55342
|
}
|
|
@@ -55345,7 +55345,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
|
55345
55345
|
}
|
|
55346
55346
|
}
|
|
55347
55347
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
55348
|
-
const keys$1 = keys$
|
|
55348
|
+
const keys$1 = keys$4(jsonInput);
|
|
55349
55349
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
55350
55350
|
const fieldName = subSelection.name.value;
|
|
55351
55351
|
if (keys$1.includes(fieldName)) {
|
|
@@ -55405,8 +55405,8 @@ function referenceIdFieldForRelationship(relationshipName) {
|
|
|
55405
55405
|
* For full license text, see the LICENSE.txt file
|
|
55406
55406
|
*/
|
|
55407
55407
|
|
|
55408
|
-
const { keys: keys$
|
|
55409
|
-
const { stringify: stringify$
|
|
55408
|
+
const { keys: keys$3, values, create: create$3, assign: assign$3, freeze: freeze$2 } = Object;
|
|
55409
|
+
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
55410
55410
|
const { shift } = Array.prototype;
|
|
55411
55411
|
const { isArray: isArray$1$1 } = Array;
|
|
55412
55412
|
|
|
@@ -55472,7 +55472,7 @@ function getRecordKeyForId(luvio, recordId) {
|
|
|
55472
55472
|
*/
|
|
55473
55473
|
function filterOutReferenceFieldsAndLinks(record) {
|
|
55474
55474
|
const filteredFields = {};
|
|
55475
|
-
const fieldNames = keys$
|
|
55475
|
+
const fieldNames = keys$3(record.fields);
|
|
55476
55476
|
for (const fieldName of fieldNames) {
|
|
55477
55477
|
const field = record.fields[fieldName];
|
|
55478
55478
|
if (isFieldLink(field) === false) {
|
|
@@ -55573,7 +55573,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableStore }) {
|
|
|
55573
55573
|
const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
|
|
55574
55574
|
return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
|
|
55575
55575
|
};
|
|
55576
|
-
return create$
|
|
55576
|
+
return create$3(env, {
|
|
55577
55577
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
55578
55578
|
});
|
|
55579
55579
|
}
|
|
@@ -55751,7 +55751,7 @@ function getRecordsDraftEnvironment(luvio, env, { isDraftId }) {
|
|
|
55751
55751
|
return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
|
|
55752
55752
|
}));
|
|
55753
55753
|
};
|
|
55754
|
-
return create$
|
|
55754
|
+
return create$3(env, {
|
|
55755
55755
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
55756
55756
|
});
|
|
55757
55757
|
}
|
|
@@ -55761,11 +55761,11 @@ function makeEnvironmentUiApiRecordDraftAware(luvio, options, env) {
|
|
|
55761
55761
|
const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
|
|
55762
55762
|
return synthesizer(luvio, environment, options);
|
|
55763
55763
|
}, env);
|
|
55764
|
-
return create$
|
|
55764
|
+
return create$3(adapterSpecificEnvironments, {});
|
|
55765
55765
|
}
|
|
55766
55766
|
|
|
55767
55767
|
function clone(obj) {
|
|
55768
|
-
return parse$
|
|
55768
|
+
return parse$3(stringify$3(obj));
|
|
55769
55769
|
}
|
|
55770
55770
|
|
|
55771
55771
|
const DEFAULT_FIELD_CREATED_BY_ID = 'CreatedById';
|
|
@@ -55888,7 +55888,7 @@ function recursivelyApplyDraftsToRecord(record, draftMetadata, recordOperations)
|
|
|
55888
55888
|
LastModifiedDate: lastModifiedDate,
|
|
55889
55889
|
};
|
|
55890
55890
|
const draftFields = buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, internalFields, objectInfos, referencedRecords, formatDisplayValue);
|
|
55891
|
-
const fieldNames = keys$
|
|
55891
|
+
const fieldNames = keys$3(draftFields);
|
|
55892
55892
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
55893
55893
|
const fieldName = fieldNames[i];
|
|
55894
55894
|
// don't apply server values to draft created records
|
|
@@ -55949,7 +55949,7 @@ function removeDrafts(record, luvio, objectInfo) {
|
|
|
55949
55949
|
return undefined;
|
|
55950
55950
|
}
|
|
55951
55951
|
const updatedFields = {};
|
|
55952
|
-
const fieldNames = keys$
|
|
55952
|
+
const fieldNames = keys$3(fields);
|
|
55953
55953
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
55954
55954
|
const fieldName = fieldNames[i];
|
|
55955
55955
|
const field = fields[fieldName];
|
|
@@ -55996,7 +55996,7 @@ function removeDrafts(record, luvio, objectInfo) {
|
|
|
55996
55996
|
* @param fields List of draft record fields
|
|
55997
55997
|
*/
|
|
55998
55998
|
function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fields, objectInfos, referencedRecords, formatDisplayValue) {
|
|
55999
|
-
const fieldNames = keys$
|
|
55999
|
+
const fieldNames = keys$3(fields);
|
|
56000
56000
|
const recordFields = {};
|
|
56001
56001
|
const objectInfo = objectInfos.get(apiName);
|
|
56002
56002
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
@@ -56065,7 +56065,7 @@ function buildSyntheticRecordRepresentation(luvio, createOperation, userId, obje
|
|
|
56065
56065
|
draftFields[DEFAULT_FIELD_OWNER_ID] = { value: userId, displayValue: null };
|
|
56066
56066
|
draftFields[DEFAULT_FIELD_ID] = { value: recordId, displayValue: null };
|
|
56067
56067
|
if (objectInfo !== undefined) {
|
|
56068
|
-
const allObjectFields = keys$
|
|
56068
|
+
const allObjectFields = keys$3(objectInfo.fields);
|
|
56069
56069
|
allObjectFields.forEach((fieldName) => {
|
|
56070
56070
|
if (draftFields[fieldName] === undefined) {
|
|
56071
56071
|
draftFields[fieldName] = { value: null, displayValue: null };
|
|
@@ -56189,7 +56189,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
56189
56189
|
this.isDraftId = isDraftId;
|
|
56190
56190
|
this.recordService = recordService;
|
|
56191
56191
|
this.handlerId = LDS_ACTION_HANDLER_ID;
|
|
56192
|
-
this.collectedFields = create$
|
|
56192
|
+
this.collectedFields = create$3(null);
|
|
56193
56193
|
recordService.registerRecordHandler(this);
|
|
56194
56194
|
}
|
|
56195
56195
|
async buildPendingAction(request, queue) {
|
|
@@ -56402,11 +56402,11 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
56402
56402
|
// otherwise we're a record
|
|
56403
56403
|
if (draftMetadata === undefined) {
|
|
56404
56404
|
// no drafts applied to this record, publish and be done
|
|
56405
|
-
this.collectedFields = create$
|
|
56405
|
+
this.collectedFields = create$3(null);
|
|
56406
56406
|
return publishData(key, data);
|
|
56407
56407
|
}
|
|
56408
56408
|
// create a denormalized record with the collected fields
|
|
56409
|
-
const recordFieldNames = keys$
|
|
56409
|
+
const recordFieldNames = keys$3(data.fields);
|
|
56410
56410
|
const partialRecord = {
|
|
56411
56411
|
...data,
|
|
56412
56412
|
fields: {},
|
|
@@ -56428,7 +56428,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
56428
56428
|
lastModifiedDate: recordWithDrafts.lastModifiedDate,
|
|
56429
56429
|
lastModifiedById: recordWithDrafts.lastModifiedById,
|
|
56430
56430
|
};
|
|
56431
|
-
for (const fieldName of keys$
|
|
56431
|
+
for (const fieldName of keys$3(recordWithSpanningRefLinks.fields)) {
|
|
56432
56432
|
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
56433
56433
|
if (this.collectedFields[fieldKey] !== undefined) {
|
|
56434
56434
|
const fieldData = recordWithSpanningRefLinks.fields[fieldName];
|
|
@@ -56445,7 +56445,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
56445
56445
|
// publish the normalized record
|
|
56446
56446
|
publishData(key, normalizedRecord);
|
|
56447
56447
|
// we've published the record, now clear the collected fields
|
|
56448
|
-
this.collectedFields = create$
|
|
56448
|
+
this.collectedFields = create$3(null);
|
|
56449
56449
|
}
|
|
56450
56450
|
updateMetadata(existingMetadata, incomingMetadata) {
|
|
56451
56451
|
// ensure the the api name cannot be overwritten in the incoming metadata
|
|
@@ -56482,7 +56482,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
56482
56482
|
let resolvedUrlParams = request.urlParams;
|
|
56483
56483
|
if (request.method === 'post' || request.method === 'patch') {
|
|
56484
56484
|
const bodyFields = resolvedBody.fields;
|
|
56485
|
-
const fieldNames = keys$
|
|
56485
|
+
const fieldNames = keys$3(bodyFields);
|
|
56486
56486
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
56487
56487
|
const fieldName = fieldNames[i];
|
|
56488
56488
|
const fieldValue = bodyFields[fieldName];
|
|
@@ -56565,7 +56565,7 @@ function isField(key, data) {
|
|
|
56565
56565
|
function normalizeRecordFields(key, entry) {
|
|
56566
56566
|
const { data: record } = entry;
|
|
56567
56567
|
const { fields, links } = record;
|
|
56568
|
-
const linkNames = keys$
|
|
56568
|
+
const linkNames = keys$3(links);
|
|
56569
56569
|
const normalizedFields = {};
|
|
56570
56570
|
const returnEntries = {};
|
|
56571
56571
|
for (let i = 0, len = linkNames.length; i < len; i++) {
|
|
@@ -56587,7 +56587,7 @@ function normalizeRecordFields(key, entry) {
|
|
|
56587
56587
|
}
|
|
56588
56588
|
}
|
|
56589
56589
|
returnEntries[key] = {
|
|
56590
|
-
data: assign$
|
|
56590
|
+
data: assign$3(record, { fields: normalizedFields }),
|
|
56591
56591
|
metadata: entry.metadata,
|
|
56592
56592
|
};
|
|
56593
56593
|
return returnEntries;
|
|
@@ -56603,7 +56603,7 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
56603
56603
|
const fields = normalizedRecord.fields;
|
|
56604
56604
|
const filteredFields = {};
|
|
56605
56605
|
const links = {};
|
|
56606
|
-
const fieldNames = keys$
|
|
56606
|
+
const fieldNames = keys$3(fields);
|
|
56607
56607
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
56608
56608
|
const fieldName = fieldNames[i];
|
|
56609
56609
|
const field = fields[fieldName];
|
|
@@ -56690,8 +56690,8 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56690
56690
|
if (durableEntries === undefined) {
|
|
56691
56691
|
return undefined;
|
|
56692
56692
|
}
|
|
56693
|
-
const returnEntries = create$
|
|
56694
|
-
const keys$1 = keys$
|
|
56693
|
+
const returnEntries = create$3(null);
|
|
56694
|
+
const keys$1 = keys$3(durableEntries);
|
|
56695
56695
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
56696
56696
|
const key = keys$1[i];
|
|
56697
56697
|
const value = durableEntries[key];
|
|
@@ -56699,7 +56699,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56699
56699
|
continue;
|
|
56700
56700
|
}
|
|
56701
56701
|
if (isEntryDurableRecordRepresentation(value, key)) {
|
|
56702
|
-
assign$
|
|
56702
|
+
assign$3(returnEntries, normalizeRecordFields(key, value));
|
|
56703
56703
|
}
|
|
56704
56704
|
else {
|
|
56705
56705
|
returnEntries[key] = value;
|
|
@@ -56709,8 +56709,8 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56709
56709
|
});
|
|
56710
56710
|
};
|
|
56711
56711
|
const denormalizeEntries = function (entries) {
|
|
56712
|
-
const putEntries = create$
|
|
56713
|
-
const keys$1 = keys$
|
|
56712
|
+
const putEntries = create$3(null);
|
|
56713
|
+
const keys$1 = keys$3(entries);
|
|
56714
56714
|
const putRecords = {};
|
|
56715
56715
|
const putRecordViews = {};
|
|
56716
56716
|
const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
|
|
@@ -56819,7 +56819,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
56819
56819
|
return denormalizedRecord;
|
|
56820
56820
|
});
|
|
56821
56821
|
};
|
|
56822
|
-
return create$
|
|
56822
|
+
return create$3(durableStore, {
|
|
56823
56823
|
getEntries: { value: getEntries, writable: true },
|
|
56824
56824
|
setEntries: { value: setEntries, writable: true },
|
|
56825
56825
|
batchOperations: { value: batchOperations, writable: true },
|
|
@@ -56837,7 +56837,7 @@ function normalizeError$1(error) {
|
|
|
56837
56837
|
else if (typeof error === 'string') {
|
|
56838
56838
|
return new Error(error);
|
|
56839
56839
|
}
|
|
56840
|
-
return new Error(stringify$
|
|
56840
|
+
return new Error(stringify$3(error));
|
|
56841
56841
|
}
|
|
56842
56842
|
|
|
56843
56843
|
const PERFORM_QUICK_ACTION_ENDPOINT_REGEX = /^\/ui-api\/actions\/perform-quick-action\/.*$/;
|
|
@@ -56865,7 +56865,7 @@ function performQuickActionDraftEnvironment(luvio, env, handler) {
|
|
|
56865
56865
|
}
|
|
56866
56866
|
return createOkResponse(data);
|
|
56867
56867
|
};
|
|
56868
|
-
return create$
|
|
56868
|
+
return create$3(env, {
|
|
56869
56869
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
56870
56870
|
});
|
|
56871
56871
|
}
|
|
@@ -56932,7 +56932,7 @@ class UiApiDraftRecordService {
|
|
|
56932
56932
|
};
|
|
56933
56933
|
}
|
|
56934
56934
|
objectInfoMap.set(apiName, objectInfo);
|
|
56935
|
-
const fields = keys$
|
|
56935
|
+
const fields = keys$3(operation.fields);
|
|
56936
56936
|
const unexpectedFields = [];
|
|
56937
56937
|
for (const field of fields) {
|
|
56938
56938
|
const fieldInfo = objectInfo.fields[field];
|
|
@@ -57218,7 +57218,7 @@ const replaceDraftIdsInVariables$1 = (variables, draftFunctions, unmappedDraftID
|
|
|
57218
57218
|
}
|
|
57219
57219
|
else if (typeof object === 'object' && object !== null) {
|
|
57220
57220
|
let source = object;
|
|
57221
|
-
return keys$
|
|
57221
|
+
return keys$3(source).reduce((acc, key) => {
|
|
57222
57222
|
acc[key] = replace(source[key]);
|
|
57223
57223
|
return acc;
|
|
57224
57224
|
}, {});
|
|
@@ -57227,7 +57227,7 @@ const replaceDraftIdsInVariables$1 = (variables, draftFunctions, unmappedDraftID
|
|
|
57227
57227
|
return object;
|
|
57228
57228
|
}
|
|
57229
57229
|
};
|
|
57230
|
-
let newVariables = keys$
|
|
57230
|
+
let newVariables = keys$3(variables).reduce((acc, key) => {
|
|
57231
57231
|
acc[key] = replace(variables[key]);
|
|
57232
57232
|
return acc;
|
|
57233
57233
|
}, {});
|
|
@@ -57240,7 +57240,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
57240
57240
|
};
|
|
57241
57241
|
return async function draftAwareGraphQLAdapter(config, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy, requestContext = {}) {
|
|
57242
57242
|
//create a copy to not accidentally modify the AST in the astResolver map of luvio
|
|
57243
|
-
const copy = parse$
|
|
57243
|
+
const copy = parse$3(stringify$3(config.query));
|
|
57244
57244
|
let injectedAST;
|
|
57245
57245
|
let objectInfoNeeded = {};
|
|
57246
57246
|
let unmappedDraftIDs;
|
|
@@ -57305,7 +57305,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
57305
57305
|
({ result: gqlResult, seenRecordIds } = await evaluate({
|
|
57306
57306
|
...config,
|
|
57307
57307
|
//need to create another copy of the ast for future writes
|
|
57308
|
-
query: parse$
|
|
57308
|
+
query: parse$3(stringify$3(injectedAST)),
|
|
57309
57309
|
}, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot));
|
|
57310
57310
|
}
|
|
57311
57311
|
catch (throwable) {
|
|
@@ -58059,16 +58059,16 @@ const recordIdGenerator = (id) => {
|
|
|
58059
58059
|
* For full license text, see the LICENSE.txt file
|
|
58060
58060
|
*/
|
|
58061
58061
|
|
|
58062
|
-
const { keys: keys$
|
|
58063
|
-
const { stringify: stringify$
|
|
58062
|
+
const { keys: keys$2$1, create: create$2$1, assign: assign$2, entries: entries$2 } = Object;
|
|
58063
|
+
const { stringify: stringify$2, parse: parse$2 } = JSON;
|
|
58064
58064
|
const { push: push$1, join: join$1, slice: slice$1 } = Array.prototype;
|
|
58065
58065
|
const { isArray: isArray$6, from } = Array;
|
|
58066
58066
|
|
|
58067
58067
|
function ldsParamsToString(params) {
|
|
58068
|
-
const returnParams = create$
|
|
58069
|
-
const keys$1
|
|
58070
|
-
for (let i = 0, len = keys$1
|
|
58071
|
-
const key = keys$1
|
|
58068
|
+
const returnParams = create$2$1(null);
|
|
58069
|
+
const keys$1 = keys$2$1(params);
|
|
58070
|
+
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
58071
|
+
const key = keys$1[i];
|
|
58072
58072
|
const value = params[key];
|
|
58073
58073
|
if (value === undefined) {
|
|
58074
58074
|
// filter out params that have no value
|
|
@@ -58083,8 +58083,8 @@ function ldsParamsToString(params) {
|
|
|
58083
58083
|
else {
|
|
58084
58084
|
returnParams[key] = `${value}`;
|
|
58085
58085
|
}
|
|
58086
|
-
if (isObject(value) === true && keys$
|
|
58087
|
-
returnParams[key] = stringify$
|
|
58086
|
+
if (isObject(value) === true && keys$2$1(value).length > 0) {
|
|
58087
|
+
returnParams[key] = stringify$2(value);
|
|
58088
58088
|
}
|
|
58089
58089
|
}
|
|
58090
58090
|
return returnParams;
|
|
@@ -58143,13 +58143,13 @@ function stringifyIfPresent(value) {
|
|
|
58143
58143
|
if (value === undefined || value === null) {
|
|
58144
58144
|
return null;
|
|
58145
58145
|
}
|
|
58146
|
-
return stringify$
|
|
58146
|
+
return stringify$2(value);
|
|
58147
58147
|
}
|
|
58148
58148
|
function parseIfPresent(value) {
|
|
58149
58149
|
if (value === undefined || value === null || value === '') {
|
|
58150
58150
|
return null;
|
|
58151
58151
|
}
|
|
58152
|
-
return parse$
|
|
58152
|
+
return parse$2(value);
|
|
58153
58153
|
}
|
|
58154
58154
|
function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
|
|
58155
58155
|
const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
|
|
@@ -58479,7 +58479,7 @@ function buildAggregateUiUrl(params, resourceRequest) {
|
|
|
58479
58479
|
optionalFields,
|
|
58480
58480
|
};
|
|
58481
58481
|
const queryString = [];
|
|
58482
|
-
for (const [key, value] of entries$
|
|
58482
|
+
for (const [key, value] of entries$2(mergedParams)) {
|
|
58483
58483
|
if (value !== undefined) {
|
|
58484
58484
|
queryString.push(`${key}=${isArray$6(value) ? value.join(',') : value}`);
|
|
58485
58485
|
}
|
|
@@ -58495,7 +58495,7 @@ function isSpanningRecord(fieldValue) {
|
|
|
58495
58495
|
function mergeRecordFields(first, second) {
|
|
58496
58496
|
const { fields: targetFields } = first;
|
|
58497
58497
|
const { fields: sourceFields } = second;
|
|
58498
|
-
const fieldNames = keys$
|
|
58498
|
+
const fieldNames = keys$2$1(sourceFields);
|
|
58499
58499
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
58500
58500
|
const fieldName = fieldNames[i];
|
|
58501
58501
|
const sourceField = sourceFields[fieldName];
|
|
@@ -58645,8 +58645,8 @@ function getMaxLengthPerChunkAllowed(request) {
|
|
|
58645
58645
|
// Too much work to get exact length of the final url, so use stringified json to get the rough length.
|
|
58646
58646
|
const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
|
|
58647
58647
|
request.baseUri.length +
|
|
58648
|
-
(request.urlParams ? stringify$
|
|
58649
|
-
stringify$
|
|
58648
|
+
(request.urlParams ? stringify$2(request.urlParams).length : 0) +
|
|
58649
|
+
stringify$2({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
|
|
58650
58650
|
// MAX_URL_LENGTH - full lenght without fields, optionalFields
|
|
58651
58651
|
return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
|
|
58652
58652
|
}
|
|
@@ -58854,8 +58854,8 @@ function makeNetworkAdapterChunkRecordFields(networkAdapter) {
|
|
|
58854
58854
|
}, networkAdapter);
|
|
58855
58855
|
}
|
|
58856
58856
|
|
|
58857
|
-
const { keys: keys$
|
|
58858
|
-
const { stringify: stringify$
|
|
58857
|
+
const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
|
|
58858
|
+
const { stringify: stringify$1$1, parse: parse$1$1 } = JSON;
|
|
58859
58859
|
const { push, join, slice } = Array.prototype;
|
|
58860
58860
|
|
|
58861
58861
|
// so eslint doesn't complain about nimbus
|
|
@@ -58872,10 +58872,10 @@ class NimbusDraftQueue {
|
|
|
58872
58872
|
if (callProxyMethod === undefined) {
|
|
58873
58873
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
58874
58874
|
}
|
|
58875
|
-
const serializedAction = stringify$
|
|
58875
|
+
const serializedAction = stringify$1$1([handlerId, data]);
|
|
58876
58876
|
return new Promise((resolve, reject) => {
|
|
58877
58877
|
callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
|
|
58878
|
-
const response = parse$
|
|
58878
|
+
const response = parse$1$1(serializedActionResponse);
|
|
58879
58879
|
resolve(response);
|
|
58880
58880
|
}, (errorMessage) => {
|
|
58881
58881
|
reject(new Error(errorMessage));
|
|
@@ -58896,8 +58896,8 @@ class NimbusDraftQueue {
|
|
|
58896
58896
|
return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
|
|
58897
58897
|
}
|
|
58898
58898
|
return new Promise((resolve, reject) => {
|
|
58899
|
-
callProxyMethod('getQueueActions', stringify$
|
|
58900
|
-
resolve(parse$
|
|
58899
|
+
callProxyMethod('getQueueActions', stringify$1$1([]), (serializedQueue) => {
|
|
58900
|
+
resolve(parse$1$1(serializedQueue));
|
|
58901
58901
|
}, (errorMessage) => {
|
|
58902
58902
|
reject(new Error(errorMessage));
|
|
58903
58903
|
});
|
|
@@ -58908,17 +58908,17 @@ class NimbusDraftQueue {
|
|
|
58908
58908
|
if (callProxyMethod === undefined) {
|
|
58909
58909
|
return Promise.reject('callProxyMethod not defined on the nimbus plugin');
|
|
58910
58910
|
}
|
|
58911
|
-
const stringifiedArgs = stringify$
|
|
58911
|
+
const stringifiedArgs = stringify$1$1([action]);
|
|
58912
58912
|
return new Promise((resolve, reject) => {
|
|
58913
58913
|
callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
|
|
58914
58914
|
if (data === undefined) {
|
|
58915
58915
|
resolve(undefined);
|
|
58916
58916
|
}
|
|
58917
58917
|
else {
|
|
58918
|
-
resolve(parse$
|
|
58918
|
+
resolve(parse$1$1(data));
|
|
58919
58919
|
}
|
|
58920
58920
|
}, (serializedError) => {
|
|
58921
|
-
reject(parse$
|
|
58921
|
+
reject(parse$1$1(serializedError));
|
|
58922
58922
|
});
|
|
58923
58923
|
});
|
|
58924
58924
|
}
|
|
@@ -58982,7 +58982,7 @@ function normalizeError$2(err) {
|
|
|
58982
58982
|
else if (typeof err === 'string') {
|
|
58983
58983
|
return new Error(err);
|
|
58984
58984
|
}
|
|
58985
|
-
return new Error(stringify$
|
|
58985
|
+
return new Error(stringify$1$1(err));
|
|
58986
58986
|
}
|
|
58987
58987
|
const DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS = 'draft-queue-total-mergeActions-calls';
|
|
58988
58988
|
const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
|
|
@@ -59080,7 +59080,7 @@ function instrumentDraftQueue(queue) {
|
|
|
59080
59080
|
logError: false,
|
|
59081
59081
|
});
|
|
59082
59082
|
};
|
|
59083
|
-
return create$
|
|
59083
|
+
return create$1$1(queue, { mergeActions: { value: mergeActions } });
|
|
59084
59084
|
}
|
|
59085
59085
|
|
|
59086
59086
|
// so eslint doesn't complain about nimbus
|
|
@@ -59156,7 +59156,7 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
|
|
|
59156
59156
|
function dataIsObjectInfo(key, data) {
|
|
59157
59157
|
return incomingObjectInfos.has(key);
|
|
59158
59158
|
}
|
|
59159
|
-
return create$
|
|
59159
|
+
return create$1$1(env, {
|
|
59160
59160
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
59161
59161
|
storePublish: { value: storePublish },
|
|
59162
59162
|
});
|
|
@@ -59262,7 +59262,7 @@ class ObjectInfoService {
|
|
|
59262
59262
|
this.getObjectInfosAdapter = getObjectInfosAdapter;
|
|
59263
59263
|
this.durableStore = durableStore;
|
|
59264
59264
|
// Local in-memory cache for ObjectInfo entries seen in DurableStore eg: {'Account': 001}
|
|
59265
|
-
this.objectInfoMemoryCache = create$
|
|
59265
|
+
this.objectInfoMemoryCache = create$1$1(null);
|
|
59266
59266
|
}
|
|
59267
59267
|
/**
|
|
59268
59268
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -59368,6 +59368,9 @@ function registerReportObserver(reportObserver) {
|
|
|
59368
59368
|
};
|
|
59369
59369
|
}
|
|
59370
59370
|
|
|
59371
|
+
const { keys: keys$9, create: create$7, assign: assign$7, entries } = Object;
|
|
59372
|
+
const { stringify: stringify$7, parse: parse$7 } = JSON;
|
|
59373
|
+
|
|
59371
59374
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
59372
59375
|
const paramList = whereIn.map(() => '?').join(',');
|
|
59373
59376
|
return `SELECT ${columnNames.join(',')} FROM ${table} WHERE ${keyColumnName} IN (${paramList})`;
|
|
@@ -59379,13 +59382,13 @@ function selectColumnsFromTableWhereKeyInNamespaced(columnNames, table, keyColum
|
|
|
59379
59382
|
|
|
59380
59383
|
// These const values must be in sync with the latest
|
|
59381
59384
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59382
|
-
const TABLE_NAME$
|
|
59385
|
+
const TABLE_NAME$1$1 = 'lds_data';
|
|
59383
59386
|
const COLUMN_NAME_KEY$2 = 'key';
|
|
59384
59387
|
const COLUMN_NAME_DATA$2 = 'data';
|
|
59385
59388
|
const COLUMN_NAME_METADATA$1 = 'metadata';
|
|
59386
59389
|
class LdsDataTable {
|
|
59387
59390
|
constructor(plugin) {
|
|
59388
|
-
this.tableName = TABLE_NAME$
|
|
59391
|
+
this.tableName = TABLE_NAME$1$1;
|
|
59389
59392
|
this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
|
|
59390
59393
|
this.conflictColumnNames = [COLUMN_NAME_KEY$2];
|
|
59391
59394
|
this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
@@ -59416,10 +59419,10 @@ class LdsDataTable {
|
|
|
59416
59419
|
},
|
|
59417
59420
|
conflictColumns: this.conflictColumnNames,
|
|
59418
59421
|
columns: this.columnNames,
|
|
59419
|
-
rows: keys$
|
|
59422
|
+
rows: keys$9(entries).reduce((rows, key) => {
|
|
59420
59423
|
const entry = entries[key];
|
|
59421
59424
|
const { data, metadata } = entry;
|
|
59422
|
-
const row = [key, stringify$
|
|
59425
|
+
const row = [key, stringify$7(data), metadata ? stringify$7(metadata) : null];
|
|
59423
59426
|
rows.push(row);
|
|
59424
59427
|
return rows;
|
|
59425
59428
|
}, []),
|
|
@@ -59429,10 +59432,10 @@ class LdsDataTable {
|
|
|
59429
59432
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
59430
59433
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
59431
59434
|
const durableStoreEntry = {
|
|
59432
|
-
data: parse$
|
|
59435
|
+
data: parse$7(stringifiedData),
|
|
59433
59436
|
};
|
|
59434
59437
|
if (stringifiedMetadata !== null) {
|
|
59435
|
-
durableStoreEntry.metadata = parse$
|
|
59438
|
+
durableStoreEntry.metadata = parse$7(stringifiedMetadata);
|
|
59436
59439
|
}
|
|
59437
59440
|
entries[key] = durableStoreEntry;
|
|
59438
59441
|
return entries;
|
|
@@ -59442,95 +59445,21 @@ class LdsDataTable {
|
|
|
59442
59445
|
|
|
59443
59446
|
// These const values must be in sync with the latest
|
|
59444
59447
|
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59448
|
+
const TABLE_NAME$2 = 'lds_internal';
|
|
59445
59449
|
const COLUMN_NAME_KEY$1 = 'key';
|
|
59446
59450
|
const COLUMN_NAME_DATA$1 = 'data';
|
|
59447
|
-
class AbstractKeyValueDataTable {
|
|
59448
|
-
constructor(plugin, tableName) {
|
|
59449
|
-
this.columnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_DATA$1];
|
|
59450
|
-
this.conflictColumnNames = [COLUMN_NAME_KEY$1];
|
|
59451
|
-
this.plugin = plugin;
|
|
59452
|
-
this.tableName = tableName;
|
|
59453
|
-
}
|
|
59454
|
-
getByKeys(keys) {
|
|
59455
|
-
return new Promise((resolve, reject) => {
|
|
59456
|
-
const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys);
|
|
59457
|
-
this.plugin.query(getQuery, keys, (x) => {
|
|
59458
|
-
resolve(this.mapToDurableEntries(x));
|
|
59459
|
-
}, reject);
|
|
59460
|
-
});
|
|
59461
|
-
}
|
|
59462
|
-
getAll() {
|
|
59463
|
-
const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
59464
|
-
return new Promise((resolve, reject) => {
|
|
59465
|
-
this.plugin.query(getAllQuery, [], (x) => {
|
|
59466
|
-
resolve(this.mapToDurableEntries(x));
|
|
59467
|
-
}, reject);
|
|
59468
|
-
});
|
|
59469
|
-
}
|
|
59470
|
-
entriesToUpsertOperations(entries, segment) {
|
|
59471
|
-
return {
|
|
59472
|
-
type: 'upsert',
|
|
59473
|
-
table: this.tableName,
|
|
59474
|
-
keyColumn: COLUMN_NAME_KEY$1,
|
|
59475
|
-
context: {
|
|
59476
|
-
segment,
|
|
59477
|
-
},
|
|
59478
|
-
conflictColumns: this.conflictColumnNames,
|
|
59479
|
-
columns: this.columnNames,
|
|
59480
|
-
rows: keys$8(entries).reduce((rows, key) => {
|
|
59481
|
-
const entry = entries[key];
|
|
59482
|
-
rows.push([key, stringify$6(entry.data)]);
|
|
59483
|
-
return rows;
|
|
59484
|
-
}, []),
|
|
59485
|
-
};
|
|
59486
|
-
}
|
|
59487
|
-
mapToDurableEntries(sqliteResult) {
|
|
59488
|
-
return sqliteResult.rows.reduce((entries, row) => {
|
|
59489
|
-
const [key, stringifiedData] = row;
|
|
59490
|
-
const durableStoreEntry = {
|
|
59491
|
-
data: parse$6(stringifiedData),
|
|
59492
|
-
};
|
|
59493
|
-
entries[key] = durableStoreEntry;
|
|
59494
|
-
return entries;
|
|
59495
|
-
}, {});
|
|
59496
|
-
}
|
|
59497
|
-
}
|
|
59498
|
-
|
|
59499
|
-
// These const values must be in sync with the latest
|
|
59500
|
-
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59501
|
-
const TABLE_NAME$2 = 'lds_env_drafts';
|
|
59502
|
-
class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
59503
|
-
constructor(plugin) {
|
|
59504
|
-
super(plugin, TABLE_NAME$2);
|
|
59505
|
-
}
|
|
59506
|
-
}
|
|
59507
|
-
|
|
59508
|
-
// These const values must be in sync with the latest
|
|
59509
|
-
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59510
|
-
const TABLE_NAME$1 = 'lds_env_draft_id_map';
|
|
59511
|
-
class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
|
|
59512
|
-
constructor(plugin) {
|
|
59513
|
-
super(plugin, TABLE_NAME$1);
|
|
59514
|
-
}
|
|
59515
|
-
}
|
|
59516
|
-
|
|
59517
|
-
// These const values must be in sync with the latest
|
|
59518
|
-
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59519
|
-
const TABLE_NAME = 'lds_internal';
|
|
59520
|
-
const COLUMN_NAME_KEY = 'key';
|
|
59521
|
-
const COLUMN_NAME_DATA = 'data';
|
|
59522
59451
|
const COLUMN_NAME_METADATA = 'metadata';
|
|
59523
59452
|
const COLUMN_NAME_NAMESPACE = 'namespace';
|
|
59524
59453
|
class LdsInternalDataTable {
|
|
59525
59454
|
constructor(plugin) {
|
|
59526
|
-
this.tableName = TABLE_NAME;
|
|
59455
|
+
this.tableName = TABLE_NAME$2;
|
|
59527
59456
|
this.columnNames = [
|
|
59528
|
-
COLUMN_NAME_KEY,
|
|
59529
|
-
COLUMN_NAME_DATA,
|
|
59457
|
+
COLUMN_NAME_KEY$1,
|
|
59458
|
+
COLUMN_NAME_DATA$1,
|
|
59530
59459
|
COLUMN_NAME_METADATA,
|
|
59531
59460
|
COLUMN_NAME_NAMESPACE,
|
|
59532
59461
|
];
|
|
59533
|
-
this.conflictColumnNames = [COLUMN_NAME_KEY, COLUMN_NAME_NAMESPACE];
|
|
59462
|
+
this.conflictColumnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_NAMESPACE];
|
|
59534
59463
|
this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName} WHERE ${COLUMN_NAME_NAMESPACE} = ?`;
|
|
59535
59464
|
this.plugin = plugin;
|
|
59536
59465
|
}
|
|
@@ -59538,7 +59467,7 @@ class LdsInternalDataTable {
|
|
|
59538
59467
|
if (namespace === undefined) {
|
|
59539
59468
|
throw Error('LdsInternalDataTable requires namespace');
|
|
59540
59469
|
}
|
|
59541
|
-
const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys, COLUMN_NAME_NAMESPACE);
|
|
59470
|
+
const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys, COLUMN_NAME_NAMESPACE);
|
|
59542
59471
|
return new Promise((resolve, reject) => {
|
|
59543
59472
|
this.plugin.query(getQuery, [namespace].concat(keys), (x) => {
|
|
59544
59473
|
resolve(this.mapToDurableEntries(x));
|
|
@@ -59556,18 +59485,18 @@ class LdsInternalDataTable {
|
|
|
59556
59485
|
return {
|
|
59557
59486
|
type: 'upsert',
|
|
59558
59487
|
table: this.tableName,
|
|
59559
|
-
keyColumn: COLUMN_NAME_KEY,
|
|
59488
|
+
keyColumn: COLUMN_NAME_KEY$1,
|
|
59560
59489
|
context: {
|
|
59561
59490
|
segment,
|
|
59562
59491
|
},
|
|
59563
59492
|
conflictColumns: this.conflictColumnNames,
|
|
59564
59493
|
columns: this.columnNames,
|
|
59565
|
-
rows: keys$
|
|
59494
|
+
rows: keys$9(entries).reduce((rows, key) => {
|
|
59566
59495
|
const entry = entries[key];
|
|
59567
59496
|
const { data, metadata } = entry;
|
|
59568
|
-
const row = [key, stringify$
|
|
59497
|
+
const row = [key, stringify$7(data)];
|
|
59569
59498
|
if (metadata) {
|
|
59570
|
-
row.push(stringify$
|
|
59499
|
+
row.push(stringify$7(metadata));
|
|
59571
59500
|
}
|
|
59572
59501
|
else {
|
|
59573
59502
|
row.push(null);
|
|
@@ -59582,10 +59511,10 @@ class LdsInternalDataTable {
|
|
|
59582
59511
|
return sqliteResult.rows.reduce((entries, row) => {
|
|
59583
59512
|
const [key, stringifiedData, stringifiedMetadata] = row;
|
|
59584
59513
|
const durableStoreEntry = {
|
|
59585
|
-
data: parse$
|
|
59514
|
+
data: parse$7(stringifiedData),
|
|
59586
59515
|
};
|
|
59587
59516
|
if (stringifiedMetadata !== null) {
|
|
59588
|
-
durableStoreEntry.metadata = parse$
|
|
59517
|
+
durableStoreEntry.metadata = parse$7(stringifiedMetadata);
|
|
59589
59518
|
}
|
|
59590
59519
|
entries[key] = durableStoreEntry;
|
|
59591
59520
|
return entries;
|
|
@@ -59594,13 +59523,12 @@ class LdsInternalDataTable {
|
|
|
59594
59523
|
}
|
|
59595
59524
|
|
|
59596
59525
|
class NimbusSqliteStore {
|
|
59597
|
-
constructor(plugin) {
|
|
59526
|
+
constructor(plugin, additionalTableMap = {}) {
|
|
59598
59527
|
this.plugin = plugin;
|
|
59599
59528
|
this.internalDataTable = new LdsInternalDataTable(plugin);
|
|
59600
59529
|
this.dataTableMap = {
|
|
59530
|
+
...additionalTableMap,
|
|
59601
59531
|
[DefaultDurableSegment]: new LdsDataTable(plugin),
|
|
59602
|
-
[DRAFT_SEGMENT]: new LdsDraftsDataTable(plugin),
|
|
59603
|
-
[DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(plugin),
|
|
59604
59532
|
};
|
|
59605
59533
|
}
|
|
59606
59534
|
isEvalSupported() {
|
|
@@ -59697,11 +59625,90 @@ class NimbusSqliteStore {
|
|
|
59697
59625
|
}
|
|
59698
59626
|
}
|
|
59699
59627
|
|
|
59628
|
+
// These const values must be in sync with the latest
|
|
59629
|
+
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59630
|
+
const COLUMN_NAME_KEY = 'key';
|
|
59631
|
+
const COLUMN_NAME_DATA = 'data';
|
|
59632
|
+
class AbstractKeyValueDataTable {
|
|
59633
|
+
constructor(plugin, tableName) {
|
|
59634
|
+
this.columnNames = [COLUMN_NAME_KEY, COLUMN_NAME_DATA];
|
|
59635
|
+
this.conflictColumnNames = [COLUMN_NAME_KEY];
|
|
59636
|
+
this.plugin = plugin;
|
|
59637
|
+
this.tableName = tableName;
|
|
59638
|
+
}
|
|
59639
|
+
getByKeys(keys) {
|
|
59640
|
+
return new Promise((resolve, reject) => {
|
|
59641
|
+
const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys);
|
|
59642
|
+
this.plugin.query(getQuery, keys, (x) => {
|
|
59643
|
+
resolve(this.mapToDurableEntries(x));
|
|
59644
|
+
}, reject);
|
|
59645
|
+
});
|
|
59646
|
+
}
|
|
59647
|
+
getAll() {
|
|
59648
|
+
const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
|
|
59649
|
+
return new Promise((resolve, reject) => {
|
|
59650
|
+
this.plugin.query(getAllQuery, [], (x) => {
|
|
59651
|
+
resolve(this.mapToDurableEntries(x));
|
|
59652
|
+
}, reject);
|
|
59653
|
+
});
|
|
59654
|
+
}
|
|
59655
|
+
entriesToUpsertOperations(entries, segment) {
|
|
59656
|
+
return {
|
|
59657
|
+
type: 'upsert',
|
|
59658
|
+
table: this.tableName,
|
|
59659
|
+
keyColumn: COLUMN_NAME_KEY,
|
|
59660
|
+
context: {
|
|
59661
|
+
segment,
|
|
59662
|
+
},
|
|
59663
|
+
conflictColumns: this.conflictColumnNames,
|
|
59664
|
+
columns: this.columnNames,
|
|
59665
|
+
rows: keys$9(entries).reduce((rows, key) => {
|
|
59666
|
+
const entry = entries[key];
|
|
59667
|
+
rows.push([key, stringify$7(entry.data)]);
|
|
59668
|
+
return rows;
|
|
59669
|
+
}, []),
|
|
59670
|
+
};
|
|
59671
|
+
}
|
|
59672
|
+
mapToDurableEntries(sqliteResult) {
|
|
59673
|
+
return sqliteResult.rows.reduce((entries, row) => {
|
|
59674
|
+
const [key, stringifiedData] = row;
|
|
59675
|
+
const durableStoreEntry = {
|
|
59676
|
+
data: parse$7(stringifiedData),
|
|
59677
|
+
};
|
|
59678
|
+
entries[key] = durableStoreEntry;
|
|
59679
|
+
return entries;
|
|
59680
|
+
}, {});
|
|
59681
|
+
}
|
|
59682
|
+
}
|
|
59683
|
+
|
|
59684
|
+
// These const values must be in sync with the latest
|
|
59685
|
+
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59686
|
+
const TABLE_NAME$1 = 'lds_env_drafts';
|
|
59687
|
+
class LdsDraftsDataTable extends AbstractKeyValueDataTable {
|
|
59688
|
+
constructor(plugin) {
|
|
59689
|
+
super(plugin, TABLE_NAME$1);
|
|
59690
|
+
}
|
|
59691
|
+
}
|
|
59692
|
+
|
|
59693
|
+
// These const values must be in sync with the latest
|
|
59694
|
+
// @salesforce/nimbus-plugin-lds/sql schema file
|
|
59695
|
+
const TABLE_NAME = 'lds_env_draft_id_map';
|
|
59696
|
+
class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
|
|
59697
|
+
constructor(plugin) {
|
|
59698
|
+
super(plugin, TABLE_NAME);
|
|
59699
|
+
}
|
|
59700
|
+
}
|
|
59701
|
+
|
|
59700
59702
|
// so eslint doesn't complain about nimbus
|
|
59701
59703
|
let baseDurableStore;
|
|
59702
|
-
function getNimbusDurableStore() {
|
|
59704
|
+
function getNimbusDurableStore(plugin) {
|
|
59703
59705
|
if (baseDurableStore === undefined) {
|
|
59704
|
-
|
|
59706
|
+
const resolvedPlugin = plugin === undefined ? __nimbus.plugins.LdsSqliteStore : plugin;
|
|
59707
|
+
const draftDataTableMap = {
|
|
59708
|
+
[DRAFT_SEGMENT]: new LdsDraftsDataTable(resolvedPlugin),
|
|
59709
|
+
[DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(resolvedPlugin),
|
|
59710
|
+
};
|
|
59711
|
+
baseDurableStore = new NimbusSqliteStore(resolvedPlugin, draftDataTableMap);
|
|
59705
59712
|
}
|
|
59706
59713
|
return baseDurableStore;
|
|
59707
59714
|
}
|
|
@@ -59842,7 +59849,7 @@ function makeEnvironmentGraphqlAware(environment) {
|
|
|
59842
59849
|
}
|
|
59843
59850
|
return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
|
|
59844
59851
|
};
|
|
59845
|
-
return create$
|
|
59852
|
+
return create$1$1(environment, {
|
|
59846
59853
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
59847
59854
|
applyCachePolicy: { value: applyCachePolicy },
|
|
59848
59855
|
setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
|
|
@@ -59887,7 +59894,7 @@ function setupInspection(luvio) {
|
|
|
59887
59894
|
// eslint-disable-next-line no-undef
|
|
59888
59895
|
globalThis.luvio = luvio;
|
|
59889
59896
|
registerReportObserver((report) => {
|
|
59890
|
-
__nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$
|
|
59897
|
+
__nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$1$1(report));
|
|
59891
59898
|
});
|
|
59892
59899
|
}
|
|
59893
59900
|
}
|
|
@@ -60728,7 +60735,7 @@ register({
|
|
|
60728
60735
|
id: '@salesforce/lds-network-adapter',
|
|
60729
60736
|
instrument: instrument$1,
|
|
60730
60737
|
});
|
|
60731
|
-
// version: 1.
|
|
60738
|
+
// version: 1.200.0-c4cb94fd9
|
|
60732
60739
|
|
|
60733
60740
|
const { create: create$2, keys: keys$2 } = Object;
|
|
60734
60741
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -77019,7 +77026,7 @@ function transformConfiguration$1(config) {
|
|
|
77019
77026
|
// Make a copy of the config before running transform to avoid mutating the original config
|
|
77020
77027
|
const adapterConfigCopy = {
|
|
77021
77028
|
...config,
|
|
77022
|
-
query: parse$
|
|
77029
|
+
query: parse$9(print(config.query))
|
|
77023
77030
|
};
|
|
77024
77031
|
return {
|
|
77025
77032
|
...adapterConfigCopy,
|
|
@@ -77559,7 +77566,7 @@ function transformConfiguration(config) {
|
|
|
77559
77566
|
const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
|
|
77560
77567
|
return {
|
|
77561
77568
|
...singleConfig,
|
|
77562
|
-
query: applyMinimumFieldsToQuery(parse$
|
|
77569
|
+
query: applyMinimumFieldsToQuery(parse$9(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
|
|
77563
77570
|
};
|
|
77564
77571
|
});
|
|
77565
77572
|
return {
|
|
@@ -78071,7 +78078,7 @@ register({
|
|
|
78071
78078
|
configuration: { ...configurationForGraphQLAdapters },
|
|
78072
78079
|
instrument,
|
|
78073
78080
|
});
|
|
78074
|
-
// version: 1.
|
|
78081
|
+
// version: 1.200.0-dab735b42
|
|
78075
78082
|
|
|
78076
78083
|
// On core the unstable adapters are re-exported with different names,
|
|
78077
78084
|
|
|
@@ -80318,7 +80325,7 @@ withDefaultLuvio((luvio) => {
|
|
|
80318
80325
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
80319
80326
|
graphQLImperative = ldsAdapter;
|
|
80320
80327
|
});
|
|
80321
|
-
// version: 1.
|
|
80328
|
+
// version: 1.200.0-dab735b42
|
|
80322
80329
|
|
|
80323
80330
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
80324
80331
|
__proto__: null,
|
|
@@ -81007,4 +81014,4 @@ const { luvio } = getRuntime();
|
|
|
81007
81014
|
setDefaultLuvio({ luvio });
|
|
81008
81015
|
|
|
81009
81016
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
81010
|
-
// version: 1.
|
|
81017
|
+
// version: 1.200.0-c4cb94fd9
|