@salesforce/lds-runtime-aura 1.423.0 → 1.424.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.
@@ -28,7 +28,7 @@ import { findExecutableOperation, buildGraphQLInputExtension, addTypenameToDocum
28
28
  import { print, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
29
29
  import { setServices } from 'force/luvioServiceProvisioner1';
30
30
  import { assertIsValid, MissingRequiredPropertyError, JsonSchemaViolationError } from 'force/luvioJsonschemaValidate5';
31
- import { dispatchGlobalEvent, unstable_loadComponentDefs, executeGlobalControllerRawResponse } from 'aura';
31
+ import { dispatchGlobalEvent, executeGlobalControllerRawResponse } from 'aura';
32
32
  import auraNetworkAdapter, { dispatchAuraAction, defaultActionConfig, instrument as instrument$1, forceRecordTransactionsDisabled as forceRecordTransactionsDisabled$1, ldsNetworkAdapterInstrument, CrudEventState, CrudEventType, UIAPI_RECORDS_PATH, UIAPI_RELATED_LIST_RECORDS_BATCH_PATH, UIAPI_RELATED_LIST_RECORDS_PATH } from 'force/ldsNetwork';
33
33
  import { ThirdPartyTracker } from 'instrumentation:thirdPartyTracker';
34
34
  import { markStart, markEnd, counter, registerCacheStats, perfStart, perfEnd, registerPeriodicLogger, interaction, timer, mark } from 'instrumentation/service';
@@ -2706,7 +2706,7 @@ function buildServiceDescriptor$d(luvio) {
2706
2706
  },
2707
2707
  };
2708
2708
  }
2709
- // version: 1.423.0-32cdbd3d26
2709
+ // version: 1.424.0-3bccebbf90
2710
2710
 
