@bloomreach/spa-sdk
Advanced tools
Comparing version 14.0.0 to 14.0.1
{ | ||
"name": "@bloomreach/spa-sdk", | ||
"version": "14.0.0", | ||
"version": "14.0.1", | ||
"description": "Bloomreach SPA SDK", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ # Bloomreach SPA SDK | ||
Bloomreach SPA SDK provides simplified headless integration with [Bloomreach Experience Manager](https://www.bloomreach.com/en/products/experience-manager) for JavaScript-based applications. | ||
This library interacts with the [Page Model API](https://documentation.bloomreach.com/library/concepts/spa-plus/page-model-api/introduction.html) and exposes a simplified and framework-agnostic interface over the page model. | ||
This library interacts with the [Page Model API](https://documentation.bloomreach.com/library/concepts/page-model-api/introduction.html) and exposes a simplified and framework-agnostic interface over the page model. | ||
@@ -13,3 +13,3 @@ ## What is Bloomreach Experience Manager? | ||
## Features | ||
- [Page Model API](https://documentation.bloomreach.com/library/concepts/spa-plus/page-model-api/introduction.html) client; | ||
- [Page Model API](https://documentation.bloomreach.com/library/concepts/page-model-api/introduction.html) client; | ||
- Page Model parser; | ||
@@ -117,6 +117,6 @@ - URL generator; | ||
--- | --- | ||
`getComponent(...componentNames): Component \| undefined` | Gets a component in the page (e.g. `getComponent('main', 'right')`). If `componentNames` is omitted, then the page root component will be returned. | ||
`getContent(reference: Reference \| string): Content \| undefined` | Gets a content item used on the page. | ||
<code>getComponent(...componentNames): Component | undefined</code> | Gets a component in the page (e.g. `getComponent('main', 'right')`). If `componentNames` is omitted, then the page root component will be returned. | ||
<code>getContent(reference: Reference | string): Content | undefined</code> | Gets a content item used on the page. | ||
`getMeta(meta): Meta[]` | Generates a meta-data from the provided `meta` model. | ||
`getTitle(): string \| undefined` | Gets the title of the page, or `undefined` if not configured. | ||
<code>getTitle(): string | undefined</code> | Gets the title of the page, or `undefined` if not configured. | ||
`getUrl(link?: Link): string` | Generates a URL for a link object.<br> - If the link object type is internal or external, then it will prepend `spaBaseUrl`. In case when the link starts with the same path as in `cmsBaseUrl`, this part will be removed.<br> - If it is a resource link, then it will prepend the origin part from the `cmsBaseUrl` option.<br> - If the link parameter is omitted, then the link to the current page will be returned.<br> - In other cases, the link will be returned as-is. | ||
@@ -137,8 +137,8 @@ `getUrl(path: string): string` | Generates an SPA URL for the path.<br> - If it is a relative path, then it will prepend `spaBaseUrl`.<br> - If it is an absolute path, then the behavior will be similar to internal and external link generation. | ||
`getModels(): object` | Returns the map of the component models. | ||
`getUrl(): string \| undefined` | Returns the link to the partial component model. | ||
<code>getUrl(): string | undefined</code> | Returns the link to the partial component model. | ||
`getName(): string` | Returns the name of the component. | ||
`getParameters(): object` | Returns the parameters of the component. | ||
`getChildren(): Component[]` | Returns the direct children of the component. | ||
`getComponent(...componentNames: string[]): Component \| undefined` | Looks up for a nested component. | ||
`getComponentById(id: string): Component \| undefined` | Looks up for a nested component by its id. | ||
<code>getComponent(...componentNames: string[]): Component | undefined</code> | Looks up for a nested component. | ||
<code>getComponentById(id: string): Component | undefined</code> | Looks up for a nested component by its id. | ||
@@ -150,3 +150,3 @@ ##### Container | ||
--- | --- | ||
`getType(): string \| undefined` | Returns the [type](https://documentation.bloomreach.com/library/concepts/template-composer/channel-editor-containers.html) of a container. | ||
<code>getType(): string | undefined</code> | Returns the [type](https://documentation.bloomreach.com/library/concepts/template-composer/channel-editor-containers.html) of a container. | ||
@@ -158,3 +158,3 @@ ##### Container Item | ||
--- | --- | ||
`getType(): string \| undefined` | Returns the type of a container item. The available types depend on which container items have been configured in the backend (e.g. "Banner"). | ||
<code>getType(): string | undefined</code> | Returns the type of a container item. The available types depend on which container items have been configured in the backend (e.g. "Banner"). | ||
`isHidden(): boolean` | Returns whether the component should not render anything. Hiding components is only possible with the Relevance feature. | ||
@@ -170,7 +170,7 @@ `on(eventName: string, listener: Function): Function` | Subscribes for an event and returns the unsubscribe function. | ||
`getId(): string` | Returns the content id. | ||
`getLocale(): string \| undefined` | Returns the content locale. | ||
<code>getLocale(): string | undefined</code> | Returns the content locale. | ||
`getMeta(): Meta[]` | Returns the content meta-data collection. | ||
`getName(): string` | Returns the content name. | ||
`getData(): object` | Returns the content data as it is returned in the Page Model API. | ||
`getUrl(): string \| undefined` | Returns the link to the content. | ||
<code>getUrl(): string | undefined</code> | Returns the link to the content. | ||
@@ -186,10 +186,10 @@ ##### Meta | ||
## Links | ||
- [SPA integration concept](https://documentation.bloomreach.com/library/concepts/spa-plus/introduction.html). | ||
- [Page Model API introduction](https://documentation.bloomreach.com/library/concepts/spa-plus/page-model-api/introduction.html). | ||
- [SPA integration concept](https://documentation.bloomreach.com/library/concepts/spa-integration/introduction.html). | ||
- [Page Model API introduction](https://documentation.bloomreach.com/library/concepts/page-model-api/introduction.html). | ||
## FAQ | ||
- Information about common problems and possible solutions can be found on [the troubleshooting page](https://documentation.bloomreach.com/library/concepts/spa-plus/sdk/spa-sdk-troubleshooting.html). | ||
- Information about the recommended setup can be found on [the best practices page](https://documentation.bloomreach.com/library/concepts/spa-plus/sdk/spa-sdk-best-practices.html). | ||
- Information about common problems and possible solutions can be found on [the troubleshooting page](https://documentation.bloomreach.com/library/concepts/spa-integration/troubleshooting.html). | ||
- Information about the recommended setup can be found on [the best practices page](https://documentation.bloomreach.com/library/concepts/spa-integration/best-practices.html). | ||
## License | ||
Published under [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) license. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136922
1