@snf/access-qa-bot 2.3.1-beta.1 → 2.4.1

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
@@ -149,12 +149,14 @@ function MyApp() {
149
149
  | `welcome` | string | - | Welcome message |
150
150
  | `userEmail` | string | - | User's email (pre-populates ticket forms when logged in) |
151
151
  | `userName` | string | - | User's display name (pre-populates ticket forms when logged in) |
152
- | `username` | string | - | User's username/ACCESS ID (pre-populates ticket forms when logged in) |
152
+ | `accessId` | string | - | User's ACCESS ID (pre-populates ticket forms when logged in) |
153
153
 
154
154
  ### Standalone Javascript
155
155
 
156
+ **Recommended approach** - use the self-contained standalone bundle:
157
+
156
158
  ```html
157
- <script src="https://unpkg.com/@snf/access-qa-bot@2.x/dist/access-qa-bot.standalone.js"></script>
159
+ <script src="https://unpkg.com/@snf/access-qa-bot@2.4.0/dist/access-qa-bot.standalone.js"></script>
158
160
 
159
161
  <div id="qa-bot"></div>
160
162
 
@@ -168,6 +170,8 @@ qaBot({
168
170
  </script>
169
171
  ```
170
172
 
173
+ > **Note**: Early versions (v0.1.x) supported a "three files" CDN approach using `/build/` directory files. This approach is no longer supported as the build architecture changed from auto-executing scripts to library exports. Use the standalone bundle above instead.
174
+
171
175
  #### Programmatic Control
172
176
 
173
177
  When using the JavaScript API in plain HTML/JS (requires standalone bundle), you get a controller object with imperative methods:
@@ -204,7 +208,7 @@ botController.destroy();
204
208
  | `welcome` | string | - | Welcome message |
205
209
  | `userEmail` | string | - | User's email (pre-populates ticket forms when logged in) |
206
210
  | `userName` | string | - | User's display name (pre-populates ticket forms when logged in) |
207
- | `username` | string | - | User's username/ACCESS ID (pre-populates ticket forms when logged in) |
211
+ | `accessId` | string | - | User's ACCESS ID (pre-populates ticket forms when logged in) |
208
212
 
209
213
  > **More Examples**: See `index.html` in this repository for examples including login state management, embedded mode, and programmatic control. Run the react app to see the same in a react context.
210
214
 
@@ -254,6 +258,23 @@ This creates the distribution files in the `dist/` directory:
254
258
  - `access-qa-bot.umd.cjs` (UMD/CommonJS)
255
259
  - `access-qa-bot.standalone.js` (Standalone version)
256
260
 
261
+ ### Build Directory
262
+
263
+ The package includes both `/dist/` and `/build/` directories:
264
+
265
+ - **`/dist/`**: Library files for npm consumers and CDN usage
266
+ - `access-qa-bot.js` (ES module for React apps)
267
+ - `access-qa-bot.umd.cjs` (CommonJS)
268
+ - `access-qa-bot.standalone.js` (Self-contained for plain HTML)
269
+
270
+ - **`/build/`**: React app build files
271
+ - **Not for standalone CDN usage** (use `/dist/access-qa-bot.standalone.js` instead)
272
+ - Required for shadow DOM implementations that need to import CSS directly
273
+ - Example: `import qaStyle from '@snf/access-qa-bot/build/static/css/main.css?inline'`
274
+ - Maintained for backward compatibility with existing integrations
275
+
276
+ Both directories are published to npm to support different integration patterns.
277
+
257
278
  ### NPM Beta Release
258
279
 
259
280
  To release a beta version:
@@ -380,7 +401,7 @@ npm install @snf/access-qa-bot@beta
380
401
  - Removed unused helper functions (`getCurrentPriority`, `getCurrentAccessId`)
381
402
  - Cleaned up debug console statements for production
382
403
  - Added markdown renderer plugin alongside HTML renderer
383
- - Improved build configuration and excluded build directory from version control
404
+ - Improved build configuration and updated build directory handling
384
405
 
385
406
  #### 📚 Documentation
386
407
  - Updated README with comprehensive feature list and integration examples