Index

src/lib/fs/util/helper.ts

bind
bind(functionToBind: T, thisArg: ThisType)
Parameters :
Name Type Optional
functionToBind T No
thisArg ThisType No
Returns : ReturnType<T>
createCaasAccessData
createCaasAccessData(config: FsSpartacusBridgeConfig, baseSite: string, isPreview: boolean)
Parameters :
Name Type Optional
config FsSpartacusBridgeConfig No
baseSite string No
isPreview boolean No
findDocumentsInCaasResponse
findDocumentsInCaasResponse(response: any)

This function checks for FirstSpirit CMS pages in a given CaaS response and returns them.

Parameters :
Name Type Optional Description
response any No

CaaS response to parse for pages.

Returns : FsCmsPageInterface[]

The pages found in the CaaS response.

getFsManagedPageConfigByTemplateId
getFsManagedPageConfigByTemplateId(fsManagedPagesConfig, templateId: string)

This function retrieves the FirstSpiritManagedPage from the given config by the given ID of the template and returns it.

Parameters :
Name Type Optional Description
fsManagedPagesConfig No

The FirstSpirit Managed Pages config.

templateId string No

The ID of the template for which to look for.

isHeadlessTestEnv
isHeadlessTestEnv()

Checks if current environment is a test environment running in headless Chrome (karma-chrome-launcher).

reExecutable
reExecutable(functionToCall: T, handleResult: S, options?)

HoF. Allows you to re-run the passed function functionToCall multiple times (with a configurable delay) if the received result does not satisfy your test in handleResult. Otherwise it'll immediately returns the result from functionToCall.

Parameters :
Name Type Optional Description
functionToCall T No

The function you want to call. Should be bound to the right context (e.g. myFunction.bind(this))

handleResult S No

This function gets the result of the functionToCall call passed as argument and needs to return an observable. If the returned value of handleResult is an Error, the reExecutable function will re-run the function functionToCall (till maxRetries is reached). Any other returned value will indicate, that the predicate is satisfied and reExecutable will immediate return this result.

options Yes

Adjust the delay or max retry values.

Returns : Observable<ReturnType<T>>

The return value of handleResult will be returned

src/lib/fs/cms/page/processing/fs-editing-area/fs-editing-area-injector-pipeline-step.ts

createFsEditingAreaInjectorPipelineStep
createFsEditingAreaInjectorPipelineStep(fsSpartacusBridgeConfig: FsSpartacusBridgeConfig, baseSiteService: BaseSiteService)

A factory function that creates the FsEditingAreaInjectorPipelineStep from a given FsSpartacusBridgeConfig and BaseSiteService.

Parameters :
Name Type Optional Description
fsSpartacusBridgeConfig FsSpartacusBridgeConfig No

The FsSpartacusBridgeConfig from which the step will be created.

baseSiteService BaseSiteService No

The BaseSiteService to check for the active base site.

The created FsEditingAreaInjectorPipelineStep instance.

src/lib/fs/cms/page/processing/fs-editing-overlay/fs-editing-overlay-injector-pipeline-step.ts

createFsEditingOverlayInjectorPipelineStep
createFsEditingOverlayInjectorPipelineStep(fsSpartacusBridgeConfig: FsSpartacusBridgeConfig, baseSiteService: BaseSiteService)

A factory function that creates the FsEditingOverlayInjectorPipelineStep from a given FsSpartacusBridgeConfig and BaseSiteService.

Parameters :
Name Type Optional Description
fsSpartacusBridgeConfig FsSpartacusBridgeConfig No

The fsSpartacusBridgeConfig from which the step will be created.

baseSiteService BaseSiteService No

The BaseSiteService to check for the active base site.

The created FsEditingOverlayInjectorPipelineStep instance.

src/lib/fs/cms/page/fs-cms-page.adapter.spec.data.ts

createResponse
createResponse(seoUrl: string, language: string)
Parameters :
Name Type Optional
seoUrl string No
language string No
Returns : FsCmsPageInterface

src/lib/fs/util/occ-cms-pages.ts

extractCmsPageUid
extractCmsPageUid(occUidOrLabel: string)
Parameters :
Name Type Optional
occUidOrLabel string No
extractPageUniqueId
extractPageUniqueId(pageContext: PageContext)

This function retrieves both, the SAP Commerce UID and the FirstSpirit UID, and returns them.

Parameters :
Name Type Optional Description
pageContext PageContext No

The context of the page for which the UID will be retrieved.

Returns : literal type
getPageId
getPageId(pageContext: PageContext)
Parameters :
Name Type Optional
pageContext PageContext No

src/lib/fs/util/content-slots.ts

getSlot
getSlot(cmsPage: CmsStructureModel, slotName: string)

This function gets the ContentSlotData for a given page and content slot name.

Parameters :
Name Type Optional Description
cmsPage CmsStructureModel No

The page from which the data will be retrieved.

slotName string No

The name of the slot which will be retrieved.

Returns : ContentSlotData | undefined
getSlotIgnoreCase
getSlotIgnoreCase(cmsPage: CmsStructureModel, slotName: string)

This function gets the ContentSlotData for a given page and the content slot name while ignoring its case.

Parameters :
Name Type Optional Description
cmsPage CmsStructureModel No

The page from which the date will be retrieved.

slotName string No

The name of the slot which will be retrieved.

Returns : ContentSlotData | undefined

results matching ""

    No results matching ""