bukazu-portal-react 4.0.0-beta.3 → 4.0.0-beta.4

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/README.md CHANGED
@@ -100,14 +100,15 @@ Render the reviews page for a specific property by passing `objectCode` together
100
100
 
101
101
  ## Direct website usage (no bundler required)
102
102
 
103
- If you are not using a JavaScript bundler or a React application, you can use the self-contained **website build** instead. This single file includes React and all other dependencies — just drop two files into your page and add a `<div>` with the right attributes.
103
+ If you are not using a JavaScript bundler or a React application, you can use the self-contained **website build** instead. This single file includes React, every other dependency, and the stylesheet — drop it into your page and add a `<div>` with the right attributes.
104
104
 
105
- ### 1. Download or reference the files
105
+ ### 1. Download or reference the file
106
106
 
107
- After installing the package, copy the files from the package (or reference them from a CDN/local path):
107
+ After installing the package, copy the file from the package (or reference it from a CDN/local path):
108
108
 
109
109
  - `node_modules/bukazu-portal-react/build/portal.website.js`
110
- - `node_modules/bukazu-portal-react/build/portal.website.css`
110
+
111
+ The bundle injects its own `<style>` element, so no stylesheet link is required. A companion `node_modules/bukazu-portal-react/build/portal.website.css` is published as well, for pages whose Content-Security-Policy forbids inline styles (`style-src` without `'unsafe-inline'`).
111
112
 
112
113
  ### 2. Add a host element
113
114
 
@@ -118,8 +119,13 @@ Place a `<div class="bukazu-app">` with the following HTML attributes wherever y
118
119
  | `portal-code` | ✅ | Your Bukazu portal identifier |
119
120
  | `object-code` | — | Property code (omit for the Search module) |
120
121
  | `page` | — | Set to `"reviews"` for the Reviews module |
121
- | `language` | — | Locale: `en` \| `nl` \| `de` \| `fr` \| `es` \| `it` (default: `en`) |
122
+ | `language` | — | Locale: `en` \| `nl` \| `de` \| `fr` \| `es` \| `it`, or a full BCP-47 tag such as `nl-NL` (default: `en`) |
122
123
  | `filters` | — | JSON-encoded filters object (see filter keys in the props table below) |
124
+ | `sentry-dsn` | — | Sentry DSN for error reporting. Defaults to the DSN baked into the bundle; pass `off` to disable reporting |
125
+
126
+ The host element is found by the `bukazu-app` class. Pages that carry no such
127
+ element fall back to a single element with `id="bukazu-app"`, which is what older
128
+ embed snippets use.
123
129
 
124
130
  ### 3. Include the script and stylesheet
125
131
 
@@ -129,7 +135,6 @@ Place a `<div class="bukazu-app">` with the following HTML attributes wherever y
129
135
  <head>
130
136
  <meta charset="UTF-8" />
131
137
  <title>My website</title>
132
- <link rel="stylesheet" href="portal.website.css" />
133
138
  </head>
134
139
  <body>
135
140
 
@@ -151,7 +156,9 @@ Place a `<div class="bukazu-app">` with the following HTML attributes wherever y
151
156
  </html>
152
157
  ```
153
158
 
154
- The script automatically initialises every `.bukazu-app` element it finds on the page when the DOM is ready. Multiple portals on the same page are supported.
159
+ The script automatically initialises every `.bukazu-app` element it finds on the page when the DOM is ready. Multiple portals on the same page are supported, and loading the bundle twice is harmless — it re-renders the existing portals rather than mounting duplicates.
160
+
161
+ For advanced use the bundle exposes `BukazuPortal.init()`, `BukazuPortal.mountPortal(element)` and `BukazuPortal.version` as globals, so you can mount a portal into an element you inserted after page load.
155
162
 
156
163
  ---
157
164