@webex/cc-components 1.28.0-ccwidgets.37 → 1.28.0-ccwidgets.39

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.
@@ -0,0 +1,2 @@
1
+ export declare const MULTIPLE_SIGN_IN_ALERT_MESSAGE = "You are signed in to the Desktop in multiple application instances. Click Continue to proceed with the Desktop in this application instance. Else, close this window.";
2
+ export declare const MULTIPLE_SIGN_IN_ALERT_TITLE = "Multiple Sign In Alert";
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { StationLoginComponentProps } from './station-login.types';
3
+ import './station-login.style.scss';
4
+ declare const StationLoginComponent: React.FunctionComponent<StationLoginComponentProps>;
5
+ export default StationLoginComponent;
@@ -0,0 +1,80 @@
1
+ import { IContactCenter, StationLoginSuccess, StationLogoutSuccess, Team } from '@webex/plugin-cc';
2
+ import { ILogger } from '@webex/cc-store';
3
+ /**
4
+ * Interface representing the properties for the Station Login component.
5
+ */
6
+ export interface IStationLoginProps {
7
+ /**
8
+ * Webex instance.
9
+ */
10
+ cc: IContactCenter;
11
+ /**
12
+ * Array of the team IDs that agent belongs to
13
+ */
14
+ teams: Team[];
15
+ /**
16
+ * Station login options available for the agent
17
+ */
18
+ loginOptions: string[];
19
+ /**
20
+ * Handler to initiate the agent login
21
+ */
22
+ login: () => void;
23
+ /**
24
+ * Handler for agent logout
25
+ */
26
+ logout: () => void;
27
+ /**
28
+ * Response data received on agent login success
29
+ */
30
+ loginSuccess?: StationLoginSuccess;
31
+ /**
32
+ * Error received on agent login failure
33
+ */
34
+ loginFailure?: Error;
35
+ /**
36
+ * Response data received on agent login success
37
+ */
38
+ logoutSuccess?: StationLogoutSuccess;
39
+ /**
40
+ * Flag to indicate if the agent is logged in
41
+ */
42
+ isAgentLoggedIn: boolean;
43
+ /**
44
+ * The selected device type for agent login
45
+ */
46
+ deviceType: string;
47
+ /**
48
+ * Callback function to be invoked once the agent login is successful
49
+ */
50
+ onLogin?: () => void;
51
+ /**
52
+ * Callback function to be invoked once the agent login is successful
53
+ */
54
+ onLogout?: () => void;
55
+ /**
56
+ * Handler to set device type
57
+ */
58
+ setDeviceType: (deviceType: string) => void;
59
+ /**
60
+ * Handler to set the entered dial number
61
+ */
62
+ setDialNumber: (dn: string) => void;
63
+ /**
64
+ * Handler to set the selected agent team
65
+ */
66
+ setTeam: (team: string) => void;
67
+ /**
68
+ * The logger instance from SDK
69
+ */
70
+ logger: ILogger;
71
+ /**
72
+ * Handler to relogin the agent when the agent is already logged in
73
+ */
74
+ handleContinue: () => void;
75
+ /**
76
+ * Flag to indicate if the alert should be shown
77
+ */
78
+ showMultipleLoginAlert: boolean;
79
+ }
80
+ export type StationLoginComponentProps = Pick<IStationLoginProps, 'teams' | 'loginOptions' | 'login' | 'logout' | 'loginSuccess' | 'loginFailure' | 'logoutSuccess' | 'setDeviceType' | 'setDialNumber' | 'setTeam' | 'isAgentLoggedIn' | 'handleContinue' | 'deviceType' | 'showMultipleLoginAlert'>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConsultTransferListComponentProps } from '../../task.types';
3
+ declare const ConsultTransferListComponent: React.FC<ConsultTransferListComponentProps>;
4
+ export default ConsultTransferListComponent;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConsultTransferPopoverComponentProps } from '../../task.types';
3
+ declare const ConsultTransferPopoverComponent: React.FC<ConsultTransferPopoverComponentProps>;
4
+ export default ConsultTransferPopoverComponent;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { CallControlComponentProps } from '../task.types';
3
+ import './call-control.styles.scss';
4
+ declare function CallControlComponent(props: CallControlComponentProps): React.JSX.Element;
5
+ export default CallControlComponent;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IncomingTaskComponentProps } from '../task.types';
3
+ declare const IncomingTaskComponent: React.FunctionComponent<IncomingTaskComponentProps>;
4
+ export default IncomingTaskComponent;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { OutdialCallComponentProps } from './out-dial-call.types';
3
- import './out-dial-call.styles.scss';
2
+ import { OutdialCallComponentProps } from '../task.types';
3
+ import './outdial-call.style.scss';
4
4
  declare const OutdialCallComponent: React.FunctionComponent<OutdialCallComponentProps>;
5
5
  export default OutdialCallComponent;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { PressEvent } from '@react-types/shared';
