@salesforce/lds-worker-api 1.198.0 → 1.199.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,11 +20,11 @@ var SnapshotState$3;
20
20
  SnapshotState["Stale"] = "Stale";
21
21
  })(SnapshotState$3 || (SnapshotState$3 = {}));
22
22
 
23
- const { create: create$a, entries: entries$4, freeze: freeze$5, keys: keys$b, values: values$4 } = Object;
23
+ const { create: create$b, entries: entries$5, freeze: freeze$5, keys: keys$c, values: values$4 } = Object;
24
24
  const { hasOwnProperty: hasOwnProperty$3 } = Object.prototype;
25
25
  const { isArray: isArray$9 } = Array;
26
26
  const { push: push$4, indexOf, slice: slice$2 } = Array.prototype;
27
- const { parse: parse$9, stringify: stringify$9 } = JSON;
27
+ const { parse: parse$a, stringify: stringify$a } = JSON;
28
28
 
29
29
  function deepFreeze(value) {
30
30
  // No need to freeze primitives
@@ -37,7 +37,7 @@ function deepFreeze(value) {
37
37
  }
38
38
  }
39
39
  else {
40
- const keys$1 = keys$b(value);
40
+ const keys$1 = keys$c(value);
41
41
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
42
42
  deepFreeze(value[keys$1[i]]);
43
43
  }
@@ -281,7 +281,7 @@ function stableJSONStringify$3(node) {
281
281
  return isFinite(node) ? '' + node : 'null';
282
282
  }
283
283
  if (typeof node !== 'object') {
284
- return stringify$9(node);
284
+ return stringify$a(node);
285
285
  }
286
286
  let i;
287
287
  let out;
