diff --git a/docs/_pagefind/fragment/unknown_85556b5.pf_fragment b/docs/_pagefind/fragment/unknown_85556b5.pf_fragment deleted file mode 100644 index a4bbaa60..00000000 Binary files a/docs/_pagefind/fragment/unknown_85556b5.pf_fragment and /dev/null differ diff --git a/docs/_pagefind/fragment/unknown_8cdfab5.pf_fragment b/docs/_pagefind/fragment/unknown_8cdfab5.pf_fragment new file mode 100644 index 00000000..57f29013 Binary files /dev/null and b/docs/_pagefind/fragment/unknown_8cdfab5.pf_fragment differ diff --git a/docs/_pagefind/fragment/unknown_90e7205.pf_fragment b/docs/_pagefind/fragment/unknown_90e7205.pf_fragment new file mode 100644 index 00000000..6a86f140 Binary files /dev/null and b/docs/_pagefind/fragment/unknown_90e7205.pf_fragment differ diff --git a/docs/_pagefind/fragment/unknown_fd564ae.pf_fragment b/docs/_pagefind/fragment/unknown_fd564ae.pf_fragment deleted file mode 100644 index b6573f0b..00000000 Binary files a/docs/_pagefind/fragment/unknown_fd564ae.pf_fragment and /dev/null differ diff --git a/docs/_pagefind/index/unknown_88e4b17.pf_index b/docs/_pagefind/index/unknown_88e4b17.pf_index new file mode 100644 index 00000000..b14bd527 Binary files /dev/null and b/docs/_pagefind/index/unknown_88e4b17.pf_index differ diff --git a/docs/_pagefind/index/unknown_d0c146d.pf_index b/docs/_pagefind/index/unknown_d0c146d.pf_index deleted file mode 100644 index 393ead97..00000000 Binary files a/docs/_pagefind/index/unknown_d0c146d.pf_index and /dev/null differ diff --git a/docs/_pagefind/pagefind-entry.json b/docs/_pagefind/pagefind-entry.json index 03672519..e412d677 100644 --- a/docs/_pagefind/pagefind-entry.json +++ b/docs/_pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"0.12.0","languages":{"unknown":{"hash":"unknown_5b97875bf053fd4","wasm":null,"page_count":7}}} \ No newline at end of file +{"version":"0.12.0","languages":{"unknown":{"hash":"unknown_b8a0337cec8d529","wasm":null,"page_count":7}}} \ No newline at end of file diff --git a/docs/_pagefind/pagefind.unknown_5b97875bf053fd4.pf_meta b/docs/_pagefind/pagefind.unknown_5b97875bf053fd4.pf_meta deleted file mode 100644 index ca9881c1..00000000 Binary files a/docs/_pagefind/pagefind.unknown_5b97875bf053fd4.pf_meta and /dev/null differ diff --git a/docs/_pagefind/pagefind.unknown_b8a0337cec8d529.pf_meta b/docs/_pagefind/pagefind.unknown_b8a0337cec8d529.pf_meta new file mode 100644 index 00000000..3c6b134e Binary files /dev/null and b/docs/_pagefind/pagefind.unknown_b8a0337cec8d529.pf_meta differ diff --git a/docs/changelog/index.html b/docs/changelog/index.html index 469e41e6..f1274635 100644 --- a/docs/changelog/index.html +++ b/docs/changelog/index.html @@ -166,15 +166,39 @@

SDK Documentation Portal

- +

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

-

“23.2.0”

+

“23.3.0”

    +
  • SPASDK-215 Upgrade ng-sdk angular version to 17 #171
  • +
  • SPASDK-215 Add styles for edit button #SPASDK-215
  • +
  • SPASDK-215 Fix linting issue #SPASDK-215
  • +
  • SPASDK-215 Add request object in both server and browser versions #SPASDK-215
  • +
  • SPASDK-215 Add heroku ssr deployment file #SPASDK-215
  • +
  • SPASDK-215 Add stateKey description to ng-sdk README file #SPASDK-215
  • +
  • SPASDK-215 Fix linting issues #SPASDK-215
  • +
  • SPASDK-215 Add angular 15 and 16 support #SPASDK-215
  • +
  • SPASDK-215 Add browser & server folders in dist build output directory #SPASDK-215
  • +
  • SPASDK-215 Add ssr commands to angular example #SPASDK-215
  • +
  • SPASDK-215 Add prebuild command to generate environments file in angular example #SPASDK-215
  • +
  • SPASDK-215 Remove request from configuration builder #SPASDK-215
  • +
  • SPASDK-215 Remove linting issues & add relevance to server #SPASDK-215
  • +
  • SPASDK-215 Remove unit testing from angular example #SPASDK-215
  • +
  • SPASDK-215 Add new angular 17 example and remove the angular 16 example #SPASDK-215
  • +
  • SPASDK-215 Upgrade ng-sdk angular version to 17 #SPASDK-215
  • +
+

spa-sdk-23.2.0

+
+

13 May 2024

+
+
    +
  • SPASDK-211 Support angular v16 in ng-sdk #169
  • SPASDK-211 Update angular sdk and example version to 16 #161
  • +
  • SPASDK-211 Bumping versions to 23.2.0 #SPASDK-211
  • SPASDK-211 Fix linting issues #SPASDK-211
  • SPASDK-211 Add empty lines at the begining of html files #SPASDK-211
  • SPASDK-211 Update angular example to version 16 #SPASDK-211
  • @@ -1088,7 +1112,7 @@

    spa-sdk-15.0.0-1

