@salesforce/lds-worker-api 1.341.0 → 1.343.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.343.0-f39f04aaf6
|
|
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.343.0-f39f04aaf6
|
|
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.343.0-823df4356c
|
|
33913
33904
|
|
|
33914
33905
|
/**
|
|
33915
33906
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -45499,6 +45490,15 @@
|
|
|
45499
45490
|
},
|
|
45500
45491
|
};
|
|
45501
45492
|
|
|
45493
|
+
var productConsumedSideEffectsKillSwitch = {
|
|
45494
|
+
isOpen: function (e) {
|
|
45495
|
+
return e.fallback;
|
|
45496
|
+
},
|
|
45497
|
+
hasError: function () {
|
|
45498
|
+
return !0;
|
|
45499
|
+
},
|
|
45500
|
+
};
|
|
45501
|
+
|
|
45502
45502
|
/**
|
|
45503
45503
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
45504
45504
|
* All rights reserved.
|
|
@@ -45516,7 +45516,7 @@
|
|
|
45516
45516
|
const { parse: parse$4, stringify: stringify$4 } = JSON;
|
|
45517
45517
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45518
45518
|
const { isArray: isArray$3$1 } = Array;
|
|
45519
|
-
const { entries: entries$
|
|
45519
|
+
const { entries: entries$3, keys: keys$5 } = Object;
|
|
45520
45520
|
|
|
45521
45521
|
const UI_API_BASE_URI = '/services/data/v64.0/ui-api';
|
|
45522
45522
|
|
|
@@ -45581,7 +45581,7 @@
|
|
|
45581
45581
|
function mergeRecordFields$2(first, second) {
|
|
45582
45582
|
const { fields: targetFields } = first;
|
|
45583
45583
|
const { fields: sourceFields } = second;
|
|
45584
|
-
const fieldNames = keys$
|
|
45584
|
+
const fieldNames = keys$5(sourceFields);
|
|
45585
45585
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
45586
45586
|
const fieldName = fieldNames[i];
|
|
45587
45587
|
const sourceField = sourceFields[fieldName];
|
|
@@ -45823,7 +45823,7 @@
|
|
|
45823
45823
|
if (fulfill === undefined) {
|
|
45824
45824
|
return null;
|
|
45825
45825
|
}
|
|
45826
|
-
const handlersMap = entries$
|
|
45826
|
+
const handlersMap = entries$3(inflightRequests);
|
|
45827
45827
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
45828
45828
|
const [transactionKey, handlers] = handlersMap[i];
|
|
45829
45829
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -45988,7 +45988,7 @@
|
|
|
45988
45988
|
const MessagingDurableSegment = 'MESSAGING';
|
|
45989
45989
|
const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
|
|
45990
45990
|
|
|
45991
|
-
const { keys: keys$
|
|
45991
|
+
const { keys: keys$4, create: create$4, assign: assign$4, freeze: freeze$1$1 } = Object;
|
|
45992
45992
|
|
|
45993
45993
|
//Durable store error instrumentation key
|
|
45994
45994
|
const DURABLE_STORE_ERROR = 'durable-store-error';
|
|
@@ -46035,7 +46035,7 @@
|
|
|
46035
46035
|
if (durableRecords === undefined) {
|
|
46036
46036
|
return { revivedKeys, hadUnexpectedShape };
|
|
46037
46037
|
}
|
|
46038
|
-
const durableKeys = keys$
|
|
46038
|
+
const durableKeys = keys$4(durableRecords);
|
|
46039
46039
|
if (durableKeys.length === 0) {
|
|
46040
46040
|
// no records to revive
|
|
46041
46041
|
return { revivedKeys, hadUnexpectedShape };
|
|
@@ -46220,7 +46220,7 @@
|
|
|
46220
46220
|
overrides,
|
|
46221
46221
|
};
|
|
46222
46222
|
}
|
|
46223
|
-
const keys$1 = keys$
|
|
46223
|
+
const keys$1 = keys$4(entries);
|
|
46224
46224
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
46225
46225
|
const key = keys$1[i];
|
|
46226
46226
|
const entry = entries[key];
|
|
@@ -46242,14 +46242,14 @@
|
|
|
46242
46242
|
}
|
|
46243
46243
|
|
|
46244
46244
|
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
46245
|
-
const durableRecords = create$
|
|
46246
|
-
const refreshedDurableRecords = create$
|
|
46247
|
-
const evictedRecords = create$
|
|
46245
|
+
const durableRecords = create$4(null);
|
|
46246
|
+
const refreshedDurableRecords = create$4(null);
|
|
46247
|
+
const evictedRecords = create$4(null);
|
|
46248
46248
|
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
46249
46249
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
46250
46250
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
46251
46251
|
// on the metadata segment for the refreshedIds
|
|
46252
|
-
const keys$1 = keys$
|
|
46252
|
+
const keys$1 = keys$4({ ...visitedIds, ...refreshedIds });
|
|
46253
46253
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
46254
46254
|
const key = keys$1[i];
|
|
46255
46255
|
const canonicalKey = store.getCanonicalRecordId(key);
|
|
@@ -46281,7 +46281,7 @@
|
|
|
46281
46281
|
}
|
|
46282
46282
|
}
|
|
46283
46283
|
const durableStoreOperations = additionalDurableStoreOperations;
|
|
46284
|
-
const recordKeys = keys$
|
|
46284
|
+
const recordKeys = keys$4(durableRecords);
|
|
46285
46285
|
if (recordKeys.length > 0) {
|
|
46286
46286
|
// publishes with data
|
|
46287
46287
|
durableStoreOperations.push({
|
|
@@ -46290,7 +46290,7 @@
|
|
|
46290
46290
|
segment: DefaultDurableSegment,
|
|
46291
46291
|
});
|
|
46292
46292
|
}
|
|
46293
|
-
const refreshKeys = keys$
|
|
46293
|
+
const refreshKeys = keys$4(refreshedDurableRecords);
|
|
46294
46294
|
if (refreshKeys.length > 0) {
|
|
46295
46295
|
// publishes with only metadata updates
|
|
46296
46296
|
durableStoreOperations.push({
|
|
@@ -46312,7 +46312,7 @@
|
|
|
46312
46312
|
});
|
|
46313
46313
|
});
|
|
46314
46314
|
// evicts
|
|
46315
|
-
const evictedKeys = keys$
|
|
46315
|
+
const evictedKeys = keys$4(evictedRecords);
|
|
46316
46316
|
if (evictedKeys.length > 0) {
|
|
46317
46317
|
durableStoreOperations.push({
|
|
46318
46318
|
type: 'evictEntries',
|
|
@@ -46416,7 +46416,7 @@
|
|
|
46416
46416
|
// A reviving store is only "active" during a call to `environment.storeLookup`, and will
|
|
46417
46417
|
// be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
|
|
46418
46418
|
// the reviving store becomes inactive other than receiving change notifications.
|
|
46419
|
-
return create$
|
|
46419
|
+
return create$4(upstreamStore, {
|
|
46420
46420
|
readEntry: { value: readEntry },
|
|
46421
46421
|
markStale: { value: markStale },
|
|
46422
46422
|
clearStale: { value: clearStale },
|
|
@@ -46428,7 +46428,7 @@
|
|
|
46428
46428
|
const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
|
|
46429
46429
|
async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
|
|
46430
46430
|
// initialize empty context store
|
|
46431
|
-
contextStores[adapterId] = create$
|
|
46431
|
+
contextStores[adapterId] = create$4(null);
|
|
46432
46432
|
const context = {
|
|
46433
46433
|
set(key, value) {
|
|
46434
46434
|
contextStores[adapterId][key] = value;
|
|
@@ -46493,7 +46493,7 @@
|
|
|
46493
46493
|
const revivingStores = new Set();
|
|
46494
46494
|
// redirects that need to be flushed to the durable store
|
|
46495
46495
|
const pendingStoreRedirects = new Map();
|
|
46496
|
-
const contextStores = create$
|
|
46496
|
+
const contextStores = create$4(null);
|
|
46497
46497
|
let initializationPromise = new Promise((resolve) => {
|
|
46498
46498
|
const finish = () => {
|
|
46499
46499
|
resolve();
|
|
@@ -46570,7 +46570,7 @@
|
|
|
46570
46570
|
try {
|
|
46571
46571
|
const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
|
|
46572
46572
|
if (entries !== undefined) {
|
|
46573
|
-
const entryKeys = keys$
|
|
46573
|
+
const entryKeys = keys$4(entries);
|
|
46574
46574
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46575
46575
|
const entryKey = entryKeys[i];
|
|
46576
46576
|
const entry = entries[entryKey];
|
|
@@ -46605,7 +46605,7 @@
|
|
|
46605
46605
|
if (filteredKeys.length > 0) {
|
|
46606
46606
|
const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
|
|
46607
46607
|
if (entries !== undefined) {
|
|
46608
|
-
const entryKeys = keys$
|
|
46608
|
+
const entryKeys = keys$4(entries);
|
|
46609
46609
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46610
46610
|
const entryKey = entryKeys[i];
|
|
46611
46611
|
const { metadata } = entries[entryKey];
|
|
@@ -46977,7 +46977,7 @@
|
|
|
46977
46977
|
validateNotDisposed();
|
|
46978
46978
|
const entryKeys = keys$1.map(serializeStructuredKey);
|
|
46979
46979
|
const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
|
|
46980
|
-
if (entries === undefined || keys$
|
|
46980
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
46981
46981
|
return environment.notifyStoreUpdateAvailable(keys$1);
|
|
46982
46982
|
}
|
|
46983
46983
|
const now = Date.now();
|
|
@@ -47029,7 +47029,7 @@
|
|
|
47029
47029
|
const metadataKeys = keys$1.map(serializeStructuredKey);
|
|
47030
47030
|
const now = Date.now();
|
|
47031
47031
|
const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
|
|
47032
|
-
if (entries === undefined || keys$
|
|
47032
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
47033
47033
|
return environment.expirePossibleStaleRecords(keys$1);
|
|
47034
47034
|
}
|
|
47035
47035
|
let metaDataChanged = false;
|
|
@@ -47055,7 +47055,7 @@
|
|
|
47055
47055
|
type: 'stale-while-revalidate',
|
|
47056
47056
|
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
47057
47057
|
});
|
|
47058
|
-
return create$
|
|
47058
|
+
return create$4(environment, {
|
|
47059
47059
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
47060
47060
|
storeIngest: { value: storeIngest },
|
|
47061
47061
|
storeIngestError: { value: storeIngestError },
|
|
@@ -47291,7 +47291,7 @@
|
|
|
47291
47291
|
QueueOperationType["Update"] = "update";
|
|
47292
47292
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47293
47293
|
|
|
47294
|
-
const { keys: keys$
|
|
47294
|
+
const { keys: keys$3, create: create$3, assign: assign$3, values: values$2 } = Object;
|
|
47295
47295
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
47296
47296
|
const { isArray: isArray$2$1 } = Array;
|
|
47297
47297
|
|
|
@@ -47662,7 +47662,7 @@
|
|
|
47662
47662
|
const queueOperations = handler.getQueueOperationsForCompletingDrafts(queue, action);
|
|
47663
47663
|
// write the queue operations to the store prior to ingesting the result
|
|
47664
47664
|
await this.draftStore.completeAction(queueOperations);
|
|
47665
|
-
await handler.handleActionCompleted(action, queueOperations, values$
|
|
47665
|
+
await handler.handleActionCompleted(action, queueOperations, values$2(this.handlers));
|
|
47666
47666
|
this.retryIntervalMilliseconds = 0;
|
|
47667
47667
|
this.uploadingActionId = undefined;
|
|
47668
47668
|
await this.notifyChangedListeners({
|
|
@@ -47868,7 +47868,7 @@
|
|
|
47868
47868
|
return pendingAction;
|
|
47869
47869
|
}
|
|
47870
47870
|
async setMetadata(actionId, metadata) {
|
|
47871
|
-
const keys$1 = keys$
|
|
47871
|
+
const keys$1 = keys$3(metadata);
|
|
47872
47872
|
const compatibleKeys = keys$1.filter((key) => {
|
|
47873
47873
|
const value = metadata[key];
|
|
47874
47874
|
return typeof key === 'string' && typeof value === 'string';
|
|
@@ -48035,7 +48035,7 @@
|
|
|
48035
48035
|
const waitForOngoingSync = this.syncPromise || Promise.resolve();
|
|
48036
48036
|
return waitForOngoingSync.then(() => {
|
|
48037
48037
|
const { draftStore } = this;
|
|
48038
|
-
const keys$1 = keys$
|
|
48038
|
+
const keys$1 = keys$3(draftStore);
|
|
48039
48039
|
const actionArray = [];
|
|
48040
48040
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48041
48041
|
const key = keys$1[i];
|
|
@@ -48060,7 +48060,7 @@
|
|
|
48060
48060
|
deleteByTag(tag) {
|
|
48061
48061
|
const deleteAction = () => {
|
|
48062
48062
|
const { draftStore } = this;
|
|
48063
|
-
const keys$1 = keys$
|
|
48063
|
+
const keys$1 = keys$3(draftStore);
|
|
48064
48064
|
const durableKeys = [];
|
|
48065
48065
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48066
48066
|
const key = keys$1[i];
|
|
@@ -48112,7 +48112,7 @@
|
|
|
48112
48112
|
return this.enqueueAction(action);
|
|
48113
48113
|
}
|
|
48114
48114
|
getCount() {
|
|
48115
|
-
return keys$
|
|
48115
|
+
return keys$3(this.draftStore).length;
|
|
48116
48116
|
}
|
|
48117
48117
|
/**
|
|
48118
48118
|
* Runs a write operation against the draft store, if the initial
|
|
@@ -48153,7 +48153,7 @@
|
|
|
48153
48153
|
return this.runQueuedOperations();
|
|
48154
48154
|
}
|
|
48155
48155
|
const { draftStore } = this;
|
|
48156
|
-
const keys$1 = keys$
|
|
48156
|
+
const keys$1 = keys$3(durableEntries);
|
|
48157
48157
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48158
48158
|
const entry = durableEntries[keys$1[i]];
|
|
48159
48159
|
const action = entry.data;
|
|
@@ -48211,13 +48211,6 @@
|
|
|
48211
48211
|
DraftQueueOperationType["ItemCompleted"] = "completed";
|
|
48212
48212
|
DraftQueueOperationType["ItemFailed"] = "failed";
|
|
48213
48213
|
DraftQueueOperationType["ItemUpdated"] = "updated";
|
|
48214
|
-
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
48215
|
-
* Planned to be removed in 256 (W-16217436) */
|
|
48216
|
-
DraftQueueOperationType["QueueStarted"] = "started";
|
|
48217
|
-
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
48218
|
-
* Planned to be removed in 256 (W-16217436) */
|
|
48219
|
-
DraftQueueOperationType["QueueStopped"] = "stopped";
|
|
48220
|
-
/** @since 252 */
|
|
48221
48214
|
DraftQueueOperationType["QueueStateChanged"] = "queueStateChanged";
|
|
48222
48215
|
})(DraftQueueOperationType || (DraftQueueOperationType = {}));
|
|
48223
48216
|
/**
|
|
@@ -48262,13 +48255,6 @@
|
|
|
48262
48255
|
}
|
|
48263
48256
|
class DraftManager {
|
|
48264
48257
|
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
48258
|
return this.draftEventsShouldBeEmitted.includes(event.type);
|
|
48273
48259
|
}
|
|
48274
48260
|
constructor(draftQueue) {
|
|
@@ -48308,16 +48294,6 @@
|
|
|
48308
48294
|
throw Error('Unsupported event type');
|
|
48309
48295
|
}
|
|
48310
48296
|
}
|
|
48311
|
-
draftQueueStateToOperationType(state) {
|
|
48312
|
-
switch (state) {
|
|
48313
|
-
case DraftQueueState.Started:
|
|
48314
|
-
return DraftQueueOperationType.QueueStarted;
|
|
48315
|
-
case DraftQueueState.Stopped:
|
|
48316
|
-
return DraftQueueOperationType.QueueStopped;
|
|
48317
|
-
default:
|
|
48318
|
-
throw Error('Unsupported event type');
|
|
48319
|
-
}
|
|
48320
|
-
}
|
|
48321
48297
|
/**
|
|
48322
48298
|
* Enqueue a custom action on the DraftQueue for a handler
|
|
48323
48299
|
* @param handler the handler's id
|
|
@@ -48379,8 +48355,7 @@
|
|
|
48379
48355
|
*
|
|
48380
48356
|
* @param listener The listener closure to subscribe to changes
|
|
48381
48357
|
*/
|
|
48382
|
-
registerDraftQueueChangedListener(listener,
|
|
48383
|
-
this.listenerVersion = version;
|
|
48358
|
+
registerDraftQueueChangedListener(listener, _version = undefined) {
|
|
48384
48359
|
this.listeners.push(listener);
|
|
48385
48360
|
return () => {
|
|
48386
48361
|
this.listeners = this.listeners.filter((l) => {
|
|
@@ -48426,7 +48401,7 @@
|
|
|
48426
48401
|
return this.buildDraftQueueItem(action);
|
|
48427
48402
|
}
|
|
48428
48403
|
isValidFieldMap(fields) {
|
|
48429
|
-
const keys$1 = keys$
|
|
48404
|
+
const keys$1 = keys$3(fields);
|
|
48430
48405
|
const validTypes = ['string', 'number', 'boolean'];
|
|
48431
48406
|
for (let i = 0; i < keys$1.length; i++) {
|
|
48432
48407
|
const key = keys$1[i];
|
|
@@ -48496,12 +48471,7 @@
|
|
|
48496
48471
|
const managerState = await this.getQueue();
|
|
48497
48472
|
let operationType, item;
|
|
48498
48473
|
if (isDraftQueueStateChangeEvent(event)) {
|
|
48499
|
-
|
|
48500
|
-
operationType = this.draftQueueStateToOperationType(event.state);
|
|
48501
|
-
}
|
|
48502
|
-
else {
|
|
48503
|
-
operationType = DraftQueueOperationType.QueueStateChanged;
|
|
48504
|
-
}
|
|
48474
|
+
operationType = DraftQueueOperationType.QueueStateChanged;
|
|
48505
48475
|
}
|
|
48506
48476
|
else {
|
|
48507
48477
|
const { action, type } = event;
|
|
@@ -48699,7 +48669,7 @@
|
|
|
48699
48669
|
}
|
|
48700
48670
|
const keyPrefix$2 = 'UiApi';
|
|
48701
48671
|
|
|
48702
|
-
const { assign: assign$
|
|
48672
|
+
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
48673
|
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
48704
48674
|
const { split, endsWith } = String.prototype;
|
|
48705
48675
|
const { from: from$1, isArray: isArray$1$1 } = Array;
|
|
@@ -48728,7 +48698,7 @@
|
|
|
48728
48698
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
48729
48699
|
result[value[i]] = true;
|
|
48730
48700
|
}
|
|
48731
|
-
return keys$
|
|
48701
|
+
return keys$2$1(result);
|
|
48732
48702
|
}
|
|
48733
48703
|
/**
|
|
48734
48704
|
* @param source The array of string to filter
|
|
@@ -49498,14 +49468,14 @@
|
|
|
49498
49468
|
mergeable: true,
|
|
49499
49469
|
});
|
|
49500
49470
|
const input_childRelationships = input.childRelationships;
|
|
49501
|
-
const input_childRelationships_keys = keys$
|
|
49471
|
+
const input_childRelationships_keys = keys$2$1(input_childRelationships);
|
|
49502
49472
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
49503
49473
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
49504
49474
|
const key = input_childRelationships_keys[i];
|
|
49505
49475
|
getTypeCacheKeys$1t(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
49506
49476
|
}
|
|
49507
49477
|
const input_fields = input.fields;
|
|
49508
|
-
const field_values = keys$
|
|
49478
|
+
const field_values = keys$2$1(input_fields);
|
|
49509
49479
|
const input_fields_length = field_values.length;
|
|
49510
49480
|
for (let i = 0; i < input_fields_length; i++) {
|
|
49511
49481
|
const field_value = input_fields[field_values[i]];
|
|
@@ -49795,7 +49765,7 @@
|
|
|
49795
49765
|
function createPathSelection(propertyName, fieldDefinition) {
|
|
49796
49766
|
const fieldsSelection = [];
|
|
49797
49767
|
const { children } = fieldDefinition;
|
|
49798
|
-
const childrenKeys = keys$
|
|
49768
|
+
const childrenKeys = keys$2$1(children);
|
|
49799
49769
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
49800
49770
|
const childKey = childrenKeys[i];
|
|
49801
49771
|
const childFieldDefinition = children[childKey];
|
|
@@ -49846,7 +49816,7 @@
|
|
|
49846
49816
|
*/
|
|
49847
49817
|
function createPathSelectionFromValue(fields) {
|
|
49848
49818
|
const fieldsSelections = [];
|
|
49849
|
-
const fieldNames = keys$
|
|
49819
|
+
const fieldNames = keys$2$1(fields);
|
|
49850
49820
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49851
49821
|
const fieldName = fieldNames[i];
|
|
49852
49822
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -49891,7 +49861,7 @@
|
|
|
49891
49861
|
}
|
|
49892
49862
|
function extractRecordFieldsRecursively(record) {
|
|
49893
49863
|
const fields = [];
|
|
49894
|
-
const fieldNames = keys$
|
|
49864
|
+
const fieldNames = keys$2$1(record.fields);
|
|
49895
49865
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49896
49866
|
const fieldName = fieldNames[i];
|
|
49897
49867
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -50152,7 +50122,7 @@
|
|
|
50152
50122
|
// RecordRepresentationNormalized['fields'] to include `pending:true` property
|
|
50153
50123
|
const mergedFields = { ...newRecord.fields };
|
|
50154
50124
|
const merged = { ...newRecord, fields: mergedFields };
|
|
50155
|
-
const existingFields = keys$
|
|
50125
|
+
const existingFields = keys$2$1(oldRecord.fields);
|
|
50156
50126
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
50157
50127
|
const spanningFieldName = existingFields[i];
|
|
50158
50128
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -50269,7 +50239,7 @@
|
|
|
50269
50239
|
if (isGraphNode(node)) {
|
|
50270
50240
|
const dependencies = node.retrieve();
|
|
50271
50241
|
if (dependencies !== null) {
|
|
50272
|
-
const depKeys = keys$
|
|
50242
|
+
const depKeys = keys$2$1(dependencies);
|
|
50273
50243
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
50274
50244
|
luvio.storeEvict(depKeys[i]);
|
|
50275
50245
|
}
|
|
@@ -50421,7 +50391,7 @@
|
|
|
50421
50391
|
}
|
|
50422
50392
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
50423
50393
|
const subtrie = fieldSubtries[i];
|
|
50424
|
-
const fieldNames = keys$
|
|
50394
|
+
const fieldNames = keys$2$1(subtrie.children);
|
|
50425
50395
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
50426
50396
|
const fieldName = fieldNames[i];
|
|
50427
50397
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -50543,13 +50513,13 @@
|
|
|
50543
50513
|
return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
|
|
50544
50514
|
}
|
|
50545
50515
|
function convertTrieToFields(root) {
|
|
50546
|
-
if (keys$
|
|
50516
|
+
if (keys$2$1(root.children).length === 0) {
|
|
50547
50517
|
return [];
|
|
50548
50518
|
}
|
|
50549
50519
|
return convertTrieToFieldsRecursively(root);
|
|
50550
50520
|
}
|
|
50551
50521
|
function convertTrieToFieldsRecursively(root) {
|
|
50552
|
-
const childKeys = keys$
|
|
50522
|
+
const childKeys = keys$2$1(root.children);
|
|
50553
50523
|
if (childKeys.length === 0) {
|
|
50554
50524
|
if (root.name === '') {
|
|
50555
50525
|
return [];
|
|
@@ -50558,7 +50528,7 @@
|
|
|
50558
50528
|
}
|
|
50559
50529
|
return reduce$2.call(childKeys, (acc, cur) => concat$2.call(acc, convertTrieToFieldsRecursively(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
50560
50530
|
}
|
|
50561
|
-
const BLANK_RECORD_FIELDS_TRIE = freeze$
|
|
50531
|
+
const BLANK_RECORD_FIELDS_TRIE = freeze$2({
|
|
50562
50532
|
name: '',
|
|
50563
50533
|
children: {},
|
|
50564
50534
|
});
|
|
@@ -50586,7 +50556,7 @@
|
|
|
50586
50556
|
function mergeFieldsTries(rootA, rootB) {
|
|
50587
50557
|
const rootAchildren = rootA.children;
|
|
50588
50558
|
const rootBchildren = rootB.children;
|
|
50589
|
-
const childBKeys = keys$
|
|
50559
|
+
const childBKeys = keys$2$1(rootBchildren);
|
|
50590
50560
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
50591
50561
|
const childBKey = childBKeys[i];
|
|
50592
50562
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -50741,8 +50711,8 @@
|
|
|
50741
50711
|
}
|
|
50742
50712
|
const childrenA = a.children;
|
|
50743
50713
|
const childrenB = b.children;
|
|
50744
|
-
const childKeysA = keys$
|
|
50745
|
-
const childKeysB = keys$
|
|
50714
|
+
const childKeysA = keys$2$1(childrenA);
|
|
50715
|
+
const childKeysB = keys$2$1(childrenB);
|
|
50746
50716
|
const childKeysBLength = childKeysB.length;
|
|
50747
50717
|
if (childKeysBLength > childKeysA.length) {
|
|
50748
50718
|
return false;
|
|
@@ -50796,9 +50766,9 @@
|
|
|
50796
50766
|
return false;
|
|
50797
50767
|
}
|
|
50798
50768
|
}
|
|
50799
|
-
const headersKeys = keys$
|
|
50769
|
+
const headersKeys = keys$2$1(headers);
|
|
50800
50770
|
const headersKeyLength = headersKeys.length;
|
|
50801
|
-
if (headersKeyLength !== keys$
|
|
50771
|
+
if (headersKeyLength !== keys$2$1(existingHeaders).length) {
|
|
50802
50772
|
return false;
|
|
50803
50773
|
}
|
|
50804
50774
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -51431,7 +51401,7 @@
|
|
|
51431
51401
|
|
|
51432
51402
|
// iterate through the map to build configs for network calls
|
|
51433
51403
|
function resolveConflict(luvio, map) {
|
|
51434
|
-
const ids = keys$
|
|
51404
|
+
const ids = keys$2$1(map.conflicts);
|
|
51435
51405
|
if (ids.length === 0) {
|
|
51436
51406
|
return;
|
|
51437
51407
|
}
|
|
@@ -52573,18 +52543,18 @@
|
|
|
52573
52543
|
return {
|
|
52574
52544
|
getRecordSelectionFieldSets() {
|
|
52575
52545
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
52576
|
-
const fields = keys$
|
|
52546
|
+
const fields = keys$2$1(defaultFields_);
|
|
52577
52547
|
for (let i = 0; i < fields.length; ++i) {
|
|
52578
52548
|
const field = fields[i];
|
|
52579
52549
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
52580
52550
|
optionalPlusDefaultFields[field] = true;
|
|
52581
52551
|
}
|
|
52582
52552
|
}
|
|
52583
|
-
return [keys$
|
|
52553
|
+
return [keys$2$1(fields_).sort(), keys$2$1(optionalPlusDefaultFields).sort()];
|
|
52584
52554
|
},
|
|
52585
52555
|
processRecords(records) {
|
|
52586
52556
|
const { missingFields } = defaultServerFieldStatus;
|
|
52587
|
-
const fields = keys$
|
|
52557
|
+
const fields = keys$2$1(missingFields);
|
|
52588
52558
|
for (let i = 0; i < fields.length; ++i) {
|
|
52589
52559
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
52590
52560
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -54928,7 +54898,7 @@
|
|
|
54928
54898
|
const lookupFields = {};
|
|
54929
54899
|
const { apiName, fields: recordFields } = record;
|
|
54930
54900
|
const { fields: objectInfoFields } = objectInfo;
|
|
54931
|
-
const objectInfoFieldNames = keys$
|
|
54901
|
+
const objectInfoFieldNames = keys$2$1(objectInfoFields);
|
|
54932
54902
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
54933
54903
|
const fieldName = objectInfoFieldNames[i];
|
|
54934
54904
|
const field = objectInfoFields[fieldName];
|
|
@@ -54947,12 +54917,12 @@
|
|
|
54947
54917
|
const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
|
|
54948
54918
|
lookupFields[nameField] = true;
|
|
54949
54919
|
}
|
|
54950
|
-
return keys$
|
|
54920
|
+
return keys$2$1(lookupFields);
|
|
54951
54921
|
}
|
|
54952
54922
|
function getRecordUiMissingRecordLookupFields(recordUi) {
|
|
54953
54923
|
const { records, objectInfos } = recordUi;
|
|
54954
54924
|
const recordLookupFields = {};
|
|
54955
|
-
const recordIds = keys$
|
|
54925
|
+
const recordIds = keys$2$1(records);
|
|
54956
54926
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
54957
54927
|
const recordId = recordIds[i];
|
|
54958
54928
|
const recordData = records[recordId];
|
|
@@ -54990,19 +54960,19 @@
|
|
|
54990
54960
|
}
|
|
54991
54961
|
function eachLayout(recordUi, cb) {
|
|
54992
54962
|
const { layouts } = recordUi;
|
|
54993
|
-
const layoutApiNames = keys$
|
|
54963
|
+
const layoutApiNames = keys$2$1(layouts);
|
|
54994
54964
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
54995
54965
|
const apiName = layoutApiNames[a];
|
|
54996
54966
|
const apiNameData = layouts[apiName];
|
|
54997
|
-
const recordTypeIds = keys$
|
|
54967
|
+
const recordTypeIds = keys$2$1(apiNameData);
|
|
54998
54968
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
54999
54969
|
const recordTypeId = recordTypeIds[b];
|
|
55000
54970
|
const recordTypeData = apiNameData[recordTypeId];
|
|
55001
|
-
const layoutTypes = keys$
|
|
54971
|
+
const layoutTypes = keys$2$1(recordTypeData);
|
|
55002
54972
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
55003
54973
|
const layoutType = layoutTypes[c];
|
|
55004
54974
|
const layoutTypeData = recordTypeData[layoutType];
|
|
55005
|
-
const modes = keys$
|
|
54975
|
+
const modes = keys$2$1(layoutTypeData);
|
|
55006
54976
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
55007
54977
|
const mode = modes[d];
|
|
55008
54978
|
const layout = layoutTypeData[mode];
|
|
@@ -55208,14 +55178,14 @@
|
|
|
55208
55178
|
function publishDependencies(luvio, recordIds, depKeys) {
|
|
55209
55179
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
55210
55180
|
const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
|
|
55211
|
-
const dependencies = create$
|
|
55181
|
+
const dependencies = create$2$1(null);
|
|
55212
55182
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
55213
55183
|
dependencies[depKeys[j]] = true;
|
|
55214
55184
|
}
|
|
55215
55185
|
const node = luvio.getNode(recordDepKey);
|
|
55216
55186
|
if (isGraphNode(node)) {
|
|
55217
55187
|
const recordDeps = node.retrieve();
|
|
55218
|
-
assign$
|
|
55188
|
+
assign$2(dependencies, recordDeps);
|
|
55219
55189
|
}
|
|
55220
55190
|
luvio.storePublish(recordDepKey, dependencies);
|
|
55221
55191
|
}
|
|
@@ -55401,11 +55371,11 @@
|
|
|
55401
55371
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
55402
55372
|
let fields = [];
|
|
55403
55373
|
let optionalFields = [];
|
|
55404
|
-
const layoutTypes = keys$
|
|
55374
|
+
const layoutTypes = keys$2$1(layoutMap);
|
|
55405
55375
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
55406
55376
|
const layoutType = layoutTypes[i];
|
|
55407
55377
|
const modesMap = layoutMap[layoutType];
|
|
55408
|
-
const modes = keys$
|
|
55378
|
+
const modes = keys$2$1(modesMap);
|
|
55409
55379
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
55410
55380
|
const mode = modes[m];
|
|
55411
55381
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
@@ -55441,7 +55411,7 @@
|
|
|
55441
55411
|
return getRecord(luvio, refresh, recordId, [], implicitFields);
|
|
55442
55412
|
}
|
|
55443
55413
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
55444
|
-
const fields = keys$
|
|
55414
|
+
const fields = keys$2$1(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
55445
55415
|
// W-12697744
|
|
55446
55416
|
// Set the implicit fields received from the server in adapter context
|
|
55447
55417
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -55687,7 +55657,7 @@
|
|
|
55687
55657
|
}
|
|
55688
55658
|
const { layoutType, mode, snapshot } = container;
|
|
55689
55659
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
55690
|
-
wrapper.layoutMap = assign$
|
|
55660
|
+
wrapper.layoutMap = assign$2({}, wrapper.layoutMap, {
|
|
55691
55661
|
[layoutType]: {},
|
|
55692
55662
|
});
|
|
55693
55663
|
}
|
|
@@ -56224,7 +56194,7 @@
|
|
|
56224
56194
|
}
|
|
56225
56195
|
}
|
|
56226
56196
|
if (records.length > 0) {
|
|
56227
|
-
assign$
|
|
56197
|
+
assign$2(config, { records });
|
|
56228
56198
|
}
|
|
56229
56199
|
}
|
|
56230
56200
|
return config;
|
|
@@ -65902,9 +65872,7 @@
|
|
|
65902
65872
|
: new Map();
|
|
65903
65873
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65904
65874
|
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65905
|
-
if (
|
|
65906
|
-
recordTypeId &&
|
|
65907
|
-
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65875
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65908
65876
|
const fieldName = 'RecordTypeId';
|
|
65909
65877
|
fieldsBag[fieldName] = {
|
|
65910
65878
|
value: recordTypeId,
|
|
@@ -66240,7 +66208,7 @@
|
|
|
66240
66208
|
*/
|
|
66241
66209
|
|
|
66242
66210
|
|
|
66243
|
-
function isStoreKeyRecordId
|
|
66211
|
+
function isStoreKeyRecordId(key) {
|
|
66244
66212
|
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
66245
66213
|
}
|
|
66246
66214
|
function objectsDeepEqual(lhs, rhs) {
|
|
@@ -78963,7 +78931,7 @@
|
|
|
78963
78931
|
*/
|
|
78964
78932
|
function filterOutReferenceNonScalarFields(record) {
|
|
78965
78933
|
const filteredFields = {};
|
|
78966
|
-
const fieldNames = keys$
|
|
78934
|
+
const fieldNames = keys$2$1(record.fields);
|
|
78967
78935
|
for (const fieldName of fieldNames) {
|
|
78968
78936
|
const field = record.fields[fieldName];
|
|
78969
78937
|
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
@@ -79069,7 +79037,7 @@
|
|
|
79069
79037
|
const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
|
|
79070
79038
|
return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
|
|
79071
79039
|
};
|
|
79072
|
-
return create$
|
|
79040
|
+
return create$2$1(env, {
|
|
79073
79041
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79074
79042
|
});
|
|
79075
79043
|
}
|
|
@@ -79247,7 +79215,7 @@
|
|
|
79247
79215
|
return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
|
|
79248
79216
|
}));
|
|
79249
79217
|
};
|
|
79250
|
-
return create$
|
|
79218
|
+
return create$2$1(env, {
|
|
79251
79219
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79252
79220
|
});
|
|
79253
79221
|
}
|
|
@@ -79257,7 +79225,7 @@
|
|
|
79257
79225
|
const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
|
|
79258
79226
|
return synthesizer(luvio, environment, options);
|
|
79259
79227
|
}, env);
|
|
79260
|
-
return create$
|
|
79228
|
+
return create$2$1(adapterSpecificEnvironments, {});
|
|
79261
79229
|
}
|
|
79262
79230
|
|
|
79263
79231
|
const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
|
|
@@ -79807,7 +79775,7 @@
|
|
|
79807
79775
|
pendingAction.data.method !== 'delete' && //'delete' action does not have fields
|
|
79808
79776
|
objectInfo) {
|
|
79809
79777
|
const appendedFields = this.getBackdatingFields(objectInfo, resolvedRequest.method, pendingAction);
|
|
79810
|
-
if (keys$
|
|
79778
|
+
if (keys$2$1(appendedFields).length > 0) {
|
|
79811
79779
|
pendingAction.data.body = {
|
|
79812
79780
|
...pendingAction.data.body,
|
|
79813
79781
|
fields: {
|
|
@@ -79821,7 +79789,7 @@
|
|
|
79821
79789
|
}
|
|
79822
79790
|
getBackdatingFields(objectInfo, requestMethod, pendingAction) {
|
|
79823
79791
|
const fields = {};
|
|
79824
|
-
const actionFieldNames = keys$
|
|
79792
|
+
const actionFieldNames = keys$2$1(pendingAction.data.body.fields);
|
|
79825
79793
|
if (requestMethod === 'post') {
|
|
79826
79794
|
// `CreateRecord` with `CreatedDate` field
|
|
79827
79795
|
if (isBackdatingFieldEditable(objectInfo, DEFAULT_FIELD_CREATED_DATE$1, 'createable', actionFieldNames)) {
|
|
@@ -79867,7 +79835,7 @@
|
|
|
79867
79835
|
return;
|
|
79868
79836
|
}
|
|
79869
79837
|
const objectInfo = objectInfoMap[apiName];
|
|
79870
|
-
const optionalFields = values$
|
|
79838
|
+
const optionalFields = values$1(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
|
|
79871
79839
|
await getAdapterData(this.getRecordAdapter, {
|
|
79872
79840
|
recordId: referenceFieldInfo.id,
|
|
79873
79841
|
optionalFields,
|
|
@@ -79886,7 +79854,7 @@
|
|
|
79886
79854
|
const referenceToInfos = fieldInfo.referenceToInfos;
|
|
79887
79855
|
const apiNames = referenceToInfos.map((referenceToInfo) => referenceToInfo.apiName);
|
|
79888
79856
|
const objectInfoMap = await this.objectInfoService.getObjectInfos(apiNames);
|
|
79889
|
-
for (const objectInfo of values$
|
|
79857
|
+
for (const objectInfo of values$1(objectInfoMap)) {
|
|
79890
79858
|
const { apiName, keyPrefix } = objectInfo;
|
|
79891
79859
|
if (keyPrefix !== null && id.startsWith(keyPrefix)) {
|
|
79892
79860
|
return apiName;
|
|
@@ -79972,7 +79940,7 @@
|
|
|
79972
79940
|
let resolvedUrlParams = request.urlParams;
|
|
79973
79941
|
if (request.method === 'post' || request.method === 'patch') {
|
|
79974
79942
|
const bodyFields = resolvedBody.fields;
|
|
79975
|
-
const fieldNames = keys$
|
|
79943
|
+
const fieldNames = keys$2$1(bodyFields);
|
|
79976
79944
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
79977
79945
|
const fieldName = fieldNames[i];
|
|
79978
79946
|
const fieldValue = bodyFields[fieldName];
|
|
@@ -80128,7 +80096,7 @@
|
|
|
80128
80096
|
};
|
|
80129
80097
|
}
|
|
80130
80098
|
const referenceFields = [];
|
|
80131
|
-
const fieldNames = keys$
|
|
80099
|
+
const fieldNames = keys$2$1(fields);
|
|
80132
80100
|
const unexpectedFields = [];
|
|
80133
80101
|
for (const field of fieldNames) {
|
|
80134
80102
|
const fieldInfo = objectInfo.fields[field];
|
|
@@ -80190,11 +80158,13 @@
|
|
|
80190
80158
|
|
|
80191
80159
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80192
80160
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80193
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80161
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80194
80162
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80195
80163
|
this.draftRecordService = draftRecordService;
|
|
80196
80164
|
this.isDraftId = isDraftId;
|
|
80197
80165
|
this.sideEffectService = sideEffectService;
|
|
80166
|
+
this.objectInfoService = objectInfoService;
|
|
80167
|
+
this.getRecord = getRecord;
|
|
80198
80168
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80199
80169
|
draftRecordService.registerRecordHandler(this);
|
|
80200
80170
|
}
|
|
@@ -80226,6 +80196,30 @@
|
|
|
80226
80196
|
});
|
|
80227
80197
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80228
80198
|
}
|
|
80199
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80200
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80201
|
+
this.getLuvio();
|
|
80202
|
+
const canonicalId = action.response.body.id;
|
|
80203
|
+
this.buildTagForTargetId(canonicalId);
|
|
80204
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80205
|
+
if (prefix.length !== 3) {
|
|
80206
|
+
// if we can't get a prefix, don't do the rest
|
|
80207
|
+
return;
|
|
80208
|
+
}
|
|
80209
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80210
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80211
|
+
if (!objectInfo) {
|
|
80212
|
+
return;
|
|
80213
|
+
}
|
|
80214
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80215
|
+
}
|
|
80216
|
+
allFields(objectInfo) {
|
|
80217
|
+
let fields = [];
|
|
80218
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80219
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80220
|
+
});
|
|
80221
|
+
return fields;
|
|
80222
|
+
}
|
|
80229
80223
|
mergeRequestBody() {
|
|
80230
80224
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80231
80225
|
}
|
|
@@ -80476,7 +80470,7 @@
|
|
|
80476
80470
|
...trimmedDownData.contentVersion,
|
|
80477
80471
|
fields: cvFields,
|
|
80478
80472
|
};
|
|
80479
|
-
freeze$
|
|
80473
|
+
freeze$2(trimmedDownData);
|
|
80480
80474
|
eventEmitter({ type: 'create-content-document-and-version-draft-finished' });
|
|
80481
80475
|
return {
|
|
80482
80476
|
state: 'Fulfilled',
|
|
@@ -81410,7 +81404,7 @@
|
|
|
81410
81404
|
return predicate;
|
|
81411
81405
|
}
|
|
81412
81406
|
else if (literal !== undefined) {
|
|
81413
|
-
const isAvailableLiteral = values$
|
|
81407
|
+
const isAvailableLiteral = values$1(DateLiteral).includes(literal);
|
|
81414
81408
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81415
81409
|
if (!isAvailableLiteral)
|
|
81416
81410
|
throw new Error(`${literal} is not a valid DateLiteral`);
|
|
@@ -81424,7 +81418,7 @@
|
|
|
81424
81418
|
}
|
|
81425
81419
|
function dateTimeRange(input, op, field, alias) {
|
|
81426
81420
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
81427
|
-
const key = keys$
|
|
81421
|
+
const key = keys$2$1(input)[0];
|
|
81428
81422
|
let operator = op;
|
|
81429
81423
|
if (operator === '=')
|
|
81430
81424
|
operator = 'BETWEEN';
|
|
@@ -81724,7 +81718,7 @@
|
|
|
81724
81718
|
if (!where)
|
|
81725
81719
|
return [];
|
|
81726
81720
|
let predicates = [];
|
|
81727
|
-
const fields = keys$
|
|
81721
|
+
const fields = keys$2$1(where);
|
|
81728
81722
|
for (const field of fields) {
|
|
81729
81723
|
if (field === 'and' || field === 'or') {
|
|
81730
81724
|
predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
|
|
@@ -81777,7 +81771,7 @@
|
|
|
81777
81771
|
}
|
|
81778
81772
|
else {
|
|
81779
81773
|
// @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
|
|
81780
|
-
const entityNames = keys$
|
|
81774
|
+
const entityNames = keys$2$1(where[field]);
|
|
81781
81775
|
const polyPredicatesGroups = entityNames
|
|
81782
81776
|
.filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
|
|
81783
81777
|
.map((entityName) => {
|
|
@@ -81812,7 +81806,7 @@
|
|
|
81812
81806
|
}
|
|
81813
81807
|
else {
|
|
81814
81808
|
//`field` match the filedInfo's apiName
|
|
81815
|
-
for (const [op, value] of entries$
|
|
81809
|
+
for (const [op, value] of entries$2(where[field])) {
|
|
81816
81810
|
const operator = operatorToSql(op);
|
|
81817
81811
|
/**
|
|
81818
81812
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -82129,16 +82123,22 @@
|
|
|
82129
82123
|
}
|
|
82130
82124
|
}
|
|
82131
82125
|
else {
|
|
82132
|
-
|
|
82133
|
-
|
|
82134
|
-
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82135
|
-
if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82136
|
-
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82126
|
+
if (value === null && dataType !== 'MultiPicklist') {
|
|
82127
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
|
|
82137
82128
|
}
|
|
82138
82129
|
else {
|
|
82139
|
-
|
|
82130
|
+
const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
|
|
82131
|
+
// SQLite is case sensitive by default, SOQL is case in-sensitive by default
|
|
82132
|
+
// For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
|
|
82133
|
+
if (dataType === 'MultiPicklist' &&
|
|
82134
|
+
(operator === 'LIKE' || operator === 'NOT LIKE')) {
|
|
82135
|
+
sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
|
|
82136
|
+
}
|
|
82137
|
+
else {
|
|
82138
|
+
sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
|
|
82139
|
+
}
|
|
82140
|
+
binding.push(...valueBinding);
|
|
82140
82141
|
}
|
|
82141
|
-
binding.push(...valueBinding);
|
|
82142
82142
|
}
|
|
82143
82143
|
}
|
|
82144
82144
|
return { sql, binding };
|
|
@@ -82323,7 +82323,7 @@
|
|
|
82323
82323
|
for (const join of joins) {
|
|
82324
82324
|
deduped[join.alias + join.to] = join;
|
|
82325
82325
|
}
|
|
82326
|
-
return values$
|
|
82326
|
+
return values$1(deduped);
|
|
82327
82327
|
}
|
|
82328
82328
|
function buildJoins(config) {
|
|
82329
82329
|
let sql = '';
|
|
@@ -82998,7 +82998,7 @@
|
|
|
82998
82998
|
if (typeof json !== 'object') {
|
|
82999
82999
|
return currentLevel;
|
|
83000
83000
|
}
|
|
83001
|
-
const keys = keys$
|
|
83001
|
+
const keys = keys$2$1(json);
|
|
83002
83002
|
if (keys.length === 0)
|
|
83003
83003
|
return 0;
|
|
83004
83004
|
const depths = keys.map((key) => {
|
|
@@ -83011,7 +83011,7 @@
|
|
|
83011
83011
|
return previous.concat(current);
|
|
83012
83012
|
}
|
|
83013
83013
|
function findFieldInfo(objectInfo, fieldName) {
|
|
83014
|
-
return values$
|
|
83014
|
+
return values$1(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
83015
83015
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
83016
83016
|
}
|
|
83017
83017
|
async function readIngestionTimestampForKey(key, query) {
|
|
@@ -83051,14 +83051,14 @@
|
|
|
83051
83051
|
return predicates;
|
|
83052
83052
|
const isSpanning = depth(orderBy) > 2;
|
|
83053
83053
|
if (isSpanning) {
|
|
83054
|
-
const keys = keys$
|
|
83054
|
+
const keys = keys$2$1(orderBy);
|
|
83055
83055
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83056
83056
|
const key = keys[i];
|
|
83057
83057
|
const parentFields = objectInfoMap[recordType].fields;
|
|
83058
|
-
const fieldInfo = values$
|
|
83058
|
+
const fieldInfo = values$1(parentFields).find(findSpanningField(key));
|
|
83059
83059
|
if (fieldInfo && fieldInfo.referenceToInfos.length > 0) {
|
|
83060
83060
|
const { apiName } = fieldInfo.referenceToInfos[0];
|
|
83061
|
-
const parentFieldInfo = values$
|
|
83061
|
+
const parentFieldInfo = values$1(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
|
|
83062
83062
|
if (parentFieldInfo !== undefined) {
|
|
83063
83063
|
const path = {
|
|
83064
83064
|
leftPath: `$.fields.${parentFieldInfo.apiName}.value`,
|
|
@@ -83081,7 +83081,7 @@
|
|
|
83081
83081
|
}
|
|
83082
83082
|
}
|
|
83083
83083
|
else {
|
|
83084
|
-
const keys = keys$
|
|
83084
|
+
const keys = keys$2$1(orderBy);
|
|
83085
83085
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83086
83086
|
const key = keys[i];
|
|
83087
83087
|
if (!objectInfoMap[recordType])
|
|
@@ -84376,7 +84376,7 @@
|
|
|
84376
84376
|
variables,
|
|
84377
84377
|
fragmentMap: {},
|
|
84378
84378
|
});
|
|
84379
|
-
const filteredArgumentNodes = assign$
|
|
84379
|
+
const filteredArgumentNodes = assign$2([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
84380
84380
|
const argumentString = filteredArgumentNodes.length > 0
|
|
84381
84381
|
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
84382
84382
|
: '';
|
|
@@ -84399,7 +84399,7 @@
|
|
|
84399
84399
|
let baseRecord = undefined;
|
|
84400
84400
|
// Concrete types for Polymorphic field
|
|
84401
84401
|
const polyTypes = [];
|
|
84402
|
-
for (const type of values$
|
|
84402
|
+
for (const type of values$1(schema.getTypeMap())) {
|
|
84403
84403
|
if (type.name === 'Record') {
|
|
84404
84404
|
recordInterface = type;
|
|
84405
84405
|
}
|
|
@@ -84412,7 +84412,7 @@
|
|
|
84412
84412
|
if (polyFields.find((fieldTypeName) => fieldTypeName === type.name) !== undefined) {
|
|
84413
84413
|
polyTypes.push(type);
|
|
84414
84414
|
}
|
|
84415
|
-
const fields = values$
|
|
84415
|
+
const fields = values$1(type.getFields());
|
|
84416
84416
|
// initialize the fields of current type with default behavior
|
|
84417
84417
|
for (const field of fields) {
|
|
84418
84418
|
field.resolve = defaultFieldResolver;
|
|
@@ -84791,7 +84791,7 @@
|
|
|
84791
84791
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84792
84792
|
let addedTypedScalars = new Set();
|
|
84793
84793
|
let allPolymorphicFieldTypeNames = new Set();
|
|
84794
|
-
for (const name of keys$
|
|
84794
|
+
for (const name of keys$2$1(objectInfoMap)) {
|
|
84795
84795
|
const objectInfo = objectInfoMap[name];
|
|
84796
84796
|
const { apiName } = objectInfo;
|
|
84797
84797
|
const type = schema.getType(apiName);
|
|
@@ -84860,7 +84860,7 @@
|
|
|
84860
84860
|
const { apiName, childRelationships, fields: fieldsRepresentation } = objectInfo;
|
|
84861
84861
|
typedScalars.add(`${apiName}_Filter`);
|
|
84862
84862
|
typedScalars.add(`${apiName}_OrderBy`);
|
|
84863
|
-
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$
|
|
84863
|
+
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$1(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
|
|
84864
84864
|
// handles child relationship
|
|
84865
84865
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
84866
84866
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
@@ -84918,8 +84918,8 @@
|
|
|
84918
84918
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84919
84919
|
let typedScalars = new Set();
|
|
84920
84920
|
let parentRelationshipFields = new Set();
|
|
84921
|
-
const existingFields = keys$
|
|
84922
|
-
const missingFields = values$
|
|
84921
|
+
const existingFields = keys$2$1(type.getFields());
|
|
84922
|
+
const missingFields = values$1(objectInfo.fields).filter((field) => {
|
|
84923
84923
|
return (existingFields.includes(field.apiName) === false ||
|
|
84924
84924
|
(field.relationshipName !== null && field.referenceToInfos.length > 0));
|
|
84925
84925
|
});
|
|
@@ -85001,7 +85001,7 @@
|
|
|
85001
85001
|
function makeRecordField(fieldRepresentations, objectInfo, objectInfoMap, existingParentRelationships, recordTypeInSchema, existingFields = []) {
|
|
85002
85002
|
const polymorphicFieldTypeNames = new Set();
|
|
85003
85003
|
let fields = ``;
|
|
85004
|
-
for (const field of values$
|
|
85004
|
+
for (const field of values$1(fieldRepresentations)) {
|
|
85005
85005
|
if (!fieldsStaticallyAdded.includes(field.apiName) && recordTypeInSchema === 'Missing') {
|
|
85006
85006
|
fields += `${field.apiName}: ${graphqlTypeForField(field, objectInfo)}\n`;
|
|
85007
85007
|
}
|
|
@@ -85569,7 +85569,7 @@
|
|
|
85569
85569
|
const objectInfo = objectInfos[apiName[0]];
|
|
85570
85570
|
if (!objectInfo)
|
|
85571
85571
|
return false;
|
|
85572
|
-
return values$
|
|
85572
|
+
return values$1(objectInfo.fields).some((fieldInfo) => {
|
|
85573
85573
|
return (fieldInfo.apiName === 'OwnerId' &&
|
|
85574
85574
|
fieldInfo.referenceToInfos.some((referenceToInfo) => {
|
|
85575
85575
|
return referenceToInfo.apiName === 'User';
|
|
@@ -85779,7 +85779,7 @@
|
|
|
85779
85779
|
// eslint-disable-next-line
|
|
85780
85780
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85781
85781
|
}
|
|
85782
|
-
if (keys$
|
|
85782
|
+
if (keys$2$1(objectInfos).length < startNodes.size) {
|
|
85783
85783
|
// eslint-disable-next-line
|
|
85784
85784
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85785
85785
|
}
|
|
@@ -86807,7 +86807,7 @@
|
|
|
86807
86807
|
output.data.uiapi = { ...output.data.uiapi };
|
|
86808
86808
|
output.data.uiapi.query = { ...output.data.uiapi.query };
|
|
86809
86809
|
const outputApiParent = output.data.uiapi.query;
|
|
86810
|
-
const keys = keys$
|
|
86810
|
+
const keys = keys$2$1(nodeJson);
|
|
86811
86811
|
keys.forEach((recordName) => {
|
|
86812
86812
|
const outputApi = {};
|
|
86813
86813
|
// Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
|
|
@@ -86827,7 +86827,7 @@
|
|
|
86827
86827
|
* @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
|
|
86828
86828
|
*/
|
|
86829
86829
|
function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
86830
|
-
const keys = keys$
|
|
86830
|
+
const keys = keys$2$1(jsonInput);
|
|
86831
86831
|
if (selection.selectionSet) {
|
|
86832
86832
|
createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
|
|
86833
86833
|
}
|
|
@@ -86836,7 +86836,7 @@
|
|
|
86836
86836
|
}
|
|
86837
86837
|
}
|
|
86838
86838
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
86839
|
-
const keys = keys$
|
|
86839
|
+
const keys = keys$2$1(jsonInput);
|
|
86840
86840
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
86841
86841
|
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
86842
86842
|
if (keys.includes(fieldName)) {
|
|
@@ -87244,7 +87244,7 @@
|
|
|
87244
87244
|
*/
|
|
87245
87245
|
function findFieldTypeInObjectInfo(objectInfos, fieldType) {
|
|
87246
87246
|
let fieldsWithDataType = [];
|
|
87247
|
-
keys$
|
|
87247
|
+
keys$2$1(objectInfos).filter((recordType) => {
|
|
87248
87248
|
for (const field in objectInfos[recordType].fields) {
|
|
87249
87249
|
if (objectInfos[recordType].fields[field].dataType === fieldType) {
|
|
87250
87250
|
fieldsWithDataType.push(field);
|
|
@@ -87275,7 +87275,7 @@
|
|
|
87275
87275
|
}
|
|
87276
87276
|
else if (typeof object === 'object' && object !== null) {
|
|
87277
87277
|
let source = object;
|
|
87278
|
-
return keys$
|
|
87278
|
+
return keys$2$1(source).reduce((acc, key) => {
|
|
87279
87279
|
acc[key] = replace(source[key]);
|
|
87280
87280
|
return acc;
|
|
87281
87281
|
}, {});
|
|
@@ -87284,7 +87284,7 @@
|
|
|
87284
87284
|
return object;
|
|
87285
87285
|
}
|
|
87286
87286
|
};
|
|
87287
|
-
let newVariables = keys$
|
|
87287
|
+
let newVariables = keys$2$1(variables).reduce((acc, key) => {
|
|
87288
87288
|
acc[key] = replace(variables[key]);
|
|
87289
87289
|
return acc;
|
|
87290
87290
|
}, {});
|
|
@@ -87739,16 +87739,16 @@
|
|
|
87739
87739
|
*/
|
|
87740
87740
|
|
|
87741
87741
|
|
|
87742
|
-
const { keys: keys$
|
|
87742
|
+
const { keys: keys$1$1, create: create$1$1, assign: assign$1$1, entries: entries$1 } = Object;
|
|
87743
87743
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
87744
87744
|
const { push: push$3, join, slice } = Array.prototype;
|
|
87745
87745
|
const { isArray: isArray$4, from } = Array;
|
|
87746
87746
|
|
|
87747
87747
|
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];
|
|
87748
|
+
const returnParams = create$1$1(null);
|
|
87749
|
+
const keys$1$1$1 = keys$1$1(params);
|
|
87750
|
+
for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
|
|
87751
|
+
const key = keys$1$1$1[i];
|
|
87752
87752
|
const value = params[key];
|
|
87753
87753
|
if (value === undefined) {
|
|
87754
87754
|
// filter out params that have no value
|
|
@@ -87763,7 +87763,7 @@
|
|
|
87763
87763
|
else {
|
|
87764
87764
|
returnParams[key] = `${value}`;
|
|
87765
87765
|
}
|
|
87766
|
-
if (isObject(value) === true && keys$
|
|
87766
|
+
if (isObject(value) === true && keys$1$1(value).length > 0) {
|
|
87767
87767
|
returnParams[key] = stringify$1(value);
|
|
87768
87768
|
}
|
|
87769
87769
|
}
|
|
@@ -88162,7 +88162,7 @@
|
|
|
88162
88162
|
optionalFields,
|
|
88163
88163
|
};
|
|
88164
88164
|
const queryString = [];
|
|
88165
|
-
for (const [key, value] of entries$
|
|
88165
|
+
for (const [key, value] of entries$1(mergedParams)) {
|
|
88166
88166
|
if (value !== undefined) {
|
|
88167
88167
|
queryString.push(`${key}=${isArray$4(value) ? value.join(',') : value}`);
|
|
88168
88168
|
}
|
|
@@ -88178,7 +88178,7 @@
|
|
|
88178
88178
|
function mergeRecordFields(first, second) {
|
|
88179
88179
|
const { fields: targetFields } = first;
|
|
88180
88180
|
const { fields: sourceFields } = second;
|
|
88181
|
-
const fieldNames = keys$
|
|
88181
|
+
const fieldNames = keys$1$1(sourceFields);
|
|
88182
88182
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
88183
88183
|
const fieldName = fieldNames[i];
|
|
88184
88184
|
const sourceField = sourceFields[fieldName];
|
|
@@ -88338,7 +88338,7 @@
|
|
|
88338
88338
|
const { baseUri, basePath, queryParams } = request;
|
|
88339
88339
|
let url = `${baseUri}${basePath}`;
|
|
88340
88340
|
if (queryParams) {
|
|
88341
|
-
const queryParamString = entries$
|
|
88341
|
+
const queryParamString = entries$1(queryParams)
|
|
88342
88342
|
.map(([key, value]) => `${key}=${value}`)
|
|
88343
88343
|
.join('&');
|
|
88344
88344
|
if (queryParamString) {
|
|
@@ -88769,7 +88769,7 @@
|
|
|
88769
88769
|
logError: false,
|
|
88770
88770
|
});
|
|
88771
88771
|
};
|
|
88772
|
-
const overriddenQueue = create$
|
|
88772
|
+
const overriddenQueue = create$2$1(queue, { mergeActions: { value: mergeActions } });
|
|
88773
88773
|
overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
|
|
88774
88774
|
switch (draftQueueEvent.type) {
|
|
88775
88775
|
case DraftQueueEventType.QueueStateChanged: {
|
|
@@ -88907,7 +88907,7 @@
|
|
|
88907
88907
|
function dataIsObjectInfo(key, data) {
|
|
88908
88908
|
return incomingObjectInfos.has(key);
|
|
88909
88909
|
}
|
|
88910
|
-
return create$
|
|
88910
|
+
return create$2$1(env, {
|
|
88911
88911
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
88912
88912
|
storePublish: { value: storePublish },
|
|
88913
88913
|
});
|
|
@@ -89008,8 +89008,8 @@
|
|
|
89008
89008
|
}
|
|
89009
89009
|
};
|
|
89010
89010
|
// Local in-memory cache for apiName to key prefixes
|
|
89011
|
-
this.apiNameToKeyPrefixMemoryCache = create$
|
|
89012
|
-
this.keyPrefixToApiNameMemoryCache = create$
|
|
89011
|
+
this.apiNameToKeyPrefixMemoryCache = create$2$1(null);
|
|
89012
|
+
this.keyPrefixToApiNameMemoryCache = create$2$1(null);
|
|
89013
89013
|
}
|
|
89014
89014
|
/**
|
|
89015
89015
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -89165,7 +89165,7 @@
|
|
|
89165
89165
|
};
|
|
89166
89166
|
}
|
|
89167
89167
|
|
|
89168
|
-
const { keys: keys$
|
|
89168
|
+
const { keys: keys$6, create: create$5, assign: assign$5, entries, values } = Object;
|
|
89169
89169
|
const { stringify: stringify$5, parse: parse$5 } = JSON;
|
|
89170
89170
|
|
|
89171
89171
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
@@ -89232,7 +89232,7 @@
|
|
|
89232
89232
|
},
|
|
89233
89233
|
conflictColumns: this.conflictColumnNames,
|
|
89234
89234
|
columns: this.columnNames,
|
|
89235
|
-
rows: keys$
|
|
89235
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89236
89236
|
const entry = entries[key];
|
|
89237
89237
|
const { data, metadata } = entry;
|
|
89238
89238
|
const row = [key, stringify$5(data), metadata ? stringify$5(metadata) : null];
|
|
@@ -89251,7 +89251,7 @@
|
|
|
89251
89251
|
type: 'setMetadata',
|
|
89252
89252
|
},
|
|
89253
89253
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89254
|
-
values: keys$
|
|
89254
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89255
89255
|
const { metadata } = entries[key];
|
|
89256
89256
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89257
89257
|
values[key] = row;
|
|
@@ -89341,7 +89341,7 @@
|
|
|
89341
89341
|
},
|
|
89342
89342
|
conflictColumns: this.conflictColumnNames,
|
|
89343
89343
|
columns: this.columnNames,
|
|
89344
|
-
rows: keys$
|
|
89344
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89345
89345
|
const entry = entries[key];
|
|
89346
89346
|
const { data, metadata } = entry;
|
|
89347
89347
|
const row = [key, stringify$5(data)];
|
|
@@ -89367,7 +89367,7 @@
|
|
|
89367
89367
|
type: 'setMetadata',
|
|
89368
89368
|
},
|
|
89369
89369
|
columns: [COLUMN_NAME_METADATA],
|
|
89370
|
-
values: keys$
|
|
89370
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89371
89371
|
const { metadata } = entries[key];
|
|
89372
89372
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89373
89373
|
values[key] = row;
|
|
@@ -89376,7 +89376,7 @@
|
|
|
89376
89376
|
};
|
|
89377
89377
|
}
|
|
89378
89378
|
metadataToUpdateSQLQueries(entries, segment) {
|
|
89379
|
-
return keys$
|
|
89379
|
+
return keys$6(entries).reduce((accu, key) => {
|
|
89380
89380
|
const { metadata } = entries[key];
|
|
89381
89381
|
if (metadata !== undefined) {
|
|
89382
89382
|
accu.push({
|
|
@@ -89450,7 +89450,7 @@
|
|
|
89450
89450
|
.finally(() => tasker.done());
|
|
89451
89451
|
}
|
|
89452
89452
|
setEntries(entries, segment) {
|
|
89453
|
-
if (keys$
|
|
89453
|
+
if (keys$6(entries).length === 0) {
|
|
89454
89454
|
return Promise.resolve();
|
|
89455
89455
|
}
|
|
89456
89456
|
const table = this.getTable(segment);
|
|
@@ -89458,7 +89458,7 @@
|
|
|
89458
89458
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
89459
89459
|
}
|
|
89460
89460
|
setMetadata(entries, segment) {
|
|
89461
|
-
if (keys$
|
|
89461
|
+
if (keys$6(entries).length === 0) {
|
|
89462
89462
|
return Promise.resolve();
|
|
89463
89463
|
}
|
|
89464
89464
|
const table = this.getTable(segment);
|
|
@@ -89468,13 +89468,13 @@
|
|
|
89468
89468
|
batchOperations(operations) {
|
|
89469
89469
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
89470
89470
|
if (cur.type === 'setEntries') {
|
|
89471
|
-
if (keys$
|
|
89471
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89472
89472
|
const table = this.getTable(cur.segment);
|
|
89473
89473
|
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
89474
89474
|
}
|
|
89475
89475
|
}
|
|
89476
89476
|
else if (cur.type === 'setMetadata') {
|
|
89477
|
-
if (keys$
|
|
89477
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89478
89478
|
const table = this.getTable(cur.segment);
|
|
89479
89479
|
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
89480
89480
|
}
|
|
@@ -89597,7 +89597,7 @@
|
|
|
89597
89597
|
},
|
|
89598
89598
|
conflictColumns: this.conflictColumnNames,
|
|
89599
89599
|
columns: this.columnNames,
|
|
89600
|
-
rows: keys$
|
|
89600
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89601
89601
|
const entry = entries[key];
|
|
89602
89602
|
rows.push([key, stringify$5(entry.data)]);
|
|
89603
89603
|
return rows;
|
|
@@ -89765,7 +89765,7 @@
|
|
|
89765
89765
|
}
|
|
89766
89766
|
return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
|
|
89767
89767
|
};
|
|
89768
|
-
return create$
|
|
89768
|
+
return create$2$1(environment, {
|
|
89769
89769
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
89770
89770
|
applyCachePolicy: { value: applyCachePolicy },
|
|
89771
89771
|
setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
|
|
@@ -91186,7 +91186,7 @@
|
|
|
91186
91186
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
91187
91187
|
let deallocatedCount = 0;
|
|
91188
91188
|
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
91189
|
-
const storeKeyLength = keys$
|
|
91189
|
+
const storeKeyLength = keys$2$1(storeRecords).length;
|
|
91190
91190
|
if (storeKeyLength <= maxStoreRecords) {
|
|
91191
91191
|
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
91192
91192
|
}
|
|
@@ -91262,78 +91262,6 @@
|
|
|
91262
91262
|
}
|
|
91263
91263
|
}
|
|
91264
91264
|
|
|
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
91265
|
function select$1$1(luvio, config) {
|
|
91338
91266
|
const { query, variables, operationName } = config;
|
|
91339
91267
|
return select$2$1(luvio, query, variables, operationName);
|
|
@@ -91901,7 +91829,7 @@
|
|
|
91901
91829
|
if (idsToFetch.size > 0) {
|
|
91902
91830
|
const effects = await durableStore.getEntries(Array.from(idsToFetch), SIDE_EFFECT_SEGMENT);
|
|
91903
91831
|
if (effects !== undefined) {
|
|
91904
|
-
keys$
|
|
91832
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91905
91833
|
const effect = effects[effectId].data;
|
|
91906
91834
|
const key = effect.uniqueId;
|
|
91907
91835
|
this.allEffects.set(key, effect);
|
|
@@ -91955,7 +91883,7 @@
|
|
|
91955
91883
|
if (effects === undefined) {
|
|
91956
91884
|
return;
|
|
91957
91885
|
}
|
|
91958
|
-
keys$
|
|
91886
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91959
91887
|
const effect = effects[effectId].data;
|
|
91960
91888
|
const key = effect.uniqueId;
|
|
91961
91889
|
this.allEffects.set(key, effect);
|
|
@@ -92026,7 +91954,7 @@
|
|
|
92026
91954
|
const draftFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92027
91955
|
const timestampString = new Date(timestamp).toISOString();
|
|
92028
91956
|
const systemFields = this.generateSystemFields(timestampString, id);
|
|
92029
|
-
assign$
|
|
91957
|
+
assign$2(draftFields, systemFields);
|
|
92030
91958
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92031
91959
|
this.fillMissingFields(draftFields, objectInfo);
|
|
92032
91960
|
let recordTypeId = this.determineRecordTypeId(fields, objectInfo);
|
|
@@ -92088,7 +92016,7 @@
|
|
|
92088
92016
|
async synthesizeFieldsFromParts(fields, apiName) {
|
|
92089
92017
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92090
92018
|
const recordFields = {};
|
|
92091
|
-
for (const fieldName of keys$
|
|
92019
|
+
for (const fieldName of keys$2$1(fields)) {
|
|
92092
92020
|
const draftField = fields[fieldName] ?? null;
|
|
92093
92021
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92094
92022
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
@@ -92111,7 +92039,7 @@
|
|
|
92111
92039
|
let patchedFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92112
92040
|
if (existingRecord) {
|
|
92113
92041
|
const nameFields = this.getCompoundNameFields(existingRecord, patchedFields, objectInfo);
|
|
92114
|
-
assign$
|
|
92042
|
+
assign$2(patchedFields, nameFields);
|
|
92115
92043
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY_ID, { value: this.userId, displayValue: null }, existingRecord.fields, patchedFields);
|
|
92116
92044
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY, {
|
|
92117
92045
|
value: this.createLink(buildRecordRepKeyFromId$1(this.userId)),
|
|
@@ -92169,7 +92097,7 @@
|
|
|
92169
92097
|
changedNameFields[fieldName] = fieldValue;
|
|
92170
92098
|
}
|
|
92171
92099
|
}
|
|
92172
|
-
if (keys$
|
|
92100
|
+
if (keys$2$1(changedNameFields).length > 0) {
|
|
92173
92101
|
const newNameValue = filteredNameFields
|
|
92174
92102
|
.map((key) => {
|
|
92175
92103
|
if (changedNameFields[key] !== undefined) {
|
|
@@ -92290,7 +92218,7 @@
|
|
|
92290
92218
|
}
|
|
92291
92219
|
const patchedFields = effect.recordPatch.fields;
|
|
92292
92220
|
if (patchedFields) {
|
|
92293
|
-
const fieldNames = keys$
|
|
92221
|
+
const fieldNames = keys$2$1(patchedFields);
|
|
92294
92222
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92295
92223
|
const fieldName = fieldNames[i];
|
|
92296
92224
|
// don't apply server values to draft created records
|
|
@@ -92449,7 +92377,7 @@
|
|
|
92449
92377
|
return undefined;
|
|
92450
92378
|
}
|
|
92451
92379
|
const updatedFields = {};
|
|
92452
|
-
const fieldNames = keys$
|
|
92380
|
+
const fieldNames = keys$2$1(fields);
|
|
92453
92381
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92454
92382
|
const fieldName = fieldNames[i];
|
|
92455
92383
|
const field = fields[fieldName];
|
|
@@ -92489,7 +92417,7 @@
|
|
|
92489
92417
|
|
|
92490
92418
|
function enableSideEffectsOnEnvironment(env, sideEffectStore) {
|
|
92491
92419
|
const storePublish = function (key, data) {
|
|
92492
|
-
if (isStoreKeyRecordId
|
|
92420
|
+
if (isStoreKeyRecordId(key) === false || isStoreRecordError$1(data)) {
|
|
92493
92421
|
return env.storePublish(key, data);
|
|
92494
92422
|
}
|
|
92495
92423
|
const effects = sideEffectStore.getEffects(key);
|
|
@@ -92546,7 +92474,7 @@
|
|
|
92546
92474
|
if (entries === undefined) {
|
|
92547
92475
|
return directory;
|
|
92548
92476
|
}
|
|
92549
|
-
keys$
|
|
92477
|
+
keys$2$1(entries).forEach((key) => {
|
|
92550
92478
|
const { data: record, metadata } = entries[key];
|
|
92551
92479
|
if (isStoreRecordError(record)) {
|
|
92552
92480
|
return;
|
|
@@ -92560,10 +92488,18 @@
|
|
|
92560
92488
|
return storeRecord.__type === 'error';
|
|
92561
92489
|
}
|
|
92562
92490
|
|
|
92563
|
-
|
|
92564
|
-
|
|
92565
|
-
|
|
92566
|
-
|
|
92491
|
+
function createSfsSideEffectHooks(durableRecordStore) {
|
|
92492
|
+
if (productConsumedSideEffectsKillSwitch.isOpen({ fallback: false })) {
|
|
92493
|
+
return [];
|
|
92494
|
+
}
|
|
92495
|
+
return [
|
|
92496
|
+
// SFS FSCore needs to implement code to bypass it's existing "side effect" code for Product Consumed.
|
|
92497
|
+
// W-17683696 is the work that will enable the code below after FSCore's W-17422735 is completed.
|
|
92498
|
+
// new ProductConsumedCreatedHook(),
|
|
92499
|
+
// new ProductConsumedUpdatedHook(durableRecordStore),
|
|
92500
|
+
// new ProductConsumedDeletedHook(durableRecordStore),
|
|
92501
|
+
];
|
|
92502
|
+
}
|
|
92567
92503
|
|
|
92568
92504
|
// so eslint doesn't complain about nimbus
|
|
92569
92505
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -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();
|
|
@@ -92645,8 +92581,8 @@
|
|
|
92645
92581
|
lazySideEffectService = new SideEffectService(lazyDurableRecordStore, lazyObjectInfoService, userId, formatDisplayValue);
|
|
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
|
-
uiApiRecordHandler.setSideEffectHooks(
|
|
92649
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92584
|
+
uiApiRecordHandler.setSideEffectHooks(createSfsSideEffectHooks());
|
|
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.343.0-f39f04aaf6
|
|
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.343.0-823df4356c
|
|
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.343.0-823df4356c
|
|
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.343.0-f39f04aaf6
|
|
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.343.0-f39f04aaf6
|