@@ -298,7 +298,7 @@ function stableJSONStringify$3(node) {
298
298
  if (node === null) {
299
299
  return 'null';
300
300
  }
301
- const keys$1 = keys$b(node).sort();
301
+ const keys$1 = keys$c(node).sort();
302
302
  out = '';
303
303
  for (i = 0; i < keys$1.length; i++) {
304
304
  const key = keys$1[i];
@@ -309,7 +309,7 @@ function stableJSONStringify$3(node) {
309
309
  if (out) {
310
310
  out += ',';
311
311
  }
312
- out += stringify$9(key) + ':' + value;
312
+ out += stringify$a(key) + ':' + value;
313
313
  }
314
314
  return '{' + out + '}';
315
315
  }
@@ -546,13 +546,13 @@ function getTTLOverride$1(ttlOverrideKey, ttlOverrides, defaultTTLOverride) {
546
546
  class StringKeyInMemoryStore {
547
547
  constructor(options = {}) {
548
548
  // public, in memory properties
549
- this.records = create$a(null);
550
- this.metadata = create$a(null);
551
- this.visitedIds = create$a(null);
552
- this.refreshedIds = create$a(null);
553
- this.redirectKeys = create$a(null);
554
- this.retainedIds = create$a(null);
555
- this.ttlOverrides = create$a(null);
549
+ this.records = create$b(null);
550
+ this.metadata = create$b(null);
551
+ this.visitedIds = create$b(null);
552
+ this.refreshedIds = create$b(null);
553
+ this.redirectKeys = create$b(null);
554
+ this.retainedIds = create$b(null);
555
+ this.ttlOverrides = create$b(null);
556
556
  this.snapshotSubscriptions = [];
557
557
  this.trimTask = null;
558
558
  this.pendingTrimKeys = new Set();
@@ -560,8 +560,8 @@ class StringKeyInMemoryStore {
560
560
  this.watchSubscriptions = [];
561
561
  this.eventObservers = [];
562
562
  // private/protected
563
- this.insertedIds = create$a(null);
564
- this.reverseRedirectKeys = create$a(null);
563
+ this.insertedIds = create$b(null);
564
+ this.reverseRedirectKeys = create$b(null);
565
565
  this.scheduler = options.scheduler || buildDefaultScheduler();
566
566
  }
567
567
  // interface methods
@@ -569,13 +569,13 @@ class StringKeyInMemoryStore {
569
569
  return this.records[this.getCanonicalRecordId(key)];
570
570
  }
571
571
  getNumEntries() {
572
- return keys$b(this.records).length;
572
+ return keys$c(this.records).length;
573
573
  }
574
574
  readMetadata(key) {
575
575
  return this.metadata[this.getCanonicalRecordId(key)];
576
576
  }
577
577
  readMetadataWhere(query) {
578
- const keys$1 = keys$b(this.metadata);
578
+ const keys$1 = keys$c(this.metadata);
579
579
  const results = [];
580
580
  const hasNamespaceQuery = hasOwnProperty$3.call(query, 'namespace');
581
581
  const hasRepresentationNameQuery = hasOwnProperty$3.call(query, 'representationName');
@@ -672,8 +672,8 @@ class StringKeyInMemoryStore {
672
672
  // Note: we should always get the subscription references from this at the beginning
673
673
  // of the function, in case the reference changes (because of an unsubscribe)
674
674
  const { snapshotSubscriptions, watchSubscriptions, visitedIds, refreshedIds, insertedIds } = this;
675
- const allVisitedIds = keys$b(visitedIds);
676
- const allRefreshedIds = keys$b(refreshedIds);
675
+ const allVisitedIds = keys$c(visitedIds);
676
+ const allRefreshedIds = keys$c(refreshedIds);
677
677
  // Early exit if nothing has changed
678
678
  if (allVisitedIds.length === 0 && allRefreshedIds.length === 0) {
679
679
  return Promise.resolve();
@@ -710,9 +710,9 @@ class StringKeyInMemoryStore {
710
710
  callback(watchCallbackEntries);
711
711
  }
712
712
  }
713
- this.visitedIds = create$a(null);
714
- this.refreshedIds = create$a(null);
715
- this.insertedIds = create$a(null);
713
+ this.visitedIds = create$b(null);
714
+ this.refreshedIds = create$b(null);
715
+ this.insertedIds = create$b(null);
716
716
  // the .then removes the return of an array of voids to a single void
717
717
  return Promise.all(snapshotSubPromises).then(() => { });
718
718
  }
@@ -877,18 +877,18 @@ class StringKeyInMemoryStore {
877
877
  return this.defaultTTLOverride;
878
878
  }
879
879
  reset() {
880
- this.records = create$a(null);
880
+ this.records = create$b(null);
881
881
  this.snapshotSubscriptions = [];
882
882
  this.watchSubscriptions = [];
883
- this.visitedIds = create$a(null);
884
- this.refreshedIds = create$a(null);
885
- this.insertedIds = create$a(null);
886
- this.redirectKeys = create$a(null);
887
- this.reverseRedirectKeys = create$a(null);
888
- this.retainedIds = create$a(null);
889
- this.ttlOverrides = create$a(null);
883
+ this.visitedIds = create$b(null);
884
+ this.refreshedIds = create$b(null);
885
+ this.insertedIds = create$b(null);
886
+ this.redirectKeys = create$b(null);
887
+ this.reverseRedirectKeys = create$b(null);
888
+ this.retainedIds = create$b(null);
889
+ this.ttlOverrides = create$b(null);
890
890
  this.trimTask = null;
891
- this.metadata = create$a(null);
891
+ this.metadata = create$b(null);
892
892
  this.defaultTTLOverride = undefined;
893
893
  emitLuvioStoreEvent({ type: 'store-reset', timestamp: Date.now() }, this.eventObservers);
894
894
  }
@@ -1120,7 +1120,7 @@ function isPendingSnapshotWithNoOverlappingIds(snapshot, visitedIds, refreshedId
1120
1120
  hasOverlappingIds(snapshot, visitedIds) === false);
1121
1121
  }
1122
1122
  function getMatchingIds(partialKey, visitedIds) {
1123
- const keys$1 = keys$b(partialKey);
1123
+ const keys$1 = keys$c(partialKey);
1124
1124
  return visitedIds.filter((visitedId) => {
1125
1125
  return keys$1.every((key) => {
1126
1126
  return partialKey[key] === visitedId[key];
@@ -1747,8 +1747,8 @@ class InMemoryStore {
1747
1747
  } while (redirectKey !== undefined);
1748
1748
  }
1749
1749
  isUsingStringKeys() {
1750
- return (keys$b(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
1751
- keys$b(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
1750
+ return (keys$c(this.fallbackStringKeyInMemoryStore.visitedIds).length !== 0 ||
1751
+ keys$c(this.fallbackStringKeyInMemoryStore.refreshedIds).length !== 0);
1752
1752
  }
1753
1753
  delegateToFallbackStringKeyStore(snapshot) {
1754
1754
  return !isErrorSnapshot$3(snapshot) && typeof snapshot.recordId === 'string';
@@ -1790,7 +1790,7 @@ class InMemoryStore {
1790
1790
  buildKeySchema(keyMetadata) {
1791
1791
  // pull NamespacedType type out of NormalizedKeyMetadata
1792
1792
  const { namespace: _ns, representationName: _rn, ...keyParamValues } = keyMetadata;
1793
- const keySchema = keys$b(keyParamValues).sort();
1793
+ const keySchema = keys$c(keyParamValues).sort();
1794
1794
  return ['namespace', 'representationName', ...keySchema];
1795
1795
  }
1796
1796
  }
@@ -2078,7 +2078,7 @@ class GraphNode {
2078
2078
  return value;
2079
2079
  }
2080
2080
  keys() {
2081
- return keys$b(this.data);
2081
+ return keys$c(this.data);
2082
2082
  }
2083
2083
  isScalar(propertyName) {
2084
2084
  // TODO W-6900046 - merge.ts casts these to any and manually sets `data`
@@ -2119,7 +2119,7 @@ function formatStorageKey(name, argValues) {
2119
2119
  if (hasOwnProperty$3.call(argValues, _argName)) {
2120
2120
  var value = argValues[_argName];
2121
2121
  if (value !== null || value !== undefined) {
2122
- values.push(_argName + ':' + stringify$9(value));
2122
+ values.push(_argName + ':' + stringify$a(value));
2123
2123
  }
2124
2124
  }
2125
2125
  }
@@ -2457,7 +2457,7 @@ class Reader {
2457
2457
  }
2458
2458
  }
2459
2459
  selectAllObject(record, data, visitedKeys) {
2460
- const recordKeys = keys$b(record);
2460
+ const recordKeys = keys$c(record);
2461
2461
  const { length } = recordKeys;
2462
2462
  for (let i = 0; i < length; i += 1) {
2463
2463
  const key = recordKeys[i];
@@ -2540,7 +2540,7 @@ class Reader {
2540
2540
  this.readScalar(propertyName, source, sink);
2541
2541
  return;
2542
2542
  }
2543
- throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$9(selection, null, 2)}`);
2543
+ throw new Error(`Invalid Link State. Link on "${this.currentPath.fullPath}" is null but selection is not nullable: \n${stringify$a(selection, null, 2)}`);
2544
2544
  case StoreLinkStateValues$2.Pending:
2545
2545
  this.markPending();
2546
2546
  return;
@@ -2638,7 +2638,7 @@ class Reader {
2638
2638
  }
2639
2639
  const { baseSnapshotValue } = this.currentPath;
2640
2640
  if (isDefined$1(baseSnapshotValue)) {
2641
- this.snapshotChanged = keys$1.length !== keys$b(baseSnapshotValue).length;
2641
+ this.snapshotChanged = keys$1.length !== keys$c(baseSnapshotValue).length;
2642
2642
  }
2643
2643
  }
2644
2644
  checkIfChanged(value) {
@@ -2676,7 +2676,7 @@ class Reader {
2676
2676
  return this.markMissing();
2677
2677
  }
2678
2678
  const sink = (data[propertyName] = {});
2679
- const keys$1 = keys$b(obj);
2679
+ const keys$1 = keys$c(obj);
2680
2680
  this.checkIfObjectKeysLengthChanged(keys$1);
2681
2681
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
2682
2682
  const key = keys$1[i];
@@ -2687,7 +2687,7 @@ class Reader {
2687
2687
  }
2688
2688
  readLinkMap(propertyName, selection, record, data) {
2689
2689
  const map = record[propertyName];
2690
- const keys$1 = keys$b(map);
2690
+ const keys$1 = keys$c(map);
2691
2691
  const sink = {};
2692
2692
  this.checkIfObjectKeysLengthChanged(keys$1);
2693
2693
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
@@ -2815,7 +2815,7 @@ class Reader {
2815
2815
  return;
2816
2816
  }
2817
2817
  const sink = (data[propertyName] = {});
2818
- const keys$1 = keys$b(obj);
2818
+ const keys$1 = keys$c(obj);
2819
2819
  this.checkIfObjectKeysLengthChanged(keys$1);
2820
2820
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
2821
2821
  const key = keys$1[i];
@@ -3037,7 +3037,7 @@ function normalizeNetworkAdapterError(error) {
3037
3037
  return error;
3038
3038
  }
3039
3039
  // anything else should get turned into an Error with the errorType set
3040
- const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$9(error)}`);
3040
+ const normalizedError = new Error(`NetworkAdapter rejected with non-Error object: ${typeof error === 'undefined' ? 'undefined' : stringify$a(error)}`);
3041
3041
  normalizedError.errorType = 'networkAdapterError';
3042
3042
  return normalizedError;
3043
3043
  }
@@ -3048,8 +3048,8 @@ class Environment {
3048
3048
  this.defaultCachePolicy = { type: 'cache-then-network' };
3049
3049
  this.store = store;
3050
3050
  this.networkAdapter = networkAdapter;
3051
- this.adapterContextMap = create$a(null);
3052
- this.typeQueryEvaluatorMap = create$a(null);
3051
+ this.adapterContextMap = create$b(null);
3052
+ this.typeQueryEvaluatorMap = create$b(null);
3053
3053
  // bind these methods so when they get passed into the
3054
3054
  // Store, the this reference is preserved
3055
3055
  this.createSnapshot = this.createSnapshot.bind(this);
@@ -3243,7 +3243,7 @@ class Environment {
3243
3243
  // retrieve from adapterContextMap if contextId is supplied
3244
3244
  // we will only track context of adapters that explicitly provide a contextId
3245
3245
  if (this.adapterContextMap[contextId] === undefined) {
3246
- this.adapterContextMap[contextId] = create$a(null);
3246
+ this.adapterContextMap[contextId] = create$b(null);
3247
3247
  }
3248
3248
  const contextStore = this.adapterContextMap[contextId];
3249
3249
  const context = {
@@ -3499,13 +3499,13 @@ class Luvio {
3499
3499
  // undefined values on the injected networkAdapter. So we do it here, on
3500
3500
  // the API that those adapters call to dispatch their ResourceRequests.
3501
3501
  const { queryParams, urlParams } = mergedResourceRequest;
3502
- for (const paramKey of keys$b(queryParams)) {
3502
+ for (const paramKey of keys$c(queryParams)) {
3503
3503
  const value = queryParams[paramKey];
3504
3504
  if (value === undefined) {
3505
3505
  delete queryParams[paramKey];
3506
3506
  }
3507
3507
  }
3508
- for (const paramKey of keys$b(urlParams)) {
3508
+ for (const paramKey of keys$c(urlParams)) {
3509
3509
  const value = urlParams[paramKey];
3510
3510
  if (value === undefined) {
3511
3511
  delete urlParams[paramKey];
@@ -3799,7 +3799,7 @@ function withDefaultLuvio(callback) {
3799
3799
  }
3800
3800
  callbacks.push(callback);
3801
3801
  }
3802
- // version: 1.198.0-ead7de735
3802
+ // version: 1.199.1-4bf260c39
3803
3803
 
3804
3804
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3805
3805
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5452,7 +5452,7 @@ function isNameStart(code) {
5452
5452
  * Given a GraphQL source, parses it into a Document.
5453
5453
  * Throws GraphQLError if a syntax error is encountered.
5454
5454
  */
5455
- function parse$8(source, options) {
5455
+ function parse$9(source, options) {
5456
5456
  var parser = new Parser(source, options);
5457
5457
  return parser.parseDocument();
5458
5458
  }
@@ -14414,7 +14414,7 @@ function buildASTSchema(documentAST, options) {
14414
14414
  */
14415
14415
 
14416
14416
  function buildSchema(source, options) {
14417
- var document = parse$8(source, {
14417
+ var document = parse$9(source, {
14418
14418
  noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
14419
14419
  allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
14420
14420
  allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
@@ -14965,7 +14965,7 @@ function parseDocument(inputString) {
14965
14965
  return cachedDoc;
14966
14966
  }
14967
14967
  // parse throws an GraphQLError in case of invalid query, should this be in try/catch?
14968
- const parsedDoc = parse$8(inputString, { noLocation: true });
14968
+ const parsedDoc = parse$9(inputString, { noLocation: true });
14969
14969
  if (!parsedDoc || parsedDoc.kind !== 'Document') {
14970
14970
  return null;
14971
14971
  }
@@ -15223,7 +15223,7 @@ function metaschemaMapper(doc) {
15223
15223
  * @deprecated In favor of gql tagged template literal
15224
15224
  */
15225
15225
  function parseAndVisit(source) {
15226
- const ast = parse$8(source, { noLocation: true });
15226
+ const ast = parse$9(source, { noLocation: true });
15227
15227
  const luvioDocumentNode = transform$c(ast);
15228
15228
  // In-place substitution of metaschema annotations
15229
15229
  metaschemaMapper(ast);
@@ -15232,7 +15232,7 @@ function parseAndVisit(source) {
15232
15232
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15233
15233
  return luvioDocumentNode;
15234
15234
  }
15235
- // version: 1.198.0-ead7de735
15235
+ // version: 1.199.1-4bf260c39
15236
15236
 
15237
15237
  function unwrap(data) {
15238
15238
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -15334,7 +15334,7 @@ function refreshData(data, dataToTuple, luvio) {
15334
15334
  });
15335
15335
  }
15336
15336
  const { isArray: isArray$8 } = Array;
15337
- const { stringify: stringify$8 } = JSON;
15337
+ const { stringify: stringify$9 } = JSON;
15338
15338
 
15339
15339
  function isPromise$1(value) {
15340
15340
  // check for Thenable due to test frameworks using custom Promise impls
@@ -15352,7 +15352,7 @@ function throwAnnotatedError(error, messagePrefix) {
15352
15352
  error.message = `${messagePrefix}\n[${error.message}]`;
15353
15353
  throw error;
15354
15354
  }
15355
- throw new Error(`${messagePrefix}\n[${stringify$8(error)}]`);
15355
+ throw new Error(`${messagePrefix}\n[${stringify$9(error)}]`);
15356
15356
  }
15357
15357
 
15358
15358
  class Sanitizer {
@@ -15368,7 +15368,7 @@ class Sanitizer {
15368
15368
  }
15369
15369
  sanitize() {
15370
15370
  const sanitizer = this;
15371
- stringify$8(this.obj, function (key, value) {
15371
+ stringify$9(this.obj, function (key, value) {
15372
15372
  if (key === '') {
15373
15373
  return value;
15374
15374
  }
@@ -15810,7 +15810,7 @@ function createLDSAdapter(luvio, name, factory) {
15810
15810
  return factory(luvio);
15811
15811
  }
15812
15812
 
15813
- const { create: create$9, defineProperty, defineProperties } = Object;
15813
+ const { create: create$a, defineProperty, defineProperties } = Object;
15814
15814
 
15815
15815
  var SnapshotState$2;
15816
15816
  (function (SnapshotState) {
@@ -16145,7 +16145,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16145
16145
  const { apiFamily, name } = metadata;
16146
16146
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16147
16147
  }
16148
- // version: 1.198.0-ead7de735
16148
+ // version: 1.199.1-4bf260c39
16149
16149
 
16150
16150
  /**
16151
16151
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -16232,7 +16232,7 @@ var FragmentReadResultState;
16232
16232
 
16233
16233
  const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
16234
16234
 
16235
- const { assign: assign$8, create: create$8, freeze: freeze$4, keys: keys$a } = Object;
16235
+ const { assign: assign$9, create: create$9, freeze: freeze$4, keys: keys$b } = Object;
16236
16236
 
16237
16237
  ObjectCreate$3(null);
16238
16238
 
@@ -17300,12 +17300,12 @@ function getTypeCacheKeys$Q$1(rootKeySet, luvio, input, fullPathFactory) {
17300
17300
  }
17301
17301
  }
17302
17302
 
17303
- const { assign: assign$7, create: create$7, freeze: freeze$3, keys: keys$9 } = Object;
17303
+ const { assign: assign$8, create: create$8, freeze: freeze$3, keys: keys$a } = Object;
17304
17304
  const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
17305
17305
  const { split, endsWith } = String.prototype;
17306
17306
  const { isArray: isArray$7 } = Array;
17307
17307
  const { concat, filter: filter$1, includes: includes$1, push: push$3, reduce } = Array.prototype;
17308
- const { parse: parse$7, stringify: stringify$7 } = JSON;
17308
+ const { parse: parse$8, stringify: stringify$8 } = JSON;
17309
17309
 
17310
17310
  // we override the generated so we can set "mergeable: true" on the root key
17311
17311
  const getTypeCacheKeys$P$1 = (rootKeySet, luvio, input, _fullPathFactory) => {
@@ -17317,14 +17317,14 @@ const getTypeCacheKeys$P$1 = (rootKeySet, luvio, input, _fullPathFactory) => {
17317
17317
  mergeable: true,
17318
17318
  });
17319
17319
  const input_childRelationships = input.childRelationships;
17320
- const input_childRelationships_keys = keys$9(input_childRelationships);
17320
+ const input_childRelationships_keys = keys$a(input_childRelationships);
17321
17321
  const input_childRelationships_length = input_childRelationships_keys.length;
17322
17322
  for (let i = 0; i < input_childRelationships_length; i++) {
17323
17323
  const key = input_childRelationships_keys[i];
17324
17324
  getTypeCacheKeys$O$1(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
17325
17325
  }
17326
17326
  const input_fields = input.fields;
17327
- const input_fields_keys = keys$9(input_fields);
17327
+ const input_fields_keys = keys$a(input_fields);
17328
17328
  const input_fields_length = input_fields_keys.length;
17329
17329
  for (let i = 0; i < input_fields_length; i++) {
17330
17330
  const key = input_fields_keys[i];
@@ -17755,7 +17755,7 @@ function getTypeCacheKeys$N$1(rootKeySet, luvio, input, fullPathFactory) {
17755
17755
  getTypeCacheKeys$Q$1(rootKeySet, luvio, input_fields[key], () => rootKey + "__fields" + "__" + key);
17756
17756
  }
17757
17757
  }
17758
- const notifyUpdateAvailableFactory = (luvio) => {
17758
+ const notifyUpdateAvailableFactory$1 = (luvio) => {
17759
17759
  return function notifyRecordUpdateAvailable(configs) {
17760
17760
  const keys = configs.map(c => keyBuilder$1R(luvio, c));
17761
17761
  return luvio.notifyStoreUpdateAvailable(keys);
@@ -17784,7 +17784,7 @@ function dedupe(value) {
17784
17784
  for (let i = 0, len = value.length; i < len; i += 1) {
17785
17785
  result[value[i]] = true;
17786
17786
  }
17787
- return keys$9(result);
17787
+ return keys$a(result);
17788
17788
  }
17789
17789
  /**
17790
17790
  * @param source The array of string to filter
@@ -19232,7 +19232,7 @@ function convertRecordFieldsArrayToTrie(fields, optionalFields = []) {
19232
19232
  function createPathSelection(propertyName, fieldDefinition) {
19233
19233
  const fieldsSelection = [];
19234
19234
  const { children } = fieldDefinition;
19235
- const childrenKeys = keys$9(children);
19235
+ const childrenKeys = keys$a(children);
19236
19236
  for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
19237
19237
  const childKey = childrenKeys[i];
19238
19238
  const childFieldDefinition = children[childKey];
@@ -19277,7 +19277,7 @@ function createPathSelection(propertyName, fieldDefinition) {
19277
19277
  */
19278
19278
  function createPathSelectionFromValue(fields) {
19279
19279
  const fieldsSelection = [];
19280
- const fieldNames = keys$9(fields);
19280
+ const fieldNames = keys$a(fields);
19281
19281
  for (let i = 0, len = fieldNames.length; i < len; i++) {
19282
19282
  const fieldName = fieldNames[i];
19283
19283
  const { value: fieldValue } = fields[fieldName];
@@ -19316,7 +19316,7 @@ function createPathSelectionFromValue(fields) {
19316
19316
  }
19317
19317
  function extractRecordFieldsRecursively(record) {
19318
19318
  const fields = [];
19319
- const fieldNames = keys$9(record.fields);
19319
+ const fieldNames = keys$a(record.fields);
19320
19320
  for (let i = 0, len = fieldNames.length; i < len; i++) {
19321
19321
  const fieldName = fieldNames[i];
19322
19322
  const { value: fieldValue } = record.fields[fieldName];
@@ -19504,7 +19504,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
19504
19504
  continue;
19505
19505
  }
19506
19506
  extractTrackedFieldsToTrie(spanningLink.data.__ref, spanning, next, config, spanningVisitedRecordIds, depth + 1);
19507
- if (keys$9(next.children).length > 0) {
19507
+ if (keys$a(next.children).length > 0) {
19508
19508
  current.children[key] = next;
19509
19509
  }
19510
19510
  else {
@@ -19556,13 +19556,13 @@ function isExternalLookupFieldKey(spanningNode) {
19556
19556
  return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
19557
19557
  }
19558
19558
  function convertTrieToFields(root) {
19559
- if (keys$9(root.children).length === 0) {
19559
+ if (keys$a(root.children).length === 0) {
19560
19560
  return [];
19561
19561
  }
19562
19562
  return convertTrieToFieldsRecursively(root);
19563
19563
  }
19564
19564
  function convertTrieToFieldsRecursively(root) {
19565
- const childKeys = keys$9(root.children);
19565
+ const childKeys = keys$a(root.children);
19566
19566
  if (childKeys.length === 0) {
19567
19567
  if (root.name === '') {
19568
19568
  return [];
@@ -19599,7 +19599,7 @@ const getObjectNameFromField = (field) => {
19599
19599
  function mergeFieldsTries(rootA, rootB) {
19600
19600
  const rootAchildren = rootA.children;
19601
19601
  const rootBchildren = rootB.children;
19602
- const childBKeys = keys$9(rootBchildren);
19602
+ const childBKeys = keys$a(rootBchildren);
19603
19603
  for (let i = 0, len = childBKeys.length; i < len; i++) {
19604
19604
  const childBKey = childBKeys[i];
19605
19605
  if (rootAchildren[childBKey] === undefined) {
@@ -19752,8 +19752,8 @@ function isSuperRecordFieldTrie(a, b) {
19752
19752
  }
19753
19753
  const childrenA = a.children;
19754
19754
  const childrenB = b.children;
19755
- const childKeysA = keys$9(childrenA);
19756
- const childKeysB = keys$9(childrenB);
19755
+ const childKeysA = keys$a(childrenA);
19756
+ const childKeysB = keys$a(childrenB);
19757
19757
  const childKeysBLength = childKeysB.length;
19758
19758
  if (childKeysBLength > childKeysA.length) {
19759
19759
  return false;
@@ -19777,7 +19777,7 @@ function mergePendingFields(newRecord, oldRecord) {
19777
19777
  // RecordRepresentationNormalized['fields'] to include `pending:true` property
19778
19778
  const mergedFields = { ...newRecord.fields };
19779
19779
  const merged = { ...newRecord, fields: mergedFields };
19780
- const existingFields = keys$9(oldRecord.fields);
19780
+ const existingFields = keys$a(oldRecord.fields);
19781
19781
  for (let i = 0, len = existingFields.length; i < len; i += 1) {
19782
19782
  const spanningFieldName = existingFields[i];
19783
19783
  if (newRecord.fields[spanningFieldName] === undefined) {
@@ -19910,7 +19910,7 @@ function merge$3(existing, incoming, luvio, _path, recordConflictMap) {
19910
19910
  if (isGraphNode(node)) {
19911
19911
  const dependencies = node.retrieve();
19912
19912
  if (dependencies !== null) {
19913
- const depKeys = keys$9(dependencies);
19913
+ const depKeys = keys$a(dependencies);
19914
19914
  for (let i = 0, len = depKeys.length; i < len; i++) {
19915
19915
  luvio.storeEvict(depKeys[i]);
19916
19916
  }
@@ -20057,7 +20057,7 @@ function addFieldsToStoreLink(fieldsTrie, optionalFieldsTrie, storeLink) {
20057
20057
  }
20058
20058
  for (let i = 0; i < fieldSubtries.length; i++) {
20059
20059
  const subtrie = fieldSubtries[i];
20060
- const fieldNames = keys$9(subtrie.children);
20060
+ const fieldNames = keys$a(subtrie.children);
20061
20061
  for (let i = 0; i < fieldNames.length; i++) {
20062
20062
  const fieldName = fieldNames[i];
20063
20063
  const childTrie = subtrie.children[fieldName];
@@ -20169,9 +20169,9 @@ function fulfill(existing, incoming) {
20169
20169
  return false;
20170
20170
  }
20171
20171
  }
20172
- const headersKeys = keys$9(headers);
20172
+ const headersKeys = keys$a(headers);
20173
20173
  const headersKeyLength = headersKeys.length;
20174
- if (headersKeyLength !== keys$9(existingHeaders).length) {
20174
+ if (headersKeyLength !== keys$a(existingHeaders).length) {
20175
20175
  return false;
20176
20176
  }
20177
20177
  for (let i = 0, len = headersKeyLength; i < len; i++) {
@@ -20947,7 +20947,7 @@ function buildNetworkSnapshot$W(luvio, config, serverRequestCount = 0, options)
20947
20947
 
20948
20948
  // iterate through the map to build configs for network calls
20949
20949
  function resolveConflict(luvio, map) {
20950
- const ids = keys$9(map.conflicts);
20950
+ const ids = keys$a(map.conflicts);
20951
20951
  if (ids.length === 0) {
20952
20952
  instrumentation$2.recordConflictsResolved(map.serverRequestCount);
20953
20953
  return;
@@ -22121,18 +22121,18 @@ function listFields(luvio, { fields = [], optionalFields = [], sortBy, }, listIn
22121
22121
  return {
22122
22122
  getRecordSelectionFieldSets() {
22123
22123
  const optionalPlusDefaultFields = { ...optionalFields_ };
22124
- const fields = keys$9(defaultFields_);
22124
+ const fields = keys$a(defaultFields_);
22125
22125
  for (let i = 0; i < fields.length; ++i) {
22126
22126
  const field = fields[i];
22127
22127
  if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
22128
22128
  optionalPlusDefaultFields[field] = true;
22129
22129
  }
22130
22130
  }
22131
- return [keys$9(fields_).sort(), keys$9(optionalPlusDefaultFields).sort()];
22131
+ return [keys$a(fields_).sort(), keys$a(optionalPlusDefaultFields).sort()];
22132
22132
  },
22133
22133
  processRecords(records) {
22134
22134
  const { missingFields } = defaultServerFieldStatus;
22135
- const fields = keys$9(missingFields);
22135
+ const fields = keys$a(missingFields);
22136
22136
  for (let i = 0; i < fields.length; ++i) {
22137
22137
  const field = fields[i], splitField = field.split('.').slice(1);
22138
22138
  for (let i = 0; i < records.length; ++i) {
@@ -22688,6 +22688,12 @@ function getTypeCacheKeys$J$1(rootKeySet, luvio, input, fullPathFactory) {
22688
22688
  getTypeCacheKeys$K$1(rootKeySet, luvio, input.lists[i]);
22689
22689
  }
22690
22690
  }
22691
+ const notifyUpdateAvailableFactory = (luvio) => {
22692
+ return function notifyListViewSummaryUpdateAvailable(configs) {
22693
+ const keys = configs.map(c => keyBuilder$1K(luvio, c));
22694
+ return luvio.notifyStoreUpdateAvailable(keys);
22695
+ };
22696
+ };
22691
22697
 
22692
22698
  function createPaginationParams$2(params) {
22693
22699
  const { queryParams } = params;
@@ -24879,7 +24885,7 @@ function getMissingRecordLookupFields(record, objectInfo) {
24879
24885
  const lookupFields = {};
24880
24886
  const { apiName, fields: recordFields } = record;
24881
24887
  const { fields: objectInfoFields } = objectInfo;
24882
- const objectInfoFieldNames = keys$9(objectInfoFields);
24888
+ const objectInfoFieldNames = keys$a(objectInfoFields);
24883
24889
  for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
24884
24890
  const fieldName = objectInfoFieldNames[i];
24885
24891
  const field = objectInfoFields[fieldName];
@@ -24898,12 +24904,12 @@ function getMissingRecordLookupFields(record, objectInfo) {
24898
24904
  const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
24899
24905
  lookupFields[nameField] = true;
24900
24906
  }
24901
- return keys$9(lookupFields);
24907
+ return keys$a(lookupFields);
24902
24908
  }
24903
24909
  function getRecordUiMissingRecordLookupFields(recordUi) {
24904
24910
  const { records, objectInfos } = recordUi;
24905
24911
  const recordLookupFields = {};
24906
- const recordIds = keys$9(records);
24912
+ const recordIds = keys$a(records);
24907
24913
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
24908
24914
  const recordId = recordIds[i];
24909
24915
  const recordData = records[recordId];
@@ -24941,19 +24947,19 @@ function buildCachedSelectorKey(key) {
24941
24947
  }
24942
24948
  function eachLayout(recordUi, cb) {
24943
24949
  const { layouts } = recordUi;
24944
- const layoutApiNames = keys$9(layouts);
24950
+ const layoutApiNames = keys$a(layouts);
24945
24951
  for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
24946
24952
  const apiName = layoutApiNames[a];
24947
24953
  const apiNameData = layouts[apiName];
24948
- const recordTypeIds = keys$9(apiNameData);
24954
+ const recordTypeIds = keys$a(apiNameData);
24949
24955
  for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
24950
24956
  const recordTypeId = recordTypeIds[b];
24951
24957
  const recordTypeData = apiNameData[recordTypeId];
24952
- const layoutTypes = keys$9(recordTypeData);
24958
+ const layoutTypes = keys$a(recordTypeData);
24953
24959
  for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
24954
24960
  const layoutType = layoutTypes[c];
24955
24961
  const layoutTypeData = recordTypeData[layoutType];
24956
- const modes = keys$9(layoutTypeData);
24962
+ const modes = keys$a(layoutTypeData);
24957
24963
  for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
24958
24964
  const mode = modes[d];
24959
24965
  const layout = layoutTypeData[mode];
@@ -25029,7 +25035,7 @@ function prepareRequest$4(luvio, config) {
25029
25035
  // we have to run ingest code and look at the resulting snapshot's seenRecords.
25030
25036
  function getCacheKeys(keySet, luvio, config, key, originalResponseBody) {
25031
25037
  const { recordIds, layoutTypes, modes } = config;
25032
- const responseBody = parse$7(stringify$7(originalResponseBody));
25038
+ const responseBody = parse$8(stringify$8(originalResponseBody));
25033
25039
  eachLayout(responseBody, (apiName, recordTypeId, layout) => {
25034
25040
  if (layout.id === null) {
25035
25041
  return;
@@ -25159,14 +25165,14 @@ function buildNetworkSnapshot$T(luvio, config, dispatchContext) {
25159
25165
  function publishDependencies(luvio, recordIds, depKeys) {
25160
25166
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
25161
25167
  const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
25162
- const dependencies = create$7(null);
25168
+ const dependencies = create$8(null);
25163
25169
  for (let j = 0, len = depKeys.length; j < len; j++) {
25164
25170
  dependencies[depKeys[j]] = true;
25165
25171
  }
25166
25172
  const node = luvio.getNode(recordDepKey);
25167
25173
  if (isGraphNode(node)) {
25168
25174
  const recordDeps = node.retrieve();
25169
- assign$7(dependencies, recordDeps);
25175
+ assign$8(dependencies, recordDeps);
25170
25176
  }
25171
25177
  luvio.storePublish(recordDepKey, dependencies);
25172
25178
  }
@@ -25349,11 +25355,11 @@ const recordLayoutFragmentSelector = [
25349
25355
  ];
25350
25356
  function getFieldsFromLayoutMap(layoutMap, objectInfo) {
25351
25357
  let fields = [];
25352
- const layoutTypes = keys$9(layoutMap);
25358
+ const layoutTypes = keys$a(layoutMap);
25353
25359
  for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
25354
25360
  const layoutType = layoutTypes[i];
25355
25361
  const modesMap = layoutMap[layoutType];
25356
- const modes = keys$9(modesMap);
25362
+ const modes = keys$a(modesMap);
25357
25363
  for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
25358
25364
  const mode = modes[m];
25359
25365
  const modeKeys = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
@@ -25367,7 +25373,7 @@ function getRecordForLayoutableEntities(luvio, refresh, recordId, layoutMap, obj
25367
25373
  return getRecord$1(luvio, refresh, recordId, fields, configOptionalFields);
25368
25374
  }
25369
25375
  function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
25370
- const fields = keys$9(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25376
+ const fields = keys$a(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
25371
25377
  // W-12697744
25372
25378
  // Set the implicit fields received from the server in adapter context
25373
25379
  // This ensures that the implicit fields are available when data is read locally or from durable store
@@ -25595,7 +25601,7 @@ function makeRecordLayoutMap(luvio, config, apiName, recordTypeId, layoutTypes,
25595
25601
  }
25596
25602
  const { layoutType, mode, snapshot } = container;
25597
25603
  if (wrapper.layoutMap[layoutType] === undefined) {
25598
- wrapper.layoutMap = assign$7({}, wrapper.layoutMap, {
25604
+ wrapper.layoutMap = assign$8({}, wrapper.layoutMap, {
25599
25605
  [layoutType]: {},
25600
25606
  });
25601
25607
  }
@@ -34617,7 +34623,7 @@ function typeCheckConfig$u(untrustedConfig) {
34617
34623
  }
34618
34624
  }
34619
34625
  if (records.length > 0) {
34620
- assign$7(config, { records });
34626
+ assign$8(config, { records });
34621
34627
  }
34622
34628
  }
34623
34629
  return config;
@@ -40586,7 +40592,7 @@ function ingestAndBroadcast(luvio, key, config, body) {
40586
40592
  });
40587
40593
  }
40588
40594
  function clone$2(userLayoutState) {
40589
- return parse$7(stringify$7(userLayoutState));
40595
+ return parse$8(stringify$8(userLayoutState));
40590
40596
  }
40591
40597
  // Applies optimisticUpdate to layoutUserState
40592
40598
  // If the optimistic update can be applied, returns RecordLayoutUserStateRepresentation
@@ -40598,7 +40604,7 @@ function optimisticUpdate(cachedLayoutUserState, layoutUserStateInput) {
40598
40604
  let clonedLayoutUserStateSections;
40599
40605
  const { sectionUserStates } = layoutUserStateInput;
40600
40606
  const { sectionUserStates: cachedSectionUserStates } = cachedLayoutUserState;
40601
- const sectionUserStateKeys = keys$9(sectionUserStates);
40607
+ const sectionUserStateKeys = keys$a(sectionUserStates);
40602
40608
  for (let i = 0, len = sectionUserStateKeys.length; i < len; i += 1) {
40603
40609
  const sectionId = sectionUserStateKeys[i];
40604
40610
  if (cachedSectionUserStates[sectionId] === undefined) {
@@ -40621,7 +40627,7 @@ function coerceConfigWithDefaults$2(untrusted, layoutUserStateInput) {
40621
40627
  const config = validateAdapterConfig$E(untrusted, getLayoutUserState_ConfigPropertyNames);
40622
40628
  if (config === null) {
40623
40629
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
40624
- throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$7(untrusted)}`);
40630
+ throw new Error(`@wire(updateLayoutUserState) invalid configuration ${stringify$8(untrusted)}`);
40625
40631
  }
40626
40632
  // This will throw if layoutUserStateInput is not a valid input
40627
40633
  validate$7(layoutUserStateInput, 'layoutUserStateInput');
@@ -44496,12 +44502,13 @@ withDefaultLuvio((luvio) => {
44496
44502
  allowFunction: instrumentation$2.getRecordNotifyChangeAllowed,
44497
44503
  dropFunction: instrumentation$2.getRecordNotifyChangeDropped,
44498
44504
  });
44499
- throttle(60, 60000, createLDSAdapter(luvio, 'notifyRecordUpdateAvailable', notifyUpdateAvailableFactory), {
44505
+ throttle(60, 60000, createLDSAdapter(luvio, 'notifyRecordUpdateAvailable', notifyUpdateAvailableFactory$1), {
44500
44506
  allowFunction: instrumentation$2.notifyRecordUpdateAvailableAllowed,
44501
44507
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44502
44508
  });
44509
+ throttle(60, 60000, createLDSAdapter(luvio, 'notifyListViewSummaryUpdateAvailable', notifyUpdateAvailableFactory));
44503
44510
  });
44504
- // version: 1.198.0-caa871e32
44511
+ // version: 1.199.1-844bcf9ee
44505
44512
 
44506
44513
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44507
44514
 
@@ -44633,10 +44640,10 @@ var ldsPrimingGraphqlBatch = {
44633
44640
  * For full license text, see the LICENSE.txt file
44634
44641
  */
44635
44642
 
44636
- const { parse: parse$5, stringify: stringify$5 } = JSON;
44643
+ const { parse: parse$6, stringify: stringify$6 } = JSON;
44637
44644
  const { join: join$2, push: push$2, unshift } = Array.prototype;
44638
44645
  const { isArray: isArray$5 } = Array;
44639
- const { entries: entries$3, keys: keys$7 } = Object;
44646
+ const { entries: entries$4, keys: keys$8 } = Object;
44640
44647
 
44641
44648
  const UI_API_BASE_URI = '/services/data/v59.0/ui-api';
44642
44649
 
@@ -44701,7 +44708,7 @@ function isSpanningRecord$1(fieldValue) {
44701
44708
  function mergeRecordFields$1(first, second) {
44702
44709
  const { fields: targetFields } = first;
44703
44710
  const { fields: sourceFields } = second;
44704
- const fieldNames = keys$7(sourceFields);
44711
+ const fieldNames = keys$8(sourceFields);
44705
44712
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
44706
44713
  const fieldName = fieldNames[i];
44707
44714
  const sourceField = sourceFields[fieldName];
@@ -44931,10 +44938,10 @@ function getTransactionKey(req) {
44931
44938
  const { resourceRequest } = req;
44932
44939
  const { baseUri, basePath, queryParams, headers } = resourceRequest;
44933
44940
  const path = `${baseUri}${basePath}`;
44934
- const queryParamsString = queryParams ? stringify$5(queryParams) : EMPTY_STRING;
44935
- const headersString = stringify$5(headers);
44941
+ const queryParamsString = queryParams ? stringify$6(queryParams) : EMPTY_STRING;
44942
+ const headersString = stringify$6(headers);
44936
44943
  const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
44937
- ? stringify$5(resourceRequest.body)
44944
+ ? stringify$6(resourceRequest.body)
44938
44945
  : EMPTY_STRING;
44939
44946
  return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}${bodyString}`;
44940
44947
  }
@@ -44943,7 +44950,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
44943
44950
  if (fulfill === undefined) {
44944
44951
  return null;
44945
44952
  }
44946
- const handlersMap = entries$3(inflightRequests);
44953
+ const handlersMap = entries$4(inflightRequests);
44947
44954
  for (let i = 0, len = handlersMap.length; i < len; i += 1) {
44948
44955
  const [transactionKey, handlers] = handlersMap[i];
44949
44956
  // check fulfillment against only the first handler ([0]) because it's equal or
@@ -45000,7 +45007,7 @@ const dedupeRequest = (req) => {
45000
45007
  // extra clone (particularly when there's only 1 handler).
45001
45008
  for (let i = 1, len = handlers.length; i < len; i++) {
45002
45009
  const handler = handlers[i];
45003
- handler.resolve(parse$5(stringify$5(response)));
45010
+ handler.resolve(parse$6(stringify$6(response)));
45004
45011
  }
45005
45012
  handlers[0].resolve(response);
45006
45013
  }, (error) => {
@@ -45106,7 +45113,7 @@ function isDeprecatedDurableStoreEntry(durableRecord) {
45106
45113
  const DefaultDurableSegment = 'DEFAULT';
45107
45114
  const RedirectDurableSegment = 'REDIRECT_KEYS';
45108
45115
 
45109
- const { keys: keys$6, create: create$5, assign: assign$5, freeze: freeze$1$1 } = Object;
45116
+ const { keys: keys$7, create: create$6, assign: assign$6, freeze: freeze$1$1 } = Object;
45110
45117
 
45111
45118
  //Durable store error instrumentation key
45112
45119
  const DURABLE_STORE_ERROR = 'durable-store-error';
@@ -45150,7 +45157,7 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
45150
45157
  if (durableRecords === undefined) {
45151
45158
  return { revivedKeys, hadUnexpectedShape };
45152
45159
  }
45153
- const durableKeys = keys$6(durableRecords);
45160
+ const durableKeys = keys$7(durableRecords);
45154
45161
  if (durableKeys.length === 0) {
45155
45162
  // no records to revive
45156
45163
  return { revivedKeys, hadUnexpectedShape };
@@ -45324,7 +45331,7 @@ class DurableTTLStore {
45324
45331
  overrides,
45325
45332
  };
45326
45333
  }
45327
- const keys$1 = keys$6(entries);
45334
+ const keys$1 = keys$7(entries);
45328
45335
  for (let i = 0, len = keys$1.length; i < len; i++) {
45329
45336
  const key = keys$1[i];
45330
45337
  const entry = entries[key];
@@ -45346,13 +45353,13 @@ class DurableTTLStore {
45346
45353
  }
45347
45354
 
45348
45355
  function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = []) {
45349
- const durableRecords = create$5(null);
45350
- const evictedRecords = create$5(null);
45356
+ const durableRecords = create$6(null);
45357
+ const evictedRecords = create$6(null);
45351
45358
  const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
45352
45359
  // TODO: W-8909393 Once metadata is stored in its own segment we need to
45353
45360
  // call setEntries for the visitedIds on default segment and call setEntries
45354
45361
  // on the metadata segment for the refreshedIds
45355
- const keys$1 = keys$6({ ...visitedIds, ...refreshedIds });
45362
+ const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
45356
45363
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
45357
45364
  const key = keys$1[i];
45358
45365
  const record = records[key];
@@ -45374,7 +45381,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
45374
45381
  }
45375
45382
  const durableStoreOperations = additionalDurableStoreOperations;
45376
45383
  // publishes
45377
- const recordKeys = keys$6(durableRecords);
45384
+ const recordKeys = keys$7(durableRecords);
45378
45385
  if (recordKeys.length > 0) {
45379
45386
  durableStoreOperations.push({
45380
45387
  type: 'setEntries',
@@ -45395,7 +45402,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
45395
45402
  });
45396
45403
  });
45397
45404
  // evicts
45398
- const evictedKeys = keys$6(evictedRecords);
45405
+ const evictedKeys = keys$7(evictedRecords);
45399
45406
  if (evictedKeys.length > 0) {
45400
45407
  durableStoreOperations.push({
45401
45408
  type: 'evictEntries',
@@ -45456,7 +45463,7 @@ const AdapterContextSegment = 'ADAPTER-CONTEXT';
45456
45463
  const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
45457
45464
  async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
45458
45465
  // initialize empty context store
45459
- contextStores[adapterId] = create$5(null);
45466
+ contextStores[adapterId] = create$6(null);
45460
45467
  const context = {
45461
45468
  set(key, value) {
45462
45469
  contextStores[adapterId][key] = value;
@@ -45517,7 +45524,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
45517
45524
  const pendingContextStoreKeys = new Set();
45518
45525
  // redirects that need to be flushed to the durable store
45519
45526
  const pendingStoreRedirects = new Map();
45520
- const contextStores = create$5(null);
45527
+ const contextStores = create$6(null);
45521
45528
  let initializationPromise = new Promise((resolve) => {
45522
45529
  const finish = () => {
45523
45530
  resolve();
@@ -45584,7 +45591,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
45584
45591
  try {
45585
45592
  const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
45586
45593
  if (entries !== undefined) {
45587
- const entryKeys = keys$6(entries);
45594
+ const entryKeys = keys$7(entries);
45588
45595
  for (let i = 0, len = entryKeys.length; i < len; i++) {
45589
45596
  const entryKey = entryKeys[i];
45590
45597
  const entry = entries[entryKey];
@@ -45953,7 +45960,7 @@ function makeDurable(environment, { durableStore, instrumentation }) {
45953
45960
  type: 'stale-while-revalidate',
45954
45961
  staleDurationSeconds: Number.MAX_SAFE_INTEGER,
45955
45962
  });
45956
- return create$5(environment, {
45963
+ return create$6(environment, {
45957
45964
  publishStoreMetadata: { value: publishStoreMetadata },
45958
45965
  storeIngest: { value: storeIngest },
45959
45966
  storeIngestError: { value: storeIngestError },
@@ -47192,7 +47199,7 @@ function compoundOperatorToSql(operator) {
47192
47199
  }
47193
47200
 
47194
47201
  const { isArray: isArray$4 } = Array;
47195
- const { keys: keys$5 } = Object;
47202
+ const { keys: keys$6 } = Object;
47196
47203
 
47197
47204
  function isListValueNode(node) {
47198
47205
  return node.kind === 'ListValue';
@@ -48824,7 +48831,7 @@ function generateVariableSubQuery(valueNode, name, type, variables) {
48824
48831
  switch (valueNode.kind) {
48825
48832
  case Kind.OBJECT: {
48826
48833
  // For example, `{ Id: { eq: $draftId } }` is a `ObjectValueNode`, which has field keys 'Id'
48827
- const resultQuery = keys$5(valueNode.fields)
48834
+ const resultQuery = keys$6(valueNode.fields)
48828
48835
  .map((key) => generateVariableSubQuery(valueNode.fields[key], key, type, variables))
48829
48836
  .filter((subquery) => subquery.length > 0)
48830
48837
  .join(',');
@@ -48900,7 +48907,7 @@ function swapArgumentWithVariableNodes(swapped, original) {
48900
48907
  }
48901
48908
  function swapValueNodeWithVariableNodes(original, swapped) {
48902
48909
  if (original.kind === Kind.OBJECT) {
48903
- for (const key of keys$5(original.fields)) {
48910
+ for (const key of keys$6(original.fields)) {
48904
48911
  if (isObjectValueNode$1(swapped) && swapped.fields[key]) {
48905
48912
  if (is(original.fields[key], 'Variable')) {
48906
48913
  original.fields[key] = swapped.fields[key];
@@ -49482,12 +49489,12 @@ function createDraftSynthesisErrorResponse(message = 'failed to synthesize draft
49482
49489
  return new DraftErrorFetchResponse(HttpStatusCode$1.BadRequest, error);
49483
49490
  }
49484
49491
 
49485
- const { keys: keys$4, create: create$4, assign: assign$4, values: values$2 } = Object;
49486
- const { stringify: stringify$4, parse: parse$4 } = JSON;
49492
+ const { keys: keys$5, create: create$5, assign: assign$5, values: values$2 } = Object;
49493
+ const { stringify: stringify$5, parse: parse$5 } = JSON;
49487
49494
  const { isArray: isArray$3 } = Array;
49488
49495
 
49489
49496
  function clone$1(obj) {
49490
- return parse$4(stringify$4(obj));
49497
+ return parse$5(stringify$5(obj));
49491
49498
  }
49492
49499
 
49493
49500
  /**
@@ -49594,13 +49601,13 @@ function buildLuvioOverrideForDraftAdapters(luvio, handler, extractTargetIdFromC
49594
49601
  }
49595
49602
  softEvict(key);
49596
49603
  };
49597
- return create$4(luvio, {
49604
+ return create$5(luvio, {
49598
49605
  dispatchResourceRequest: { value: dispatchResourceRequest },
49599
49606
  publishStoreMetadata: { value: publishStoreMetadata },
49600
49607
  storeEvict: { value: storeEvict },
49601
49608
  });
49602
49609
  }
49603
- return create$4(luvio, {
49610
+ return create$5(luvio, {
49604
49611
  dispatchResourceRequest: { value: dispatchResourceRequest },
49605
49612
  publishStoreMetadata: { value: publishStoreMetadata },
49606
49613
  });
@@ -49634,7 +49641,7 @@ async function getDraftIdMappings(durableStore, mappingIds) {
49634
49641
  if (entries === undefined) {
49635
49642
  return mappings;
49636
49643
  }
49637
- const keys$1 = keys$4(entries);
49644
+ const keys$1 = keys$5(entries);
49638
49645
  for (const key of keys$1) {
49639
49646
  const entry = entries[key].data;
49640
49647
  if (isLegacyDraftIdMapping(key)) {
@@ -49652,7 +49659,7 @@ async function getDraftIdMappings(durableStore, mappingIds) {
49652
49659
  async function clearDraftIdSegment(durableStore) {
49653
49660
  const entries = await durableStore.getAllEntries(DRAFT_ID_MAPPINGS_SEGMENT);
49654
49661
  if (entries) {
49655
- const keys$1 = keys$4(entries);
49662
+ const keys$1 = keys$5(entries);
49656
49663
  if (keys$1.length > 0) {
49657
49664
  await durableStore.evictEntries(keys$1, DRAFT_ID_MAPPINGS_SEGMENT);
49658
49665
  }
@@ -50059,7 +50066,7 @@ class DurableDraftQueue {
50059
50066
  return this.replaceOrMergeActions(targetActionId, sourceActionId, true);
50060
50067
  }
50061
50068
  async setMetadata(actionId, metadata) {
50062
- const keys$1 = keys$4(metadata);
50069
+ const keys$1 = keys$5(metadata);
50063
50070
  const compatibleKeys = keys$1.filter((key) => {
50064
50071
  const value = metadata[key];
50065
50072
  return typeof key === 'string' && typeof value === 'string';
@@ -50209,7 +50216,7 @@ class DurableDraftStore {
50209
50216
  const waitForOngoingSync = this.syncPromise || Promise.resolve();
50210
50217
  return waitForOngoingSync.then(() => {
50211
50218
  const { draftStore } = this;
50212
- const keys$1 = keys$4(draftStore);
50219
+ const keys$1 = keys$5(draftStore);
50213
50220
  const actionArray = [];
50214
50221
  for (let i = 0, len = keys$1.length; i < len; i++) {
50215
50222
  const key = keys$1[i];
@@ -50233,7 +50240,7 @@ class DurableDraftStore {
50233
50240
  deleteByTag(tag) {
50234
50241
  const deleteAction = () => {
50235
50242
  const { draftStore } = this;
50236
- const keys$1 = keys$4(draftStore);
50243
+ const keys$1 = keys$5(draftStore);
50237
50244
  const durableKeys = [];
50238
50245
  for (let i = 0, len = keys$1.length; i < len; i++) {
50239
50246
  const key = keys$1[i];
@@ -50323,7 +50330,7 @@ class DurableDraftStore {
50323
50330
  return this.runQueuedOperations();
50324
50331
  }
50325
50332
  const { draftStore } = this;
50326
- const keys$1 = keys$4(durableEntries);
50333
+ const keys$1 = keys$5(durableEntries);
50327
50334
  for (let i = 0, len = keys$1.length; i < len; i++) {
50328
50335
  const entry = durableEntries[keys$1[i]];
50329
50336
  const action = entry.data;
@@ -50493,7 +50500,7 @@ class AbstractResourceRequestActionHandler {
50493
50500
  let updatedActionTargetId = undefined;
50494
50501
  const { tag: queueActionTag, data: queueActionRequest, id: queueActionId, } = queueAction;
50495
50502
  let { basePath, body } = queueActionRequest;
50496
- let stringifiedBody = stringify$4(body);
50503
+ let stringifiedBody = stringify$5(body);
50497
50504
  // for each redirected ID/key we loop over the operation to see if it needs
50498
50505
  // to be updated
50499
50506
  for (const { draftId, draftKey, canonicalId, canonicalKey } of redirects) {
@@ -50518,7 +50525,7 @@ class AbstractResourceRequestActionHandler {
50518
50525
  data: {
50519
50526
  ...queueActionRequest,
50520
50527
  basePath: basePath,
50521
- body: parse$4(stringifiedBody),
50528
+ body: parse$5(stringifiedBody),
50522
50529
  },
50523
50530
  };
50524
50531
  // item needs to be replaced with a new item at the new record key
@@ -50537,7 +50544,7 @@ class AbstractResourceRequestActionHandler {
50537
50544
  data: {
50538
50545
  ...queueActionRequest,
50539
50546
  basePath: basePath,
50540
- body: parse$4(stringifiedBody),
50547
+ body: parse$5(stringifiedBody),
50541
50548
  },
50542
50549
  };
50543
50550
  // item needs to be updated
@@ -50947,7 +50954,7 @@ class DraftManager {
50947
50954
  // We should always return an array, if the body is just a dictionary,
50948
50955
  // stick it in an array
50949
50956
  const body = isArray$3(action.error.body) ? action.error.body : [action.error.body];
50950
- const bodyString = stringify$4(body);
50957
+ const bodyString = stringify$5(body);
50951
50958
  item.error = {
50952
50959
  status: action.error.status || 0,
50953
50960
  ok: action.error.ok || false,
@@ -51112,7 +51119,7 @@ function makeEnvironmentDraftAware(luvio, env, durableStore, handlers, draftQueu
51112
51119
  decrementRefCount(key);
51113
51120
  };
51114
51121
  // note the makeEnvironmentUiApiRecordDraftAware will eventually go away once the adapters become draft aware
51115
- return create$4(env, {
51122
+ return create$5(env, {
51116
51123
  storePublish: { value: storePublish },
51117
51124
  handleSuccessResponse: { value: handleSuccessResponse },
51118
51125
  softEvict: { value: softEvict },
@@ -51393,8 +51400,8 @@ function isArrayLike(x) {
51393
51400
  (x.length === 0 || (x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1))));
51394
51401
  }
51395
51402
 
51396
- const { create: create$3, keys: keys$3, values: values$1, entries: entries$2, assign: assign$3 } = Object;
51397
- const { stringify: stringify$3, parse: parse$3 } = JSON;
51403
+ const { create: create$4, keys: keys$4, values: values$1, entries: entries$3, assign: assign$4 } = Object;
51404
+ const { stringify: stringify$4, parse: parse$4 } = JSON;
51398
51405
  const { isArray: isArray$2 } = Array;
51399
51406
 
51400
51407
  function recordLoaderFactory(query) {
@@ -51406,7 +51413,7 @@ function recordLoaderFactory(query) {
51406
51413
  rows.forEach((row) => {
51407
51414
  if (!row[0])
51408
51415
  return null;
51409
- const record = parse$3(row[0]);
51416
+ const record = parse$4(row[0]);
51410
51417
  if (record.id === id) {
51411
51418
  foundRow = record;
51412
51419
  }
@@ -51736,11 +51743,11 @@ function dateTimePredicate(input, operator, field, alias) {
51736
51743
  return dateTimeRange(range, operator, field, alias);
51737
51744
  }
51738
51745
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
51739
- throw new Error(`Where filter ${stringify$3(input)} is not supported`);
51746
+ throw new Error(`Where filter ${stringify$4(input)} is not supported`);
51740
51747
  }
51741
51748
  function dateTimeRange(input, op, field, alias) {
51742
51749
  const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
51743
- const key = keys$3(input)[0];
51750
+ const key = keys$4(input)[0];
51744
51751
  let operator = op;
51745
51752
  if (operator === '=')
51746
51753
  operator = 'BETWEEN';
@@ -51846,7 +51853,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
51846
51853
  if (!where)
51847
51854
  return [];
51848
51855
  let predicates = [];
51849
- const fields = keys$3(where);
51856
+ const fields = keys$4(where);
51850
51857
  for (const field of fields) {
51851
51858
  if (field === 'and' || field === 'or') {
51852
51859
  predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
@@ -51895,7 +51902,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
51895
51902
  }
51896
51903
  else {
51897
51904
  // @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
51898
- const entityNames = keys$3(where[field]);
51905
+ const entityNames = keys$4(where[field]);
51899
51906
  const polyPredicatesGroups = entityNames
51900
51907
  .filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
51901
51908
  .map((entityName) => {
@@ -51925,7 +51932,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
51925
51932
  }
51926
51933
  else {
51927
51934
  //`field` match the filedInfo's apiName
51928
- for (const [op, value] of entries$2(where[field])) {
51935
+ for (const [op, value] of entries$3(where[field])) {
51929
51936
  const operator = operatorToSql(op);
51930
51937
  /**
51931
51938
  Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
@@ -53035,7 +53042,7 @@ function depth(json, currentLevel = 0) {
53035
53042
  if (typeof json !== 'object') {
53036
53043
  return currentLevel;
53037
53044
  }
53038
- const keys$1 = keys$3(json);
53045
+ const keys$1 = keys$4(json);
53039
53046
  if (keys$1.length === 0)
53040
53047
  return 0;
53041
53048
  const depths = keys$1.map((key) => {
@@ -53064,7 +53071,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
53064
53071
  return predicates;
53065
53072
  const isSpanning = depth(orderBy) > 2;
53066
53073
  if (isSpanning) {
53067
- const keys$1 = keys$3(orderBy);
53074
+ const keys$1 = keys$4(orderBy);
53068
53075
  for (let i = 0, len = keys$1.length; i < len; i++) {
53069
53076
  const key = keys$1[i];
53070
53077
  const parentFields = objectInfoMap[recordType].fields;
@@ -53094,7 +53101,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
53094
53101
  }
53095
53102
  }
53096
53103
  else {
53097
- const keys$1 = keys$3(orderBy);
53104
+ const keys$1 = keys$4(orderBy);
53098
53105
  for (let i = 0, len = keys$1.length; i < len; i++) {
53099
53106
  const key = keys$1[i];
53100
53107
  if (!objectInfoMap[recordType])
@@ -53328,7 +53335,7 @@ function addResolversToSchema(schema, polyFields) {
53328
53335
  if (field.name === 'node') {
53329
53336
  field.resolve = function nodeResolver(obj, _args, { seenRecordIds }) {
53330
53337
  const { record, ingestionTimestamp } = obj;
53331
- const recordRepresentation = parse$3(record);
53338
+ const recordRepresentation = parse$4(record);
53332
53339
  seenRecordIds.add(recordRepresentation.id);
53333
53340
  return { recordRepresentation, ingestionTimestamp };
53334
53341
  };
@@ -53546,7 +53553,7 @@ function buildKeyStringForRecordQuery(operation, variables, argumentNodes, curre
53546
53553
  variables,
53547
53554
  fragmentMap: {},
53548
53555
  });
53549
- const filteredArgumentNodes = assign$3([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
53556
+ const filteredArgumentNodes = assign$4([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
53550
53557
  const argumentString = filteredArgumentNodes.length > 0
53551
53558
  ? '__' + serializeFieldArguments$1(filteredArgumentNodes, variables)
53552
53559
  : '';
@@ -53601,7 +53608,7 @@ const baseTypeDefinitions = uiapiSchemaString + additionalSchemaDefinitions;
53601
53608
  * @returns Type definition string and entity type names which support polymorphism.
53602
53609
  */
53603
53610
  function generateTypeDefinitions(objectInfos) {
53604
- if (keys$3(objectInfos).length === 0)
53611
+ if (keys$4(objectInfos).length === 0)
53605
53612
  return { typeDefs: baseTypeDefinitions, polyFieldTypeNames: [] };
53606
53613
  const { recordQueries, recordConnections, polyFieldTypeNameArr } = generateRecordQueries(objectInfos);
53607
53614
  const typeDefs = `
@@ -54352,7 +54359,7 @@ async function resolveObjectInfos(objectInfotree, objectInfoApiMap, startNodes,
54352
54359
  // eslint-disable-next-line
54353
54360
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54354
54361
  }
54355
- if (keys$3(objectInfos).length < startNodes.size) {
54362
+ if (keys$4(objectInfos).length < startNodes.size) {
54356
54363
  // eslint-disable-next-line
54357
54364
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
54358
54365
  }
@@ -55309,7 +55316,7 @@ function removeSyntheticFields(result, query) {
55309
55316
  // so we keep any other results that are not included in a record query
55310
55317
  const output = { ...result };
55311
55318
  const outputApiParent = output.data.uiapi.query;
55312
- const keys$1 = keys$3(nodeJson);
55319
+ const keys$1 = keys$4(nodeJson);
55313
55320
  keys$1.forEach((recordName) => {
55314
55321
  const outputApi = {};
55315
55322
  // Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
@@ -55329,7 +55336,7 @@ function removeSyntheticFields(result, query) {
55329
55336
  * @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
55330
55337
  */
55331
55338
  function createUserJsonOutput(selection, jsonInput, jsonOutput) {
55332
- const keys$1 = keys$3(jsonInput);
55339
+ const keys$1 = keys$4(jsonInput);
55333
55340
  if (selection.selectionSet) {
55334
55341
  createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
55335
55342
  }
@@ -55338,7 +55345,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
55338
55345
  }
55339
55346
  }
55340
55347
  function createjsonOutput(selections, jsonInput, jsonOutput) {
55341
- const keys$1 = keys$3(jsonInput);
55348
+ const keys$1 = keys$4(jsonInput);
55342
55349
  selections.filter(isFieldNode).forEach((subSelection) => {
55343
55350
  const fieldName = subSelection.name.value;
55344
55351
  if (keys$1.includes(fieldName)) {
@@ -55398,8 +55405,8 @@ function referenceIdFieldForRelationship(relationshipName) {
55398
55405
  * For full license text, see the LICENSE.txt file
55399
55406
  */
55400
55407
 
55401
- const { keys: keys$2$1, values, create: create$2$1, assign: assign$2, freeze: freeze$2 } = Object;
55402
- const { stringify: stringify$2, parse: parse$2 } = JSON;
55408
+ const { keys: keys$3, values, create: create$3, assign: assign$3, freeze: freeze$2 } = Object;
55409
+ const { stringify: stringify$3, parse: parse$3 } = JSON;
55403
55410
  const { shift } = Array.prototype;
55404
55411
  const { isArray: isArray$1$1 } = Array;
55405
55412
 
@@ -55465,7 +55472,7 @@ function getRecordKeyForId(luvio, recordId) {
55465
55472
  */
55466
55473
  function filterOutReferenceFieldsAndLinks(record) {
55467
55474
  const filteredFields = {};
55468
- const fieldNames = keys$2$1(record.fields);
55475
+ const fieldNames = keys$3(record.fields);
55469
55476
  for (const fieldName of fieldNames) {
55470
55477
  const field = record.fields[fieldName];
55471
55478
  if (isFieldLink(field) === false) {
@@ -55566,7 +55573,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableStore }) {
55566
55573
  const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
55567
55574
  return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
55568
55575
  };
55569
- return create$2$1(env, {
55576
+ return create$3(env, {
55570
55577
  dispatchResourceRequest: { value: dispatchResourceRequest },
55571
55578
  });
55572
55579
  }
@@ -55744,7 +55751,7 @@ function getRecordsDraftEnvironment(luvio, env, { isDraftId }) {
55744
55751
  return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
55745
55752
  }));
55746
55753
  };
55747
- return create$2$1(env, {
55754
+ return create$3(env, {
55748
55755
  dispatchResourceRequest: { value: dispatchResourceRequest },
55749
55756
  });
55750
55757
  }
@@ -55754,11 +55761,11 @@ function makeEnvironmentUiApiRecordDraftAware(luvio, options, env) {
55754
55761
  const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
55755
55762
  return synthesizer(luvio, environment, options);
55756
55763
  }, env);
55757
- return create$2$1(adapterSpecificEnvironments, {});
55764
+ return create$3(adapterSpecificEnvironments, {});
55758
55765
  }
55759
55766
 
55760
55767
  function clone(obj) {
55761
- return parse$2(stringify$2(obj));
55768
+ return parse$3(stringify$3(obj));
55762
55769
  }
55763
55770
 
55764
55771
  const DEFAULT_FIELD_CREATED_BY_ID = 'CreatedById';
@@ -55881,7 +55888,7 @@ function recursivelyApplyDraftsToRecord(record, draftMetadata, recordOperations)
55881
55888
  LastModifiedDate: lastModifiedDate,
55882
55889
  };
55883
55890
  const draftFields = buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, internalFields, objectInfos, referencedRecords, formatDisplayValue);
55884
- const fieldNames = keys$2$1(draftFields);
55891
+ const fieldNames = keys$3(draftFields);
55885
55892
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55886
55893
  const fieldName = fieldNames[i];
55887
55894
  // don't apply server values to draft created records
@@ -55942,7 +55949,7 @@ function removeDrafts(record, luvio, objectInfo) {
55942
55949
  return undefined;
55943
55950
  }
55944
55951
  const updatedFields = {};
55945
- const fieldNames = keys$2$1(fields);
55952
+ const fieldNames = keys$3(fields);
55946
55953
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55947
55954
  const fieldName = fieldNames[i];
55948
55955
  const field = fields[fieldName];
@@ -55989,7 +55996,7 @@ function removeDrafts(record, luvio, objectInfo) {
55989
55996
  * @param fields List of draft record fields
55990
55997
  */
55991
55998
  function buildRecordFieldValueRepresentationsFromDraftFields(luvio, apiName, fields, objectInfos, referencedRecords, formatDisplayValue) {
55992
- const fieldNames = keys$2$1(fields);
55999
+ const fieldNames = keys$3(fields);
55993
56000
  const recordFields = {};
55994
56001
  const objectInfo = objectInfos.get(apiName);
55995
56002
  for (let i = 0, len = fieldNames.length; i < len; i++) {
@@ -56058,7 +56065,7 @@ function buildSyntheticRecordRepresentation(luvio, createOperation, userId, obje
56058
56065
  draftFields[DEFAULT_FIELD_OWNER_ID] = { value: userId, displayValue: null };
56059
56066
  draftFields[DEFAULT_FIELD_ID] = { value: recordId, displayValue: null };
56060
56067
  if (objectInfo !== undefined) {
56061
- const allObjectFields = keys$2$1(objectInfo.fields);
56068
+ const allObjectFields = keys$3(objectInfo.fields);
56062
56069
  allObjectFields.forEach((fieldName) => {
56063
56070
  if (draftFields[fieldName] === undefined) {
56064
56071
  draftFields[fieldName] = { value: null, displayValue: null };
@@ -56182,7 +56189,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
56182
56189
  this.isDraftId = isDraftId;
56183
56190
  this.recordService = recordService;
56184
56191
  this.handlerId = LDS_ACTION_HANDLER_ID;
56185
- this.collectedFields = create$2$1(null);
56192
+ this.collectedFields = create$3(null);
56186
56193
  recordService.registerRecordHandler(this);
56187
56194
  }
56188
56195
  async buildPendingAction(request, queue) {
@@ -56395,11 +56402,11 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
56395
56402
  // otherwise we're a record
56396
56403
  if (draftMetadata === undefined) {
56397
56404
  // no drafts applied to this record, publish and be done
56398
- this.collectedFields = create$2$1(null);
56405
+ this.collectedFields = create$3(null);
56399
56406
  return publishData(key, data);
56400
56407
  }
56401
56408
  // create a denormalized record with the collected fields
56402
- const recordFieldNames = keys$2$1(data.fields);
56409
+ const recordFieldNames = keys$3(data.fields);
56403
56410
  const partialRecord = {
56404
56411
  ...data,
56405
56412
  fields: {},
@@ -56421,7 +56428,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
56421
56428
  lastModifiedDate: recordWithDrafts.lastModifiedDate,
56422
56429
  lastModifiedById: recordWithDrafts.lastModifiedById,
56423
56430
  };
56424
- for (const fieldName of keys$2$1(recordWithSpanningRefLinks.fields)) {
56431
+ for (const fieldName of keys$3(recordWithSpanningRefLinks.fields)) {
56425
56432
  const fieldKey = buildRecordFieldStoreKey(key, fieldName);
56426
56433
  if (this.collectedFields[fieldKey] !== undefined) {
56427
56434
  const fieldData = recordWithSpanningRefLinks.fields[fieldName];
@@ -56438,7 +56445,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
56438
56445
  // publish the normalized record
56439
56446
  publishData(key, normalizedRecord);
56440
56447
  // we've published the record, now clear the collected fields
56441
- this.collectedFields = create$2$1(null);
56448
+ this.collectedFields = create$3(null);
56442
56449
  }
56443
56450
  updateMetadata(existingMetadata, incomingMetadata) {
56444
56451
  // ensure the the api name cannot be overwritten in the incoming metadata
@@ -56475,7 +56482,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
56475
56482
  let resolvedUrlParams = request.urlParams;
56476
56483
  if (request.method === 'post' || request.method === 'patch') {
56477
56484
  const bodyFields = resolvedBody.fields;
56478
- const fieldNames = keys$2$1(bodyFields);
56485
+ const fieldNames = keys$3(bodyFields);
56479
56486
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56480
56487
  const fieldName = fieldNames[i];
56481
56488
  const fieldValue = bodyFields[fieldName];
@@ -56558,7 +56565,7 @@ function isField(key, data) {
56558
56565
  function normalizeRecordFields(key, entry) {
56559
56566
  const { data: record } = entry;
56560
56567
  const { fields, links } = record;
56561
- const linkNames = keys$2$1(links);
56568
+ const linkNames = keys$3(links);
56562
56569
  const normalizedFields = {};
56563
56570
  const returnEntries = {};
56564
56571
  for (let i = 0, len = linkNames.length; i < len; i++) {
@@ -56580,7 +56587,7 @@ function normalizeRecordFields(key, entry) {
56580
56587
  }
56581
56588
  }
56582
56589
  returnEntries[key] = {
56583
- data: assign$2(record, { fields: normalizedFields }),
56590
+ data: assign$3(record, { fields: normalizedFields }),
56584
56591
  metadata: entry.metadata,
56585
56592
  };
56586
56593
  return returnEntries;
@@ -56596,7 +56603,7 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
56596
56603
  const fields = normalizedRecord.fields;
56597
56604
  const filteredFields = {};
56598
56605
  const links = {};
56599
- const fieldNames = keys$2$1(fields);
56606
+ const fieldNames = keys$3(fields);
56600
56607
  for (let i = 0, len = fieldNames.length; i < len; i++) {
56601
56608
  const fieldName = fieldNames[i];
56602
56609
  const field = fields[fieldName];
@@ -56683,8 +56690,8 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
56683
56690
  if (durableEntries === undefined) {
56684
56691
  return undefined;
56685
56692
  }
56686
- const returnEntries = create$2$1(null);
56687
- const keys$1 = keys$2$1(durableEntries);
56693
+ const returnEntries = create$3(null);
56694
+ const keys$1 = keys$3(durableEntries);
56688
56695
  for (let i = 0, len = keys$1.length; i < len; i++) {
56689
56696
  const key = keys$1[i];
56690
56697
  const value = durableEntries[key];
@@ -56692,7 +56699,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
56692
56699
  continue;
56693
56700
  }
56694
56701
  if (isEntryDurableRecordRepresentation(value, key)) {
56695
- assign$2(returnEntries, normalizeRecordFields(key, value));
56702
+ assign$3(returnEntries, normalizeRecordFields(key, value));
56696
56703
  }
56697
56704
  else {
56698
56705
  returnEntries[key] = value;
@@ -56702,8 +56709,8 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
56702
56709
  });
56703
56710
  };
56704
56711
  const denormalizeEntries = function (entries) {
56705
- const putEntries = create$2$1(null);
56706
- const keys$1 = keys$2$1(entries);
56712
+ const putEntries = create$3(null);
56713
+ const keys$1 = keys$3(entries);
56707
56714
  const putRecords = {};
56708
56715
  const putRecordViews = {};
56709
56716
  const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
@@ -56812,7 +56819,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
56812
56819
  return denormalizedRecord;
56813
56820
  });
56814
56821
  };
56815
- return create$2$1(durableStore, {
56822
+ return create$3(durableStore, {
56816
56823
  getEntries: { value: getEntries, writable: true },
56817
56824
  setEntries: { value: setEntries, writable: true },
56818
56825
  batchOperations: { value: batchOperations, writable: true },
@@ -56830,7 +56837,7 @@ function normalizeError$1(error) {
56830
56837
  else if (typeof error === 'string') {
56831
56838
  return new Error(error);
56832
56839
  }
56833
- return new Error(stringify$2(error));
56840
+ return new Error(stringify$3(error));
56834
56841
  }
56835
56842
 
56836
56843
  const PERFORM_QUICK_ACTION_ENDPOINT_REGEX = /^\/ui-api\/actions\/perform-quick-action\/.*$/;
@@ -56858,7 +56865,7 @@ function performQuickActionDraftEnvironment(luvio, env, handler) {
56858
56865
  }
56859
56866
  return createOkResponse(data);
56860
56867
  };
56861
- return create$2$1(env, {
56868
+ return create$3(env, {
56862
56869
  dispatchResourceRequest: { value: dispatchResourceRequest },
56863
56870
  });
56864
56871
  }
@@ -56925,7 +56932,7 @@ class UiApiDraftRecordService {
56925
56932
  };
56926
56933
  }
56927
56934
  objectInfoMap.set(apiName, objectInfo);
56928
- const fields = keys$2$1(operation.fields);
56935
+ const fields = keys$3(operation.fields);
56929
56936
  const unexpectedFields = [];
56930
56937
  for (const field of fields) {
56931
56938
  const fieldInfo = objectInfo.fields[field];
@@ -57211,7 +57218,7 @@ const replaceDraftIdsInVariables$1 = (variables, draftFunctions, unmappedDraftID
57211
57218
  }
57212
57219
  else if (typeof object === 'object' && object !== null) {
57213
57220
  let source = object;
57214
- return keys$2$1(source).reduce((acc, key) => {
57221
+ return keys$3(source).reduce((acc, key) => {
57215
57222
  acc[key] = replace(source[key]);
57216
57223
  return acc;
57217
57224
  }, {});
@@ -57220,7 +57227,7 @@ const replaceDraftIdsInVariables$1 = (variables, draftFunctions, unmappedDraftID
57220
57227
  return object;
57221
57228
  }
57222
57229
  };
57223
- let newVariables = keys$2$1(variables).reduce((acc, key) => {
57230
+ let newVariables = keys$3(variables).reduce((acc, key) => {
57224
57231
  acc[key] = replace(variables[key]);
57225
57232
  return acc;
57226
57233
  }, {});
@@ -57233,7 +57240,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
57233
57240
  };
57234
57241
  return async function draftAwareGraphQLAdapter(config, buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy, requestContext = {}) {
57235
57242
  //create a copy to not accidentally modify the AST in the astResolver map of luvio
57236
- const copy = parse$2(stringify$2(config.query));
57243
+ const copy = parse$3(stringify$3(config.query));
57237
57244
  let injectedAST;
57238
57245
  let objectInfoNeeded = {};
57239
57246
  let unmappedDraftIDs;
@@ -57298,7 +57305,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
57298
57305
  ({ result: gqlResult, seenRecordIds } = await evaluate({
57299
57306
  ...config,
57300
57307
  //need to create another copy of the ast for future writes
57301
- query: parse$2(stringify$2(injectedAST)),
57308
+ query: parse$3(stringify$3(injectedAST)),
57302
57309
  }, observers, { userId }, objectInfoNeeded, store, nonEvaluatedSnapshot));
57303
57310
  }
57304
57311
  catch (throwable) {
@@ -58052,16 +58059,16 @@ const recordIdGenerator = (id) => {
58052
58059
  * For full license text, see the LICENSE.txt file
58053
58060
  */
58054
58061
 
58055
- const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
58056
- const { stringify: stringify$1$1, parse: parse$1$1 } = JSON;
58062
+ const { keys: keys$2$1, create: create$2$1, assign: assign$2, entries: entries$2 } = Object;
58063
+ const { stringify: stringify$2, parse: parse$2 } = JSON;
58057
58064
  const { push: push$1, join: join$1, slice: slice$1 } = Array.prototype;
58058
58065
  const { isArray: isArray$6, from } = Array;
58059
58066
 
58060
58067
  function ldsParamsToString(params) {
58061
- const returnParams = create$1$1(null);
58062
- const keys$1$1$1 = keys$1$1(params);
58063
- for (let i = 0, len = keys$1$1$1.length; i < len; i++) {
58064
- const key = keys$1$1$1[i];
58068
+ const returnParams = create$2$1(null);
58069
+ const keys$1 = keys$2$1(params);
58070
+ for (let i = 0, len = keys$1.length; i < len; i++) {
58071
+ const key = keys$1[i];
58065
58072
  const value = params[key];
58066
58073
  if (value === undefined) {
58067
58074
  // filter out params that have no value
@@ -58076,8 +58083,8 @@ function ldsParamsToString(params) {
58076
58083
  else {
58077
58084
  returnParams[key] = `${value}`;
58078
58085
  }
58079
- if (isObject(value) === true && keys$1$1(value).length > 0) {
58080
- returnParams[key] = stringify$1$1(value);
58086
+ if (isObject(value) === true && keys$2$1(value).length > 0) {
58087
+ returnParams[key] = stringify$2(value);
58081
58088
  }
58082
58089
  }
58083
58090
  return returnParams;
@@ -58136,13 +58143,13 @@ function stringifyIfPresent(value) {
58136
58143
  if (value === undefined || value === null) {
58137
58144
  return null;
58138
58145
  }
58139
- return stringify$1$1(value);
58146
+ return stringify$2(value);
58140
58147
  }
58141
58148
  function parseIfPresent(value) {
58142
58149
  if (value === undefined || value === null || value === '') {
58143
58150
  return null;
58144
58151
  }
58145
- return parse$1$1(value);
58152
+ return parse$2(value);
58146
58153
  }
58147
58154
  function buildNimbusNetworkPluginRequest(resourceRequest, resourceRequestContext) {
58148
58155
  const { basePath, baseUri, method, headers, queryParams, body } = resourceRequest;
@@ -58472,7 +58479,7 @@ function buildAggregateUiUrl(params, resourceRequest) {
58472
58479
  optionalFields,
58473
58480
  };
58474
58481
  const queryString = [];
58475
- for (const [key, value] of entries$1(mergedParams)) {
58482
+ for (const [key, value] of entries$2(mergedParams)) {
58476
58483
  if (value !== undefined) {
58477
58484
  queryString.push(`${key}=${isArray$6(value) ? value.join(',') : value}`);
58478
58485
  }
@@ -58488,7 +58495,7 @@ function isSpanningRecord(fieldValue) {
58488
58495
  function mergeRecordFields(first, second) {
58489
58496
  const { fields: targetFields } = first;
58490
58497
  const { fields: sourceFields } = second;
58491
- const fieldNames = keys$1$1(sourceFields);
58498
+ const fieldNames = keys$2$1(sourceFields);
58492
58499
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
58493
58500
  const fieldName = fieldNames[i];
58494
58501
  const sourceField = sourceFields[fieldName];
@@ -58638,8 +58645,8 @@ function getMaxLengthPerChunkAllowed(request) {
58638
58645
  // Too much work to get exact length of the final url, so use stringified json to get the rough length.
58639
58646
  const roughUrlLengthWithoutFieldsAndOptionFields = request.basePath.length +
58640
58647
  request.baseUri.length +
58641
- (request.urlParams ? stringify$1$1(request.urlParams).length : 0) +
58642
- stringify$1$1({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
58648
+ (request.urlParams ? stringify$2(request.urlParams).length : 0) +
58649
+ stringify$2({ ...request.queryParams, fields: {}, optionalFields: {} }).length;
58643
58650
  // MAX_URL_LENGTH - full lenght without fields, optionalFields
58644
58651
  return MAX_URL_LENGTH - roughUrlLengthWithoutFieldsAndOptionFields;
58645
58652
  }
@@ -58847,8 +58854,8 @@ function makeNetworkAdapterChunkRecordFields(networkAdapter) {
58847
58854
  }, networkAdapter);
58848
58855
  }
58849
58856
 
58850
- const { keys: keys$8, create: create$6, assign: assign$6, entries } = Object;
58851
- const { stringify: stringify$6, parse: parse$6 } = JSON;
58857
+ const { keys: keys$1$1, create: create$1$1, assign: assign$1, entries: entries$1 } = Object;
58858
+ const { stringify: stringify$1$1, parse: parse$1$1 } = JSON;
58852
58859
  const { push, join, slice } = Array.prototype;
58853
58860
 
58854
58861
  // so eslint doesn't complain about nimbus
@@ -58865,10 +58872,10 @@ class NimbusDraftQueue {
58865
58872
  if (callProxyMethod === undefined) {
58866
58873
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58867
58874
  }
58868
- const serializedAction = stringify$6([handlerId, data]);
58875
+ const serializedAction = stringify$1$1([handlerId, data]);
58869
58876
  return new Promise((resolve, reject) => {
58870
58877
  callProxyMethod('enqueue', serializedAction, (serializedActionResponse) => {
58871
- const response = parse$6(serializedActionResponse);
58878
+ const response = parse$1$1(serializedActionResponse);
58872
58879
  resolve(response);
58873
58880
  }, (errorMessage) => {
58874
58881
  reject(new Error(errorMessage));
@@ -58889,8 +58896,8 @@ class NimbusDraftQueue {
58889
58896
  return Promise.reject(new Error('callProxyMethod not defined on the nimbus plugin'));
58890
58897
  }
58891
58898
  return new Promise((resolve, reject) => {
58892
- callProxyMethod('getQueueActions', stringify$6([]), (serializedQueue) => {
58893
- resolve(parse$6(serializedQueue));
58899
+ callProxyMethod('getQueueActions', stringify$1$1([]), (serializedQueue) => {
58900
+ resolve(parse$1$1(serializedQueue));
58894
58901
  }, (errorMessage) => {
58895
58902
  reject(new Error(errorMessage));
58896
58903
  });
@@ -58901,17 +58908,17 @@ class NimbusDraftQueue {
58901
58908
  if (callProxyMethod === undefined) {
58902
58909
  return Promise.reject('callProxyMethod not defined on the nimbus plugin');
58903
58910
  }
58904
- const stringifiedArgs = stringify$6([action]);
58911
+ const stringifiedArgs = stringify$1$1([action]);
58905
58912
  return new Promise((resolve, reject) => {
58906
58913
  callProxyMethod('getDataForAction', stringifiedArgs, (data) => {
58907
58914
  if (data === undefined) {
58908
58915
  resolve(undefined);
58909
58916
  }
58910
58917
  else {
58911
- resolve(parse$6(data));
58918
+ resolve(parse$1$1(data));
58912
58919
  }
58913
58920
  }, (serializedError) => {
58914
- reject(parse$6(serializedError));
58921
+ reject(parse$1$1(serializedError));
58915
58922
  });
58916
58923
  });
58917
58924
  }
@@ -58975,7 +58982,7 @@ function normalizeError$2(err) {
58975
58982
  else if (typeof err === 'string') {
58976
58983
  return new Error(err);
58977
58984
  }
58978
- return new Error(stringify$6(err));
58985
+ return new Error(stringify$1$1(err));
58979
58986
  }
58980
58987
  const DRAFT_QUEUE_TOTAL_MERGE_ACTIONS_CALLS = 'draft-queue-total-mergeActions-calls';
58981
58988
  const DRAFT_AWARE_CREATE_CONTENT_DOCUMENT_AND_VERSION_ERROR = 'draft-aware-create-content-document-and-version-error';
@@ -59073,7 +59080,7 @@ function instrumentDraftQueue(queue) {
59073
59080
  logError: false,
59074
59081
  });
59075
59082
  };
59076
- return create$6(queue, { mergeActions: { value: mergeActions } });
59083
+ return create$1$1(queue, { mergeActions: { value: mergeActions } });
59077
59084
  }
59078
59085
 
59079
59086
  // so eslint doesn't complain about nimbus
@@ -59149,7 +59156,7 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
59149
59156
  function dataIsObjectInfo(key, data) {
59150
59157
  return incomingObjectInfos.has(key);
59151
59158
  }
59152
- return create$6(env, {
59159
+ return create$1$1(env, {
59153
59160
  handleSuccessResponse: { value: handleSuccessResponse },
59154
59161
  storePublish: { value: storePublish },
59155
59162
  });
@@ -59255,7 +59262,7 @@ class ObjectInfoService {
59255
59262
  this.getObjectInfosAdapter = getObjectInfosAdapter;
59256
59263
  this.durableStore = durableStore;
59257
59264
  // Local in-memory cache for ObjectInfo entries seen in DurableStore eg: {'Account': 001}
59258
- this.objectInfoMemoryCache = create$6(null);
59265
+ this.objectInfoMemoryCache = create$1$1(null);
59259
59266
  }
59260
59267
  /**
59261
59268
  * Size of return map not necessarily correlated with number of inputs. The
@@ -59361,6 +59368,9 @@ function registerReportObserver(reportObserver) {
59361
59368
  };
59362
59369
  }
59363
59370
 
59371
+ const { keys: keys$9, create: create$7, assign: assign$7, entries } = Object;
59372
+ const { stringify: stringify$7, parse: parse$7 } = JSON;
59373
+
59364
59374
  function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
59365
59375
  const paramList = whereIn.map(() => '?').join(',');
59366
59376
  return `SELECT ${columnNames.join(',')} FROM ${table} WHERE ${keyColumnName} IN (${paramList})`;
@@ -59372,13 +59382,13 @@ function selectColumnsFromTableWhereKeyInNamespaced(columnNames, table, keyColum
59372
59382
 
59373
59383
  // These const values must be in sync with the latest
59374
59384
  // @salesforce/nimbus-plugin-lds/sql schema file
59375
- const TABLE_NAME$3 = 'lds_data';
59385
+ const TABLE_NAME$1$1 = 'lds_data';
59376
59386
  const COLUMN_NAME_KEY$2 = 'key';
59377
59387
  const COLUMN_NAME_DATA$2 = 'data';
59378
59388
  const COLUMN_NAME_METADATA$1 = 'metadata';
59379
59389
  class LdsDataTable {
59380
59390
  constructor(plugin) {
59381
- this.tableName = TABLE_NAME$3;
59391
+ this.tableName = TABLE_NAME$1$1;
59382
59392
  this.columnNames = [COLUMN_NAME_KEY$2, COLUMN_NAME_DATA$2, COLUMN_NAME_METADATA$1];
59383
59393
  this.conflictColumnNames = [COLUMN_NAME_KEY$2];
59384
59394
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
@@ -59409,10 +59419,10 @@ class LdsDataTable {
59409
59419
  },
59410
59420
  conflictColumns: this.conflictColumnNames,
59411
59421
  columns: this.columnNames,
59412
- rows: keys$8(entries).reduce((rows, key) => {
59422
+ rows: keys$9(entries).reduce((rows, key) => {
59413
59423
  const entry = entries[key];
59414
59424
  const { data, metadata } = entry;
59415
- const row = [key, stringify$6(data), metadata ? stringify$6(metadata) : null];
59425
+ const row = [key, stringify$7(data), metadata ? stringify$7(metadata) : null];
59416
59426
  rows.push(row);
59417
59427
  return rows;
59418
59428
  }, []),
@@ -59422,10 +59432,10 @@ class LdsDataTable {
59422
59432
  return sqliteResult.rows.reduce((entries, row) => {
59423
59433
  const [key, stringifiedData, stringifiedMetadata] = row;
59424
59434
  const durableStoreEntry = {
59425
- data: parse$6(stringifiedData),
59435
+ data: parse$7(stringifiedData),
59426
59436
  };
59427
59437
  if (stringifiedMetadata !== null) {
59428
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59438
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59429
59439
  }
59430
59440
  entries[key] = durableStoreEntry;
59431
59441
  return entries;
@@ -59435,95 +59445,21 @@ class LdsDataTable {
59435
59445
 
59436
59446
  // These const values must be in sync with the latest
59437
59447
  // @salesforce/nimbus-plugin-lds/sql schema file
59448
+ const TABLE_NAME$2 = 'lds_internal';
59438
59449
  const COLUMN_NAME_KEY$1 = 'key';
59439
59450
  const COLUMN_NAME_DATA$1 = 'data';
59440
- class AbstractKeyValueDataTable {
59441
- constructor(plugin, tableName) {
59442
- this.columnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_DATA$1];
59443
- this.conflictColumnNames = [COLUMN_NAME_KEY$1];
59444
- this.plugin = plugin;
59445
- this.tableName = tableName;
59446
- }
59447
- getByKeys(keys) {
59448
- return new Promise((resolve, reject) => {
59449
- const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys);
59450
- this.plugin.query(getQuery, keys, (x) => {
59451
- resolve(this.mapToDurableEntries(x));
59452
- }, reject);
59453
- });
59454
- }
59455
- getAll() {
59456
- const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
59457
- return new Promise((resolve, reject) => {
59458
- this.plugin.query(getAllQuery, [], (x) => {
59459
- resolve(this.mapToDurableEntries(x));
59460
- }, reject);
59461
- });
59462
- }
59463
- entriesToUpsertOperations(entries, segment) {
59464
- return {
59465
- type: 'upsert',
59466
- table: this.tableName,
59467
- keyColumn: COLUMN_NAME_KEY$1,
59468
- context: {
59469
- segment,
59470
- },
59471
- conflictColumns: this.conflictColumnNames,
59472
- columns: this.columnNames,
59473
- rows: keys$8(entries).reduce((rows, key) => {
59474
- const entry = entries[key];
59475
- rows.push([key, stringify$6(entry.data)]);
59476
- return rows;
59477
- }, []),
59478
- };
59479
- }
59480
- mapToDurableEntries(sqliteResult) {
59481
- return sqliteResult.rows.reduce((entries, row) => {
59482
- const [key, stringifiedData] = row;
59483
- const durableStoreEntry = {
59484
- data: parse$6(stringifiedData),
59485
- };
59486
- entries[key] = durableStoreEntry;
59487
- return entries;
59488
- }, {});
59489
- }
59490
- }
59491
-
59492
- // These const values must be in sync with the latest
59493
- // @salesforce/nimbus-plugin-lds/sql schema file
59494
- const TABLE_NAME$2 = 'lds_env_drafts';
59495
- class LdsDraftsDataTable extends AbstractKeyValueDataTable {
59496
- constructor(plugin) {
59497
- super(plugin, TABLE_NAME$2);
59498
- }
59499
- }
59500
-
59501
- // These const values must be in sync with the latest
59502
- // @salesforce/nimbus-plugin-lds/sql schema file
59503
- const TABLE_NAME$1 = 'lds_env_draft_id_map';
59504
- class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
59505
- constructor(plugin) {
59506
- super(plugin, TABLE_NAME$1);
59507
- }
59508
- }
59509
-
59510
- // These const values must be in sync with the latest
59511
- // @salesforce/nimbus-plugin-lds/sql schema file
59512
- const TABLE_NAME = 'lds_internal';
59513
- const COLUMN_NAME_KEY = 'key';
59514
- const COLUMN_NAME_DATA = 'data';
59515
59451
  const COLUMN_NAME_METADATA = 'metadata';
59516
59452
  const COLUMN_NAME_NAMESPACE = 'namespace';
59517
59453
  class LdsInternalDataTable {
59518
59454
  constructor(plugin) {
59519
- this.tableName = TABLE_NAME;
59455
+ this.tableName = TABLE_NAME$2;
59520
59456
  this.columnNames = [
59521
- COLUMN_NAME_KEY,
59522
- COLUMN_NAME_DATA,
59457
+ COLUMN_NAME_KEY$1,
59458
+ COLUMN_NAME_DATA$1,
59523
59459
  COLUMN_NAME_METADATA,
59524
59460
  COLUMN_NAME_NAMESPACE,
59525
59461
  ];
59526
- this.conflictColumnNames = [COLUMN_NAME_KEY, COLUMN_NAME_NAMESPACE];
59462
+ this.conflictColumnNames = [COLUMN_NAME_KEY$1, COLUMN_NAME_NAMESPACE];
59527
59463
  this.getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName} WHERE ${COLUMN_NAME_NAMESPACE} = ?`;
59528
59464
  this.plugin = plugin;
59529
59465
  }
@@ -59531,7 +59467,7 @@ class LdsInternalDataTable {
59531
59467
  if (namespace === undefined) {
59532
59468
  throw Error('LdsInternalDataTable requires namespace');
59533
59469
  }
59534
- const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys, COLUMN_NAME_NAMESPACE);
59470
+ const getQuery = selectColumnsFromTableWhereKeyInNamespaced(this.columnNames, this.tableName, COLUMN_NAME_KEY$1, keys, COLUMN_NAME_NAMESPACE);
59535
59471
  return new Promise((resolve, reject) => {
59536
59472
  this.plugin.query(getQuery, [namespace].concat(keys), (x) => {
59537
59473
  resolve(this.mapToDurableEntries(x));
@@ -59549,18 +59485,18 @@ class LdsInternalDataTable {
59549
59485
  return {
59550
59486
  type: 'upsert',
59551
59487
  table: this.tableName,
59552
- keyColumn: COLUMN_NAME_KEY,
59488
+ keyColumn: COLUMN_NAME_KEY$1,
59553
59489
  context: {
59554
59490
  segment,
59555
59491
  },
59556
59492
  conflictColumns: this.conflictColumnNames,
59557
59493
  columns: this.columnNames,
59558
- rows: keys$8(entries).reduce((rows, key) => {
59494
+ rows: keys$9(entries).reduce((rows, key) => {
59559
59495
  const entry = entries[key];
59560
59496
  const { data, metadata } = entry;
59561
- const row = [key, stringify$6(data)];
59497
+ const row = [key, stringify$7(data)];
59562
59498
  if (metadata) {
59563
- row.push(stringify$6(metadata));
59499
+ row.push(stringify$7(metadata));
59564
59500
  }
59565
59501
  else {
59566
59502
  row.push(null);
@@ -59575,10 +59511,10 @@ class LdsInternalDataTable {
59575
59511
  return sqliteResult.rows.reduce((entries, row) => {
59576
59512
  const [key, stringifiedData, stringifiedMetadata] = row;
59577
59513
  const durableStoreEntry = {
59578
- data: parse$6(stringifiedData),
59514
+ data: parse$7(stringifiedData),
59579
59515
  };
59580
59516
  if (stringifiedMetadata !== null) {
59581
- durableStoreEntry.metadata = parse$6(stringifiedMetadata);
59517
+ durableStoreEntry.metadata = parse$7(stringifiedMetadata);
59582
59518
  }
59583
59519
  entries[key] = durableStoreEntry;
59584
59520
  return entries;
@@ -59587,13 +59523,12 @@ class LdsInternalDataTable {
59587
59523
  }
59588
59524
 
59589
59525
  class NimbusSqliteStore {
59590
- constructor(plugin) {
59526
+ constructor(plugin, additionalTableMap = {}) {
59591
59527
  this.plugin = plugin;
59592
59528
  this.internalDataTable = new LdsInternalDataTable(plugin);
59593
59529
  this.dataTableMap = {
59530
+ ...additionalTableMap,
59594
59531
  [DefaultDurableSegment]: new LdsDataTable(plugin),
59595
- [DRAFT_SEGMENT]: new LdsDraftsDataTable(plugin),
59596
- [DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(plugin),
59597
59532
  };
59598
59533
  }
59599
59534
  isEvalSupported() {
@@ -59690,11 +59625,90 @@ class NimbusSqliteStore {
59690
59625
  }
59691
59626
  }
59692
59627
 
59628
+ // These const values must be in sync with the latest
59629
+ // @salesforce/nimbus-plugin-lds/sql schema file
59630
+ const COLUMN_NAME_KEY = 'key';
59631
+ const COLUMN_NAME_DATA = 'data';
59632
+ class AbstractKeyValueDataTable {
59633
+ constructor(plugin, tableName) {
59634
+ this.columnNames = [COLUMN_NAME_KEY, COLUMN_NAME_DATA];
59635
+ this.conflictColumnNames = [COLUMN_NAME_KEY];
59636
+ this.plugin = plugin;
59637
+ this.tableName = tableName;
59638
+ }
59639
+ getByKeys(keys) {
59640
+ return new Promise((resolve, reject) => {
59641
+ const getQuery = selectColumnsFromTableWhereKeyIn(this.columnNames, this.tableName, COLUMN_NAME_KEY, keys);
59642
+ this.plugin.query(getQuery, keys, (x) => {
59643
+ resolve(this.mapToDurableEntries(x));
59644
+ }, reject);
59645
+ });
59646
+ }
59647
+ getAll() {
59648
+ const getAllQuery = `SELECT ${this.columnNames.join(',')} FROM ${this.tableName}`;
59649
+ return new Promise((resolve, reject) => {
59650
+ this.plugin.query(getAllQuery, [], (x) => {
59651
+ resolve(this.mapToDurableEntries(x));
59652
+ }, reject);
59653
+ });
59654
+ }
59655
+ entriesToUpsertOperations(entries, segment) {
59656
+ return {
59657
+ type: 'upsert',
59658
+ table: this.tableName,
59659
+ keyColumn: COLUMN_NAME_KEY,
59660
+ context: {
59661
+ segment,
59662
+ },
59663
+ conflictColumns: this.conflictColumnNames,
59664
+ columns: this.columnNames,
59665
+ rows: keys$9(entries).reduce((rows, key) => {
59666
+ const entry = entries[key];
59667
+ rows.push([key, stringify$7(entry.data)]);
59668
+ return rows;
59669
+ }, []),
59670
+ };
59671
+ }
59672
+ mapToDurableEntries(sqliteResult) {
59673
+ return sqliteResult.rows.reduce((entries, row) => {
59674
+ const [key, stringifiedData] = row;
59675
+ const durableStoreEntry = {
59676
+ data: parse$7(stringifiedData),
59677
+ };
59678
+ entries[key] = durableStoreEntry;
59679
+ return entries;
59680
+ }, {});
59681
+ }
59682
+ }
59683
+
59684
+ // These const values must be in sync with the latest
59685
+ // @salesforce/nimbus-plugin-lds/sql schema file
59686
+ const TABLE_NAME$1 = 'lds_env_drafts';
59687
+ class LdsDraftsDataTable extends AbstractKeyValueDataTable {
59688
+ constructor(plugin) {
59689
+ super(plugin, TABLE_NAME$1);
59690
+ }
59691
+ }
59692
+
59693
+ // These const values must be in sync with the latest
59694
+ // @salesforce/nimbus-plugin-lds/sql schema file
59695
+ const TABLE_NAME = 'lds_env_draft_id_map';
59696
+ class LdsDraftIdMapDataTable extends AbstractKeyValueDataTable {
59697
+ constructor(plugin) {
59698
+ super(plugin, TABLE_NAME);
59699
+ }
59700
+ }
59701
+
59693
59702
  // so eslint doesn't complain about nimbus
59694
59703
  let baseDurableStore;
59695
- function getNimbusDurableStore() {
59704
+ function getNimbusDurableStore(plugin) {
59696
59705
  if (baseDurableStore === undefined) {
59697
- baseDurableStore = new NimbusSqliteStore(__nimbus.plugins.LdsSqliteStore);
59706
+ const resolvedPlugin = plugin === undefined ? __nimbus.plugins.LdsSqliteStore : plugin;
59707
+ const draftDataTableMap = {
59708
+ [DRAFT_SEGMENT]: new LdsDraftsDataTable(resolvedPlugin),
59709
+ [DRAFT_ID_MAPPINGS_SEGMENT]: new LdsDraftIdMapDataTable(resolvedPlugin),
59710
+ };
59711
+ baseDurableStore = new NimbusSqliteStore(resolvedPlugin, draftDataTableMap);
59698
59712
  }
59699
59713
  return baseDurableStore;
59700
59714
  }
@@ -59835,7 +59849,7 @@ function makeEnvironmentGraphqlAware(environment) {
59835
59849
  }
59836
59850
  return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
59837
59851
  };
59838
- return create$6(environment, {
59852
+ return create$1$1(environment, {
59839
59853
  rebuildSnapshot: { value: rebuildSnapshot },
59840
59854
  applyCachePolicy: { value: applyCachePolicy },
59841
59855
  setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
@@ -59880,7 +59894,7 @@ function setupInspection(luvio) {
59880
59894
  // eslint-disable-next-line no-undef
59881
59895
  globalThis.luvio = luvio;
59882
59896
  registerReportObserver((report) => {
59883
- __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$6(report));
59897
+ __nimbus.plugins.LdsInspectorPlugin.sendAdapterReport(stringify$1$1(report));
59884
59898
  });
59885
59899
  }
59886
59900
  }
@@ -60721,7 +60735,7 @@ register({
60721
60735
  id: '@salesforce/lds-network-adapter',
60722
60736
  instrument: instrument$1,
60723
60737
  });
60724
- // version: 1.198.0-ead7de735
60738
+ // version: 1.199.1-4bf260c39
60725
60739
 
60726
60740
  const { create: create$2, keys: keys$2 } = Object;
60727
60741
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -77012,7 +77026,7 @@ function transformConfiguration$1(config) {
77012
77026
  // Make a copy of the config before running transform to avoid mutating the original config
77013
77027
  const adapterConfigCopy = {
77014
77028
  ...config,
77015
- query: parse$8(print(config.query))
77029
+ query: parse$9(print(config.query))
77016
77030
  };
77017
77031
  return {
77018
77032
  ...adapterConfigCopy,
@@ -77552,7 +77566,7 @@ function transformConfiguration(config) {
77552
77566
  const batchQueryTransformed = config.batchQuery.map((singleConfig) => {
77553
77567
  return {
77554
77568
  ...singleConfig,
77555
- query: applyMinimumFieldsToQuery(parse$8(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
77569
+ query: applyMinimumFieldsToQuery(parse$9(print(singleConfig.query))), // Stringifies and parses again to avoid mutating original. Should we just JSON.stringify to avoid the dependency on the parser?
77556
77570
  };
77557
77571
  });
77558
77572
  return {
@@ -78064,7 +78078,7 @@ register({
78064
78078
  configuration: { ...configurationForGraphQLAdapters },
78065
78079
  instrument,
78066
78080
  });
78067
- // version: 1.198.0-caa871e32
78081
+ // version: 1.199.1-844bcf9ee
78068
78082
 
78069
78083
  // On core the unstable adapters are re-exported with different names,
78070
78084
 
@@ -80311,7 +80325,7 @@ withDefaultLuvio((luvio) => {
80311
80325
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
80312
80326
  graphQLImperative = ldsAdapter;
80313
80327
  });
80314
- // version: 1.198.0-caa871e32
80328
+ // version: 1.199.1-844bcf9ee
80315
80329
 
80316
80330
  var gqlApi = /*#__PURE__*/Object.freeze({
80317
80331
  __proto__: null,
@@ -81000,4 +81014,4 @@ const { luvio } = getRuntime();
81000
81014
  setDefaultLuvio({ luvio });
81001
81015
 
81002
81016
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
81003
- // version: 1.198.0-ead7de735
81017
+ // version: 1.199.1-4bf260c39