diff --git a/docs/ng-sdk/index.html b/docs/ng-sdk/index.html index 064d79ac..eecde30e 100644 --- a/docs/ng-sdk/index.html +++ b/docs/ng-sdk/index.html @@ -166,7 +166,7 @@

SDK Documentation Portal

- +
@@ -196,7 +196,7 @@

Usage

component.

src/app/app.module.ts

In the NgModule metadata, it needs to -import BrSdkModule and specify all the brXM components as module entry components.

+import BrSdkModule

import { BrowserModule } from "@angular/platform-browser";
 import { NgModule } from "@angular/core";
 import { BrSdkModule } from "@bloomreach/ng-sdk";
@@ -346,9 +346,11 @@ 

Mapping

selector: 'app-inline-container', template: ` <div> - <span *ngFor="let child of component.getChildren()"> - <ng-container [brComponent]="child"></ng-container> - </span> + @for (child of component.getChildren(); track $index){ + <span> + <ng-container [brComponent]="child"></ng-container> + </span> + } </div> `, }) @@ -408,7 +410,9 @@

Inline Mapping

<ng-template> <ul *brComponent="'menu'; let component; let page = page"> <li><a [href]="page.getUrl('/')">Home</a></li> - <li *ngFor="let item of component.getModels()">...</li> + @for (item of component.getModels(); track $index){ + <li>...</li> + } </ul> </ng-template> </br-page> @@ -527,27 +531,32 @@

State Transfering

import ServerTransferStateModule on the server and BrowserTransferStateModule on the client. If you would like to disable the feature, just pass false into -the stateKey input.

-
<br-page [stateKey]="false"></br-page>
-

Http error handling

-

The event handler is triggered when an HTTP error occurs from fetching PMA.

-
import { Component } from "@angular/core";
-import { BrPageComponent } from "@bloomreach/ng-sdk";
+the stateKey input. (this input works with angular universal and angular version < 17)

+
<br-page [stateKey]="false"></br-page>
 
-@Component({
-  selector: "app-root",
-  template: `
-    <br-page [configuration]="configuration" (httpError)="onHttpError($event)">
-      ...
-    </br-page>
-  `,
+
+### Http error handling
+
+The event handler is triggered when an HTTP error occurs from fetching PMA.
+
+```typescript
+import { Component } from "@angular/core";
+import { BrPageComponent } from "@bloomreach/ng-sdk";
+
+@Component({
+  selector: "app-root",
+  template: `
+    <br-page [configuration]="configuration" (httpError)="onHttpError($event)">
+      ...
+    </br-page>
+  `,
 })
-export class AppComponent {
-  onHttpError(error: HttpErrorResponse): void {
-    // http error handler
+export class AppComponent {
+  onHttpError(error: HttpErrorResponse): void {
+    // http error handler
   }
 
-  // ...
+  // ...
 }

License

Published under Apache 2.0 license.

@@ -605,7 +614,7 @@

br-page

-
TypePropertyRequiredDescription
inputconfigurationyesThe configuration of the SPA SDK.
inputmappingyesThe brXM and Angular components mapping.
inputpagenoPreinitialized page instance or prefetched page model. Mostly that should be used to transfer state from the server-side to the client-side.
inputstateKeynoThe TransferState key is used to transfer the state from the server-side to the client-side. By default, it equals to brPage. If false is passed then the state transferring feature will be disabled.
outputstatenoThe current state of the page component.
outputhttpErrornoThe event handler that processes HTTP error events from fetching PMA.
+
TypePropertyRequiredDescription
inputconfigurationyesThe configuration of the SPA SDK.
inputmappingyesThe brXM and Angular components mapping.
inputpagenoPreinitialized page instance or prefetched page model. Mostly that should be used to transfer state from the server-side to the client-side.
inputstateKeynoThe TransferState key is used to transfer the state from the server-side to the client-side. By default, it equals to brPage. If false is passed then the state transferring feature will be disabled.(note that in angular >= 17 this property is deprecated and you will use built-in angular ssr instead)
outputstatenoThe current state of the page component.
outputhttpErrornoThe event handler that processes HTTP error events from fetching PMA.

This component also supports a template transclusion. <ng-template> from the component contents will be rendered in the root component context.

@@ -780,7 +789,7 @@

brManageMenuButton

diff --git a/index.html b/index.html index d8370239..4aa7bbd7 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -@bloomreach/spa-sdk - v23.2.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

@bloomreach/spa-sdk - v23.2.0

+@bloomreach/spa-sdk - v23.3.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

@bloomreach/spa-sdk - v23.3.0

Bloomreach SPA SDK

diff --git a/interfaces/express.Internals.Handler.html b/interfaces/express.Internals.Handler.html index 615dc771..2986d7a0 100644 --- a/interfaces/express.Internals.Handler.html +++ b/interfaces/express.Internals.Handler.html @@ -1,4 +1,4 @@ -Handler | @bloomreach/spa-sdk - v23.2.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Callable

  • Handler(request: HandlerRequest, response: Partial<Pick<OutgoingMessage<IncomingMessage>, "getHeader" | "setHeader">>, next?: (() => void)): void