@salesforce/lds-runtime-mobile 1.341.0 → 1.343.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -19,7 +19,6 @@ import { withRegistration, register } from '@salesforce/lds-default-luvio';
19
19
  import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation } from '@salesforce/lds-instrumentation';
20
20
  import { HttpStatusCode, setBypassDeepFreeze, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, ingestShape, coerceConfig as coerceConfig$1, typeCheckConfig as typeCheckConfig$h, createResourceParams as createResourceParams$h, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$f, resolveLink, createCustomAdapterEventEmitter, isFileReference, Environment, Luvio, InMemoryStore } from '@luvio/engine';
21
21
  import { isSupportedEntity, configuration, getObjectInfoAdapterFactory, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, isStoreKeyRecordViewEntity, extractRecordIdFromStoreKey, buildRecordRepKeyFromId, keyBuilderRecord, RecordRepresentationTTL, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, getRecordId18 as getRecordId18$1, getRecordsAdapterFactory as getRecordsAdapterFactory$1, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getObjectInfosAdapterFactory, getObjectInfoDirectoryAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationVersion } from '@salesforce/lds-adapters-uiapi';
22
- import graphqlRecordTypeIdFixGate from '@salesforce/gate/lmr.graphqlRecordTypeIdFix';
23
22
  import { Kind as Kind$1, visit as visit$1, isObjectType, defaultFieldResolver, buildSchema, parse as parse$5, extendSchema, isScalarType, execute, print } from '@luvio/graphql-parser';
24
23
  import FIRST_DAY_OF_WEEK from '@salesforce/i18n/firstDayOfWeek';
25
24
  import graphqQueryFieldLimit from '@salesforce/gate/lmr.graphqQueryFieldLimit';
@@ -38,6 +37,7 @@ import formattingOptions from 'lightning/i18nCldrOptions';
38
37
  import ldsPrimingGraphqlBatch from '@salesforce/gate/lds.primingGraphqlBatch';
39
38
  import lmrPrimingUseSoql from '@salesforce/gate/lmr.primingUseSoql';
40
39
  import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
40
+ import productConsumedSideEffectsKillSwitch from '@salesforce/gate/com.salesforce.fieldservice.productConsumedSideEffectsKillSwitch';
41
41
 
42
42
  /**
43
43
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -49,7 +49,7 @@ import graphqlL2AdapterGate from '@salesforce/gate/lmr.graphqlL2Adapter';
49
49
  const { parse: parse$4, stringify: stringify$4 } = JSON;
50
50
  const { join: join$1, push: push$2, unshift } = Array.prototype;
51
51
  const { isArray: isArray$3 } = Array;
52
- const { entries: entries$4, keys: keys$6 } = Object;
52
+ const { entries: entries$3, keys: keys$5 } = Object;
53
53
 
54
54
  const UI_API_BASE_URI = '/services/data/v64.0/ui-api';
55
55
 
@@ -114,7 +114,7 @@ function isSpanningRecord$2(fieldValue) {
114
114
  function mergeRecordFields$2(first, second) {
115
115
  const { fields: targetFields } = first;
116
116
  const { fields: sourceFields } = second;
117
- const fieldNames = keys$6(sourceFields);
117
+ const fieldNames = keys$5(sourceFields);
118
118
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
119
119
  const fieldName = fieldNames[i];
120
120
  const sourceField = sourceFields[fieldName];
@@ -361,7 +361,7 @@ function getFulfillingRequest(inflightRequests, resourceRequest) {
361
361
  if (fulfill === undefined) {
362
362
  return null;
363
363
  }
364
- const handlersMap = entries$4(inflightRequests);
364
+ const handlersMap = entries$3(inflightRequests);
365
365
  for (let i = 0, len = handlersMap.length; i < len; i += 1) {
366
366
  const [transactionKey, handlers] = handlersMap[i];
367
367
  // check fulfillment against only the first handler ([0]) because it's equal or
@@ -531,7 +531,7 @@ const RedirectDurableSegment = 'REDIRECT_KEYS';
531
531
  const MessagingDurableSegment = 'MESSAGING';
532
532
  const MessageNotifyStoreUpdateAvailable = 'notifyStoreUpdateAvailable';
533
533
 
534
- const { keys: keys$5, create: create$5, assign: assign$5, freeze: freeze$2 } = Object;
534
+ const { keys: keys$4, create: create$4, assign: assign$4, freeze: freeze$1 } = Object;
535
535
 
536
536
  //Durable store error instrumentation key
537
537
  const DURABLE_STORE_ERROR = 'durable-store-error';
@@ -581,7 +581,7 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
581
581
  if (durableRecords === undefined) {
582
582
  return { revivedKeys, hadUnexpectedShape };
583
583
  }
584
- const durableKeys = keys$5(durableRecords);
584
+ const durableKeys = keys$4(durableRecords);
585
585
  if (durableKeys.length === 0) {
586
586
  // no records to revive
587
587
  return { revivedKeys, hadUnexpectedShape };
@@ -766,7 +766,7 @@ class DurableTTLStore {
766
766
  overrides,
767
767
  };
768
768
  }
769
- const keys$1 = keys$5(entries);
769
+ const keys$1 = keys$4(entries);
770
770
  for (let i = 0, len = keys$1.length; i < len; i++) {
771
771
  const key = keys$1[i];
772
772
  const entry = entries[key];
@@ -788,14 +788,14 @@ class DurableTTLStore {
788
788
  }
789
789
 
790
790
  function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, shouldFlush, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
791
- const durableRecords = create$5(null);
792
- const refreshedDurableRecords = create$5(null);
793
- const evictedRecords = create$5(null);
791
+ const durableRecords = create$4(null);
792
+ const refreshedDurableRecords = create$4(null);
793
+ const evictedRecords = create$4(null);
794
794
  const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
795
795
  // TODO: W-8909393 Once metadata is stored in its own segment we need to
796
796
  // call setEntries for the visitedIds on default segment and call setEntries
797
797
  // on the metadata segment for the refreshedIds
798
- const keys$1 = keys$5({ ...visitedIds, ...refreshedIds });
798
+ const keys$1 = keys$4({ ...visitedIds, ...refreshedIds });
799
799
  for (let i = 0, len = keys$1.length; i < len; i += 1) {
800
800
  const key = keys$1[i];
801
801
  const canonicalKey = store.getCanonicalRecordId(key);
@@ -827,7 +827,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
827
827
  }
828
828
  }
829
829
  const durableStoreOperations = additionalDurableStoreOperations;
830
- const recordKeys = keys$5(durableRecords);
830
+ const recordKeys = keys$4(durableRecords);
831
831
  if (recordKeys.length > 0) {
832
832
  // publishes with data
833
833
  durableStoreOperations.push({
@@ -836,7 +836,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
836
836
  segment: DefaultDurableSegment,
837
837
  });
838
838
  }
839
- const refreshKeys = keys$5(refreshedDurableRecords);
839
+ const refreshKeys = keys$4(refreshedDurableRecords);
840
840
  if (refreshKeys.length > 0) {
841
841
  // publishes with only metadata updates
842
842
  durableStoreOperations.push({
@@ -858,7 +858,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
858
858
  });
859
859
  });
860
860
  // evicts
861
- const evictedKeys = keys$5(evictedRecords);
861
+ const evictedKeys = keys$4(evictedRecords);
862
862
  if (evictedKeys.length > 0) {
863
863
  durableStoreOperations.push({
864
864
  type: 'evictEntries',
@@ -962,7 +962,7 @@ function buildRevivingStagingStore(upstreamStore) {
962
962
  // A reviving store is only "active" during a call to `environment.storeLookup`, and will
963
963
  // be used by the reader attempting to build an L1 snapshot. Immediately after the L1 rebuild
964
964
  // the reviving store becomes inactive other than receiving change notifications.
965
- return create$5(upstreamStore, {
965
+ return create$4(upstreamStore, {
966
966
  readEntry: { value: readEntry },
967
967
  markStale: { value: markStale },
968
968
  clearStale: { value: clearStale },
@@ -974,7 +974,7 @@ const AdapterContextSegment = 'ADAPTER-CONTEXT';
974
974
  const ADAPTER_CONTEXT_ID_SUFFIX = '__NAMED_CONTEXT';
975
975
  async function reviveOrCreateContext(adapterId, durableStore, durableStoreErrorHandler, contextStores, pendingContextStoreKeys, onContextLoaded) {
976
976
  // initialize empty context store
977
- contextStores[adapterId] = create$5(null);
977
+ contextStores[adapterId] = create$4(null);
978
978
  const context = {
979
979
  set(key, value) {
980
980
  contextStores[adapterId][key] = value;
@@ -1039,7 +1039,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1039
1039
  const revivingStores = new Set();
1040
1040
  // redirects that need to be flushed to the durable store
1041
1041
  const pendingStoreRedirects = new Map();
1042
- const contextStores = create$5(null);
1042
+ const contextStores = create$4(null);
1043
1043
  let initializationPromise = new Promise((resolve) => {
1044
1044
  const finish = () => {
1045
1045
  resolve();
@@ -1116,7 +1116,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1116
1116
  try {
1117
1117
  const entries = await durableStore.getEntries(adapterContextKeysFromDifferentInstance, AdapterContextSegment);
1118
1118
  if (entries !== undefined) {
1119
- const entryKeys = keys$5(entries);
1119
+ const entryKeys = keys$4(entries);
1120
1120
  for (let i = 0, len = entryKeys.length; i < len; i++) {
1121
1121
  const entryKey = entryKeys[i];
1122
1122
  const entry = entries[entryKey];
@@ -1151,7 +1151,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1151
1151
  if (filteredKeys.length > 0) {
1152
1152
  const entries = await durableStore.getMetadata(filteredKeys, DefaultDurableSegment);
1153
1153
  if (entries !== undefined) {
1154
- const entryKeys = keys$5(entries);
1154
+ const entryKeys = keys$4(entries);
1155
1155
  for (let i = 0, len = entryKeys.length; i < len; i++) {
1156
1156
  const entryKey = entryKeys[i];
1157
1157
  const { metadata } = entries[entryKey];
@@ -1523,7 +1523,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1523
1523
  validateNotDisposed();
1524
1524
  const entryKeys = keys$1.map(serializeStructuredKey);
1525
1525
  const entries = await durableStore.getEntries(entryKeys, DefaultDurableSegment);
1526
- if (entries === undefined || keys$5(entries).length === 0) {
1526
+ if (entries === undefined || keys$4(entries).length === 0) {
1527
1527
  return environment.notifyStoreUpdateAvailable(keys$1);
1528
1528
  }
1529
1529
  const now = Date.now();
@@ -1575,7 +1575,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1575
1575
  const metadataKeys = keys$1.map(serializeStructuredKey);
1576
1576
  const now = Date.now();
1577
1577
  const entries = await durableStore.getMetadata(metadataKeys, DefaultDurableSegment);
1578
- if (entries === undefined || keys$5(entries).length === 0) {
1578
+ if (entries === undefined || keys$4(entries).length === 0) {
1579
1579
  return environment.expirePossibleStaleRecords(keys$1);
1580
1580
  }
1581
1581
  let metaDataChanged = false;
@@ -1601,7 +1601,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
1601
1601
  type: 'stale-while-revalidate',
1602
1602
  staleDurationSeconds: Number.MAX_SAFE_INTEGER,
1603
1603
  });
1604
- return create$5(environment, {
1604
+ return create$4(environment, {
1605
1605
  publishStoreMetadata: { value: publishStoreMetadata },
1606
1606
  storeIngest: { value: storeIngest },
1607
1607
  storeIngestError: { value: storeIngestError },
@@ -1837,7 +1837,7 @@ var QueueOperationType;
1837
1837
  QueueOperationType["Update"] = "update";
1838
1838
  })(QueueOperationType || (QueueOperationType = {}));
1839
1839
 
1840
- const { keys: keys$4, create: create$4, assign: assign$4, values: values$3 } = Object;
1840
+ const { keys: keys$3, create: create$3, assign: assign$3, values: values$2 } = Object;
1841
1841
  const { stringify: stringify$3, parse: parse$3 } = JSON;
1842
1842
  const { isArray: isArray$2 } = Array;
1843
1843
 
@@ -2208,7 +2208,7 @@ class DurableDraftQueue {
2208
2208
  const queueOperations = handler.getQueueOperationsForCompletingDrafts(queue, action);
2209
2209
  // write the queue operations to the store prior to ingesting the result
2210
2210
  await this.draftStore.completeAction(queueOperations);
2211
- await handler.handleActionCompleted(action, queueOperations, values$3(this.handlers));
2211
+ await handler.handleActionCompleted(action, queueOperations, values$2(this.handlers));
2212
2212
  this.retryIntervalMilliseconds = 0;
2213
2213
  this.uploadingActionId = undefined;
2214
2214
  await this.notifyChangedListeners({
@@ -2414,7 +2414,7 @@ class DurableDraftQueue {
2414
2414
  return pendingAction;
2415
2415
  }
2416
2416
  async setMetadata(actionId, metadata) {
2417
- const keys$1 = keys$4(metadata);
2417
+ const keys$1 = keys$3(metadata);
2418
2418
  const compatibleKeys = keys$1.filter((key) => {
2419
2419
  const value = metadata[key];
2420
2420
  return typeof key === 'string' && typeof value === 'string';
@@ -2581,7 +2581,7 @@ class DurableDraftStore {
2581
2581
  const waitForOngoingSync = this.syncPromise || Promise.resolve();
2582
2582
  return waitForOngoingSync.then(() => {
2583
2583
  const { draftStore } = this;
2584
- const keys$1 = keys$4(draftStore);
2584
+ const keys$1 = keys$3(draftStore);
2585
2585
  const actionArray = [];
2586
2586
  for (let i = 0, len = keys$1.length; i < len; i++) {
2587
2587
  const key = keys$1[i];
@@ -2606,7 +2606,7 @@ class DurableDraftStore {
2606
2606
  deleteByTag(tag) {
2607
2607
  const deleteAction = () => {
2608
2608
  const { draftStore } = this;
2609
- const keys$1 = keys$4(draftStore);
2609
+ const keys$1 = keys$3(draftStore);
2610
2610
  const durableKeys = [];
2611
2611
  for (let i = 0, len = keys$1.length; i < len; i++) {
2612
2612
  const key = keys$1[i];
@@ -2658,7 +2658,7 @@ class DurableDraftStore {
2658
2658
  return this.enqueueAction(action);
2659
2659
  }
2660
2660
  getCount() {
2661
- return keys$4(this.draftStore).length;
2661
+ return keys$3(this.draftStore).length;
2662
2662
  }
2663
2663
  /**
2664
2664
  * Runs a write operation against the draft store, if the initial
@@ -2699,7 +2699,7 @@ class DurableDraftStore {
2699
2699
  return this.runQueuedOperations();
2700
2700
  }
2701
2701
  const { draftStore } = this;
2702
- const keys$1 = keys$4(durableEntries);
2702
+ const keys$1 = keys$3(durableEntries);
2703
2703
  for (let i = 0, len = keys$1.length; i < len; i++) {
2704
2704
  const entry = durableEntries[keys$1[i]];
2705
2705
  const action = entry.data;
@@ -2765,13 +2765,6 @@ var DraftQueueOperationType;
2765
2765
  DraftQueueOperationType["ItemCompleted"] = "completed";
2766
2766
  DraftQueueOperationType["ItemFailed"] = "failed";
2767
2767
  DraftQueueOperationType["ItemUpdated"] = "updated";
2768
- /** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
2769
- * Planned to be removed in 256 (W-16217436) */
2770
- DraftQueueOperationType["QueueStarted"] = "started";
2771
- /** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
2772
- * Planned to be removed in 256 (W-16217436) */
2773
- DraftQueueOperationType["QueueStopped"] = "stopped";
2774
- /** @since 252 */
2775
2768
  DraftQueueOperationType["QueueStateChanged"] = "queueStateChanged";
