@salesforce/lds-adapters-community-navigation-menu 1.169.0 → 1.170.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/community-navigation-menu.js +9 -7
- package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/NavigationMenuItemCollectionRepresentation.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/NavigationMenuItemRepresentation.d.ts +2 -2
- package/package.json +1 -1
- package/sfdc/index.js +10 -8
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey,
|
|
7
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -221,8 +221,7 @@ const ingest = function NavigationMenuItemCollectionRepresentationIngest(input,
|
|
|
221
221
|
}
|
|
222
222
|
return createLink(key);
|
|
223
223
|
};
|
|
224
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
225
|
-
const rootKeySet = new StoreKeyMap();
|
|
224
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
226
225
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
227
226
|
const rootKey = fullPathFactory();
|
|
228
227
|
rootKeySet.set(rootKey, {
|
|
@@ -230,7 +229,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
230
229
|
representationName: RepresentationType,
|
|
231
230
|
mergeable: false
|
|
232
231
|
});
|
|
233
|
-
return rootKeySet;
|
|
234
232
|
}
|
|
235
233
|
|
|
236
234
|
function select(luvio, params) {
|
|
@@ -239,8 +237,8 @@ function select(luvio, params) {
|
|
|
239
237
|
function keyBuilder$1(luvio, params) {
|
|
240
238
|
return keyPrefix + '::NavigationMenuItemCollectionRepresentation:(' + 'addHomeMenuItem:' + params.queryParams.addHomeMenuItem + ',' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'includeImageUrl:' + params.queryParams.includeImageUrl + ',' + 'menuItemTypesToSkip:' + params.queryParams.menuItemTypesToSkip + ',' + 'navigationLinkSetDeveloperName:' + params.queryParams.navigationLinkSetDeveloperName + ',' + 'navigationLinkSetId:' + params.queryParams.navigationLinkSetId + ',' + 'publishStatus:' + params.queryParams.publishStatus + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
241
239
|
}
|
|
242
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
243
|
-
|
|
240
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
241
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
244
242
|
}
|
|
245
243
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
246
244
|
const { body } = response;
|
|
@@ -380,7 +378,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
380
378
|
const request = createResourceRequest(resourceParams);
|
|
381
379
|
return luvio.dispatchResourceRequest(request, options)
|
|
382
380
|
.then((response) => {
|
|
383
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
381
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
382
|
+
const cache = new StoreKeyMap();
|
|
383
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
384
|
+
return cache;
|
|
385
|
+
});
|
|
384
386
|
}, (response) => {
|
|
385
387
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
386
388
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata,
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { NavigationMenuItemCollectionRepresentation as types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation } from '../types/NavigationMenuItemCollectionRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
4
|
urlParams: {
|
|
@@ -17,7 +17,7 @@ export interface ResourceRequestConfig {
|
|
|
17
17
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
18
18
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
19
19
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
20
|
-
export declare function getResponseCacheKeys(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation):
|
|
20
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation): void;
|
|
21
21
|
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any>;
|
|
22
22
|
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
23
23
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/NavigationMenuItemCollectionRepresentation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NavigationMenuItemRepresentation as NavigationMenuItemRepresentation_NavigationMenuItemRepresentation } from './NavigationMenuItemRepresentation';
|
|
2
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest,
|
|
2
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
3
3
|
export declare const VERSION = "2c44fa1cf5686d4e00960baa7b9e6a1f";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
@@ -7,7 +7,7 @@ export declare function normalize(input: NavigationMenuItemCollectionRepresentat
|
|
|
7
7
|
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
8
8
|
export declare function equals(existing: NavigationMenuItemCollectionRepresentationNormalized, incoming: NavigationMenuItemCollectionRepresentationNormalized): boolean;
|
|
9
9
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: NavigationMenuItemCollectionRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: NavigationMenuItemCollectionRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
11
|
/**
|
|
12
12
|
* Navigation Menu Item Collection
|
|
13
13
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest,
|
|
1
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
2
|
export declare const VERSION = "c33a98f8fe0360b99068afa4c494647a";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
@@ -6,7 +6,7 @@ export declare function normalize(input: NavigationMenuItemRepresentation, exist
|
|
|
6
6
|
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
7
|
export declare function equals(existing: NavigationMenuItemRepresentationNormalized, incoming: NavigationMenuItemRepresentationNormalized): boolean;
|
|
8
8
|
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, input: NavigationMenuItemRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata):
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: NavigationMenuItemRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
10
|
/**
|
|
11
11
|
* Navigation Menu Item Representation
|
|
12
12
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-community-navigation-menu",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.170.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Wire adapters Community Navigation Menu",
|
|
6
6
|
"main": "dist/es/es2018/community-navigation-menu.js",
|
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey,
|
|
17
|
+
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -231,8 +231,7 @@ const ingest = function NavigationMenuItemCollectionRepresentationIngest(input,
|
|
|
231
231
|
}
|
|
232
232
|
return createLink(key);
|
|
233
233
|
};
|
|
234
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
235
|
-
const rootKeySet = new StoreKeyMap();
|
|
234
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
236
235
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
237
236
|
const rootKey = fullPathFactory();
|
|
238
237
|
rootKeySet.set(rootKey, {
|
|
@@ -240,7 +239,6 @@ function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
|
240
239
|
representationName: RepresentationType,
|
|
241
240
|
mergeable: false
|
|
242
241
|
});
|
|
243
|
-
return rootKeySet;
|
|
244
242
|
}
|
|
245
243
|
|
|
246
244
|
function select(luvio, params) {
|
|
@@ -249,8 +247,8 @@ function select(luvio, params) {
|
|
|
249
247
|
function keyBuilder$1(luvio, params) {
|
|
250
248
|
return keyPrefix + '::NavigationMenuItemCollectionRepresentation:(' + 'addHomeMenuItem:' + params.queryParams.addHomeMenuItem + ',' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'includeImageUrl:' + params.queryParams.includeImageUrl + ',' + 'menuItemTypesToSkip:' + params.queryParams.menuItemTypesToSkip + ',' + 'navigationLinkSetDeveloperName:' + params.queryParams.navigationLinkSetDeveloperName + ',' + 'navigationLinkSetId:' + params.queryParams.navigationLinkSetId + ',' + 'publishStatus:' + params.queryParams.publishStatus + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
251
249
|
}
|
|
252
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
253
|
-
|
|
250
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
251
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
254
252
|
}
|
|
255
253
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
256
254
|
const { body } = response;
|
|
@@ -390,7 +388,11 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
390
388
|
const request = createResourceRequest(resourceParams);
|
|
391
389
|
return luvio.dispatchResourceRequest(request, options)
|
|
392
390
|
.then((response) => {
|
|
393
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () =>
|
|
391
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
392
|
+
const cache = new StoreKeyMap();
|
|
393
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
394
|
+
return cache;
|
|
395
|
+
});
|
|
394
396
|
}, (response) => {
|
|
395
397
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
396
398
|
});
|
|
@@ -457,4 +459,4 @@ withDefaultLuvio((luvio) => {
|
|
|
457
459
|
});
|
|
458
460
|
|
|
459
461
|
export { getCommunityNavigationMenu, getCommunityNavigationMenu_imperative };
|
|
460
|
-
// version: 1.
|
|
462
|
+
// version: 1.170.1-5fb216cf1
|