@snf/access-qa-bot 2.1.0 → 2.3.0-beta.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
@@ -1,6 +1,6 @@
1
- # Q&A Bot
1
+ # ACCESS Q&A Bot
2
2
 
3
- A React component for integrating the Q&A Bot into your application. Also includes a standalone bundle for plain HTML/JS usage.
3
+ A React component for integrating the ACCESS Q&A Bot into your application. Features intelligent Q&A responses, support ticket creation with ProForma integration, and user feedback collection. Also includes a standalone bundle for plain HTML/JS usage.
4
4
 
5
5
  ## Installation
6
6
 
@@ -25,13 +25,54 @@ npm run build
25
25
  npx serve
26
26
  ```
27
27
 
28
- ### Floating vs Embedded Modes
28
+ ## Features
29
+
30
+ - **🤖 Intelligent Q&A**: AI-powered responses to user questions about ACCESS
31
+ - **🎫 Support Tickets**: Create help tickets for general support, ACCESS login issues, and resource provider login problems
32
+ - **📝 Feedback Collection**: Gather user feedback and suggestions
33
+ - **👤 User Pre-population**: Auto-fill forms with user info when logged in
34
+ - **🎨 Rich Formatting**: Support for HTML and Markdown in responses
35
+ - **♿ Accessibility**: Full screen reader support and keyboard navigation
36
+ - **📱 Responsive**: Works on desktop and mobile devices
37
+
38
+ ### Display Modes
29
39
 
30
40
  The Q&A Bot supports two display modes:
31
41
 
32
42
  - **Floating Mode** (default): Shows a chat button that opens/closes a floating chat window
33
43
  - **Embedded Mode**: Always visible, embedded directly in the page content
34
44
 
45
+ ## Available Flows
46
+
47
+ The bot supports several conversation flows:
48
+
49
+ ### 🤖 Q&A Flow
50
+ - Ask questions about ACCESS resources, services, and documentation
51
+ - Receive AI-powered responses with HTML and Markdown formatting
52
+ - Built-in feedback system with thumbs up/down options after each response
53
+ - Automatic feedback tracking and analytics
54
+ - Users can provide feedback or continue asking questions immediately
55
+ - Negative feedback offers direct path to support ticket creation
56
+ - Requires user to be logged in
57
+
58
+ ### 🎫 Support Ticket Flows
59
+ - **General Help**: Create support tickets for any ACCESS-related issues
60
+ - **ACCESS Login**: Get help with ACCESS website login problems
61
+ - **Resource Login**: Get help with resource provider login issues
62
+ - All flows support file attachments and are integrated with JSM ProForma
63
+
64
+ ### 📝 Feedback Flow
65
+ - Collect user feedback and suggestions
66
+ - Optional file attachments for screenshots or documents
67
+
68
+ ### 🔒 Security Incident Flow
69
+ - Report security issues, vulnerabilities, and incidents
70
+ - Dedicated priority levels: Critical, High, Medium, Low
71
+ - Direct routing to ACCESS cybersecurity team (Service Desk ID: 3)
72
+ - Support for file attachments (screenshots, logs, evidence)
73
+ - Professional incident tracking with ticket reference links
74
+ - User contact information pre-population when logged in
75
+
35
76
  ## Integration Methods
36
77
 
37
78
  The QABot can be integrated using a standalone javascript function, or as a react/preact component.
@@ -104,13 +145,16 @@ function MyApp() {
104
145
  | `loginUrl` | string | `"/login"` | Login redirect URL |
105
146
  | `open` | boolean | - | Controls chat window (floating mode only) |
106
147
  | `onOpenChange` | function | - | Chat window state change callback |
107
- | `ringEffect` | boolean | `true` | Phone ring animation on tooltip |
148
+ | `ringEffect` | boolean | `false` | Phone ring animation on tooltip |
108
149
  | `welcome` | string | - | Welcome message |
150
+ | `userEmail` | string | - | User's email (pre-populates ticket forms when logged in) |
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) |
109
153
 
110
154
  ### Standalone Javascript
111
155
 
112
156
  ```html
