widget-web-component 1.5.0-rc.0-rc → 1.5.0

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.
Files changed (3) hide show
  1. package/README.md +9 -11
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -133,33 +133,31 @@ Query string, hash and trailing slash are stripped from a valid URL.
133
133
 
134
134
  ## 🔧 Environment config (`WidgetConfig`)
135
135
 
136
- `runtimeEnv`, `organization`, `notificationsUrl` and `scraperMock` are **environment
137
- configuration** — they describe *which* Belender backend the widget talks to. These
138
- values are passed at initialization time via `initBelenderComponent(config)`, not as
139
- HTML attributes.
136
+ `runtimeEnv` and `notificationsUrl` are **environment configuration** — they describe
137
+ *which* Belender backend the widget talks to. These values are passed at initialization
138
+ time via `initBelenderComponent(config)`, not as HTML attributes.
140
139
 
141
140
  ```js
142
141
  initBelenderComponent({
143
142
  runtimeEnv: 'qa',
144
- organization: 'belender',
145
143
  notificationsUrl: 'wss://ws.custom-funder.com',
146
- scraperMock: true
147
144
  }).then((BelenderWebComponent) => {
148
145
  customElements.define('belender-web-component', BelenderWebComponent);
149
146
  });
150
147
  ```
151
148
 
152
149
  **When omitted**, each field falls back to automatic derivation from the hostname of
153
- `api-url` (e.g. `.qa.` → `qa`, `api.` prefix → notifications URL, `opendata` in
154
- hostname → opendata org). This means you only need to pass config when `api-url`
155
- points to a **custom domain** outside Belender's naming conventions.
150
+ `api-url` (e.g. `.qa.` → `qa`, `api.` prefix → notifications URL). This means you only
151
+ need to pass config when `api-url` points to a **custom domain** outside Belender's
152
+ naming conventions.
156
153
 
157
154
  **Fields are independent** — you can set any subset. Unset values still fall back to
158
155
  the automatic derivation.
159
156
 
157
+ > â„šī¸ `organization` and `scraperMock` are always derived automatically from `api-url`
158
+ > and are not configurable by the host.
159
+
160
160
  | Field | Type | Valid values | Derived from `api-url` when omitted |
161
161
  |---|---|---|---|
162
162
  | `runtimeEnv` | string | `qa`, `dev`, `pro` | `.qa.` in hostname → `qa`, `.dev.` → `dev`, otherwise → `pro` |
163
- | `organization` | string | `belender`, `opendata` | `opendata` in hostname → `opendata`, otherwise → `belender` |
164
163
  | `notificationsUrl` | string | Any `ws://` or `wss://` URL | `api.` prefix replaced with `notifications.` |
165
- | `scraperMock` | boolean | `true`, `false` | `belender`+`qa` or `opendata`+`dev` → `true`, otherwise → `false` |