3
+ import './styles.scss';
4
+ interface TaskProps {
5
+ title?: string;
6
+ state?: string;
7
+ startTimeStamp?: number;
8
+ ronaTimeout?: number;
9
+ selected?: boolean;
10
+ isIncomingTask?: boolean;
11
+ queue?: string;
12
+ acceptTask?: (e: PressEvent) => void;
13
+ declineTask?: (e: PressEvent) => void;
14
+ isBrowser?: boolean;
15
+ }
16
+ declare const Task: React.FC<TaskProps>;
17
+ export default Task;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TaskListComponentProps } from '../task.types';
3
+ import './styles.scss';
4
+ declare const TaskListComponent: React.FunctionComponent<TaskListComponentProps>;
5
+ export default TaskListComponent;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface TaskTimerProps {
3
+ startTimeStamp?: number;
4
+ countdown?: boolean;
5
+ ronaTimeout?: number;
6
+ }
7
+ declare const TaskTimer: React.FC<TaskTimerProps>;
8
+ export default TaskTimer;
@@ -0,0 +1,218 @@
1
+ import { ILogger, ITask, IContactCenter, WrapupCodes, BuddyDetails, DestinationType } from '@webex/cc-store';
2
+ /**
3
+ * Interface representing the TaskProps of a user.
4
+ */
5
+ export interface TaskProps {
6
+ /**
7
+ * currentTask of the agent.
8
+ */
9
+ currentTask: ITask;
10
+ /**
11
+ * Incoming task on the incoming task widget
12
+ */
13
+ incomingTask: ITask;
14
+ /**
15
+ * CC SDK Instance.
16
+ */
17
+ cc: IContactCenter;
18
+ /**
19
+ * Handler for task accepted
20
+ */
21
+ onAccepted?: () => void;
22
+ /**
23
+ * Handler for task declined
24
+ */
25
+ onDeclined?: () => void;
26
+ /**
27
+ * Handler for task accepted in TaskList
28
+ */
29
+ onTaskAccepted?: (task: ITask) => void;
30
+ /**
31
+ * Handler for task declined in TaskList
32
+ */
33
+ onTaskDeclined?: (task: ITask) => void;
34
+ /**
35
+ * accept incoming task action
36
+ */
37
+ accept: () => void;
38
+ /**
39
+ * decline incoming task action
40
+ */
41
+ decline: () => void;
42
+ /**
43
+ * accept task from task list
44
+ */
45
+ acceptTask: (task: ITask) => void;
46
+ /**
47
+ * decline task from tasklist
48
+ */
49
+ declineTask: (task: ITask) => void;
50
+ /**
51
+ * Flag to determine if the user is logged in with a browser option
52
+ */
53
+ isBrowser: boolean;
54
+ /**
55
+ * Flag to determine if the task is answered
56
+ */
57
+ isAnswered: boolean;
58
+ /**
59
+ * Flag to determine if the task is ended
60
+ */
61
+ isEnded: boolean;
62
+ /**
63
+ * Selected login option
64
+ */
65
+ deviceType: string;
66
+ /**
67
+ * List of tasks
68
+ */
69
+ taskList: ITask[];
70
+ /**
71
+ * The logger instance from SDK
72
+ */
73
+ logger: ILogger;
74
+ }
75
+ export type IncomingTaskComponentProps = Pick<TaskProps, 'incomingTask' | 'isBrowser' | 'accept' | 'decline'>;
76
+ export type TaskListComponentProps = Pick<TaskProps, 'currentTask' | 'taskList' | 'isBrowser' | 'acceptTask' | 'declineTask'>;
77
+ /**
78
+ * Interface representing the properties for control actions on a task.
79
+ */
80
+ export interface ControlProps {
81
+ /**
82
+ * Audio reference
83
+ */
84
+ audioRef: React.RefObject<HTMLAudioElement>;
85
+ /**
86
+ * The current task being handled.
87
+ */
88
+ currentTask: ITask;
89
+ /**
90
+ * Function to handle hold/resume actions.
91
+ */
92
+ onHoldResume?: () => void;
93
+ /**
94
+ * Function to handle ending the task.
95
+ */
96
+ onEnd?: () => void;
97
+ /**
98
+ * Function to handle wrapping up the task.
99
+ */
100
+ onWrapUp?: ({ task, wrapUpReason }: {
101
+ task: ITask;
102
+ wrapUpReason: string;
103
+ }) => void;
104
+ /**
105
+ * Logger instance for logging purposes.
106
+ */
107
+ logger: ILogger;
108
+ /**
109
+ * Array of wrap-up codes.
110
+ * TODO: Expose this type from SDK.
111
+ */
112
+ wrapupCodes: WrapupCodes[];
113
+ /**
114
+ * Indicates if wrap-up is required.
115
+ */
116
+ wrapupRequired: boolean;
117
+ /**
118
+ * Function to handle hold/resume actions with a boolean parameter.
119
+ * @param hold - Boolean indicating whether to hold (true) or resume (false).
120
+ */
121
+ toggleHold: (hold: boolean) => void;
122
+ /**
123
+ * Function to handle pause/resume recording actions.
124
+ */
125
+ toggleRecording: () => void;
126
+ /**
127
+ * Function to handle ending the call.
128
+ */
129
+ endCall: () => void;
130
+ /**
131
+ * Function to handle wrapping up the call with a reason and ID.
132
+ * @param wrapupReason - The reason for wrapping up the call.
133
+ * @param wrapupId - The ID associated with the wrap-up reason.
134
+ */
135
+ wrapupCall: (wrapupReason: string, wrapupId: string) => void;
136
+ /**
137
+ * Selected login option
138
+ */
139
+ deviceType: string;
140
+ /**
141
+ * Flag to determine if the task is held
142
+ */
143
+ isHeld: boolean;
144
+ /**
145
+ * Function to set the held status of the task.
146
+ * @param isHeld - Boolean indicating whether the task is held.
147
+ */
148
+ setIsHeld: (isHeld: boolean) => void;
149
+ /**
150
+ * Flag to determine if the task is being recorded
151
+ */
152
+ isRecording: boolean;
153
+ /**
154
+ * Function to set the recording status of the task.
155
+ * @param isRecording - Boolean indicating whether the task is being recorded.
156
+ */
157
+ setIsRecording: (isRecording: boolean) => void;
158
+ /**
159
+ * List of buddy agents available for consult
160
+ */
161
+ buddyAgents: BuddyDetails[];
162
+ /**
163
+ * Function to load buddy agents
164
+ */
165
+ loadBuddyAgents: () => Promise<void>;
166
+ /**
167
+ * Function to transfer the call to a destination.
168
+ * @param destination - The destination to transfer the call to.
169
+ * @param destinationType - The type of destination.
170
+ */
171
+ transferCall: (destination: string, destinationType: DestinationType) => void;
172
+ /**
173
+ * Function to consult with a buddy agent.
174
+ */
175
+ consultCall: () => void;
176
+ }
177
+ export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'audioRef' | 'wrapupCodes' | 'wrapupRequired' | 'toggleHold' | 'toggleRecording' | 'endCall' | 'wrapupCall' | 'isHeld' | 'setIsHeld' | 'isRecording' | 'setIsRecording' | 'buddyAgents' | 'loadBuddyAgents' | 'transferCall' | 'consultCall'>;
178
+ /**
179
+ * Interface representing the properties for OutdialCall component.
180
+ */
181
+ export interface OutdialCallProps {
182
+ /**
183
+ * Function to start outdial call.
184
+ */
185
+ startOutdial: (destination: string) => void;
186
+ /**
187
+ * CC SDK Instance.
188
+ */
189
+ cc: IContactCenter;
190
+ /**
191
+ * Logger instance for logging purpose.
192
+ */
193
+ logger: ILogger;
194
+ }
195
+ export type OutdialCallComponentProps = Pick<OutdialCallProps, 'startOutdial'>;
196
+ /**
197
+ * Interface representing the properties for CallControlListItem component.
198
+ */
199
+ export interface ConsultTransferListComponentProps {
200
+ title: string;
201
+ subtitle?: string;
202
+ buttonIcon: string;
203
+ onButtonPress: () => void;
204
+ className?: string;
205
+ }
206
+ /**
207
+ * Interface representing the properties for ConsultTransferPopover component.
208
+ */
209
+ export interface ConsultTransferPopoverComponentProps {
210
+ heading: string;
211
+ buttonIcon: string;
212
+ buddyAgents: Array<{
213
+ agentId: string;
214
+ agentName: string;
215
+ dn: string;
216
+ }>;
217
+ onAgentSelect: (agentId: string) => void;
218
+ }
@@ -1,5 +1,10 @@
1
1
  import UserStateComponent from './components/UserState/user-state';
2
- import { IUserState } from './components/UserState/user-state.types';
3
- import OutdialCallComponent from './components/OutdialCall/out-dial-call';
4
- import { IOutdialCall } from './components/OutdialCall/out-dial-call.types';
5
- export { UserStateComponent, type IUserState, OutdialCallComponent, type IOutdialCall };
2
+ import StationLoginComponent from './components/StationLogin/station-login';
3
+ import CallControlComponent from './components/task/CallControl/call-control';
4
+ import IncomingTaskComponent from './components/task/IncomingTask/incoming-task';
5
+ import TaskListComponent from './components/task/TaskList/task-list';
6
+ import OutdialCallComponent from './components/task/OutdialCall/outdial-call';
7
+ export { UserStateComponent, StationLoginComponent, CallControlComponent, IncomingTaskComponent, TaskListComponent, OutdialCallComponent, };
8
+ export * from './components/StationLogin/station-login.types';
9
+ export * from './components/UserState/user-state.types';
10
+ export * from './components/task/task.types';