2711
2711
  /*!
2712
2712
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3059,7 +3059,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
3059
3059
  },
3060
3060
  };
3061
3061
  }
3062
- // version: 1.423.0-32cdbd3d26
3062
+ // version: 1.424.0-3bccebbf90
3063
3063
 
3064
3064
  /*!
3065
3065
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -5695,7 +5695,7 @@ function getEnvironmentSetting(name) {
5695
5695
  }
5696
5696
  return undefined;
5697
5697
  }
5698
- // version: 1.423.0-32cdbd3d26
5698
+ // version: 1.424.0-3bccebbf90
5699
5699
 
5700
5700
  const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
5701
5701
  const defaultConfig = {
@@ -7245,177 +7245,6 @@ class LexRequestStrategy extends RequestStrategy {
7245
7245
  }
7246
7246
  }
7247
7247
 
7248
- const GET_COMPONENTS_DEF_ADAPTER_NAME = 'getComponentsDef';
7249
- const noop = () => { };
7250
- // Taken from https://sourcegraph.soma.salesforce.com/perforce.soma.salesforce.com/app/main/core/-/blob/ui-global-components/components/one/one/oneController.js?L75
7251
- // In theory this should not be here, but for now, we don't have an alternative,
7252
- // given these are started before o11y tells PDL the EPT windows ended (even before the timestamp sent by o11y).
7253
- const onePreloads = new Set([
7254
- 'markup://emailui:formattedEmailWrapper',
7255
- 'markup://emailui:outputEmail',
7256
- 'markup://flexipage:baseRecordHomeTemplateDesktop',
7257
- 'markup://force:actionWindowLink',
7258
- 'markup://force:inlineEditCell',
7259
- 'markup://force:inputField',
7260
- 'markup://force:recordPreviewItem',
7261
- 'markup://force:relatedListDesktop',
7262
- 'markup://force:relatedListQuickLinksContainer',
7263
- 'markup://lst:relatedListQuickLinksContainer',
7264
- 'markup://lst:secondDegreeRelatedListSingleContainer',
7265
- 'markup://lst:bundle_act_coreListViewManagerDesktop',
7266
- 'markup://lst:bundle_act_coreListViewManagerDesktop_generatedTemplates',
7267
- 'markup://lst:baseFilterPanel',
7268
- 'markup://lst:chartPanel',
7269
- 'markup://force:socialPhotoWrapper',
7270
- 'markup://forceContent:contentVersionsEditWizard',
7271
- 'markup://forceContent:outputTitle',
7272
- 'markup://forceContent:virtualRelatedListStencil',
7273
- 'markup://forceSearch:resultsFilters',
7274
- 'markup://interop:unstable_uiRecordApi',
7275
- 'markup://lightning:formattedPhone',
7276
- 'markup://notes:contentNoteRelatedListStencil',
7277
- 'markup://one:alohaPage',
7278
- 'markup://one:consoleObjectHome',
7279
- 'markup://one:recordActionWrapper',
7280
- 'markup://records:lwcDetailPanel',
7281
- 'markup://records:lwcHighlightsPanel',
7282
- 'markup://records:recordLayoutInputDateTime',
7283
- 'markup://records:recordLayoutInputLocation',
7284
- 'markup://records:recordLayoutItem',
7285
- 'markup://records:recordLayoutLookup',
7286
- 'markup://records:recordLayoutRichText',
7287
- 'markup://records:recordLayoutRow',
7288
- 'markup://records:recordLayoutSection',
7289
- 'markup://records:recordLayoutTextArea',
7290
- 'markup://records:recordPicklist',
7291
- 'markup://sfa:outputNameWithHierarchyIcon',
7292
- 'markup://runtime_platform_actions:actionHeadlessFormCancel',
7293
- 'markup://runtime_platform_actions:actionHeadlessFormSave',
7294
- 'markup://runtime_platform_actions:actionHeadlessFormSaveAndNew',
7295
- 'markup://lightning:iconSvgTemplatesCustom',
7296
- 'markup://lightning:iconSvgTemplatesDocType',
7297
- 'markup://record_flexipage:recordHomeFlexipageUtil',
7298
- 'markup://record_flexipage:recordFieldInstancesHandlers',
7299
- 'markup://force:outputCustomLinkUrl',
7300
- 'markup://force:quickActionRunnable',
7301
- 'markup://force:inputURL',
7302
- 'markup://force:inputMultiPicklist',
7303
- 'markup://runtime_sales_activities:activityPanel',
7304
- 'markup://support:outputLookupWithPreviewForSubject',
7305
- 'markup://runtime_sales_activities:activitySubjectListView',
7306
- 'markup://support:outputCaseSubjectField',
7307
- 'markup://sfa:inputOpportunityAmount',
7308
- 'markup://forceChatter:contentFileSize',
7309
- 'markup://flexipage:column2',
7310
- 'markup://sfa:outputNameWithHierarchyIconAccount',
7311
- 'markup://emailui:formattedEmailAccount',
7312
- 'markup://emailui:formattedEmailContact',
7313
- 'markup://emailui:formattedEmailLead',
7314
- 'markup://e.aura:serverActionError',
7315
- 'markup://records:recordType',
7316
- 'markup://flexipage:recordHomeWithSubheaderTemplateDesktop2',
7317
- 'markup://force:customLinkUrl',
7318
- 'markup://sfa:outputOpportunityAmount',
7319
- 'markup://emailui:formattedEmailCase',
7320
- 'markup://runtime_sales_activities:activitySubject',
7321
- 'markup://lightning:quickActionAPI',
7322
- 'markup://force:listViewManagerGridWrapText',
7323
- 'markup://flexipage:recordHomeSimpleViewTemplate2',
7324
- 'markup://flexipage:accordion2',
7325
- 'markup://flexipage:accordionSection2',
7326
- 'markup://flexipage:field',
7327
- 'markup://runtime_iag_core:onboardingManager',
7328
- 'markup://records:entityLabel',
7329
- 'markup://records:highlightsHeaderRightContent',
7330
- 'markup://records:formattedRichText',
7331
- 'markup://force:socialRecordAvatarWrapper',
7332
- 'markup://runtime_pipeline_inspector:pipelineInspectorHome',
7333
- 'markup://sfa:inspectionDesktopObjectHome',
7334
- 'markup://records:outputPhone',
7335
- ]);
7336
- function canPreloadDefinition(def) {
7337
- return (def.startsWith('markup://') &&
7338
- !(
7339
- // some "virtual" components from flexipages are with `__` in the name, eg: design templates.
7340
- // Not filtering out them will not cause errors, but will cause a server request that returns with error.
7341
- (def.includes('__') ||
7342
- // any generated template
7343
- def.includes('forceGenerated') ||
7344
- // part of onePreload
7345
- def.includes('one:onePreloads') ||
7346
- onePreloads.has(def))));
7347
- }
7348
- function requestComponents(config) {
7349
- // Because { foo: undefined } can't be saved in indexedDB (serialization is {})
7350
- // we need to manually save it as { "foo": "" }, and transform it to { foo: undefined }
7351
- const descriptorsMap = {};
7352
- let hasComponentsToLoad = false;
7353
- for (const [def, uid] of entries(config)) {
7354
- if (canPreloadDefinition(def)) {
7355
- hasComponentsToLoad = true;
7356
- descriptorsMap[def] = uid === '' ? undefined : uid;
7357
- }
7358
- }
7359
- if (hasComponentsToLoad) {
7360
- unstable_loadComponentDefs(descriptorsMap, noop);
7361
- }
7362
- }
7363
- class GetComponentsDefStrategy extends LexRequestStrategy {
7364
- constructor() {
7365
- super(...arguments);
7366
- this.adapterName = GET_COMPONENTS_DEF_ADAPTER_NAME;
7367
- }
7368
- execute(config) {
7369
- return requestComponents(config);
7370
- }
7371
- buildConcreteRequest(similarRequest, _context) {
7372
- return {
7373
- ...similarRequest,
7374
- };
7375
- }
7376
- transformForSave(request) {
7377
- const normalizedConfig = {};
7378
- for (const [def, uid] of entries(request.config || {})) {
7379
- const normalizedDescriptorName = def.indexOf('://') === -1 ? 'markup://' + def : def;
7380
- // uid can be a string, an object, or undefined.
7381
- // when is an object or undefined, we can't say anything about the version,
7382
- // and we can't save it as `undefined` as it can't be persisted to indexed db.
7383
- normalizedConfig[normalizedDescriptorName] = typeof uid === 'string' ? uid : '';
7384
- }
7385
- return {
7386
- ...request,
7387
- config: normalizedConfig,
7388
- };
7389
- }
7390
- canCombine() {
7391
- return true;
7392
- }
7393
- combineRequests(reqA, reqB) {
7394
- const combinedDescriptors = {};
7395
- // Note the order is important [reqA, reqB], reqB is always after reqA, and we want to keep the last seen uid
7396
- // of a specific component.
7397
- for (const descriptorMap of [reqA, reqB]) {
7398
- for (const [def, uid] of entries(descriptorMap)) {
7399
- if (canPreloadDefinition(def)) {
7400
- combinedDescriptors[def] = uid;
7401
- }
7402
- }
7403
- }
7404
- return combinedDescriptors;
7405
- }
7406
- isContextDependent(_context, _request) {
7407
- return true;
7408
- }
7409
- /**
7410
- * Component predictions are not boxcared
7411
- *
7412
- * @returns false
7413
- */
7414
- get isBoxcarable() {
7415
- return false;
7416
- }
7417
- }
7418
-
7419
7248
  const LDS_PDL_CMP_IDENTIFIER = 'lds:pdl';
