ui-soxo-bootstrap-core 2.6.1-dev.2 → 2.6.1-dev.20

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 (66) hide show
  1. package/core/components/extra-info/extra-info-details.js +2 -2
  2. package/core/components/index.js +2 -11
  3. package/core/components/landing-api/landing-api.js +91 -15
  4. package/core/components/landing-api/landing-api.scss +22 -0
  5. package/core/components/license-management/license-alert.js +97 -0
  6. package/core/lib/Store.js +3 -3
  7. package/core/lib/components/global-header/animations.js +78 -4
  8. package/core/lib/components/global-header/global-header.js +224 -255
  9. package/core/lib/components/global-header/global-header.scss +162 -24
  10. package/core/lib/components/sidemenu/animations.js +84 -2
  11. package/core/lib/components/sidemenu/sidemenu.js +191 -65
  12. package/core/lib/components/sidemenu/sidemenu.scss +221 -14
  13. package/core/lib/elements/basic/country-phone-input/country-phone-input.js +14 -8
  14. package/core/lib/elements/basic/dragabble-wrapper/draggable-wrapper.js +1 -1
  15. package/core/lib/elements/basic/menu-tree/menu-tree.js +26 -13
  16. package/core/lib/models/forms/components/form-creator/form-creator.scss +4 -3
  17. package/core/lib/models/menus/components/menu-list/menu-list.js +424 -467
  18. package/core/lib/models/process/components/process-dashboard/process-dashboard.js +469 -3
  19. package/core/lib/models/process/components/process-dashboard/process-dashboard.scss +4 -0
  20. package/core/lib/pages/change-password/change-password.js +17 -24
  21. package/core/lib/pages/change-password/change-password.scss +45 -48
  22. package/core/lib/pages/login/commnication-mode-selection.js +2 -2
  23. package/core/lib/pages/login/login.js +47 -62
  24. package/core/lib/pages/login/login.scss +9 -0
  25. package/core/lib/pages/login/reset-password.js +17 -17
  26. package/core/lib/pages/login/reset-password.scss +10 -1
  27. package/core/lib/pages/profile/themes.json +4 -4
  28. package/core/lib/utils/api/api.utils.js +30 -18
  29. package/core/lib/utils/common/common.utils.js +49 -35
  30. package/core/lib/utils/http/http.utils.js +2 -1
  31. package/core/lib/utils/index.js +4 -1
  32. package/core/models/base/base.js +7 -3
  33. package/core/models/core-scripts/core-scripts.js +134 -126
  34. package/core/models/doctor/components/doctor-add/doctor-add.js +9 -4
  35. package/core/models/menus/components/menu-add/menu-add.js +1 -1
  36. package/core/models/menus/components/menu-lists/menu-lists.js +53 -54
  37. package/core/models/menus/menus.js +27 -2
  38. package/core/models/roles/components/role-add/role-add.js +92 -59
  39. package/core/models/roles/components/role-list/role-list.js +1 -1
  40. package/core/models/staff/components/staff-add/staff-add.js +20 -32
  41. package/core/models/users/components/assign-role/assign-role.js +145 -50
  42. package/core/models/users/components/assign-role/assign-role.scss +209 -45
  43. package/core/models/users/components/assign-role/avatar-props.js +45 -0
  44. package/core/models/users/components/user-add/user-add.js +46 -55
  45. package/core/models/users/components/user-add/user-edit.js +25 -4
  46. package/core/models/users/users.js +9 -1
  47. package/core/modules/dashboard/components/dashboard-card/menu-dashboard-card.js +1 -1
  48. package/core/modules/reporting/components/reporting-dashboard/README.md +316 -0
  49. package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.js +147 -0
  50. package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.scss +76 -0
  51. package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.js +90 -0
  52. package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.test.js +74 -0
  53. package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.js +252 -0
  54. package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.test.js +126 -0
  55. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +326 -436
  56. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.scss +7 -0
  57. package/core/modules/steps/action-buttons.js +33 -15
  58. package/core/modules/steps/action-buttons.scss +55 -9
  59. package/core/modules/steps/chat-assistant.js +141 -0
  60. package/core/modules/steps/openai-realtime.js +275 -0
  61. package/core/modules/steps/readme.md +167 -0
  62. package/core/modules/steps/steps.js +1078 -57
  63. package/core/modules/steps/steps.scss +539 -90
  64. package/core/modules/steps/timeline.js +21 -19
  65. package/core/modules/steps/voice-navigation.js +709 -0
  66. package/package.json +2 -1