2776
2769
  })(DraftQueueOperationType || (DraftQueueOperationType = {}));
2777
2770
  /**
@@ -2816,13 +2809,6 @@ function toQueueState(queue) {
2816
2809
  }
2817
2810
  class DraftManager {
2818
2811
  shouldEmitEvent(event) {
2819
- // Waiting events cannot be emitted prior to 252 native clients
2820
- // TODO [W-16102411]: we can safely remove this backwards compatible code in 256
2821
- if (isDraftQueueStateChangeEvent(event) &&
2822
- event.state === DraftQueueState.Waiting &&
2823
- this.listenerVersion === undefined) {
2824
- return false;
2825
- }
2826
2812
  return this.draftEventsShouldBeEmitted.includes(event.type);
2827
2813
  }
2828
2814
  constructor(draftQueue) {
@@ -2862,16 +2848,6 @@ class DraftManager {
2862
2848
  throw Error('Unsupported event type');
2863
2849
  }
2864
2850
  }
2865
- draftQueueStateToOperationType(state) {
2866
- switch (state) {
2867
- case DraftQueueState.Started:
2868
- return DraftQueueOperationType.QueueStarted;
2869
- case DraftQueueState.Stopped:
2870
- return DraftQueueOperationType.QueueStopped;
2871
- default:
2872
- throw Error('Unsupported event type');
2873
- }
2874
- }
2875
2851
  /**
2876
2852
  * Enqueue a custom action on the DraftQueue for a handler
2877
2853
  * @param handler the handler's id
@@ -2933,8 +2909,7 @@ class DraftManager {
2933
2909
  *
2934
2910
  * @param listener The listener closure to subscribe to changes
2935
2911
  */
