@salesforce/lds-worker-api 1.341.0 → 1.342.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,7 +20,7 @@ var SnapshotState$3;
|
|
|
20
20
|
SnapshotState["Stale"] = "Stale";
|
|
21
21
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
22
22
|
|
|
23
|
-
const { create: create$
|
|
23
|
+
const { create: create$9, entries: entries$4, freeze: freeze$5, keys: keys$9, values: values$3, assign: assign$8 } = Object;
|
|
24
24
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
25
25
|
const { isArray: isArray$7 } = Array;
|
|
26
26
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
@@ -48,12 +48,12 @@ function deepFreeze(value) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
const keys$1 = keys$
|
|
51
|
+
const keys$1 = keys$9(value);
|
|
52
52
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
53
53
|
deepFreeze(value[keys$1[i]]);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
freeze$
|
|
56
|
+
freeze$5(value);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
function isErrorSnapshot$3(snapshot) {
|
|
@@ -319,7 +319,7 @@ function stableJSONStringify$3(node) {
|
|
|
319
319
|
if (node === null) {
|
|
320
320
|
return 'null';
|
|
321
321
|
}
|
|
322
|
-
const keys$1 = keys$
|
|
322
|
+
const keys$1 = keys$9(node).sort();
|
|
323
323
|
out = '';
|
|
324
324
|
for (i = 0; i < keys$1.length; i++) {
|
|
325
325
|
const key = keys$1[i];
|
|
@@ -587,13 +587,13 @@ function getTTLOverride$1(ttlOverrideKey, ttlOverrides, defaultTTLOverride) {
|
|
|
587
587
|
class StringKeyInMemoryStore {
|
|
588
588
|
constructor(options = {}) {
|
|
589
589
|
// public, in memory properties
|
|
590
|
-
this.records = create$
|
|
591
|
-
this.metadata = create$
|
|
592
|
-
this.visitedIds = create$
|
|
593
|
-
this.refreshedIds = create$
|
|
594
|
-
this.redirectKeys = create$
|
|
595
|
-
this.retainedIds = create$
|
|
596
|
-
this.ttlOverrides = create$
|
|
590
|
+
this.records = create$9(null);
|
|
591
|
+
this.metadata = create$9(null);
|
|
592
|
+
this.visitedIds = create$9(null);
|
|
593
|
+
this.refreshedIds = create$9(null);
|
|
594
|
+
this.redirectKeys = create$9(null);
|
|
595
|
+
this.retainedIds = create$9(null);
|
|
596
|
+
this.ttlOverrides = create$9(null);
|
|
597
597
|
this.snapshotSubscriptions = [];
|
|
598
598
|
this.trimTask = null;
|
|
599
599
|
this.pendingTrimKeys = new Set();
|
|
@@ -601,8 +601,8 @@ class StringKeyInMemoryStore {
|
|
|
601
601
|
this.watchSubscriptions = [];
|
|
602
602
|
this.eventObservers = [];
|
|
603
603
|
// private/protected
|
|
604
|
-
this.insertedIds = create$
|
|
605
|
-
this.reverseRedirectKeys = create$
|
|
604
|
+
this.insertedIds = create$9(null);
|
|
605
|
+
this.reverseRedirectKeys = create$9(null);
|
|
606
606
|
this.currentSnapshotId = 0;
|
|
607
607
|
this.scheduler = options.scheduler || buildDefaultScheduler();
|
|
608
608
|
if (options.initialData) {
|
|
@@ -615,13 +615,13 @@ class StringKeyInMemoryStore {
|
|
|
615
615
|
return this.records[this.getCanonicalRecordId(key)];
|
|
616
616
|
}
|
|
617
617
|
getNumEntries() {
|
|
618
|
-
return keys$
|
|
618
|
+
return keys$9(this.records).length;
|
|
619
619
|
}
|
|
620
620
|
readMetadata(key) {
|
|
621
621
|
return this.metadata[this.getCanonicalRecordId(key)];
|
|
622
622
|
}
|
|
623
623
|
readMetadataWhere(query) {
|
|
624
|
-
const keys$1 = keys$
|
|
624
|
+
const keys$1 = keys$9(this.metadata);
|
|
625
625
|
const results = [];
|
|
626
626
|
const hasNamespaceQuery = hasOwnProperty$4.call(query, 'namespace');
|
|
627
627
|
const hasRepresentationNameQuery = hasOwnProperty$4.call(query, 'representationName');
|
|
@@ -718,8 +718,8 @@ class StringKeyInMemoryStore {
|
|
|
718
718
|
// Note: we should always get the subscription references from this at the beginning
|
|
719
719
|
// of the function, in case the reference changes (because of an unsubscribe)
|
|
720
720
|
const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
|
|
721
|
-
const allVisitedIds = keys$
|
|
722
|
-
const allRefreshedIds = keys$
|
|
721
|
+
const allVisitedIds = keys$9(visitedIds);
|
|
722
|
+
const allRefreshedIds = keys$9(refreshedIds);
|
|
723
723
|
// Early exit if nothing has changed
|
|
724
724
|
if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
|
|
725
725
|
return Promise.resolve();
|
|
@@ -762,9 +762,9 @@ class StringKeyInMemoryStore {
|
|
|
762
762
|
callback(watchCallbackEntries);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
this.visitedIds = create$
|
|
766
|
-
this.refreshedIds = create$
|
|
767
|
-
this.insertedIds = create$
|
|
765
|
+
this.visitedIds = create$9(null);
|
|
766
|
+
this.refreshedIds = create$9(null);
|
|
767
|
+
this.insertedIds = create$9(null);
|
|
768
768
|
// the .then removes the return of an array of voids to a single void
|
|
769
769
|
return Promise.all(snapshotSubPromises).then(() => { });
|
|
770
770
|
}
|
|
@@ -956,18 +956,18 @@ class StringKeyInMemoryStore {
|
|
|
956
956
|
return this.defaultTTLOverride;
|
|
957
957
|
}
|
|
958
958
|
reset() {
|
|
959
|
-
this.records = create$
|
|
959
|
+
this.records = create$9(null);
|
|
960
960
|
this.snapshotSubscriptions = [];
|
|
961
961
|
this.watchSubscriptions = [];
|
|
962
|
-
this.visitedIds = create$
|
|
963
|
-
this.refreshedIds = create$
|
|
964
|
-
this.insertedIds = create$
|
|
965
|
-
this.redirectKeys = create$
|
|
966
|
-
this.reverseRedirectKeys = create$
|
|
967
|
-
this.retainedIds = create$
|
|
968
|
-
this.ttlOverrides = create$
|
|
962
|
+
this.visitedIds = create$9(null);
|
|
963
|
+
this.refreshedIds = create$9(null);
|
|
964
|
+
this.insertedIds = create$9(null);
|
|
965
|
+
this.redirectKeys = create$9(null);
|
|
966
|
+
this.reverseRedirectKeys = create$9(null);
|
|
967
|
+
this.retainedIds = create$9(null);
|
|
968
|
+
this.ttlOverrides = create$9(null);
|
|
969
969
|
this.trimTask = null;
|
|
970
|
-
this.metadata = create$
|
|
970
|
+
this.metadata = create$9(null);
|
|
971
971
|
this.defaultTTLOverride = undefined;
|
|
972
972
|
emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
|
|
973
973
|
}
|
|
@@ -1226,7 +1226,7 @@ class StringKeyInMemoryStore {
|
|
|
1226
1226
|
calculateAndSetNewTTLs(storeMetadata, resetInitialDataTtls) {
|
|
1227
1227
|
if (resetInitialDataTtls === true) {
|
|
1228
1228
|
const now = Date.now();
|
|
1229
|
-
keys$
|
|
1229
|
+
keys$9(storeMetadata).forEach((key) => {
|
|
1230
1230
|
const storeMetadataEntry = storeMetadata[key];
|
|
1231
1231
|
const ttl = storeMetadataEntry.expirationTimestamp - storeMetadataEntry.ingestionTimestamp;
|
|
1232
1232
|
storeMetadataEntry.ingestionTimestamp = now;
|
|
@@ -1255,7 +1255,7 @@ function isPendingSnapshotWithNoOverlappingIds(snapshot, visitedIds, refreshedId
|
|
|
1255
1255
|
hasOverlappingIds(snapshot, visitedIds) === false);
|
|
1256
1256
|
}
|
|
1257
1257
|
function getMatchingIds(partialKey, visitedIds) {
|
|
1258
|
-
const keys$1 = keys$
|
|
1258
|
+
const keys$1 = keys$9(partialKey);
|
|
1259
1259
|
return visitedIds.filter((visitedId) => {
|
|
1260
1260
|
return keys$1.every((key) => {
|
|
1261
1261
|
return partialKey[key] === visitedId[key];
|
|
@@ -1911,8 +1911,8 @@ class InMemoryStore {
|
|
|
1911
1911
|
} while (redirectKey !== undefined);
|
|
1912
1912
|
}
|
|
1913
1913
|
isUsingStringKeys() {
|
|
1914
|
-
return (keys$
|
|
1915
|
-
keys$
|
|
1914
|
+
return (keys$9(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
|
|
1915
|
+
keys$9(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
|
|
1916
1916
|
}
|
|
1917
1917
|
delegateToFallbackStringKeyStore(snapshot) {
|
|
1918
1918
|
return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
|
|
@@ -1954,7 +1954,7 @@ class InMemoryStore {
|
|
|
1954
1954
|
buildKeySchema(keyMetadata) {
|
|
1955
1955
|
// pull NamespacedType type out of NormalizedKeyMetadata
|
|
1956
1956
|
const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
|
|
1957
|
-
const keySchema = keys$
|
|
1957
|
+
const keySchema = keys$9(keyParamValues).sort();
|
|
1958
1958
|
return ['namespace', 'representationName', ...keySchema];
|
|
1959
1959
|
}
|
|
1960
1960
|
serialize() {
|
|
@@ -2248,7 +2248,7 @@ class GraphNode {
|
|
|
2248
2248
|
return value;
|
|
2249
2249
|
}
|
|
2250
2250
|
keys() {
|
|
2251
|
-
return keys$
|
|
2251
|
+
return keys$9(this.data);
|
|
2252
2252
|
}
|
|
2253
2253
|
isScalar(propertyName) {
|
|
2254
2254
|
// TODO W-6900046 - merge.ts casts these to any and manually sets `data`
|
|
@@ -2683,7 +2683,7 @@ class Reader {
|
|
|
2683
2683
|
}
|
|
2684
2684
|
}
|
|
2685
2685
|
selectAllObject(record, data, visitedKeys) {
|
|
2686
|
-
const recordKeys = keys$
|
|
2686
|
+
const recordKeys = keys$9(record);
|
|
2687
2687
|
const { length } = recordKeys;
|
|
2688
2688
|
for (let i = 0; i < length; i += 1) {
|
|
2689
2689
|
const key = recordKeys[i];
|
|
@@ -2878,7 +2878,7 @@ class Reader {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
const { baseSnapshotValue } = this.currentPath;
|
|
2880
2880
|
if (isDefined(baseSnapshotValue)) {
|
|
2881
|
-
this.snapshotChanged = keys$1.length !== keys$
|
|
2881
|
+
this.snapshotChanged = keys$1.length !== keys$9(baseSnapshotValue).length;
|
|
2882
2882
|
}
|
|
2883
2883
|
}
|
|
2884
2884
|
checkIfChanged(value, options) {
|
|
@@ -2922,7 +2922,7 @@ class Reader {
|
|
|
2922
2922
|
return this.markMissing();
|
|
2923
2923
|
}
|
|
2924
2924
|
const sink = (data[propertyName] = {});
|
|
2925
|
-
const keys$1 = keys$
|
|
2925
|
+
const keys$1 = keys$9(obj);
|
|
2926
2926
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2927
2927
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
2928
2928
|
const key = keys$1[i];
|
|
@@ -2933,7 +2933,7 @@ class Reader {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
readLinkMap(propertyName, selection, record, data) {
|
|
2935
2935
|
const map = record[propertyName];
|
|
2936
|
-
const keys$1 = keys$
|
|
2936
|
+
const keys$1 = keys$9(map);
|
|
2937
2937
|
const sink = {};
|
|
2938
2938
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2939
2939
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
@@ -3067,7 +3067,7 @@ class Reader {
|
|
|
3067
3067
|
return;
|
|
3068
3068
|
}
|
|
3069
3069
|
const sink = (data[propertyName] = {});
|
|
3070
|
-
const keys$1 = keys$
|
|
3070
|
+
const keys$1 = keys$9(obj);
|
|
3071
3071
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
3072
3072
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
3073
3073
|
const key = keys$1[i];
|
|
@@ -3300,8 +3300,8 @@ class Environment {
|
|
|
3300
3300
|
this.defaultCachePolicy = { type: 'cache-then-network' };
|
|
3301
3301
|
this.store = store;
|
|
3302
3302
|
this.networkAdapter = networkAdapter;
|
|
3303
|
-
this.adapterContextMap = create$
|
|
3304
|
-
this.typeQueryEvaluatorMap = create$
|
|
3303
|
+
this.adapterContextMap = create$9(null);
|
|
3304
|
+
this.typeQueryEvaluatorMap = create$9(null);
|
|
3305
3305
|
// bind these methods so when they get passed into the
|
|
3306
3306
|
// Store, the this reference is preserved
|
|
3307
3307
|
this.createSnapshot = this.createSnapshot.bind(this);
|
|
@@ -3401,7 +3401,7 @@ class Environment {
|
|
|
3401
3401
|
status: StoreErrorStatus$1.RESOURCE_NOT_FOUND,
|
|
3402
3402
|
error,
|
|
3403
3403
|
};
|
|
3404
|
-
freeze$
|
|
3404
|
+
freeze$5(entry);
|
|
3405
3405
|
store.publish(key, entry);
|
|
3406
3406
|
if (storeMetadataParams !== undefined) {
|
|
3407
3407
|
const { ttl, namespace, representationName, version } = storeMetadataParams;
|
|
@@ -3501,7 +3501,7 @@ class Environment {
|
|
|
3501
3501
|
// retrieve from adapterContextMap if contextId is supplied
|
|
3502
3502
|
// we will only track context of adapters that explicitly provide a contextId
|
|
3503
3503
|
if (this.adapterContextMap[contextId] === undefined) {
|
|
3504
|
-
this.adapterContextMap[contextId] = create$
|
|
3504
|
+
this.adapterContextMap[contextId] = create$9(null);
|
|
3505
3505
|
}
|
|
3506
3506
|
const contextStore = this.adapterContextMap[contextId];
|
|
3507
3507
|
const context = {
|
|
@@ -3790,13 +3790,13 @@ class Luvio {
|
|
|
3790
3790
|
// undefined values on the injected networkAdapter. So we do it here, on
|
|
3791
3791
|
// the API that those adapters call to dispatch their ResourceRequests.
|
|
3792
3792
|
const { queryParams, urlParams } = mergedResourceRequest;
|
|
3793
|
-
for (const paramKey of keys$
|
|
3793
|
+
for (const paramKey of keys$9(queryParams)) {
|
|
3794
3794
|
const value = queryParams[paramKey];
|
|
3795
3795
|
if (value === undefined) {
|
|
3796
3796
|
delete queryParams[paramKey];
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
|
-
for (const paramKey of keys$
|
|
3799
|
+
for (const paramKey of keys$9(urlParams)) {
|
|
3800
3800
|
const value = urlParams[paramKey];
|
|
3801
3801
|
if (value === undefined) {
|
|
3802
3802
|
delete urlParams[paramKey];
|
|
@@ -4123,16 +4123,16 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
4123
4123
|
return acc;
|
|
4124
4124
|
}, {});
|
|
4125
4125
|
const resourceParams = {};
|
|
4126
|
-
if (keys$
|
|
4126
|
+
if (keys$9(urlParams).length > 0) {
|
|
4127
4127
|
resourceParams[CONFIG_PROPERTY_URL_PARAMS] = urlParams;
|
|
4128
4128
|
}
|
|
4129
|
-
if (keys$
|
|
4129
|
+
if (keys$9(queryParams).length > 0) {
|
|
4130
4130
|
resourceParams[CONFIG_PROPERTY_QUERY_PARAMS] = queryParams;
|
|
4131
4131
|
}
|
|
4132
4132
|
if (bodyParams.length > 0) {
|
|
4133
4133
|
resourceParams[CONFIG_PROPERTY_BODY] = actualBodyParams;
|
|
4134
4134
|
}
|
|
4135
|
-
if (keys$
|
|
4135
|
+
if (keys$9(headerParams).length > 0) {
|
|
4136
4136
|
resourceParams[CONFIG_PROPERTY_HEADERS] = headerParams;
|
|
4137
4137
|
}
|
|
4138
4138
|
return resourceParams;
|
|
@@ -4265,7 +4265,7 @@ function withDefaultLuvio(callback) {
|
|
|
4265
4265
|
}
|
|
4266
4266
|
callbacks.push(callback);
|
|
4267
4267
|
}
|
|
4268
|
-
// version: 1.
|
|
4268
|
+
// version: 1.342.0-651bed9637
|
|
4269
4269
|
|
|
4270
4270
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4271
4271
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4874,7 +4874,7 @@ function createLDSAdapter(luvio, name, factory) {
|
|
|
4874
4874
|
return factory(luvio);
|
|
4875
4875
|
}
|
|
4876
4876
|
|
|
4877
|
-
const { create: create$
|
|
4877
|
+
const { create: create$8, defineProperty, defineProperties } = Object;
|
|
4878
4878
|
|
|
4879
4879
|
var SnapshotState$2;
|
|
4880
4880
|
(function (SnapshotState) {
|
|
@@ -5213,7 +5213,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
5213
5213
|
const { apiFamily, name } = metadata;
|
|
5214
5214
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5215
5215
|
}
|
|
5216
|
-
// version: 1.
|
|
5216
|
+
// version: 1.342.0-651bed9637
|
|
5217
5217
|
|
|
5218
5218
|
/**
|
|
5219
5219
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5316,7 +5316,7 @@ var TypeCheckShapes;
|
|
|
5316
5316
|
|
|
5317
5317
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5318
5318
|
|
|
5319
|
-
const { assign: assign$
|
|
5319
|
+
const { assign: assign$7, create: create$7, freeze: freeze$4, isFrozen: isFrozen$4, keys: keys$8 } = Object;
|
|
5320
5320
|
|
|
5321
5321
|
/**
|
|
5322
5322
|
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
@@ -5536,7 +5536,7 @@ ObjectCreate$4(null);
|
|
|
5536
5536
|
|
|
5537
5537
|
ObjectCreate$4(null);
|
|
5538
5538
|
|
|
5539
|
-
freeze$
|
|
5539
|
+
freeze$4({
|
|
5540
5540
|
name: '',
|
|
5541
5541
|
children: {},
|
|
5542
5542
|
});
|
|
@@ -6033,7 +6033,7 @@ function buildAdapterValidationConfig$3(displayName, paramsMeta) {
|
|
|
6033
6033
|
}
|
|
6034
6034
|
const keyPrefix$3 = 'UiApi';
|
|
6035
6035
|
|
|
6036
|
-
const { assign: assign$
|
|
6036
|
+
const { assign: assign$6, create: create$6, freeze: freeze$3, isFrozen: isFrozen$3, keys: keys$7 } = Object;
|
|
6037
6037
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
6038
6038
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6039
6039
|
const { isArray: isArray$5 } = Array;
|
|
@@ -6062,7 +6062,7 @@ function dedupe$3(value) {
|
|
|
6062
6062
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
6063
6063
|
result[value[i]] = true;
|
|
6064
6064
|
}
|
|
6065
|
-
return keys$
|
|
6065
|
+
return keys$7(result);
|
|
6066
6066
|
}
|
|
6067
6067
|
/**
|
|
6068
6068
|
* @param source The array of string to filter
|
|
@@ -6943,14 +6943,14 @@ const getTypeCacheKeys$X$2 = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
6943
6943
|
mergeable: true,
|
|
6944
6944
|
});
|
|
6945
6945
|
const input_childRelationships = input.childRelationships;
|
|
6946
|
-
const input_childRelationships_keys = keys$
|
|
6946
|
+
const input_childRelationships_keys = keys$7(input_childRelationships);
|
|
6947
6947
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
6948
6948
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
6949
6949
|
const key = input_childRelationships_keys[i];
|
|
6950
6950
|
getTypeCacheKeys$W$2(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
6951
6951
|
}
|
|
6952
6952
|
const input_fields = input.fields;
|
|
6953
|
-
const input_fields_keys = keys$
|
|
6953
|
+
const input_fields_keys = keys$7(input_fields);
|
|
6954
6954
|
const input_fields_length = input_fields_keys.length;
|
|
6955
6955
|
for (let i = 0; i < input_fields_length; i++) {
|
|
6956
6956
|
const key = input_fields_keys[i];
|
|
@@ -8993,7 +8993,7 @@ function convertRecordFieldsArrayToTrie$1(fields, optionalFields = []) {
|
|
|
8993
8993
|
function createPathSelection$1(propertyName, fieldDefinition) {
|
|
8994
8994
|
const fieldsSelection = [];
|
|
8995
8995
|
const { children } = fieldDefinition;
|
|
8996
|
-
const childrenKeys = keys$
|
|
8996
|
+
const childrenKeys = keys$7(children);
|
|
8997
8997
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
8998
8998
|
const childKey = childrenKeys[i];
|
|
8999
8999
|
const childFieldDefinition = children[childKey];
|
|
@@ -9038,7 +9038,7 @@ function createPathSelection$1(propertyName, fieldDefinition) {
|
|
|
9038
9038
|
*/
|
|
9039
9039
|
function createPathSelectionFromValue$1(fields) {
|
|
9040
9040
|
const fieldsSelection = [];
|
|
9041
|
-
const fieldNames = keys$
|
|
9041
|
+
const fieldNames = keys$7(fields);
|
|
9042
9042
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9043
9043
|
const fieldName = fieldNames[i];
|
|
9044
9044
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -9077,7 +9077,7 @@ function createPathSelectionFromValue$1(fields) {
|
|
|
9077
9077
|
}
|
|
9078
9078
|
function extractRecordFieldsRecursively$1(record) {
|
|
9079
9079
|
const fields = [];
|
|
9080
|
-
const fieldNames = keys$
|
|
9080
|
+
const fieldNames = keys$7(record.fields);
|
|
9081
9081
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9082
9082
|
const fieldName = fieldNames[i];
|
|
9083
9083
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -9270,7 +9270,7 @@ function extractTrackedFieldsToTrie$1(recordId, node, root, config, visitedRecor
|
|
|
9270
9270
|
// For a spanning record that is detected to be a circular reference, we add the field along with Id and Name.
|
|
9271
9271
|
// It's possible for spanning record lookup fields to sometimes be circular, and sometimes not - depending on the value of the lookup field.
|
|
9272
9272
|
// For more information on scenarios that caused this fix: search "LDS Recursive Spanning Fields Problem" in Quip
|
|
9273
|
-
if (keys$
|
|
9273
|
+
if (keys$7(next.children).length === 0) {
|
|
9274
9274
|
addScalarFieldId$1(next);
|
|
9275
9275
|
addScalarFieldName$1(next);
|
|
9276
9276
|
}
|
|
@@ -9323,13 +9323,13 @@ function isExternalLookupFieldKey$1(spanningNode) {
|
|
|
9323
9323
|
return endsWith$1.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX$1);
|
|
9324
9324
|
}
|
|
9325
9325
|
function convertTrieToFields$1(root) {
|
|
9326
|
-
if (keys$
|
|
9326
|
+
if (keys$7(root.children).length === 0) {
|
|
9327
9327
|
return [];
|
|
9328
9328
|
}
|
|
9329
9329
|
return convertTrieToFieldsRecursively$1(root);
|
|
9330
9330
|
}
|
|
9331
9331
|
function convertTrieToFieldsRecursively$1(root) {
|
|
9332
|
-
const childKeys = keys$
|
|
9332
|
+
const childKeys = keys$7(root.children);
|
|
9333
9333
|
if (childKeys.length === 0) {
|
|
9334
9334
|
if (root.name === '') {
|
|
9335
9335
|
return [];
|
|
@@ -9338,7 +9338,7 @@ function convertTrieToFieldsRecursively$1(root) {
|
|
|
9338
9338
|
}
|
|
9339
9339
|
return reduce$3.call(childKeys, (acc, cur) => concat$3.call(acc, convertTrieToFieldsRecursively$1(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
9340
9340
|
}
|
|
9341
|
-
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$
|
|
9341
|
+
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$3({
|
|
9342
9342
|
name: '',
|
|
9343
9343
|
children: {},
|
|
9344
9344
|
});
|
|
@@ -9368,7 +9368,7 @@ const getObjectNameFromField$1 = (field) => {
|
|
|
9368
9368
|
function mergeFieldsTries$1(rootA, rootB) {
|
|
9369
9369
|
const rootAchildren = rootA.children;
|
|
9370
9370
|
const rootBchildren = rootB.children;
|
|
9371
|
-
const childBKeys = keys$
|
|
9371
|
+
const childBKeys = keys$7(rootBchildren);
|
|
9372
9372
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
9373
9373
|
const childBKey = childBKeys[i];
|
|
9374
9374
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -9528,8 +9528,8 @@ function isSuperRecordFieldTrie$1(a, b) {
|
|
|
9528
9528
|
}
|
|
9529
9529
|
const childrenA = a.children;
|
|
9530
9530
|
const childrenB = b.children;
|
|
9531
|
-
const childKeysA = keys$
|
|
9532
|
-
const childKeysB = keys$
|
|
9531
|
+
const childKeysA = keys$7(childrenA);
|
|
9532
|
+
const childKeysB = keys$7(childrenB);
|
|
9533
9533
|
const childKeysBLength = childKeysB.length;
|
|
9534
9534
|
if (childKeysBLength > childKeysA.length) {
|
|
9535
9535
|
return false;
|
|
@@ -9571,7 +9571,7 @@ function ingestRecordResponse(luvio, response, recordId, recordIngest, conflictM
|
|
|
9571
9571
|
function mergePendingFields$1(newRecord, oldRecord, existingNode) {
|
|
9572
9572
|
const mergedFields = { ...newRecord.fields };
|
|
9573
9573
|
const merged = { ...newRecord, fields: mergedFields };
|
|
9574
|
-
const existingFields = keys$
|
|
9574
|
+
const existingFields = keys$7(oldRecord.fields);
|
|
9575
9575
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
9576
9576
|
const spanningFieldName = existingFields[i];
|
|
9577
9577
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -9739,7 +9739,7 @@ function merge$3(existing, incoming, luvio, _path, recordConflictMap) {
|
|
|
9739
9739
|
if (isGraphNode$1(node)) {
|
|
9740
9740
|
const dependencies = node.retrieve();
|
|
9741
9741
|
if (dependencies !== null) {
|
|
9742
|
-
const depKeys = keys$
|
|
9742
|
+
const depKeys = keys$7(dependencies);
|
|
9743
9743
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
9744
9744
|
luvio.storeEvict(depKeys[i]);
|
|
9745
9745
|
}
|
|
@@ -9886,7 +9886,7 @@ function addFieldsToStoreLink(fieldsTrie, optionalFieldsTrie, storeLink) {
|
|
|
9886
9886
|
}
|
|
9887
9887
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
9888
9888
|
const subtrie = fieldSubtries[i];
|
|
9889
|
-
const fieldNames = keys$
|
|
9889
|
+
const fieldNames = keys$7(subtrie.children);
|
|
9890
9890
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
9891
9891
|
const fieldName = fieldNames[i];
|
|
9892
9892
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -10000,9 +10000,9 @@ function fulfill$1(existing, incoming) {
|
|
|
10000
10000
|
return false;
|
|
10001
10001
|
}
|
|
10002
10002
|
}
|
|
10003
|
-
const headersKeys = keys$
|
|
10003
|
+
const headersKeys = keys$7(headers);
|
|
10004
10004
|
const headersKeyLength = headersKeys.length;
|
|
10005
|
-
if (headersKeyLength !== keys$
|
|
10005
|
+
if (headersKeyLength !== keys$7(existingHeaders).length) {
|
|
10006
10006
|
return false;
|
|
10007
10007
|
}
|
|
10008
10008
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -10610,7 +10610,7 @@ function buildNetworkSnapshot$15(luvio, config, serverRequestCount = 0, options)
|
|
|
10610
10610
|
|
|
10611
10611
|
// iterate through the map to build configs for network calls
|
|
10612
10612
|
function resolveConflict$1(luvio, map) {
|
|
10613
|
-
const ids = keys$
|
|
10613
|
+
const ids = keys$7(map.conflicts);
|
|
10614
10614
|
if (ids.length === 0) {
|
|
10615
10615
|
instrumentation$3.recordConflictsResolved(map.serverRequestCount);
|
|
10616
10616
|
return;
|
|
@@ -12059,18 +12059,18 @@ function listFields$1(luvio, { fields = [], optionalFields = [], sortBy, }, list
|
|
|
12059
12059
|
return {
|
|
12060
12060
|
getRecordSelectionFieldSets() {
|
|
12061
12061
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
12062
|
-
const fields = keys$
|
|
12062
|
+
const fields = keys$7(defaultFields_);
|
|
12063
12063
|
for (let i = 0; i < fields.length; ++i) {
|
|
12064
12064
|
const field = fields[i];
|
|
12065
12065
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
12066
12066
|
optionalPlusDefaultFields[field] = true;
|
|
12067
12067
|
}
|
|
12068
12068
|
}
|
|
12069
|
-
return [keys$
|
|
12069
|
+
return [keys$7(fields_).sort(), keys$7(optionalPlusDefaultFields).sort()];
|
|
12070
12070
|
},
|
|
12071
12071
|
processRecords(records) {
|
|
12072
12072
|
const { missingFields } = defaultServerFieldStatus;
|
|
12073
|
-
const fields = keys$
|
|
12073
|
+
const fields = keys$7(missingFields);
|
|
12074
12074
|
for (let i = 0; i < fields.length; ++i) {
|
|
12075
12075
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
12076
12076
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -14550,7 +14550,7 @@ function getMissingRecordLookupFields$1(record, objectInfo) {
|
|
|
14550
14550
|
const lookupFields = {};
|
|
14551
14551
|
const { apiName, fields: recordFields } = record;
|
|
14552
14552
|
const { fields: objectInfoFields } = objectInfo;
|
|
14553
|
-
const objectInfoFieldNames = keys$
|
|
14553
|
+
const objectInfoFieldNames = keys$7(objectInfoFields);
|
|
14554
14554
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
14555
14555
|
const fieldName = objectInfoFieldNames[i];
|
|
14556
14556
|
const field = objectInfoFields[fieldName];
|
|
@@ -14569,12 +14569,12 @@ function getMissingRecordLookupFields$1(record, objectInfo) {
|
|
|
14569
14569
|
const nameField = `${apiName}.${relationshipName}.${getNameField$1(objectInfo, fieldName)}`;
|
|
14570
14570
|
lookupFields[nameField] = true;
|
|
14571
14571
|
}
|
|
14572
|
-
return keys$
|
|
14572
|
+
return keys$7(lookupFields);
|
|
14573
14573
|
}
|
|
14574
14574
|
function getRecordUiMissingRecordLookupFields$1(recordUi) {
|
|
14575
14575
|
const { records, objectInfos } = recordUi;
|
|
14576
14576
|
const recordLookupFields = {};
|
|
14577
|
-
const recordIds = keys$
|
|
14577
|
+
const recordIds = keys$7(records);
|
|
14578
14578
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14579
14579
|
const recordId = recordIds[i];
|
|
14580
14580
|
const recordData = records[recordId];
|
|
@@ -14612,19 +14612,19 @@ function buildCachedSelectorKey$1(key) {
|
|
|
14612
14612
|
}
|
|
14613
14613
|
function eachLayout$1(recordUi, cb) {
|
|
14614
14614
|
const { layouts } = recordUi;
|
|
14615
|
-
const layoutApiNames = keys$
|
|
14615
|
+
const layoutApiNames = keys$7(layouts);
|
|
14616
14616
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
14617
14617
|
const apiName = layoutApiNames[a];
|
|
14618
14618
|
const apiNameData = layouts[apiName];
|
|
14619
|
-
const recordTypeIds = keys$
|
|
14619
|
+
const recordTypeIds = keys$7(apiNameData);
|
|
14620
14620
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
14621
14621
|
const recordTypeId = recordTypeIds[b];
|
|
14622
14622
|
const recordTypeData = apiNameData[recordTypeId];
|
|
14623
|
-
const layoutTypes = keys$
|
|
14623
|
+
const layoutTypes = keys$7(recordTypeData);
|
|
14624
14624
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
14625
14625
|
const layoutType = layoutTypes[c];
|
|
14626
14626
|
const layoutTypeData = recordTypeData[layoutType];
|
|
14627
|
-
const modes = keys$
|
|
14627
|
+
const modes = keys$7(layoutTypeData);
|
|
14628
14628
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
14629
14629
|
const mode = modes[d];
|
|
14630
14630
|
const layout = layoutTypeData[mode];
|
|
@@ -14830,14 +14830,14 @@ function buildNetworkSnapshot$12(luvio, config, dispatchContext) {
|
|
|
14830
14830
|
function publishDependencies$1(luvio, recordIds, depKeys) {
|
|
14831
14831
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14832
14832
|
const recordDepKey = dependencyKeyBuilder$1({ recordId: recordIds[i] });
|
|
14833
|
-
const dependencies = create$
|
|
14833
|
+
const dependencies = create$6(null);
|
|
14834
14834
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
14835
14835
|
dependencies[depKeys[j]] = true;
|
|
14836
14836
|
}
|
|
14837
14837
|
const node = luvio.getNode(recordDepKey);
|
|
14838
14838
|
if (isGraphNode$1(node)) {
|
|
14839
14839
|
const recordDeps = node.retrieve();
|
|
14840
|
-
assign$
|
|
14840
|
+
assign$6(dependencies, recordDeps);
|
|
14841
14841
|
}
|
|
14842
14842
|
luvio.storePublish(recordDepKey, dependencies);
|
|
14843
14843
|
}
|
|
@@ -15024,11 +15024,11 @@ const recordLayoutFragmentSelector$1 = [
|
|
|
15024
15024
|
function getFieldsFromLayoutMap$1(layoutMap, objectInfo) {
|
|
15025
15025
|
let fields = [];
|
|
15026
15026
|
let optionalFields = [];
|
|
15027
|
-
const layoutTypes = keys$
|
|
15027
|
+
const layoutTypes = keys$7(layoutMap);
|
|
15028
15028
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
15029
15029
|
const layoutType = layoutTypes[i];
|
|
15030
15030
|
const modesMap = layoutMap[layoutType];
|
|
15031
|
-
const modes = keys$
|
|
15031
|
+
const modes = keys$7(modesMap);
|
|
15032
15032
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
15033
15033
|
const mode = modes[m];
|
|
15034
15034
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout$1(modesMap[mode], objectInfo);
|
|
@@ -15065,7 +15065,7 @@ function getRecordForLayoutableEntities$1(luvio, refresh, recordId, layoutMap, o
|
|
|
15065
15065
|
return getRecord$1(luvio, refresh, recordId, [], implicitFields);
|
|
15066
15066
|
}
|
|
15067
15067
|
function getRecordForNonLayoutableEntities$1(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
15068
|
-
const fields = keys$
|
|
15068
|
+
const fields = keys$7(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
15069
15069
|
// W-12697744
|
|
15070
15070
|
// Set the implicit fields received from the server in adapter context
|
|
15071
15071
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -15304,7 +15304,7 @@ function makeRecordLayoutMap$1(luvio, config, apiName, recordTypeId, layoutTypes
|
|
|
15304
15304
|
}
|
|
15305
15305
|
const { layoutType, mode, snapshot } = container;
|
|
15306
15306
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
15307
|
-
wrapper.layoutMap = assign$
|
|
15307
|
+
wrapper.layoutMap = assign$6({}, wrapper.layoutMap, {
|
|
15308
15308
|
[layoutType]: {},
|
|
15309
15309
|
});
|
|
15310
15310
|
}
|
|
@@ -25245,7 +25245,7 @@ function typeCheckConfig$s(untrustedConfig) {
|
|
|
25245
25245
|
}
|
|
25246
25246
|
}
|
|
25247
25247
|
if (records.length > 0) {
|
|
25248
|
-
assign$
|
|
25248
|
+
assign$6(config, { records });
|
|
25249
25249
|
}
|
|
25250
25250
|
}
|
|
25251
25251
|
return config;
|
|
@@ -30299,7 +30299,7 @@ function optimisticUpdate(cachedLayoutUserState, layoutUserStateInput) {
|
|
|
30299
30299
|
let clonedLayoutUserStateSections;
|
|
30300
30300
|
const { sectionUserStates } = layoutUserStateInput;
|
|
30301
30301
|
const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
|
|
30302
|
-
const sectionUserStateKeys = keys$
|
|
30302
|
+
const sectionUserStateKeys = keys$7(sectionUserStates);
|
|
30303
30303
|
for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
|
|
30304
30304
|
const sectionId = sectionUserStateKeys[i];
|
|
30305
30305
|
if (cachedSectionUserStates[sectionId] === undefined) {
|
|
@@ -33577,7 +33577,7 @@ function bindExportsTo$1(luvio) {
|
|
|
33577
33577
|
const getRecordTemplateCreate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordTemplateCreate', configurationForEnvironmentFactoryOverrides$2.getRecordTemplateCreateAdapterFactory() ?? factory$5$1), getRecordTemplateCreateMetadata);
|
|
33578
33578
|
const getRecordUi_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordUi', configurationForEnvironmentFactoryOverrides$2.getRecordUiAdapterFactory() ?? factory$g), getRecordUiMetadata);
|
|
33579
33579
|
const getRecords_ldsAdapter = createInstrumentedAdapter(createLDSAdapterWithPrediction(createLDSAdapter(luvio, 'getRecords', configurationForEnvironmentFactoryOverrides$2.getRecordsAdapterFactory() ?? getRecordsAdapterFactory$1), luvio, 'getRecords'), getRecordsMetadata);
|
|
33580
|
-
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), getRelatedListActionsMetadata);
|
|
33580
|
+
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createRelatedListPlusAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), luvio, 'getRelatedListActions'), getRelatedListActionsMetadata);
|
|
33581
33581
|
const getRelatedListCount_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListCount', getRelatedListCountAdapterFactory), getRelatedListCountMetadata);
|
|
33582
33582
|
const getRelatedListInfo_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfo', getRelatedListInfoAdapterFactory), luvio, 'getRelatedListInfo'), getRelatedListInfoMetadata);
|
|
33583
33583
|
const getRelatedListInfoBatch_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfoBatch', getRelatedListInfoBatchAdapterFactory), luvio, 'getRelatedListInfoBatch'), getRelatedListInfoBatchMetadata);
|
|
@@ -33894,16 +33894,7 @@ withDefaultLuvio((luvio) => {
|
|
|
33894
33894
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33895
33895
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33896
33896
|
});
|
|
33897
|
-
// version: 1.
|
|
33898
|
-
|
|
33899
|
-
var graphqlRecordTypeIdFixGate = {
|
|
33900
|
-
isOpen: function (e) {
|
|
33901
|
-
return e.fallback;
|
|
33902
|
-
},
|
|
33903
|
-
hasError: function () {
|
|
33904
|
-
return !0;
|
|
33905
|
-
},
|
|
33906
|
-
};
|
|
33897
|
+
// version: 1.342.0-f478af8b93
|
|
33907
33898
|
|
|
33908
33899
|
/**
|
|
33909
33900
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -45510,7 +45501,7 @@ var graphqlL2AdapterGate = {
|
|
|
45510
45501
|
const { parse: parse$4, stringify: stringify$4 } = JSON;
|
|
45511
45502
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45512
45503
|
const { isArray: isArray$3$1 } = Array;
|
|
45513
|
-
const { entries: entries$
|
|
45504
|
+
const { entries: entries$3, keys: keys$5 } = Object;
|
|
45514
45505
|
|
|
45515
45506
|
const UI_API_BASE_URI = '/services/data/v64.0/ui-api';
|
|
45516
45507
|
|
|
@@ -45575,7 +45566,7 @@ function isSpanningRecord$2(fieldValue) {
|
|
|
45575
45566
|
function mergeRecordFields$2(first, second) {
|
|
45576
45567
|
const { fields: targetFields } = first;
|
|
45577
45568
|
const { fields: sourceFields } = second;
|
|
45578
|
-
const fieldNames = keys$
|
|
45569
|
+
const fieldNames = keys$5(sourceFields);
|
|
45579
45570
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
45580
45571
|
const fieldName = fieldNames[i];
|
|
45581
45572
|
const sourceField = sourceFields[fieldName];
|
|
@@ -45817,7 +45808,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
|
|
|
45817
45808
|
if (fulfill === undefined) {
|
|
45818
45809
|
return null;
|
|
45819
45810
|
}
|
|
45820
|
-
const handlersMap = entries$
|
|
45811
|
+
const handlersMap = entries$3(inflightRequests);
|
|
45821
45812
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
45822
45813
|
const [transactionKey, handlers] = handlersMap[i];
|
|
45823
45814
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -45982,7 +45973,7 @@ const RedirectDurableSegment = 'REDIRECT_KEYS';
|
|
|
45982
45973
|
const MessagingDurableSegment = 'MESSAGING';
|
|
45983
45974
|
const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
|
|
45984
45975
|
|
|
45985
|
-
const { keys: keys$
|
|
45976
|
+
const { keys: keys$4, create: create$4, assign: assign$4, freeze: freeze$1$1 } = Object;
|
|
45986
45977
|
|
|
45987
45978
|
//Durable store error instrumentation key
|
|
45988
45979
|
const DURABLE_STORE_ERROR = 'durable-store-error';
|
|
@@ -46029,7 +46020,7 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
|
|
|
46029
46020
|
if (durableRecords === undefined) {
|
|
46030
46021
|
return { revivedKeys, hadUnexpectedShape };
|
|
46031
46022
|
}
|
|
46032
|
-
const durableKeys = keys$
|
|
46023
|
+
const durableKeys = keys$4(durableRecords);
|
|
46033
46024
|
if (durableKeys.length === 0) {
|
|
46034
46025
|
// no records to revive
|
|
46035
46026
|
return { revivedKeys, hadUnexpectedShape };
|
|
@@ -46214,7 +46205,7 @@ class DurableTTLStore {
|
|
|
46214
46205
|
overrides,
|
|
46215
46206
|
};
|
|
46216
46207
|
}
|
|
46217
|
-
const keys$1 = keys$
|
|
46208
|
+
const keys$1 = keys$4(entries);
|
|
46218
46209
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
46219
46210
|
const key = keys$1[i];
|
|
46220
46211
|
const entry = entries[key];
|
|
@@ -46236,14 +46227,14 @@ class DurableTTLStore {
|
|
|
46236
46227
|
}
|
|
46237
46228
|
|
|
46238
46229
|
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
46239
|
-
const durableRecords = create$
|
|
46240
|
-
const refreshedDurableRecords = create$
|
|
46241
|
-
const evictedRecords = create$
|
|
46230
|
+
const durableRecords = create$4(null);
|
|
46231
|
+
const refreshedDurableRecords = create$4(null);
|
|
46232
|
+
const evictedRecords = create$4(null);
|
|
46242
46233
|
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
46243
46234
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
46244
46235
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
46245
46236
|
// on the metadata segment for the refreshedIds
|
|
46246
|
-
const keys$1 = keys$
|
|
46237
|
+
const keys$1 = keys$4({ ...visitedIds, ...refreshedIds });
|
|
46247
46238
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
46248
46239
|
const key = keys$1[i];
|
|
46249
46240
|
const canonicalKey = store.getCanonicalRecordId(key);
|
|
@@ -46275,7 +46266,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
46275
46266
|
}
|
|
46276
46267
|
}
|
|
46277
46268
|
const durableStoreOperations = additionalDurableStoreOperations;
|
|
46278
|
-
const recordKeys = keys$
|
|
46269
|
+
const recordKeys = keys$4(durableRecords);
|
|
46279
46270
|
if (recordKeys.length > 0) {
|
|
46280
46271
|
// publishes with data
|
|
46281
46272
|
durableStoreOperations.push({
|
|
@@ -46284,7 +46275,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
46284
46275
|
segment: DefaultDurableSegment,
|
|
46285
46276
|
});
|
|
46286
46277
|
}
|
|
46287
|
-
const refreshKeys = keys$
|
|
46278
|
+
const refreshKeys = keys$4(refreshedDurableRecords);
|
|
46288
46279
|
if (refreshKeys.length > 0) {
|
|
46289
46280
|
// publishes with only metadata updates
|
|
46290
46281
|
durableStoreOperations.push({
|
|
@@ -46306,7 +46297,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
46306
46297
|
});
|
|
46307
46298
|
});
|
|
46308
46299
|
// evicts
|
|
46309
|
-
const evictedKeys = keys$
|
|
46300
|
+
const evictedKeys = keys$4(evictedRecords);
|
|
46310
46301
|
if (evictedKeys.length > 0) {
|
|
46311
46302
|
durableStoreOperations.push({
|
|
46312
46303
|
type: 'evictEntries',
|
|
@@ -46410,7 +46401,7 @@ function buildRevivingStagingStore(upstreamStore) {
|
|
|
46410
46401
|
// A reviving store is only "active" during a call to `environment.storeLookup`, and will
|
|
46411
46402
|
// be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
|
|
46412
46403
|
// the reviving store becomes inactive other than receiving change notifications.
|
|
46413
|
-
return create$
|
|
46404
|
+
return create$4(upstreamStore, {
|
|
46414
46405
|
readEntry: { value: readEntry },
|
|
46415
46406
|
markStale: { value: markStale },
|
|
46416
46407
|
clearStale: { value: clearStale },
|
|
@@ -46422,7 +46413,7 @@ const AdapterContextSegment = 'ADAPTER-CONTEXT';
|
|
|
46422
46413
|
const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
|
|
46423
46414
|
async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
|
|
46424
46415
|
// initialize empty context store
|
|
46425
|
-
contextStores[adapterId] = create$
|
|
46416
|
+
contextStores[adapterId] = create$4(null);
|
|
46426
46417
|
const context = {
|
|
46427
46418
|
set(key, value) {
|
|
46428
46419
|
contextStores[adapterId][key] = value;
|
|
@@ -46487,7 +46478,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
46487
46478
|
const revivingStores = new Set();
|
|
46488
46479
|
// redirects that need to be flushed to the durable store
|
|
46489
46480
|
const pendingStoreRedirects = new Map();
|
|
46490
|
-
const contextStores = create$
|
|
46481
|
+
const contextStores = create$4(null);
|
|
46491
46482
|
let initializationPromise = new Promise((resolve) => {
|
|
46492
46483
|
const finish = () => {
|
|
46493
46484
|
resolve();
|
|
@@ -46564,7 +46555,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
46564
46555
|
try {
|
|
46565
46556
|
const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
|
|
46566
46557
|
if (entries !== undefined) {
|
|
46567
|
-
const entryKeys = keys$
|
|
46558
|
+
const entryKeys = keys$4(entries);
|
|
46568
46559
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46569
46560
|
const entryKey = entryKeys[i];
|
|
46570
46561
|
const entry = entries[entryKey];
|
|
@@ -46599,7 +46590,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
46599
46590
|
if (filteredKeys.length > 0) {
|
|
46600
46591
|
const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
|
|
46601
46592
|
if (entries !== undefined) {
|
|
46602
|
-
const entryKeys = keys$
|
|
46593
|
+
const entryKeys = keys$4(entries);
|
|
46603
46594
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46604
46595
|
const entryKey = entryKeys[i];
|
|
46605
46596
|
const { metadata } = entries[entryKey];
|
|
@@ -46971,7 +46962,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
46971
46962
|
validateNotDisposed();
|
|
46972
46963
|
const entryKeys = keys$1.map(serializeStructuredKey);
|
|
46973
46964
|
const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
|
|
46974
|
-
if (entries === undefined || keys$
|
|
46965
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
46975
46966
|
return environment.notifyStoreUpdateAvailable(keys$1);
|
|
46976
46967
|
}
|
|
46977
46968
|
const now = Date.now();
|
|
@@ -47023,7 +47014,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
47023
47014
|
const metadataKeys = keys$1.map(serializeStructuredKey);
|
|
47024
47015
|
const now = Date.now();
|
|
47025
47016
|
const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
|
|
47026
|
-
if (entries === undefined || keys$
|
|
47017
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
47027
47018
|
return environment.expirePossibleStaleRecords(keys$1);
|
|
47028
47019
|
}
|
|
47029
47020
|
let metaDataChanged = false;
|
|
@@ -47049,7 +47040,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
47049
47040
|
type: 'stale-while-revalidate',
|
|
47050
47041
|
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
47051
47042
|
});
|
|
47052
|
-
return create$
|
|
47043
|
+
return create$4(environment, {
|
|
47053
47044
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
47054
47045
|
storeIngest: { value: storeIngest },
|
|
47055
47046
|
storeIngestError: { value: storeIngestError },
|
|
@@ -47285,7 +47276,7 @@ var QueueOperationType;
|
|
|
47285
47276
|
QueueOperationType["Update"] = "update";
|
|
47286
47277
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47287
47278
|
|
|
47288
|
-
const { keys: keys$
|
|
47279
|
+
const { keys: keys$3, create: create$3, assign: assign$3, values: values$2 } = Object;
|
|
47289
47280
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
47290
47281
|
const { isArray: isArray$2$1 } = Array;
|
|
47291
47282
|
|
|
@@ -47656,7 +47647,7 @@ class DurableDraftQueue {
|
|
|
47656
47647
|
const queueOperations = handler.getQueueOperationsForCompletingDrafts(queue, action);
|
|
47657
47648
|
// write the queue operations to the store prior to ingesting the result
|
|
47658
47649
|
await this.draftStore.completeAction(queueOperations);
|
|
47659
|
-
await handler.handleActionCompleted(action, queueOperations, values$
|
|
47650
|
+
await handler.handleActionCompleted(action, queueOperations, values$2(this.handlers));
|
|
47660
47651
|
this.retryIntervalMilliseconds = 0;
|
|
47661
47652
|
this.uploadingActionId = undefined;
|
|
47662
47653
|
await this.notifyChangedListeners({
|
|
@@ -47862,7 +47853,7 @@ class DurableDraftQueue {
|
|
|
47862
47853
|
return pendingAction;
|
|
47863
47854
|
}
|
|
47864
47855
|
async setMetadata(actionId, metadata) {
|
|
47865
|
-
const keys$1 = keys$
|
|
47856
|
+
const keys$1 = keys$3(metadata);
|
|
47866
47857
|
const compatibleKeys = keys$1.filter((key) => {
|
|
47867
47858
|
const value = metadata[key];
|
|
47868
47859
|
return typeof key === 'string' && typeof value === 'string';
|
|
@@ -48029,7 +48020,7 @@ class DurableDraftStore {
|
|
|
48029
48020
|
const waitForOngoingSync = this.syncPromise || Promise.resolve();
|
|
48030
48021
|
return waitForOngoingSync.then(() => {
|
|
48031
48022
|
const { draftStore } = this;
|
|
48032
|
-
const keys$1 = keys$
|
|
48023
|
+
const keys$1 = keys$3(draftStore);
|
|
48033
48024
|
const actionArray = [];
|
|
48034
48025
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48035
48026
|
const key = keys$1[i];
|
|
@@ -48054,7 +48045,7 @@ class DurableDraftStore {
|
|
|
48054
48045
|
deleteByTag(tag) {
|
|
48055
48046
|
const deleteAction = () => {
|
|
48056
48047
|
const { draftStore } = this;
|
|
48057
|
-
const keys$1 = keys$
|
|
48048
|
+
const keys$1 = keys$3(draftStore);
|
|
48058
48049
|
const durableKeys = [];
|
|
48059
48050
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48060
48051
|
const key = keys$1[i];
|
|
@@ -48106,7 +48097,7 @@ class DurableDraftStore {
|
|
|
48106
48097
|
return this.enqueueAction(action);
|
|
48107
48098
|
}
|
|
48108
48099
|
getCount() {
|
|
48109
|
-
return keys$
|
|
48100
|
+
return keys$3(this.draftStore).length;
|
|
48110
48101
|
}
|
|
48111
48102
|
/**
|
|
48112
48103
|
* Runs a write operation against the draft store, if the initial
|
|
@@ -48147,7 +48138,7 @@ class DurableDraftStore {
|
|
|
48147
48138
|
return this.runQueuedOperations();
|
|
48148
48139
|
}
|
|
48149
48140
|
const { draftStore } = this;
|
|
48150
|
-
const keys$1 = keys$
|
|
48141
|
+
const keys$1 = keys$3(durableEntries);
|
|
48151
48142
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48152
48143
|
const entry = durableEntries[keys$1[i]];
|
|
48153
48144
|
const action = entry.data;
|
|
@@ -48256,13 +48247,6 @@ function toQueueState(queue) {
|
|
|
48256
48247
|
}
|
|
48257
48248
|
class DraftManager {
|
|
48258
48249
|
shouldEmitEvent(event) {
|
|
48259
|
-
// Waiting events cannot be emitted prior to 252 native clients
|
|
48260
|
-
// TODO [W-16102411]: we can safely remove this backwards compatible code in 256
|
|
48261
|
-
if (isDraftQueueStateChangeEvent(event) &&
|
|
48262
|
-
event.state === DraftQueueState.Waiting &&
|
|
48263
|
-
this.listenerVersion === undefined) {
|
|
48264
|
-
return false;
|
|
48265
|
-
}
|
|
48266
48250
|
return this.draftEventsShouldBeEmitted.includes(event.type);
|
|
48267
48251
|
}
|
|
48268
48252
|
constructor(draftQueue) {
|
|
@@ -48420,7 +48404,7 @@ class DraftManager {
|
|
|
48420
48404
|
return this.buildDraftQueueItem(action);
|
|
48421
48405
|
}
|
|
48422
48406
|
isValidFieldMap(fields) {
|
|
48423
|
-
const keys$1 = keys$
|
|
48407
|
+
const keys$1 = keys$3(fields);
|
|
48424
48408
|
const validTypes = ['string', 'number', 'boolean'];
|
|
48425
48409
|
for (let i = 0; i < keys$1.length; i++) {
|
|
48426
48410
|
const key = keys$1[i];
|
|
@@ -48693,7 +48677,7 @@ function buildAdapterValidationConfig$2(displayName, paramsMeta) {
|
|
|
48693
48677
|
}
|
|
48694
48678
|
const keyPrefix$2 = 'UiApi';
|
|
48695
48679
|
|
|
48696
|
-
const { assign: assign$
|
|
48680
|
+
const { assign: assign$2, create: create$2$1, entries: entries$2, freeze: freeze$2, isFrozen: isFrozen$2, keys: keys$2$1, values: values$1 } = Object;
|
|
48697
48681
|
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
48698
48682
|
const { split, endsWith } = String.prototype;
|
|
48699
48683
|
const { from: from$1, isArray: isArray$1$1 } = Array;
|
|
@@ -48722,7 +48706,7 @@ function dedupe$2(value) {
|
|
|
48722
48706
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
48723
48707
|
result[value[i]] = true;
|
|
48724
48708
|
}
|
|
48725
|
-
return keys$
|
|
48709
|
+
return keys$2$1(result);
|
|
48726
48710
|
}
|
|
48727
48711
|
/**
|
|
48728
48712
|
* @param source The array of string to filter
|
|
@@ -49492,14 +49476,14 @@ const getTypeCacheKeys$1u = (rootKeySet, luvio, input, _fullPathFactory) => {
|
|
|
49492
49476
|
mergeable: true,
|
|
49493
49477
|
});
|
|
49494
49478
|
const input_childRelationships = input.childRelationships;
|
|
49495
|
-
const input_childRelationships_keys = keys$
|
|
49479
|
+
const input_childRelationships_keys = keys$2$1(input_childRelationships);
|
|
49496
49480
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
49497
49481
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
49498
49482
|
const key = input_childRelationships_keys[i];
|
|
49499
49483
|
getTypeCacheKeys$1t(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
49500
49484
|
}
|
|
49501
49485
|
const input_fields = input.fields;
|
|
49502
|
-
const field_values = keys$
|
|
49486
|
+
const field_values = keys$2$1(input_fields);
|
|
49503
49487
|
const input_fields_length = field_values.length;
|
|
49504
49488
|
for (let i = 0; i < input_fields_length; i++) {
|
|
49505
49489
|
const field_value = input_fields[field_values[i]];
|
|
@@ -49789,7 +49773,7 @@ function convertRecordFieldsArrayToTrie(fields, optionalFields = []) {
|
|
|
49789
49773
|
function createPathSelection(propertyName, fieldDefinition) {
|
|
49790
49774
|
const fieldsSelection = [];
|
|
49791
49775
|
const { children } = fieldDefinition;
|
|
49792
|
-
const childrenKeys = keys$
|
|
49776
|
+
const childrenKeys = keys$2$1(children);
|
|
49793
49777
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
49794
49778
|
const childKey = childrenKeys[i];
|
|
49795
49779
|
const childFieldDefinition = children[childKey];
|
|
@@ -49840,7 +49824,7 @@ function createPathSelection(propertyName, fieldDefinition) {
|
|
|
49840
49824
|
*/
|
|
49841
49825
|
function createPathSelectionFromValue(fields) {
|
|
49842
49826
|
const fieldsSelections = [];
|
|
49843
|
-
const fieldNames = keys$
|
|
49827
|
+
const fieldNames = keys$2$1(fields);
|
|
49844
49828
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49845
49829
|
const fieldName = fieldNames[i];
|
|
49846
49830
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -49885,7 +49869,7 @@ function createPathSelectionFromValue(fields) {
|
|
|
49885
49869
|
}
|
|
49886
49870
|
function extractRecordFieldsRecursively(record) {
|
|
49887
49871
|
const fields = [];
|
|
49888
|
-
const fieldNames = keys$
|
|
49872
|
+
const fieldNames = keys$2$1(record.fields);
|
|
49889
49873
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49890
49874
|
const fieldName = fieldNames[i];
|
|
49891
49875
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -50146,7 +50130,7 @@ function mergePendingFields(newRecord, oldRecord) {
|
|
|
50146
50130
|
// RecordRepresentationNormalized['fields'] to include `pending:true` property
|
|
50147
50131
|
const mergedFields = { ...newRecord.fields };
|
|
50148
50132
|
const merged = { ...newRecord, fields: mergedFields };
|
|
50149
|
-
const existingFields = keys$
|
|
50133
|
+
const existingFields = keys$2$1(oldRecord.fields);
|
|
50150
50134
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
50151
50135
|
const spanningFieldName = existingFields[i];
|
|
50152
50136
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -50263,7 +50247,7 @@ function merge$1(existing, incoming, luvio, _path, recordConflictMap) {
|
|
|
50263
50247
|
if (isGraphNode(node)) {
|
|
50264
50248
|
const dependencies = node.retrieve();
|
|
50265
50249
|
if (dependencies !== null) {
|
|
50266
|
-
const depKeys = keys$
|
|
50250
|
+
const depKeys = keys$2$1(dependencies);
|
|
50267
50251
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
50268
50252
|
luvio.storeEvict(depKeys[i]);
|
|
50269
50253
|
}
|
|
@@ -50415,7 +50399,7 @@ fieldNode) {
|
|
|
50415
50399
|
}
|
|
50416
50400
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
50417
50401
|
const subtrie = fieldSubtries[i];
|
|
50418
|
-
const fieldNames = keys$
|
|
50402
|
+
const fieldNames = keys$2$1(subtrie.children);
|
|
50419
50403
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
50420
50404
|
const fieldName = fieldNames[i];
|
|
50421
50405
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -50537,13 +50521,13 @@ function isExternalLookupFieldKey(spanningNode) {
|
|
|
50537
50521
|
return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
|
|
50538
50522
|
}
|
|
50539
50523
|
function convertTrieToFields(root) {
|
|
50540
|
-
if (keys$
|
|
50524
|
+
if (keys$2$1(root.children).length === 0) {
|
|
50541
50525
|
return [];
|
|
50542
50526
|
}
|
|
50543
50527
|
return convertTrieToFieldsRecursively(root);
|
|
50544
50528
|
}
|
|
50545
50529
|
function convertTrieToFieldsRecursively(root) {
|
|
50546
|
-
const childKeys = keys$
|
|
50530
|
+
const childKeys = keys$2$1(root.children);
|
|
50547
50531
|
if (childKeys.length === 0) {
|
|
50548
50532
|
if (root.name === '') {
|
|
50549
50533
|
return [];
|
|
@@ -50552,7 +50536,7 @@ function convertTrieToFieldsRecursively(root) {
|
|
|
50552
50536
|
}
|
|
50553
50537
|
return reduce$2.call(childKeys, (acc, cur) => concat$2.call(acc, convertTrieToFieldsRecursively(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
50554
50538
|
}
|
|
50555
|
-
const BLANK_RECORD_FIELDS_TRIE = freeze$
|
|
50539
|
+
const BLANK_RECORD_FIELDS_TRIE = freeze$2({
|
|
50556
50540
|
name: '',
|
|
50557
50541
|
children: {},
|
|
50558
50542
|
});
|
|
@@ -50580,7 +50564,7 @@ const getObjectNameFromField = (field) => {
|
|
|
50580
50564
|
function mergeFieldsTries(rootA, rootB) {
|
|
50581
50565
|
const rootAchildren = rootA.children;
|
|
50582
50566
|
const rootBchildren = rootB.children;
|
|
50583
|
-
const childBKeys = keys$
|
|
50567
|
+
const childBKeys = keys$2$1(rootBchildren);
|
|
50584
50568
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
50585
50569
|
const childBKey = childBKeys[i];
|
|
50586
50570
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -50735,8 +50719,8 @@ function isSuperRecordFieldTrie(a, b) {
|
|
|
50735
50719
|
}
|
|
50736
50720
|
const childrenA = a.children;
|
|
50737
50721
|
const childrenB = b.children;
|
|
50738
|
-
const childKeysA = keys$
|
|
50739
|
-
const childKeysB = keys$
|
|
50722
|
+
const childKeysA = keys$2$1(childrenA);
|
|
50723
|
+
const childKeysB = keys$2$1(childrenB);
|
|
50740
50724
|
const childKeysBLength = childKeysB.length;
|
|
50741
50725
|
if (childKeysBLength > childKeysA.length) {
|
|
50742
50726
|
return false;
|
|
@@ -50790,9 +50774,9 @@ function fulfill(existing, incoming) {
|
|
|
50790
50774
|
return false;
|
|
50791
50775
|
}
|
|
50792
50776
|
}
|
|
50793
|
-
const headersKeys = keys$
|
|
50777
|
+
const headersKeys = keys$2$1(headers);
|
|
50794
50778
|
const headersKeyLength = headersKeys.length;
|
|
50795
|
-
if (headersKeyLength !== keys$
|
|
50779
|
+
if (headersKeyLength !== keys$2$1(existingHeaders).length) {
|
|
50796
50780
|
return false;
|
|
50797
50781
|
}
|
|
50798
50782
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -51425,7 +51409,7 @@ function buildNetworkSnapshot$g(luvio, config, serverRequestCount = 0, options)
|
|
|
51425
51409
|
|
|
51426
51410
|
// iterate through the map to build configs for network calls
|
|
51427
51411
|
function resolveConflict(luvio, map) {
|
|
51428
|
-
const ids = keys$
|
|
51412
|
+
const ids = keys$2$1(map.conflicts);
|
|
51429
51413
|
if (ids.length === 0) {
|
|
51430
51414
|
return;
|
|
51431
51415
|
}
|
|
@@ -52567,18 +52551,18 @@ function listFields(luvio, { fields = [], optionalFields = [], sortBy, }, listIn
|
|
|
52567
52551
|
return {
|
|
52568
52552
|
getRecordSelectionFieldSets() {
|
|
52569
52553
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
52570
|
-
const fields = keys$
|
|
52554
|
+
const fields = keys$2$1(defaultFields_);
|
|
52571
52555
|
for (let i = 0; i < fields.length; ++i) {
|
|
52572
52556
|
const field = fields[i];
|
|
52573
52557
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
52574
52558
|
optionalPlusDefaultFields[field] = true;
|
|
52575
52559
|
}
|
|
52576
52560
|
}
|
|
52577
|
-
return [keys$
|
|
52561
|
+
return [keys$2$1(fields_).sort(), keys$2$1(optionalPlusDefaultFields).sort()];
|
|
52578
52562
|
},
|
|
52579
52563
|
processRecords(records) {
|
|
52580
52564
|
const { missingFields } = defaultServerFieldStatus;
|
|
52581
|
-
const fields = keys$
|
|
52565
|
+
const fields = keys$2$1(missingFields);
|
|
52582
52566
|
for (let i = 0; i < fields.length; ++i) {
|
|
52583
52567
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
52584
52568
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -54922,7 +54906,7 @@ function getMissingRecordLookupFields(record, objectInfo) {
|
|
|
54922
54906
|
const lookupFields = {};
|
|
54923
54907
|
const { apiName, fields: recordFields } = record;
|
|
54924
54908
|
const { fields: objectInfoFields } = objectInfo;
|
|
54925
|
-
const objectInfoFieldNames = keys$
|
|
54909
|
+
const objectInfoFieldNames = keys$2$1(objectInfoFields);
|
|
54926
54910
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
54927
54911
|
const fieldName = objectInfoFieldNames[i];
|
|
54928
54912
|
const field = objectInfoFields[fieldName];
|
|
@@ -54941,12 +54925,12 @@ function getMissingRecordLookupFields(record, objectInfo) {
|
|
|
54941
54925
|
const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
|
|
54942
54926
|
lookupFields[nameField] = true;
|
|
54943
54927
|
}
|
|
54944
|
-
return keys$
|
|
54928
|
+
return keys$2$1(lookupFields);
|
|
54945
54929
|
}
|
|
54946
54930
|
function getRecordUiMissingRecordLookupFields(recordUi) {
|
|
54947
54931
|
const { records, objectInfos } = recordUi;
|
|
54948
54932
|
const recordLookupFields = {};
|
|
54949
|
-
const recordIds = keys$
|
|
54933
|
+
const recordIds = keys$2$1(records);
|
|
54950
54934
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
54951
54935
|
const recordId = recordIds[i];
|
|
54952
54936
|
const recordData = records[recordId];
|
|
@@ -54984,19 +54968,19 @@ function buildCachedSelectorKey(key) {
|
|
|
54984
54968
|
}
|
|
54985
54969
|
function eachLayout(recordUi, cb) {
|
|
54986
54970
|
const { layouts } = recordUi;
|
|
54987
|
-
const layoutApiNames = keys$
|
|
54971
|
+
const layoutApiNames = keys$2$1(layouts);
|
|
54988
54972
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
54989
54973
|
const apiName = layoutApiNames[a];
|
|
54990
54974
|
const apiNameData = layouts[apiName];
|
|
54991
|
-
const recordTypeIds = keys$
|
|
54975
|
+
const recordTypeIds = keys$2$1(apiNameData);
|
|
54992
54976
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
54993
54977
|
const recordTypeId = recordTypeIds[b];
|
|
54994
54978
|
const recordTypeData = apiNameData[recordTypeId];
|
|
54995
|
-
const layoutTypes = keys$
|
|
54979
|
+
const layoutTypes = keys$2$1(recordTypeData);
|
|
54996
54980
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
54997
54981
|
const layoutType = layoutTypes[c];
|
|
54998
54982
|
const layoutTypeData = recordTypeData[layoutType];
|
|
54999
|
-
const modes = keys$
|
|
54983
|
+
const modes = keys$2$1(layoutTypeData);
|
|
55000
54984
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
55001
54985
|
const mode = modes[d];
|
|
55002
54986
|
const layout = layoutTypeData[mode];
|
|
@@ -55202,14 +55186,14 @@ function buildNetworkSnapshot$e(luvio, config, dispatchContext) {
|
|
|
55202
55186
|
function publishDependencies(luvio, recordIds, depKeys) {
|
|
55203
55187
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
55204
55188
|
const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
|
|
55205
|
-
const dependencies = create$
|
|
55189
|
+
const dependencies = create$2$1(null);
|
|
55206
55190
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
55207
55191
|
dependencies[depKeys[j]] = true;
|
|
55208
55192
|
}
|
|
55209
55193
|
const node = luvio.getNode(recordDepKey);
|
|
55210
55194
|
if (isGraphNode(node)) {
|
|
55211
55195
|
const recordDeps = node.retrieve();
|
|
55212
|
-
assign$
|
|
55196
|
+
assign$2(dependencies, recordDeps);
|
|
55213
55197
|
}
|
|
55214
55198
|
luvio.storePublish(recordDepKey, dependencies);
|
|
55215
55199
|
}
|
|
@@ -55395,11 +55379,11 @@ const recordLayoutFragmentSelector = [
|
|
|
55395
55379
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
55396
55380
|
let fields = [];
|
|
55397
55381
|
let optionalFields = [];
|
|
55398
|
-
const layoutTypes = keys$
|
|
55382
|
+
const layoutTypes = keys$2$1(layoutMap);
|
|
55399
55383
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
55400
55384
|
const layoutType = layoutTypes[i];
|
|
55401
55385
|
const modesMap = layoutMap[layoutType];
|
|
55402
|
-
const modes = keys$
|
|
55386
|
+
const modes = keys$2$1(modesMap);
|
|
55403
55387
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
55404
55388
|
const mode = modes[m];
|
|
55405
55389
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
@@ -55435,7 +55419,7 @@ function getRecordForLayoutableEntities(luvio, refresh, recordId, layoutMap, obj
|
|
|
55435
55419
|
return getRecord(luvio, refresh, recordId, [], implicitFields);
|
|
55436
55420
|
}
|
|
55437
55421
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
55438
|
-
const fields = keys$
|
|
55422
|
+
const fields = keys$2$1(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
55439
55423
|
// W-12697744
|
|
55440
55424
|
// Set the implicit fields received from the server in adapter context
|
|
55441
55425
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -55681,7 +55665,7 @@ function makeRecordLayoutMap(luvio, config, apiName, recordTypeId, layoutTypes,
|
|
|
55681
55665
|
}
|
|
55682
55666
|
const { layoutType, mode, snapshot } = container;
|
|
55683
55667
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
55684
|
-
wrapper.layoutMap = assign$
|
|
55668
|
+
wrapper.layoutMap = assign$2({}, wrapper.layoutMap, {
|
|
55685
55669
|
[layoutType]: {},
|
|
55686
55670
|
});
|
|
55687
55671
|
}
|
|
@@ -56218,7 +56202,7 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
56218
56202
|
}
|
|
56219
56203
|
}
|
|
56220
56204
|
if (records.length > 0) {
|
|
56221
|
-
assign$
|
|
56205
|
+
assign$2(config, { records });
|
|
56222
56206
|
}
|
|
56223
56207
|
}
|
|
56224
56208
|
return config;
|
|
@@ -65896,9 +65880,7 @@ function convertGraphQLToRaml$1(astNode, state) {
|
|
|
65896
65880
|
: new Map();
|
|
65897
65881
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65898
65882
|
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65899
|
-
if (
|
|
65900
|
-
recordTypeId &&
|
|
65901
|
-
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65883
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65902
65884
|
const fieldName = 'RecordTypeId';
|
|
65903
65885
|
fieldsBag[fieldName] = {
|
|
65904
65886
|
value: recordTypeId,
|
|
@@ -66234,7 +66216,7 @@ function selectType$I$1(typename, sel, fieldData, reader, key, sink, variables,
|
|
|
66234
66216
|
*/
|
|
66235
66217
|
|
|
66236
66218
|
|
|
66237
|
-
function isStoreKeyRecordId
|
|
66219
|
+
function isStoreKeyRecordId(key) {
|
|
66238
66220
|
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
66239
66221
|
}
|
|
66240
66222
|
function objectsDeepEqual(lhs, rhs) {
|
|
@@ -78957,7 +78939,7 @@ function getRecordKeyForId(luvio, recordId) {
|
|
|
78957
78939
|
*/
|
|
78958
78940
|
function filterOutReferenceNonScalarFields(record) {
|
|
78959
78941
|
const filteredFields = {};
|
|
78960
|
-
const fieldNames = keys$
|
|
78942
|
+
const fieldNames = keys$2$1(record.fields);
|
|
78961
78943
|
for (const fieldName of fieldNames) {
|
|
78962
78944
|
const field = record.fields[fieldName];
|
|
78963
78945
|
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
@@ -79063,7 +79045,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableRecordStore }
|
|
|
79063
79045
|
const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
|
|
79064
79046
|
return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
|
|
79065
79047
|
};
|
|
79066
|
-
return create$
|
|
79048
|
+
return create$2$1(env, {
|
|
79067
79049
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79068
79050
|
});
|
|
79069
79051
|
}
|
|
@@ -79241,7 +79223,7 @@ function getRecordsDraftEnvironment(luvio, env, { isDraftId }) {
|
|
|
79241
79223
|
return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
|
|
79242
79224
|
}));
|
|
79243
79225
|
};
|
|
79244
|
-
return create$
|
|
79226
|
+
return create$2$1(env, {
|
|
79245
79227
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79246
79228
|
});
|
|
79247
79229
|
}
|
|
@@ -79251,7 +79233,7 @@ function makeEnvironmentUiApiRecordDraftAware(luvio, options, env) {
|
|
|
79251
79233
|
const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
|
|
79252
79234
|
return synthesizer(luvio, environment, options);
|
|
79253
79235
|
}, env);
|
|
79254
|
-
return create$
|
|
79236
|
+
return create$2$1(adapterSpecificEnvironments, {});
|
|
79255
79237
|
}
|
|
79256
79238
|
|
|
79257
79239
|
const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
|
|
@@ -79801,7 +79783,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
79801
79783
|
pendingAction.data.method !== 'delete' && //'delete' action does not have fields
|
|
79802
79784
|
objectInfo) {
|
|
79803
79785
|
const appendedFields = this.getBackdatingFields(objectInfo, resolvedRequest.method, pendingAction);
|
|
79804
|
-
if (keys$
|
|
79786
|
+
if (keys$2$1(appendedFields).length > 0) {
|
|
79805
79787
|
pendingAction.data.body = {
|
|
79806
79788
|
...pendingAction.data.body,
|
|
79807
79789
|
fields: {
|
|
@@ -79815,7 +79797,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
79815
79797
|
}
|
|
79816
79798
|
getBackdatingFields(objectInfo, requestMethod, pendingAction) {
|
|
79817
79799
|
const fields = {};
|
|
79818
|
-
const actionFieldNames = keys$
|
|
79800
|
+
const actionFieldNames = keys$2$1(pendingAction.data.body.fields);
|
|
79819
79801
|
if (requestMethod === 'post') {
|
|
79820
79802
|
// `CreateRecord` with `CreatedDate` field
|
|
79821
79803
|
if (isBackdatingFieldEditable(objectInfo, DEFAULT_FIELD_CREATED_DATE$1, 'createable', actionFieldNames)) {
|
|
@@ -79861,7 +79843,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
79861
79843
|
return;
|
|
79862
79844
|
}
|
|
79863
79845
|
const objectInfo = objectInfoMap[apiName];
|
|
79864
|
-
const optionalFields = values$
|
|
79846
|
+
const optionalFields = values$1(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
|
|
79865
79847
|
await getAdapterData(this.getRecordAdapter, {
|
|
79866
79848
|
recordId: referenceFieldInfo.id,
|
|
79867
79849
|
optionalFields,
|
|
@@ -79880,7 +79862,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
79880
79862
|
const referenceToInfos = fieldInfo.referenceToInfos;
|
|
79881
79863
|
const apiNames = referenceToInfos.map((referenceToInfo) => referenceToInfo.apiName);
|
|
79882
79864
|
const objectInfoMap = await this.objectInfoService.getObjectInfos(apiNames);
|
|
79883
|
-
for (const objectInfo of values$
|
|
79865
|
+
for (const objectInfo of values$1(objectInfoMap)) {
|
|
79884
79866
|
const { apiName, keyPrefix } = objectInfo;
|
|
79885
79867
|
if (keyPrefix !== null && id.startsWith(keyPrefix)) {
|
|
79886
79868
|
return apiName;
|
|
@@ -79966,7 +79948,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
79966
79948
|
let resolvedUrlParams = request.urlParams;
|
|
79967
79949
|
if (request.method === 'post' || request.method === 'patch') {
|
|
79968
79950
|
const bodyFields = resolvedBody.fields;
|
|
79969
|
-
const fieldNames = keys$
|
|
79951
|
+
const fieldNames = keys$2$1(bodyFields);
|
|
79970
79952
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
79971
79953
|
const fieldName = fieldNames[i];
|
|
79972
79954
|
const fieldValue = bodyFields[fieldName];
|
|
@@ -80122,7 +80104,7 @@ class UiApiDraftRecordService {
|
|
|
80122
80104
|
};
|
|
80123
80105
|
}
|
|
80124
80106
|
const referenceFields = [];
|
|
80125
|
-
const fieldNames = keys$
|
|
80107
|
+
const fieldNames = keys$2$1(fields);
|
|
80126
80108
|
const unexpectedFields = [];
|
|
80127
80109
|
for (const field of fieldNames) {
|
|
80128
80110
|
const fieldInfo = objectInfo.fields[field];
|
|
@@ -80184,11 +80166,13 @@ class UiApiDraftRecordService {
|
|
|
80184
80166
|
|
|
80185
80167
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80186
80168
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80187
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80169
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80188
80170
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80189
80171
|
this.draftRecordService = draftRecordService;
|
|
80190
80172
|
this.isDraftId = isDraftId;
|
|
80191
80173
|
this.sideEffectService = sideEffectService;
|
|
80174
|
+
this.objectInfoService = objectInfoService;
|
|
80175
|
+
this.getRecord = getRecord;
|
|
80192
80176
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80193
80177
|
draftRecordService.registerRecordHandler(this);
|
|
80194
80178
|
}
|
|
@@ -80220,6 +80204,30 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
|
|
|
80220
80204
|
});
|
|
80221
80205
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80222
80206
|
}
|
|
80207
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80208
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80209
|
+
this.getLuvio();
|
|
80210
|
+
const canonicalId = action.response.body.id;
|
|
80211
|
+
this.buildTagForTargetId(canonicalId);
|
|
80212
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80213
|
+
if (prefix.length !== 3) {
|
|
80214
|
+
// if we can't get a prefix, don't do the rest
|
|
80215
|
+
return;
|
|
80216
|
+
}
|
|
80217
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80218
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80219
|
+
if (!objectInfo) {
|
|
80220
|
+
return;
|
|
80221
|
+
}
|
|
80222
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80223
|
+
}
|
|
80224
|
+
allFields(objectInfo) {
|
|
80225
|
+
let fields = [];
|
|
80226
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80227
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80228
|
+
});
|
|
80229
|
+
return fields;
|
|
80230
|
+
}
|
|
80223
80231
|
mergeRequestBody() {
|
|
80224
80232
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80225
80233
|
}
|
|
@@ -80470,7 +80478,7 @@ function createContentDocumentAndVersionDraftAdapterFactory(luvio, binaryStore,
|
|
|
80470
80478
|
...trimmedDownData.contentVersion,
|
|
80471
80479
|
fields: cvFields,
|
|
80472
80480
|
};
|
|
80473
|
-
freeze$
|
|
80481
|
+
freeze$2(trimmedDownData);
|
|
80474
80482
|
eventEmitter({ type: 'create-content-document-and-version-draft-finished' });
|
|
80475
80483
|
return {
|
|
80476
80484
|
state: 'Fulfilled',
|
|
@@ -81404,7 +81412,7 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
81404
81412
|
return predicate;
|
|
81405
81413
|
}
|
|
81406
81414
|
else if (literal !== undefined) {
|
|
81407
|
-
const isAvailableLiteral = values$
|
|
81415
|
+
const isAvailableLiteral = values$1(DateLiteral).includes(literal);
|
|
81408
81416
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81409
81417
|
if (!isAvailableLiteral)
|
|
81410
81418
|
throw new Error(`${literal} is not a valid DateLiteral`);
|
|
@@ -81418,7 +81426,7 @@ function dateTimePredicate(input, operator, field, alias) {
|
|
|
81418
81426
|
}
|
|
81419
81427
|
function dateTimeRange(input, op, field, alias) {
|
|
81420
81428
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
81421
|
-
const key = keys$
|
|
81429
|
+
const key = keys$2$1(input)[0];
|
|
81422
81430
|
let operator = op;
|
|
81423
81431
|
if (operator === '=')
|
|
81424
81432
|
operator = 'BETWEEN';
|
|
@@ -81718,7 +81726,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
81718
81726
|
if (!where)
|
|
81719
81727
|
return [];
|
|
81720
81728
|
let predicates = [];
|
|
81721
|
-
const fields = keys$
|
|
81729
|
+
const fields = keys$2$1(where);
|
|
81722
81730
|
for (const field of fields) {
|
|
81723
81731
|
if (field === 'and' || field === 'or') {
|
|
81724
81732
|
predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
|
|
@@ -81771,7 +81779,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
81771
81779
|
}
|
|
81772
81780
|
else {
|
|
81773
81781
|
// @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
|
|
81774
|
-
const entityNames = keys$
|
|
81782
|
+
const entityNames = keys$2$1(where[field]);
|
|
81775
81783
|
const polyPredicatesGroups = entityNames
|
|
81776
81784
|
.filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
|
|
81777
81785
|
.map((entityName) => {
|
|
@@ -81806,7 +81814,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
|
|
|
81806
81814
|
}
|
|
81807
81815
|
else {
|
|
81808
81816
|
//`field` match the filedInfo's apiName
|
|
81809
|
-
for (const [op, value] of entries$
|
|
81817
|
+
for (const [op, value] of entries$2(where[field])) {
|
|
81810
81818
|
const operator = operatorToSql(op);
|
|
81811
81819
|
/**
|
|
81812
81820
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -82317,7 +82325,7 @@ function dedupeJoins(joins) {
|
|
|
82317
82325
|
for (const join of joins) {
|
|
82318
82326
|
deduped[join.alias + join.to] = join;
|
|
82319
82327
|
}
|
|
82320
|
-
return values$
|
|
82328
|
+
return values$1(deduped);
|
|
82321
82329
|
}
|
|
82322
82330
|
function buildJoins(config) {
|
|
82323
82331
|
let sql = '';
|
|
@@ -82992,7 +83000,7 @@ function depth(json, currentLevel = 0) {
|
|
|
82992
83000
|
if (typeof json !== 'object') {
|
|
82993
83001
|
return currentLevel;
|
|
82994
83002
|
}
|
|
82995
|
-
const keys = keys$
|
|
83003
|
+
const keys = keys$2$1(json);
|
|
82996
83004
|
if (keys.length === 0)
|
|
82997
83005
|
return 0;
|
|
82998
83006
|
const depths = keys.map((key) => {
|
|
@@ -83005,7 +83013,7 @@ function flatten(previous, current) {
|
|
|
83005
83013
|
return previous.concat(current);
|
|
83006
83014
|
}
|
|
83007
83015
|
function findFieldInfo(objectInfo, fieldName) {
|
|
83008
|
-
return values$
|
|
83016
|
+
return values$1(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
83009
83017
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
83010
83018
|
}
|
|
83011
83019
|
async function readIngestionTimestampForKey(key, query) {
|
|
@@ -83045,14 +83053,14 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
|
|
|
83045
83053
|
return predicates;
|
|
83046
83054
|
const isSpanning = depth(orderBy) > 2;
|
|
83047
83055
|
if (isSpanning) {
|
|
83048
|
-
const keys = keys$
|
|
83056
|
+
const keys = keys$2$1(orderBy);
|
|
83049
83057
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83050
83058
|
const key = keys[i];
|
|
83051
83059
|
const parentFields = objectInfoMap[recordType].fields;
|
|
83052
|
-
const fieldInfo = values$
|
|
83060
|
+
const fieldInfo = values$1(parentFields).find(findSpanningField(key));
|
|
83053
83061
|
if (fieldInfo && fieldInfo.referenceToInfos.length > 0) {
|
|
83054
83062
|
const { apiName } = fieldInfo.referenceToInfos[0];
|
|
83055
|
-
const parentFieldInfo = values$
|
|
83063
|
+
const parentFieldInfo = values$1(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
|
|
83056
83064
|
if (parentFieldInfo !== undefined) {
|
|
83057
83065
|
const path = {
|
|
83058
83066
|
leftPath: `$.fields.${parentFieldInfo.apiName}.value`,
|
|
@@ -83075,7 +83083,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
|
|
|
83075
83083
|
}
|
|
83076
83084
|
}
|
|
83077
83085
|
else {
|
|
83078
|
-
const keys = keys$
|
|
83086
|
+
const keys = keys$2$1(orderBy);
|
|
83079
83087
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83080
83088
|
const key = keys[i];
|
|
83081
83089
|
if (!objectInfoMap[recordType])
|
|
@@ -84370,7 +84378,7 @@ function buildKeyStringForRecordQuery(operation, variables, argumentNodes, curre
|
|
|
84370
84378
|
variables,
|
|
84371
84379
|
fragmentMap: {},
|
|
84372
84380
|
});
|
|
84373
|
-
const filteredArgumentNodes = assign$
|
|
84381
|
+
const filteredArgumentNodes = assign$2([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
84374
84382
|
const argumentString = filteredArgumentNodes.length > 0
|
|
84375
84383
|
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
84376
84384
|
: '';
|
|
@@ -84393,7 +84401,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
84393
84401
|
let baseRecord = undefined;
|
|
84394
84402
|
// Concrete types for Polymorphic field
|
|
84395
84403
|
const polyTypes = [];
|
|
84396
|
-
for (const type of values$
|
|
84404
|
+
for (const type of values$1(schema.getTypeMap())) {
|
|
84397
84405
|
if (type.name === 'Record') {
|
|
84398
84406
|
recordInterface = type;
|
|
84399
84407
|
}
|
|
@@ -84406,7 +84414,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
84406
84414
|
if (polyFields.find((fieldTypeName) => fieldTypeName === type.name) !== undefined) {
|
|
84407
84415
|
polyTypes.push(type);
|
|
84408
84416
|
}
|
|
84409
|
-
const fields = values$
|
|
84417
|
+
const fields = values$1(type.getFields());
|
|
84410
84418
|
// initialize the fields of current type with default behavior
|
|
84411
84419
|
for (const field of fields) {
|
|
84412
84420
|
field.resolve = defaultFieldResolver;
|
|
@@ -84785,7 +84793,7 @@ function generateRecordQueries(schema, objectInfoMap) {
|
|
|
84785
84793
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84786
84794
|
let addedTypedScalars = new Set();
|
|
84787
84795
|
let allPolymorphicFieldTypeNames = new Set();
|
|
84788
|
-
for (const name of keys$
|
|
84796
|
+
for (const name of keys$2$1(objectInfoMap)) {
|
|
84789
84797
|
const objectInfo = objectInfoMap[name];
|
|
84790
84798
|
const { apiName } = objectInfo;
|
|
84791
84799
|
const type = schema.getType(apiName);
|
|
@@ -84854,7 +84862,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
|
|
|
84854
84862
|
const { apiName, childRelationships, fields: fieldsRepresentation } = objectInfo;
|
|
84855
84863
|
typedScalars.add(`${apiName}_Filter`);
|
|
84856
84864
|
typedScalars.add(`${apiName}_OrderBy`);
|
|
84857
|
-
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$
|
|
84865
|
+
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$1(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
|
|
84858
84866
|
// handles child relationship
|
|
84859
84867
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
84860
84868
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
@@ -84912,8 +84920,8 @@ function extendExistingRecordType(schema, type, objectInfo, objectInfoMap) {
|
|
|
84912
84920
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84913
84921
|
let typedScalars = new Set();
|
|
84914
84922
|
let parentRelationshipFields = new Set();
|
|
84915
|
-
const existingFields = keys$
|
|
84916
|
-
const missingFields = values$
|
|
84923
|
+
const existingFields = keys$2$1(type.getFields());
|
|
84924
|
+
const missingFields = values$1(objectInfo.fields).filter((field) => {
|
|
84917
84925
|
return (existingFields.includes(field.apiName) === false ||
|
|
84918
84926
|
(field.relationshipName !== null && field.referenceToInfos.length > 0));
|
|
84919
84927
|
});
|
|
@@ -84995,7 +85003,7 @@ function makeSpanningRecordConnections(schema, childRelationships, objectInfoMap
|
|
|
84995
85003
|
function makeRecordField(fieldRepresentations, objectInfo, objectInfoMap, existingParentRelationships, recordTypeInSchema, existingFields = []) {
|
|
84996
85004
|
const polymorphicFieldTypeNames = new Set();
|
|
84997
85005
|
let fields = ``;
|
|
84998
|
-
for (const field of values$
|
|
85006
|
+
for (const field of values$1(fieldRepresentations)) {
|
|
84999
85007
|
if (!fieldsStaticallyAdded.includes(field.apiName) && recordTypeInSchema === 'Missing') {
|
|
85000
85008
|
fields += `${field.apiName}: ${graphqlTypeForField(field, objectInfo)}\n`;
|
|
85001
85009
|
}
|
|
@@ -85563,7 +85571,7 @@ function isMineScopeAvailable(apiNamePath, pathToObjectApiNamesMap, objectInfos)
|
|
|
85563
85571
|
const objectInfo = objectInfos[apiName[0]];
|
|
85564
85572
|
if (!objectInfo)
|
|
85565
85573
|
return false;
|
|
85566
|
-
return values$
|
|
85574
|
+
return values$1(objectInfo.fields).some((fieldInfo) => {
|
|
85567
85575
|
return (fieldInfo.apiName === 'OwnerId' &&
|
|
85568
85576
|
fieldInfo.referenceToInfos.some((referenceToInfo) => {
|
|
85569
85577
|
return referenceToInfo.apiName === 'User';
|
|
@@ -85773,7 +85781,7 @@ async function resolveObjectInfos(objectInfotree, pathToObjectApiNamesMap, start
|
|
|
85773
85781
|
// eslint-disable-next-line
|
|
85774
85782
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85775
85783
|
}
|
|
85776
|
-
if (keys$
|
|
85784
|
+
if (keys$2$1(objectInfos).length < startNodes.size) {
|
|
85777
85785
|
// eslint-disable-next-line
|
|
85778
85786
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85779
85787
|
}
|
|
@@ -86801,7 +86809,7 @@ function removeSyntheticFields(result, query) {
|
|
|
86801
86809
|
output.data.uiapi = { ...output.data.uiapi };
|
|
86802
86810
|
output.data.uiapi.query = { ...output.data.uiapi.query };
|
|
86803
86811
|
const outputApiParent = output.data.uiapi.query;
|
|
86804
|
-
const keys = keys$
|
|
86812
|
+
const keys = keys$2$1(nodeJson);
|
|
86805
86813
|
keys.forEach((recordName) => {
|
|
86806
86814
|
const outputApi = {};
|
|
86807
86815
|
// Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
|
|
@@ -86821,7 +86829,7 @@ function removeSyntheticFields(result, query) {
|
|
|
86821
86829
|
* @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
|
|
86822
86830
|
*/
|
|
86823
86831
|
function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
86824
|
-
const keys = keys$
|
|
86832
|
+
const keys = keys$2$1(jsonInput);
|
|
86825
86833
|
if (selection.selectionSet) {
|
|
86826
86834
|
createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
|
|
86827
86835
|
}
|
|
@@ -86830,7 +86838,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
|
86830
86838
|
}
|
|
86831
86839
|
}
|
|
86832
86840
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
86833
|
-
const keys = keys$
|
|
86841
|
+
const keys = keys$2$1(jsonInput);
|
|
86834
86842
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
86835
86843
|
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
86836
86844
|
if (keys.includes(fieldName)) {
|
|
@@ -87238,7 +87246,7 @@ function findRecordQueryContainsFieldType(recordQueryNode, fieldNames) {
|
|
|
87238
87246
|
*/
|
|
87239
87247
|
function findFieldTypeInObjectInfo(objectInfos, fieldType) {
|
|
87240
87248
|
let fieldsWithDataType = [];
|
|
87241
|
-
keys$
|
|
87249
|
+
keys$2$1(objectInfos).filter((recordType) => {
|
|
87242
87250
|
for (const field in objectInfos[recordType].fields) {
|
|
87243
87251
|
if (objectInfos[recordType].fields[field].dataType === fieldType) {
|
|
87244
87252
|
fieldsWithDataType.push(field);
|
|
@@ -87269,7 +87277,7 @@ const replaceDraftIdsInVariables = (variables, draftFunctions, unmappedDraftIDs)
|
|
|
87269
87277
|
}
|
|
87270
87278
|
else if (typeof object === 'object' && object !== null) {
|
|
87271
87279
|
let source = object;
|
|
87272
|
-
return keys$
|
|
87280
|
+
return keys$2$1(source).reduce((acc, key) => {
|
|
87273
87281
|
acc[key] = replace(source[key]);
|
|
87274
87282
|
return acc;
|
|
87275
87283
|
}, {});
|
|
@@ -87278,7 +87286,7 @@ const replaceDraftIdsInVariables = (variables, draftFunctions, unmappedDraftIDs)
|
|
|
87278
87286
|
return object;
|
|
87279
87287
|
}
|
|
87280
87288
|
};
|
|
87281
|
-
let newVariables = keys$
|
|
87289
|
+
let newVariables = keys$2$1(variables).reduce((acc, key) => {
|
|
87282
87290
|
acc[key] = replace(variables[key]);
|
|
87283
87291
|
return acc;
|
|
87284
87292
|
}, {});
|
|
@@ -87733,16 +87741,16 @@ const recordIdGenerator = (id) => {
|
|
|
87733
87741
|
*/
|
|
87734
87742
|
|
|
87735
87743
|
|
|
87736
|
-
const { keys: keys$
|
|
87744
|
+
const { keys: keys$1$1, create: create$1$1, assign: assign$1$1, entries: entries$1 } = Object;
|
|
87737
87745
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
87738
87746
|
const { push: push$3, join, slice } = Array.prototype;
|
|
87739
87747
|
const { isArray: isArray$4, from } = Array;
|
|
87740
87748
|
|
|
87741
87749
|
function ldsParamsToString(params) {
|
|
87742
|
-
const returnParams = create$
|
|
87743
|
-
const keys$1 = keys$
|
|
87744
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
87745
|
-
const key = keys$1[i];
|
|
87750
|
+
const returnParams = create$1$1(null);
|
|
87751
|
+
const keys$1$1$1 = keys$1$1(params);
|
|
87752
|
+
for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
|
|
87753
|
+
const key = keys$1$1$1[i];
|
|
87746
87754
|
const value = params[key];
|
|
87747
87755
|
if (value === undefined) {
|
|
87748
87756
|
// filter out params that have no value
|
|
@@ -87757,7 +87765,7 @@ function ldsParamsToString(params) {
|
|
|
87757
87765
|
else {
|
|
87758
87766
|
returnParams[key] = `${value}`;
|
|
87759
87767
|
}
|
|
87760
|
-
if (isObject(value) === true && keys$
|
|
87768
|
+
if (isObject(value) === true && keys$1$1(value).length > 0) {
|
|
87761
87769
|
returnParams[key] = stringify$1(value);
|
|
87762
87770
|
}
|
|
87763
87771
|
}
|
|
@@ -88156,7 +88164,7 @@ function buildAggregateUiUrl(params, resourceRequest) {
|
|
|
88156
88164
|
optionalFields,
|
|
88157
88165
|
};
|
|
88158
88166
|
const queryString = [];
|
|
88159
|
-
for (const [key, value] of entries$
|
|
88167
|
+
for (const [key, value] of entries$1(mergedParams)) {
|
|
88160
88168
|
if (value !== undefined) {
|
|
88161
88169
|
queryString.push(`${key}=${isArray$4(value) ? value.join(',') : value}`);
|
|
88162
88170
|
}
|
|
@@ -88172,7 +88180,7 @@ function isSpanningRecord(fieldValue) {
|
|
|
88172
88180
|
function mergeRecordFields(first, second) {
|
|
88173
88181
|
const { fields: targetFields } = first;
|
|
88174
88182
|
const { fields: sourceFields } = second;
|
|
88175
|
-
const fieldNames = keys$
|
|
88183
|
+
const fieldNames = keys$1$1(sourceFields);
|
|
88176
88184
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
88177
88185
|
const fieldName = fieldNames[i];
|
|
88178
88186
|
const sourceField = sourceFields[fieldName];
|
|
@@ -88332,7 +88340,7 @@ function calculateEstimatedTotalUrlLength(request) {
|
|
|
88332
88340
|
const { baseUri, basePath, queryParams } = request;
|
|
88333
88341
|
let url = `${baseUri}${basePath}`;
|
|
88334
88342
|
if (queryParams) {
|
|
88335
|
-
const queryParamString = entries$
|
|
88343
|
+
const queryParamString = entries$1(queryParams)
|
|
88336
88344
|
.map(([key, value]) => `${key}=${value}`)
|
|
88337
88345
|
.join('&');
|
|
88338
88346
|
if (queryParamString) {
|
|
@@ -88763,7 +88771,7 @@ function instrumentDraftQueue(queue) {
|
|
|
88763
88771
|
logError: false,
|
|
88764
88772
|
});
|
|
88765
88773
|
};
|
|
88766
|
-
const overriddenQueue = create$
|
|
88774
|
+
const overriddenQueue = create$2$1(queue, { mergeActions: { value: mergeActions } });
|
|
88767
88775
|
overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
|
|
88768
88776
|
switch (draftQueueEvent.type) {
|
|
88769
88777
|
case DraftQueueEventType.QueueStateChanged: {
|
|
@@ -88901,7 +88909,7 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
|
|
|
88901
88909
|
function dataIsObjectInfo(key, data) {
|
|
88902
88910
|
return incomingObjectInfos.has(key);
|
|
88903
88911
|
}
|
|
88904
|
-
return create$
|
|
88912
|
+
return create$2$1(env, {
|
|
88905
88913
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
88906
88914
|
storePublish: { value: storePublish },
|
|
88907
88915
|
});
|
|
@@ -89002,8 +89010,8 @@ class ObjectInfoService {
|
|
|
89002
89010
|
}
|
|
89003
89011
|
};
|
|
89004
89012
|
// Local in-memory cache for apiName to key prefixes
|
|
89005
|
-
this.apiNameToKeyPrefixMemoryCache = create$
|
|
89006
|
-
this.keyPrefixToApiNameMemoryCache = create$
|
|
89013
|
+
this.apiNameToKeyPrefixMemoryCache = create$2$1(null);
|
|
89014
|
+
this.keyPrefixToApiNameMemoryCache = create$2$1(null);
|
|
89007
89015
|
}
|
|
89008
89016
|
/**
|
|
89009
89017
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -89159,7 +89167,7 @@ function registerReportObserver(reportObserver) {
|
|
|
89159
89167
|
};
|
|
89160
89168
|
}
|
|
89161
89169
|
|
|
89162
|
-
const { keys: keys$
|
|
89170
|
+
const { keys: keys$6, create: create$5, assign: assign$5, entries, values } = Object;
|
|
89163
89171
|
const { stringify: stringify$5, parse: parse$5 } = JSON;
|
|
89164
89172
|
|
|
89165
89173
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
@@ -89226,7 +89234,7 @@ class LdsDataTable {
|
|
|
89226
89234
|
},
|
|
89227
89235
|
conflictColumns: this.conflictColumnNames,
|
|
89228
89236
|
columns: this.columnNames,
|
|
89229
|
-
rows: keys$
|
|
89237
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89230
89238
|
const entry = entries[key];
|
|
89231
89239
|
const { data, metadata } = entry;
|
|
89232
89240
|
const row = [key, stringify$5(data), metadata ? stringify$5(metadata) : null];
|
|
@@ -89245,7 +89253,7 @@ class LdsDataTable {
|
|
|
89245
89253
|
type: 'setMetadata',
|
|
89246
89254
|
},
|
|
89247
89255
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89248
|
-
values: keys$
|
|
89256
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89249
89257
|
const { metadata } = entries[key];
|
|
89250
89258
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89251
89259
|
values[key] = row;
|
|
@@ -89335,7 +89343,7 @@ class LdsInternalDataTable {
|
|
|
89335
89343
|
},
|
|
89336
89344
|
conflictColumns: this.conflictColumnNames,
|
|
89337
89345
|
columns: this.columnNames,
|
|
89338
|
-
rows: keys$
|
|
89346
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89339
89347
|
const entry = entries[key];
|
|
89340
89348
|
const { data, metadata } = entry;
|
|
89341
89349
|
const row = [key, stringify$5(data)];
|
|
@@ -89361,7 +89369,7 @@ class LdsInternalDataTable {
|
|
|
89361
89369
|
type: 'setMetadata',
|
|
89362
89370
|
},
|
|
89363
89371
|
columns: [COLUMN_NAME_METADATA],
|
|
89364
|
-
values: keys$
|
|
89372
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89365
89373
|
const { metadata } = entries[key];
|
|
89366
89374
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89367
89375
|
values[key] = row;
|
|
@@ -89370,7 +89378,7 @@ class LdsInternalDataTable {
|
|
|
89370
89378
|
};
|
|
89371
89379
|
}
|
|
89372
89380
|
metadataToUpdateSQLQueries(entries, segment) {
|
|
89373
|
-
return keys$
|
|
89381
|
+
return keys$6(entries).reduce((accu, key) => {
|
|
89374
89382
|
const { metadata } = entries[key];
|
|
89375
89383
|
if (metadata !== undefined) {
|
|
89376
89384
|
accu.push({
|
|
@@ -89444,7 +89452,7 @@ class NimbusSqliteStore {
|
|
|
89444
89452
|
.finally(() => tasker.done());
|
|
89445
89453
|
}
|
|
89446
89454
|
setEntries(entries, segment) {
|
|
89447
|
-
if (keys$
|
|
89455
|
+
if (keys$6(entries).length === 0) {
|
|
89448
89456
|
return Promise.resolve();
|
|
89449
89457
|
}
|
|
89450
89458
|
const table = this.getTable(segment);
|
|
@@ -89452,7 +89460,7 @@ class NimbusSqliteStore {
|
|
|
89452
89460
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
89453
89461
|
}
|
|
89454
89462
|
setMetadata(entries, segment) {
|
|
89455
|
-
if (keys$
|
|
89463
|
+
if (keys$6(entries).length === 0) {
|
|
89456
89464
|
return Promise.resolve();
|
|
89457
89465
|
}
|
|
89458
89466
|
const table = this.getTable(segment);
|
|
@@ -89462,13 +89470,13 @@ class NimbusSqliteStore {
|
|
|
89462
89470
|
batchOperations(operations) {
|
|
89463
89471
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
89464
89472
|
if (cur.type === 'setEntries') {
|
|
89465
|
-
if (keys$
|
|
89473
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89466
89474
|
const table = this.getTable(cur.segment);
|
|
89467
89475
|
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
89468
89476
|
}
|
|
89469
89477
|
}
|
|
89470
89478
|
else if (cur.type === 'setMetadata') {
|
|
89471
|
-
if (keys$
|
|
89479
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89472
89480
|
const table = this.getTable(cur.segment);
|
|
89473
89481
|
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
89474
89482
|
}
|
|
@@ -89591,7 +89599,7 @@ class AbstractKeyValueDataTable {
|
|
|
89591
89599
|
},
|
|
89592
89600
|
conflictColumns: this.conflictColumnNames,
|
|
89593
89601
|
columns: this.columnNames,
|
|
89594
|
-
rows: keys$
|
|
89602
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89595
89603
|
const entry = entries[key];
|
|
89596
89604
|
rows.push([key, stringify$5(entry.data)]);
|
|
89597
89605
|
return rows;
|
|
@@ -89759,7 +89767,7 @@ function makeEnvironmentGraphqlAware(environment) {
|
|
|
89759
89767
|
}
|
|
89760
89768
|
return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
|
|
89761
89769
|
};
|
|
89762
|
-
return create$
|
|
89770
|
+
return create$2$1(environment, {
|
|
89763
89771
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
89764
89772
|
applyCachePolicy: { value: applyCachePolicy },
|
|
89765
89773
|
setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
|
|
@@ -91180,7 +91188,7 @@ async function aggressiveTrim(data, deallocateFn, options = {}) {
|
|
|
91180
91188
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
91181
91189
|
let deallocatedCount = 0;
|
|
91182
91190
|
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
91183
|
-
const storeKeyLength = keys$
|
|
91191
|
+
const storeKeyLength = keys$2$1(storeRecords).length;
|
|
91184
91192
|
if (storeKeyLength <= maxStoreRecords) {
|
|
91185
91193
|
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
91186
91194
|
}
|
|
@@ -91256,78 +91264,6 @@ function setupObserver() {
|
|
|
91256
91264
|
}
|
|
91257
91265
|
}
|
|
91258
91266
|
|
|
91259
|
-
/**
|
|
91260
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
91261
|
-
* All rights reserved.
|
|
91262
|
-
* For full license text, see the LICENSE.txt file
|
|
91263
|
-
*/
|
|
91264
|
-
|
|
91265
|
-
|
|
91266
|
-
const { keys: keys$7, values, create: create$6, assign: assign$6, freeze: freeze$3, entries } = Object;
|
|
91267
|
-
function isStoreKeyRecordId(key) {
|
|
91268
|
-
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
91269
|
-
}
|
|
91270
|
-
function isEntryDurableRecordRepresentation(entry, key) {
|
|
91271
|
-
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
91272
|
-
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity$1(key)) &&
|
|
91273
|
-
entry.data.__type === undefined);
|
|
91274
|
-
}
|
|
91275
|
-
|
|
91276
|
-
// TODO [W-15983267]: this is here for backwards compatibility from <252 and can be removed in 256
|
|
91277
|
-
// This HOF ensures that missing links that are stored in the "links" property in the durable store get restored to the "fields" property.
|
|
91278
|
-
// this code is necessary for backwards compatibility with records that were stored in the durable store before the "links" property was removed.
|
|
91279
|
-
function makeDurableStoreBackwardsCompatible(durableStore) {
|
|
91280
|
-
const getEntries = function (entries, segment) {
|
|
91281
|
-
// this HOF only inspects records in the default segment
|
|
91282
|
-
if (segment !== DefaultDurableSegment) {
|
|
91283
|
-
return durableStore.getEntries(entries, segment);
|
|
91284
|
-
}
|
|
91285
|
-
const { length: entriesLength } = entries;
|
|
91286
|
-
if (entriesLength === 0) {
|
|
91287
|
-
return Promise.resolve({});
|
|
91288
|
-
}
|
|
91289
|
-
// call base getEntries
|
|
91290
|
-
return durableStore.getEntries(entries, segment).then((durableEntries) => {
|
|
91291
|
-
if (durableEntries === undefined) {
|
|
91292
|
-
return undefined;
|
|
91293
|
-
}
|
|
91294
|
-
const returnEntries = create$6(null);
|
|
91295
|
-
const keys$1 = keys$7(durableEntries);
|
|
91296
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
91297
|
-
const key = keys$1[i];
|
|
91298
|
-
const value = durableEntries[key];
|
|
91299
|
-
if (value === undefined) {
|
|
91300
|
-
continue;
|
|
91301
|
-
}
|
|
91302
|
-
if (isEntryDurableRecordRepresentation(value, key)) {
|
|
91303
|
-
const record = value.data;
|
|
91304
|
-
const { links } = record;
|
|
91305
|
-
if (links !== undefined) {
|
|
91306
|
-
const missingLinks = keys$7(links);
|
|
91307
|
-
for (let j = 0, len = missingLinks.length; j < len; j++) {
|
|
91308
|
-
const fieldName = missingLinks[j];
|
|
91309
|
-
const link = links[fieldName];
|
|
91310
|
-
if (link !== undefined && link.isMissing === true) {
|
|
91311
|
-
record.fields[fieldName] = {
|
|
91312
|
-
__state: { isMissing: true },
|
|
91313
|
-
value: undefined,
|
|
91314
|
-
displayValue: undefined,
|
|
91315
|
-
};
|
|
91316
|
-
}
|
|
91317
|
-
}
|
|
91318
|
-
delete record.links;
|
|
91319
|
-
}
|
|
91320
|
-
}
|
|
91321
|
-
returnEntries[key] = value;
|
|
91322
|
-
}
|
|
91323
|
-
return returnEntries;
|
|
91324
|
-
});
|
|
91325
|
-
};
|
|
91326
|
-
return create$6(durableStore, {
|
|
91327
|
-
getEntries: { value: getEntries, writable: true },
|
|
91328
|
-
});
|
|
91329
|
-
}
|
|
91330
|
-
|
|
91331
91267
|
function select$1$1(luvio, config) {
|
|
91332
91268
|
const { query, variables, operationName } = config;
|
|
91333
91269
|
return select$2$1(luvio, query, variables, operationName);
|
|
@@ -91895,7 +91831,7 @@ class SideEffectStore {
|
|
|
91895
91831
|
if (idsToFetch.size > 0) {
|
|
91896
91832
|
const effects = await durableStore.getEntries(Array.from(idsToFetch), SIDE_EFFECT_SEGMENT);
|
|
91897
91833
|
if (effects !== undefined) {
|
|
91898
|
-
keys$
|
|
91834
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91899
91835
|
const effect = effects[effectId].data;
|
|
91900
91836
|
const key = effect.uniqueId;
|
|
91901
91837
|
this.allEffects.set(key, effect);
|
|
@@ -91949,7 +91885,7 @@ class SideEffectStore {
|
|
|
91949
91885
|
if (effects === undefined) {
|
|
91950
91886
|
return;
|
|
91951
91887
|
}
|
|
91952
|
-
keys$
|
|
91888
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91953
91889
|
const effect = effects[effectId].data;
|
|
91954
91890
|
const key = effect.uniqueId;
|
|
91955
91891
|
this.allEffects.set(key, effect);
|
|
@@ -92020,7 +91956,7 @@ class SideEffectService {
|
|
|
92020
91956
|
const draftFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92021
91957
|
const timestampString = new Date(timestamp).toISOString();
|
|
92022
91958
|
const systemFields = this.generateSystemFields(timestampString, id);
|
|
92023
|
-
assign$
|
|
91959
|
+
assign$2(draftFields, systemFields);
|
|
92024
91960
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92025
91961
|
this.fillMissingFields(draftFields, objectInfo);
|
|
92026
91962
|
let recordTypeId = this.determineRecordTypeId(fields, objectInfo);
|
|
@@ -92082,7 +92018,7 @@ class SideEffectService {
|
|
|
92082
92018
|
async synthesizeFieldsFromParts(fields, apiName) {
|
|
92083
92019
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92084
92020
|
const recordFields = {};
|
|
92085
|
-
for (const fieldName of keys$
|
|
92021
|
+
for (const fieldName of keys$2$1(fields)) {
|
|
92086
92022
|
const draftField = fields[fieldName] ?? null;
|
|
92087
92023
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92088
92024
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
@@ -92105,7 +92041,7 @@ class SideEffectService {
|
|
|
92105
92041
|
let patchedFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92106
92042
|
if (existingRecord) {
|
|
92107
92043
|
const nameFields = this.getCompoundNameFields(existingRecord, patchedFields, objectInfo);
|
|
92108
|
-
assign$
|
|
92044
|
+
assign$2(patchedFields, nameFields);
|
|
92109
92045
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY_ID, { value: this.userId, displayValue: null }, existingRecord.fields, patchedFields);
|
|
92110
92046
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY, {
|
|
92111
92047
|
value: this.createLink(buildRecordRepKeyFromId$1(this.userId)),
|
|
@@ -92163,7 +92099,7 @@ class SideEffectService {
|
|
|
92163
92099
|
changedNameFields[fieldName] = fieldValue;
|
|
92164
92100
|
}
|
|
92165
92101
|
}
|
|
92166
|
-
if (keys$
|
|
92102
|
+
if (keys$2$1(changedNameFields).length > 0) {
|
|
92167
92103
|
const newNameValue = filteredNameFields
|
|
92168
92104
|
.map((key) => {
|
|
92169
92105
|
if (changedNameFields[key] !== undefined) {
|
|
@@ -92284,7 +92220,7 @@ class UpdateRecordEffectHandler {
|
|
|
92284
92220
|
}
|
|
92285
92221
|
const patchedFields = effect.recordPatch.fields;
|
|
92286
92222
|
if (patchedFields) {
|
|
92287
|
-
const fieldNames = keys$
|
|
92223
|
+
const fieldNames = keys$2$1(patchedFields);
|
|
92288
92224
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92289
92225
|
const fieldName = fieldNames[i];
|
|
92290
92226
|
// don't apply server values to draft created records
|
|
@@ -92443,7 +92379,7 @@ function removeEffects(record) {
|
|
|
92443
92379
|
return undefined;
|
|
92444
92380
|
}
|
|
92445
92381
|
const updatedFields = {};
|
|
92446
|
-
const fieldNames = keys$
|
|
92382
|
+
const fieldNames = keys$2$1(fields);
|
|
92447
92383
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92448
92384
|
const fieldName = fieldNames[i];
|
|
92449
92385
|
const field = fields[fieldName];
|
|
@@ -92483,7 +92419,7 @@ function createLink$3(key) {
|
|
|
92483
92419
|
|
|
92484
92420
|
function enableSideEffectsOnEnvironment(env, sideEffectStore) {
|
|
92485
92421
|
const storePublish = function (key, data) {
|
|
92486
|
-
if (isStoreKeyRecordId
|
|
92422
|
+
if (isStoreKeyRecordId(key) === false || isStoreRecordError$1(data)) {
|
|
92487
92423
|
return env.storePublish(key, data);
|
|
92488
92424
|
}
|
|
92489
92425
|
const effects = sideEffectStore.getEffects(key);
|
|
@@ -92540,7 +92476,7 @@ class DurableRecordStore {
|
|
|
92540
92476
|
if (entries === undefined) {
|
|
92541
92477
|
return directory;
|
|
92542
92478
|
}
|
|
92543
|
-
keys$
|
|
92479
|
+
keys$2$1(entries).forEach((key) => {
|
|
92544
92480
|
const { data: record, metadata } = entries[key];
|
|
92545
92481
|
if (isStoreRecordError(record)) {
|
|
92546
92482
|
return;
|
|
@@ -92575,13 +92511,13 @@ let lazyGetRecords;
|
|
|
92575
92511
|
let lazySideEffectStore;
|
|
92576
92512
|
let lazySideEffectService;
|
|
92577
92513
|
const shouldFlush = (key, value) => {
|
|
92578
|
-
if (!isStoreKeyRecordId
|
|
92514
|
+
if (!isStoreKeyRecordId(key)) {
|
|
92579
92515
|
return { flushValue: true };
|
|
92580
92516
|
}
|
|
92581
92517
|
if (value && typeof value === 'object') {
|
|
92582
92518
|
const fields = value.fields;
|
|
92583
92519
|
if (fields && typeof fields === 'object') {
|
|
92584
|
-
const keys = keys$
|
|
92520
|
+
const keys = keys$2$1(fields);
|
|
92585
92521
|
for (const key of keys) {
|
|
92586
92522
|
const field = fields[key];
|
|
92587
92523
|
if (fields && field.__state && field.__state.pending === true) {
|
|
@@ -92617,7 +92553,7 @@ function getRuntime() {
|
|
|
92617
92553
|
lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
|
|
92618
92554
|
reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
|
|
92619
92555
|
}));
|
|
92620
|
-
lazyDurableStore =
|
|
92556
|
+
lazyDurableStore = getNimbusDurableStore();
|
|
92621
92557
|
lazyDurableRecordStore = new DurableRecordStore(lazyDurableStore, () => lazyLuvio);
|
|
92622
92558
|
// specific adapters
|
|
92623
92559
|
const internalAdapterStore = new InMemoryStore();
|
|
@@ -92640,7 +92576,7 @@ function getRuntime() {
|
|
|
92640
92576
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
92641
92577
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
92642
92578
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
92643
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92579
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
92644
92580
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92645
92581
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
92646
92582
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -92747,7 +92683,7 @@ register$1({
|
|
|
92747
92683
|
id: '@salesforce/lds-network-adapter',
|
|
92748
92684
|
instrument: instrument$2,
|
|
92749
92685
|
});
|
|
92750
|
-
// version: 1.
|
|
92686
|
+
// version: 1.342.0-651bed9637
|
|
92751
92687
|
|
|
92752
92688
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92753
92689
|
const { stringify, parse } = JSON;
|
|
@@ -115331,7 +115267,7 @@ register$1({
|
|
|
115331
115267
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115332
115268
|
instrument: instrument$1,
|
|
115333
115269
|
});
|
|
115334
|
-
// version: 1.
|
|
115270
|
+
// version: 1.342.0-f478af8b93
|
|
115335
115271
|
|
|
115336
115272
|
// On core the unstable adapters are re-exported with different names,
|
|
115337
115273
|
// we want to match them here.
|
|
@@ -115483,7 +115419,7 @@ withDefaultLuvio((luvio) => {
|
|
|
115483
115419
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115484
115420
|
graphQLImperative = ldsAdapter;
|
|
115485
115421
|
});
|
|
115486
|
-
// version: 1.
|
|
115422
|
+
// version: 1.342.0-f478af8b93
|
|
115487
115423
|
|
|
115488
115424
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115489
115425
|
__proto__: null,
|
|
@@ -116275,7 +116211,7 @@ const callbacks$1 = [];
|
|
|
116275
116211
|
function register(r) {
|
|
116276
116212
|
callbacks$1.forEach((callback) => callback(r));
|
|
116277
116213
|
}
|
|
116278
|
-
// version: 1.
|
|
116214
|
+
// version: 1.342.0-651bed9637
|
|
116279
116215
|
|
|
116280
116216
|
/**
|
|
116281
116217
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117355,4 +117291,4 @@ const { luvio } = getRuntime();
|
|
|
117355
117291
|
setDefaultLuvio({ luvio });
|
|
117356
117292
|
|
|
117357
117293
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
117358
|
-
// version: 1.
|
|
117294
|
+
// version: 1.342.0-651bed9637
|