113
- <script src="https://unpkg.com/@snf/access-qa-bot@2.1.0/dist/access-qa-bot.standalone.js"></script>
157
+ <script src="https://unpkg.com/@snf/access-qa-bot@2.x/dist/access-qa-bot.standalone.js"></script>
114
158
 
115
159
  <div id="qa-bot"></div>
116
160
 
@@ -156,8 +200,11 @@ botController.destroy();
156
200
  | `embedded` | boolean | `false` | Floating or embedded mode |
157
201
  | `isLoggedIn` | boolean | `false` | User login state |
158
202
  | `loginUrl` | string | `"/login"` | Login redirect URL |
159
- | `ringEffect` | boolean | `true` | Phone ring animation on tooltip |
203
+ | `ringEffect` | boolean | `false` | Phone ring animation on tooltip |
160
204
  | `welcome` | string | - | Welcome message |
205
+ | `userEmail` | string | - | User's email (pre-populates ticket forms when logged in) |
206
+ | `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) |
161
208
 
162
209
  > **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.
163
210
 
@@ -171,4 +218,171 @@ Customize the appearance by setting CSS custom properties on the container:
171
218
  --secondary-color: #6c757d;
172
219
  --font-family: 'Arial', sans-serif;
173
220
  "></div>
174
- ```
221
+ ```
222
+
223
+ ## Configuration
224
+
225
+ ### Environment Variables
226
+
227
+ For React applications, you can set these environment variables:
228
+
229
+ ```bash
230
+ REACT_APP_API_KEY=your-api-key-here
231
+ ```
232
+
233
+ ### API Integration
234
+
235
+ The bot integrates with the ACCESS Q&A API and JSM (Jira Service Management) for ticket creation. Configure your backend endpoints to handle:
236
+
237
+ - Q&A queries with streaming responses
238
+ - Support ticket creation with ProForma field mapping
239
+ - File upload processing
240
+ - User authentication and session management
241
+
242
+ ## Development & Release
243
+
244
+ ### Building the Library
245
+
246
+ To build the distributable library files:
247
+
248
+ ```bash
249
+ npm run build:lib
250
+ ```
251
+
252
+ This creates the distribution files in the `dist/` directory:
253
+ - `access-qa-bot.js` (ES module)
254
+ - `access-qa-bot.umd.cjs` (UMD/CommonJS)
255
+ - `access-qa-bot.standalone.js` (Standalone version)
256
+
257
+ ### NPM Beta Release
258
+
259
+ To release a beta version:
260
+
261
+ ```bash
262
+ # 1. Update version to beta (without git operations)
263
+ npm version 2.2.0-beta.0 --no-git-tag-version
264
+
265
+ # 2. Build the library distribution files
266
+ npm run build:lib
267
+
268
+ # 3. Publish to npm with beta tag
269
+ npm publish --tag beta
270
+
271
+ # 4. Create meaningful git commit and tag
272
+ git add package.json
273
+ git commit -m "Release v2.2.0-beta.0: Add keyboard accessibility for checkboxes
274
+
275
+ - Implement full keyboard navigation for feedback form checkboxes
276
+ - Fix focus persistence issues between questions
277
+ - Add consistent styling across all interactive elements
278
+ - Enhance screen reader support with ARIA attributes"
279
+
280
+ # 5. Create git tag and push
281
+ git tag v2.2.0-beta.0
282
+ git push origin main --tags
283
+ ```
284
+
285
+ ### Installing Beta Versions
286
+
287
+ Users can install beta versions with:
288
+
289
+ ```bash
290
+ # Install latest beta
291
+ npm install @snf/access-qa-bot@beta
292
+
293
+ # Install specific beta version
294
+ npm install @snf/access-qa-bot@2.2.0-beta.0
295
+ ```
296
+
297
+ ### Promoting Beta to Stable
298
+
299
+ After testing and validation:
300
+
301
+ ```bash
302
+ # Option A: Promote existing beta to latest
303
+ npm dist-tag add @snf/access-qa-bot@2.2.0-beta.0 latest
304
+
305
+ # Option B: Release new stable version
306
+ npm version 2.2.0 --no-git-tag-version
307
+ npm run build:lib
308
+ npm publish
309
+ git add package.json
310
+ git commit -m "Release v2.2.0: Stable release with keyboard accessibility"
311
+ git tag v2.2.0
312
+ git push origin main --tags
313
+ ```
314
+
315
+ ### Release Verification
316
+
317
+ Check that the release was successful:
318
+
319
+ ```bash
320
+ # View all published versions
321
+ npm view @snf/access-qa-bot versions --json
322
+
323
+ # Check beta tag specifically
324
+ npm view @snf/access-qa-bot@beta
325
+
326
+ # Test installation
327
+ npm install @snf/access-qa-bot@beta
328
+ ```
329
+
330
+ ## Changelog
331
+
332
+ ### Version 2.3.0
333
+
334
+ #### ✨ New Features
335
+ - **Security Incident Reporting**: Complete security incident reporting flow for cybersecurity team
336
+ - **Dedicated Security Routing**: Direct integration with ACCESS cybersecurity team (Service Desk ID: 3)
337
+ - **Professional Security Flow**: Priority levels, detailed incident tracking, and file attachments
338
+ - **Enhanced API Integration**: Expanded API endpoints for security incident submission
339
+
340
+ #### 🔧 Security & Infrastructure
341
+ - **Robust Error Handling**: Comprehensive null checks and error handling across all flows
342
+ - **Security Portal Integration**: Proper routing to dedicated security service desk
343
+ - **File Upload Support**: Attachment support for security evidence and documentation
344
+
345
+ ### Version 2.2.0
346
+
347
+ #### ✨ New Features
348
+ - **Integrated Feedback System**: Added thumbs up/down feedback collection after each Q&A response
349
+ - **Seamless User Experience**: Users can provide feedback or continue asking questions without interruption
350
+ - **Smart Flow Routing**: Negative feedback automatically offers direct path to support ticket creation
351
+ - **Feedback Analytics**: Automatic tracking of user satisfaction with API endpoint integration
352
+ - **Responsive Design**: Optimized feedback UI with hover effects and accessibility features
353
+
354
+ #### 🎨 UI/UX Improvements
355
+ - Streamlined Q&A conversation flow with optional feedback prompts
356
+ - Enhanced button styling with smooth animations and brand color consistency
357
+ - Improved input field placeholder text for better user guidance
358
+ - Fixed horizontal scroll bar issues in user message bubbles
359
+
360
+ ### Version 2.1.0
361
+
362
+ #### ✨ New Features
363
+ - **Form Context System**: Implemented React Context to solve closure issues and ensure fresh form state
364
+ - **User Info Pre-population**: Added support for pre-filling ticket forms with user email, name, and username when logged in
365
+ - **HTML & Markdown Rendering**: Added support for rich text formatting in Q&A responses
366
+ - **Enhanced Ticket Flows**: Improved all support ticket flows with better user experience
367
+
368
+ #### 🐛 Bug Fixes
369
+ - Fixed React closure issues causing stale form data in ticket summaries
370
+ - Resolved priority and ACCESS ID display issues in ticket forms
371
+ - Fixed form state management across all ticket flows
372
+
373
+ #### 🎨 UI/UX Improvements
374
+ - Updated button text: "Create XXX Ticket" → "Yes, let's create a ticket"
375
+ - Changed "New Chat" button to "Restart" for clarity
376
+ - Improved accessibility with better ARIA labels
377
+ - Enhanced responsive design for mobile devices
378
+
379
+ #### 🔧 Technical Improvements
380
+ - Removed unused helper functions (`getCurrentPriority`, `getCurrentAccessId`)
381
+ - Cleaned up debug console statements for production
382
+ - Added markdown renderer plugin alongside HTML renderer
383
+ - Improved build configuration and excluded build directory from version control
384
+
385
+ #### 📚 Documentation
386
+ - Updated README with comprehensive feature list and integration examples
387
+ - Added detailed API documentation and configuration options
388
+ - Included changelog for version tracking