2936
- registerDraftQueueChangedListener(listener, version = undefined) {
2937
- this.listenerVersion = version;
2912
+ registerDraftQueueChangedListener(listener, _version = undefined) {
2938
2913
  this.listeners.push(listener);
2939
2914
  return () => {
2940
2915
  this.listeners = this.listeners.filter((l) => {
@@ -2980,7 +2955,7 @@ class DraftManager {
2980
2955
  return this.buildDraftQueueItem(action);
2981
2956
  }
2982
2957
  isValidFieldMap(fields) {
2983
- const keys$1 = keys$4(fields);
2958
+ const keys$1 = keys$3(fields);
2984
2959
  const validTypes = ['string', 'number', 'boolean'];
2985
2960
  for (let i = 0; i < keys$1.length; i++) {
2986
2961
  const key = keys$1[i];
@@ -3050,12 +3025,7 @@ class DraftManager {
3050
3025
  const managerState = await this.getQueue();
3051
3026
  let operationType, item;
3052
3027
  if (isDraftQueueStateChangeEvent(event)) {
3053
- if (this.listenerVersion === undefined) {
3054
- operationType = this.draftQueueStateToOperationType(event.state);
3055
- }
3056
- else {
3057
- operationType = DraftQueueOperationType.QueueStateChanged;
3058
- }
3028
+ operationType = DraftQueueOperationType.QueueStateChanged;
3059
3029
  }
3060
3030
  else {
3061
3031
  const { action, type } = event;
@@ -3279,7 +3249,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
3279
3249
  }
3280
3250
  const keyPrefix = 'UiApi';
3281
3251
 
3282
- const { assign: assign$3, create: create$3, entries: entries$3, freeze: freeze$1, isFrozen, keys: keys$3, values: values$2 } = Object;
3252
+ const { assign: assign$2, create: create$2, entries: entries$2, freeze, isFrozen, keys: keys$2, values: values$1 } = Object;
3283
3253
  const { hasOwnProperty } = Object.prototype;
3284
3254
  const { split, endsWith } = String.prototype;
3285
3255
  const { from: from$1, isArray: isArray$1 } = Array;
@@ -3308,7 +3278,7 @@ function dedupe(value) {
3308
3278
  for (let i = 0, len = value.length; i < len; i += 1) {
3309
3279
  result[value[i]] = true;
3310
3280
  }
3311
- return keys$3(result);
3281
+ return keys$2(result);
3312
3282
  }
3313
3283
  /**
3314
3284
  * @param source The array of string to filter
@@ -5391,14 +5361,14 @@ const getTypeCacheKeys$1u = (rootKeySet, luvio, input, _fullPathFactory) => {
5391
5361
  mergeable: true,
5392
5362
  });
5393
5363
  const input_childRelationships = input.childRelationships;
5394
- const input_childRelationships_keys = keys$3(input_childRelationships);
5364
+ const input_childRelationships_keys = keys$2(input_childRelationships);
5395
5365
  const input_childRelationships_length = input_childRelationships_keys.length;
5396
5366
  for (let i = 0; i < input_childRelationships_length; i++) {
5397
5367
  const key = input_childRelationships_keys[i];
5398
5368
  getTypeCacheKeys$1t(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
5399
5369
  }
5400
5370
  const input_fields = input.fields;
5401
- const field_values = keys$3(input_fields);
5371
+ const field_values = keys$2(input_fields);
5402
5372
  const input_fields_length = field_values.length;
5403
5373
  for (let i = 0; i < input_fields_length; i++) {
5404
5374
  const field_value = input_fields[field_values[i]];
@@ -5971,7 +5941,7 @@ function convertRecordFieldsArrayToTrie(fields, optionalFields = []) {
5971
5941
  function createPathSelection(propertyName, fieldDefinition) {
5972
5942
  const fieldsSelection = [];
5973
5943
  const { children } = fieldDefinition;
5974
- const childrenKeys = keys$3(children);
5944
+ const childrenKeys = keys$2(children);
5975
5945
  for (let i = 0, len = childrenKeys.length; i < len; i += 1) {
5976
5946
  const childKey = childrenKeys[i];
5977
5947
  const childFieldDefinition = children[childKey];
@@ -6022,7 +5992,7 @@ function createPathSelection(propertyName, fieldDefinition) {
6022
5992
  */
6023
5993
  function createPathSelectionFromValue(fields) {
6024
5994
  const fieldsSelections = [];
6025
- const fieldNames = keys$3(fields);
5995
+ const fieldNames = keys$2(fields);
6026
5996
  for (let i = 0, len = fieldNames.length; i < len; i++) {
6027
5997
  const fieldName = fieldNames[i];
6028
5998
  const { value: fieldValue } = fields[fieldName];
@@ -6067,7 +6037,7 @@ function createPathSelectionFromValue(fields) {
6067
6037
  }
6068
6038
  function extractRecordFieldsRecursively(record) {
6069
6039
  const fields = [];
6070
- const fieldNames = keys$3(record.fields);
6040
+ const fieldNames = keys$2(record.fields);
6071
6041
  for (let i = 0, len = fieldNames.length; i < len; i++) {
6072
6042
  const fieldName = fieldNames[i];
6073
6043
  const { value: fieldValue } = record.fields[fieldName];
@@ -6647,7 +6617,7 @@ function mergePendingFields(newRecord, oldRecord) {
6647
6617
  // RecordRepresentationNormalized['fields'] to include `pending:true` property
6648
6618
  const mergedFields = { ...newRecord.fields };
6649
6619
  const merged = { ...newRecord, fields: mergedFields };
6650
- const existingFields = keys$3(oldRecord.fields);
6620
+ const existingFields = keys$2(oldRecord.fields);
6651
6621
  for (let i = 0, len = existingFields.length; i < len; i += 1) {
6652
6622
  const spanningFieldName = existingFields[i];
6653
6623
  if (newRecord.fields[spanningFieldName] === undefined) {
@@ -6764,7 +6734,7 @@ function merge$1(existing, incoming, luvio, _path, recordConflictMap) {
6764
6734
  if (isGraphNode(node)) {
6765
6735
  const dependencies = node.retrieve();
6766
6736
  if (dependencies !== null) {
6767
- const depKeys = keys$3(dependencies);
6737
+ const depKeys = keys$2(dependencies);
6768
6738
  for (let i = 0, len = depKeys.length; i < len; i++) {
6769
6739
  luvio.storeEvict(depKeys[i]);
6770
6740
  }
@@ -6922,7 +6892,7 @@ fieldNode) {
6922
6892
  }
6923
6893
  for (let i = 0; i < fieldSubtries.length; i++) {
6924
6894
  const subtrie = fieldSubtries[i];
6925
- const fieldNames = keys$3(subtrie.children);
6895
+ const fieldNames = keys$2(subtrie.children);
6926
6896
  for (let i = 0; i < fieldNames.length; i++) {
6927
6897
  const fieldName = fieldNames[i];
6928
6898
  const childTrie = subtrie.children[fieldName];
@@ -7044,13 +7014,13 @@ function isExternalLookupFieldKey(spanningNode) {
7044
7014
  return endsWith.call(spanningNode.scalar('apiName'), CUSTOM_EXTERNAL_OBJECT_FIELD_SUFFIX);
7045
7015
  }
7046
7016
  function convertTrieToFields(root) {
7047
- if (keys$3(root.children).length === 0) {
7017
+ if (keys$2(root.children).length === 0) {
7048
7018
  return [];
7049
7019
  }
7050
7020
  return convertTrieToFieldsRecursively(root);
7051
7021
  }
7052
7022
  function convertTrieToFieldsRecursively(root) {
7053
- const childKeys = keys$3(root.children);
7023
+ const childKeys = keys$2(root.children);
7054
7024
  if (childKeys.length === 0) {
7055
7025
  if (root.name === '') {
7056
7026
  return [];
@@ -7059,7 +7029,7 @@ function convertTrieToFieldsRecursively(root) {
7059
7029
  }
7060
7030
  return reduce.call(childKeys, (acc, cur) => concat.call(acc, convertTrieToFieldsRecursively(root.children[cur]).map((i) => `${root.name}.${i}`)), []);
7061
7031
  }
7062
- const BLANK_RECORD_FIELDS_TRIE = freeze$1({
7032
+ const BLANK_RECORD_FIELDS_TRIE = freeze({
7063
7033
  name: '',
7064
7034
  children: {},
7065
7035
  });
@@ -7087,7 +7057,7 @@ const getObjectNameFromField = (field) => {
7087
7057
  function mergeFieldsTries(rootA, rootB) {
7088
7058
  const rootAchildren = rootA.children;
7089
7059
  const rootBchildren = rootB.children;
7090
- const childBKeys = keys$3(rootBchildren);
7060
+ const childBKeys = keys$2(rootBchildren);
7091
7061
  for (let i = 0, len = childBKeys.length; i < len; i++) {
7092
7062
  const childBKey = childBKeys[i];
7093
7063
  if (rootAchildren[childBKey] === undefined) {
@@ -7242,8 +7212,8 @@ function isSuperRecordFieldTrie(a, b) {
7242
7212
  }
7243
7213
  const childrenA = a.children;
7244
7214
  const childrenB = b.children;
7245
- const childKeysA = keys$3(childrenA);
7246
- const childKeysB = keys$3(childrenB);
7215
+ const childKeysA = keys$2(childrenA);
7216
+ const childKeysB = keys$2(childrenB);
7247
7217
  const childKeysBLength = childKeysB.length;
7248
7218
  if (childKeysBLength > childKeysA.length) {
7249
7219
  return false;
@@ -7297,9 +7267,9 @@ function fulfill(existing, incoming) {
7297
7267
  return false;
7298
7268
  }
7299
7269
  }
7300
- const headersKeys = keys$3(headers);
7270
+ const headersKeys = keys$2(headers);
7301
7271
  const headersKeyLength = headersKeys.length;
7302
- if (headersKeyLength !== keys$3(existingHeaders).length) {
7272
+ if (headersKeyLength !== keys$2(existingHeaders).length) {
7303
7273
  return false;
7304
7274
  }
7305
7275
  for (let i = 0, len = headersKeyLength; i < len; i++) {
@@ -7952,7 +7922,7 @@ function buildNetworkSnapshot$g(luvio, config, serverRequestCount = 0, options)
7952
7922
 
7953
7923
  // iterate through the map to build configs for network calls
7954
7924
  function resolveConflict(luvio, map) {
7955
- const ids = keys$3(map.conflicts);
7925
+ const ids = keys$2(map.conflicts);
7956
7926
  if (ids.length === 0) {
7957
7927
  return;
7958
7928
  }
@@ -9645,18 +9615,18 @@ function listFields(luvio, { fields = [], optionalFields = [], sortBy, }, listIn
9645
9615
  return {
9646
9616
  getRecordSelectionFieldSets() {
9647
9617
  const optionalPlusDefaultFields = { ...optionalFields_ };
9648
- const fields = keys$3(defaultFields_);
9618
+ const fields = keys$2(defaultFields_);
9649
9619
  for (let i = 0; i < fields.length; ++i) {
9650
9620
  const field = fields[i];
9651
9621
  if (!fields_[field] && !defaultServerFieldStatus.missingFields[field]) {
9652
9622
  optionalPlusDefaultFields[field] = true;
9653
9623
  }
9654
9624
  }
9655
- return [keys$3(fields_).sort(), keys$3(optionalPlusDefaultFields).sort()];
9625
+ return [keys$2(fields_).sort(), keys$2(optionalPlusDefaultFields).sort()];
9656
9626
  },
9657
9627
  processRecords(records) {
9658
9628
  const { missingFields } = defaultServerFieldStatus;
9659
- const fields = keys$3(missingFields);
9629
+ const fields = keys$2(missingFields);
9660
9630
  for (let i = 0; i < fields.length; ++i) {
9661
9631
  const field = fields[i], splitField = field.split('.').slice(1);
9662
9632
  for (let i = 0; i < records.length; ++i) {
@@ -14729,7 +14699,7 @@ function getMissingRecordLookupFields(record, objectInfo) {
14729
14699
  const lookupFields = {};
14730
14700
  const { apiName, fields: recordFields } = record;
14731
14701
  const { fields: objectInfoFields } = objectInfo;
14732
- const objectInfoFieldNames = keys$3(objectInfoFields);
14702
+ const objectInfoFieldNames = keys$2(objectInfoFields);
14733
14703
  for (let i = 0, len = objectInfoFieldNames.length; i < len; i += 1) {
14734
14704
  const fieldName = objectInfoFieldNames[i];
14735
14705
  const field = objectInfoFields[fieldName];
@@ -14748,12 +14718,12 @@ function getMissingRecordLookupFields(record, objectInfo) {
14748
14718
  const nameField = `${apiName}.${relationshipName}.${getNameField(objectInfo, fieldName)}`;
14749
14719
  lookupFields[nameField] = true;
14750
14720
  }
14751
- return keys$3(lookupFields);
14721
+ return keys$2(lookupFields);
14752
14722
  }
14753
14723
  function getRecordUiMissingRecordLookupFields(recordUi) {
14754
14724
  const { records, objectInfos } = recordUi;
14755
14725
  const recordLookupFields = {};
14756
- const recordIds = keys$3(records);
14726
+ const recordIds = keys$2(records);
14757
14727
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
14758
14728
  const recordId = recordIds[i];
14759
14729
  const recordData = records[recordId];
@@ -14791,19 +14761,19 @@ function buildCachedSelectorKey(key) {
14791
14761
  }
14792
14762
  function eachLayout(recordUi, cb) {
14793
14763
  const { layouts } = recordUi;
14794
- const layoutApiNames = keys$3(layouts);
14764
+ const layoutApiNames = keys$2(layouts);
14795
14765
  for (let a = 0, len = layoutApiNames.length; a < len; a += 1) {
14796
14766
  const apiName = layoutApiNames[a];
14797
14767
  const apiNameData = layouts[apiName];
14798
- const recordTypeIds = keys$3(apiNameData);
14768
+ const recordTypeIds = keys$2(apiNameData);
14799
14769
  for (let b = 0, recordTypeIdsLen = recordTypeIds.length; b < recordTypeIdsLen; b += 1) {
14800
14770
  const recordTypeId = recordTypeIds[b];
14801
14771
  const recordTypeData = apiNameData[recordTypeId];
14802
- const layoutTypes = keys$3(recordTypeData);
14772
+ const layoutTypes = keys$2(recordTypeData);
14803
14773
  for (let c = 0, layoutTypesLen = layoutTypes.length; c < layoutTypesLen; c += 1) {
14804
14774
  const layoutType = layoutTypes[c];
14805
14775
  const layoutTypeData = recordTypeData[layoutType];
14806
- const modes = keys$3(layoutTypeData);
14776
+ const modes = keys$2(layoutTypeData);
14807
14777
  for (let d = 0, modesLen = modes.length; d < modesLen; d += 1) {
14808
14778
  const mode = modes[d];
14809
14779
  const layout = layoutTypeData[mode];
@@ -15009,14 +14979,14 @@ function buildNetworkSnapshot$e(luvio, config, dispatchContext) {
15009
14979
  function publishDependencies(luvio, recordIds, depKeys) {
15010
14980
  for (let i = 0, len = recordIds.length; i < len; i += 1) {
15011
14981
  const recordDepKey = dependencyKeyBuilder({ recordId: recordIds[i] });
15012
- const dependencies = create$3(null);
14982
+ const dependencies = create$2(null);
15013
14983
  for (let j = 0, len = depKeys.length; j < len; j++) {
15014
14984
  dependencies[depKeys[j]] = true;
15015
14985
  }
15016
14986
  const node = luvio.getNode(recordDepKey);
15017
14987
  if (isGraphNode(node)) {
15018
14988
  const recordDeps = node.retrieve();
15019
- assign$3(dependencies, recordDeps);
14989
+ assign$2(dependencies, recordDeps);
15020
14990
  }
15021
14991
  luvio.storePublish(recordDepKey, dependencies);
15022
14992
  }
@@ -15134,7 +15104,7 @@ function refresh(luvio, config) {
15134
15104
  }
15135
15105
  if (isUnfulfilledSnapshot$1(snapshot)) {
15136
15106
  if (process.env.NODE_ENV !== 'production') {
15137
- throw new Error(`RecordUi adapter resolved with a snapshot with missing data, missingPaths: ${keys$3(snapshot.missingPaths)}`);
15107
+ throw new Error(`RecordUi adapter resolved with a snapshot with missing data, missingPaths: ${keys$2(snapshot.missingPaths)}`);
15138
15108
  }
15139
15109
  }
15140
15110
  const { data } = snapshot;
@@ -15181,7 +15151,7 @@ function processRecordUiRepresentation(luvio, refresh, recordId, modes, snapshot
15181
15151
  }
15182
15152
  if (isUnfulfilledSnapshot$1(snapshot)) {
15183
15153
  if (process.env.NODE_ENV !== 'production') {
15184
- throw new Error(`RecordUi adapter resolved with a snapshot with missing data, missingPaths: ${keys$3(snapshot.missingPaths)}`);
15154
+ throw new Error(`RecordUi adapter resolved with a snapshot with missing data, missingPaths: ${keys$2(snapshot.missingPaths)}`);
15185
15155
  }
15186
15156
  }
15187
15157
  const { data } = snapshot;
@@ -15210,11 +15180,11 @@ const recordLayoutFragmentSelector = [
15210
15180
  function getFieldsFromLayoutMap(layoutMap, objectInfo) {
15211
15181
  let fields = [];
15212
15182
  let optionalFields = [];
15213
- const layoutTypes = keys$3(layoutMap);
15183
+ const layoutTypes = keys$2(layoutMap);
15214
15184
  for (let i = 0, layoutTypesLen = layoutTypes.length; i < layoutTypesLen; i += 1) {
15215
15185
  const layoutType = layoutTypes[i];
15216
15186
  const modesMap = layoutMap[layoutType];
15217
- const modes = keys$3(modesMap);
15187
+ const modes = keys$2(modesMap);
15218
15188
  for (let m = 0, modesLen = modes.length; m < modesLen; m += 1) {
15219
15189
  const mode = modes[m];
15220
15190
  const { fields: modeFields, optionalFields: modeOptionalFields } = getQualifiedFieldApiNamesFromLayout(modesMap[mode], objectInfo);
@@ -15250,7 +15220,7 @@ function getRecordForLayoutableEntities(luvio, refresh, recordId, layoutMap, obj
15250
15220
  return getRecord(luvio, refresh, recordId, [], implicitFields);
15251
15221
  }
15252
15222
  function getRecordForNonLayoutableEntities(luvio, adapterContext, refresh, recordId, objectInfo, configOptionalFields, configFields) {
15253
- const fields = keys$3(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
15223
+ const fields = keys$2(configFields ? configFields : {}).map((key) => `${objectInfo.apiName}.${key}`);
15254
15224
  // W-12697744
15255
15225
  // Set the implicit fields received from the server in adapter context
15256
15226
  // This ensures that the implicit fields are available when data is read locally or from durable store
@@ -15496,7 +15466,7 @@ function makeRecordLayoutMap(luvio, config, apiName, recordTypeId, layoutTypes,
15496
15466
  }
15497
15467
  const { layoutType, mode, snapshot } = container;
15498
15468
  if (wrapper.layoutMap[layoutType] === undefined) {
15499
- wrapper.layoutMap = assign$3({}, wrapper.layoutMap, {
15469
+ wrapper.layoutMap = assign$2({}, wrapper.layoutMap, {
15500
15470
  [layoutType]: {},
15501
15471
  });
15502
15472
  }
@@ -16102,7 +16072,7 @@ function typeCheckConfig$9(untrustedConfig) {
16102
16072
  }
16103
16073
  }
16104
16074
  if (records.length > 0) {
16105
- assign$3(config, { records });
16075
+ assign$2(config, { records });
16106
16076
  }
16107
16077
  }
16108
16078
  return config;
@@ -28435,9 +28405,7 @@ function convertGraphQLToRaml(astNode, state) {
28435
28405
  : new Map();
28436
28406
  const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
28437
28407
  const recordTypeId = data.ldsRecordTypeId === null ? null : data.ldsRecordTypeId.value;
28438
- if (graphqlRecordTypeIdFixGate.isOpen({ fallback: false }) &&
28439
- recordTypeId &&
28440
- recordTypeId !== MAIN_RECORD_TYPE_ID) {
28408
+ if (recordTypeId && recordTypeId !== MAIN_RECORD_TYPE_ID) {
28441
28409
  const fieldName = 'RecordTypeId';
28442
28410
  fieldsBag[fieldName] = {
28443
28411
  value: recordTypeId,
@@ -28773,7 +28741,7 @@ function selectType$I(typename, sel, fieldData, reader, key, sink, variables, fr
28773
28741
  */
28774
28742
 
28775
28743
 
28776
- function isStoreKeyRecordId$1(key) {
28744
+ function isStoreKeyRecordId(key) {
28777
28745
  return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
28778
28746
  }
28779
28747
  function objectsDeepEqual(lhs, rhs) {
@@ -41517,7 +41485,7 @@ function getRecordKeyForId(luvio, recordId) {
41517
41485
  */
41518
41486
  function filterOutReferenceNonScalarFields(record) {
41519
41487
  const filteredFields = {};
41520
- const fieldNames = keys$3(record.fields);
41488
+ const fieldNames = keys$2(record.fields);
41521
41489
  for (const fieldName of fieldNames) {
41522
41490
  const field = record.fields[fieldName];
41523
41491
  if (isFieldLink(field) === false && isPendingOrMissing(field) === false) {
@@ -41623,7 +41591,7 @@ function getRecordDraftEnvironment(luvio, env, { isDraftId, durableRecordStore }
41623
41591
  const resolvedRequest = resolveResourceRequestIds(luvio, resourceRequest, canonicalKey);
41624
41592
  return env.dispatchResourceRequest(resolvedRequest, context, eventObservers);
41625
41593
  };
41626
- return create$3(env, {
41594
+ return create$2(env, {
41627
41595
  dispatchResourceRequest: { value: dispatchResourceRequest },
41628
41596
  });
41629
41597
  }
@@ -41801,7 +41769,7 @@ function getRecordsDraftEnvironment(luvio, env, { isDraftId }) {
41801
41769
  return applyDraftsToBatchResponse(resourceRequest, response, removedDraftIds);
41802
41770
  }));
41803
41771
  };
41804
- return create$3(env, {
41772
+ return create$2(env, {
41805
41773
  dispatchResourceRequest: { value: dispatchResourceRequest },
41806
41774
  });
41807
41775
  }
@@ -41811,7 +41779,7 @@ function makeEnvironmentUiApiRecordDraftAware(luvio, options, env) {
41811
41779
  const adapterSpecificEnvironments = synthesizers.reduce((environment, synthesizer) => {
41812
41780
  return synthesizer(luvio, environment, options);
41813
41781
  }, env);
41814
- return create$3(adapterSpecificEnvironments, {});
41782
+ return create$2(adapterSpecificEnvironments, {});
41815
41783
  }
41816
41784
 
41817
41785
  const HTTP_HEADER_RETRY_AFTER = 'Retry-After';
@@ -42361,7 +42329,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
42361
42329
  pendingAction.data.method !== 'delete' && //'delete' action does not have fields
42362
42330
  objectInfo) {
42363
42331
  const appendedFields = this.getBackdatingFields(objectInfo, resolvedRequest.method, pendingAction);
42364
- if (keys$3(appendedFields).length > 0) {
42332
+ if (keys$2(appendedFields).length > 0) {
42365
42333
  pendingAction.data.body = {
42366
42334
  ...pendingAction.data.body,
42367
42335
  fields: {
@@ -42375,7 +42343,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
42375
42343
  }
42376
42344
  getBackdatingFields(objectInfo, requestMethod, pendingAction) {
42377
42345
  const fields = {};
42378
- const actionFieldNames = keys$3(pendingAction.data.body.fields);
42346
+ const actionFieldNames = keys$2(pendingAction.data.body.fields);
42379
42347
  if (requestMethod === 'post') {
42380
42348
  // `CreateRecord` with `CreatedDate` field
42381
42349
  if (isBackdatingFieldEditable(objectInfo, DEFAULT_FIELD_CREATED_DATE$1, 'createable', actionFieldNames)) {
@@ -42421,7 +42389,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
42421
42389
  return;
42422
42390
  }
42423
42391
  const objectInfo = objectInfoMap[apiName];
42424
- const optionalFields = values$2(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
42392
+ const optionalFields = values$1(objectInfo.fields).map((field) => `${apiName}.${field.apiName}`);
42425
42393
  await getAdapterData(this.getRecordAdapter, {
42426
42394
  recordId: referenceFieldInfo.id,
42427
42395
  optionalFields,
@@ -42440,7 +42408,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
42440
42408
  const referenceToInfos = fieldInfo.referenceToInfos;
42441
42409
  const apiNames = referenceToInfos.map((referenceToInfo) => referenceToInfo.apiName);
42442
42410
  const objectInfoMap = await this.objectInfoService.getObjectInfos(apiNames);
42443
- for (const objectInfo of values$2(objectInfoMap)) {
42411
+ for (const objectInfo of values$1(objectInfoMap)) {
42444
42412
  const { apiName, keyPrefix } = objectInfo;
42445
42413
  if (keyPrefix !== null && id.startsWith(keyPrefix)) {
42446
42414
  return apiName;
@@ -42526,7 +42494,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
42526
42494
  let resolvedUrlParams = request.urlParams;
42527
42495
  if (request.method === 'post' || request.method === 'patch') {
42528
42496
  const bodyFields = resolvedBody.fields;
42529
- const fieldNames = keys$3(bodyFields);
42497
+ const fieldNames = keys$2(bodyFields);
42530
42498
  for (let i = 0, len = fieldNames.length; i < len; i++) {
42531
42499
  const fieldName = fieldNames[i];
42532
42500
  const fieldValue = bodyFields[fieldName];
@@ -42682,7 +42650,7 @@ class UiApiDraftRecordService {
42682
42650
  };
42683
42651
  }
42684
42652
  const referenceFields = [];
42685
- const fieldNames = keys$3(fields);
42653
+ const fieldNames = keys$2(fields);
42686
42654
  const unexpectedFields = [];
42687
42655
  for (const field of fieldNames) {
42688
42656
  const fieldInfo = objectInfo.fields[field];
@@ -42744,11 +42712,13 @@ class UiApiDraftRecordService {
42744
42712
 
42745
42713
  const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
42746
42714
  class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestActionHandler {
42747
- constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService) {
42715
+ constructor(getLuvio, draftRecordService, draftQueue, networkAdapter, isDraftId, sideEffectService, objectInfoService, getRecord) {
42748
42716
  super(draftQueue, networkAdapter, getLuvio, draftRecordService);
42749
42717
  this.draftRecordService = draftRecordService;
42750
42718
  this.isDraftId = isDraftId;
42751
42719
  this.sideEffectService = sideEffectService;
42720
+ this.objectInfoService = objectInfoService;
42721
+ this.getRecord = getRecord;
42752
42722
  this.handlerId = QUICK_ACTION_HANDLER;
42753
42723
  draftRecordService.registerRecordHandler(this);
42754
42724
  }
@@ -42780,6 +42750,30 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
42780
42750
  });
42781
42751
  luvio.storeIngest(key, ingestQuickActionExecutionRepresentation, response);
42782
42752
  }
42753
+ async handleActionCompleted(action, queueOperations) {
42754
+ await super.handleActionCompleted(action, queueOperations);
42755
+ this.getLuvio();
42756
+ const canonicalId = action.response.body.id;
42757
+ this.buildTagForTargetId(canonicalId);
42758
+ const prefix = canonicalId.substring(0, 3);
42759
+ if (prefix.length !== 3) {
42760
+ // if we can't get a prefix, don't do the rest
42761
+ return;
42762
+ }
42763
+ const apiName = await this.objectInfoService.apiNameForPrefix(prefix);
42764
+ const objectInfo = await this.objectInfoService.getObjectInfo(apiName);
42765
+ if (!objectInfo) {
42766
+ return;
42767
+ }
42768
+ await this.getRecord({ recordId: canonicalId, fields: this.allFields(objectInfo) });
42769
+ }
42770
+ allFields(objectInfo) {
42771
+ let fields = [];
42772
+ Object.keys(objectInfo.fields).forEach((fieldName) => {
42773
+ fields.push(objectInfo.apiName + '.' + fieldName);
42774
+ });
42775
+ return fields;
42776
+ }
42783
42777
  mergeRequestBody() {
42784
42778
  throw Error('mergeActions not supported for QuickActionExecutionRepresentationHandler');
42785
42779
  }
@@ -43034,7 +43028,7 @@ function createContentDocumentAndVersionDraftAdapterFactory(luvio, binaryStore,
43034
43028
  ...trimmedDownData.contentVersion,
43035
43029
  fields: cvFields,
43036
43030
  };
43037
- freeze$1(trimmedDownData);
43031
+ freeze(trimmedDownData);
43038
43032
  eventEmitter({ type: 'create-content-document-and-version-draft-finished' });
43039
43033
  return {
43040
43034
  state: 'Fulfilled',
@@ -43968,7 +43962,7 @@ function dateTimePredicate(input, operator, field, alias) {
43968
43962
  return predicate;
43969
43963
  }
43970
43964
  else if (literal !== undefined) {
43971
- const isAvailableLiteral = values$2(DateLiteral).includes(literal);
43965
+ const isAvailableLiteral = values$1(DateLiteral).includes(literal);
43972
43966
  // eslint-disable-next-line @salesforce/lds/no-error-in-production
43973
43967
  if (!isAvailableLiteral)
43974
43968
  throw new Error(`${literal} is not a valid DateLiteral`);
@@ -43982,7 +43976,7 @@ function dateTimePredicate(input, operator, field, alias) {
43982
43976
  }
43983
43977
  function dateTimeRange(input, op, field, alias) {
43984
43978
  const dateFunction = field.dataType === 'DateTime' ? 'datetime' : 'date';
43985
- const key = keys$3(input)[0];
43979
+ const key = keys$2(input)[0];
43986
43980
  let operator = op;
43987
43981
  if (operator === '=')
43988
43982
  operator = 'BETWEEN';
@@ -44282,7 +44276,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
44282
44276
  if (!where)
44283
44277
  return [];
44284
44278
  let predicates = [];
44285
- const fields = keys$3(where);
44279
+ const fields = keys$2(where);
44286
44280
  for (const field of fields) {
44287
44281
  if (field === 'and' || field === 'or') {
44288
44282
  predicates.push(processCompoundPredicate(field, where[field], recordType, alias, objectInfoMap, joins));
@@ -44335,7 +44329,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
44335
44329
  }
44336
44330
  else {
44337
44331
  // @W-12618378 polymorphic query sometimes does not work as expected on server. The GQL on certain entities could fail.
44338
- const entityNames = keys$3(where[field]);
44332
+ const entityNames = keys$2(where[field]);
44339
44333
  const polyPredicatesGroups = entityNames
44340
44334
  .filter((entityName) => fieldInfo.referenceToInfos.some((referenceInfo) => referenceInfo.apiName === entityName))
44341
44335
  .map((entityName) => {
@@ -44370,7 +44364,7 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draf
44370
44364
  }
44371
44365
  else {
44372
44366
  //`field` match the filedInfo's apiName
44373
- for (const [op, value] of entries$3(where[field])) {
44367
+ for (const [op, value] of entries$2(where[field])) {
44374
44368
  const operator = operatorToSql(op);
44375
44369
  /**
44376
44370
  Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
@@ -44687,16 +44681,22 @@ function singlePredicateToSql(predicate, defaultAlias, isChildNotPredicate = fal
44687
44681
  }
44688
44682
  }
44689
44683
  else {
44690
- const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
44691
- // SQLite is case sensitive by default, SOQL is case in-sensitive by default
44692
- // For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
44693
- if (dataType === 'MultiPicklist' && (operator === 'LIKE' || operator === 'NOT LIKE')) {
44694
- sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
44684
+ if (value === null && dataType !== 'MultiPicklist') {
44685
+ sql = `json_extract("${alias}".data, '${leftPath}') ${operator} NULL`;
44695
44686
  }
44696
44687
  else {
44697
- sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
44688
+ const { sql: questionSql, binding: valueBinding } = handleExtractedPredicateValue(boundValue, false);
44689
+ // SQLite is case sensitive by default, SOQL is case in-sensitive by default
44690
+ // For pick list includes or excludeds, prefix and suffix the field value with ';' to guarantee the query accuracy.
44691
+ if (dataType === 'MultiPicklist' &&
44692
+ (operator === 'LIKE' || operator === 'NOT LIKE')) {
44693
+ sql = buildMultiPicklistSQL(predicate, valueBinding, questionSql);
44694
+ }
44695
+ else {
44696
+ sql = `json_extract("${alias}".data, '${leftPath}') ${operator} ${questionSql}${isCaseSensitive === true ? '' : ` COLLATE NOCASE`}`;
44697
+ }
44698
+ binding.push(...valueBinding);
44698
44699
  }
44699
- binding.push(...valueBinding);
44700
44700
  }
44701
44701
  }
44702
44702
  return { sql, binding };
@@ -44881,7 +44881,7 @@ function dedupeJoins(joins) {
44881
44881
  for (const join of joins) {
44882
44882
  deduped[join.alias + join.to] = join;
44883
44883
  }
44884
- return values$2(deduped);
44884
+ return values$1(deduped);
44885
44885
  }
44886
44886
  function buildJoins(config) {
44887
44887
  let sql = '';
@@ -45556,7 +45556,7 @@ function depth(json, currentLevel = 0) {
45556
45556
  if (typeof json !== 'object') {
45557
45557
  return currentLevel;
45558
45558
  }
45559
- const keys = keys$3(json);
45559
+ const keys = keys$2(json);
45560
45560
  if (keys.length === 0)
45561
45561
  return 0;
45562
45562
  const depths = keys.map((key) => {
@@ -45569,7 +45569,7 @@ function flatten(previous, current) {
45569
45569
  return previous.concat(current);
45570
45570
  }
45571
45571
  function findFieldInfo(objectInfo, fieldName) {
45572
- return values$2(objectInfo.fields).find((field) => field.apiName === fieldName ||
45572
+ return values$1(objectInfo.fields).find((field) => field.apiName === fieldName ||
45573
45573
  (field.dataType === 'Reference' && field.relationshipName === fieldName));
45574
45574
  }
45575
45575
  async function readIngestionTimestampForKey(key, query) {
@@ -45609,14 +45609,14 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
45609
45609
  return predicates;
45610
45610
  const isSpanning = depth(orderBy) > 2;
45611
45611
  if (isSpanning) {
45612
- const keys = keys$3(orderBy);
45612
+ const keys = keys$2(orderBy);
45613
45613
  for (let i = 0, len = keys.length; i < len; i++) {
45614
45614
  const key = keys[i];
45615
45615
  const parentFields = objectInfoMap[recordType].fields;
45616
- const fieldInfo = values$2(parentFields).find(findSpanningField(key));
45616
+ const fieldInfo = values$1(parentFields).find(findSpanningField(key));
45617
45617
  if (fieldInfo && fieldInfo.referenceToInfos.length > 0) {
45618
45618
  const { apiName } = fieldInfo.referenceToInfos[0];
45619
- const parentFieldInfo = values$2(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
45619
+ const parentFieldInfo = values$1(objectInfoMap[recordType].fields).find(findSpanningField(fieldInfo.apiName));
45620
45620
  if (parentFieldInfo !== undefined) {
45621
45621
  const path = {
45622
45622
  leftPath: `$.fields.${parentFieldInfo.apiName}.value`,
@@ -45639,7 +45639,7 @@ function orderByToPredicate(orderBy, recordType, alias, objectInfoMap, joins) {
45639
45639
  }
45640
45640
  }
45641
45641
  else {
45642
- const keys = keys$3(orderBy);
45642
+ const keys = keys$2(orderBy);
45643
45643
  for (let i = 0, len = keys.length; i < len; i++) {
45644
45644
  const key = keys[i];
45645
45645
  if (!objectInfoMap[recordType])
@@ -46934,7 +46934,7 @@ function buildKeyStringForRecordQuery(operation, variables, argumentNodes, curre
46934
46934
  variables,
46935
46935
  fragmentMap: {},
46936
46936
  });
46937
- const filteredArgumentNodes = assign$3([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
46937
+ const filteredArgumentNodes = assign$2([], argumentNodes).filter((node) => node.name.value !== 'first' && node.name.value !== 'after');
46938
46938
  const argumentString = filteredArgumentNodes.length > 0
46939
46939
  ? '__' + serializeFieldArguments(filteredArgumentNodes, variables)
46940
46940
  : '';
@@ -46957,7 +46957,7 @@ function addResolversToSchema(schema, polyFields) {
46957
46957
  let baseRecord = undefined;
46958
46958
  // Concrete types for Polymorphic field
46959
46959
  const polyTypes = [];
46960
- for (const type of values$2(schema.getTypeMap())) {
46960
+ for (const type of values$1(schema.getTypeMap())) {
46961
46961
  if (type.name === 'Record') {
46962
46962
  recordInterface = type;
46963
46963
  }
@@ -46970,7 +46970,7 @@ function addResolversToSchema(schema, polyFields) {
46970
46970
  if (polyFields.find((fieldTypeName) => fieldTypeName === type.name) !== undefined) {
46971
46971
  polyTypes.push(type);
46972
46972
  }
46973
- const fields = values$2(type.getFields());
46973
+ const fields = values$1(type.getFields());
46974
46974
  // initialize the fields of current type with default behavior
46975
46975
  for (const field of fields) {
46976
46976
  field.resolve = defaultFieldResolver;
@@ -47349,7 +47349,7 @@ function generateRecordQueries(schema, objectInfoMap) {
47349
47349
  // use a set to not allow duplicate scalars causing error(s)
47350
47350
  let addedTypedScalars = new Set();
47351
47351
  let allPolymorphicFieldTypeNames = new Set();
47352
- for (const name of keys$3(objectInfoMap)) {
47352
+ for (const name of keys$2(objectInfoMap)) {
47353
47353
  const objectInfo = objectInfoMap[name];
47354
47354
  const { apiName } = objectInfo;
47355
47355
  const type = schema.getType(apiName);
@@ -47418,7 +47418,7 @@ function createNewRecordQuery(schema, objectInfo, objectInfoMap) {
47418
47418
  const { apiName, childRelationships, fields: fieldsRepresentation } = objectInfo;
47419
47419
  typedScalars.add(`${apiName}_Filter`);
47420
47420
  typedScalars.add(`${apiName}_OrderBy`);
47421
- const { fields, polymorphicFieldTypeNames } = makeRecordField(values$2(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
47421
+ const { fields, polymorphicFieldTypeNames } = makeRecordField(values$1(fieldsRepresentation), objectInfo, objectInfoMap, parentRelationshipFields, 'Missing');
47422
47422
  // handles child relationship
47423
47423
  const { spanningRecordConnections, typedScalars: spanningConnectionTypedScalars } = makeSpanningRecordConnections(schema, childRelationships, objectInfoMap, parentRelationshipFields);
47424
47424
  typedScalars = new Set([...typedScalars, ...spanningConnectionTypedScalars]);
@@ -47476,8 +47476,8 @@ function extendExistingRecordType(schema, type, objectInfo, objectInfoMap) {
47476
47476
  // use a set to not allow duplicate scalars causing error(s)
47477
47477
  let typedScalars = new Set();
47478
47478
  let parentRelationshipFields = new Set();
47479
- const existingFields = keys$3(type.getFields());
47480
- const missingFields = values$2(objectInfo.fields).filter((field) => {
47479
+ const existingFields = keys$2(type.getFields());
47480
+ const missingFields = values$1(objectInfo.fields).filter((field) => {
47481
47481
  return (existingFields.includes(field.apiName) === false ||
47482
47482
  (field.relationshipName !== null && field.referenceToInfos.length > 0));
47483
47483
  });
@@ -47559,7 +47559,7 @@ function makeSpanningRecordConnections(schema, childRelationships, objectInfoMap
47559
47559
  function makeRecordField(fieldRepresentations, objectInfo, objectInfoMap, existingParentRelationships, recordTypeInSchema, existingFields = []) {
47560
47560
  const polymorphicFieldTypeNames = new Set();
47561
47561
  let fields = ``;
47562
- for (const field of values$2(fieldRepresentations)) {
47562
+ for (const field of values$1(fieldRepresentations)) {
47563
47563
  if (!fieldsStaticallyAdded.includes(field.apiName) && recordTypeInSchema === 'Missing') {
47564
47564
  fields += `${field.apiName}: ${graphqlTypeForField(field, objectInfo)}\n`;
47565
47565
  }
@@ -48127,7 +48127,7 @@ function isMineScopeAvailable(apiNamePath, pathToObjectApiNamesMap, objectInfos)
48127
48127
  const objectInfo = objectInfos[apiName[0]];
48128
48128
  if (!objectInfo)
48129
48129
  return false;
48130
- return values$2(objectInfo.fields).some((fieldInfo) => {
48130
+ return values$1(objectInfo.fields).some((fieldInfo) => {
48131
48131
  return (fieldInfo.apiName === 'OwnerId' &&
48132
48132
  fieldInfo.referenceToInfos.some((referenceToInfo) => {
48133
48133
  return referenceToInfo.apiName === 'User';
@@ -48337,7 +48337,7 @@ async function resolveObjectInfos(objectInfotree, pathToObjectApiNamesMap, start
48337
48337
  // eslint-disable-next-line
48338
48338
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
48339
48339
  }
48340
- if (keys$3(objectInfos).length < startNodes.size) {
48340
+ if (keys$2(objectInfos).length < startNodes.size) {
48341
48341
  // eslint-disable-next-line
48342
48342
  throw new Error(`Unable to resolve ObjectInfo(s) for ${Array.from(startNodes)}`);
48343
48343
  }
@@ -49365,7 +49365,7 @@ function removeSyntheticFields(result, query) {
49365
49365
  output.data.uiapi = { ...output.data.uiapi };
49366
49366
  output.data.uiapi.query = { ...output.data.uiapi.query };
49367
49367
  const outputApiParent = output.data.uiapi.query;
49368
- const keys = keys$3(nodeJson);
49368
+ const keys = keys$2(nodeJson);
49369
49369
  keys.forEach((recordName) => {
49370
49370
  const outputApi = {};
49371
49371
  // Each connectionSelection's maps its name or alias to one of returned records. The record name could be `apiName' or alias
@@ -49385,7 +49385,7 @@ function removeSyntheticFields(result, query) {
49385
49385
  * @param jsonOutput JsonObject which will be populated with properties. It would only contains properties defined in 'FieldNode'
49386
49386
  */
49387
49387
  function createUserJsonOutput(selection, jsonInput, jsonOutput) {
49388
- const keys = keys$3(jsonInput);
49388
+ const keys = keys$2(jsonInput);
49389
49389
  if (selection.selectionSet) {
49390
49390
  createjsonOutput(selection.selectionSet.selections, jsonInput, jsonOutput);
49391
49391
  }
@@ -49394,7 +49394,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
49394
49394
  }
49395
49395
  }
49396
49396
  function createjsonOutput(selections, jsonInput, jsonOutput) {
49397
- const keys = keys$3(jsonInput);
49397
+ const keys = keys$2(jsonInput);
49398
49398
  selections.filter(isFieldNode).forEach((subSelection) => {
49399
49399
  const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
49400
49400
  if (keys.includes(fieldName)) {
@@ -49802,7 +49802,7 @@ function findRecordQueryContainsFieldType(recordQueryNode, fieldNames) {
49802
49802
  */
49803
49803
  function findFieldTypeInObjectInfo(objectInfos, fieldType) {
49804
49804
  let fieldsWithDataType = [];
49805
- keys$3(objectInfos).filter((recordType) => {
49805
+ keys$2(objectInfos).filter((recordType) => {
49806
49806
  for (const field in objectInfos[recordType].fields) {
49807
49807
  if (objectInfos[recordType].fields[field].dataType === fieldType) {
49808
49808
  fieldsWithDataType.push(field);
@@ -49833,7 +49833,7 @@ const replaceDraftIdsInVariables = (variables, draftFunctions, unmappedDraftIDs)
49833
49833
  }
49834
49834
  else if (typeof object === 'object' && object !== null) {
49835
49835
  let source = object;
49836
- return keys$3(source).reduce((acc, key) => {
49836
+ return keys$2(source).reduce((acc, key) => {
49837
49837
  acc[key] = replace(source[key]);
49838
49838
  return acc;
49839
49839
  }, {});
@@ -49842,7 +49842,7 @@ const replaceDraftIdsInVariables = (variables, draftFunctions, unmappedDraftIDs)
49842
49842
  return object;
49843
49843
  }
49844
49844
  };
49845
- let newVariables = keys$3(variables).reduce((acc, key) => {
49845
+ let newVariables = keys$2(variables).reduce((acc, key) => {
49846
49846
  acc[key] = replace(variables[key]);
49847
49847
  return acc;
49848
49848
  }, {});
@@ -50297,16 +50297,16 @@ const recordIdGenerator = (id) => {
50297
50297
  */
50298
50298
 
50299
50299
 
50300
- const { keys: keys$2, create: create$2, assign: assign$2, entries: entries$2 } = Object;
50300
+ const { keys: keys$1, create: create$1, assign: assign$1, entries: entries$1 } = Object;
50301
50301
  const { stringify: stringify$1, parse: parse$1 } = JSON;
50302
50302
  const { push, join, slice } = Array.prototype;
50303
50303
  const { isArray, from } = Array;
50304
50304
 
50305
50305
  function ldsParamsToString(params) {
50306
- const returnParams = create$2(null);
50307
- const keys$1 = keys$2(params);
50308
- for (let i = 0, len = keys$1.length; i < len; i++) {
50309
- const key = keys$1[i];
50306
+ const returnParams = create$1(null);
50307
+ const keys$1$1 = keys$1(params);
50308
+ for (let i = 0, len = keys$1$1.length; i < len; i++) {
50309
+ const key = keys$1$1[i];
50310
50310
  const value = params[key];
50311
50311
  if (value === undefined) {
50312
50312
  // filter out params that have no value
@@ -50321,7 +50321,7 @@ function ldsParamsToString(params) {
50321
50321
  else {
50322
50322
  returnParams[key] = `${value}`;
50323
50323
  }
50324
- if (isObject(value) === true && keys$2(value).length > 0) {
50324
+ if (isObject(value) === true && keys$1(value).length > 0) {
50325
50325
  returnParams[key] = stringify$1(value);
50326
50326
  }
50327
50327
  }
@@ -50721,7 +50721,7 @@ function buildAggregateUiUrl(params, resourceRequest) {
50721
50721
  optionalFields,
50722
50722
  };
50723
50723
  const queryString = [];
50724
- for (const [key, value] of entries$2(mergedParams)) {
50724
+ for (const [key, value] of entries$1(mergedParams)) {
50725
50725
  if (value !== undefined) {
50726
50726
  queryString.push(`${key}=${isArray(value) ? value.join(',') : value}`);
50727
50727
  }
@@ -50737,7 +50737,7 @@ function isSpanningRecord(fieldValue) {
50737
50737
  function mergeRecordFields(first, second) {
50738
50738
  const { fields: targetFields } = first;
50739
50739
  const { fields: sourceFields } = second;
50740
- const fieldNames = keys$2(sourceFields);
50740
+ const fieldNames = keys$1(sourceFields);
50741
50741
  for (let i = 0, len = fieldNames.length; i < len; i += 1) {
50742
50742
  const fieldName = fieldNames[i];
50743
50743
  const sourceField = sourceFields[fieldName];
@@ -50897,7 +50897,7 @@ function calculateEstimatedTotalUrlLength(request) {
50897
50897
  const { baseUri, basePath, queryParams } = request;
50898
50898
  let url = `${baseUri}${basePath}`;
50899
50899
  if (queryParams) {
50900
- const queryParamString = entries$2(queryParams)
50900
+ const queryParamString = entries$1(queryParams)
50901
50901
  .map(([key, value]) => `${key}=${value}`)
50902
50902
  .join('&');
50903
50903
  if (queryParamString) {
@@ -51330,7 +51330,7 @@ function instrumentDraftQueue(queue) {
51330
51330
  logError: false,
51331
51331
  });
51332
51332
  };
51333
- const overriddenQueue = create$3(queue, { mergeActions: { value: mergeActions } });
51333
+ const overriddenQueue = create$2(queue, { mergeActions: { value: mergeActions } });
51334
51334
  overriddenQueue.registerOnChangedListener((draftQueueEvent) => {
51335
51335
  switch (draftQueueEvent.type) {
51336
51336
  case DraftQueueEventType.QueueStateChanged: {
@@ -51468,7 +51468,7 @@ function enableObjectInfoCaching(env, ensureObjectInfoCached) {
51468
51468
  function dataIsObjectInfo(key, data) {
51469
51469
  return incomingObjectInfos.has(key);
51470
51470
  }
51471
- return create$3(env, {
51471
+ return create$2(env, {
51472
51472
  handleSuccessResponse: { value: handleSuccessResponse },
51473
51473
  storePublish: { value: storePublish },
51474
51474
  });
@@ -51569,8 +51569,8 @@ class ObjectInfoService {
51569
51569
  }
51570
51570
  };
51571
51571
  // Local in-memory cache for apiName to key prefixes
51572
- this.apiNameToKeyPrefixMemoryCache = create$3(null);
51573
- this.keyPrefixToApiNameMemoryCache = create$3(null);
51572
+ this.apiNameToKeyPrefixMemoryCache = create$2(null);
51573
+ this.keyPrefixToApiNameMemoryCache = create$2(null);
51574
51574
  }
51575
51575
  /**
51576
51576
  * Size of return map not necessarily correlated with number of inputs. The
@@ -51736,7 +51736,7 @@ function registerReportObserver(reportObserver) {
51736
51736
  };
51737
51737
  }
51738
51738
 
51739
- const { keys: keys$1, create: create$1, assign: assign$1, entries: entries$1, values: values$1 } = Object;
51739
+ const { keys, create, assign, entries, values } = Object;
51740
51740
  const { stringify, parse } = JSON;
51741
51741
 
51742
51742
  function selectColumnsFromTableWhereKeyIn(columnNames, table, keyColumnName, whereIn) {
@@ -51803,7 +51803,7 @@ class LdsDataTable {
51803
51803
  },
51804
51804
  conflictColumns: this.conflictColumnNames,
51805
51805
  columns: this.columnNames,
51806
- rows: keys$1(entries).reduce((rows, key) => {
51806
+ rows: keys(entries).reduce((rows, key) => {
51807
51807
  const entry = entries[key];
51808
51808
  const { data, metadata } = entry;
51809
51809
  const row = [key, stringify(data), metadata ? stringify(metadata) : null];
@@ -51822,7 +51822,7 @@ class LdsDataTable {
51822
51822
  type: 'setMetadata',
51823
51823
  },
51824
51824
  columns: [COLUMN_NAME_METADATA$1],
51825
- values: keys$1(entries).reduce((values, key) => {
51825
+ values: keys(entries).reduce((values, key) => {
51826
51826
  const { metadata } = entries[key];
51827
51827
  const row = [metadata ? stringify(metadata) : null];
51828
51828
  values[key] = row;
@@ -51912,7 +51912,7 @@ class LdsInternalDataTable {
51912
51912
  },
51913
51913
  conflictColumns: this.conflictColumnNames,
51914
51914
  columns: this.columnNames,
51915
- rows: keys$1(entries).reduce((rows, key) => {
51915
+ rows: keys(entries).reduce((rows, key) => {
51916
51916
  const entry = entries[key];
51917
51917
  const { data, metadata } = entry;
51918
51918
  const row = [key, stringify(data)];
@@ -51938,7 +51938,7 @@ class LdsInternalDataTable {
51938
51938
  type: 'setMetadata',
51939
51939
  },
51940
51940
  columns: [COLUMN_NAME_METADATA],
51941
- values: keys$1(entries).reduce((values, key) => {
51941
+ values: keys(entries).reduce((values, key) => {
51942
51942
  const { metadata } = entries[key];
51943
51943
  const row = [metadata ? stringify(metadata) : null];
51944
51944
  values[key] = row;
@@ -51947,7 +51947,7 @@ class LdsInternalDataTable {
51947
51947
  };
51948
51948
  }
51949
51949
  metadataToUpdateSQLQueries(entries, segment) {
51950
- return keys$1(entries).reduce((accu, key) => {
51950
+ return keys(entries).reduce((accu, key) => {
51951
51951
  const { metadata } = entries[key];
51952
51952
  if (metadata !== undefined) {
51953
51953
  accu.push({
@@ -52026,7 +52026,7 @@ class NimbusSqliteStore {
52026
52026
  .finally(() => tasker.done());
52027
52027
  }
52028
52028
  setEntries(entries, segment) {
52029
- if (keys$1(entries).length === 0) {
52029
+ if (keys(entries).length === 0) {
52030
52030
  return Promise.resolve();
52031
52031
  }
52032
52032
  const table = this.getTable(segment);
@@ -52034,7 +52034,7 @@ class NimbusSqliteStore {
52034
52034
  return this.batchOperationAsPromise([upsertOperation]);
52035
52035
  }
52036
52036
  setMetadata(entries, segment) {
52037
- if (keys$1(entries).length === 0) {
52037
+ if (keys(entries).length === 0) {
52038
52038
  return Promise.resolve();
52039
52039
  }
52040
52040
  const table = this.getTable(segment);
@@ -52044,13 +52044,13 @@ class NimbusSqliteStore {
52044
52044
  batchOperations(operations) {
52045
52045
  const sqliteOperations = operations.reduce((acc, cur) => {
52046
52046
  if (cur.type === 'setEntries') {
52047
- if (keys$1(cur.entries).length > 0) {
52047
+ if (keys(cur.entries).length > 0) {
52048
52048
  const table = this.getTable(cur.segment);
52049
52049
  acc.push(table.entriesToUpsertOperations(cur.entries, cur.segment));
52050
52050
  }
52051
52051
  }
52052
52052
  else if (cur.type === 'setMetadata') {
52053
- if (keys$1(cur.entries).length > 0) {
52053
+ if (keys(cur.entries).length > 0) {
52054
52054
  const table = this.getTable(cur.segment);
52055
52055
  acc.push(table.metadataToUpdateOperations(cur.entries, cur.segment));
52056
52056
  }
@@ -52174,7 +52174,7 @@ class AbstractKeyValueDataTable {
52174
52174
  },
52175
52175
  conflictColumns: this.conflictColumnNames,
52176
52176
  columns: this.columnNames,
52177
- rows: keys$1(entries).reduce((rows, key) => {
52177
+ rows: keys(entries).reduce((rows, key) => {
52178
52178
  const entry = entries[key];
52179
52179
  rows.push([key, stringify(entry.data)]);
52180
52180
  return rows;
@@ -52342,7 +52342,7 @@ function makeEnvironmentGraphqlAware(environment) {
52342
52342
  }
52343
52343
  return environment.applyCachePolicy(luvio, adapterRequestContext, buildSnapshotContext, localBuildCachedSnapshot, buildNetworkSnapshot);
52344
52344
  };
52345
- return create$3(environment, {
52345
+ return create$2(environment, {
52346
52346
  rebuildSnapshot: { value: rebuildSnapshot },
52347
52347
  applyCachePolicy: { value: applyCachePolicy },
52348
52348
  setDefaultCachePolicy: { value: environment.setDefaultCachePolicy.bind(environment) },
@@ -53763,7 +53763,7 @@ async function aggressiveTrim(data, deallocateFn, options = {}) {
53763
53763
  const batchSize = options.batchSize !== undefined ? options.batchSize : DEFAULT_MAX_BATCH_SIZE;
53764
53764
  let deallocatedCount = 0;
53765
53765
  const { pendingTrimKeys, retainedIds, storeRecords } = data;
53766
- const storeKeyLength = keys$3(storeRecords).length;
53766
+ const storeKeyLength = keys$2(storeRecords).length;
53767
53767
  if (storeKeyLength <= maxStoreRecords) {
53768
53768
  return { deallocatedCount, trimKeysSkipped: pendingTrimKeys };
53769
53769
  }
@@ -53839,78 +53839,6 @@ function setupObserver() {
53839
53839
  }
53840
53840
  }
53841
53841
 
53842
- /**
53843
- * Copyright (c) 2022, Salesforce, Inc.,
53844
- * All rights reserved.
53845
- * For full license text, see the LICENSE.txt file
53846
- */
53847
-
53848
-
53849
- const { keys, values, create, assign, freeze, entries } = Object;
53850
- function isStoreKeyRecordId(key) {
53851
- return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
53852
- }
53853
- function isEntryDurableRecordRepresentation(entry, key) {
53854
- // Either a DurableRecordRepresentation or StoreRecordError can live at a record key
53855
- return ((isStoreKeyRecordId(key) || isStoreKeyRecordViewEntity(key)) &&
53856
- entry.data.__type === undefined);
53857
- }
53858
-
53859
- // TODO [W-15983267]: this is here for backwards compatibility from <252 and can be removed in 256
53860
- // This HOF ensures that missing links that are stored in the "links" property in the durable store get restored to the "fields" property.
53861
- // this code is necessary for backwards compatibility with records that were stored in the durable store before the "links" property was removed.
53862
- function makeDurableStoreBackwardsCompatible(durableStore) {
53863
- const getEntries = function (entries, segment) {
53864
- // this HOF only inspects records in the default segment
53865
- if (segment !== DefaultDurableSegment) {
53866
- return durableStore.getEntries(entries, segment);
53867
- }
53868
- const { length: entriesLength } = entries;
53869
- if (entriesLength === 0) {
53870
- return Promise.resolve({});
53871
- }
53872
- // call base getEntries
53873
- return durableStore.getEntries(entries, segment).then((durableEntries) => {
53874
- if (durableEntries === undefined) {
53875
- return undefined;
53876
- }
53877
- const returnEntries = create(null);
53878
- const keys$1 = keys(durableEntries);
53879
- for (let i = 0, len = keys$1.length; i < len; i++) {
53880
- const key = keys$1[i];
53881
- const value = durableEntries[key];
53882
- if (value === undefined) {
53883
- continue;
53884
- }
53885
- if (isEntryDurableRecordRepresentation(value, key)) {
53886
- const record = value.data;
53887
- const { links } = record;
53888
- if (links !== undefined) {
53889
- const missingLinks = keys(links);
53890
- for (let j = 0, len = missingLinks.length; j < len; j++) {
53891
- const fieldName = missingLinks[j];
53892
- const link = links[fieldName];
53893
- if (link !== undefined && link.isMissing === true) {
53894
- record.fields[fieldName] = {
53895
- __state: { isMissing: true },
53896
- value: undefined,
53897
- displayValue: undefined,
53898
- };
53899
- }
53900
- }
53901
- delete record.links;
53902
- }
53903
- }
53904
- returnEntries[key] = value;
53905
- }
53906
- return returnEntries;
53907
- });
53908
- };
53909
- return create(durableStore, {
53910
- getEntries: { value: getEntries, writable: true },
53911
- });
53912
- }
53913
-
53914
53842
  function select$1(luvio, config) {
53915
53843
  const { query, variables, operationName } = config;
53916
53844
  return select$2(luvio, query, variables, operationName);
@@ -54499,7 +54427,7 @@ class SideEffectStore {
54499
54427
  if (idsToFetch.size > 0) {
54500
54428
  const effects = await durableStore.getEntries(Array.from(idsToFetch), SIDE_EFFECT_SEGMENT);
54501
54429
  if (effects !== undefined) {
54502
- keys$3(effects).forEach((effectId) => {
54430
+ keys$2(effects).forEach((effectId) => {
54503
54431
  const effect = effects[effectId].data;
54504
54432
  const key = effect.uniqueId;
54505
54433
  this.allEffects.set(key, effect);
@@ -54553,7 +54481,7 @@ class SideEffectStore {
54553
54481
  if (effects === undefined) {
54554
54482
  return;
54555
54483
  }
54556
- keys$3(effects).forEach((effectId) => {
54484
+ keys$2(effects).forEach((effectId) => {
54557
54485
  const effect = effects[effectId].data;
54558
54486
  const key = effect.uniqueId;
54559
54487
  this.allEffects.set(key, effect);
@@ -54624,7 +54552,7 @@ class SideEffectService {
54624
54552
  const draftFields = await this.synthesizeFieldsFromParts(fields, apiName);
54625
54553
  const timestampString = new Date(timestamp).toISOString();
54626
54554
  const systemFields = this.generateSystemFields(timestampString, id);
54627
- assign$3(draftFields, systemFields);
54555
+ assign$2(draftFields, systemFields);
54628
54556
  const objectInfo = await this.ensureObjectInfo(apiName);
54629
54557
  this.fillMissingFields(draftFields, objectInfo);
54630
54558
  let recordTypeId = this.determineRecordTypeId(fields, objectInfo);
@@ -54686,7 +54614,7 @@ class SideEffectService {
54686
54614
  async synthesizeFieldsFromParts(fields, apiName) {
54687
54615
  const objectInfo = await this.ensureObjectInfo(apiName);
54688
54616
  const recordFields = {};
54689
- for (const fieldName of keys$3(fields)) {
54617
+ for (const fieldName of keys$2(fields)) {
54690
54618
  const draftField = fields[fieldName] ?? null;
54691
54619
  recordFields[fieldName] = { value: draftField, displayValue: null };
54692
54620
  const fieldInfo = objectInfo.fields[fieldName];
@@ -54709,7 +54637,7 @@ class SideEffectService {
54709
54637
  let patchedFields = await this.synthesizeFieldsFromParts(fields, apiName);
54710
54638
  if (existingRecord) {
54711
54639
  const nameFields = this.getCompoundNameFields(existingRecord, patchedFields, objectInfo);
54712
- assign$3(patchedFields, nameFields);
54640
+ assign$2(patchedFields, nameFields);
54713
54641
  this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY_ID, { value: this.userId, displayValue: null }, existingRecord.fields, patchedFields);
54714
54642
  this.patchIfExists(DEFAULT_FIELD_LAST_MODIFIED_BY, {
54715
54643
  value: this.createLink(buildRecordRepKeyFromId(this.userId)),
@@ -54767,7 +54695,7 @@ class SideEffectService {
54767
54695
  changedNameFields[fieldName] = fieldValue;
54768
54696
  }
54769
54697
  }
54770
- if (keys$3(changedNameFields).length > 0) {
54698
+ if (keys$2(changedNameFields).length > 0) {
54771
54699
  const newNameValue = filteredNameFields
54772
54700
  .map((key) => {
54773
54701
  if (changedNameFields[key] !== undefined) {
@@ -54888,7 +54816,7 @@ class UpdateRecordEffectHandler {
54888
54816
  }
54889
54817
  const patchedFields = effect.recordPatch.fields;
54890
54818
  if (patchedFields) {
54891
- const fieldNames = keys$3(patchedFields);
54819
+ const fieldNames = keys$2(patchedFields);
54892
54820
  for (let i = 0, len = fieldNames.length; i < len; i++) {
54893
54821
  const fieldName = fieldNames[i];
54894
54822
  // don't apply server values to draft created records
@@ -55047,7 +54975,7 @@ function removeEffects(record) {
55047
54975
  return undefined;
55048
54976
  }
55049
54977
  const updatedFields = {};
55050
- const fieldNames = keys$3(fields);
54978
+ const fieldNames = keys$2(fields);
55051
54979
  for (let i = 0, len = fieldNames.length; i < len; i++) {
55052
54980
  const fieldName = fieldNames[i];
55053
54981
  const field = fields[fieldName];
@@ -55087,7 +55015,7 @@ function createLink(key) {
55087
55015
 
55088
55016
  function enableSideEffectsOnEnvironment(env, sideEffectStore) {
55089
55017
  const storePublish = function (key, data) {
55090
- if (isStoreKeyRecordId$1(key) === false || isStoreRecordError$1(data)) {
55018
+ if (isStoreKeyRecordId(key) === false || isStoreRecordError$1(data)) {
55091
55019
  return env.storePublish(key, data);
55092
55020
  }
55093
55021
  const effects = sideEffectStore.getEffects(key);
@@ -55144,7 +55072,7 @@ class DurableRecordStore {
55144
55072
  if (entries === undefined) {
55145
55073
  return directory;
55146
55074
  }
55147
- keys$3(entries).forEach((key) => {
55075
+ keys$2(entries).forEach((key) => {
55148
55076
  const { data: record, metadata } = entries[key];
55149
55077
  if (isStoreRecordError(record)) {
55150
55078
  return;
@@ -55158,10 +55086,18 @@ function isStoreRecordError(storeRecord) {
55158
55086
  return storeRecord.__type === 'error';
55159
55087
  }
55160
55088
 
55161
- // SFS to implement custom side effects here
55162
- // see packages/lds-runtime-mobile/src/__tests__/integration/sideEffects/examples/BananasSideEffects.ts for examples
55163
- // see packages/lds-runtime-mobile/src/__tests__/integration/sideEffects/side-effect-integration.spec.ts for example tests
55164
- var sfsSideEffectHooks = [];
55089
+ function createSfsSideEffectHooks(durableRecordStore) {
55090
+ if (productConsumedSideEffectsKillSwitch.isOpen({ fallback: false })) {
55091
+ return [];
55092
+ }
55093
+ return [
55094
+ // SFS FSCore needs to implement code to bypass it's existing "side effect" code for Product Consumed.
55095
+ // W-17683696 is the work that will enable the code below after FSCore's W-17422735 is completed.
55096
+ // new ProductConsumedCreatedHook(),
55097
+ // new ProductConsumedUpdatedHook(durableRecordStore),
55098
+ // new ProductConsumedDeletedHook(durableRecordStore),
55099
+ ];
55100
+ }
55165
55101
 
55166
55102
  // so eslint doesn't complain about nimbus
55167
55103
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -55179,13 +55115,13 @@ let lazyGetRecords;
55179
55115
  let lazySideEffectStore;
55180
55116
  let lazySideEffectService;
55181
55117
  const shouldFlush = (key, value) => {
55182
- if (!isStoreKeyRecordId$1(key)) {
55118
+ if (!isStoreKeyRecordId(key)) {
55183
55119
  return { flushValue: true };
55184
55120
  }
55185
55121
  if (value && typeof value === 'object') {
55186
55122
  const fields = value.fields;
55187
55123
  if (fields && typeof fields === 'object') {
55188
- const keys = keys$3(fields);
55124
+ const keys = keys$2(fields);
55189
55125
  for (const key of keys) {
55190
55126
  const field = fields[key];
55191
55127
  if (fields && field.__state && field.__state.pending === true) {
@@ -55221,7 +55157,7 @@ function getRuntime() {
55221
55157
  lazyNetworkAdapter = platformNetworkAdapter(makeNetworkAdapterChunkRecordFields(NimbusNetworkAdapter, {
55222
55158
  reportChunkCandidateUrlLength: reportChunkCandidateUrlLength,
55223
55159
  }));
55224
- lazyDurableStore = makeDurableStoreBackwardsCompatible(getNimbusDurableStore());
55160
+ lazyDurableStore = getNimbusDurableStore();
55225
55161
  lazyDurableRecordStore = new DurableRecordStore(lazyDurableStore, () => lazyLuvio);
55226
55162
  // specific adapters
55227
55163
  const internalAdapterStore = new InMemoryStore();
@@ -55243,8 +55179,8 @@ function getRuntime() {
55243
55179
  lazySideEffectService = new SideEffectService(lazyDurableRecordStore, lazyObjectInfoService, userId, formatDisplayValue);
55244
55180
  const draftService = new UiApiDraftRecordService(() => lazyLuvio, lazyDurableStore, lazyObjectInfoService, newRecordId, lazySideEffectStore, lazyDurableRecordStore);
55245
55181
  const uiApiRecordHandler = new UiApiActionHandler(() => lazyLuvio, lazyNetworkAdapter, lazyDraftQueue, getRecord, lazyObjectInfoService, isGenerated, draftService, lazySideEffectService, lazyDurableRecordStore);
55246
- uiApiRecordHandler.setSideEffectHooks(sfsSideEffectHooks);
55247
- const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
55182
+ uiApiRecordHandler.setSideEffectHooks(createSfsSideEffectHooks());
55183
+ const quickActionHandler = new QuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService, lazyObjectInfoService, getRecord);
55248
55184
  const updateRecordQuickActionHandler = new UpdateRecordQuickActionExecutionRepresentationHandler(() => lazyLuvio, draftService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, lazySideEffectService);
55249
55185
  const contentDocumentCompositeActionHandler = new ContentDocumentCompositeRepresentationActionHandler(() => lazyLuvio, userId, draftService, lazyObjectInfoService, lazyDraftQueue, lazyNetworkAdapter, isGenerated, NimbusBinaryStore, lazySideEffectService);
55250
55186
  lazyDraftQueue.addHandler(uiApiRecordHandler);
@@ -55354,4 +55290,4 @@ register({
55354
55290
  });
55355
55291
 
55356
55292
  export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, ingest$1o as ingestDenormalizedRecordRepresentation, registerReportObserver, reportGraphqlQueryParseError };
55357
- // version: 1.341.0-3e459abc99
55293
+ // version: 1.343.0-f39f04aaf6