@@ -0,0 +1,167 @@
1
+ ## ProcessStepsPage
2
+
3
+ `ProcessStepsPage` is a generic multi-step process runner used to render and track workflow steps.
4
+
5
+ File: `core/modules/steps/steps.js`
6
+
7
+ ## What It Does
8
+
9
+ - Loads process steps from `Dashboard.loadProcess(processId)`.
10
+ - Dynamically renders step components using `related_page`.
11
+ - Tracks step and process timings.
12
+ - Supports `Next`, `Back`, `Skip`, `Finish`, and optional next-process start.
13
+ - Supports timeline click navigation.
14
+ - Supports keyboard navigation with `ArrowLeft` (previous) and `ArrowRight` (next).
15
+ - Supports voice-controlled navigation through Gemini Live API command interpretation.
16
+ - Supports step-level text-to-speech narration with optional auto narration.
17
+ - Optionally opens process content in an external window.
18
+
19
+ ## Export
20
+
21
+ `ProcessStepsPage` is exported from:
22
+
23
+ ```js
24
+ core/modules/index.js
25
+ ```
26
+
27
+ and can be imported as:
28
+
29
+ ```jsx
30
+ import { ProcessStepsPage } from '.../core/modules';
31
+ ```
32
+
33
+ ## Props
34
+
35
+ - `match`: Router match object.
36
+ - `CustomComponents`: Map of custom step components keyed by component name.
37
+ - `showExternalWindow`: Boolean to enable dual render in popup + main window after chaining process.
38
+ - `ExternalWindowWidth`: Popup width.
39
+ - `ExternalWindowHeight`: Popup height.
40
+ - `history`: Router history (used for goBack on completion).
41
+
42
+ All additional props are forwarded to dynamic step components.
43
+
44
+ ## URL Params Used
45
+
46
+ `Location.search()` is used to read:
47
+
48
+ - `processId`: Initial process to load.
49
+ - `opb_id` or `reference_id`: Reference id for process log.
50
+ - `opno` or `reference_number`: Reference number for process log.
51
+ - `mode`: Passed to process log payload.
52
+
53
+ ## Step Contract (Expected Data Shape)
54
+
55
+ Each step returned by backend is expected to include:
56
+
57
+ - `step_id`: Unique step id.
58
+ - `step_name`: Step title shown in UI.
59
+ - `step_description`: Step subtitle shown in UI.
60
+ - `related_page`: Component key to resolve from `CustomComponents` + generic components.
61
+ - `config`: Optional props object spread into the dynamic step component.
62
+ - `is_mandatory`: If `true`, step requires `onStepComplete()` before `Next` is enabled.
63
+ - `allow_skip`: `'Y'` enables Skip button.
64
+ - `order_seqtype`: `'E'` marks end-step and shows `Finish`.
65
+
66
+ ## Dynamic Step Rendering
67
+
68
+ The active step component is resolved by:
69
+
70
+ - `allComponents[step.related_page]`
71
+
72
+ and rendered with:
73
+
74
+ - `step`
75
+ - `params` (parsed URL params)
76
+ - `onStepComplete` callback
77
+ - forwarded parent props
78
+ - `step.config` spread values
79
+
80
+ If no step exists, an empty state is shown.
81
+ If component resolution fails, an empty state with missing component name is shown.
82
+
83
+ ## Timing Persistence
84
+
85
+ Timings are stored in localStorage per process:
86
+
87
+ - key: `processTimings_<processId>`
88
+
89
+ Each timing entry:
90
+
91
+ - `step_id`
92
+ - `start_time`
93
+ - `end_time`
94
+ - `duration` (ms)
95
+ - `status` (`completed` or `skipped`)
96
+
97
+ On successful `Dashboard.processLog(payload)`, timings are cleared.
98
+ On failure, timings are retained in localStorage.
99
+
100
+ ## Voice Control
101
+
102
+ Voice commands supported:
103
+
104
+ - `next`
105
+ - `previous` / `back`
106
+ - `skip`
107
+ - `finish`
108
+ - `repeat`
109
+ - `go to step <number>`
110
+
111
+ Voice flow:
112
+
113
+ - Browser speech recognition captures spoken command.
114
+ - Transcript is sent to Gemini Live API over WebSocket.
115
+ - Gemini returns normalized navigation action.
116
+ - Step navigation executes in `ProcessStepsPage`.
117
+
118
+ Step narration:
119
+
120
+ - Uses AI TTS providers (Gemini / ElevenLabs).
121
+ - Can be triggered with `Read Step`.
122
+ - Auto narration can be toggled on/off.
123
+
124
+ ### Voice Configuration
125
+
126
+ - `REACT_APP_GEMINI_API_KEY`: Gemini API key (required for Gemini Live).
127
+ - `REACT_APP_GEMINI_LIVE_MODEL`: Live model name (default: `gemini-live-2.5-flash-preview`).
128
+ - `REACT_APP_GEMINI_LIVE_WS_ENDPOINT`: Optional custom Live WebSocket endpoint.
129
+ - `REACT_APP_VOICE_COMMAND_LANG`: Speech recognition language (default: `en-US`).
130
+ - `ELEVEN_LABS_KEY` or `ELEVENLABS_API_KEY`: ElevenLabs API key for narration provider `elevenlabs`.
131
+ - `REACT_APP_ELEVENLABS_API_KEY`: Browser-safe ElevenLabs API key alternative.
132
+ - `ELEVENLABS_VOICE_ID` / `ELEVEN_LABS_VOICE_ID` / `REACT_APP_ELEVENLABS_VOICE_ID`: Optional ElevenLabs voice id.
133
+ - `REACT_APP_STEP_TTS_LANG`: Narration language (default: `en-US`).
134
+ - `REACT_APP_STEP_TTS_RATE`: Narration speed (default: `1`).
135
+ - `REACT_APP_STEP_TTS_PITCH`: Narration pitch (default: `1`).
136
+ - `REACT_APP_OPENAI_REALTIME_TOKEN_ENDPOINT`: Backend endpoint that returns an OpenAI Realtime client secret for WebRTC.
137
+ - `REACT_APP_OPENAI_REALTIME_MODEL`: Realtime model name (default: `gpt-realtime`).
138
+ - `REACT_APP_OPENAI_REALTIME_VOICE`: Realtime voice name (default: `alloy`).
139
+ - `REACT_APP_OPENAI_REALTIME_INSTRUCTIONS`: Optional system instructions for the conversation session.
140
+ - `OPEN_AI_KEY` / `OPENAI_API_KEY`: OpenAI API key used when token endpoint is not configured.
141
+
142
+ ## Minimal Usage Example
143
+
144
+ ```jsx
145
+ import React from 'react';
146
+ import { ProcessStepsPage } from '../../modules';
147
+ import SampleDetail from '../../modules/lab/components/sample-detail/sample-detail';
148
+ import ResultDetail from '../../modules/lab/components/result-detail/result-detail';
149
+
150
+ const CustomComponents = {
151
+ SampleDetail,
152
+ ResultDetail,
153
+ };
154
+
155
+ export default function ProcessPage(props) {
156
+ return <ProcessStepsPage {...props} CustomComponents={CustomComponents} showExternalWindow />;
157
+ }
158
+ ```
159
+
160
+ ## Related Files
161
+
162
+ - `core/modules/steps/steps.js`
163
+ - `core/modules/steps/timeline.js`
164
+ - `core/modules/steps/action-buttons.js`
165
+ - `core/modules/steps/voice-navigation.js`
166
+ - `core/modules/steps/openai-realtime.js`
167
+ - `core/modules/steps/steps.scss`