@salesforce/lds-worker-api 1.340.0 → 1.342.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
SnapshotState["Stale"] = "Stale";
|
|
27
27
|
})(SnapshotState$3 || (SnapshotState$3 = {}));
|
|
28
28
|
|
|
29
|
-
const { create: create$
|
|
29
|
+
const { create: create$9, entries: entries$4, freeze: freeze$5, keys: keys$9, values: values$3, assign: assign$8 } = Object;
|
|
30
30
|
const { hasOwnProperty: hasOwnProperty$4 } = Object.prototype;
|
|
31
31
|
const { isArray: isArray$7 } = Array;
|
|
32
32
|
const { push: push$5, indexOf, slice: slice$2 } = Array.prototype;
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
|
-
const keys$1 = keys$
|
|
57
|
+
const keys$1 = keys$9(value);
|
|
58
58
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
59
59
|
deepFreeze(value[keys$1[i]]);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
freeze$
|
|
62
|
+
freeze$5(value);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
function isErrorSnapshot$3(snapshot) {
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
if (node === null) {
|
|
326
326
|
return 'null';
|
|
327
327
|
}
|
|
328
|
-
const keys$1 = keys$
|
|
328
|
+
const keys$1 = keys$9(node).sort();
|
|
329
329
|
out = '';
|
|
330
330
|
for (i = 0; i < keys$1.length; i++) {
|
|
331
331
|
const key = keys$1[i];
|
|
@@ -593,13 +593,13 @@
|
|
|
593
593
|
class StringKeyInMemoryStore {
|
|
594
594
|
constructor(options = {}) {
|
|
595
595
|
// public, in memory properties
|
|
596
|
-
this.records = create$
|
|
597
|
-
this.metadata = create$
|
|
598
|
-
this.visitedIds = create$
|
|
599
|
-
this.refreshedIds = create$
|
|
600
|
-
this.redirectKeys = create$
|
|
601
|
-
this.retainedIds = create$
|
|
602
|
-
this.ttlOverrides = create$
|
|
596
|
+
this.records = create$9(null);
|
|
597
|
+
this.metadata = create$9(null);
|
|
598
|
+
this.visitedIds = create$9(null);
|
|
599
|
+
this.refreshedIds = create$9(null);
|
|
600
|
+
this.redirectKeys = create$9(null);
|
|
601
|
+
this.retainedIds = create$9(null);
|
|
602
|
+
this.ttlOverrides = create$9(null);
|
|
603
603
|
this.snapshotSubscriptions = [];
|
|
604
604
|
this.trimTask = null;
|
|
605
605
|
this.pendingTrimKeys = new Set();
|
|
@@ -607,8 +607,8 @@
|
|
|
607
607
|
this.watchSubscriptions = [];
|
|
608
608
|
this.eventObservers = [];
|
|
609
609
|
// private/protected
|
|
610
|
-
this.insertedIds = create$
|
|
611
|
-
this.reverseRedirectKeys = create$
|
|
610
|
+
this.insertedIds = create$9(null);
|
|
611
|
+
this.reverseRedirectKeys = create$9(null);
|
|
612
612
|
this.currentSnapshotId = 0;
|
|
613
613
|
this.scheduler = options.scheduler || buildDefaultScheduler();
|
|
614
614
|
if (options.initialData) {
|
|
@@ -621,13 +621,13 @@
|
|
|
621
621
|
return this.records[this.getCanonicalRecordId(key)];
|
|
622
622
|
}
|
|
623
623
|
getNumEntries() {
|
|
624
|
-
return keys$
|
|
624
|
+
return keys$9(this.records).length;
|
|
625
625
|
}
|
|
626
626
|
readMetadata(key) {
|
|
627
627
|
return this.metadata[this.getCanonicalRecordId(key)];
|
|
628
628
|
}
|
|
629
629
|
readMetadataWhere(query) {
|
|
630
|
-
const keys$1 = keys$
|
|
630
|
+
const keys$1 = keys$9(this.metadata);
|
|
631
631
|
const results = [];
|
|
632
632
|
const hasNamespaceQuery = hasOwnProperty$4.call(query, 'namespace');
|
|
633
633
|
const hasRepresentationNameQuery = hasOwnProperty$4.call(query, 'representationName');
|
|
@@ -724,8 +724,8 @@
|
|
|
724
724
|
// Note: we should always get the subscription references from this at the beginning
|
|
725
725
|
// of the function, in case the reference changes (because of an unsubscribe)
|
|
726
726
|
const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
|
|
727
|
-
const allVisitedIds = keys$
|
|
728
|
-
const allRefreshedIds = keys$
|
|
727
|
+
const allVisitedIds = keys$9(visitedIds);
|
|
728
|
+
const allRefreshedIds = keys$9(refreshedIds);
|
|
729
729
|
// Early exit if nothing has changed
|
|
730
730
|
if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
|
|
731
731
|
return Promise.resolve();
|
|
@@ -768,9 +768,9 @@
|
|
|
768
768
|
callback(watchCallbackEntries);
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
|
-
this.visitedIds = create$
|
|
772
|
-
this.refreshedIds = create$
|
|
773
|
-
this.insertedIds = create$
|
|
771
|
+
this.visitedIds = create$9(null);
|
|
772
|
+
this.refreshedIds = create$9(null);
|
|
773
|
+
this.insertedIds = create$9(null);
|
|
774
774
|
// the .then removes the return of an array of voids to a single void
|
|
775
775
|
return Promise.all(snapshotSubPromises).then(() => { });
|
|
776
776
|
}
|
|
@@ -962,18 +962,18 @@
|
|
|
962
962
|
return this.defaultTTLOverride;
|
|
963
963
|
}
|
|
964
964
|
reset() {
|
|
965
|
-
this.records = create$
|
|
965
|
+
this.records = create$9(null);
|
|
966
966
|
this.snapshotSubscriptions = [];
|
|
967
967
|
this.watchSubscriptions = [];
|
|
968
|
-
this.visitedIds = create$
|
|
969
|
-
this.refreshedIds = create$
|
|
970
|
-
this.insertedIds = create$
|
|
971
|
-
this.redirectKeys = create$
|
|
972
|
-
this.reverseRedirectKeys = create$
|
|
973
|
-
this.retainedIds = create$
|
|
974
|
-
this.ttlOverrides = create$
|
|
968
|
+
this.visitedIds = create$9(null);
|
|
969
|
+
this.refreshedIds = create$9(null);
|
|
970
|
+
this.insertedIds = create$9(null);
|
|
971
|
+
this.redirectKeys = create$9(null);
|
|
972
|
+
this.reverseRedirectKeys = create$9(null);
|
|
973
|
+
this.retainedIds = create$9(null);
|
|
974
|
+
this.ttlOverrides = create$9(null);
|
|
975
975
|
this.trimTask = null;
|
|
976
|
-
this.metadata = create$
|
|
976
|
+
this.metadata = create$9(null);
|
|
977
977
|
this.defaultTTLOverride = undefined;
|
|
978
978
|
emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
|
|
979
979
|
}
|
|
@@ -1232,7 +1232,7 @@
|
|
|
1232
1232
|
calculateAndSetNewTTLs(storeMetadata, resetInitialDataTtls) {
|
|
1233
1233
|
if (resetInitialDataTtls === true) {
|
|
1234
1234
|
const now = Date.now();
|
|
1235
|
-
keys$
|
|
1235
|
+
keys$9(storeMetadata).forEach((key) => {
|
|
1236
1236
|
const storeMetadataEntry = storeMetadata[key];
|
|
1237
1237
|
const ttl = storeMetadataEntry.expirationTimestamp - storeMetadataEntry.ingestionTimestamp;
|
|
1238
1238
|
storeMetadataEntry.ingestionTimestamp = now;
|
|
@@ -1261,7 +1261,7 @@
|
|
|
1261
1261
|
hasOverlappingIds(snapshot, visitedIds) === false);
|
|
1262
1262
|
}
|
|
1263
1263
|
function getMatchingIds(partialKey, visitedIds) {
|
|
1264
|
-
const keys$1 = keys$
|
|
1264
|
+
const keys$1 = keys$9(partialKey);
|
|
1265
1265
|
return visitedIds.filter((visitedId) => {
|
|
1266
1266
|
return keys$1.every((key) => {
|
|
1267
1267
|
return partialKey[key] === visitedId[key];
|
|
@@ -1917,8 +1917,8 @@
|
|
|
1917
1917
|
} while (redirectKey !== undefined);
|
|
1918
1918
|
}
|
|
1919
1919
|
isUsingStringKeys() {
|
|
1920
|
-
return (keys$
|
|
1921
|
-
keys$
|
|
1920
|
+
return (keys$9(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
|
|
1921
|
+
keys$9(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
|
|
1922
1922
|
}
|
|
1923
1923
|
delegateToFallbackStringKeyStore(snapshot) {
|
|
1924
1924
|
return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
|
|
@@ -1960,7 +1960,7 @@
|
|
|
1960
1960
|
buildKeySchema(keyMetadata) {
|
|
1961
1961
|
// pull NamespacedType type out of NormalizedKeyMetadata
|
|
1962
1962
|
const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
|
|
1963
|
-
const keySchema = keys$
|
|
1963
|
+
const keySchema = keys$9(keyParamValues).sort();
|
|
1964
1964
|
return ['namespace', 'representationName', ...keySchema];
|
|
1965
1965
|
}
|
|
1966
1966
|
serialize() {
|
|
@@ -2254,7 +2254,7 @@
|
|
|
2254
2254
|
return value;
|
|
2255
2255
|
}
|
|
2256
2256
|
keys() {
|
|
2257
|
-
return keys$
|
|
2257
|
+
return keys$9(this.data);
|
|
2258
2258
|
}
|
|
2259
2259
|
isScalar(propertyName) {
|
|
2260
2260
|
// TODO W-6900046 - merge.ts casts these to any and manually sets `data`
|
|
@@ -2689,7 +2689,7 @@
|
|
|
2689
2689
|
}
|
|
2690
2690
|
}
|
|
2691
2691
|
selectAllObject(record, data, visitedKeys) {
|
|
2692
|
-
const recordKeys = keys$
|
|
2692
|
+
const recordKeys = keys$9(record);
|
|
2693
2693
|
const { length } = recordKeys;
|
|
2694
2694
|
for (let i = 0; i < length; i += 1) {
|
|
2695
2695
|
const key = recordKeys[i];
|
|
@@ -2884,7 +2884,7 @@
|
|
|
2884
2884
|
}
|
|
2885
2885
|
const { baseSnapshotValue } = this.currentPath;
|
|
2886
2886
|
if (isDefined(baseSnapshotValue)) {
|
|
2887
|
-
this.snapshotChanged = keys$1.length !== keys$
|
|
2887
|
+
this.snapshotChanged = keys$1.length !== keys$9(baseSnapshotValue).length;
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
checkIfChanged(value, options) {
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
return this.markMissing();
|
|
2929
2929
|
}
|
|
2930
2930
|
const sink = (data[propertyName] = {});
|
|
2931
|
-
const keys$1 = keys$
|
|
2931
|
+
const keys$1 = keys$9(obj);
|
|
2932
2932
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2933
2933
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
2934
2934
|
const key = keys$1[i];
|
|
@@ -2939,7 +2939,7 @@
|
|
|
2939
2939
|
}
|
|
2940
2940
|
readLinkMap(propertyName, selection, record, data) {
|
|
2941
2941
|
const map = record[propertyName];
|
|
2942
|
-
const keys$1 = keys$
|
|
2942
|
+
const keys$1 = keys$9(map);
|
|
2943
2943
|
const sink = {};
|
|
2944
2944
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
2945
2945
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
@@ -3073,7 +3073,7 @@
|
|
|
3073
3073
|
return;
|
|
3074
3074
|
}
|
|
3075
3075
|
const sink = (data[propertyName] = {});
|
|
3076
|
-
const keys$1 = keys$
|
|
3076
|
+
const keys$1 = keys$9(obj);
|
|
3077
3077
|
this.checkIfObjectKeysLengthChanged(keys$1);
|
|
3078
3078
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
3079
3079
|
const key = keys$1[i];
|
|
@@ -3306,8 +3306,8 @@
|
|
|
3306
3306
|
this.defaultCachePolicy = { type: 'cache-then-network' };
|
|
3307
3307
|
this.store = store;
|
|
3308
3308
|
this.networkAdapter = networkAdapter;
|
|
3309
|
-
this.adapterContextMap = create$
|
|
3310
|
-
this.typeQueryEvaluatorMap = create$
|
|
3309
|
+
this.adapterContextMap = create$9(null);
|
|
3310
|
+
this.typeQueryEvaluatorMap = create$9(null);
|
|
3311
3311
|
// bind these methods so when they get passed into the
|
|
3312
3312
|
// Store, the this reference is preserved
|
|
3313
3313
|
this.createSnapshot = this.createSnapshot.bind(this);
|
|
@@ -3407,7 +3407,7 @@
|
|
|
3407
3407
|
status: StoreErrorStatus$1.RESOURCE_NOT_FOUND,
|
|
3408
3408
|
error,
|
|
3409
3409
|
};
|
|
3410
|
-
freeze$
|
|
3410
|
+
freeze$5(entry);
|
|
3411
3411
|
store.publish(key, entry);
|
|
3412
3412
|
if (storeMetadataParams !== undefined) {
|
|
3413
3413
|
const { ttl, namespace, representationName, version } = storeMetadataParams;
|
|
@@ -3507,7 +3507,7 @@
|
|
|
3507
3507
|
// retrieve from adapterContextMap if contextId is supplied
|
|
3508
3508
|
// we will only track context of adapters that explicitly provide a contextId
|
|
3509
3509
|
if (this.adapterContextMap[contextId] === undefined) {
|
|
3510
|
-
this.adapterContextMap[contextId] = create$
|
|
3510
|
+
this.adapterContextMap[contextId] = create$9(null);
|
|
3511
3511
|
}
|
|
3512
3512
|
const contextStore = this.adapterContextMap[contextId];
|
|
3513
3513
|
const context = {
|
|
@@ -3796,13 +3796,13 @@
|
|
|
3796
3796
|
// undefined values on the injected networkAdapter. So we do it here, on
|
|
3797
3797
|
// the API that those adapters call to dispatch their ResourceRequests.
|
|
3798
3798
|
const { queryParams, urlParams } = mergedResourceRequest;
|
|
3799
|
-
for (const paramKey of keys$
|
|
3799
|
+
for (const paramKey of keys$9(queryParams)) {
|
|
3800
3800
|
const value = queryParams[paramKey];
|
|
3801
3801
|
if (value === undefined) {
|
|
3802
3802
|
delete queryParams[paramKey];
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
3805
|
-
for (const paramKey of keys$
|
|
3805
|
+
for (const paramKey of keys$9(urlParams)) {
|
|
3806
3806
|
const value = urlParams[paramKey];
|
|
3807
3807
|
if (value === undefined) {
|
|
3808
3808
|
delete urlParams[paramKey];
|
|
@@ -4129,16 +4129,16 @@
|
|
|
4129
4129
|
return acc;
|
|
4130
4130
|
}, {});
|
|
4131
4131
|
const resourceParams = {};
|
|
4132
|
-
if (keys$
|
|
4132
|
+
if (keys$9(urlParams).length > 0) {
|
|
4133
4133
|
resourceParams[CONFIG_PROPERTY_URL_PARAMS] = urlParams;
|
|
4134
4134
|
}
|
|
4135
|
-
if (keys$
|
|
4135
|
+
if (keys$9(queryParams).length > 0) {
|
|
4136
4136
|
resourceParams[CONFIG_PROPERTY_QUERY_PARAMS] = queryParams;
|
|
4137
4137
|
}
|
|
4138
4138
|
if (bodyParams.length > 0) {
|
|
4139
4139
|
resourceParams[CONFIG_PROPERTY_BODY] = actualBodyParams;
|
|
4140
4140
|
}
|
|
4141
|
-
if (keys$
|
|
4141
|
+
if (keys$9(headerParams).length > 0) {
|
|
4142
4142
|
resourceParams[CONFIG_PROPERTY_HEADERS] = headerParams;
|
|
4143
4143
|
}
|
|
4144
4144
|
return resourceParams;
|
|
@@ -4271,7 +4271,7 @@
|
|
|
4271
4271
|
}
|
|
4272
4272
|
callbacks.push(callback);
|
|
4273
4273
|
}
|
|
4274
|
-
// version: 1.
|
|
4274
|
+
// version: 1.342.0-651bed9637
|
|
4275
4275
|
|
|
4276
4276
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4277
4277
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -4880,7 +4880,7 @@
|
|
|
4880
4880
|
return factory(luvio);
|
|
4881
4881
|
}
|
|
4882
4882
|
|
|
4883
|
-
const { create: create$
|
|
4883
|
+
const { create: create$8, defineProperty, defineProperties } = Object;
|
|
4884
4884
|
|
|
4885
4885
|
var SnapshotState$2;
|
|
4886
4886
|
(function (SnapshotState) {
|
|
@@ -5219,7 +5219,7 @@
|
|
|
5219
5219
|
const { apiFamily, name } = metadata;
|
|
5220
5220
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5221
5221
|
}
|
|
5222
|
-
// version: 1.
|
|
5222
|
+
// version: 1.342.0-651bed9637
|
|
5223
5223
|
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -5322,7 +5322,7 @@
|
|
|
5322
5322
|
|
|
5323
5323
|
const { keys: ObjectKeys$4, create: ObjectCreate$4 } = Object;
|
|
5324
5324
|
|
|
5325
|
-
const { assign: assign$
|
|
5325
|
+
const { assign: assign$7, create: create$7, freeze: freeze$4, isFrozen: isFrozen$4, keys: keys$8 } = Object;
|
|
5326
5326
|
|
|
5327
5327
|
/**
|
|
5328
5328
|
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
@@ -5389,6 +5389,7 @@
|
|
|
5389
5389
|
* Determines whether to include additional PDL strategies for Related Lists
|
|
5390
5390
|
*/
|
|
5391
5391
|
let relatedListsPlusPredictionsEnabled$3 = false;
|
|
5392
|
+
let recordRepresentationIngestionOverride$3 = undefined;
|
|
5392
5393
|
/**
|
|
5393
5394
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
5394
5395
|
* Configuration for one store enabled REST adapters only.
|
|
@@ -5494,6 +5495,12 @@
|
|
|
5494
5495
|
areRelatedListsPlusPredictionsEnabled: function () {
|
|
5495
5496
|
return relatedListsPlusPredictionsEnabled$3 === true;
|
|
5496
5497
|
},
|
|
5498
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
5499
|
+
recordRepresentationIngestionOverride$3 = ingest;
|
|
5500
|
+
},
|
|
5501
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
5502
|
+
return recordRepresentationIngestionOverride$3;
|
|
5503
|
+
},
|
|
5497
5504
|
// createRecord
|
|
5498
5505
|
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$3.getAdapter,
|
|
5499
5506
|
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$3.setAdapter,
|
|
@@ -5535,7 +5542,7 @@
|
|
|
5535
5542
|
|
|
5536
5543
|
ObjectCreate$4(null);
|
|
5537
5544
|
|
|
5538
|
-
freeze$
|
|
5545
|
+
freeze$4({
|
|
5539
5546
|
name: '',
|
|
5540
5547
|
children: {},
|
|
5541
5548
|
});
|
|
@@ -5647,6 +5654,7 @@
|
|
|
5647
5654
|
* Determines whether to include additional PDL strategies for Related Lists
|
|
5648
5655
|
*/
|
|
5649
5656
|
let relatedListsPlusPredictionsEnabled$2 = false;
|
|
5657
|
+
let recordRepresentationIngestionOverride$2 = undefined;
|
|
5650
5658
|
/**
|
|
5651
5659
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
5652
5660
|
* Configuration for one store enabled REST adapters only.
|
|
@@ -5761,6 +5769,12 @@
|
|
|
5761
5769
|
areRelatedListsPlusPredictionsEnabled: function () {
|
|
5762
5770
|
return relatedListsPlusPredictionsEnabled$2 === true;
|
|
5763
5771
|
},
|
|
5772
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
5773
|
+
recordRepresentationIngestionOverride$2 = ingest;
|
|
5774
|
+
},
|
|
5775
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
5776
|
+
return recordRepresentationIngestionOverride$2;
|
|
5777
|
+
},
|
|
5764
5778
|
// createRecord
|
|
5765
5779
|
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$2.getAdapter,
|
|
5766
5780
|
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$2.setAdapter,
|
|
@@ -6025,7 +6039,7 @@
|
|
|
6025
6039
|
}
|
|
6026
6040
|
const keyPrefix$3 = 'UiApi';
|
|
6027
6041
|
|
|
6028
|
-
const { assign: assign$
|
|
6042
|
+
const { assign: assign$6, create: create$6, freeze: freeze$3, isFrozen: isFrozen$3, keys: keys$7 } = Object;
|
|
6029
6043
|
const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
|
|
6030
6044
|
const { split: split$1, endsWith: endsWith$1 } = String.prototype;
|
|
6031
6045
|
const { isArray: isArray$5 } = Array;
|
|
@@ -6054,7 +6068,7 @@
|
|
|
6054
6068
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
6055
6069
|
result[value[i]] = true;
|
|
6056
6070
|
}
|
|
6057
|
-
return keys$
|
|
6071
|
+
return keys$7(result);
|
|
6058
6072
|
}
|
|
6059
6073
|
/**
|
|
6060
6074
|
* @param source The array of string to filter
|
|
@@ -6935,14 +6949,14 @@
|
|
|
6935
6949
|
mergeable: true,
|
|
6936
6950
|
});
|
|
6937
6951
|
const input_childRelationships = input.childRelationships;
|
|
6938
|
-
const input_childRelationships_keys = keys$
|
|
6952
|
+
const input_childRelationships_keys = keys$7(input_childRelationships);
|
|
6939
6953
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
6940
6954
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
6941
6955
|
const key = input_childRelationships_keys[i];
|
|
6942
6956
|
getTypeCacheKeys$W$2(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
6943
6957
|
}
|
|
6944
6958
|
const input_fields = input.fields;
|
|
6945
|
-
const input_fields_keys = keys$
|
|
6959
|
+
const input_fields_keys = keys$7(input_fields);
|
|
6946
6960
|
const input_fields_length = input_fields_keys.length;
|
|
6947
6961
|
for (let i = 0; i < input_fields_length; i++) {
|
|
6948
6962
|
const key = input_fields_keys[i];
|
|
@@ -8985,7 +8999,7 @@
|
|
|
8985
8999
|
function createPathSelection$1(propertyName, fieldDefinition) {
|
|
8986
9000
|
const fieldsSelection = [];
|
|
8987
9001
|
const { children } = fieldDefinition;
|
|
8988
|
-
const childrenKeys = keys$
|
|
9002
|
+
const childrenKeys = keys$7(children);
|
|
8989
9003
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
8990
9004
|
const childKey = childrenKeys[i];
|
|
8991
9005
|
const childFieldDefinition = children[childKey];
|
|
@@ -9030,7 +9044,7 @@
|
|
|
9030
9044
|
*/
|
|
9031
9045
|
function createPathSelectionFromValue$1(fields) {
|
|
9032
9046
|
const fieldsSelection = [];
|
|
9033
|
-
const fieldNames = keys$
|
|
9047
|
+
const fieldNames = keys$7(fields);
|
|
9034
9048
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9035
9049
|
const fieldName = fieldNames[i];
|
|
9036
9050
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -9069,7 +9083,7 @@
|
|
|
9069
9083
|
}
|
|
9070
9084
|
function extractRecordFieldsRecursively$1(record) {
|
|
9071
9085
|
const fields = [];
|
|
9072
|
-
const fieldNames = keys$
|
|
9086
|
+
const fieldNames = keys$7(record.fields);
|
|
9073
9087
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
9074
9088
|
const fieldName = fieldNames[i];
|
|
9075
9089
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -9262,7 +9276,7 @@
|
|
|
9262
9276
|
// For a spanning record that is detected to be a circular reference, we add the field along with Id and Name.
|
|
9263
9277
|
// It's possible for spanning record lookup fields to sometimes be circular, and sometimes not - depending on the value of the lookup field.
|
|
9264
9278
|
// For more information on scenarios that caused this fix: search "LDS Recursive Spanning Fields Problem" in Quip
|
|
9265
|
-
if (keys$
|
|
9279
|
+
if (keys$7(next.children).length === 0) {
|
|
9266
9280
|
addScalarFieldId$1(next);
|
|
9267
9281
|
addScalarFieldName$1(next);
|
|
9268
9282
|
}
|
|
@@ -9315,13 +9329,13 @@
|
|
|
9315
9329
|
return endsWith$1.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX$1);
|
|
9316
9330
|
}
|
|
9317
9331
|
function convertTrieToFields$1(root) {
|
|
9318
|
-
if (keys$
|
|
9332
|
+
if (keys$7(root.children).length === 0) {
|
|
9319
9333
|
return [];
|
|
9320
9334
|
}
|
|
9321
9335
|
return convertTrieToFieldsRecursively$1(root);
|
|
9322
9336
|
}
|
|
9323
9337
|
function convertTrieToFieldsRecursively$1(root) {
|
|
9324
|
-
const childKeys = keys$
|
|
9338
|
+
const childKeys = keys$7(root.children);
|
|
9325
9339
|
if (childKeys.length === 0) {
|
|
9326
9340
|
if (root.name === '') {
|
|
9327
9341
|
return [];
|
|
@@ -9330,7 +9344,7 @@
|
|
|
9330
9344
|
}
|
|
9331
9345
|
return reduce$3.call(childKeys, (acc, cur) => concat$3.call(acc, convertTrieToFieldsRecursively$1(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
9332
9346
|
}
|
|
9333
|
-
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$
|
|
9347
|
+
const BLANK_RECORD_FIELDS_TRIE$1 = freeze$3({
|
|
9334
9348
|
name: '',
|
|
9335
9349
|
children: {},
|
|
9336
9350
|
});
|
|
@@ -9360,7 +9374,7 @@
|
|
|
9360
9374
|
function mergeFieldsTries$1(rootA, rootB) {
|
|
9361
9375
|
const rootAchildren = rootA.children;
|
|
9362
9376
|
const rootBchildren = rootB.children;
|
|
9363
|
-
const childBKeys = keys$
|
|
9377
|
+
const childBKeys = keys$7(rootBchildren);
|
|
9364
9378
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
9365
9379
|
const childBKey = childBKeys[i];
|
|
9366
9380
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -9520,8 +9534,8 @@
|
|
|
9520
9534
|
}
|
|
9521
9535
|
const childrenA = a.children;
|
|
9522
9536
|
const childrenB = b.children;
|
|
9523
|
-
const childKeysA = keys$
|
|
9524
|
-
const childKeysB = keys$
|
|
9537
|
+
const childKeysA = keys$7(childrenA);
|
|
9538
|
+
const childKeysB = keys$7(childrenB);
|
|
9525
9539
|
const childKeysBLength = childKeysB.length;
|
|
9526
9540
|
if (childKeysBLength > childKeysA.length) {
|
|
9527
9541
|
return false;
|
|
@@ -9563,7 +9577,7 @@
|
|
|
9563
9577
|
function mergePendingFields$1(newRecord, oldRecord, existingNode) {
|
|
9564
9578
|
const mergedFields = { ...newRecord.fields };
|
|
9565
9579
|
const merged = { ...newRecord, fields: mergedFields };
|
|
9566
|
-
const existingFields = keys$
|
|
9580
|
+
const existingFields = keys$7(oldRecord.fields);
|
|
9567
9581
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
9568
9582
|
const spanningFieldName = existingFields[i];
|
|
9569
9583
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -9731,7 +9745,7 @@
|
|
|
9731
9745
|
if (isGraphNode$1(node)) {
|
|
9732
9746
|
const dependencies = node.retrieve();
|
|
9733
9747
|
if (dependencies !== null) {
|
|
9734
|
-
const depKeys = keys$
|
|
9748
|
+
const depKeys = keys$7(dependencies);
|
|
9735
9749
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
9736
9750
|
luvio.storeEvict(depKeys[i]);
|
|
9737
9751
|
}
|
|
@@ -9878,7 +9892,7 @@
|
|
|
9878
9892
|
}
|
|
9879
9893
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
9880
9894
|
const subtrie = fieldSubtries[i];
|
|
9881
|
-
const fieldNames = keys$
|
|
9895
|
+
const fieldNames = keys$7(subtrie.children);
|
|
9882
9896
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
9883
9897
|
const fieldName = fieldNames[i];
|
|
9884
9898
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -9992,9 +10006,9 @@
|
|
|
9992
10006
|
return false;
|
|
9993
10007
|
}
|
|
9994
10008
|
}
|
|
9995
|
-
const headersKeys = keys$
|
|
10009
|
+
const headersKeys = keys$7(headers);
|
|
9996
10010
|
const headersKeyLength = headersKeys.length;
|
|
9997
|
-
if (headersKeyLength !== keys$
|
|
10011
|
+
if (headersKeyLength !== keys$7(existingHeaders).length) {
|
|
9998
10012
|
return false;
|
|
9999
10013
|
}
|
|
10000
10014
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -10602,7 +10616,7 @@
|
|
|
10602
10616
|
|
|
10603
10617
|
// iterate through the map to build configs for network calls
|
|
10604
10618
|
function resolveConflict$1(luvio, map) {
|
|
10605
|
-
const ids = keys$
|
|
10619
|
+
const ids = keys$7(map.conflicts);
|
|
10606
10620
|
if (ids.length === 0) {
|
|
10607
10621
|
instrumentation$3.recordConflictsResolved(map.serverRequestCount);
|
|
10608
10622
|
return;
|
|
@@ -12051,18 +12065,18 @@
|
|
|
12051
12065
|
return {
|
|
12052
12066
|
getRecordSelectionFieldSets() {
|
|
12053
12067
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
12054
|
-
const fields = keys$
|
|
12068
|
+
const fields = keys$7(defaultFields_);
|
|
12055
12069
|
for (let i = 0; i < fields.length; ++i) {
|
|
12056
12070
|
const field = fields[i];
|
|
12057
12071
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
12058
12072
|
optionalPlusDefaultFields[field] = true;
|
|
12059
12073
|
}
|
|
12060
12074
|
}
|
|
12061
|
-
return [keys$
|
|
12075
|
+
return [keys$7(fields_).sort(), keys$7(optionalPlusDefaultFields).sort()];
|
|
12062
12076
|
},
|
|
12063
12077
|
processRecords(records) {
|
|
12064
12078
|
const { missingFields } = defaultServerFieldStatus;
|
|
12065
|
-
const fields = keys$
|
|
12079
|
+
const fields = keys$7(missingFields);
|
|
12066
12080
|
for (let i = 0; i < fields.length; ++i) {
|
|
12067
12081
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
12068
12082
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -14542,7 +14556,7 @@
|
|
|
14542
14556
|
const lookupFields = {};
|
|
14543
14557
|
const { apiName, fields: recordFields } = record;
|
|
14544
14558
|
const { fields: objectInfoFields } = objectInfo;
|
|
14545
|
-
const objectInfoFieldNames = keys$
|
|
14559
|
+
const objectInfoFieldNames = keys$7(objectInfoFields);
|
|
14546
14560
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
14547
14561
|
const fieldName = objectInfoFieldNames[i];
|
|
14548
14562
|
const field = objectInfoFields[fieldName];
|
|
@@ -14561,12 +14575,12 @@
|
|
|
14561
14575
|
const nameField = `${apiName}.${relationshipName}.${getNameField$1(objectInfo, fieldName)}`;
|
|
14562
14576
|
lookupFields[nameField] = true;
|
|
14563
14577
|
}
|
|
14564
|
-
return keys$
|
|
14578
|
+
return keys$7(lookupFields);
|
|
14565
14579
|
}
|
|
14566
14580
|
function getRecordUiMissingRecordLookupFields$1(recordUi) {
|
|
14567
14581
|
const { records, objectInfos } = recordUi;
|
|
14568
14582
|
const recordLookupFields = {};
|
|
14569
|
-
const recordIds = keys$
|
|
14583
|
+
const recordIds = keys$7(records);
|
|
14570
14584
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14571
14585
|
const recordId = recordIds[i];
|
|
14572
14586
|
const recordData = records[recordId];
|
|
@@ -14604,19 +14618,19 @@
|
|
|
14604
14618
|
}
|
|
14605
14619
|
function eachLayout$1(recordUi, cb) {
|
|
14606
14620
|
const { layouts } = recordUi;
|
|
14607
|
-
const layoutApiNames = keys$
|
|
14621
|
+
const layoutApiNames = keys$7(layouts);
|
|
14608
14622
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
14609
14623
|
const apiName = layoutApiNames[a];
|
|
14610
14624
|
const apiNameData = layouts[apiName];
|
|
14611
|
-
const recordTypeIds = keys$
|
|
14625
|
+
const recordTypeIds = keys$7(apiNameData);
|
|
14612
14626
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
14613
14627
|
const recordTypeId = recordTypeIds[b];
|
|
14614
14628
|
const recordTypeData = apiNameData[recordTypeId];
|
|
14615
|
-
const layoutTypes = keys$
|
|
14629
|
+
const layoutTypes = keys$7(recordTypeData);
|
|
14616
14630
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
14617
14631
|
const layoutType = layoutTypes[c];
|
|
14618
14632
|
const layoutTypeData = recordTypeData[layoutType];
|
|
14619
|
-
const modes = keys$
|
|
14633
|
+
const modes = keys$7(layoutTypeData);
|
|
14620
14634
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
14621
14635
|
const mode = modes[d];
|
|
14622
14636
|
const layout = layoutTypeData[mode];
|
|
@@ -14822,14 +14836,14 @@
|
|
|
14822
14836
|
function publishDependencies$1(luvio, recordIds, depKeys) {
|
|
14823
14837
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
14824
14838
|
const recordDepKey = dependencyKeyBuilder$1({ recordId: recordIds[i] });
|
|
14825
|
-
const dependencies = create$
|
|
14839
|
+
const dependencies = create$6(null);
|
|
14826
14840
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
14827
14841
|
dependencies[depKeys[j]] = true;
|
|
14828
14842
|
}
|
|
14829
14843
|
const node = luvio.getNode(recordDepKey);
|
|
14830
14844
|
if (isGraphNode$1(node)) {
|
|
14831
14845
|
const recordDeps = node.retrieve();
|
|
14832
|
-
assign$
|
|
14846
|
+
assign$6(dependencies, recordDeps);
|
|
14833
14847
|
}
|
|
14834
14848
|
luvio.storePublish(recordDepKey, dependencies);
|
|
14835
14849
|
}
|
|
@@ -15016,11 +15030,11 @@
|
|
|
15016
15030
|
function getFieldsFromLayoutMap$1(layoutMap, objectInfo) {
|
|
15017
15031
|
let fields = [];
|
|
15018
15032
|
let optionalFields = [];
|
|
15019
|
-
const layoutTypes = keys$
|
|
15033
|
+
const layoutTypes = keys$7(layoutMap);
|
|
15020
15034
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
15021
15035
|
const layoutType = layoutTypes[i];
|
|
15022
15036
|
const modesMap = layoutMap[layoutType];
|
|
15023
|
-
const modes = keys$
|
|
15037
|
+
const modes = keys$7(modesMap);
|
|
15024
15038
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
15025
15039
|
const mode = modes[m];
|
|
15026
15040
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout$1(modesMap[mode], objectInfo);
|
|
@@ -15057,7 +15071,7 @@
|
|
|
15057
15071
|
return getRecord$1(luvio, refresh, recordId, [], implicitFields);
|
|
15058
15072
|
}
|
|
15059
15073
|
function getRecordForNonLayoutableEntities$1(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
15060
|
-
const fields = keys$
|
|
15074
|
+
const fields = keys$7(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
15061
15075
|
// W-12697744
|
|
15062
15076
|
// Set the implicit fields received from the server in adapter context
|
|
15063
15077
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -15296,7 +15310,7 @@
|
|
|
15296
15310
|
}
|
|
15297
15311
|
const { layoutType, mode, snapshot } = container;
|
|
15298
15312
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
15299
|
-
wrapper.layoutMap = assign$
|
|
15313
|
+
wrapper.layoutMap = assign$6({}, wrapper.layoutMap, {
|
|
15300
15314
|
[layoutType]: {},
|
|
15301
15315
|
});
|
|
15302
15316
|
}
|
|
@@ -25237,7 +25251,7 @@
|
|
|
25237
25251
|
}
|
|
25238
25252
|
}
|
|
25239
25253
|
if (records.length > 0) {
|
|
25240
|
-
assign$
|
|
25254
|
+
assign$6(config, { records });
|
|
25241
25255
|
}
|
|
25242
25256
|
}
|
|
25243
25257
|
return config;
|
|
@@ -30291,7 +30305,7 @@
|
|
|
30291
30305
|
let clonedLayoutUserStateSections;
|
|
30292
30306
|
const { sectionUserStates } = layoutUserStateInput;
|
|
30293
30307
|
const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
|
|
30294
|
-
const sectionUserStateKeys = keys$
|
|
30308
|
+
const sectionUserStateKeys = keys$7(sectionUserStates);
|
|
30295
30309
|
for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
|
|
30296
30310
|
const sectionId = sectionUserStateKeys[i];
|
|
30297
30311
|
if (cachedSectionUserStates[sectionId] === undefined) {
|
|
@@ -33569,7 +33583,7 @@
|
|
|
33569
33583
|
const getRecordTemplateCreate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordTemplateCreate', configurationForEnvironmentFactoryOverrides$2.getRecordTemplateCreateAdapterFactory() ?? factory$5$1), getRecordTemplateCreateMetadata);
|
|
33570
33584
|
const getRecordUi_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordUi', configurationForEnvironmentFactoryOverrides$2.getRecordUiAdapterFactory() ?? factory$g), getRecordUiMetadata);
|
|
33571
33585
|
const getRecords_ldsAdapter = createInstrumentedAdapter(createLDSAdapterWithPrediction(createLDSAdapter(luvio, 'getRecords', configurationForEnvironmentFactoryOverrides$2.getRecordsAdapterFactory() ?? getRecordsAdapterFactory$1), luvio, 'getRecords'), getRecordsMetadata);
|
|
33572
|
-
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), getRelatedListActionsMetadata);
|
|
33586
|
+
const getRelatedListActions_ldsAdapter = createInstrumentedAdapter(createRelatedListPlusAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListActions', getRelatedListActionsAdapterFactory), luvio, 'getRelatedListActions'), getRelatedListActionsMetadata);
|
|
33573
33587
|
const getRelatedListCount_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRelatedListCount', getRelatedListCountAdapterFactory), getRelatedListCountMetadata);
|
|
33574
33588
|
const getRelatedListInfo_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfo', getRelatedListInfoAdapterFactory), luvio, 'getRelatedListInfo'), getRelatedListInfoMetadata);
|
|
33575
33589
|
const getRelatedListInfoBatch_ldsAdapter = createInstrumentedAdapter(createRelatedListAdapterWithPrediction(createLDSAdapter(luvio, 'getRelatedListInfoBatch', getRelatedListInfoBatchAdapterFactory), luvio, 'getRelatedListInfoBatch'), getRelatedListInfoBatchMetadata);
|
|
@@ -33886,16 +33900,7 @@
|
|
|
33886
33900
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
33887
33901
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
33888
33902
|
});
|
|
33889
|
-
// version: 1.
|
|
33890
|
-
|
|
33891
|
-
var graphqlRecordTypeIdFixGate = {
|
|
33892
|
-
isOpen: function (e) {
|
|
33893
|
-
return e.fallback;
|
|
33894
|
-
},
|
|
33895
|
-
hasError: function () {
|
|
33896
|
-
return !0;
|
|
33897
|
-
},
|
|
33898
|
-
};
|
|
33903
|
+
// version: 1.342.0-f478af8b93
|
|
33899
33904
|
|
|
33900
33905
|
/**
|
|
33901
33906
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -45502,7 +45507,7 @@
|
|
|
45502
45507
|
const { parse: parse$4, stringify: stringify$4 } = JSON;
|
|
45503
45508
|
const { join: join$1, push: push$2, unshift } = Array.prototype;
|
|
45504
45509
|
const { isArray: isArray$3$1 } = Array;
|
|
45505
|
-
const { entries: entries$
|
|
45510
|
+
const { entries: entries$3, keys: keys$5 } = Object;
|
|
45506
45511
|
|
|
45507
45512
|
const UI_API_BASE_URI = '/services/data/v64.0/ui-api';
|
|
45508
45513
|
|
|
@@ -45567,7 +45572,7 @@
|
|
|
45567
45572
|
function mergeRecordFields$2(first, second) {
|
|
45568
45573
|
const { fields: targetFields } = first;
|
|
45569
45574
|
const { fields: sourceFields } = second;
|
|
45570
|
-
const fieldNames = keys$
|
|
45575
|
+
const fieldNames = keys$5(sourceFields);
|
|
45571
45576
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
45572
45577
|
const fieldName = fieldNames[i];
|
|
45573
45578
|
const sourceField = sourceFields[fieldName];
|
|
@@ -45809,7 +45814,7 @@
|
|
|
45809
45814
|
if (fulfill === undefined) {
|
|
45810
45815
|
return null;
|
|
45811
45816
|
}
|
|
45812
|
-
const handlersMap = entries$
|
|
45817
|
+
const handlersMap = entries$3(inflightRequests);
|
|
45813
45818
|
for (let i = 0, len = handlersMap.length; i < len; i += 1) {
|
|
45814
45819
|
const [transactionKey, handlers] = handlersMap[i];
|
|
45815
45820
|
// check fulfillment against only the first handler ([0]) because it's equal or
|
|
@@ -45974,7 +45979,7 @@
|
|
|
45974
45979
|
const MessagingDurableSegment = 'MESSAGING';
|
|
45975
45980
|
const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
|
|
45976
45981
|
|
|
45977
|
-
const { keys: keys$
|
|
45982
|
+
const { keys: keys$4, create: create$4, assign: assign$4, freeze: freeze$1$1 } = Object;
|
|
45978
45983
|
|
|
45979
45984
|
//Durable store error instrumentation key
|
|
45980
45985
|
const DURABLE_STORE_ERROR = 'durable-store-error';
|
|
@@ -46021,7 +46026,7 @@
|
|
|
46021
46026
|
if (durableRecords === undefined) {
|
|
46022
46027
|
return { revivedKeys, hadUnexpectedShape };
|
|
46023
46028
|
}
|
|
46024
|
-
const durableKeys = keys$
|
|
46029
|
+
const durableKeys = keys$4(durableRecords);
|
|
46025
46030
|
if (durableKeys.length === 0) {
|
|
46026
46031
|
// no records to revive
|
|
46027
46032
|
return { revivedKeys, hadUnexpectedShape };
|
|
@@ -46206,7 +46211,7 @@
|
|
|
46206
46211
|
overrides,
|
|
46207
46212
|
};
|
|
46208
46213
|
}
|
|
46209
|
-
const keys$1 = keys$
|
|
46214
|
+
const keys$1 = keys$4(entries);
|
|
46210
46215
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
46211
46216
|
const key = keys$1[i];
|
|
46212
46217
|
const entry = entries[key];
|
|
@@ -46228,14 +46233,14 @@
|
|
|
46228
46233
|
}
|
|
46229
46234
|
|
|
46230
46235
|
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
46231
|
-
const durableRecords = create$
|
|
46232
|
-
const refreshedDurableRecords = create$
|
|
46233
|
-
const evictedRecords = create$
|
|
46236
|
+
const durableRecords = create$4(null);
|
|
46237
|
+
const refreshedDurableRecords = create$4(null);
|
|
46238
|
+
const evictedRecords = create$4(null);
|
|
46234
46239
|
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
46235
46240
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
46236
46241
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
46237
46242
|
// on the metadata segment for the refreshedIds
|
|
46238
|
-
const keys$1 = keys$
|
|
46243
|
+
const keys$1 = keys$4({ ...visitedIds, ...refreshedIds });
|
|
46239
46244
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
46240
46245
|
const key = keys$1[i];
|
|
46241
46246
|
const canonicalKey = store.getCanonicalRecordId(key);
|
|
@@ -46267,7 +46272,7 @@
|
|
|
46267
46272
|
}
|
|
46268
46273
|
}
|
|
46269
46274
|
const durableStoreOperations = additionalDurableStoreOperations;
|
|
46270
|
-
const recordKeys = keys$
|
|
46275
|
+
const recordKeys = keys$4(durableRecords);
|
|
46271
46276
|
if (recordKeys.length > 0) {
|
|
46272
46277
|
// publishes with data
|
|
46273
46278
|
durableStoreOperations.push({
|
|
@@ -46276,7 +46281,7 @@
|
|
|
46276
46281
|
segment: DefaultDurableSegment,
|
|
46277
46282
|
});
|
|
46278
46283
|
}
|
|
46279
|
-
const refreshKeys = keys$
|
|
46284
|
+
const refreshKeys = keys$4(refreshedDurableRecords);
|
|
46280
46285
|
if (refreshKeys.length > 0) {
|
|
46281
46286
|
// publishes with only metadata updates
|
|
46282
46287
|
durableStoreOperations.push({
|
|
@@ -46298,7 +46303,7 @@
|
|
|
46298
46303
|
});
|
|
46299
46304
|
});
|
|
46300
46305
|
// evicts
|
|
46301
|
-
const evictedKeys = keys$
|
|
46306
|
+
const evictedKeys = keys$4(evictedRecords);
|
|
46302
46307
|
if (evictedKeys.length > 0) {
|
|
46303
46308
|
durableStoreOperations.push({
|
|
46304
46309
|
type: 'evictEntries',
|
|
@@ -46402,7 +46407,7 @@
|
|
|
46402
46407
|
// A reviving store is only "active" during a call to `environment.storeLookup`, and will
|
|
46403
46408
|
// be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
|
|
46404
46409
|
// the reviving store becomes inactive other than receiving change notifications.
|
|
46405
|
-
return create$
|
|
46410
|
+
return create$4(upstreamStore, {
|
|
46406
46411
|
readEntry: { value: readEntry },
|
|
46407
46412
|
markStale: { value: markStale },
|
|
46408
46413
|
clearStale: { value: clearStale },
|
|
@@ -46414,7 +46419,7 @@
|
|
|
46414
46419
|
const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
|
|
46415
46420
|
async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
|
|
46416
46421
|
// initialize empty context store
|
|
46417
|
-
contextStores[adapterId] = create$
|
|
46422
|
+
contextStores[adapterId] = create$4(null);
|
|
46418
46423
|
const context = {
|
|
46419
46424
|
set(key, value) {
|
|
46420
46425
|
contextStores[adapterId][key] = value;
|
|
@@ -46479,7 +46484,7 @@
|
|
|
46479
46484
|
const revivingStores = new Set();
|
|
46480
46485
|
// redirects that need to be flushed to the durable store
|
|
46481
46486
|
const pendingStoreRedirects = new Map();
|
|
46482
|
-
const contextStores = create$
|
|
46487
|
+
const contextStores = create$4(null);
|
|
46483
46488
|
let initializationPromise = new Promise((resolve) => {
|
|
46484
46489
|
const finish = () => {
|
|
46485
46490
|
resolve();
|
|
@@ -46556,7 +46561,7 @@
|
|
|
46556
46561
|
try {
|
|
46557
46562
|
const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
|
|
46558
46563
|
if (entries !== undefined) {
|
|
46559
|
-
const entryKeys = keys$
|
|
46564
|
+
const entryKeys = keys$4(entries);
|
|
46560
46565
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46561
46566
|
const entryKey = entryKeys[i];
|
|
46562
46567
|
const entry = entries[entryKey];
|
|
@@ -46591,7 +46596,7 @@
|
|
|
46591
46596
|
if (filteredKeys.length > 0) {
|
|
46592
46597
|
const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
|
|
46593
46598
|
if (entries !== undefined) {
|
|
46594
|
-
const entryKeys = keys$
|
|
46599
|
+
const entryKeys = keys$4(entries);
|
|
46595
46600
|
for (let i = 0, len = entryKeys.length; i < len; i++) {
|
|
46596
46601
|
const entryKey = entryKeys[i];
|
|
46597
46602
|
const { metadata } = entries[entryKey];
|
|
@@ -46963,7 +46968,7 @@
|
|
|
46963
46968
|
validateNotDisposed();
|
|
46964
46969
|
const entryKeys = keys$1.map(serializeStructuredKey);
|
|
46965
46970
|
const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
|
|
46966
|
-
if (entries === undefined || keys$
|
|
46971
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
46967
46972
|
return environment.notifyStoreUpdateAvailable(keys$1);
|
|
46968
46973
|
}
|
|
46969
46974
|
const now = Date.now();
|
|
@@ -47015,7 +47020,7 @@
|
|
|
47015
47020
|
const metadataKeys = keys$1.map(serializeStructuredKey);
|
|
47016
47021
|
const now = Date.now();
|
|
47017
47022
|
const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
|
|
47018
|
-
if (entries === undefined || keys$
|
|
47023
|
+
if (entries === undefined || keys$4(entries).length === 0) {
|
|
47019
47024
|
return environment.expirePossibleStaleRecords(keys$1);
|
|
47020
47025
|
}
|
|
47021
47026
|
let metaDataChanged = false;
|
|
@@ -47041,7 +47046,7 @@
|
|
|
47041
47046
|
type: 'stale-while-revalidate',
|
|
47042
47047
|
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
47043
47048
|
});
|
|
47044
|
-
return create$
|
|
47049
|
+
return create$4(environment, {
|
|
47045
47050
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
47046
47051
|
storeIngest: { value: storeIngest },
|
|
47047
47052
|
storeIngestError: { value: storeIngestError },
|
|
@@ -47277,7 +47282,7 @@
|
|
|
47277
47282
|
QueueOperationType["Update"] = "update";
|
|
47278
47283
|
})(QueueOperationType || (QueueOperationType = {}));
|
|
47279
47284
|
|
|
47280
|
-
const { keys: keys$
|
|
47285
|
+
const { keys: keys$3, create: create$3, assign: assign$3, values: values$2 } = Object;
|
|
47281
47286
|
const { stringify: stringify$3, parse: parse$3 } = JSON;
|
|
47282
47287
|
const { isArray: isArray$2$1 } = Array;
|
|
47283
47288
|
|
|
@@ -47648,7 +47653,7 @@
|
|
|
47648
47653
|
const queueOperations = handler.getQueueOperationsForCompletingDrafts(queue, action);
|
|
47649
47654
|
// write the queue operations to the store prior to ingesting the result
|
|
47650
47655
|
await this.draftStore.completeAction(queueOperations);
|
|
47651
|
-
await handler.handleActionCompleted(action, queueOperations, values$
|
|
47656
|
+
await handler.handleActionCompleted(action, queueOperations, values$2(this.handlers));
|
|
47652
47657
|
this.retryIntervalMilliseconds = 0;
|
|
47653
47658
|
this.uploadingActionId = undefined;
|
|
47654
47659
|
await this.notifyChangedListeners({
|
|
@@ -47854,7 +47859,7 @@
|
|
|
47854
47859
|
return pendingAction;
|
|
47855
47860
|
}
|
|
47856
47861
|
async setMetadata(actionId, metadata) {
|
|
47857
|
-
const keys$1 = keys$
|
|
47862
|
+
const keys$1 = keys$3(metadata);
|
|
47858
47863
|
const compatibleKeys = keys$1.filter((key) => {
|
|
47859
47864
|
const value = metadata[key];
|
|
47860
47865
|
return typeof key === 'string' && typeof value === 'string';
|
|
@@ -48021,7 +48026,7 @@
|
|
|
48021
48026
|
const waitForOngoingSync = this.syncPromise || Promise.resolve();
|
|
48022
48027
|
return waitForOngoingSync.then(() => {
|
|
48023
48028
|
const { draftStore } = this;
|
|
48024
|
-
const keys$1 = keys$
|
|
48029
|
+
const keys$1 = keys$3(draftStore);
|
|
48025
48030
|
const actionArray = [];
|
|
48026
48031
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48027
48032
|
const key = keys$1[i];
|
|
@@ -48046,7 +48051,7 @@
|
|
|
48046
48051
|
deleteByTag(tag) {
|
|
48047
48052
|
const deleteAction = () => {
|
|
48048
48053
|
const { draftStore } = this;
|
|
48049
|
-
const keys$1 = keys$
|
|
48054
|
+
const keys$1 = keys$3(draftStore);
|
|
48050
48055
|
const durableKeys = [];
|
|
48051
48056
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48052
48057
|
const key = keys$1[i];
|
|
@@ -48098,7 +48103,7 @@
|
|
|
48098
48103
|
return this.enqueueAction(action);
|
|
48099
48104
|
}
|
|
48100
48105
|
getCount() {
|
|
48101
|
-
return keys$
|
|
48106
|
+
return keys$3(this.draftStore).length;
|
|
48102
48107
|
}
|
|
48103
48108
|
/**
|
|
48104
48109
|
* Runs a write operation against the draft store, if the initial
|
|
@@ -48139,7 +48144,7 @@
|
|
|
48139
48144
|
return this.runQueuedOperations();
|
|
48140
48145
|
}
|
|
48141
48146
|
const { draftStore } = this;
|
|
48142
|
-
const keys$1 = keys$
|
|
48147
|
+
const keys$1 = keys$3(durableEntries);
|
|
48143
48148
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
48144
48149
|
const entry = durableEntries[keys$1[i]];
|
|
48145
48150
|
const action = entry.data;
|
|
@@ -48248,13 +48253,6 @@
|
|
|
48248
48253
|
}
|
|
48249
48254
|
class DraftManager {
|
|
48250
48255
|
shouldEmitEvent(event) {
|
|
48251
|
-
// Waiting events cannot be emitted prior to 252 native clients
|
|
48252
|
-
// TODO [W-16102411]: we can safely remove this backwards compatible code in 256
|
|
48253
|
-
if (isDraftQueueStateChangeEvent(event) &&
|
|
48254
|
-
event.state === DraftQueueState.Waiting &&
|
|
48255
|
-
this.listenerVersion === undefined) {
|
|
48256
|
-
return false;
|
|
48257
|
-
}
|
|
48258
48256
|
return this.draftEventsShouldBeEmitted.includes(event.type);
|
|
48259
48257
|
}
|
|
48260
48258
|
constructor(draftQueue) {
|
|
@@ -48412,7 +48410,7 @@
|
|
|
48412
48410
|
return this.buildDraftQueueItem(action);
|
|
48413
48411
|
}
|
|
48414
48412
|
isValidFieldMap(fields) {
|
|
48415
|
-
const keys$1 = keys$
|
|
48413
|
+
const keys$1 = keys$3(fields);
|
|
48416
48414
|
const validTypes = ['string', 'number', 'boolean'];
|
|
48417
48415
|
for (let i = 0; i < keys$1.length; i++) {
|
|
48418
48416
|
const key = keys$1[i];
|
|
@@ -48685,7 +48683,7 @@
|
|
|
48685
48683
|
}
|
|
48686
48684
|
const keyPrefix$2 = 'UiApi';
|
|
48687
48685
|
|
|
48688
|
-
const { assign: assign$
|
|
48686
|
+
const { assign: assign$2, create: create$2$1, entries: entries$2, freeze: freeze$2, isFrozen: isFrozen$2, keys: keys$2$1, values: values$1 } = Object;
|
|
48689
48687
|
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
48690
48688
|
const { split, endsWith } = String.prototype;
|
|
48691
48689
|
const { from: from$1, isArray: isArray$1$1 } = Array;
|
|
@@ -48714,7 +48712,7 @@
|
|
|
48714
48712
|
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
48715
48713
|
result[value[i]] = true;
|
|
48716
48714
|
}
|
|
48717
|
-
return keys$
|
|
48715
|
+
return keys$2$1(result);
|
|
48718
48716
|
}
|
|
48719
48717
|
/**
|
|
48720
48718
|
* @param source The array of string to filter
|
|
@@ -49484,14 +49482,14 @@
|
|
|
49484
49482
|
mergeable: true,
|
|
49485
49483
|
});
|
|
49486
49484
|
const input_childRelationships = input.childRelationships;
|
|
49487
|
-
const input_childRelationships_keys = keys$
|
|
49485
|
+
const input_childRelationships_keys = keys$2$1(input_childRelationships);
|
|
49488
49486
|
const input_childRelationships_length = input_childRelationships_keys.length;
|
|
49489
49487
|
for (let i = 0; i < input_childRelationships_length; i++) {
|
|
49490
49488
|
const key = input_childRelationships_keys[i];
|
|
49491
49489
|
getTypeCacheKeys$1t(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
|
|
49492
49490
|
}
|
|
49493
49491
|
const input_fields = input.fields;
|
|
49494
|
-
const field_values = keys$
|
|
49492
|
+
const field_values = keys$2$1(input_fields);
|
|
49495
49493
|
const input_fields_length = field_values.length;
|
|
49496
49494
|
for (let i = 0; i < input_fields_length; i++) {
|
|
49497
49495
|
const field_value = input_fields[field_values[i]];
|
|
@@ -49781,7 +49779,7 @@
|
|
|
49781
49779
|
function createPathSelection(propertyName, fieldDefinition) {
|
|
49782
49780
|
const fieldsSelection = [];
|
|
49783
49781
|
const { children } = fieldDefinition;
|
|
49784
|
-
const childrenKeys = keys$
|
|
49782
|
+
const childrenKeys = keys$2$1(children);
|
|
49785
49783
|
for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
|
|
49786
49784
|
const childKey = childrenKeys[i];
|
|
49787
49785
|
const childFieldDefinition = children[childKey];
|
|
@@ -49832,7 +49830,7 @@
|
|
|
49832
49830
|
*/
|
|
49833
49831
|
function createPathSelectionFromValue(fields) {
|
|
49834
49832
|
const fieldsSelections = [];
|
|
49835
|
-
const fieldNames = keys$
|
|
49833
|
+
const fieldNames = keys$2$1(fields);
|
|
49836
49834
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49837
49835
|
const fieldName = fieldNames[i];
|
|
49838
49836
|
const { value: fieldValue } = fields[fieldName];
|
|
@@ -49877,7 +49875,7 @@
|
|
|
49877
49875
|
}
|
|
49878
49876
|
function extractRecordFieldsRecursively(record) {
|
|
49879
49877
|
const fields = [];
|
|
49880
|
-
const fieldNames = keys$
|
|
49878
|
+
const fieldNames = keys$2$1(record.fields);
|
|
49881
49879
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
49882
49880
|
const fieldName = fieldNames[i];
|
|
49883
49881
|
const { value: fieldValue } = record.fields[fieldName];
|
|
@@ -50138,7 +50136,7 @@
|
|
|
50138
50136
|
// RecordRepresentationNormalized['fields'] to include `pending:true` property
|
|
50139
50137
|
const mergedFields = { ...newRecord.fields };
|
|
50140
50138
|
const merged = { ...newRecord, fields: mergedFields };
|
|
50141
|
-
const existingFields = keys$
|
|
50139
|
+
const existingFields = keys$2$1(oldRecord.fields);
|
|
50142
50140
|
for (let i = 0, len = existingFields.length; i < len; i += 1) {
|
|
50143
50141
|
const spanningFieldName = existingFields[i];
|
|
50144
50142
|
if (newRecord.fields[spanningFieldName] === undefined) {
|
|
@@ -50255,7 +50253,7 @@
|
|
|
50255
50253
|
if (isGraphNode(node)) {
|
|
50256
50254
|
const dependencies = node.retrieve();
|
|
50257
50255
|
if (dependencies !== null) {
|
|
50258
|
-
const depKeys = keys$
|
|
50256
|
+
const depKeys = keys$2$1(dependencies);
|
|
50259
50257
|
for (let i = 0, len = depKeys.length; i < len; i++) {
|
|
50260
50258
|
luvio.storeEvict(depKeys[i]);
|
|
50261
50259
|
}
|
|
@@ -50407,7 +50405,7 @@
|
|
|
50407
50405
|
}
|
|
50408
50406
|
for (let i = 0; i < fieldSubtries.length; i++) {
|
|
50409
50407
|
const subtrie = fieldSubtries[i];
|
|
50410
|
-
const fieldNames = keys$
|
|
50408
|
+
const fieldNames = keys$2$1(subtrie.children);
|
|
50411
50409
|
for (let i = 0; i < fieldNames.length; i++) {
|
|
50412
50410
|
const fieldName = fieldNames[i];
|
|
50413
50411
|
const childTrie = subtrie.children[fieldName];
|
|
@@ -50529,13 +50527,13 @@
|
|
|
50529
50527
|
return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
|
|
50530
50528
|
}
|
|
50531
50529
|
function convertTrieToFields(root) {
|
|
50532
|
-
if (keys$
|
|
50530
|
+
if (keys$2$1(root.children).length === 0) {
|
|
50533
50531
|
return [];
|
|
50534
50532
|
}
|
|
50535
50533
|
return convertTrieToFieldsRecursively(root);
|
|
50536
50534
|
}
|
|
50537
50535
|
function convertTrieToFieldsRecursively(root) {
|
|
50538
|
-
const childKeys = keys$
|
|
50536
|
+
const childKeys = keys$2$1(root.children);
|
|
50539
50537
|
if (childKeys.length === 0) {
|
|
50540
50538
|
if (root.name === '') {
|
|
50541
50539
|
return [];
|
|
@@ -50544,7 +50542,7 @@
|
|
|
50544
50542
|
}
|
|
50545
50543
|
return reduce$2.call(childKeys, (acc, cur) => concat$2.call(acc, convertTrieToFieldsRecursively(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
|
|
50546
50544
|
}
|
|
50547
|
-
const BLANK_RECORD_FIELDS_TRIE = freeze$
|
|
50545
|
+
const BLANK_RECORD_FIELDS_TRIE = freeze$2({
|
|
50548
50546
|
name: '',
|
|
50549
50547
|
children: {},
|
|
50550
50548
|
});
|
|
@@ -50572,7 +50570,7 @@
|
|
|
50572
50570
|
function mergeFieldsTries(rootA, rootB) {
|
|
50573
50571
|
const rootAchildren = rootA.children;
|
|
50574
50572
|
const rootBchildren = rootB.children;
|
|
50575
|
-
const childBKeys = keys$
|
|
50573
|
+
const childBKeys = keys$2$1(rootBchildren);
|
|
50576
50574
|
for (let i = 0, len = childBKeys.length; i < len; i++) {
|
|
50577
50575
|
const childBKey = childBKeys[i];
|
|
50578
50576
|
if (rootAchildren[childBKey] === undefined) {
|
|
@@ -50727,8 +50725,8 @@
|
|
|
50727
50725
|
}
|
|
50728
50726
|
const childrenA = a.children;
|
|
50729
50727
|
const childrenB = b.children;
|
|
50730
|
-
const childKeysA = keys$
|
|
50731
|
-
const childKeysB = keys$
|
|
50728
|
+
const childKeysA = keys$2$1(childrenA);
|
|
50729
|
+
const childKeysB = keys$2$1(childrenB);
|
|
50732
50730
|
const childKeysBLength = childKeysB.length;
|
|
50733
50731
|
if (childKeysBLength > childKeysA.length) {
|
|
50734
50732
|
return false;
|
|
@@ -50782,9 +50780,9 @@
|
|
|
50782
50780
|
return false;
|
|
50783
50781
|
}
|
|
50784
50782
|
}
|
|
50785
|
-
const headersKeys = keys$
|
|
50783
|
+
const headersKeys = keys$2$1(headers);
|
|
50786
50784
|
const headersKeyLength = headersKeys.length;
|
|
50787
|
-
if (headersKeyLength !== keys$
|
|
50785
|
+
if (headersKeyLength !== keys$2$1(existingHeaders).length) {
|
|
50788
50786
|
return false;
|
|
50789
50787
|
}
|
|
50790
50788
|
for (let i = 0, len = headersKeyLength; i < len; i++) {
|
|
@@ -51417,7 +51415,7 @@
|
|
|
51417
51415
|
|
|
51418
51416
|
// iterate through the map to build configs for network calls
|
|
51419
51417
|
function resolveConflict(luvio, map) {
|
|
51420
|
-
const ids = keys$
|
|
51418
|
+
const ids = keys$2$1(map.conflicts);
|
|
51421
51419
|
if (ids.length === 0) {
|
|
51422
51420
|
return;
|
|
51423
51421
|
}
|
|
@@ -52559,18 +52557,18 @@
|
|
|
52559
52557
|
return {
|
|
52560
52558
|
getRecordSelectionFieldSets() {
|
|
52561
52559
|
const optionalPlusDefaultFields = { ...optionalFields_ };
|
|
52562
|
-
const fields = keys$
|
|
52560
|
+
const fields = keys$2$1(defaultFields_);
|
|
52563
52561
|
for (let i = 0; i < fields.length; ++i) {
|
|
52564
52562
|
const field = fields[i];
|
|
52565
52563
|
if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
|
|
52566
52564
|
optionalPlusDefaultFields[field] = true;
|
|
52567
52565
|
}
|
|
52568
52566
|
}
|
|
52569
|
-
return [keys$
|
|
52567
|
+
return [keys$2$1(fields_).sort(), keys$2$1(optionalPlusDefaultFields).sort()];
|
|
52570
52568
|
},
|
|
52571
52569
|
processRecords(records) {
|
|
52572
52570
|
const { missingFields } = defaultServerFieldStatus;
|
|
52573
|
-
const fields = keys$
|
|
52571
|
+
const fields = keys$2$1(missingFields);
|
|
52574
52572
|
for (let i = 0; i < fields.length; ++i) {
|
|
52575
52573
|
const field = fields[i], splitField = field.split('.').slice(1);
|
|
52576
52574
|
for (let i = 0; i < records.length; ++i) {
|
|
@@ -54914,7 +54912,7 @@
|
|
|
54914
54912
|
const lookupFields = {};
|
|
54915
54913
|
const { apiName, fields: recordFields } = record;
|
|
54916
54914
|
const { fields: objectInfoFields } = objectInfo;
|
|
54917
|
-
const objectInfoFieldNames = keys$
|
|
54915
|
+
const objectInfoFieldNames = keys$2$1(objectInfoFields);
|
|
54918
54916
|
for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
|
|
54919
54917
|
const fieldName = objectInfoFieldNames[i];
|
|
54920
54918
|
const field = objectInfoFields[fieldName];
|
|
@@ -54933,12 +54931,12 @@
|
|
|
54933
54931
|
const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
|
|
54934
54932
|
lookupFields[nameField] = true;
|
|
54935
54933
|
}
|
|
54936
|
-
return keys$
|
|
54934
|
+
return keys$2$1(lookupFields);
|
|
54937
54935
|
}
|
|
54938
54936
|
function getRecordUiMissingRecordLookupFields(recordUi) {
|
|
54939
54937
|
const { records, objectInfos } = recordUi;
|
|
54940
54938
|
const recordLookupFields = {};
|
|
54941
|
-
const recordIds = keys$
|
|
54939
|
+
const recordIds = keys$2$1(records);
|
|
54942
54940
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
54943
54941
|
const recordId = recordIds[i];
|
|
54944
54942
|
const recordData = records[recordId];
|
|
@@ -54976,19 +54974,19 @@
|
|
|
54976
54974
|
}
|
|
54977
54975
|
function eachLayout(recordUi, cb) {
|
|
54978
54976
|
const { layouts } = recordUi;
|
|
54979
|
-
const layoutApiNames = keys$
|
|
54977
|
+
const layoutApiNames = keys$2$1(layouts);
|
|
54980
54978
|
for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
|
|
54981
54979
|
const apiName = layoutApiNames[a];
|
|
54982
54980
|
const apiNameData = layouts[apiName];
|
|
54983
|
-
const recordTypeIds = keys$
|
|
54981
|
+
const recordTypeIds = keys$2$1(apiNameData);
|
|
54984
54982
|
for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
|
|
54985
54983
|
const recordTypeId = recordTypeIds[b];
|
|
54986
54984
|
const recordTypeData = apiNameData[recordTypeId];
|
|
54987
|
-
const layoutTypes = keys$
|
|
54985
|
+
const layoutTypes = keys$2$1(recordTypeData);
|
|
54988
54986
|
for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
|
|
54989
54987
|
const layoutType = layoutTypes[c];
|
|
54990
54988
|
const layoutTypeData = recordTypeData[layoutType];
|
|
54991
|
-
const modes = keys$
|
|
54989
|
+
const modes = keys$2$1(layoutTypeData);
|
|
54992
54990
|
for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
|
|
54993
54991
|
const mode = modes[d];
|
|
54994
54992
|
const layout = layoutTypeData[mode];
|
|
@@ -55194,14 +55192,14 @@
|
|
|
55194
55192
|
function publishDependencies(luvio, recordIds, depKeys) {
|
|
55195
55193
|
for (let i = 0, len = recordIds.length; i < len; i += 1) {
|
|
55196
55194
|
const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
|
|
55197
|
-
const dependencies = create$
|
|
55195
|
+
const dependencies = create$2$1(null);
|
|
55198
55196
|
for (let j = 0, len = depKeys.length; j < len; j++) {
|
|
55199
55197
|
dependencies[depKeys[j]] = true;
|
|
55200
55198
|
}
|
|
55201
55199
|
const node = luvio.getNode(recordDepKey);
|
|
55202
55200
|
if (isGraphNode(node)) {
|
|
55203
55201
|
const recordDeps = node.retrieve();
|
|
55204
|
-
assign$
|
|
55202
|
+
assign$2(dependencies, recordDeps);
|
|
55205
55203
|
}
|
|
55206
55204
|
luvio.storePublish(recordDepKey, dependencies);
|
|
55207
55205
|
}
|
|
@@ -55387,11 +55385,11 @@
|
|
|
55387
55385
|
function getFieldsFromLayoutMap(layoutMap, objectInfo) {
|
|
55388
55386
|
let fields = [];
|
|
55389
55387
|
let optionalFields = [];
|
|
55390
|
-
const layoutTypes = keys$
|
|
55388
|
+
const layoutTypes = keys$2$1(layoutMap);
|
|
55391
55389
|
for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
|
|
55392
55390
|
const layoutType = layoutTypes[i];
|
|
55393
55391
|
const modesMap = layoutMap[layoutType];
|
|
55394
|
-
const modes = keys$
|
|
55392
|
+
const modes = keys$2$1(modesMap);
|
|
55395
55393
|
for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
|
|
55396
55394
|
const mode = modes[m];
|
|
55397
55395
|
const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
|
|
@@ -55427,7 +55425,7 @@
|
|
|
55427
55425
|
return getRecord(luvio, refresh, recordId, [], implicitFields);
|
|
55428
55426
|
}
|
|
55429
55427
|
function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
|
|
55430
|
-
const fields = keys$
|
|
55428
|
+
const fields = keys$2$1(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
|
|
55431
55429
|
// W-12697744
|
|
55432
55430
|
// Set the implicit fields received from the server in adapter context
|
|
55433
55431
|
// This ensures that the implicit fields are available when data is read locally or from durable store
|
|
@@ -55673,7 +55671,7 @@
|
|
|
55673
55671
|
}
|
|
55674
55672
|
const { layoutType, mode, snapshot } = container;
|
|
55675
55673
|
if (wrapper.layoutMap[layoutType] === undefined) {
|
|
55676
|
-
wrapper.layoutMap = assign$
|
|
55674
|
+
wrapper.layoutMap = assign$2({}, wrapper.layoutMap, {
|
|
55677
55675
|
[layoutType]: {},
|
|
55678
55676
|
});
|
|
55679
55677
|
}
|
|
@@ -56210,7 +56208,7 @@
|
|
|
56210
56208
|
}
|
|
56211
56209
|
}
|
|
56212
56210
|
if (records.length > 0) {
|
|
56213
|
-
assign$
|
|
56211
|
+
assign$2(config, { records });
|
|
56214
56212
|
}
|
|
56215
56213
|
}
|
|
56216
56214
|
return config;
|
|
@@ -65888,9 +65886,7 @@
|
|
|
65888
65886
|
: new Map();
|
|
65889
65887
|
const { fieldsBag, trie } = createFieldsBagAndTrie$1(data, requestedFields, state);
|
|
65890
65888
|
const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
|
|
65891
|
-
if (
|
|
65892
|
-
recordTypeId &&
|
|
65893
|
-
recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65889
|
+
if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
|
|
65894
65890
|
const fieldName = 'RecordTypeId';
|
|
65895
65891
|
fieldsBag[fieldName] = {
|
|
65896
65892
|
value: recordTypeId,
|
|
@@ -66226,7 +66222,7 @@
|
|
|
66226
66222
|
*/
|
|
66227
66223
|
|
|
66228
66224
|
|
|
66229
|
-
function isStoreKeyRecordId
|
|
66225
|
+
function isStoreKeyRecordId(key) {
|
|
66230
66226
|
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
66231
66227
|
}
|
|
66232
66228
|
function objectsDeepEqual(lhs, rhs) {
|
|
@@ -78949,7 +78945,7 @@
|
|
|
78949
78945
|
*/
|
|
78950
78946
|
function filterOutReferenceNonScalarFields(record) {
|
|
78951
78947
|
const filteredFields = {};
|
|
78952
|
-
const fieldNames = keys$
|
|
78948
|
+
const fieldNames = keys$2$1(record.fields);
|
|
78953
78949
|
for (const fieldName of fieldNames) {
|
|
78954
78950
|
const field = record.fields[fieldName];
|
|
78955
78951
|
if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
|
|
@@ -79055,7 +79051,7 @@
|
|
|
79055
79051
|
const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
|
|
79056
79052
|
return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
|
|
79057
79053
|
};
|
|
79058
|
-
return create$
|
|
79054
|
+
return create$2$1(env, {
|
|
79059
79055
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79060
79056
|
});
|
|
79061
79057
|
}
|
|
@@ -79233,7 +79229,7 @@
|
|
|
79233
79229
|
return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
|
|
79234
79230
|
}));
|
|
79235
79231
|
};
|
|
79236
|
-
return create$
|
|
79232
|
+
return create$2$1(env, {
|
|
79237
79233
|
dispatchResourceRequest: { value: dispatchResourceRequest },
|
|
79238
79234
|
});
|
|
79239
79235
|
}
|
|
@@ -79243,7 +79239,7 @@
|
|
|
79243
79239
|
const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
|
|
79244
79240
|
return synthesizer(luvio, environment, options);
|
|
79245
79241
|
}, env);
|
|
79246
|
-
return create$
|
|
79242
|
+
return create$2$1(adapterSpecificEnvironments, {});
|
|
79247
79243
|
}
|
|
79248
79244
|
|
|
79249
79245
|
const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
|
|
@@ -79793,7 +79789,7 @@
|
|
|
79793
79789
|
pendingAction.data.method !== 'delete' && //'delete' action does not have fields
|
|
79794
79790
|
objectInfo) {
|
|
79795
79791
|
const appendedFields = this.getBackdatingFields(objectInfo, resolvedRequest.method, pendingAction);
|
|
79796
|
-
if (keys$
|
|
79792
|
+
if (keys$2$1(appendedFields).length > 0) {
|
|
79797
79793
|
pendingAction.data.body = {
|
|
79798
79794
|
...pendingAction.data.body,
|
|
79799
79795
|
fields: {
|
|
@@ -79807,7 +79803,7 @@
|
|
|
79807
79803
|
}
|
|
79808
79804
|
getBackdatingFields(objectInfo, requestMethod, pendingAction) {
|
|
79809
79805
|
const fields = {};
|
|
79810
|
-
const actionFieldNames = keys$
|
|
79806
|
+
const actionFieldNames = keys$2$1(pendingAction.data.body.fields);
|
|
79811
79807
|
if (requestMethod === 'post') {
|
|
79812
79808
|
// `CreateRecord` with `CreatedDate` field
|
|
79813
79809
|
if (isBackdatingFieldEditable(objectInfo, DEFAULT_FIELD_CREATED_DATE$1, 'createable', actionFieldNames)) {
|
|
@@ -79853,7 +79849,7 @@
|
|
|
79853
79849
|
return;
|
|
79854
79850
|
}
|
|
79855
79851
|
const objectInfo = objectInfoMap[apiName];
|
|
79856
|
-
const optionalFields = values$
|
|
79852
|
+
const optionalFields = values$1(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
|
|
79857
79853
|
await getAdapterData(this.getRecordAdapter, {
|
|
79858
79854
|
recordId: referenceFieldInfo.id,
|
|
79859
79855
|
optionalFields,
|
|
@@ -79872,7 +79868,7 @@
|
|
|
79872
79868
|
const referenceToInfos = fieldInfo.referenceToInfos;
|
|
79873
79869
|
const apiNames = referenceToInfos.map((referenceToInfo) => referenceToInfo.apiName);
|
|
79874
79870
|
const objectInfoMap = await this.objectInfoService.getObjectInfos(apiNames);
|
|
79875
|
-
for (const objectInfo of values$
|
|
79871
|
+
for (const objectInfo of values$1(objectInfoMap)) {
|
|
79876
79872
|
const { apiName, keyPrefix } = objectInfo;
|
|
79877
79873
|
if (keyPrefix !== null && id.startsWith(keyPrefix)) {
|
|
79878
79874
|
return apiName;
|
|
@@ -79958,7 +79954,7 @@
|
|
|
79958
79954
|
let resolvedUrlParams = request.urlParams;
|
|
79959
79955
|
if (request.method === 'post' || request.method === 'patch') {
|
|
79960
79956
|
const bodyFields = resolvedBody.fields;
|
|
79961
|
-
const fieldNames = keys$
|
|
79957
|
+
const fieldNames = keys$2$1(bodyFields);
|
|
79962
79958
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
79963
79959
|
const fieldName = fieldNames[i];
|
|
79964
79960
|
const fieldValue = bodyFields[fieldName];
|
|
@@ -80114,7 +80110,7 @@
|
|
|
80114
80110
|
};
|
|
80115
80111
|
}
|
|
80116
80112
|
const referenceFields = [];
|
|
80117
|
-
const fieldNames = keys$
|
|
80113
|
+
const fieldNames = keys$2$1(fields);
|
|
80118
80114
|
const unexpectedFields = [];
|
|
80119
80115
|
for (const field of fieldNames) {
|
|
80120
80116
|
const fieldInfo = objectInfo.fields[field];
|
|
@@ -80176,11 +80172,13 @@
|
|
|
80176
80172
|
|
|
80177
80173
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
80178
80174
|
class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
|
|
80179
|
-
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
|
|
80175
|
+
constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
|
|
80180
80176
|
super(draftQueue, networkAdapter, getLuvio, draftRecordService);
|
|
80181
80177
|
this.draftRecordService = draftRecordService;
|
|
80182
80178
|
this.isDraftId = isDraftId;
|
|
80183
80179
|
this.sideEffectService = sideEffectService;
|
|
80180
|
+
this.objectInfoService = objectInfoService;
|
|
80181
|
+
this.getRecord = getRecord;
|
|
80184
80182
|
this.handlerId = QUICK_ACTION_HANDLER;
|
|
80185
80183
|
draftRecordService.registerRecordHandler(this);
|
|
80186
80184
|
}
|
|
@@ -80212,6 +80210,30 @@
|
|
|
80212
80210
|
});
|
|
80213
80211
|
luvio.storeIngest(key, ingest$B$2, response);
|
|
80214
80212
|
}
|
|
80213
|
+
async handleActionCompleted(action, queueOperations) {
|
|
80214
|
+
await super.handleActionCompleted(action, queueOperations);
|
|
80215
|
+
this.getLuvio();
|
|
80216
|
+
const canonicalId = action.response.body.id;
|
|
80217
|
+
this.buildTagForTargetId(canonicalId);
|
|
80218
|
+
const prefix = canonicalId.substring(0, 3);
|
|
80219
|
+
if (prefix.length !== 3) {
|
|
80220
|
+
// if we can't get a prefix, don't do the rest
|
|
80221
|
+
return;
|
|
80222
|
+
}
|
|
80223
|
+
const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
|
|
80224
|
+
const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
|
|
80225
|
+
if (!objectInfo) {
|
|
80226
|
+
return;
|
|
80227
|
+
}
|
|
80228
|
+
await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
|
|
80229
|
+
}
|
|
80230
|
+
allFields(objectInfo) {
|
|
80231
|
+
let fields = [];
|
|
80232
|
+
Object.keys(objectInfo.fields).forEach((fieldName) => {
|
|
80233
|
+
fields.push(objectInfo.apiName + '.' + fieldName);
|
|
80234
|
+
});
|
|
80235
|
+
return fields;
|
|
80236
|
+
}
|
|
80215
80237
|
mergeRequestBody() {
|
|
80216
80238
|
throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
|
|
80217
80239
|
}
|
|
@@ -80462,7 +80484,7 @@
|
|
|
80462
80484
|
...trimmedDownData.contentVersion,
|
|
80463
80485
|
fields: cvFields,
|
|
80464
80486
|
};
|
|
80465
|
-
freeze$
|
|
80487
|
+
freeze$2(trimmedDownData);
|
|
80466
80488
|
eventEmitter({ type: 'create-content-document-and-version-draft-finished' });
|
|
80467
80489
|
return {
|
|
80468
80490
|
state: 'Fulfilled',
|
|
@@ -81396,7 +81418,7 @@
|
|
|
81396
81418
|
return predicate;
|
|
81397
81419
|
}
|
|
81398
81420
|
else if (literal !== undefined) {
|
|
81399
|
-
const isAvailableLiteral = values$
|
|
81421
|
+
const isAvailableLiteral = values$1(DateLiteral).includes(literal);
|
|
81400
81422
|
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
81401
81423
|
if (!isAvailableLiteral)
|
|
81402
81424
|
throw new Error(`${literal} is not a valid DateLiteral`);
|
|
@@ -81410,7 +81432,7 @@
|
|
|
81410
81432
|
}
|
|
81411
81433
|
function dateTimeRange(input, op, field, alias) {
|
|
81412
81434
|
const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
|
|
81413
|
-
const key = keys$
|
|
81435
|
+
const key = keys$2$1(input)[0];
|
|
81414
81436
|
let operator = op;
|
|
81415
81437
|
if (operator === '=')
|
|
81416
81438
|
operator = 'BETWEEN';
|
|
@@ -81710,7 +81732,7 @@
|
|
|
81710
81732
|
if (!where)
|
|
81711
81733
|
return [];
|
|
81712
81734
|
let predicates = [];
|
|
81713
|
-
const fields = keys$
|
|
81735
|
+
const fields = keys$2$1(where);
|
|
81714
81736
|
for (const field of fields) {
|
|
81715
81737
|
if (field === 'and' || field === 'or') {
|
|
81716
81738
|
predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
|
|
@@ -81763,7 +81785,7 @@
|
|
|
81763
81785
|
}
|
|
81764
81786
|
else {
|
|
81765
81787
|
// @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
|
|
81766
|
-
const entityNames = keys$
|
|
81788
|
+
const entityNames = keys$2$1(where[field]);
|
|
81767
81789
|
const polyPredicatesGroups = entityNames
|
|
81768
81790
|
.filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
|
|
81769
81791
|
.map((entityName) => {
|
|
@@ -81798,7 +81820,7 @@
|
|
|
81798
81820
|
}
|
|
81799
81821
|
else {
|
|
81800
81822
|
//`field` match the filedInfo's apiName
|
|
81801
|
-
for (const [op, value] of entries$
|
|
81823
|
+
for (const [op, value] of entries$2(where[field])) {
|
|
81802
81824
|
const operator = operatorToSql(op);
|
|
81803
81825
|
/**
|
|
81804
81826
|
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
@@ -82309,7 +82331,7 @@
|
|
|
82309
82331
|
for (const join of joins) {
|
|
82310
82332
|
deduped[join.alias + join.to] = join;
|
|
82311
82333
|
}
|
|
82312
|
-
return values$
|
|
82334
|
+
return values$1(deduped);
|
|
82313
82335
|
}
|
|
82314
82336
|
function buildJoins(config) {
|
|
82315
82337
|
let sql = '';
|
|
@@ -82984,7 +83006,7 @@
|
|
|
82984
83006
|
if (typeof json !== 'object') {
|
|
82985
83007
|
return currentLevel;
|
|
82986
83008
|
}
|
|
82987
|
-
const keys = keys$
|
|
83009
|
+
const keys = keys$2$1(json);
|
|
82988
83010
|
if (keys.length === 0)
|
|
82989
83011
|
return 0;
|
|
82990
83012
|
const depths = keys.map((key) => {
|
|
@@ -82997,7 +83019,7 @@
|
|
|
82997
83019
|
return previous.concat(current);
|
|
82998
83020
|
}
|
|
82999
83021
|
function findFieldInfo(objectInfo, fieldName) {
|
|
83000
|
-
return values$
|
|
83022
|
+
return values$1(objectInfo.fields).find((field) => field.apiName === fieldName ||
|
|
83001
83023
|
(field.dataType === 'Reference' && field.relationshipName === fieldName));
|
|
83002
83024
|
}
|
|
83003
83025
|
async function readIngestionTimestampForKey(key, query) {
|
|
@@ -83037,14 +83059,14 @@
|
|
|
83037
83059
|
return predicates;
|
|
83038
83060
|
const isSpanning = depth(orderBy) > 2;
|
|
83039
83061
|
if (isSpanning) {
|
|
83040
|
-
const keys = keys$
|
|
83062
|
+
const keys = keys$2$1(orderBy);
|
|
83041
83063
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83042
83064
|
const key = keys[i];
|
|
83043
83065
|
const parentFields = objectInfoMap[recordType].fields;
|
|
83044
|
-
const fieldInfo = values$
|
|
83066
|
+
const fieldInfo = values$1(parentFields).find(findSpanningField(key));
|
|
83045
83067
|
if (fieldInfo && fieldInfo.referenceToInfos.length > 0) {
|
|
83046
83068
|
const { apiName } = fieldInfo.referenceToInfos[0];
|
|
83047
|
-
const parentFieldInfo = values$
|
|
83069
|
+
const parentFieldInfo = values$1(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
|
|
83048
83070
|
if (parentFieldInfo !== undefined) {
|
|
83049
83071
|
const path = {
|
|
83050
83072
|
leftPath: `$.fields.${parentFieldInfo.apiName}.value`,
|
|
@@ -83067,7 +83089,7 @@
|
|
|
83067
83089
|
}
|
|
83068
83090
|
}
|
|
83069
83091
|
else {
|
|
83070
|
-
const keys = keys$
|
|
83092
|
+
const keys = keys$2$1(orderBy);
|
|
83071
83093
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
83072
83094
|
const key = keys[i];
|
|
83073
83095
|
if (!objectInfoMap[recordType])
|
|
@@ -84362,7 +84384,7 @@
|
|
|
84362
84384
|
variables,
|
|
84363
84385
|
fragmentMap: {},
|
|
84364
84386
|
});
|
|
84365
|
-
const filteredArgumentNodes = assign$
|
|
84387
|
+
const filteredArgumentNodes = assign$2([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
|
|
84366
84388
|
const argumentString = filteredArgumentNodes.length > 0
|
|
84367
84389
|
? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
|
|
84368
84390
|
: '';
|
|
@@ -84385,7 +84407,7 @@
|
|
|
84385
84407
|
let baseRecord = undefined;
|
|
84386
84408
|
// Concrete types for Polymorphic field
|
|
84387
84409
|
const polyTypes = [];
|
|
84388
|
-
for (const type of values$
|
|
84410
|
+
for (const type of values$1(schema.getTypeMap())) {
|
|
84389
84411
|
if (type.name === 'Record') {
|
|
84390
84412
|
recordInterface = type;
|
|
84391
84413
|
}
|
|
@@ -84398,7 +84420,7 @@
|
|
|
84398
84420
|
if (polyFields.find((fieldTypeName) => fieldTypeName === type.name) !== undefined) {
|
|
84399
84421
|
polyTypes.push(type);
|
|
84400
84422
|
}
|
|
84401
|
-
const fields = values$
|
|
84423
|
+
const fields = values$1(type.getFields());
|
|
84402
84424
|
// initialize the fields of current type with default behavior
|
|
84403
84425
|
for (const field of fields) {
|
|
84404
84426
|
field.resolve = defaultFieldResolver;
|
|
@@ -84777,7 +84799,7 @@
|
|
|
84777
84799
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84778
84800
|
let addedTypedScalars = new Set();
|
|
84779
84801
|
let allPolymorphicFieldTypeNames = new Set();
|
|
84780
|
-
for (const name of keys$
|
|
84802
|
+
for (const name of keys$2$1(objectInfoMap)) {
|
|
84781
84803
|
const objectInfo = objectInfoMap[name];
|
|
84782
84804
|
const { apiName } = objectInfo;
|
|
84783
84805
|
const type = schema.getType(apiName);
|
|
@@ -84846,7 +84868,7 @@
|
|
|
84846
84868
|
const { apiName, childRelationships, fields: fieldsRepresentation } = objectInfo;
|
|
84847
84869
|
typedScalars.add(`${apiName}_Filter`);
|
|
84848
84870
|
typedScalars.add(`${apiName}_OrderBy`);
|
|
84849
|
-
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$
|
|
84871
|
+
const { fields, polymorphicFieldTypeNames } = makeRecordField(values$1(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
|
|
84850
84872
|
// handles child relationship
|
|
84851
84873
|
const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
|
|
84852
84874
|
typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
|
|
@@ -84904,8 +84926,8 @@
|
|
|
84904
84926
|
// use a set to not allow duplicate scalars causing error(s)
|
|
84905
84927
|
let typedScalars = new Set();
|
|
84906
84928
|
let parentRelationshipFields = new Set();
|
|
84907
|
-
const existingFields = keys$
|
|
84908
|
-
const missingFields = values$
|
|
84929
|
+
const existingFields = keys$2$1(type.getFields());
|
|
84930
|
+
const missingFields = values$1(objectInfo.fields).filter((field) => {
|
|
84909
84931
|
return (existingFields.includes(field.apiName) === false ||
|
|
84910
84932
|
(field.relationshipName !== null && field.referenceToInfos.length > 0));
|
|
84911
84933
|
});
|
|
@@ -84987,7 +85009,7 @@
|
|
|
84987
85009
|
function makeRecordField(fieldRepresentations, objectInfo, objectInfoMap, existingParentRelationships, recordTypeInSchema, existingFields = []) {
|
|
84988
85010
|
const polymorphicFieldTypeNames = new Set();
|
|
84989
85011
|
let fields = ``;
|
|
84990
|
-
for (const field of values$
|
|
85012
|
+
for (const field of values$1(fieldRepresentations)) {
|
|
84991
85013
|
if (!fieldsStaticallyAdded.includes(field.apiName) && recordTypeInSchema === 'Missing') {
|
|
84992
85014
|
fields += `${field.apiName}: ${graphqlTypeForField(field, objectInfo)}\n`;
|
|
84993
85015
|
}
|
|
@@ -85555,7 +85577,7 @@
|
|
|
85555
85577
|
const objectInfo = objectInfos[apiName[0]];
|
|
85556
85578
|
if (!objectInfo)
|
|
85557
85579
|
return false;
|
|
85558
|
-
return values$
|
|
85580
|
+
return values$1(objectInfo.fields).some((fieldInfo) => {
|
|
85559
85581
|
return (fieldInfo.apiName === 'OwnerId' &&
|
|
85560
85582
|
fieldInfo.referenceToInfos.some((referenceToInfo) => {
|
|
85561
85583
|
return referenceToInfo.apiName === 'User';
|
|
@@ -85765,7 +85787,7 @@
|
|
|
85765
85787
|
// eslint-disable-next-line
|
|
85766
85788
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85767
85789
|
}
|
|
85768
|
-
if (keys$
|
|
85790
|
+
if (keys$2$1(objectInfos).length < startNodes.size) {
|
|
85769
85791
|
// eslint-disable-next-line
|
|
85770
85792
|
throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
|
|
85771
85793
|
}
|
|
@@ -86793,7 +86815,7 @@
|
|
|
86793
86815
|
output.data.uiapi = { ...output.data.uiapi };
|
|
86794
86816
|
output.data.uiapi.query = { ...output.data.uiapi.query };
|
|
86795
86817
|
const outputApiParent = output.data.uiapi.query;
|
|
86796
|
-
const keys = keys$
|
|
86818
|
+
const keys = keys$2$1(nodeJson);
|
|
86797
86819
|
keys.forEach((recordName) => {
|
|
86798
86820
|
const outputApi = {};
|
|
86799
86821
|
// Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
|
|
@@ -86813,7 +86835,7 @@
|
|
|
86813
86835
|
* @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
|
|
86814
86836
|
*/
|
|
86815
86837
|
function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
86816
|
-
const keys = keys$
|
|
86838
|
+
const keys = keys$2$1(jsonInput);
|
|
86817
86839
|
if (selection.selectionSet) {
|
|
86818
86840
|
createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
|
|
86819
86841
|
}
|
|
@@ -86822,7 +86844,7 @@
|
|
|
86822
86844
|
}
|
|
86823
86845
|
}
|
|
86824
86846
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
86825
|
-
const keys = keys$
|
|
86847
|
+
const keys = keys$2$1(jsonInput);
|
|
86826
86848
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
86827
86849
|
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
86828
86850
|
if (keys.includes(fieldName)) {
|
|
@@ -87230,7 +87252,7 @@
|
|
|
87230
87252
|
*/
|
|
87231
87253
|
function findFieldTypeInObjectInfo(objectInfos, fieldType) {
|
|
87232
87254
|
let fieldsWithDataType = [];
|
|
87233
|
-
keys$
|
|
87255
|
+
keys$2$1(objectInfos).filter((recordType) => {
|
|
87234
87256
|
for (const field in objectInfos[recordType].fields) {
|
|
87235
87257
|
if (objectInfos[recordType].fields[field].dataType === fieldType) {
|
|
87236
87258
|
fieldsWithDataType.push(field);
|
|
@@ -87261,7 +87283,7 @@
|
|
|
87261
87283
|
}
|
|
87262
87284
|
else if (typeof object === 'object' && object !== null) {
|
|
87263
87285
|
let source = object;
|
|
87264
|
-
return keys$
|
|
87286
|
+
return keys$2$1(source).reduce((acc, key) => {
|
|
87265
87287
|
acc[key] = replace(source[key]);
|
|
87266
87288
|
return acc;
|
|
87267
87289
|
}, {});
|
|
@@ -87270,7 +87292,7 @@
|
|
|
87270
87292
|
return object;
|
|
87271
87293
|
}
|
|
87272
87294
|
};
|
|
87273
|
-
let newVariables = keys$
|
|
87295
|
+
let newVariables = keys$2$1(variables).reduce((acc, key) => {
|
|
87274
87296
|
acc[key] = replace(variables[key]);
|
|
87275
87297
|
return acc;
|
|
87276
87298
|
}, {});
|
|
@@ -87725,16 +87747,16 @@
|
|
|
87725
87747
|
*/
|
|
87726
87748
|
|
|
87727
87749
|
|
|
87728
|
-
const { keys: keys$
|
|
87750
|
+
const { keys: keys$1$1, create: create$1$1, assign: assign$1$1, entries: entries$1 } = Object;
|
|
87729
87751
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
87730
87752
|
const { push: push$3, join, slice } = Array.prototype;
|
|
87731
87753
|
const { isArray: isArray$4, from } = Array;
|
|
87732
87754
|
|
|
87733
87755
|
function ldsParamsToString(params) {
|
|
87734
|
-
const returnParams = create$
|
|
87735
|
-
const keys$1 = keys$
|
|
87736
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
87737
|
-
const key = keys$1[i];
|
|
87756
|
+
const returnParams = create$1$1(null);
|
|
87757
|
+
const keys$1$1$1 = keys$1$1(params);
|
|
87758
|
+
for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
|
|
87759
|
+
const key = keys$1$1$1[i];
|
|
87738
87760
|
const value = params[key];
|
|
87739
87761
|
if (value === undefined) {
|
|
87740
87762
|
// filter out params that have no value
|
|
@@ -87749,7 +87771,7 @@
|
|
|
87749
87771
|
else {
|
|
87750
87772
|
returnParams[key] = `${value}`;
|
|
87751
87773
|
}
|
|
87752
|
-
if (isObject(value) === true && keys$
|
|
87774
|
+
if (isObject(value) === true && keys$1$1(value).length > 0) {
|
|
87753
87775
|
returnParams[key] = stringify$1(value);
|
|
87754
87776
|
}
|
|
87755
87777
|
}
|
|
@@ -88148,7 +88170,7 @@
|
|
|
88148
88170
|
optionalFields,
|
|
88149
88171
|
};
|
|
88150
88172
|
const queryString = [];
|
|
88151
|
-
for (const [key, value] of entries$
|
|
88173
|
+
for (const [key, value] of entries$1(mergedParams)) {
|
|
88152
88174
|
if (value !== undefined) {
|
|
88153
88175
|
queryString.push(`${key}=${isArray$4(value) ? value.join(',') : value}`);
|
|
88154
88176
|
}
|
|
@@ -88164,7 +88186,7 @@
|
|
|
88164
88186
|
function mergeRecordFields(first, second) {
|
|
88165
88187
|
const { fields: targetFields } = first;
|
|
88166
88188
|
const { fields: sourceFields } = second;
|
|
88167
|
-
const fieldNames = keys$
|
|
88189
|
+
const fieldNames = keys$1$1(sourceFields);
|
|
88168
88190
|
for (let i = 0, len = fieldNames.length; i < len; i += 1) {
|
|
88169
88191
|
const fieldName = fieldNames[i];
|
|
88170
88192
|
const sourceField = sourceFields[fieldName];
|
|
@@ -88324,7 +88346,7 @@
|
|
|
88324
88346
|
const { baseUri, basePath, queryParams } = request;
|
|
88325
88347
|
let url = `${baseUri}${basePath}`;
|
|
88326
88348
|
if (queryParams) {
|
|
88327
|
-
const queryParamString = entries$
|
|
88349
|
+
const queryParamString = entries$1(queryParams)
|
|
88328
88350
|
.map(([key, value]) => `${key}=${value}`)
|
|
88329
88351
|
.join('&');
|
|
88330
88352
|
if (queryParamString) {
|
|
@@ -88755,7 +88777,7 @@
|
|
|
88755
88777
|
logError: false,
|
|
88756
88778
|
});
|
|
88757
88779
|
};
|
|
88758
|
-
const overriddenQueue = create$
|
|
88780
|
+
const overriddenQueue = create$2$1(queue, { mergeActions: { value: mergeActions } });
|
|
88759
88781
|
overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
|
|
88760
88782
|
switch (draftQueueEvent.type) {
|
|
88761
88783
|
case DraftQueueEventType.QueueStateChanged: {
|
|
@@ -88893,7 +88915,7 @@
|
|
|
88893
88915
|
function dataIsObjectInfo(key, data) {
|
|
88894
88916
|
return incomingObjectInfos.has(key);
|
|
88895
88917
|
}
|
|
88896
|
-
return create$
|
|
88918
|
+
return create$2$1(env, {
|
|
88897
88919
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
88898
88920
|
storePublish: { value: storePublish },
|
|
88899
88921
|
});
|
|
@@ -88994,8 +89016,8 @@
|
|
|
88994
89016
|
}
|
|
88995
89017
|
};
|
|
88996
89018
|
// Local in-memory cache for apiName to key prefixes
|
|
88997
|
-
this.apiNameToKeyPrefixMemoryCache = create$
|
|
88998
|
-
this.keyPrefixToApiNameMemoryCache = create$
|
|
89019
|
+
this.apiNameToKeyPrefixMemoryCache = create$2$1(null);
|
|
89020
|
+
this.keyPrefixToApiNameMemoryCache = create$2$1(null);
|
|
88999
89021
|
}
|
|
89000
89022
|
/**
|
|
89001
89023
|
* Size of return map not necessarily correlated with number of inputs. The
|
|
@@ -89151,7 +89173,7 @@
|
|
|
89151
89173
|
};
|
|
89152
89174
|
}
|
|
89153
89175
|
|
|
89154
|
-
const { keys: keys$
|
|
89176
|
+
const { keys: keys$6, create: create$5, assign: assign$5, entries, values } = Object;
|
|
89155
89177
|
const { stringify: stringify$5, parse: parse$5 } = JSON;
|
|
89156
89178
|
|
|
89157
89179
|
function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
|
|
@@ -89218,7 +89240,7 @@
|
|
|
89218
89240
|
},
|
|
89219
89241
|
conflictColumns: this.conflictColumnNames,
|
|
89220
89242
|
columns: this.columnNames,
|
|
89221
|
-
rows: keys$
|
|
89243
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89222
89244
|
const entry = entries[key];
|
|
89223
89245
|
const { data, metadata } = entry;
|
|
89224
89246
|
const row = [key, stringify$5(data), metadata ? stringify$5(metadata) : null];
|
|
@@ -89237,7 +89259,7 @@
|
|
|
89237
89259
|
type: 'setMetadata',
|
|
89238
89260
|
},
|
|
89239
89261
|
columns: [COLUMN_NAME_METADATA$1],
|
|
89240
|
-
values: keys$
|
|
89262
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89241
89263
|
const { metadata } = entries[key];
|
|
89242
89264
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89243
89265
|
values[key] = row;
|
|
@@ -89327,7 +89349,7 @@
|
|
|
89327
89349
|
},
|
|
89328
89350
|
conflictColumns: this.conflictColumnNames,
|
|
89329
89351
|
columns: this.columnNames,
|
|
89330
|
-
rows: keys$
|
|
89352
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89331
89353
|
const entry = entries[key];
|
|
89332
89354
|
const { data, metadata } = entry;
|
|
89333
89355
|
const row = [key, stringify$5(data)];
|
|
@@ -89353,7 +89375,7 @@
|
|
|
89353
89375
|
type: 'setMetadata',
|
|
89354
89376
|
},
|
|
89355
89377
|
columns: [COLUMN_NAME_METADATA],
|
|
89356
|
-
values: keys$
|
|
89378
|
+
values: keys$6(entries).reduce((values, key) => {
|
|
89357
89379
|
const { metadata } = entries[key];
|
|
89358
89380
|
const row = [metadata ? stringify$5(metadata) : null];
|
|
89359
89381
|
values[key] = row;
|
|
@@ -89362,7 +89384,7 @@
|
|
|
89362
89384
|
};
|
|
89363
89385
|
}
|
|
89364
89386
|
metadataToUpdateSQLQueries(entries, segment) {
|
|
89365
|
-
return keys$
|
|
89387
|
+
return keys$6(entries).reduce((accu, key) => {
|
|
89366
89388
|
const { metadata } = entries[key];
|
|
89367
89389
|
if (metadata !== undefined) {
|
|
89368
89390
|
accu.push({
|
|
@@ -89436,7 +89458,7 @@
|
|
|
89436
89458
|
.finally(() => tasker.done());
|
|
89437
89459
|
}
|
|
89438
89460
|
setEntries(entries, segment) {
|
|
89439
|
-
if (keys$
|
|
89461
|
+
if (keys$6(entries).length === 0) {
|
|
89440
89462
|
return Promise.resolve();
|
|
89441
89463
|
}
|
|
89442
89464
|
const table = this.getTable(segment);
|
|
@@ -89444,7 +89466,7 @@
|
|
|
89444
89466
|
return this.batchOperationAsPromise([upsertOperation]);
|
|
89445
89467
|
}
|
|
89446
89468
|
setMetadata(entries, segment) {
|
|
89447
|
-
if (keys$
|
|
89469
|
+
if (keys$6(entries).length === 0) {
|
|
89448
89470
|
return Promise.resolve();
|
|
89449
89471
|
}
|
|
89450
89472
|
const table = this.getTable(segment);
|
|
@@ -89454,13 +89476,13 @@
|
|
|
89454
89476
|
batchOperations(operations) {
|
|
89455
89477
|
const sqliteOperations = operations.reduce((acc, cur) => {
|
|
89456
89478
|
if (cur.type === 'setEntries') {
|
|
89457
|
-
if (keys$
|
|
89479
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89458
89480
|
const table = this.getTable(cur.segment);
|
|
89459
89481
|
acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
|
|
89460
89482
|
}
|
|
89461
89483
|
}
|
|
89462
89484
|
else if (cur.type === 'setMetadata') {
|
|
89463
|
-
if (keys$
|
|
89485
|
+
if (keys$6(cur.entries).length > 0) {
|
|
89464
89486
|
const table = this.getTable(cur.segment);
|
|
89465
89487
|
acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
|
|
89466
89488
|
}
|
|
@@ -89583,7 +89605,7 @@
|
|
|
89583
89605
|
},
|
|
89584
89606
|
conflictColumns: this.conflictColumnNames,
|
|
89585
89607
|
columns: this.columnNames,
|
|
89586
|
-
rows: keys$
|
|
89608
|
+
rows: keys$6(entries).reduce((rows, key) => {
|
|
89587
89609
|
const entry = entries[key];
|
|
89588
89610
|
rows.push([key, stringify$5(entry.data)]);
|
|
89589
89611
|
return rows;
|
|
@@ -89751,7 +89773,7 @@
|
|
|
89751
89773
|
}
|
|
89752
89774
|
return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
|
|
89753
89775
|
};
|
|
89754
|
-
return create$
|
|
89776
|
+
return create$2$1(environment, {
|
|
89755
89777
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
89756
89778
|
applyCachePolicy: { value: applyCachePolicy },
|
|
89757
89779
|
setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
|
|
@@ -91172,7 +91194,7 @@
|
|
|
91172
91194
|
const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
|
|
91173
91195
|
let deallocatedCount = 0;
|
|
91174
91196
|
const { pendingTrimKeys, retainedIds, storeRecords } = data;
|
|
91175
|
-
const storeKeyLength = keys$
|
|
91197
|
+
const storeKeyLength = keys$2$1(storeRecords).length;
|
|
91176
91198
|
if (storeKeyLength <= maxStoreRecords) {
|
|
91177
91199
|
return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
|
|
91178
91200
|
}
|
|
@@ -91248,78 +91270,6 @@
|
|
|
91248
91270
|
}
|
|
91249
91271
|
}
|
|
91250
91272
|
|
|
91251
|
-
/**
|
|
91252
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
91253
|
-
* All rights reserved.
|
|
91254
|
-
* For full license text, see the LICENSE.txt file
|
|
91255
|
-
*/
|
|
91256
|
-
|
|
91257
|
-
|
|
91258
|
-
const { keys: keys$7, values, create: create$6, assign: assign$6, freeze: freeze$3, entries } = Object;
|
|
91259
|
-
function isStoreKeyRecordId(key) {
|
|
91260
|
-
return key.indexOf(RECORD_ID_PREFIX$1) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION$1) === -1;
|
|
91261
|
-
}
|
|
91262
|
-
function isEntryDurableRecordRepresentation(entry, key) {
|
|
91263
|
-
// Either a DurableRecordRepresentation or StoreRecordError can live at a record key
|
|
91264
|
-
return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity$1(key)) &&
|
|
91265
|
-
entry.data.__type === undefined);
|
|
91266
|
-
}
|
|
91267
|
-
|
|
91268
|
-
// TODO [W-15983267]: this is here for backwards compatibility from <252 and can be removed in 256
|
|
91269
|
-
// This HOF ensures that missing links that are stored in the "links" property in the durable store get restored to the "fields" property.
|
|
91270
|
-
// this code is necessary for backwards compatibility with records that were stored in the durable store before the "links" property was removed.
|
|
91271
|
-
function makeDurableStoreBackwardsCompatible(durableStore) {
|
|
91272
|
-
const getEntries = function (entries, segment) {
|
|
91273
|
-
// this HOF only inspects records in the default segment
|
|
91274
|
-
if (segment !== DefaultDurableSegment) {
|
|
91275
|
-
return durableStore.getEntries(entries, segment);
|
|
91276
|
-
}
|
|
91277
|
-
const { length: entriesLength } = entries;
|
|
91278
|
-
if (entriesLength === 0) {
|
|
91279
|
-
return Promise.resolve({});
|
|
91280
|
-
}
|
|
91281
|
-
// call base getEntries
|
|
91282
|
-
return durableStore.getEntries(entries, segment).then((durableEntries) => {
|
|
91283
|
-
if (durableEntries === undefined) {
|
|
91284
|
-
return undefined;
|
|
91285
|
-
}
|
|
91286
|
-
const returnEntries = create$6(null);
|
|
91287
|
-
const keys$1 = keys$7(durableEntries);
|
|
91288
|
-
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
91289
|
-
const key = keys$1[i];
|
|
91290
|
-
const value = durableEntries[key];
|
|
91291
|
-
if (value === undefined) {
|
|
91292
|
-
continue;
|
|
91293
|
-
}
|
|
91294
|
-
if (isEntryDurableRecordRepresentation(value, key)) {
|
|
91295
|
-
const record = value.data;
|
|
91296
|
-
const { links } = record;
|
|
91297
|
-
if (links !== undefined) {
|
|
91298
|
-
const missingLinks = keys$7(links);
|
|
91299
|
-
for (let j = 0, len = missingLinks.length; j < len; j++) {
|
|
91300
|
-
const fieldName = missingLinks[j];
|
|
91301
|
-
const link = links[fieldName];
|
|
91302
|
-
if (link !== undefined && link.isMissing === true) {
|
|
91303
|
-
record.fields[fieldName] = {
|
|
91304
|
-
__state: { isMissing: true },
|
|
91305
|
-
value: undefined,
|
|
91306
|
-
displayValue: undefined,
|
|
91307
|
-
};
|
|
91308
|
-
}
|
|
91309
|
-
}
|
|
91310
|
-
delete record.links;
|
|
91311
|
-
}
|
|
91312
|
-
}
|
|
91313
|
-
returnEntries[key] = value;
|
|
91314
|
-
}
|
|
91315
|
-
return returnEntries;
|
|
91316
|
-
});
|
|
91317
|
-
};
|
|
91318
|
-
return create$6(durableStore, {
|
|
91319
|
-
getEntries: { value: getEntries, writable: true },
|
|
91320
|
-
});
|
|
91321
|
-
}
|
|
91322
|
-
|
|
91323
91273
|
function select$1$1(luvio, config) {
|
|
91324
91274
|
const { query, variables, operationName } = config;
|
|
91325
91275
|
return select$2$1(luvio, query, variables, operationName);
|
|
@@ -91887,7 +91837,7 @@
|
|
|
91887
91837
|
if (idsToFetch.size > 0) {
|
|
91888
91838
|
const effects = await durableStore.getEntries(Array.from(idsToFetch), SIDE_EFFECT_SEGMENT);
|
|
91889
91839
|
if (effects !== undefined) {
|
|
91890
|
-
keys$
|
|
91840
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91891
91841
|
const effect = effects[effectId].data;
|
|
91892
91842
|
const key = effect.uniqueId;
|
|
91893
91843
|
this.allEffects.set(key, effect);
|
|
@@ -91941,7 +91891,7 @@
|
|
|
91941
91891
|
if (effects === undefined) {
|
|
91942
91892
|
return;
|
|
91943
91893
|
}
|
|
91944
|
-
keys$
|
|
91894
|
+
keys$2$1(effects).forEach((effectId) => {
|
|
91945
91895
|
const effect = effects[effectId].data;
|
|
91946
91896
|
const key = effect.uniqueId;
|
|
91947
91897
|
this.allEffects.set(key, effect);
|
|
@@ -92012,7 +91962,7 @@
|
|
|
92012
91962
|
const draftFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92013
91963
|
const timestampString = new Date(timestamp).toISOString();
|
|
92014
91964
|
const systemFields = this.generateSystemFields(timestampString, id);
|
|
92015
|
-
assign$
|
|
91965
|
+
assign$2(draftFields, systemFields);
|
|
92016
91966
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92017
91967
|
this.fillMissingFields(draftFields, objectInfo);
|
|
92018
91968
|
let recordTypeId = this.determineRecordTypeId(fields, objectInfo);
|
|
@@ -92074,7 +92024,7 @@
|
|
|
92074
92024
|
async synthesizeFieldsFromParts(fields, apiName) {
|
|
92075
92025
|
const objectInfo = await this.ensureObjectInfo(apiName);
|
|
92076
92026
|
const recordFields = {};
|
|
92077
|
-
for (const fieldName of keys$
|
|
92027
|
+
for (const fieldName of keys$2$1(fields)) {
|
|
92078
92028
|
const draftField = fields[fieldName] ?? null;
|
|
92079
92029
|
recordFields[fieldName] = { value: draftField, displayValue: null };
|
|
92080
92030
|
const fieldInfo = objectInfo.fields[fieldName];
|
|
@@ -92097,7 +92047,7 @@
|
|
|
92097
92047
|
let patchedFields = await this.synthesizeFieldsFromParts(fields, apiName);
|
|
92098
92048
|
if (existingRecord) {
|
|
92099
92049
|
const nameFields = this.getCompoundNameFields(existingRecord, patchedFields, objectInfo);
|
|
92100
|
-
assign$
|
|
92050
|
+
assign$2(patchedFields, nameFields);
|
|
92101
92051
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY_ID, { value: this.userId, displayValue: null }, existingRecord.fields, patchedFields);
|
|
92102
92052
|
this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY, {
|
|
92103
92053
|
value: this.createLink(buildRecordRepKeyFromId$1(this.userId)),
|
|
@@ -92155,7 +92105,7 @@
|
|
|
92155
92105
|
changedNameFields[fieldName] = fieldValue;
|
|
92156
92106
|
}
|
|
92157
92107
|
}
|
|
92158
|
-
if (keys$
|
|
92108
|
+
if (keys$2$1(changedNameFields).length > 0) {
|
|
92159
92109
|
const newNameValue = filteredNameFields
|
|
92160
92110
|
.map((key) => {
|
|
92161
92111
|
if (changedNameFields[key] !== undefined) {
|
|
@@ -92276,7 +92226,7 @@
|
|
|
92276
92226
|
}
|
|
92277
92227
|
const patchedFields = effect.recordPatch.fields;
|
|
92278
92228
|
if (patchedFields) {
|
|
92279
|
-
const fieldNames = keys$
|
|
92229
|
+
const fieldNames = keys$2$1(patchedFields);
|
|
92280
92230
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92281
92231
|
const fieldName = fieldNames[i];
|
|
92282
92232
|
// don't apply server values to draft created records
|
|
@@ -92435,7 +92385,7 @@
|
|
|
92435
92385
|
return undefined;
|
|
92436
92386
|
}
|
|
92437
92387
|
const updatedFields = {};
|
|
92438
|
-
const fieldNames = keys$
|
|
92388
|
+
const fieldNames = keys$2$1(fields);
|
|
92439
92389
|
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
92440
92390
|
const fieldName = fieldNames[i];
|
|
92441
92391
|
const field = fields[fieldName];
|
|
@@ -92475,7 +92425,7 @@
|
|
|
92475
92425
|
|
|
92476
92426
|
function enableSideEffectsOnEnvironment(env, sideEffectStore) {
|
|
92477
92427
|
const storePublish = function (key, data) {
|
|
92478
|
-
if (isStoreKeyRecordId
|
|
92428
|
+
if (isStoreKeyRecordId(key) === false || isStoreRecordError$1(data)) {
|
|
92479
92429
|
return env.storePublish(key, data);
|
|
92480
92430
|
}
|
|
92481
92431
|
const effects = sideEffectStore.getEffects(key);
|
|
@@ -92532,7 +92482,7 @@
|
|
|
92532
92482
|
if (entries === undefined) {
|
|
92533
92483
|
return directory;
|
|
92534
92484
|
}
|
|
92535
|
-
keys$
|
|
92485
|
+
keys$2$1(entries).forEach((key) => {
|
|
92536
92486
|
const { data: record, metadata } = entries[key];
|
|
92537
92487
|
if (isStoreRecordError(record)) {
|
|
92538
92488
|
return;
|
|
@@ -92567,13 +92517,13 @@
|
|
|
92567
92517
|
let lazySideEffectStore;
|
|
92568
92518
|
let lazySideEffectService;
|
|
92569
92519
|
const shouldFlush = (key, value) => {
|
|
92570
|
-
if (!isStoreKeyRecordId
|
|
92520
|
+
if (!isStoreKeyRecordId(key)) {
|
|
92571
92521
|
return { flushValue: true };
|
|
92572
92522
|
}
|
|
92573
92523
|
if (value && typeof value === 'object') {
|
|
92574
92524
|
const fields = value.fields;
|
|
92575
92525
|
if (fields && typeof fields === 'object') {
|
|
92576
|
-
const keys = keys$
|
|
92526
|
+
const keys = keys$2$1(fields);
|
|
92577
92527
|
for (const key of keys) {
|
|
92578
92528
|
const field = fields[key];
|
|
92579
92529
|
if (fields && field.__state && field.__state.pending === true) {
|
|
@@ -92609,7 +92559,7 @@
|
|
|
92609
92559
|
lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
|
|
92610
92560
|
reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
|
|
92611
92561
|
}));
|
|
92612
|
-
lazyDurableStore =
|
|
92562
|
+
lazyDurableStore = getNimbusDurableStore();
|
|
92613
92563
|
lazyDurableRecordStore = new DurableRecordStore(lazyDurableStore, () => lazyLuvio);
|
|
92614
92564
|
// specific adapters
|
|
92615
92565
|
const internalAdapterStore = new InMemoryStore();
|
|
@@ -92632,7 +92582,7 @@
|
|
|
92632
92582
|
const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
|
|
92633
92583
|
const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
|
|
92634
92584
|
uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
|
|
92635
|
-
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92585
|
+
const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
|
|
92636
92586
|
const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
|
|
92637
92587
|
const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
|
|
92638
92588
|
lazyDraftQueue.addHandler(uiApiRecordHandler);
|
|
@@ -92703,6 +92653,7 @@
|
|
|
92703
92653
|
configuration.setGetRelatedListRecordsAdapterFactory(getRelatedListRecordsAdapterFactory);
|
|
92704
92654
|
configuration.setGetRelatedListRecordsBatchAdapterFactory(getRelatedListRecordsBatchAdapterFactory);
|
|
92705
92655
|
configuration.setGetSearchResultsAdapterFactory(getSearchResultsAdapterFactory);
|
|
92656
|
+
configuration.setRecordRepresentationIngestionOverride(ingest$1o);
|
|
92706
92657
|
configureUIAPIGraphQL(registration);
|
|
92707
92658
|
});
|
|
92708
92659
|
withRegistration('@salesforce/lds-adapters-uiapi/graphql', configureUIAPIGraphQL);
|
|
@@ -92738,7 +92689,7 @@
|
|
|
92738
92689
|
id: '@salesforce/lds-network-adapter',
|
|
92739
92690
|
instrument: instrument$2,
|
|
92740
92691
|
});
|
|
92741
|
-
// version: 1.
|
|
92692
|
+
// version: 1.342.0-651bed9637
|
|
92742
92693
|
|
|
92743
92694
|
const { create: create$2, keys: keys$2 } = Object;
|
|
92744
92695
|
const { stringify, parse } = JSON;
|
|
@@ -114168,6 +114119,7 @@
|
|
|
114168
114119
|
* Determines whether to include additional PDL strategies for Related Lists
|
|
114169
114120
|
*/
|
|
114170
114121
|
let relatedListsPlusPredictionsEnabled$1 = false;
|
|
114122
|
+
let recordRepresentationIngestionOverride$1 = undefined;
|
|
114171
114123
|
/**
|
|
114172
114124
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
114173
114125
|
* Configuration for one store enabled REST adapters only.
|
|
@@ -114273,6 +114225,12 @@
|
|
|
114273
114225
|
areRelatedListsPlusPredictionsEnabled: function () {
|
|
114274
114226
|
return relatedListsPlusPredictionsEnabled$1 === true;
|
|
114275
114227
|
},
|
|
114228
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
114229
|
+
recordRepresentationIngestionOverride$1 = ingest;
|
|
114230
|
+
},
|
|
114231
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
114232
|
+
return recordRepresentationIngestionOverride$1;
|
|
114233
|
+
},
|
|
114276
114234
|
// createRecord
|
|
114277
114235
|
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.getAdapter,
|
|
114278
114236
|
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter$1.setAdapter,
|
|
@@ -115315,7 +115273,7 @@
|
|
|
115315
115273
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
115316
115274
|
instrument: instrument$1,
|
|
115317
115275
|
});
|
|
115318
|
-
// version: 1.
|
|
115276
|
+
// version: 1.342.0-f478af8b93
|
|
115319
115277
|
|
|
115320
115278
|
// On core the unstable adapters are re-exported with different names,
|
|
115321
115279
|
// we want to match them here.
|
|
@@ -115467,7 +115425,7 @@
|
|
|
115467
115425
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
115468
115426
|
graphQLImperative = ldsAdapter;
|
|
115469
115427
|
});
|
|
115470
|
-
// version: 1.
|
|
115428
|
+
// version: 1.342.0-f478af8b93
|
|
115471
115429
|
|
|
115472
115430
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
115473
115431
|
__proto__: null,
|
|
@@ -115880,7 +115838,16 @@
|
|
|
115880
115838
|
return;
|
|
115881
115839
|
}
|
|
115882
115840
|
if (adapterId === 'deleteRecord') {
|
|
115883
|
-
|
|
115841
|
+
draftManager.stopQueueWhileRunning(() => {
|
|
115842
|
+
return new Promise((resolve) => {
|
|
115843
|
+
const onResponseWrapper = (response) => {
|
|
115844
|
+
resolve(response);
|
|
115845
|
+
};
|
|
115846
|
+
invokeAdapterWithMetadataDeleteRecord(adapter, config, metadata, onResponseWrapper, nativeAdapterRequestContext);
|
|
115847
|
+
}).then((callbackValue) => {
|
|
115848
|
+
onResponse(callbackValue);
|
|
115849
|
+
});
|
|
115850
|
+
});
|
|
115884
115851
|
}
|
|
115885
115852
|
else {
|
|
115886
115853
|
draftManager.stopQueueWhileRunning(() => {
|
|
@@ -116250,7 +116217,7 @@
|
|
|
116250
116217
|
function register(r) {
|
|
116251
116218
|
callbacks$1.forEach((callback) => callback(r));
|
|
116252
116219
|
}
|
|
116253
|
-
// version: 1.
|
|
116220
|
+
// version: 1.342.0-651bed9637
|
|
116254
116221
|
|
|
116255
116222
|
/**
|
|
116256
116223
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -116324,6 +116291,7 @@
|
|
|
116324
116291
|
* Determines whether to include additional PDL strategies for Related Lists
|
|
116325
116292
|
*/
|
|
116326
116293
|
let relatedListsPlusPredictionsEnabled = false;
|
|
116294
|
+
let recordRepresentationIngestionOverride = undefined;
|
|
116327
116295
|
/**
|
|
116328
116296
|
* Defines the configuration API and is exposed internally as well as externally.
|
|
116329
116297
|
* Configuration for one store enabled REST adapters only.
|
|
@@ -116429,6 +116397,12 @@
|
|
|
116429
116397
|
areRelatedListsPlusPredictionsEnabled: function () {
|
|
116430
116398
|
return relatedListsPlusPredictionsEnabled === true;
|
|
116431
116399
|
},
|
|
116400
|
+
setRecordRepresentationIngestionOverride: function (ingest) {
|
|
116401
|
+
recordRepresentationIngestionOverride = ingest;
|
|
116402
|
+
},
|
|
116403
|
+
getRecordRepresentationIngestionOverride: function () {
|
|
116404
|
+
return recordRepresentationIngestionOverride;
|
|
116405
|
+
},
|
|
116432
116406
|
// createRecord
|
|
116433
116407
|
getDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.getAdapter,
|
|
116434
116408
|
setDraftAwareCreateRecordAdapter: configurableCreateRecordAdapter.setAdapter,
|
|
@@ -117342,4 +117316,4 @@
|
|
|
117342
117316
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
117343
117317
|
|
|
117344
117318
|
}));
|
|
117345
|
-
// version: 1.
|
|
117319
|
+
// version: 1.342.0-651bed9637
|