7420
7249
  const DEFAULT_RESOURCE_CONTEXT = {
7421
7250
  sourceContext: {
@@ -8631,7 +8460,6 @@ class AbstractHomePage extends LexDefaultPage {
8631
8460
 
8632
8461
  const RECORD_HOME_SUPPORTED_ADAPTERS = new Set([
8633
8462
  GET_APEX_ADAPTER_NAME,
8634
- GET_COMPONENTS_DEF_ADAPTER_NAME,
8635
8463
  GET_OBJECT_INFO_ADAPTER_NAME,
8636
8464
  GET_OBJECT_INFO_BATCH_ADAPTER_NAME,
8637
8465
  GET_RECORD_ACTIONS_ADAPTER_NAME,
@@ -8645,7 +8473,8 @@ const RECORD_HOME_SUPPORTED_ADAPTERS = new Set([
8645
8473
  GET_RELATED_LISTS_ACTIONS_ADAPTER_NAME,
8646
8474
  GET_RELATED_LISTS_INFO_ADAPTER_NAME,
8647
8475
  GET_RELATED_LIST_ACTIONS_ADAPTER_NAME,
8648
- 'templateApi', // external - getTemplateDescriptorWithExpansionBundle
8476
+ 'templateApi',
8477
+ 'Aura.getComponentsDef', // external - Predictive Loading for CMP Definitions
8649
8478
  ]);
8650
8479
  class RecordHomePage extends AbstractHomePage {
8651
8480
  constructor(context, requestStrategyManager) {
@@ -10025,6 +9854,7 @@ const DEFAULT_STORAGE_CONFIG = {
10025
9854
  expiration: 30 * 24 * 60 * 60,
10026
9855
  clearOnInit: false,
10027
9856
  debugLogging: false,
9857
+ version: '1',
10028
9858
  };
10029
9859
  /**
10030
9860
  * Durable cache inclusion policy that uses AuraStorage for persistent L2 cache
@@ -10388,7 +10218,6 @@ function setupPredictivePrefetcher(luvio) {
10388
10218
  new GetListInfoByNameRequestStrategy(luvio),
10389
10219
  new GetListRecordsByNameRequestStrategy(luvio),
10390
10220
  new GetApexRequestStrategy(luvio),
10391
- new GetComponentsDefStrategy(),
10392
10221
  new GetListInfosByObjectNameRequestStrategy(luvio),
10393
10222
  new GetListObjectInfoRequestStrategy(luvio),
10394
10223
  new GetRelatedListsInfoRequestStrategy(luvio),
@@ -10648,4 +10477,4 @@ function ldsEngineCreator() {
10648
10477
  }
10649
10478
 
10650
10479
  export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10651
- // version: 1.423.0-5aa6bdc1b9
10480
+ // version: 1.424.0-51efddf2a4
@@ -1,4 +1,3 @@
1
- export * from './get-components-request-strategy';
2
1
  export * from './get-record-avatars-request-strategy';
3
2
  export * from './get-record-request-strategy';
4
3
  export * from './get-records-request-strategy';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.423.0",
3
+ "version": "1.424.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -36,15 +36,14 @@
36
36
  "devDependencies": {
37
37
  "@conduit-client/service-provisioner": "3.16.0",
38
38
  "@conduit-client/tools-core": "3.16.0",
39
- "@salesforce/lds-adapters-apex": "^1.423.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.423.0",
41
- "@salesforce/lds-ads-bridge": "^1.423.0",
42
- "@salesforce/lds-aura-storage": "^1.423.0",
43
- "@salesforce/lds-bindings": "^1.423.0",
44
- "@salesforce/lds-durable-storage": "^1.420.0",
45
- "@salesforce/lds-instrumentation": "^1.423.0",
46
- "@salesforce/lds-network-aura": "^1.423.0",
47
- "@salesforce/lds-network-fetch": "^1.423.0",
39
+ "@salesforce/lds-adapters-apex": "^1.424.0",
40
+ "@salesforce/lds-adapters-uiapi": "^1.424.0",
41
+ "@salesforce/lds-ads-bridge": "^1.424.0",
42
+ "@salesforce/lds-aura-storage": "^1.424.0",
43
+ "@salesforce/lds-bindings": "^1.424.0",
44
+ "@salesforce/lds-instrumentation": "^1.424.0",
45
+ "@salesforce/lds-network-aura": "^1.424.0",
46
+ "@salesforce/lds-network-fetch": "^1.424.0",
48
47
  "jwt-encode": "1.0.1"
49
48
  },
50
49
  "dependencies": {
@@ -75,11 +74,11 @@
75
74
  "@luvio/network-adapter-composable": "0.160.3",
76
75
  "@luvio/network-adapter-fetch": "0.160.3",
77
76
  "@lwc/state": "^0.29.0",
78
- "@salesforce/lds-adapters-onestore-graphql": "^1.423.0",
77
+ "@salesforce/lds-adapters-onestore-graphql": "^1.424.0",
79
78
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
80
- "@salesforce/lds-durable-storage": "^1.423.0",
81
- "@salesforce/lds-luvio-service": "^1.423.0",
82
- "@salesforce/lds-luvio-uiapi-records-service": "^1.423.0"
79
+ "@salesforce/lds-durable-storage": "^1.424.0",
80
+ "@salesforce/lds-luvio-service": "^1.424.0",
81
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.424.0"
83
82
  },
84
83
  "luvioBundlesize": [
85
84
  {
@@ -87,7 +86,7 @@
87
86
  "maxSize": {
88
87
  "none": "370 kB",
89
88
  "min": "190 kB",
90
- "compressed": "60.9 kB"
89
+ "compressed": "61.9 kB"
91
90
  }
92
91
  }
93
92
  ],
@@ -1,31 +0,0 @@
1
- import { LexRequestStrategy } from './lex-request-strategy';
2
- type DescriptorsMap = Record<string, unknown | string | undefined>;
3
- type NormalizedDescriptorsMap = Record<string, string>;
4
- export type GetComponentsRequest = {
5
- adapterName: 'getComponentsDef';
6
- config: DescriptorsMap;
7
- };
8
- export type NormalizedGetComponentsRequest = {
9
- adapterName: 'getComponentsDef';
10
- config: NormalizedDescriptorsMap;
11
- };
12
- export type GetComponentsContext = {
13
- objectApiName: string;
14
- };
15
- export declare const GET_COMPONENTS_DEF_ADAPTER_NAME = "getComponentsDef";
16
- export declare class GetComponentsDefStrategy extends LexRequestStrategy<DescriptorsMap, GetComponentsRequest, GetComponentsContext> {
17
- adapterName: string;
18
- execute(config: NormalizedDescriptorsMap): void;
19
- buildConcreteRequest(similarRequest: GetComponentsRequest, _context: GetComponentsContext): GetComponentsRequest;
20
- transformForSave(request: GetComponentsRequest): NormalizedGetComponentsRequest;
21
- canCombine(): boolean;
22
- combineRequests(reqA: NormalizedDescriptorsMap, reqB: NormalizedDescriptorsMap): NormalizedDescriptorsMap;
23
- isContextDependent(_context: GetComponentsContext, _request: GetComponentsRequest): boolean;
24
- /**
25
- * Component predictions are not boxcared
26
- *
27
- * @returns false
28
- */
29
- get isBoxcarable(): boolean;
30
- }
31
- export {};