@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.
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
SnapshotState["Stale"] = "Stale";
|
|
27
27
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
28
28
|
|
|
29
|
-
const { create: create$
|
|
29
|
+
const { create: create$9, entries: entries$4, freeze: freeze$5, keys: keys$9, values: values$3, assign: assign$8 } = Object;
|
|
30
30
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
31
31
|
const { isArray: isArray$7 } = Array;
|
|
32
32
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
|
-
const keys$1 = keys$
|
|
57
|
+
const keys$1 = keys$9(value);
|
|
58
58
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
59
59
|
deepFreeze(value[keys$1[i]]);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
freeze$
|
|
62
|
+
freeze$5(value);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
function isErrorSnapshot$3(snapshot) {
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
if (node === null) {
|
|
326
326
|
return 'null';
|
|
327
327
|
}
|
|
328
|
-
const keys$1 = keys$
|
|
328
|
+
const keys$1 = keys$9(node).sort();
|
|
329
329
|
out = '';
|
|
330
330
|
for (i = 0; i < keys$1.length; i++) {
|
|
331
331
|
const key = keys$1[i];
|
|
@@ -593,13 +593,13 @@
|
|
|
593
593
|
class StringKeyInMemoryStore {
|
|
594
594
|
constructor(options = {}) {
|
|
595
595
|
// public, in memory properties
|
|
596
|
-
this.records = create$
|
|
597
|
-
this.metadata = create$
|
|
598
|
-
this.visitedIds = create$
|
|
599
|
-
this.refreshedIds = create$
|
|
600
|
-
this.redirectKeys = create$
|
|
601
|
-
this.retainedIds = create$
|
|
602
|
-
this.ttlOverrides = create$
|
|
596
|
+
this.records = create$9(null);
|
|
597
|
+
this.metadata = create$9(null);
|
|
598
|
+
this.visitedIds = create$9(null);
|
|
599
|
+
this.refreshedIds = create$9(null);
|
|
600
|
+
this.redirectKeys = create$9(null);
|
|
601
|
+
this.retainedIds = create$9(null);
|
|
602
|
+
this.ttlOverrides = create$9(null);
|
|
603
603
|
this.snapshotSubscriptions = [];
|
|
604
604
|
this.trimTask = null;
|
|
605
605
|
this.pendingTrimKeys = new Set();
|
|
@@ -607,8 +607,8 @@
|
|
|
607
607
|
this.watchSubscriptions = [];
|
|
608
608
|
this.eventObservers = [];
|
|
609
609
|
// private/protected
|
|
610
|
-
this.insertedIds = create$
|
|
611
|
-
this.reverseRedirectKeys = create$
|
|
610
|
+
this.insertedIds = create$9(null);
|
|
611
|
+
this.reverseRedirectKeys = create$9(null);
|
|
612
612
|
this.currentSnapshotId = 0;
|
|
613
613
|
this.scheduler = options.scheduler || buildDefaultScheduler();
|
|
614
614
|
if (options.initialData) {
|
|
@@ -621,13 +621,13 @@
|
|
|
621
621
|
return this.records[this.getCanonicalRecordId(key)];
|
|
622
622
|
}
|
|
623
623
|
getNumEntries() {
|
|
624
|
-
return keys$
|
|
624
|
+
return keys$9(this.records).length;
|
|
625
625
|
}
|
|
626
626
|
readMetadata(key) {
|
|
627
627
|
return this.metadata[this.getCanonicalRecordId(key)];
|
|
628
628
|
}
|
|
629
629
|
readMetadataWhere(query) {
|
|
630
|
-
const keys$1 = keys$
|
|
630
|
+
const keys$1 = keys$9(this.metadata);
|
|
631
631
|
const results = [];
|
|
632
632
|
const hasNamespaceQuery = hasOwnProperty$4.call(query, 'namespace');
|
|
633
633
|
const hasRepresentationNameQuery = hasOwnProperty$4.call(query, 'representationName');
|
|
@@ -724,8 +724,8 @@
|
|
|
724
724
|
// Note: we should always get the subscription references from this at the beginning
|
|
725
725
|
// of the function, in case the reference changes (because of an unsubscribe)
|
|
726
726
|
const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
|
|
727
|
-
const allVisitedIds = keys$
|
|
728
|
-
const allRefreshedIds = keys$
|
|
727
|
+
const allVisitedIds = keys$9(visitedIds);
|
|
728
|
+
const allRefreshedIds = keys$9(refreshedIds);
|
|
729
729
|
// Early exit if nothing has changed
|
|
730
730
|
if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
|
|
731
731
|
return Promise.resolve();
|
|
@@ -768,9 +768,9 @@
|
|
|
768
768
|
callback(watchCallbackEntries);
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
|
-
this.visitedIds = create$
|
|
772
|
-
this.refreshedIds = create$
|
|
773
|
-
this.insertedIds = create$
|
|
771
|
+
this.visitedIds = create$9(null);
|
|
772
|
+
this.refreshedIds = create$9(null);
|
|
773
|
+
this.insertedIds = create$9(null);
|
|
774
774
|
// the .then removes the return of an array of voids to a single void
|
|
775
775
|
return Promise.all(snapshotSubPromises).then(() => { });
|
|
776
776
|
}
|
|
@@ -962,18 +962,18 @@
|
|
|
962
962
|
return this.defaultTTLOverride;
|
|
963
963
|
}
|
|
964
964
|
reset() {
|
|
965
|
-
this.records = create$
|
|
965
|
+
this.records = create$9(null);
|
|
966
966
|
this.snapshotSubscriptions = [];
|
|
967
967
|
this.watchSubscriptions = [];
|
|
968
|
-
this.visitedIds = create$
|
|
969
|
-
this.refreshedIds = create$
|
|
970
|
-
this.insertedIds = create$
|
|
971
|
-
this.redirectKeys = create$
|
|
972
|
-
this.reverseRedirectKeys = create$
|
|
973
|
-
this.retainedIds = create$
|
|
974
|
-
this.ttlOverrides = create$
|
|
968
|
+
this.visitedIds = create$9(null);
|
|
969
|
+
this.refreshedIds = create$9(null);
|
|
970
|
+
this.insertedIds = create$9(null);
|
|
971
|
+
this.redirectKeys = create$9(null);
|
|
972
|
+
this.reverseRedirectKeys = create$9(null);
|
|
973
|
+
this.retainedIds = create$9(null);
|
|
974
|
+
this.ttlOverrides = create$9(null);
|
|
975
975
|
this.trimTask = null;
|
|
976
|
-
this.metadata = create$
|
|
976
|
+
this.metadata = create$9(null);
|
|
977
977
|
this.defaultTTLOverride = undefined;
|
|
978
978
|
emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
|
|
979
979
|
}
|
|
@@ -1232,7 +1232,7 @@
|
|
|
1232
1232
|
calculateAndSetNewTTLs(storeMetadata, resetInitialDataTtls) {
|
|
1233
1233
|
if (resetInitialDataTtls === true) {
|
|
1234
1234
|
const now = Date.now();
|
|
1235
|
-
keys$
|
|
1235
|
+
keys$9(storeMetadata).forEach((key) => {
|
|
1236
1236
|
const storeMetadataEntry = storeMetadata[key];
|
|
1237
1237
|
const ttl = storeMetadataEntry.expirationTimestamp - storeMetadataEntry.ingestionTimestamp;
|
|
1238
1238
|
storeMetadataEntry.ingestionTimestamp = now;
|
|
@@ -1261,7 +1261,7 @@
|
|
|
1261
1261
|
hasOverlappingIds(snapshot, visitedIds) === false);
|
|
1262
1262
|
}
|
|
1263
1263
|
function getMatchingIds(partialKey, visitedIds) {
|
|
1264
|
-
const keys$1 = keys$
|
|
1264
|
+
const keys$1 = keys$9(partialKey);
|
|
1265
1265
|
return visitedIds.filter((visitedId) => {
|
|
1266
1266
|
return keys$1.every((key) => {
|
|
1267
1267
|
return partialKey[key] === visitedId[key];
|
|
@@ -1917,8 +1917,8 @@
|
|
|
1917
1917
|
} while (redirectKey !== undefined);
|
|
1918
1918
|
}
|
|
1919
1919
|
isUsingStringKeys() {
|
|
1920
|
-
return (keys$
|
|
1921
|
-
keys$
|
|
1920
|
+
return (keys$9(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
|
|
1921
|
+
keys$9(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
|
|
1922
1922
|
}
|
|
1923
1923
|
delegateToFallbackStringKeyStore(snapshot) {
|
|
1924
1924
|
return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
|
|
@@ -1960,7 +1960,7 @@
|
|
|
1960
1960
|
buildKeySchema(keyMetadata) {
|
|
1961
1961
|
// pull NamespacedType type out of NormalizedKeyMetadata
|
|
1962
1962
|
const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
|
|
1963
|
-
const keySchema = keys$
|
|
1963
|
+
const keySchema = keys$9(keyParamValues).sort();
|
|
1964
1964
|
return ['namespace', 'representationName', ...keySchema];
|
|
1965
1965
|
}
|
|
1966
1966
|
serialize() {
|
|
@@ -2254,7 +2254,7 @@
|
|
|
2254
2254
|
return value;
|
|
2255
2255
|
}
|
|
2256
2256
|
keys() {
|
|
2257
|
-
return keys$
|
|
2257
|
+
return keys$9(this.data);
|
|
2258
2258
|
}
|
|
2259
2259
|
isScalar(propertyName) {
|
|
2260
2260
|
// TODO W-6900046 - merge.ts casts these to any and manually sets `data`
|
|
@@ -2689,7 +2689,7 @@
|
|
|
2689
2689
|
}
|
|
2690
2690
|
}
|
|
2691
2691
|
selectAllObject(record, data, visitedKeys) {
|
|
2692
|
-
const recordKeys = keys$
|
|
2692
|
+
const recordKeys = keys$9(record);
|
|
2693
2693
|
const { length } = recordKeys;
|
|
2694
2694
|
for (let i = 0; i < length; i += 1) {
|
|
2695
2695
|
const key = recordKeys[i];
|
|
@@ -2884,7 +2884,7 @@
|
|
|
2884
2884
|
}
|
|
2885
2885
|
const { baseSnapshotValue } = this.currentPath;
|
|
2886
2886
|
if (isDefined(baseSnapshotValue)) {
|
|
2887
|
-
this.snapshotChanged = keys$1.length !== keys$
|
|
2887
|
+
this.snapshotChanged = keys$1.length !== keys$9(baseSnapshotValue).length;
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
checkIfChanged(value, options) {
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
return this.markMissing();
|
|
2929
2929
|
}
|
|
2930
2930
|
const sink = (data[propertyName] = {});
|
|
2931
|
-
const keys$1 = keys$
|
|
2931
|
+
const keys$1 = keys$9(obj);
|
|
2932
2932
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2933
2933
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
2934
2934
|
const key = keys$1[i];
|
|
@@ -2939,7 +2939,7 @@
|
|
|
2939
2939
|
}
|
|
2940
2940
|
readLinkMap(propertyName, selection, record, data) {
|
|
2941
2941
|
const map = record[propertyName];
|
|
2942
|
-
const keys$1 = keys$
|
|
2942
|
+
const keys$1 = keys$9(map);
|
|
2943
2943
|
const sink = {};
|
|
2944
2944
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2945
2945
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
@@ -3073,7 +3073,7 @@
|
|
|
3073
3073
|
return;
|
|
3074
3074
|
}
|
|
3075
3075
|
const sink = (data[propertyName] = {});
|
|
3076
|
-
const keys$1 = keys$
|
|
3076
|
+
const keys$1 = keys$9(obj);
|
|
3077
3077
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
3078
3078
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
3079
3079
|
const key = keys$1[i];
|
|
@@ -3306,8 +3306,8 @@
|
|
|
3306
3306
|
this.defaultCachePolicy = { type: 'cache-then-network' };
|
|
3307
3307
|
this.store = store;
|
|
3308
3308
|
this.networkAdapter = networkAdapter;
|
|
3309
|
-
this.adapterContextMap = create$
|
|
3310
|
-
this.typeQueryEvaluatorMap = create$
|
|
3309
|
+
this.adapterContextMap = create$9(null);
|
|
3310
|
+
this.typeQueryEvaluatorMap = create$9(null);
|
|
3311
3311
|
// bind these methods so when they get passed into the
|
|
3312
3312
|
// Store, the this reference is preserved
|
|
3313
3313
|
this.createSnapshot = this.createSnapshot.bind(this);
|
|
@@ -3407,7 +3407,7 @@
|
|
|
3407
3407
|
status: StoreErrorStatus$1.RESOURCE_NOT_FOUND,
|
|
3408
3408
|
error,
|
|
3409
3409
|
};
|
|
3410
|
-
freeze$
|
|
3410
|
+
freeze$5(entry);
|
|
3411
3411
|
store.publish(key, entry);
|
|
3412
3412
|
if (storeMetadataParams !== undefined) {
|
|
3413
3413
|
const { ttl, namespace, representationName, version } = storeMetadataParams;
|
|
@@ -3507,7 +3507,7 @@
|
|
|
3507
3507
|
// retrieve from adapterContextMap if contextId is supplied
|
|
3508
3508
|
// we will only track context of adapters that explicitly provide a contextId
|
|
3509
3509
|
if (this.adapterContextMap[contextId] === undefined) {
|
|
3510
|
-
this.adapterContextMap[contextId] = create$
|
|
3510
|
+
this.adapterContextMap[contextId] = create$9(null);
|
|
3511
3511
|
}
|
|
3512
3512
|
const contextStore = this.adapterContextMap[contextId];
|
|
3513
3513
|
const context = {
|
|
@@ -3796,13 +3796,13 @@
|
|
|
3796
3796
|
// undefined values on the injected networkAdapter. So we do it here, on
|
|
3797
3797
|
// the API that those adapters call to dispatch their ResourceRequests.
|
|
3798
3798
|
const { queryParams, urlParams } = mergedResourceRequest;
|
|
3799
|
-
for (const paramKey of keys$
|
|
3799
|
+
for (const paramKey of keys$9(queryParams)) {
|
|
3800
3800
|
const value = queryParams[paramKey];
|
|
3801
3801
|
if (value === undefined) {
|
|
3802
3802
|
delete queryParams[paramKey];
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
3805
|
-
for (const paramKey of keys$
|
|
3805
|
+
for (const paramKey of keys$9(urlParams)) {
|
|
3806
3806
|
const value = urlParams[paramKey];
|
|
3807
3807
|
if (value === undefined) {
|
|
3808
3808
|
delete urlParams[paramKey];
|
|
@@ -4129,16 +4129,16 @@
|
|
|
4129
4129
|
return acc;
|
|
4130
4130
|
}, {});
|
|
4131
4131
|
const resourceParams = {};
|
|
4132
|
-
if (keys$
|
|
4132
|
+
if (keys$9(urlParams).length > 0) {
|
|
4133
4133
|
resourceParams[CONFIG_PROPERTY_URL_PARAMS] = urlParams;
|
|
4134
4134
|
}
|
|
4135
|
-
if (keys$
|
|
4135
|
+
if (keys$9(queryParams).length > 0) {
|
|
4136
4136
|
resourceParams[CONFIG_PROPERTY_QUERY_PARAMS] = queryParams;
|
|
4137
4137
|
}
|
|
4138
4138
|
if (bodyParams.length > 0) {
|
|
4139
4139
|
resourceParams[CONFIG_PROPERTY_BODY] = actualBodyParams;
|
|
4140
4140
|
}
|
|
4141
|
-
if (keys$
|
|
4141
|
+
if (keys$9(headerParams).length > 0) {
|
|
4142
4142
|
resourceParams[CONFIG_PROPERTY_HEADERS] = headerParams;
|
|
4143
4143
|
}
|
|
4144
4144
|
return resourceParams;
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.342.0-651bed9637
|
|
4275
4275
|
|
|
4276
4276
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4277
4277
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4880,7 +4880,7 @@
|
|
|
4880
4880
|
return factory(luvio);
|
|
4881
4881
|
}
|
|
4882
4882
|
|
|
4883
|
-
const { create: create$
|
|
4883
|
+
const { create: create$8, defineProperty, defineProperties } = Object;
|
|
4884
4884
|
|
|
4885
4885
|
var SnapshotState$2;
|
|
4886
4886
|
(function (SnapshotState) {
|
|
@@ -5219,7 +5219,7 @@
|
|
|
5219
5219
|
const { apiFamily, name } = metadata;
|
|
5220
5220
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5221
5221
|
}
|
|
5222
|
-
// version: 1.
|
|
5222
|
+
// version: 1.342.0-651bed9637
|
|
5223
5223
|
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5322,7 +5322,7 @@
|
|
|
5322
5322
|
|
|
5323
5323
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5324
5324
|
|
|
5325
|
-
const { assign: assign$
|
|
5325
|
+
const { assign: assign$7, create: create$7, freeze: freeze$4, isFrozen: isFrozen$4, keys: keys$8 } = Object;
|
|
5326
5326
|
|
|
5327
5327
|
/**
|
|
5328
5328
|
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
@@ -5542,7 +5542,7 @@
|
|
|
5542
5542
|
|
|
5543
5543
|
ObjectCreate$4(null);
|
|
5544
5544
|
|
|
5545
|
-
freeze$
|
|
5545
|
+
freeze$4({
|
|
5546
5546
|
name: '',
|
|
5547
5547
|
children: {},
|
|
5548
5548
|
});
|
|
@@ -6039,7 +6039,7 @@
|
|
|
6039
6039
|
}
|
|
6040
6040
|
const keyPrefix$3 = 'UiApi';
|
|
6041
6041
|
|
|
6042
|
-
const { assign: assign$
|
|
6042
|
+
const { assign: assign$6, create: create$6, freeze: freeze$3, isFrozen: isFrozen$3, keys: keys$7 } = Object;
|
|
6043
6043
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
6044
6044
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6045
6045
|
const { isArray: isArray$5 } = Array;
|
|
@@ -6068,7 +6068,7 @@
|
|
|
6068
6068
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
6069
6069
|
result[value[i]] = true;
|
|
6070
6070
|
}
|
|
6071
|
-
return keys$
|
|
6071
|
+
return keys$7(result);
|
|
6072
6072
|
}
|
|
6073
6073
|
/**
|
|
6074
6074
|
* @param source The array of string to filter
|
|
@@ -6949,14 +6949,14 @@
|
|
|
6949
6949
|
mergeable: true,
|
|
6950
6950
|
});
|
|
6951
6951
|
const input_childRelationships = input.childRelationships;
|
|
6952
|
-
const input_childRelationships_keys = keys$
|
|
6952
|
+
const input_childRelationships_keys = keys$7(input_childRelationships);
|
|
6953
6953
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
6954
6954
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
6955
6955
|
const key = input_childRelationships_keys[i];
|
|
6956
6956
|
getTypeCacheKeys$W$2(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
6957
6957
|
}
|
|
6958
6958
|
const input_fields = input.fields;
|
|
6959
|
-
const input_fields_keys = keys$
|
|
6959
|
+
const input_fields_keys = keys$7(input_fields);
|
|
6960
6960
|
const input_fields_length = input_fields_keys.length;
|
|
6961
6961
|
for (let i = 0; i < input_fields_length; i++) {
|
|
6962
6962
|
const key = input_fields_keys[i];
|
|
@@ -8999,7 +8999,7 @@
|
|
|
8999
8999
|
function createPathSelection$1(propertyName, fieldDefinition) {
|
|
9000
9000
|
const fieldsSelection = [];
|
|
9001
9001
|
const { children } = fieldDefinition;
|
|
9002
|
-
const childrenKeys = keys$
|
|
9002
|
+
const childrenKeys = keys$7(children);
|
|
9003
9003
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
9004
9004
|
const childKey = childrenKeys[i];
|
|
9005
9005
|
const childFieldDefinition = children[childKey];
|
|
@@ -9044,7 +9044,7 @@
|
|
|
9044
9044
|
*/
|
|
9045
9045
|
function createPathSelectionFromValue$1(fields) {
|
|
9046
9046
|
const fieldsSelection = [];
|
|
9047
|
-
const fieldNames = keys$
|
|
9047
|
+
const fieldNames = keys$7(fields);
|
|
9048
9048
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9049
9049
|
const fieldName = fieldNames[i];
|
|
9050
9050
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -9083,7 +9083,7 @@
|
|
|
9083
9083
|
}
|
|
9084
9084
|
function extractRecordFieldsRecursively$1(record) {
|
|
9085
9085
|
const fields = [];
|
|
9086
|
-
const fieldNames = keys$
|
|
9086
|
+
const fieldNames = keys$7(record.fields);
|
|
9087
9087
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9088
9088
|
const fieldName = fieldNames[i];
|
|
9089
9089
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -9276,7 +9276,7 @@
|
|
|
9276
9276
|
// For a spanning record that is detected to be a circular reference, we add the field along with Id and Name.
|
|
9277
9277
|
// It's possible for spanning record lookup fields to sometimes be circular, and sometimes not - depending on the value of the lookup field.
|
|
9278
9278
|
// For more information on scenarios that caused this fix: search "LDS Recursive Spanning Fields Problem" in Quip
|
|
9279
|
-
if (keys$
|
|
9279
|
+
if (keys$7(next.children).length === 0) {
|
|
9280
9280
|
addScalarFieldId$1(next);
|
|
9281
9281
|
addScalarFieldName$1(next);
|
|
9282
9282
|
}
|
|
@@ -9329,13 +9329,13 @@
|
|
|
9329
9329
|
return endsWith$1.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX$1);
|
|
9330
9330
|
}
|
|
9331
9331
|
function convertTrieToFields$1(root) {
|
|
9332
|
-
if (keys$
|
|
9332
|
+
if (keys$7(root.children).length === 0) {
|
|
9333
9333
|
return [];
|
|
9334
9334
|
}
|
|
9335
9335
|
return convertTrieToFieldsRecursively$1(root);
|
|
9336
9336
|
}
|
|
9337
9337
|
function convertTrieToFieldsRecursively$1(root) {
|
|
9338
|
-
const childKeys = keys$
|
|
9338
|
+
const childKeys = keys$7(root.children);
|
|
9339
9339
|
if (childKeys.length === 0) {
|
|
9340
9340
|
if (root.name === '') {
|
|
9341
9341
|
return [];
|
|
@@ -9344,7 +9344,7 @@
|
|
|
9344
9344
|
}
|
|
9345
9345
|
return reduce$3.call(childKeys, (acc, cur) => concat$3.call(acc, convertTrieToFieldsRecursively$1(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
9346
9346
|
}
|
|
9347
|
-
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$
|
|
9347
|
+
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$3({
|
|
9348
9348
|
name: '',
|
|
9349
9349
|
children: {},
|
|
9350
9350
|
});
|
|
@@ -9374,7 +9374,7 @@
|
|
|
9374
9374
|
function mergeFieldsTries$1(rootA, rootB) {
|
|
9375
9375
|
const rootAchildren = rootA.children;
|
|
9376
9376
|
const rootBchildren = rootB.children;
|
|
9377
|
-
const childBKeys = keys$
|
|
9377
|
+
const childBKeys = keys$7(rootBchildren);
|
|
9378
9378
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
9379
9379
|
const childBKey = childBKeys[i];
|
|
9380
9380
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -9534,8 +9534,8 @@
|
|
|
9534
9534
|
}
|
|
9535
9535
|
const childrenA = a.children;
|
|
9536
9536
|
const childrenB = b.children;
|
|
9537
|
-
const childKeysA = keys$
|
|
9538
|
-
const childKeysB = keys$
|
|
9537
|
+
const childKeysA = keys$7(childrenA);
|
|
9538
|
+
const childKeysB = keys$7(childrenB);
|
|
9539
9539
|
const childKeysBLength = childKeysB.length;
|
|
9540
9540
|
if (childKeysBLength > childKeysA.length) {
|
|
9541
9541
|
return false;
|
|
@@ -9577,7 +9577,7 @@
|
|
|
9577
9577
|
function mergePendingFields$1(newRecord, oldRecord, existingNode) {
|
|
9578
9578
|
const mergedFields = { ...newRecord.fields };
|
|
9579
9579
|
const merged = { ...newRecord, fields: mergedFields };
|
|
9580
|
-
const existingFields = keys$
|
|
9580
|
+
const existingFields = keys$7(oldRecord.fields);
|
|
9581
9581
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
9582
9582
|
const spanningFieldName = existingFields[i];
|
|
9583
9583
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -9745,7 +9745,7 @@
|
|
|
9745
9745
|
if (isGraphNode$1(node)) {
|
|
9746
9746
|
const dependencies = node.retrieve();
|
|
9747
9747
|
if (dependencies !== null) {
|
|
9748
|
-
const depKeys = keys$
|
|
9748
|
+
const depKeys = keys$7(dependencies);
|
|
9749
9749
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
9750
9750
|
luvio.storeEvict(depKeys[i]);
|
|
9751
9751
|
}
|
|
@@ -9892,7 +9892,7 @@
|
|
|
9892
9892
|
}
|
|
9893
9893
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
9894
9894
|
const subtrie = fieldSubtries[i];
|
|
9895
|
-
const fieldNames = keys$
|
|
9895
|
+
const fieldNames = keys$7(subtrie.children);
|
|
9896
9896
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
9897
9897
|
const fieldName = fieldNames[i];
|
|
9898
9898
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -10006,9 +10006,9 @@
|
|
|
10006
10006
|
return false;
|
|
10007
10007
|
}
|
|
10008
10008
|
}
|
|
10009
|
-
const headersKeys = keys$
|
|
10009
|
+
const headersKeys = keys$7(headers);
|
|
10010
10010
|
const headersKeyLength = headersKeys.length;
|
|
10011
|
-
if (headersKeyLength !== keys$
|
|
10011
|
+
if (headersKeyLength !== keys$7(existingHeaders).length) {
|
|
10012
10012
|
return false;
|
|
10013
10013
|
}
|
|
10014
10014
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -10616,7 +10616,7 @@
|
|
|
10616
10616
|
|
|
10617
10617
|
// iterate through the map to build configs for network calls
|
|
10618
10618
|
function resolveConflict$1(luvio, map) {
|
|
10619
|
-
const ids = keys$
|
|
10619
|
+
const ids = keys$7(map.conflicts);
|
|
10620
10620
|
if (ids.length === 0) {
|
|
10621
10621
|
instrumentation$3.recordConflictsResolved(map.serverRequestCount);
|
|
10622
10622
|
return;
|
|
@@ -12065,18 +12065,18 @@
|
|
|
12065
12065
|
return {
|
|
12066
12066
|
getRecordSelectionFieldSets() {
|
|
12067
12067
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
12068
|
-
const fields = keys$
|
|
12068
|
+
const fields = keys$7(defaultFields_);
|
|
12069
12069
|
for (let i = 0; i < fields.length; ++i) {
|
|
12070
12070
|
const field = fields[i];
|
|
12071
12071
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
12072
12072
|
optionalPlusDefaultFields[field] = true;
|
|
12073
12073
|
}
|
|
12074
12074
|
}
|
|
12075
|
-
return [keys$
|
|
12075
|
+
return [keys$7(fields_).sort(), keys$7(optionalPlusDefaultFields).sort()];
|
|
12076
12076
|
},
|
|
12077
12077
|
processRecords(records) {
|
|
12078
12078
|
const { missingFields } = defaultServerFieldStatus;
|
|
12079
|
-
const fields = keys$
|
|
12079
|
+
const fields = keys$7(missingFields);
|
|
12080
12080
|
for (let i = 0; i < fields.length; ++i) {
|
|
12081
12081
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
12082
12082
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -14556,7 +14556,7 @@
|
|
|
14556
14556
|
const lookupFields = {};
|
|
14557
14557
|
const { apiName, fields: recordFields } = record;
|
|
14558
14558
|
const { fields: objectInfoFields } = objectInfo;
|
|
14559
|
-
const objectInfoFieldNames = keys$
|
|
14559
|
+
const objectInfoFieldNames = keys$7(objectInfoFields);
|
|
14560
14560
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
14561
14561
|
const fieldName = objectInfoFieldNames[i];
|
|
14562
14562
|
const field = objectInfoFields[fieldName];
|
|
@@ -14575,12 +14575,12 @@
|
|
|
14575
14575
|
const nameField = `${apiName}.${relationshipName}.${getNameField$1(objectInfo, fieldName)}`;
|
|
14576
14576
|
lookupFields[nameField] = true;
|
|
14577
14577
|
}
|
|
14578
|
-
return keys$
|
|
14578
|
+
return keys$7(lookupFields);
|
|
14579
14579
|
}
|
|
14580
14580
|
function getRecordUiMissingRecordLookupFields$1(recordUi) {
|
|
14581
14581
|
const { records, objectInfos } = recordUi;
|
|
14582
14582
|
const recordLookupFields = {};
|
|
14583
|
-
const recordIds = keys$
|
|
14583
|
+
const recordIds = keys$7(records);
|
|
14584
14584
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14585
14585
|
const recordId = recordIds[i];
|
|
14586
14586
|
const recordData = records[recordId];
|
|
@@ -14618,19 +14618,19 @@
|
|
|
14618
14618
|
}
|
|
14619
14619
|
function eachLayout$1(recordUi, cb) {
|
|
14620
14620
|
const { layouts } = recordUi;
|
|
14621
|
-
const layoutApiNames = keys$
|
|
14621
|
+
const layoutApiNames = keys$7(layouts);
|
|
14622
14622
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
14623
14623
|
const apiName = layoutApiNames[a];
|
|
14624
14624
|
const apiNameData = layouts[apiName];
|
|
14625
|
-
const recordTypeIds = keys$
|
|
14625
|
+
const recordTypeIds = keys$7(apiNameData);
|
|
14626
14626
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
14627
14627
|
const recordTypeId = recordTypeIds[b];
|
|
14628
14628
|
const recordTypeData = apiNameData[recordTypeId];
|
|
14629
|
-
const layoutTypes = keys$
|
|
14629
|
+
const layoutTypes = keys$7(recordTypeData);
|
|
14630
14630
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
14631
14631
|
const layoutType = layoutTypes[c];
|
|
14632
14632
|
const layoutTypeData = recordTypeData[layoutType];
|
|
14633
|
-
const modes = keys$
|
|
14633
|
+
const modes = keys$7(layoutTypeData);
|
|
14634
14634
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
14635
14635
|
const mode = modes[d];
|
|
14636
14636
|
const layout = layoutTypeData[mode];
|
|
@@ -14836,14 +14836,14 @@
|
|
|
14836
14836
|
function publishDependencies$1(luvio, recordIds, depKeys) {
|
|
14837
14837
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14838
14838
|
const recordDepKey = dependencyKeyBuilder$1({ recordId: recordIds[i] });
|
|
14839
|
-
const dependencies = create$
|
|
14839
|
+
const dependencies = create$6(null);
|
|
14840
14840
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
14841
14841
|
dependencies[depKeys[j]] = true;
|
|
14842
14842
|
}
|
|
14843
14843
|
const node = luvio.getNode(recordDepKey);
|
|
14844
14844
|
if (isGraphNode$1(node)) {
|
|
14845
14845
|
const recordDeps = node.retrieve();
|
|
14846
|
-
assign$
|
|
14846
|
+
assign$6(dependencies, recordDeps);
|
|
14847
14847
|
}
|
|
14848
14848
|
luvio.storePublish(recordDepKey, dependencies);
|
|
14849
14849
|
}
|
|
@@ -15030,11 +15030,11 @@
|
|
|
15030
15030
|
function getFieldsFromLayoutMap$1(layoutMap, objectInfo) {
|
|
15031
15031
|
let fields = [];
|
|
15032
15032
|
let optionalFields = [];
|
|
15033
|
-
const layoutTypes = keys$
|
|
15033
|
+
const layoutTypes = keys$7(layoutMap);
|
|
15034
15034
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
15035
15035
|
const layoutType = layoutTypes[i];
|
|
15036
15036
|
const modesMap = layoutMap[layoutType];
|
|
15037
|
-
const modes = keys$
|
|
15037
|
+
const modes = keys$7(modesMap);
|
|
15038
15038
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
15039
15039
|
const mode = modes[m];
|
|
15040
15040
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout$1(modesMap[mode], objectInfo);
|
|
@@ -15071,7 +15071,7 @@
|
|
|
15071
15071
|
return getRecord$1(luvio, refresh, recordId, [], implicitFields);
|
|
15072
15072
|
}
|
|
15073
15073
|
function getRecordForNonLayoutableEntities$1(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
15074
|
-
const fields = keys$
|
|
15074
|
+
const fields = keys$7(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
15075
15075
|
// W-12697744
|
|
15076
15076
|
// Set the implicit fields received from the server in adapter context
|
|
15077
15077
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -15310,7 +15310,7 @@
|
|
|
15310
15310
|
}
|
|
15311
15311
|
const { layoutType, mode, snapshot } = container;
|
|
15312
15312
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
15313
|
-
wrapper.layoutMap = assign$
|
|
15313
|
+
wrapper.layoutMap = assign$6({}, wrapper.layoutMap, {
|
|
15314
15314
|
[layoutType]: {},
|
|
15315
15315
|
});
|
|
15316
15316
|
}
|
|
@@ -25251,7 +25251,7 @@
|
|
|
25251
25251
|
}
|
|
25252
25252
|
}
|
|
25253
25253
|
if (records.length > 0) {
|
|
25254
|
-
assign$
|
|
25254
|
+
assign$6(config, { records });
|
|
25255
25255
|
}
|
|
25256
25256
|
}
|
|
25257
25257
|
return config;
|
|
@@ -30305,7 +30305,7 @@
|
|
|
30305
30305
|
let clonedLayoutUserStateSections;
|
|
30306
30306
|
const { sectionUserStates } = layoutUserStateInput;
|
|
30307
30307
|
const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
|
|
30308
|
-
const sectionUserStateKeys = keys$
|
|
30308
|
+
const sectionUserStateKeys = keys$7(sectionUserStates);
|
|
30309
30309
|
for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
|
|
30310
30310
|
const sectionId = sectionUserStateKeys[i];
|
|
30311
30311
|
if (cachedSectionUserStates[sectionId] === undefined) {
|
|
@@ -33583,7 +33583,7 @@
|
|
|
33583
33583
|
const getRecordTemplateCreate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordTemplateCreate', configurationForEnvironmentFactoryOverrides$2.getRecordTemplateCreateAdapterFactory() ?? factory$5$1), getRecordTemplateCreateMetadata);
|
|
33584
33584
|
const getRecordUi_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordUi', configurationForEnvironmentFactoryOverrides$2.getRecordUiAdapterFactory() ?? factory$g), getRecordUiMetadata);
|
|
33585
33585
|
const getRecords_ldsAdapter = createInstrumentedAdapter(createLDSAdapterWithPrediction(createLDSAdapter(luvio, 'getRecords', configurationForEnvironmentFactoryOverrides$2.getRecordsAdapterFactory() ?? getRecordsAdapterFactory$1), luvio, 'getRecords'), getRecordsMetadata);
|
|
33586
|
-
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), getRelatedListActionsMetadata);
|
|
33586
|
+
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createRelatedListPlusAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), luvio, 'getRelatedListActions'), getRelatedListActionsMetadata);
|
|
33587
33587
|
const getRelatedListCount_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListCount', getRelatedListCountAdapterFactory), getRelatedListCountMetadata);
|
|
33588
33588
|
const getRelatedListInfo_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfo', getRelatedListInfoAdapterFactory), luvio, 'getRelatedListInfo'), getRelatedListInfoMetadata);
|
|
33589
33589
|
const getRelatedListInfoBatch_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfoBatch', getRelatedListInfoBatchAdapterFactory), luvio, 'getRelatedListInfoBatch'), getRelatedListInfoBatchMetadata);
|
|
@@ -33900,16 +33900,7 @@
|
|
|
33900
33900
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33901
33901
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33902
33902
|
});
|
|
33903
|
-
// version: 1.
|
|
33904
|
-
|
|
33905
|
-
var graphqlRecordTypeIdFixGate = {
|
|
33906
|
-
isOpen: function (e) {
|
|
33907
|
-
return e.fallback;
|
|
33908
|
-
},
|
|
33909
|
-
hasError: function () {
|
|
33910
|
-
return !0;
|
|
33911
|
-
},
|
|
33912
|
-
};
|
|
33903
|
+
// version: 1.342.0-f478af8b93
|
|
33913
33904
|
|
|
33914
33905
|
/**
|
|
33915
33906
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -45516,7 +45507,7 @@
|
|
|
45516
45507
|
const { parse: parse$4, stringify: stringify$4 } = JSON;
|
|
45517
45508
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45518
45509
|
const { isArray: isArray$3$1 } = Array;
|
|
45519
|
-
const { entries: entries$
|
|
45510
|
+
const { entries: entries$3, keys: keys$5 } = Object;
|
|
45520
45511
|
|
|
45521
45512
|
const UI_API_BASE_URI = '/services/data/v64.0/ui-api';
|
|
45522
45513
|
|
|
@@ -45581,7 +45572,7 @@
|
|
|
45581
45572
|
function mergeRecordFields$2(first, second) {
|
|
45582
45573
|
const { fields: targetFields } = first;
|
|
45583
45574
|
const { fields: sourceFields } = second;
|
|
45584
|
-
const fieldNames = keys$
|
|
45575
|
+
const fieldNames = keys$5(sourceFields);
|
|
45585
45576
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
45586
45577
|
const fieldName = fieldNames[i];
|
|
45587
45578
|
const sourceField = sourceFields[fieldName];
|
|
@@ -45823,7 +45814,7 @@
|
|
|
45823
45814
|
if (fulfill === undefined) {
|
|
45824
45815
|
return null;
|
|
45825
45816
|
}
|
|
45826
|
-
const handlersMap = entries$
|
|
45817
|
+
const handlersMap = entries$3(inflightRequests);
|
|
45827
45818
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
45828
45819
|
const [transactionKey, handlers] = handlersMap[i];
|
|
45829
45820
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -45988,7 +45979,7 @@
|
|
|
45988
45979
|
const MessagingDurableSegment = 'MESSAGING';
|
|
45989
45980
|
const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
|
|
45990
45981
|
|
|
45991
|
-
const { keys: keys$
|
|
45982
|
+
const { keys: keys$4, create: create$4, assign: assign$4, freeze: freeze$1$1 } = Object;
|
|
45992
45983
|
|
|
45993
45984
|
//Durable store error instrumentation key
|
|
45994
45985
|
const DURABLE_STORE_ERROR = 'durable-store-error';
|
|
@@ -46035,7 +46026,7 @@
|
|
|
46035
46026
|
if (durableRecords === undefined) {
|
|
46036
46027
|
return { revivedKeys, hadUnexpectedShape };
|
|
46037
46028
|
}
|
|
46038
|
-
const durableKeys = keys$
|
|
46029
|
+
const durableKeys = keys$4(durableRecords);
|
|
46039
46030
|
if (durableKeys.length === 0) {
|
|
46040
46031
|
// no records to revive
|
|
46041
46032
|
return { revivedKeys, hadUnexpectedShape };
|
|
@@ -46220,7 +46211,7 @@
|
|
|
46220
46211
|
overrides,
|
|
46221
46212
|
};
|
|
46222
46213
|
}
|
|
46223
|
-
const keys$1 = keys$
|
|
46214
|
+
const keys$1 = keys$4(entries);
|
|
46224
46215
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
46225
46216
|
const key = keys$1[i];
|
|
46226
46217
|
const entry = entries[key];
|
|
@@ -46242,14 +46233,14 @@
|
|
|
46242
46233
|
}
|
|
46243
46234
|
|
|
46244
46235
|
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
46245
|
-
const durableRecords = create$
|
|
46246
|
-
const refreshedDurableRecords = create$
|
|
46247
|
-
const evictedRecords = create$
|
|
46236
|
+
const durableRecords = create$4(null);
|
|
46237
|
+
const refreshedDurableRecords = create$4(null);
|
|
46238
|
+
const evictedRecords = create$4(null);
|
|
46248
46239
|
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
46249
46240
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
46250
46241
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
46251
46242
|
// on the metadata segment for the refreshedIds
|
|
46252
|
-
const keys$1 = keys$
|
|
46243
|
+
const keys$1 = keys$4({ ...visitedIds, ...refreshedIds });
|
|
46253
46244
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
46254
46245
|
const key = keys$1[i];
|
|
46255
46246
|
const canonicalKey = store.getCanonicalRecordId(key);
|
|
@@ -46281,7 +46272,7 @@
|
|
|
46281
46272
|
}
|
|
46282
46273
|
}
|
|
46283
46274
|
const durableStoreOperations = additionalDurableStoreOperations;
|
|
46284
|
-
const recordKeys = keys$
|
|
46275
|
+
const recordKeys = keys$4(durableRecords);
|
|
46285
46276
|
if (recordKeys.length > 0) {
|
|
46286
46277
|
// publishes with data
|
|
46287
46278
|
durableStoreOperations.push({
|
|
@@ -46290,7 +46281,7 @@
|
|
|
46290
46281
|
segment: DefaultDurableSegment,
|
|
46291
46282
|
});
|
|
46292
46283
|
}
|
|
46293
|
-
const refreshKeys = keys$
|
|
46284
|
+
const refreshKeys = keys$4(refreshedDurableRecords);
|
|
46294
46285
|
if (refreshKeys.length > 0) {
|
|
46295
46286
|
// publishes with only metadata updates
|
|
46296
46287
|
durableStoreOperations.push({
|
|
@@ -46312,7 +46303,7 @@
|
|
|
46312
46303
|
});
|
|
46313
46304
|
});
|
|
46314
46305
|
// evicts
|
|
46315
|
-
const evictedKeys = keys$
|
|
46306
|
+
const evictedKeys = keys$4(evictedRecords);
|
|
46316
46307
|
if (evictedKeys.length > 0) {
|
|
46317
46308
|
durableStoreOperations.push({
|
|
46318
46309
|
type: 'evictEntries',
|
|
@@ -46416,7 +46407,7 @@
|
|
|
46416
46407
|
// A reviving store is only "active" during a call to `environment.storeLookup`, and will
|
|
46417
46408
|
// be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
|
|
46418
46409
|
// the reviving store becomes inactive other than receiving change notifications.
|
|
46419
|
-
return create$
|
|
46410
|
+
return create$4(upstreamStore, {
|
|
46420
46411
|
readEntry: { value: readEntry },
|
|
46421
46412
|
markStale: { value: markStale },
|
|
46422
46413
|
clearStale: { value: clearStale },
|
|
@@ -46428,7 +46419,7 @@
|
|
|
46428
46419
|
const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
|
|
46429
46420
|
async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
|
|
46430
46421
|
// initialize empty context store
|
|
46431
|
-
contextStores[adapterId] = create$
|
|
46422
|
+
contextStores[adapterId] = create$4(null);
|
|
46432
46423
|
const context = {
|
|
46433
46424
|
set(key, value) {
|
|
46434
46425
|
contextStores[adapterId][key] = value;
|
|
@@ -46493,7 +46484,7 @@
|
|
|
46493
46484
|
const revivingStores = new Set();
|
|
46494
46485
|
// redirects that need to be flushed to the durable store
|
|
46495
46486
|
const pendingStoreRedirects = new Map();
|
|
46496
|
-
const contextStores = create$
|
|
46487
|
+
const contextStores = create$4(null);
|
|
46497
46488
|
let initializationPromise = new Promise((resolve) => {
|
|
46498
46489
|
const finish = () => {
|
|
46499
46490
|
resolve();
|
|
@@ -46570,7 +46561,7 @@
|
|
|
46570
46561
|
try {
|
|
46571
46562
|
const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
|
|
46572
46563
|
if (entries !== undefined) {
|
|
46573
|
-
const entryKeys = keys$
|
|
46564
|
+
const entryKeys = keys$4(entries);
|
|
46574
46565
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46575
46566
|
const entryKey = entryKeys[i];
|
|
46576
46567
|
const entry = entries[entryKey];
|
|
@@ -46605,7 +46596,7 @@
|
|
|
46605
46596
|
if (filteredKeys.length > 0) {
|
|
46606
46597
|
const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
|
|
46607
46598
|
if (entries !== undefined) {
|
|
46608
|
-
const entryKeys = keys$
|
|
46599
|
+
const entryKeys = keys$4(entries);
|
|
46609
46600
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46610
46601
|
const entryKey = entryKeys[i];
|
|
46611
46602
|
const { metadata } = entries[entryKey];
|
|
@@ -46977,7 +46968,7 @@
|
|
|
46977
46968
|
validateNotDisposed();
|
|
46978
46969
|
const entryKeys = keys$1.map(serializeStructuredKey);
|
|
46979
46970
|
const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
|
|
46980
|
-
if (entries === undefined || keys$
|
|
46971
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
46981
46972
|
return environment.notifyStoreUpdateAvailable(keys$1);
|
|
46982
46973
|
}
|
|
46983
46974
|
const now = Date.now();
|
|
@@ -47029,7 +47020,7 @@
|
|
|
47029
47020
|
const metadataKeys = keys$1.map(serializeStructuredKey);
|
|
47030
47021
|
const now = Date.now();
|
|
47031
47022
|
const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
|
|
47032
|
-
if (entries === undefined || keys$
|
|
47023
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
47033
47024
|
return environment.expirePossibleStaleRecords(keys$1);
|
|
47034
47025
|
}
|
|
47035
47026
|
let metaDataChanged = false;
|
|
@@ -47055,7 +47046,7 @@
|
|
|
47055
47046
|
type: 'stale-while-revalidate',
|
|
47056
47047
|
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
47057
47048
|
});
|
|
47058
|
-
return create$
|
|
47049
|
+
return create$4(environment, {
|
|
47059
47050
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
47060
47051
|
storeIngest: { value: storeIngest },
|
|
47061
47052
|
storeIngestError: { value: storeIngestError },
|
|
@@ -47291,7 +47282,7 @@
|
|
|
47291
47282
|
QueueOperationType["Update"] = "update";
|
|
47292
47283
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47293
47284
|
|
|
47294
|
-
const { keys: keys$
|
|
47285
|
+
const { keys: keys$3, create: create$3, assign: assign$3, values: values$2 } = Object;
|
|
47295
47286
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
47296
47287
|
const { isArray: isArray$2$1 } = Array;
|
|
47297
47288
|
|
|
@@ -47662,7 +47653,7 @@
|
|
|
47662
47653
|
const queueOperations = handler.getQueueOperationsForCompletingDrafts(queue, action);
|
|
47663
47654
|
// write the queue operations to the store prior to ingesting the result
|
|
47664
47655
|
await this.draftStore.completeAction(queueOperations);
|
|
47665
|
-
await handler.handleActionCompleted(action, queueOperations, values$
|
|
47656
|
+
await handler.handleActionCompleted(action, queueOperations, values$2(this.handlers));
|
|
47666
47657
|
this.retryIntervalMilliseconds = 0;
|
|
47667
47658
|
this.uploadingActionId = undefined;
|
|
47668
47659
|
await this.notifyChangedListeners({
|
|
@@ -47868,7 +47859,7 @@
|
|
|
47868
47859
|
return pendingAction;
|
|
47869
47860
|
}
|
|
47870
47861
|
async setMetadata(actionId, metadata) {
|
|
47871
|
-
const keys$1 = keys$
|
|
47862
|
+
const keys$1 = keys$3(metadata);
|
|
47872
47863
|
const compatibleKeys = keys$1.filter((key) => {
|
|
47873
47864
|
const value = metadata[key];
|
|
47874
47865
|
return typeof key === 'string' && typeof value === 'string';
|
|
@@ -48035,7 +48026,7 @@
|
|
|
48035
48026
|
const waitForOngoingSync = this.syncPromise || Promise.resolve();
|
|
48036
48027
|
return waitForOngoingSync.then(() => {
|
|
48037
48028
|
const { draftStore } = this;
|
|
48038
|
-
const keys$1 = keys$
|
|
48029
|
+
const keys$1 = keys$3(draftStore);
|
|
48039
48030
|
const actionArray = [];
|
|
48040
48031
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48041
48032
|
const key = keys$1[i];
|
|
@@ -48060,7 +48051,7 @@
|
|
|
48060
48051
|
deleteByTag(tag) {
|
|
48061
48052
|
const deleteAction = () => {
|
|
48062
48053
|
const { draftStore } = this;
|
|
48063
|
-
const keys$1 = keys$
|
|
48054
|
+
const keys$1 = keys$3(draftStore);
|
|
48064
48055
|
const durableKeys = [];
|
|
48065
48056
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48066
48057
|
const key = keys$1[i];
|
|
@@ -48112,7 +48103,7 @@
|
|
|
48112
48103
|
return this.enqueueAction(action);
|
|
48113
48104
|
}
|
|
48114
48105
|
getCount() {
|
|
48115
|
-
return keys$
|
|
48106
|
+
return keys$3(this.draftStore).length;
|
|
48116
48107
|
}
|
|
48117
48108
|
/**
|
|
48118
48109
|
* Runs a write operation against the draft store, if the initial
|
|
@@ -48153,7 +48144,7 @@
|
|
|
48153
48144
|
return this.runQueuedOperations();
|
|
48154
48145
|
}
|
|
48155
48146
|
const { draftStore } = this;
|
|
48156
|
-
const keys$1 = keys$
|
|
48147
|
+
const keys$1 = keys$3(durableEntries);
|
|
48157
48148
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48158
48149
|
const entry = durableEntries[keys$1[i]];
|
|
48159
48150
|
const action = entry.data;
|
|
@@ -48262,13 +48253,6 @@
|
|
|
48262
48253
|
}
|
|
48263
48254
|
class DraftManager {
|
|
48264
48255
|
shouldEmitEvent(event) {
|
|
48265
|
-
// Waiting events cannot be emitted prior to 252 native clients
|
|
48266
|
-
// TODO [W-16102411]: we can safely remove this backwards compatible code in 256
|
|
48267
|
-
if (isDraftQueueStateChangeEvent(event) &&
|
|
48268
|
-
event.state === DraftQueueState.Waiting &&
|
|
48269
|
-
this.listenerVersion === undefined) {
|
|
48270
|
-
return false;
|
|
48271
|
-
}
|
|
48272
48256
|
return this.draftEventsShouldBeEmitted.includes(event.type);
|
|
48273
48257
|
}
|
|
48274
48258
|
constructor(draftQueue) {
|
|
@@ -48426,7 +48410,7 @@
|
|
|
48426
48410
|
return this.buildDraftQueueItem(action);
|
|
48427
48411
|
}
|
|
48428
48412
|
isValidFieldMap(fields) {
|
|
48429
|
-
const keys$1 = keys$
|
|
48413
|
+
const keys$1 = keys$3(fields);
|
|
48430
48414
|
const validTypes = ['string', 'number', 'boolean'];
|
|
48431
48415
|
for (let i = 0; i < keys$1.length; i++) {
|
|
48432
48416
|
const key = keys$1[i];
|
|
@@ -48699,7 +48683,7 @@
|
|
|
48699
48683
|
}
|
|
48700
48684
|
const keyPrefix$2 = 'UiApi';
|
|
48701
48685
|
|
|
48702
|
-
const { assign: assign$
|
|
48686
|
+
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;
|
|
48703
48687
|
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
48704
48688
|
const { split, endsWith } = String.prototype;
|
|
48705
48689
|
const { from: from$1, isArray: isArray$1$1 } = Array;
|
|
@@ -48728,7 +48712,7 @@
|
|
|
48728
48712
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
48729
48713
|
result[value[i]] = true;
|
|
48730
48714
|
}
|
|
48731
|
-
return keys$
|
|
48715
|
+
return keys$2$1(result);
|
|
48732
48716
|
}
|
|
48733
48717
|
/**
|
|
48734
48718
|
* @param source The array of string to filter
|
|
@@ -49498,14 +49482,14 @@
|
|
|
49498
49482
|
mergeable: true,
|
|
49499
49483
|
});
|
|
49500
49484
|
const input_childRelationships = input.childRelationships;
|
|
49501
|
-
const input_childRelationships_keys = keys$
|
|
49485
|
+
const input_childRelationships_keys = keys$2$1(input_childRelationships);
|
|
49502
49486
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
49503
49487
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
49504
49488
|
const key = input_childRelationships_keys[i];
|
|
49505
49489
|
getTypeCacheKeys$1t(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
49506
49490
|
}
|
|
49507
49491
|
const input_fields = input.fields;
|
|
49508
|
-
const field_values = keys$
|
|
49492
|
+
const field_values = keys$2$1(input_fields);
|
|
49509
49493
|
const input_fields_length = field_values.length;
|
|
49510
49494
|
for (let i = 0; i < input_fields_length; i++) {
|
|
49511
49495
|
const field_value = input_fields[field_values[i]];
|
|
@@ -49795,7 +49779,7 @@
|
|
|
49795
49779
|
function createPathSelection(propertyName, fieldDefinition) {
|
|
49796
49780
|
const fieldsSelection = [];
|
|
49797
49781
|
const { children } = fieldDefinition;
|
|
49798
|
-
const childrenKeys = keys$
|
|
49782
|
+
const childrenKeys = keys$2$1(children);
|
|
49799
49783
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
49800
49784
|
const childKey = childrenKeys[i];
|
|
49801
49785
|
const childFieldDefinition = children[childKey];
|
|
@@ -49846,7 +49830,7 @@
|
|
|
49846
49830
|
*/
|
|
49847
49831
|
function createPathSelectionFromValue(fields) {
|
|
49848
49832
|
const fieldsSelections = [];
|
|
49849
|
-
const fieldNames = keys$
|
|
49833
|
+
const fieldNames = keys$2$1(fields);
|
|
49850
49834
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49851
49835
|
const fieldName = fieldNames[i];
|
|
49852
49836
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -49891,7 +49875,7 @@
|
|
|
49891
49875
|
}
|
|
49892
49876
|
function extractRecordFieldsRecursively(record) {
|
|
49893
49877
|
const fields = [];
|
|
49894
|
-
const fieldNames = keys$
|
|
49878
|
+
const fieldNames = keys$2$1(record.fields);
|
|
49895
49879
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49896
49880
|
const fieldName = fieldNames[i];
|
|
49897
49881
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -50152,7 +50136,7 @@
|
|
|
50152
50136
|
// RecordRepresentationNormalized['fields'] to include `pending:true` property
|
|
50153
50137
|
const mergedFields = { ...newRecord.fields };
|
|
50154
50138
|
const merged = { ...newRecord, fields: mergedFields };
|
|
50155
|
-
const existingFields = keys$
|
|
50139
|
+
const existingFields = keys$2$1(oldRecord.fields);
|
|
50156
50140
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
50157
50141
|
const spanningFieldName = existingFields[i];
|
|
50158
50142
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -50269,7 +50253,7 @@
|
|
|
50269
50253
|
if (isGraphNode(node)) {
|
|
50270
50254
|
const dependencies = node.retrieve();
|
|
50271
50255
|
if (dependencies !== null) {
|
|
50272
|
-
const depKeys = keys$
|
|
50256
|
+
const depKeys = keys$2$1(dependencies);
|
|
50273
50257
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
50274
50258
|
luvio.storeEvict(depKeys[i]);
|
|
50275
50259
|
}
|
|
@@ -50421,7 +50405,7 @@
|
|
|
50421
50405
|
}
|
|
50422
50406
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
50423
50407
|
const subtrie = fieldSubtries[i];
|
|
50424
|
-
const fieldNames = keys$
|
|
50408
|
+
const fieldNames = keys$2$1(subtrie.children);
|
|
50425
50409
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
50426
50410
|
const fieldName = fieldNames[i];
|
|
50427
50411
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -50543,13 +50527,13 @@
|
|
|
50543
50527
|
return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
|
|
50544
50528
|
}
|
|
50545
50529
|
function convertTrieToFields(root) {
|
|
50546
|
-
if (keys$
|
|
50530
|
+
if (keys$2$1(root.children).length === 0) {
|
|
50547
50531
|
return [];
|
|
50548
50532
|
}
|
|
50549
50533
|
return convertTrieToFieldsRecursively(root);
|
|
50550
50534
|
}
|
|
50551
50535
|
function convertTrieToFieldsRecursively(root) {
|
|
50552
|
-
const childKeys = keys$
|
|
50536
|
+
const childKeys = keys$2$1(root.children);
|
|
50553
50537
|
if (childKeys.length === 0) {
|
|
50554
50538
|
if (root.name === '') {
|
|
50555
50539
|
return [];
|
|
@@ -50558,7 +50542,7 @@
|
|
|
50558
50542
|
}
|
|
50559
50543
|
return reduce$2.call(childKeys, (acc, cur) => concat$2.call(acc, convertTrieToFieldsRecursively(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
50560
50544
|
}
|
|
50561
|
-
const BLANK_RECORD_FIELDS_TRIE = freeze$
|
|
50545
|
+
const BLANK_RECORD_FIELDS_TRIE = freeze$2({
|
|
50562
50546
|
name: '',
|
|
50563
50547
|
children: {},
|
|
50564
50548
|
});
|
|
@@ -50586,7 +50570,7 @@
|
|
|
50586
50570
|
function mergeFieldsTries(rootA, rootB) {
|
|
50587
50571
|
const rootAchildren = rootA.children;
|
|
50588
50572
|
const rootBchildren = rootB.children;
|
|
50589
|
-
const childBKeys = keys$
|
|
50573
|
+
const childBKeys = keys$2$1(rootBchildren);
|
|
50590
50574
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
50591
50575
|
const childBKey = childBKeys[i];
|
|
50592
50576
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -50741,8 +50725,8 @@
|
|
|
50741
50725
|
}
|
|
50742
50726
|
const childrenA = a.children;
|
|
50743
50727
|
const childrenB = b.children;
|
|
50744
|
-
const childKeysA = keys$
|
|
50745
|
-
const childKeysB = keys$
|
|
50728
|
+
const childKeysA = keys$2$1(childrenA);
|
|
50729
|
+
const childKeysB = keys$2$1(childrenB);
|
|
50746
50730
|
const childKeysBLength = childKeysB.length;
|
|
50747
50731
|
if (childKeysBLength > childKeysA.length) {
|
|
50748
50732
|
return false;
|
|
@@ -50796,9 +50780,9 @@
|
|
|
50796
50780
|
return false;
|
|
50797
50781
|
}
|
|
50798
50782
|
}
|
|
50799
|
-
const headersKeys = keys$
|
|
50783
|
+
const headersKeys = keys$2$1(headers);
|
|
50800
50784
|
const headersKeyLength = headersKeys.length;
|
|
50801
|
-
if (headersKeyLength !== keys$
|
|
50785
|
+
if (headersKeyLength !== keys$2$1(existingHeaders).length) {
|
|
50802
50786
|
return false;
|
|
50803
50787
|
}
|
|
50804
50788
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -51431,7 +51415,7 @@
|
|
|
51431
51415
|
|
|
51432
51416
|
// iterate through the map to build configs for network calls
|
|
51433
51417
|
function resolveConflict(luvio, map) {
|
|
51434
|
-
const ids = keys$
|
|
51418
|
+
const ids = keys$2$1(map.conflicts);
|
|
51435
51419
|
if (ids.length === 0) {
|
|
51436
51420
|
return;
|
|
51437
51421
|
}
|
|
@@ -52573,18 +52557,18 @@
|
|
|
52573
52557
|
return {
|
|
52574
52558
|
getRecordSelectionFieldSets() {
|
|
52575
52559
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
52576
|
-
const fields = keys$
|
|
52560
|
+
const fields = keys$2$1(defaultFields_);
|
|
52577
52561
|
for (let i = 0; i < fields.length; ++i) {
|
|
52578
52562
|
const field = fields[i];
|
|
52579
52563
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
52580
52564
|
optionalPlusDefaultFields[field] = true;
|
|
52581
52565
|
}
|
|
52582
52566
|
}
|
|
52583
|
-
return [keys$
|
|
52567
|
+
return [keys$2$1(fields_).sort(), keys$2$1(optionalPlusDefaultFields).sort()];
|
|
52584
52568
|
},
|
|
52585
52569
|
processRecords(records) {
|
|
52586
52570
|
const { missingFields } = defaultServerFieldStatus;
|
|
52587
|
-
const fields = keys$
|
|
52571
|
+
const fields = keys$2$1(missingFields);
|
|
52588
52572
|
for (let i = 0; i < fields.length; ++i) {
|
|
52589
52573
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
52590
52574
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -54928,7 +54912,7 @@
|
|
|
54928
54912
|
const lookupFields = {};
|
|
54929
54913
|
const { apiName, fields: recordFields } = record;
|
|
54930
54914
|
const { fields: objectInfoFields } = objectInfo;
|
|
54931
|
-
const objectInfoFieldNames = keys$
|
|
54915
|
+
const objectInfoFieldNames = keys$2$1(objectInfoFields);
|
|
54932
54916
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
54933
54917
|
const fieldName = objectInfoFieldNames[i];
|
|
54934
54918
|
const field = objectInfoFields[fieldName];
|
|
@@ -54947,12 +54931,12 @@
|
|
|
54947
54931
|
const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
|
|
54948
54932
|
lookupFields[nameField] = true;
|
|
54949
54933
|
}
|
|
54950
|
-
return keys$
|
|
54934
|
+
return keys$2$1(lookupFields);
|
|
54951
54935
|
}
|
|
54952
54936
|
function getRecordUiMissingRecordLookupFields(recordUi) {
|
|
54953
54937
|
const { records, objectInfos } = recordUi;
|
|
54954
54938
|
const recordLookupFields = {};
|
|
54955
|
-
const recordIds = keys$
|
|
54939
|
+
const recordIds = keys$2$1(records);
|
|
54956
54940
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
54957
54941
|
const recordId = recordIds[i];
|
|
54958
54942
|
const recordData = records[recordId];
|
|
@@ -54990,19 +54974,19 @@
|
|
|
54990
54974
|
}
|
|
54991
54975
|
function eachLayout(recordUi, cb) {
|
|
54992
54976
|
const { layouts } = recordUi;
|
|
54993
|
-
const layoutApiNames = keys$
|
|
54977
|
+
const layoutApiNames = keys$2$1(layouts);
|
|
54994
54978
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
54995
54979
|
const apiName = layoutApiNames[a];
|
|
54996
54980
|
const apiNameData = layouts[apiName];
|
|
54997
|
-
const recordTypeIds = keys$
|
|
54981
|
+
const recordTypeIds = keys$2$1(apiNameData);
|
|
54998
54982
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
54999
54983
|
const recordTypeId = recordTypeIds[b];
|
|
55000
54984
|
const recordTypeData = apiNameData[recordTypeId];
|
|
55001
|
-
const layoutTypes = keys$
|
|
54985
|
+
const layoutTypes = keys$2$1(recordTypeData);
|
|
55002
54986
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
55003
54987
|
const layoutType = layoutTypes[c];
|
|
55004
54988
|
const layoutTypeData = recordTypeData[layoutType];
|
|
55005
|
-
const modes = keys$
|
|
54989
|
+
const modes = keys$2$1(layoutTypeData);
|
|
55006
54990
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
55007
54991
|
const mode = modes[d];
|
|
55008
54992
|
const layout = layoutTypeData[mode];
|
|
@@ -55208,14 +55192,14 @@
|
|
|
55208
55192
|
function publishDependencies(luvio, recordIds, depKeys) {
|
|
55209
55193
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
55210
55194
|
const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
|
|
55211
|
-
const dependencies = create$
|
|
55195
|
+
const dependencies = create$2$1(null);
|
|
55212
55196
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
55213
55197
|
dependencies[depKeys[j]] = true;
|
|
55214
55198
|
}
|
|
55215
55199
|
const node = luvio.getNode(recordDepKey);
|
|
55216
55200
|
if (isGraphNode(node)) {
|
|
55217
55201
|
const recordDeps = node.retrieve();
|
|
55218
|
-
assign$
|
|
55202
|
+
assign$2(dependencies, recordDeps);
|
|
55219
55203
|
}
|
|
55220
55204
|
luvio.storePublish(recordDepKey, dependencies);
|
|
55221
55205
|
}
|
|
@@ -55401,11 +55385,11 @@
|
|
|
55401
55385
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
55402
55386
|
let fields = [];
|
|
55403
55387
|
let optionalFields = [];
|
|
55404
|
-
const layoutTypes = keys$
|
|
55388
|
+
const layoutTypes = keys$2$1(layoutMap);
|
|
55405
55389
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
55406
55390
|
const layoutType = layoutTypes[i];
|
|
55407
55391
|
const modesMap = layoutMap[layoutType];
|
|
55408
|
-
const modes = keys$
|
|
55392
|
+
const modes = keys$2$1(modesMap);
|
|
55409
55393
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
55410
55394
|
const mode = modes[m];
|
|
55411
55395
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
@@ -55441,7 +55425,7 @@
|
|
|
55441
55425
|
return getRecord(luvio, refresh, recordId, [], implicitFields);
|
|
55442
55426
|
}
|
|
55443
55427
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
55444
|
-
const fields = keys$
|
|
55428
|
+
const fields = keys$2$1(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
55445
55429
|
// W-12697744
|
|
55446
55430
|
// Set the implicit fields received from the server in adapter context
|
|
55447
55431
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -55687,7 +55671,7 @@
|
|
|
55687
55671
|
}
|
|
55688
55672
|
const { layoutType, mode, snapshot } = container;
|
|
55689
55673
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
55690
|
-
wrapper.layoutMap = assign$
|
|
55674
|
+
wrapper.layoutMap = assign$2({}, wrapper.layoutMap, {
|
|
55691
55675
|
[layoutType]: {},
|
|
55692
55676
|
});
|
|
55693
55677
|
}
|
|
@@ -56224,7 +56208,7 @@
|
|
|
56224
56208
|
}
|
|
56225
56209
|
}
|
|
56226
56210
|
if (records.length > 0) {
|
|
56227
|
-
assign$
|
|
56211
|
+
assign$2(config, { records });
|
|
56228
56212
|
}
|
|
56229
56213
|
}
|
|
56230
56214
|
return config;
|
|
@@ -65902,9 +65886,7 @@
|
|
|
65902
65886
|
: new Map();
|
|
65903
65887
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65904
65888
|
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65905
|
-
if (
|
|
65906
|
-
recordTypeId &&
|
|
65907
|
-
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65889
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65908
65890
|
const fieldName = 'RecordTypeId';
|
|
65909
65891
|
fieldsBag[fieldName] = {
|
|
65910
65892
|
value: recordTypeId,
|
|
@@ -66240,7 +66222,7 @@
|
|
|
66240
66222
|
*/
|
|
66241
66223
|
|
|
66242
66224
|
|
|
66243
|
-
function isStoreKeyRecordId
|
|
66225
|
+
function isStoreKeyRecordId(key) {
|
|
66244
66226
|
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
66245
66227
|
}
|
|
66246
66228
|
function objectsDeepEqual(lhs, rhs) {
|
|
@@ -78963,7 +78945,7 @@
|
|
|
78963
78945
|
*/
|
|
78964
78946
|
function filterOutReferenceNonScalarFields(record) {
|
|
78965
78947
|
const filteredFields = {};
|
|
78966
|
-
const fieldNames = keys$
|
|
78948
|
+
const fieldNames = keys$2$1(record.fields);
|
|
78967
78949
|
for (const fieldName of fieldNames) {
|
|
78968
78950
|
const field = record.fields[fieldName];
|
|
78969
78951
|
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
@@ -79069,7 +79051,7 @@
|
|
|
79069
79051
|
const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
|
|
79070
79052
|
return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
|
|
79071
79053
|
};
|
|
79072
|
-
return create$
|
|
79054
|
+
return create$2$1(env, {
|
|
79073
79055
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79074
79056
|
});
|
|
79075
79057
|
}
|
|
@@ -79247,7 +79229,7 @@
|
|
|
79247
79229
|
return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
|
|
79248
79230
|
}));
|
|
79249
79231
|
};
|
|
79250
|
-
return create$
|
|
79232
|
+
return create$2$1(env, {
|
|
79251
79233
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79252
79234
|
});
|
|
79253
79235
|
}
|
|
@@ -79257,7 +79239,7 @@
|
|
|
79257
79239
|
const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
|
|
79258
79240
|
return synthesizer(luvio, environment, options);
|
|
79259
79241
|
}, env);
|
|
79260
|
-
return create$
|
|
79242
|
+
return create$2$1(adapterSpecificEnvironments, {});
|
|
79261
79243
|
}
|
|
79262
79244
|
|
|
79263
79245
|
const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
|
|
@@ -79807,7 +79789,7 @@
|
|
|
79807
79789
|
pendingAction.data.method !== 'delete' && //'delete' action does not have fields
|
|
79808
79790
|
objectInfo) {
|
|
79809
79791
|
const appendedFields = this.getBackdatingFields(objectInfo, resolvedRequest.method, pendingAction);
|
|
79810
|
-
if (keys$
|
|
79792
|
+
if (keys$2$1(appendedFields).length > 0) {
|
|
79811
79793
|
pendingAction.data.body = {
|
|
79812
79794
|
...pendingAction.data.body,
|
|
79813
79795
|
fields: {
|
|
@@ -79821,7 +79803,7 @@
|
|
|
79821
79803
|
}
|
|
79822
79804
|
getBackdatingFields(objectInfo, requestMethod, pendingAction) {
|
|
79823
79805
|
const fields = {};
|
|
79824
|
-
const actionFieldNames = keys$
|
|
79806
|
+
const actionFieldNames = keys$2$1(pendingAction.data.body.fields);
|
|
79825
79807
|
if (requestMethod === 'post') {
|
|
79826
79808
|
// `CreateRecord` with `CreatedDate` field
|
|
79827
79809
|
if (isBackdatingFieldEditable(objectInfo, DEFAULT_FIELD_CREATED_DATE$1, 'createable', actionFieldNames)) {
|
|
@@ -79867,7 +79849,7 @@
|
|
|
79867
79849
|
return;
|
|
79868
79850
|
}
|
|
79869
79851
|
const objectInfo = objectInfoMap[apiName];
|
|
79870
|
-
const optionalFields = values$
|
|
79852
|
+
const optionalFields = values$1(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
|
|
79871
79853
|
await getAdapterData(this.getRecordAdapter, {
|
|
79872
79854
|
recordId: referenceFieldInfo.id,
|
|
79873
79855
|
optionalFields,
|
|
@@ -79886,7 +79868,7 @@
|
|
|
79886
79868
|
const referenceToInfos = fieldInfo.referenceToInfos;
|
|
79887
79869
|
const apiNames = referenceToInfos.map((referenceToInfo) => referenceToInfo.apiName);
|
|
79888
79870
|
const objectInfoMap = await this.objectInfoService.getObjectInfos(apiNames);
|
|
79889
|
-
for (const objectInfo of values$
|
|
79871
|
+
for (const objectInfo of values$1(objectInfoMap)) {
|
|
79890
79872
|
const { apiName, keyPrefix } = objectInfo;
|
|
79891
79873
|
if (keyPrefix !== null && id.startsWith(keyPrefix)) {
|
|
79892
79874
|
return apiName;
|
|
@@ -79972,7 +79954,7 @@
|
|
|
79972
79954
|
let resolvedUrlParams = request.urlParams;
|
|
79973
79955
|
if (request.method === 'post' || request.method === 'patch') {
|
|
79974
79956
|
const bodyFields = resolvedBody.fields;
|
|
79975
|
-
const fieldNames = keys$
|
|
79957
|
+
const fieldNames = keys$2$1(bodyFields);
|
|
79976
79958
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
79977
79959
|
const fieldName = fieldNames[i];
|
|
79978
79960
|
const fieldValue = bodyFields[fieldName];
|
|
@@ -80128,7 +80110,7 @@
|
|
|
80128
80110
|
};
|
|
80129
80111
|
}
|
|
80130
80112
|
const referenceFields = [];
|
|
80131
|
-
const fieldNames = keys$
|
|
80113
|
+
const fieldNames = keys$2$1(fields);
|
|
80132
80114
|
const unexpectedFields = [];
|
|
80133
80115
|
for (const field of fieldNames) {
|
|
80134
80116
|
const fieldInfo = objectInfo.fields[field];
|
|
@@ -80190,11 +80172,13 @@
|
|
|
80190
80172
|
|
|
80191
80173
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80192
80174
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80193
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80175
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80194
80176
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80195
80177
|
this.draftRecordService = draftRecordService;
|
|
80196
80178
|
this.isDraftId = isDraftId;
|
|
80197
80179
|
this.sideEffectService = sideEffectService;
|
|
80180
|
+
this.objectInfoService = objectInfoService;
|
|
80181
|
+
this.getRecord = getRecord;
|
|
80198
80182
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80199
80183
|
draftRecordService.registerRecordHandler(this);
|
|
80200
80184
|
}
|
|
@@ -80226,6 +80210,30 @@
|
|
|
80226
80210
|
});
|
|
80227
80211
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80228
80212
|
}
|
|
80213
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80214
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80215
|
+
this.getLuvio();
|
|
80216
|
+
const canonicalId = action.response.body.id;
|
|
80217
|
+
this.buildTagForTargetId(canonicalId);
|
|
80218
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80219
|
+
if (prefix.length !== 3) {
|
|
80220
|
+
// if we can't get a prefix, don't do the rest
|
|
80221
|
+
return;
|
|
80222
|
+
}
|
|
80223
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80224
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80225
|
+
if (!objectInfo) {
|
|
80226
|
+
return;
|
|
80227
|
+
}
|
|
80228
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80229
|
+
}
|
|
80230
|
+
allFields(objectInfo) {
|
|
80231
|
+
let fields = [];
|
|
80232
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80233
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80234
|
+
});
|
|
80235
|
+
return fields;
|
|
80236
|
+
}
|
|
80229
80237
|
mergeRequestBody() {
|
|
80230
80238
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80231
80239
|
}
|
|
@@ -80476,7 +80484,7 @@
|
|
|
80476
80484
|
...trimmedDownData.contentVersion,
|
|
80477
80485
|
fields: cvFields,
|
|
80478
80486
|
};
|
|
80479
|
-
freeze$
|
|
80487
|
+
freeze$2(trimmedDownData);
|
|
80480
80488
|
eventEmitter({ type: 'create-content-document-and-version-draft-finished' });
|
|
80481
80489
|
return {
|
|
80482
80490
|
state: 'Fulfilled',
|
|
@@ -81410,7 +81418,7 @@
|
|
|
81410
81418
|
return predicate;
|
|
81411
81419
|
}
|
|
81412
81420
|
else if (literal !== undefined) {
|
|
81413
|
-
const isAvailableLiteral = values$
|
|
81421
|
+
const isAvailableLiteral = values$1(DateLiteral).includes(literal);
|
|
81414
81422
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81415
81423
|
if (!isAvailableLiteral)
|
|
81416
81424
|
throw new Error(`${literal} is not a valid DateLiteral`);
|
|
@@ -81424,7 +81432,7 @@
|
|
|
81424
81432
|
}
|
|
81425
81433
|
function dateTimeRange(input, op, field, alias) {
|
|
81426
81434
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
81427
|
-
const key = keys$
|
|
81435
|
+
const key = keys$2$1(input)[0];
|
|
81428
81436
|
let operator = op;
|
|
81429
81437
|
if (operator === '=')
|
|
81430
81438
|
operator = 'BETWEEN';
|
|
@@ -81724,7 +81732,7 @@
|
|
|
81724
81732
|
if (!where)
|
|
81725
81733
|
return [];
|
|
81726
81734
|
let predicates = [];
|
|
81727
|
-
const fields = keys$
|
|
81735
|
+
const fields = keys$2$1(where);
|
|
81728
81736
|
for (const field of fields) {
|
|
81729
81737
|
if (field === 'and' || field === 'or') {
|
|
81730
81738
|
predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
|
|
@@ -81777,7 +81785,7 @@
|
|
|
81777
81785
|
}
|
|
81778
81786
|
else {
|
|
81779
81787
|
// @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
|
|
81780
|
-
const entityNames = keys$
|
|
81788
|
+
const entityNames = keys$2$1(where[field]);
|
|
81781
81789
|
const polyPredicatesGroups = entityNames
|
|
81782
81790
|
.filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
|
|
81783
81791
|
.map((entityName) => {
|
|
@@ -81812,7 +81820,7 @@
|
|
|
81812
81820
|
}
|
|
81813
81821
|
else {
|
|
81814
81822
|
//`field` match the filedInfo's apiName
|
|
81815
|
-
for (const [op, value] of entries$
|
|
81823
|
+
for (const [op, value] of entries$2(where[field])) {
|
|
81816
81824
|
const operator = operatorToSql(op);
|
|
81817
81825
|
/**
|
|
81818
81826
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -82323,7 +82331,7 @@
|
|
|
82323
82331
|
for (const join of joins) {
|
|
82324
82332
|
deduped[join.alias + join.to] = join;
|
|
82325
82333
|
}
|
|
82326
|
-
return values$
|
|
82334
|
+
return values$1(deduped);
|
|
82327
82335
|
}
|
|
82328
82336
|
function buildJoins(config) {
|
|
82329
82337
|
let sql = '';
|
|
@@ -82998,7 +83006,7 @@
|
|
|
82998
83006
|
if (typeof json !== 'object') {
|
|
82999
83007
|
return currentLevel;
|
|
83000
83008
|
}
|
|
83001
|
-
const keys = keys$
|
|
83009
|
+
const keys = keys$2$1(json);
|
|
83002
83010
|
if (keys.length === 0)
|
|
83003
83011
|
return 0;
|
|
83004
83012
|
const depths = keys.map((key) => {
|
|
@@ -83011,7 +83019,7 @@
|
|
|
83011
83019
|
return previous.concat(current);
|
|
83012
83020
|
}
|
|
83013
83021
|
function findFieldInfo(objectInfo, fieldName) {
|
|
83014
|
-
return values$
|
|
83022
|
+
return values$1(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
83015
83023
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
83016
83024
|
}
|
|
83017
83025
|
async function readIngestionTimestampForKey(key, query) {
|
|
@@ -83051,14 +83059,14 @@
|
|
|
83051
83059
|
return predicates;
|
|
83052
83060
|
const isSpanning = depth(orderBy) > 2;
|
|
83053
83061
|
if (isSpanning) {
|
|
83054
|
-
const keys = keys$
|
|
83062
|
+
const keys = keys$2$1(orderBy);
|
|
83055
83063
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83056
83064
|
const key = keys[i];
|
|
83057
83065
|
const parentFields = objectInfoMap[recordType].fields;
|
|
83058
|
-
const fieldInfo = values$
|
|
83066
|
+
const fieldInfo = values$1(parentFields).find(findSpanningField(key));
|
|
83059
83067
|
if (fieldInfo && fieldInfo.referenceToInfos.length > 0) {
|
|
83060
83068
|
const { apiName } = fieldInfo.referenceToInfos[0];
|
|
83061
|
-
const parentFieldInfo = values$
|
|
83069
|
+
const parentFieldInfo = values$1(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
|
|
83062
83070
|
if (parentFieldInfo !== undefined) {
|
|
83063
83071
|
const path = {
|
|
83064
83072
|
leftPath: `$.fields.${parentFieldInfo.apiName}.value`,
|
|
@@ -83081,7 +83089,7 @@
|
|
|
83081
83089
|
}
|
|
83082
83090
|
}
|
|
83083
83091
|
else {
|
|
83084
|
-
const keys = keys$
|
|
83092
|
+
const keys = keys$2$1(orderBy);
|
|
83085
83093
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83086
83094
|
const key = keys[i];
|
|
83087
83095
|
if (!objectInfoMap[recordType])
|
|
@@ -84376,7 +84384,7 @@
|
|
|
84376
84384
|
variables,
|
|
84377
84385
|
fragmentMap: {},
|
|
84378
84386
|
});
|
|
84379
|
-
const filteredArgumentNodes = assign$
|
|
84387
|
+
const filteredArgumentNodes = assign$2([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
84380
84388
|
const argumentString = filteredArgumentNodes.length > 0
|
|
84381
84389
|
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
84382
84390
|
: '';
|
|
@@ -84399,7 +84407,7 @@
|
|
|
84399
84407
|
let baseRecord = undefined;
|
|
84400
84408
|
// Concrete types for Polymorphic field
|
|
84401
84409
|
const polyTypes = [];
|
|
84402
|
-
for (const type of values$
|
|
84410
|
+
for (const type of values$1(schema.getTypeMap())) {
|
|
84403
84411
|
if (type.name === 'Record') {
|
|
84404
84412
|
recordInterface = type;
|
|
84405
84413
|
}
|
|
@@ -84412,7 +84420,7 @@
|
|
|
84412
84420
|
if (polyFields.find((fieldTypeName) => fieldTypeName === type.name) !== undefined) {
|
|
84413
84421
|
polyTypes.push(type);
|
|
84414
84422
|
}
|
|
84415
|
-
const fields = values$
|
|
84423
|
+
const fields = values$1(type.getFields());
|
|
84416
84424
|
// initialize the fields of current type with default behavior
|
|
84417
84425
|
for (const field of fields) {
|
|
84418
84426
|
field.resolve = defaultFieldResolver;
|
|
@@ -84791,7 +84799,7 @@
|
|
|
84791
84799
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84792
84800
|
let addedTypedScalars = new Set();
|
|
84793
84801
|
let allPolymorphicFieldTypeNames = new Set();
|
|
84794
|
-
for (const name of keys$
|
|
84802
|
+
for (const name of keys$2$1(objectInfoMap)) {
|
|
84795
84803
|
const objectInfo = objectInfoMap[name];
|
|
84796
84804
|
const { apiName } = objectInfo;
|
|
84797
84805
|
const type = schema.getType(apiName);
|
|
@@ -84860,7 +84868,7 @@
|
|
|
84860
84868
|
const { apiName, childRelationships, fields: fieldsRepresentation } = objectInfo;
|
|
84861
84869
|
typedScalars.add(`${apiName}_Filter`);
|
|
84862
84870
|
typedScalars.add(`${apiName}_OrderBy`);
|
|
84863
|
-
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$
|
|
84871
|
+
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$1(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
|
|
84864
84872
|
// handles child relationship
|
|
84865
84873
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
84866
84874
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
@@ -84918,8 +84926,8 @@
|
|
|
84918
84926
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84919
84927
|
let typedScalars = new Set();
|
|
84920
84928
|
let parentRelationshipFields = new Set();
|
|
84921
|
-
const existingFields = keys$
|
|
84922
|
-
const missingFields = values$
|
|
84929
|
+
const existingFields = keys$2$1(type.getFields());
|
|
84930
|
+
const missingFields = values$1(objectInfo.fields).filter((field) => {
|
|
84923
84931
|
return (existingFields.includes(field.apiName) === false ||
|
|
84924
84932
|
(field.relationshipName !== null && field.referenceToInfos.length > 0));
|
|
84925
84933
|
});
|
|
@@ -85001,7 +85009,7 @@
|
|
|
85001
85009
|
function makeRecordField(fieldRepresentations, objectInfo, objectInfoMap, existingParentRelationships, recordTypeInSchema, existingFields = []) {
|
|
85002
85010
|
const polymorphicFieldTypeNames = new Set();
|
|
85003
85011
|
let fields = ``;
|
|
85004
|
-
for (const field of values$
|
|
85012
|
+
for (const field of values$1(fieldRepresentations)) {
|
|
85005
85013
|
if (!fieldsStaticallyAdded.includes(field.apiName) && recordTypeInSchema === 'Missing') {
|
|
85006
85014
|
fields += `${field.apiName}: ${graphqlTypeForField(field, objectInfo)}\n`;
|
|
85007
85015
|
}
|
|
@@ -85569,7 +85577,7 @@
|
|
|
85569
85577
|
const objectInfo = objectInfos[apiName[0]];
|
|
85570
85578
|
if (!objectInfo)
|
|
85571
85579
|
return false;
|
|
85572
|
-
return values$
|
|
85580
|
+
return values$1(objectInfo.fields).some((fieldInfo) => {
|
|
85573
85581
|
return (fieldInfo.apiName === 'OwnerId' &&
|
|
85574
85582
|
fieldInfo.referenceToInfos.some((referenceToInfo) => {
|
|
85575
85583
|
return referenceToInfo.apiName === 'User';
|
|
@@ -85779,7 +85787,7 @@
|
|
|
85779
85787
|
// eslint-disable-next-line
|
|
85780
85788
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85781
85789
|
}
|
|
85782
|
-
if (keys$
|
|
85790
|
+
if (keys$2$1(objectInfos).length < startNodes.size) {
|
|
85783
85791
|
// eslint-disable-next-line
|
|
85784
85792
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85785
85793
|
}
|
|
@@ -86807,7 +86815,7 @@
|
|
|
86807
86815
|
output.data.uiapi = { ...output.data.uiapi };
|
|
86808
86816
|
output.data.uiapi.query = { ...output.data.uiapi.query };
|
|
86809
86817
|
const outputApiParent = output.data.uiapi.query;
|
|
86810
|
-
const keys = keys$
|
|
86818
|
+
const keys = keys$2$1(nodeJson);
|
|
86811
86819
|
keys.forEach((recordName) => {
|
|
86812
86820
|
const outputApi = {};
|
|
86813
86821
|
// Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
|
|
@@ -86827,7 +86835,7 @@
|
|
|
86827
86835
|
* @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
|
|
86828
86836
|
*/
|
|
86829
86837
|
function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
86830
|
-
const keys = keys$
|
|
86838
|
+
const keys = keys$2$1(jsonInput);
|
|
86831
86839
|
if (selection.selectionSet) {
|
|
86832
86840
|
createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
|
|
86833
86841
|
}
|
|
@@ -86836,7 +86844,7 @@
|
|
|
86836
86844
|
}
|
|
86837
86845
|
}
|
|
86838
86846
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
86839
|
-
const keys = keys$
|
|
86847
|
+
const keys = keys$2$1(jsonInput);
|
|
86840
86848
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
86841
86849
|
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
86842
86850
|
if (keys.includes(fieldName)) {
|
|
@@ -87244,7 +87252,7 @@
|
|
|
87244
87252
|
*/
|
|
87245
87253
|
function findFieldTypeInObjectInfo(objectInfos, fieldType) {
|
|
87246
87254
|
let fieldsWithDataType = [];
|
|
87247
|
-
keys$
|
|
87255
|
+
keys$2$1(objectInfos).filter((recordType) => {
|
|
87248
87256
|
for (const field in objectInfos[recordType].fields) {
|
|
87249
87257
|
if (objectInfos[recordType].fields[field].dataType === fieldType) {
|
|
87250
87258
|
fieldsWithDataType.push(field);
|
|
@@ -87275,7 +87283,7 @@
|
|
|
87275
87283
|
}
|
|
87276
87284
|
else if (typeof object === 'object' && object !== null) {
|
|
87277
87285
|
let source = object;
|
|
87278
|
-
return keys$
|
|
87286
|
+
return keys$2$1(source).reduce((acc, key) => {
|
|
87279
87287
|
acc[key] = replace(source[key]);
|
|
87280
87288
|
return acc;
|
|
87281
87289
|
}, {});
|
|
@@ -87284,7 +87292,7 @@
|
|
|
87284
87292
|
return object;
|
|
87285
87293
|
}
|
|
87286
87294
|
};
|
|
87287
|
-
let newVariables = keys$
|
|
87295
|
+
let newVariables = keys$2$1(variables).reduce((acc, key) => {
|
|
87288
87296
|
acc[key] = replace(variables[key]);
|
|
87289
87297
|
return acc;
|
|
87290
87298
|
}, {});
|
|
@@ -87739,16 +87747,16 @@
|
|
|
87739
87747
|
*/
|
|
87740
87748
|
|
|
87741
87749
|
|
|
87742
|
-
const { keys: keys$
|
|
87750
|
+
const { keys: keys$1$1, create: create$1$1, assign: assign$1$1, entries: entries$1 } = Object;
|
|
87743
87751
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
87744
87752
|
const { push: push$3, join, slice } = Array.prototype;
|
|
87745
87753
|
const { isArray: isArray$4, from } = Array;
|
|
87746
87754
|
|
|
87747
87755
|
function ldsParamsToString(params) {
|
|
87748
|
-
const returnParams = create$
|
|
87749
|
-
const keys$1 = keys$
|
|
87750
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
87751
|
-
const key = keys$1[i];
|
|
87756
|
+
const returnParams = create$1$1(null);
|
|
87757
|
+
const keys$1$1$1 = keys$1$1(params);
|
|
87758
|
+
for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
|
|
87759
|
+
const key = keys$1$1$1[i];
|
|
87752
87760
|
const value = params[key];
|
|
87753
87761
|
if (value === undefined) {
|
|
87754
87762
|
// filter out params that have no value
|
|
@@ -87763,7 +87771,7 @@
|
|
|
87763
87771
|
else {
|
|
87764
87772
|
returnParams[key] = `${value}`;
|
|
87765
87773
|
}
|
|
87766
|
-
if (isObject(value) === true && keys$
|
|
87774
|
+
if (isObject(value) === true && keys$1$1(value).length > 0) {
|
|
87767
87775
|
returnParams[key] = stringify$1(value);
|
|
87768
87776
|
}
|
|
87769
87777
|
}
|
|
@@ -88162,7 +88170,7 @@
|
|
|
88162
88170
|
optionalFields,
|
|
88163
88171
|
};
|
|
88164
88172
|
const queryString = [];
|
|
88165
|
-
for (const [key, value] of entries$
|
|
88173
|
+
for (const [key, value] of entries$1(mergedParams)) {
|
|
88166
88174
|
if (value !== undefined) {
|
|
88167
88175
|
queryString.push(`${key}=${isArray$4(value) ? value.join(',') : value}`);
|
|
88168
88176
|
}
|
|
@@ -88178,7 +88186,7 @@
|
|
|
88178
88186
|
function mergeRecordFields(first, second) {
|
|
88179
88187
|
const { fields: targetFields } = first;
|
|
88180
88188
|
const { fields: sourceFields } = second;
|
|
88181
|
-
const fieldNames = keys$
|
|
88189
|
+
const fieldNames = keys$1$1(sourceFields);
|
|
88182
88190
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
88183
88191
|
const fieldName = fieldNames[i];
|
|
88184
88192
|
const sourceField = sourceFields[fieldName];
|
|
@@ -88338,7 +88346,7 @@
|
|
|
88338
88346
|
const { baseUri, basePath, queryParams } = request;
|
|
88339
88347
|
let url = `${baseUri}${basePath}`;
|
|
88340
88348
|
if (queryParams) {
|
|
88341
|
-
const queryParamString = entries$
|
|
88349
|
+
const queryParamString = entries$1(queryParams)
|
|
88342
88350
|
.map(([key, value]) => `${key}=${value}`)
|
|
88343
88351
|
.join('&');
|
|
88344
88352
|
if (queryParamString) {
|
|
@@ -88769,7 +88777,7 @@
|
|
|
88769
88777
|
logError: false,
|
|
88770
88778
|
});
|
|
88771
88779
|
};
|
|
88772
|
-
const overriddenQueue = create$
|
|
88780
|
+
const overriddenQueue = create$2$1(queue, { mergeActions: { value: mergeActions } });
|
|
88773
88781
|
overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
|
|
88774
88782
|
switch (draftQueueEvent.type) {
|
|
88775
88783
|
case DraftQueueEventType.QueueStateChanged: {
|
|
@@ -88907,7 +88915,7 @@
|
|
|
88907
88915
|
function dataIsObjectInfo(key, data) {
|
|
88908
88916
|
return incomingObjectInfos.has(key);
|
|
88909
88917
|
}
|
|
88910
|
-
return create$
|
|
88918
|
+
return create$2$1(env, {
|
|
88911
88919
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
88912
88920
|
storePublish: { value: storePublish },
|
|
88913
88921
|
});
|
|
@@ -89008,8 +89016,8 @@
|
|
|
89008
89016
|
}
|
|
89009
89017
|
};
|
|
89010
89018
|
// Local in-memory cache for apiName to key prefixes
|
|
89011
|
-
this.apiNameToKeyPrefixMemoryCache = create$
|
|
89012
|
-
this.keyPrefixToApiNameMemoryCache = create$
|
|
89019
|
+
this.apiNameToKeyPrefixMemoryCache = create$2$1(null);
|
|
89020
|
+
this.keyPrefixToApiNameMemoryCache = create$2$1(null);
|
|
89013
89021
|
}
|
|
89014
89022
|
/**
|
|
89015
89023
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -89165,7 +89173,7 @@
|
|
|
89165
89173
|
};
|
|
89166
89174
|
}
|
|
89167
89175
|
|
|
89168
|
-
const { keys: keys$
|
|
89176
|
+
const { keys: keys$6, create: create$5, assign: assign$5, entries, values } = Object;
|
|
89169
89177
|
const { stringify: stringify$5, parse: parse$5 } = JSON;
|
|
89170
89178
|
|
|
89171
89179
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
@@ -89232,7 +89240,7 @@
|
|
|
89232
89240
|
},
|
|
89233
89241
|
conflictColumns: this.conflictColumnNames,
|
|
89234
89242
|
columns: this.columnNames,
|
|
89235
|
-
rows: keys$
|
|
89243
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89236
89244
|
const entry = entries[key];
|
|
89237
89245
|
const { data, metadata } = entry;
|
|
89238
89246
|
const row = [key, stringify$5(data), metadata ? stringify$5(metadata) : null];
|
|
@@ -89251,7 +89259,7 @@
|
|
|
89251
89259
|
type: 'setMetadata',
|
|
89252
89260
|
},
|
|
89253
89261
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89254
|
-
values: keys$
|
|
89262
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89255
89263
|
const { metadata } = entries[key];
|
|
89256
89264
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89257
89265
|
values[key] = row;
|
|
@@ -89341,7 +89349,7 @@
|
|
|
89341
89349
|
},
|
|
89342
89350
|
conflictColumns: this.conflictColumnNames,
|
|
89343
89351
|
columns: this.columnNames,
|
|
89344
|
-
rows: keys$
|
|
89352
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89345
89353
|
const entry = entries[key];
|
|
89346
89354
|
const { data, metadata } = entry;
|
|
89347
89355
|
const row = [key, stringify$5(data)];
|
|
@@ -89367,7 +89375,7 @@
|
|
|
89367
89375
|
type: 'setMetadata',
|
|
89368
89376
|
},
|
|
89369
89377
|
columns: [COLUMN_NAME_METADATA],
|
|
89370
|
-
values: keys$
|
|
89378
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89371
89379
|
const { metadata } = entries[key];
|
|
89372
89380
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89373
89381
|
values[key] = row;
|
|
@@ -89376,7 +89384,7 @@
|
|
|
89376
89384
|
};
|
|
89377
89385
|
}
|
|
89378
89386
|
metadataToUpdateSQLQueries(entries, segment) {
|
|
89379
|
-
return keys$
|
|
89387
|
+
return keys$6(entries).reduce((accu, key) => {
|
|
89380
89388
|
const { metadata } = entries[key];
|
|
89381
89389
|
if (metadata !== undefined) {
|
|
89382
89390
|
accu.push({
|
|
@@ -89450,7 +89458,7 @@
|
|
|
89450
89458
|
.finally(() => tasker.done());
|
|
89451
89459
|
}
|
|
89452
89460
|
setEntries(entries, segment) {
|
|
89453
|
-
if (keys$
|
|
89461
|
+
if (keys$6(entries).length === 0) {
|
|
89454
89462
|
return Promise.resolve();
|
|
89455
89463
|
}
|
|
89456
89464
|
const table = this.getTable(segment);
|
|
@@ -89458,7 +89466,7 @@
|
|
|
89458
89466
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
89459
89467
|
}
|
|
89460
89468
|
setMetadata(entries, segment) {
|
|
89461
|
-
if (keys$
|
|
89469
|
+
if (keys$6(entries).length === 0) {
|
|
89462
89470
|
return Promise.resolve();
|
|
89463
89471
|
}
|
|
89464
89472
|
const table = this.getTable(segment);
|
|
@@ -89468,13 +89476,13 @@
|
|
|
89468
89476
|
batchOperations(operations) {
|
|
89469
89477
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
89470
89478
|
if (cur.type === 'setEntries') {
|
|
89471
|
-
if (keys$
|
|
89479
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89472
89480
|
const table = this.getTable(cur.segment);
|
|
89473
89481
|
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
89474
89482
|
}
|
|
89475
89483
|
}
|
|
89476
89484
|
else if (cur.type === 'setMetadata') {
|
|
89477
|
-
if (keys$
|
|
89485
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89478
89486
|
const table = this.getTable(cur.segment);
|
|
89479
89487
|
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
89480
89488
|
}
|
|
@@ -89597,7 +89605,7 @@
|
|
|
89597
89605
|
},
|
|
89598
89606
|
conflictColumns: this.conflictColumnNames,
|
|
89599
89607
|
columns: this.columnNames,
|
|
89600
|
-
rows: keys$
|
|
89608
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89601
89609
|
const entry = entries[key];
|
|
89602
89610
|
rows.push([key, stringify$5(entry.data)]);
|
|
89603
89611
|
return rows;
|
|
@@ -89765,7 +89773,7 @@
|
|
|
89765
89773
|
}
|
|
89766
89774
|
return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
|
|
89767
89775
|
};
|
|
89768
|
-
return create$
|
|
89776
|
+
return create$2$1(environment, {
|
|
89769
89777
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
89770
89778
|
applyCachePolicy: { value: applyCachePolicy },
|
|
89771
89779
|
setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
|
|
@@ -91186,7 +91194,7 @@
|
|
|
91186
91194
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
91187
91195
|
let deallocatedCount = 0;
|
|
91188
91196
|
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
91189
|
-
const storeKeyLength = keys$
|
|
91197
|
+
const storeKeyLength = keys$2$1(storeRecords).length;
|
|
91190
91198
|
if (storeKeyLength <= maxStoreRecords) {
|
|
91191
91199
|
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
91192
91200
|
}
|
|
@@ -91262,78 +91270,6 @@
|
|
|
91262
91270
|
}
|
|
91263
91271
|
}
|
|
91264
91272
|
|
|
91265
|
-
/**
|
|
91266
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
91267
|
-
* All rights reserved.
|
|
91268
|
-
* For full license text, see the LICENSE.txt file
|
|
91269
|
-
*/
|
|
91270
|
-
|
|
91271
|
-
|
|
91272
|
-
const { keys: keys$7, values, create: create$6, assign: assign$6, freeze: freeze$3, entries } = Object;
|
|
91273
|
-
function isStoreKeyRecordId(key) {
|
|
91274
|
-
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
91275
|
-
}
|
|
91276
|
-
function isEntryDurableRecordRepresentation(entry, key) {
|
|
91277
|
-
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
91278
|
-
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity$1(key)) &&
|
|
91279
|
-
entry.data.__type === undefined);
|
|
91280
|
-
}
|
|
91281
|
-
|
|
91282
|
-
// TODO [W-15983267]: this is here for backwards compatibility from <252 and can be removed in 256
|
|
91283
|
-
// This HOF ensures that missing links that are stored in the "links" property in the durable store get restored to the "fields" property.
|
|
91284
|
-
// this code is necessary for backwards compatibility with records that were stored in the durable store before the "links" property was removed.
|
|
91285
|
-
function makeDurableStoreBackwardsCompatible(durableStore) {
|
|
91286
|
-
const getEntries = function (entries, segment) {
|
|
91287
|
-
// this HOF only inspects records in the default segment
|
|
91288
|
-
if (segment !== DefaultDurableSegment) {
|
|
91289
|
-
return durableStore.getEntries(entries, segment);
|
|
91290
|
-
}
|
|
91291
|
-
const { length: entriesLength } = entries;
|
|
91292
|
-
if (entriesLength === 0) {
|
|
91293
|
-
return Promise.resolve({});
|
|
91294
|
-
}
|
|
91295
|
-
// call base getEntries
|
|
91296
|
-
return durableStore.getEntries(entries, segment).then((durableEntries) => {
|
|
91297
|
-
if (durableEntries === undefined) {
|
|
91298
|
-
return undefined;
|
|
91299
|
-
}
|
|
91300
|
-
const returnEntries = create$6(null);
|
|
91301
|
-
const keys$1 = keys$7(durableEntries);
|
|
91302
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
91303
|
-
const key = keys$1[i];
|
|
91304
|
-
const value = durableEntries[key];
|
|
91305
|
-
if (value === undefined) {
|
|
91306
|
-
continue;
|
|
91307
|
-
}
|
|
91308
|
-
if (isEntryDurableRecordRepresentation(value, key)) {
|
|
91309
|
-
const record = value.data;
|
|
91310
|
-
const { links } = record;
|
|
91311
|
-
if (links !== undefined) {
|
|
91312
|
-
const missingLinks = keys$7(links);
|
|
91313
|
-
for (let j = 0, len = missingLinks.length; j < len; j++) {
|
|
91314
|
-
const fieldName = missingLinks[j];
|
|
91315
|
-
const link = links[fieldName];
|
|
91316
|
-
if (link !== undefined && link.isMissing === true) {
|
|
91317
|
-
record.fields[fieldName] = {
|
|
91318
|
-
__state: { isMissing: true },
|
|
91319
|
-
value: undefined,
|
|
91320
|
-
displayValue: undefined,
|
|
91321
|
-
};
|
|
91322
|
-
}
|
|
91323
|
-
}
|
|
91324
|
-
delete record.links;
|
|
91325
|
-
}
|
|
91326
|
-
}
|
|
91327
|
-
returnEntries[key] = value;
|
|
91328
|
-
}
|
|
91329
|
-
return returnEntries;
|
|
91330
|
-
});
|
|
91331
|
-
};
|
|
91332
|
-
return create$6(durableStore, {
|
|
91333
|
-
getEntries: { value: getEntries, writable: true },
|
|
91334
|
-
});
|
|
91335
|
-
}
|
|
91336
|
-
|
|
91337
91273
|
function select$1$1(luvio, config) {
|
|
91338
91274
|
const { query, variables, operationName } = config;
|
|
91339
91275
|
return select$2$1(luvio, query, variables, operationName);
|
|
@@ -91901,7 +91837,7 @@
|
|
|
91901
91837
|
if (idsToFetch.size > 0) {
|
|
91902
91838
|
const effects = await durableStore.getEntries(Array.from(idsToFetch), SIDE_EFFECT_SEGMENT);
|
|
91903
91839
|
if (effects !== undefined) {
|
|
91904
|
-
keys$
|
|
91840
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91905
91841
|
const effect = effects[effectId].data;
|
|
91906
91842
|
const key = effect.uniqueId;
|
|
91907
91843
|
this.allEffects.set(key, effect);
|
|
@@ -91955,7 +91891,7 @@
|
|
|
91955
91891
|
if (effects === undefined) {
|
|
91956
91892
|
return;
|
|
91957
91893
|
}
|
|
91958
|
-
keys$
|
|
91894
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91959
91895
|
const effect = effects[effectId].data;
|
|
91960
91896
|
const key = effect.uniqueId;
|
|
91961
91897
|
this.allEffects.set(key, effect);
|
|
@@ -92026,7 +91962,7 @@
|
|
|
92026
91962
|
const draftFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92027
91963
|
const timestampString = new Date(timestamp).toISOString();
|
|
92028
91964
|
const systemFields = this.generateSystemFields(timestampString, id);
|
|
92029
|
-
assign$
|
|
91965
|
+
assign$2(draftFields, systemFields);
|
|
92030
91966
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92031
91967
|
this.fillMissingFields(draftFields, objectInfo);
|
|
92032
91968
|
let recordTypeId = this.determineRecordTypeId(fields, objectInfo);
|
|
@@ -92088,7 +92024,7 @@
|
|
|
92088
92024
|
async synthesizeFieldsFromParts(fields, apiName) {
|
|
92089
92025
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92090
92026
|
const recordFields = {};
|
|
92091
|
-
for (const fieldName of keys$
|
|
92027
|
+
for (const fieldName of keys$2$1(fields)) {
|
|
92092
92028
|
const draftField = fields[fieldName] ?? null;
|
|
92093
92029
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92094
92030
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
@@ -92111,7 +92047,7 @@
|
|
|
92111
92047
|
let patchedFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92112
92048
|
if (existingRecord) {
|
|
92113
92049
|
const nameFields = this.getCompoundNameFields(existingRecord, patchedFields, objectInfo);
|
|
92114
|
-
assign$
|
|
92050
|
+
assign$2(patchedFields, nameFields);
|
|
92115
92051
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY_ID, { value: this.userId, displayValue: null }, existingRecord.fields, patchedFields);
|
|
92116
92052
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY, {
|
|
92117
92053
|
value: this.createLink(buildRecordRepKeyFromId$1(this.userId)),
|
|
@@ -92169,7 +92105,7 @@
|
|
|
92169
92105
|
changedNameFields[fieldName] = fieldValue;
|
|
92170
92106
|
}
|
|
92171
92107
|
}
|
|
92172
|
-
if (keys$
|
|
92108
|
+
if (keys$2$1(changedNameFields).length > 0) {
|
|
92173
92109
|
const newNameValue = filteredNameFields
|
|
92174
92110
|
.map((key) => {
|
|
92175
92111
|
if (changedNameFields[key] !== undefined) {
|
|
@@ -92290,7 +92226,7 @@
|
|
|
92290
92226
|
}
|
|
92291
92227
|
const patchedFields = effect.recordPatch.fields;
|
|
92292
92228
|
if (patchedFields) {
|
|
92293
|
-
const fieldNames = keys$
|
|
92229
|
+
const fieldNames = keys$2$1(patchedFields);
|
|
92294
92230
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92295
92231
|
const fieldName = fieldNames[i];
|
|
92296
92232
|
// don't apply server values to draft created records
|
|
@@ -92449,7 +92385,7 @@
|
|
|
92449
92385
|
return undefined;
|
|
92450
92386
|
}
|
|
92451
92387
|
const updatedFields = {};
|
|
92452
|
-
const fieldNames = keys$
|
|
92388
|
+
const fieldNames = keys$2$1(fields);
|
|
92453
92389
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92454
92390
|
const fieldName = fieldNames[i];
|
|
92455
92391
|
const field = fields[fieldName];
|
|
@@ -92489,7 +92425,7 @@
|
|
|
92489
92425
|
|
|
92490
92426
|
function enableSideEffectsOnEnvironment(env, sideEffectStore) {
|
|
92491
92427
|
const storePublish = function (key, data) {
|
|
92492
|
-
if (isStoreKeyRecordId
|
|
92428
|
+
if (isStoreKeyRecordId(key) === false || isStoreRecordError$1(data)) {
|
|
92493
92429
|
return env.storePublish(key, data);
|
|
92494
92430
|
}
|
|
92495
92431
|
const effects = sideEffectStore.getEffects(key);
|
|
@@ -92546,7 +92482,7 @@
|
|
|
92546
92482
|
if (entries === undefined) {
|
|
92547
92483
|
return directory;
|
|
92548
92484
|
}
|
|
92549
|
-
keys$
|
|
92485
|
+
keys$2$1(entries).forEach((key) => {
|
|
92550
92486
|
const { data: record, metadata } = entries[key];
|
|
92551
92487
|
if (isStoreRecordError(record)) {
|
|
92552
92488
|
return;
|
|
@@ -92581,13 +92517,13 @@
|
|
|
92581
92517
|
let lazySideEffectStore;
|
|
92582
92518
|
let lazySideEffectService;
|
|
92583
92519
|
const shouldFlush = (key, value) => {
|
|
92584
|
-
if (!isStoreKeyRecordId
|
|
92520
|
+
if (!isStoreKeyRecordId(key)) {
|
|
92585
92521
|
return { flushValue: true };
|
|
92586
92522
|
}
|
|
92587
92523
|
if (value && typeof value === 'object') {
|
|
92588
92524
|
const fields = value.fields;
|
|
92589
92525
|
if (fields && typeof fields === 'object') {
|
|
92590
|
-
const keys = keys$
|
|
92526
|
+
const keys = keys$2$1(fields);
|
|
92591
92527
|
for (const key of keys) {
|
|
92592
92528
|
const field = fields[key];
|
|
92593
92529
|
if (fields && field.__state && field.__state.pending === true) {
|
|
@@ -92623,7 +92559,7 @@
|
|
|
92623
92559
|
lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
|
|
92624
92560
|
reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
|
|
92625
92561
|
}));
|
|
92626
|
-
lazyDurableStore =
|
|
92562
|
+
lazyDurableStore = getNimbusDurableStore();
|
|
92627
92563
|
lazyDurableRecordStore = new DurableRecordStore(lazyDurableStore, () => lazyLuvio);
|
|
92628
92564
|
// specific adapters
|
|
92629
92565
|
const internalAdapterStore = new InMemoryStore();
|
|
@@ -92646,7 +92582,7 @@
|
|
|
92646
92582
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
92647
92583
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
92648
92584
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
92649
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92585
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
92650
92586
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92651
92587
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
92652
92588
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -92753,7 +92689,7 @@
|
|
|
92753
92689
|
id: '@salesforce/lds-network-adapter',
|
|
92754
92690
|
instrument: instrument$2,
|
|
92755
92691
|
});
|
|
92756
|
-
// version: 1.
|
|
92692
|
+
// version: 1.342.0-651bed9637
|
|
92757
92693
|
|
|
92758
92694
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92759
92695
|
const { stringify, parse } = JSON;
|
|
@@ -115337,7 +115273,7 @@
|
|
|
115337
115273
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115338
115274
|
instrument: instrument$1,
|
|
115339
115275
|
});
|
|
115340
|
-
// version: 1.
|
|
115276
|
+
// version: 1.342.0-f478af8b93
|
|
115341
115277
|
|
|
115342
115278
|
// On core the unstable adapters are re-exported with different names,
|
|
115343
115279
|
// we want to match them here.
|
|
@@ -115489,7 +115425,7 @@
|
|
|
115489
115425
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115490
115426
|
graphQLImperative = ldsAdapter;
|
|
115491
115427
|
});
|
|
115492
|
-
// version: 1.
|
|
115428
|
+
// version: 1.342.0-f478af8b93
|
|
115493
115429
|
|
|
115494
115430
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115495
115431
|
__proto__: null,
|
|
@@ -116281,7 +116217,7 @@
|
|
|
116281
116217
|
function register(r) {
|
|
116282
116218
|
callbacks$1.forEach((callback) => callback(r));
|
|
116283
116219
|
}
|
|
116284
|
-
// version: 1.
|
|
116220
|
+
// version: 1.342.0-651bed9637
|
|
116285
116221
|
|
|
116286
116222
|
/**
|
|
116287
116223
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -117380,4 +117316,4 @@
|
|
|
117380
117316
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
117381
117317
|
|
|
117382
117318
|
}));
|
|
117383
|
-
// version: 1.
|
|
117319
|
+
// version: 1.342.0-651bed9637
|