@webex/cc-components 1.28.0-ccwidgets.36 → 1.28.0-ccwidgets.38
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/dist/index.js +210 -12
- package/dist/types/components/StationLogin/constants.d.ts +2 -0
- package/dist/types/components/StationLogin/station-login.d.ts +5 -0
- package/dist/types/components/StationLogin/station-login.types.d.ts +80 -0
- package/dist/types/components/task/CallControl/call-control.d.ts +5 -0
- package/dist/types/components/task/IncomingTask/incoming-task.d.ts +4 -0
- package/dist/types/components/{OutdialCall/out-dial-call.d.ts → task/OutdialCall/outdial-call.d.ts} +2 -2
- package/dist/types/components/task/Task/index.d.ts +17 -0
- package/dist/types/components/task/TaskList/task-list.d.ts +5 -0
- package/dist/types/components/task/TaskTimer/index.d.ts +8 -0
- package/dist/types/components/task/task.types.d.ts +177 -0
- package/dist/types/index.d.ts +9 -4
- package/dist/wc.js +177 -12
- package/package.json +2 -2
- package/dist/types/components/OutdialCall/out-dial-call.types.d.ts +0 -17
|
@@ -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'>;
|
package/dist/types/components/{OutdialCall/out-dial-call.d.ts → task/OutdialCall/outdial-call.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { OutdialCallComponentProps } from '
|
|
3
|
-
import './
|
|
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,177 @@
|
|
|
1
|
+
import { ILogger, ITask, IContactCenter, WrapupCodes } 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
|
+
export type CallControlComponentProps = Pick<ControlProps, 'currentTask' | 'audioRef' | 'wrapupCodes' | 'wrapupRequired' | 'toggleHold' | 'toggleRecording' | 'endCall' | 'wrapupCall' | 'isHeld' | 'setIsHeld' | 'isRecording' | 'setIsRecording'>;
|
|
160
|
+
/**
|
|
161
|
+
* Interface representing the properties for OutdialCall component.
|
|
162
|
+
*/
|
|
163
|
+
export interface OutdialCallProps {
|
|
164
|
+
/**
|
|
165
|
+
* Function to start outdial call.
|
|
166
|
+
*/
|
|
167
|
+
startOutdial: (destination: string) => void;
|
|
168
|
+
/**
|
|
169
|
+
* CC SDK Instance.
|
|
170
|
+
*/
|
|
171
|
+
cc: IContactCenter;
|
|
172
|
+
/**
|
|
173
|
+
* Logger instance for logging purpose.
|
|
174
|
+
*/
|
|
175
|
+
logger: ILogger;
|
|
176
|
+
}
|
|
177
|
+
export type OutdialCallComponentProps = Pick<OutdialCallProps, 'startOutdial'>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import UserStateComponent from './components/UserState/user-state';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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';
|